From 4fb78c3f96602c58792582ad7ff92ad7f3afdc15 Mon Sep 17 00:00:00 2001 From: Pavel <14926950+prichodko@users.noreply.github.com> Date: Wed, 23 Feb 2022 15:49:00 +0100 Subject: [PATCH] Improve Prettier monorepo configuration (#225) * Add prettier configuration files * Move prettier command to monorepo root * Format all files --- .prettierignore | 5 + .prettierrc | 5 + README.md | 2 +- examples/channel/index.tsx | 12 +- examples/community/index.tsx | 12 +- package.json | 4 +- packages/status-core/package.json | 3 - packages/status-core/src/chat.ts | 42 +- packages/status-core/src/community.spec.ts | 52 +- packages/status-core/src/community.ts | 58 +- packages/status-core/src/contacts.ts | 134 +- packages/status-core/src/contentTopic.ts | 14 +- packages/status-core/src/encryption.spec.ts | 36 +- packages/status-core/src/encryption.ts | 12 +- packages/status-core/src/groupChats.ts | 304 +- packages/status-core/src/identity.ts | 26 +- packages/status-core/src/index.ts | 20 +- packages/status-core/src/messenger.spec.ts | 197 +- packages/status-core/src/messenger.ts | 154 +- .../src/proto/communities/v1/chat_identity.ts | 432 ++- .../src/proto/communities/v1/chat_message.ts | 944 ++--- .../src/proto/communities/v1/communities.ts | 1419 ++++--- .../proto/communities/v1/emoji_reaction.ts | 272 +- .../src/proto/communities/v1/enums.ts | 94 +- .../v1/membership_update_message.ts | 338 +- .../src/proto/communities/v1/status_update.ts | 160 +- .../status/v1/application_metadata_message.ts | 350 +- packages/status-core/src/topics.ts | 36 +- packages/status-core/src/utils.ts | 48 +- .../src/wire/application_metadata_message.ts | 48 +- .../status-core/src/wire/chat_identity.ts | 26 +- .../status-core/src/wire/chat_message.spec.ts | 78 +- packages/status-core/src/wire/chat_message.ts | 112 +- .../status-core/src/wire/community_chat.ts | 30 +- .../src/wire/community_description.ts | 76 +- .../src/wire/membership_update_message.ts | 150 +- .../status-core/src/wire/status_update.ts | 22 +- packages/status-react/package.json | 3 - .../ActivityCenter/ActivityButton.tsx | 48 +- .../ActivityCenter/ActivityCenter.tsx | 76 +- .../ActivityCenter/ActivityMessage.tsx | 212 +- .../src/components/Buttons/BackButton.tsx | 14 +- .../src/components/Buttons/DownloadButton.tsx | 64 +- .../src/components/Buttons/buttonStyle.ts | 14 +- .../src/components/Channels/Channel.tsx | 106 +- .../src/components/Channels/ChannelIcon.tsx | 20 +- .../src/components/Channels/Channels.tsx | 76 +- .../src/components/Channels/EmptyChannel.tsx | 74 +- .../src/components/Chat/ChatBody.tsx | 86 +- .../src/components/Chat/ChatCreation.tsx | 155 +- .../src/components/Chat/ChatInput.tsx | 336 +- .../components/Chat/ChatMessageContent.tsx | 146 +- .../src/components/Chat/ChatTopbar.tsx | 90 +- .../src/components/Chat/EmojiPicker.tsx | 38 +- .../status-react/src/components/Community.tsx | 26 +- .../src/components/CommunityChat.tsx | 48 +- .../src/components/CommunityChatRoom.tsx | 70 +- .../src/components/CommunityIdentity.tsx | 36 +- .../src/components/Form/ChannelMenu.tsx | 138 +- .../src/components/Form/ContactMenu.tsx | 92 +- .../src/components/Form/CopyInput.tsx | 14 +- .../src/components/Form/DropdownMenu.tsx | 30 +- .../src/components/Form/ImageMenu.tsx | 32 +- .../src/components/Form/LoginInstructions.tsx | 50 +- .../src/components/Form/MessageMenu.tsx | 80 +- .../src/components/Form/MuteMenu.tsx | 26 +- .../src/components/Form/NameError.tsx | 24 +- .../src/components/Form/PasteInput.tsx | 16 +- .../src/components/Form/TokenRequirement.tsx | 46 +- .../src/components/Form/Tooltip.tsx | 22 +- .../src/components/Form/inputStyles.ts | 24 +- .../src/components/Icons/ActivityIcon.tsx | 10 +- .../src/components/Icons/AddContactIcon.tsx | 16 +- .../src/components/Icons/AddIcon.tsx | 10 +- .../src/components/Icons/AddMemberIcon.tsx | 16 +- .../src/components/Icons/BlockIcon.tsx | 20 +- .../src/components/Icons/ChainIcon.tsx | 12 +- .../src/components/Icons/ChatIcon.tsx | 18 +- .../src/components/Icons/CheckIcon.tsx | 16 +- .../src/components/Icons/ClearIcon.tsx | 24 +- .../src/components/Icons/ClearIconFull.tsx | 16 +- .../src/components/Icons/CoinbaseLogo.tsx | 6 +- .../src/components/Icons/ColorChatIcon.tsx | 18 +- .../src/components/Icons/CommunityIcon.tsx | 18 +- .../src/components/Icons/CopyIcon.tsx | 16 +- .../src/components/Icons/CreateIcon.tsx | 10 +- .../src/components/Icons/CrossIcon.tsx | 12 +- .../src/components/Icons/DeleteIcon.tsx | 18 +- .../src/components/Icons/DownloadIcon.tsx | 16 +- .../src/components/Icons/EditIcon.tsx | 16 +- .../src/components/Icons/EmojiIcon.tsx | 20 +- .../src/components/Icons/EthereumLogo.tsx | 4 +- .../src/components/Icons/GifIcon.tsx | 20 +- .../src/components/Icons/GroupIcon.tsx | 14 +- .../src/components/Icons/HideIcon.tsx | 8 +- .../src/components/Icons/LeftIcon.tsx | 16 +- .../src/components/Icons/LoadingIcon.tsx | 12 +- .../src/components/Icons/LogoutIcon.tsx | 10 +- .../src/components/Icons/MarkerdaoLogo.tsx | 4 +- .../src/components/Icons/MembersIcon.tsx | 10 +- .../src/components/Icons/MembersSmallIcon.tsx | 16 +- .../src/components/Icons/MetamaskLogo.tsx | 6 +- .../src/components/Icons/MobileIcon.tsx | 10 +- .../src/components/Icons/MoreIcon.tsx | 10 +- .../src/components/Icons/MuteIcon.tsx | 16 +- .../src/components/Icons/MutedIcon.tsx | 10 +- .../src/components/Icons/NextIcon.tsx | 10 +- .../src/components/Icons/PictureIcon.tsx | 10 +- .../src/components/Icons/PinIcon.tsx | 16 +- .../src/components/Icons/ProfileIcon.tsx | 16 +- .../src/components/Icons/QuoteIcon.tsx | 14 +- .../src/components/Icons/ReactionIcon.tsx | 12 +- .../src/components/Icons/ReadIcon.tsx | 14 +- .../src/components/Icons/ReadMessageIcon.tsx | 14 +- .../components/Icons/ReplyActivityIcon.tsx | 8 +- .../src/components/Icons/ReplyIcon.tsx | 16 +- .../src/components/Icons/ScanIcon.tsx | 10 +- .../src/components/Icons/ShowIcon.tsx | 8 +- .../src/components/Icons/StatusIcon.tsx | 4 +- .../src/components/Icons/StatusLogo.tsx | 8 +- .../src/components/Icons/StickerIcon.tsx | 16 +- .../src/components/Icons/TipIcon.tsx | 14 +- .../src/components/Icons/UntrustworthIcon.tsx | 10 +- .../src/components/Icons/UserIcon.tsx | 18 +- .../components/Icons/WalletConnectLogo.tsx | 6 +- .../src/components/Icons/WarningIcon.tsx | 20 +- .../src/components/Members/Member.tsx | 60 +- .../src/components/Members/Members.tsx | 24 +- .../src/components/Members/MembersList.tsx | 71 +- .../src/components/Members/UserLogo.tsx | 56 +- .../src/components/Messages/MessageQuote.tsx | 46 +- .../components/Messages/MessageReactions.tsx | 34 +- .../src/components/Messages/MessagesList.tsx | 70 +- .../src/components/Messages/Styles.tsx | 32 +- .../src/components/Messages/UiMessage.tsx | 90 +- .../src/components/Modals/AgreementModal.tsx | 60 +- .../src/components/Modals/CoinbaseModal.tsx | 10 +- .../src/components/Modals/CommunityModal.tsx | 45 +- .../src/components/Modals/ConnectModal.tsx | 20 +- .../src/components/Modals/EditModal.tsx | 80 +- .../src/components/Modals/LeavingModal.tsx | 40 +- .../src/components/Modals/LinkModal.tsx | 30 +- .../src/components/Modals/LogoutModal.tsx | 60 +- .../src/components/Modals/Modal.tsx | 50 +- .../src/components/Modals/ModalStyle.tsx | 26 +- .../src/components/Modals/PictureModal.tsx | 18 +- .../components/Modals/ProfileFoundModal.tsx | 80 +- .../src/components/Modals/ProfileModal.tsx | 178 +- .../src/components/Modals/SizeLimitModal.tsx | 14 +- .../src/components/Modals/StatusModal.tsx | 42 +- .../components/Modals/UserCreationModal.tsx | 110 +- .../Modals/UserCreationStartModal.tsx | 18 +- .../components/Modals/WalletConnectModal.tsx | 10 +- .../src/components/Modals/WalletModal.tsx | 114 +- .../components/NarrowMode/NarrowChannels.tsx | 10 +- .../components/NarrowMode/NarrowMembers.tsx | 22 +- .../components/NarrowMode/NarrowTopbar.tsx | 28 +- .../components/Reactions/ReactionButton.tsx | 32 +- .../components/Reactions/ReactionPicker.tsx | 58 +- .../src/components/Reactions/Reactions.tsx | 46 +- .../src/components/SearchBlock.tsx | 40 +- .../components/Skeleton/CommunitySkeleton.tsx | 16 +- .../src/components/Skeleton/Loading.tsx | 16 +- .../components/Skeleton/LoadingSkeleton.tsx | 14 +- .../components/Skeleton/MessageSkeleton.tsx | 26 +- .../src/components/Skeleton/Skeleton.tsx | 20 +- packages/status-react/src/components/Text.tsx | 6 +- .../components/ToastMessages/ToastMessage.tsx | 56 +- .../ToastMessages/ToastMessageList.tsx | 16 +- .../components/UserCreation/UserCreation.tsx | 22 +- .../UserCreation/UserCreationButtons.tsx | 64 +- .../src/contexts/chatStateProvider.tsx | 12 +- .../src/contexts/configProvider.tsx | 24 +- .../src/contexts/fetchMetadataProvider.tsx | 12 +- .../src/contexts/identityProvider.tsx | 46 +- .../src/contexts/messengerProvider.tsx | 22 +- .../src/contexts/modalProvider.tsx | 40 +- .../src/contexts/narrowProvider.tsx | 24 +- .../src/contexts/scrollProvider.tsx | 62 +- .../src/contexts/toastProvider.tsx | 18 +- .../src/groupChatComponents/GroupChat.tsx | 44 +- .../GroupChat/GroupChatBody.tsx | 89 +- .../src/groupChatComponents/GroupChatRoom.tsx | 58 +- .../GroupMembers/GroupMembers.tsx | 28 +- .../src/hooks/messenger/useChannelsReducer.ts | 70 +- .../src/hooks/messenger/useContacts.ts | 116 +- .../src/hooks/messenger/useGroupChats.ts | 70 +- .../src/hooks/messenger/useLoadPrevDay.ts | 54 +- .../src/hooks/messenger/useMessages.ts | 48 +- .../src/hooks/messenger/useMessenger.ts | 228 +- .../src/hooks/messenger/useNotifications.ts | 24 +- .../status-react/src/hooks/useActivities.ts | 114 +- .../src/hooks/useChatScrollHandle.ts | 38 +- .../status-react/src/hooks/useClickOutside.ts | 16 +- .../src/hooks/useClickPosition.ts | 32 +- .../status-react/src/hooks/useContextMenu.ts | 32 +- .../status-react/src/hooks/useNameError.tsx | 32 +- .../status-react/src/hooks/useRefBreak.ts | 22 +- packages/status-react/src/hooks/useReply.ts | 10 +- packages/status-react/src/index.ts | 10 +- packages/status-react/src/models/Activity.ts | 74 +- .../status-react/src/models/ChannelData.ts | 22 +- .../status-react/src/models/ChatMessage.ts | 44 +- .../status-react/src/models/CommunityData.ts | 14 +- packages/status-react/src/models/Contact.ts | 20 +- packages/status-react/src/models/Metadata.ts | 6 +- packages/status-react/src/models/Toast.ts | 10 +- .../status-react/src/styles/GlobalStyle.tsx | 4 +- packages/status-react/src/styles/themes.ts | 194 +- .../status-react/src/utils/binarySetInsert.ts | 14 +- packages/status-react/src/utils/copy.ts | 8 +- packages/status-react/src/utils/copyImg.ts | 14 +- .../status-react/src/utils/createCommunity.ts | 16 +- .../status-react/src/utils/createMessenger.ts | 28 +- .../status-react/src/utils/downloadImg.ts | 12 +- packages/status-react/src/utils/equalDate.ts | 2 +- .../status-react/src/utils/identityStorage.ts | 56 +- packages/status-react/src/utils/index.ts | 16 +- packages/status-react/src/utils/paste.ts | 6 +- .../status-react/src/utils/reduceString.ts | 4 +- .../status-react/src/utils/uintToImgUrl.ts | 4 +- yarn.lock | 3432 +---------------- 222 files changed, 6443 insertions(+), 9709 deletions(-) create mode 100644 .prettierignore create mode 100644 .prettierrc diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..77a98f44 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,5 @@ +**/dist +**/node_modules +.parcel-cache +.github +.vscode diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..759232e7 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "semi": false, + "singleQuote": true, + "arrowParens": "avoid" +} diff --git a/README.md b/README.md index 611f6def..78748e10 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# Status Communities for the Web \ No newline at end of file +# Status Communities for the Web diff --git a/examples/channel/index.tsx b/examples/channel/index.tsx index 0c095df8..6c608eb6 100644 --- a/examples/channel/index.tsx +++ b/examples/channel/index.tsx @@ -1,6 +1,6 @@ -import React, { render } from 'react-dom'; -import { GroupChat, lightTheme } from '@status-im/react'; -import { StrictMode } from 'react'; +import React, { render } from 'react-dom' +import { GroupChat, lightTheme } from '@status-im/react' +import { StrictMode } from 'react' const App = () => { return ( @@ -14,12 +14,12 @@ const App = () => { }} /> - ); -}; + ) +} render( , document.getElementById('root') -); +) diff --git a/examples/community/index.tsx b/examples/community/index.tsx index 0813edd0..e85ee272 100644 --- a/examples/community/index.tsx +++ b/examples/community/index.tsx @@ -1,6 +1,6 @@ -import React, { render } from 'react-dom'; -import { CommunityChat, lightTheme } from '@status-im/react'; -import { StrictMode } from 'react'; +import React, { render } from 'react-dom' +import { CommunityChat, lightTheme } from '@status-im/react' +import { StrictMode } from 'react' const App = () => { return ( @@ -14,12 +14,12 @@ const App = () => { }} /> - ); -}; + ) +} render( , document.getElementById('root') -); +) diff --git a/package.json b/package.json index 0a39df84..eec5caa4 100644 --- a/package.json +++ b/package.json @@ -7,13 +7,13 @@ "keywords": [], "scripts": { "fix": "run-s 'fix:*' && wsrun -e -c -s fix", - "fix:prettier": "prettier \"./*.json\" --write", "build": "wsrun -e -c -s build", + "format": "prettier --write .", "test": "wsrun -e -c -s test" }, "devDependencies": { "npm-run-all": "^4.1.5", - "prettier": "^2.3.2", + "prettier": "^2.5.1", "wsrun": "^5.2.4" }, "packageManager": "yarn@1.22.17" diff --git a/packages/status-core/package.json b/packages/status-core/package.json index dd1cba56..f31e4939 100644 --- a/packages/status-core/package.json +++ b/packages/status-core/package.json @@ -18,11 +18,9 @@ "build:esm": "tsc --module es2020 --target es2017 --outDir dist/esm", "build:cjs": "tsc --outDir dist/cjs", "fix": "run-s 'fix:*'", - "fix:prettier": "prettier \"src/**/*.ts\" \"./*.json\" --write", "fix:lint": "eslint src --ext .ts --fix", "test": "run-s 'test:*'", "test:lint": "eslint src --ext .ts", - "test:prettier": "prettier \"src/**/*.ts\" \"./*.json\" --list-different", "test:unit": "mocha", "proto": "run-s 'proto:*'", "proto:lint": "buf lint", @@ -47,7 +45,6 @@ "eslint-plugin-import": "^2.24.2", "mocha": "^9.1.1", "npm-run-all": "^4.1.5", - "prettier": "^2.4.0", "ts-node": "^10.2.1", "ts-proto": "^1.83.0", "typescript": "^4.4.3" diff --git a/packages/status-core/src/chat.ts b/packages/status-core/src/chat.ts index 6392f425..586b606b 100644 --- a/packages/status-core/src/chat.ts +++ b/packages/status-core/src/chat.ts @@ -1,14 +1,14 @@ -import { idToContentTopic } from "./contentTopic"; -import { createSymKeyFromPassword } from "./encryption"; -import { ChatMessage, Content } from "./wire/chat_message"; -import { CommunityChat } from "./wire/community_chat"; +import { idToContentTopic } from './contentTopic' +import { createSymKeyFromPassword } from './encryption' +import { ChatMessage, Content } from './wire/chat_message' +import { CommunityChat } from './wire/community_chat' /** * Represent a chat room. Only public chats are currently supported. */ export class Chat { - private lastClockValue?: number; - private lastMessage?: ChatMessage; + private lastClockValue?: number + private lastMessage?: ChatMessage private constructor( public id: string, @@ -24,17 +24,17 @@ export class Chat { id: string, communityChat?: CommunityChat ): Promise { - const symKey = await createSymKeyFromPassword(id); + const symKey = await createSymKeyFromPassword(id) - return new Chat(id, symKey, communityChat); + return new Chat(id, symKey, communityChat) } public get contentTopic(): string { - return idToContentTopic(this.id); + return idToContentTopic(this.id) } public createMessage(content: Content, responseTo?: string): ChatMessage { - const { timestamp, clock } = this._nextClockAndTimestamp(); + const { timestamp, clock } = this._nextClockAndTimestamp() const message = ChatMessage.createMessage( clock, @@ -42,28 +42,28 @@ export class Chat { this.id, content, responseTo - ); + ) - this._updateClockFromMessage(message); + this._updateClockFromMessage(message) - return message; + return message } public handleNewMessage(message: ChatMessage): void { - this._updateClockFromMessage(message); + this._updateClockFromMessage(message) } private _nextClockAndTimestamp(): { clock: number; timestamp: number } { - let clock = this.lastClockValue; - const timestamp = Date.now(); + let clock = this.lastClockValue + const timestamp = Date.now() if (!clock || clock < timestamp) { - clock = timestamp; + clock = timestamp } else { - clock += 1; + clock += 1 } - return { clock, timestamp }; + return { clock, timestamp } } private _updateClockFromMessage(message: ChatMessage): void { @@ -72,14 +72,14 @@ export class Chat { !this.lastMessage.clock || (message.clock && this.lastMessage.clock <= message.clock) ) { - this.lastMessage = message; + this.lastMessage = message } if ( !this.lastClockValue || (message.clock && this.lastClockValue < message.clock) ) { - this.lastClockValue = message.clock; + this.lastClockValue = message.clock } } } diff --git a/packages/status-core/src/community.spec.ts b/packages/status-core/src/community.spec.ts index d25285ea..79b02896 100644 --- a/packages/status-core/src/community.spec.ts +++ b/packages/status-core/src/community.spec.ts @@ -1,42 +1,42 @@ -import { expect } from "chai"; -import { Waku } from "js-waku"; +import { expect } from 'chai' +import { Waku } from 'js-waku' -import { Community } from "./community"; -import { CommunityDescription } from "./wire/community_description"; +import { Community } from './community' +import { CommunityDescription } from './wire/community_description' -describe("Community [live data]", () => { +describe('Community [live data]', () => { before(function () { if (process.env.CI) { // Skip live data test in CI - this.skip(); + this.skip() } - }); + }) - it("Retrieves community description For DappConnect Test from Waku prod fleet", async function () { - this.timeout(20000); - const waku = await Waku.create({ bootstrap: { default: true } }); + it('Retrieves community description For DappConnect Test from Waku prod fleet', async function () { + this.timeout(20000) + const waku = await Waku.create({ bootstrap: { default: true } }) - await waku.waitForRemotePeer(); + await waku.waitForRemotePeer() const community = await Community.instantiateCommunity( - "0x02cf13719c8b836bebd4e430c497ee38e798a43e4d8c4760c34bbd9bf4f2434d26", + '0x02cf13719c8b836bebd4e430c497ee38e798a43e4d8c4760c34bbd9bf4f2434d26', waku - ); - const desc = community.description as CommunityDescription; - expect(desc).to.not.be.undefined; + ) + const desc = community.description as CommunityDescription + expect(desc).to.not.be.undefined - expect(desc.identity?.displayName).to.eq("Test Community"); + expect(desc.identity?.displayName).to.eq('Test Community') const descChats = Array.from(desc.chats.values()).map( - (chat) => chat?.identity?.displayName - ); - expect(descChats).to.include("Test Chat"); - expect(descChats).to.include("Additional Chat"); + chat => chat?.identity?.displayName + ) + expect(descChats).to.include('Test Chat') + expect(descChats).to.include('Additional Chat') const chats = Array.from(community.chats.values()).map( - (chat) => chat?.communityChat?.identity?.displayName - ); - expect(chats).to.include("Test Chat"); - expect(chats).to.include("Additional Chat"); - }); -}); + chat => chat?.communityChat?.identity?.displayName + ) + expect(chats).to.include('Test Chat') + expect(chats).to.include('Additional Chat') + }) +}) diff --git a/packages/status-core/src/community.ts b/packages/status-core/src/community.ts index 424bd8ac..3a110051 100644 --- a/packages/status-core/src/community.ts +++ b/packages/status-core/src/community.ts @@ -1,23 +1,23 @@ -import debug from "debug"; -import { Waku } from "js-waku"; +import debug from 'debug' +import { Waku } from 'js-waku' -import { Chat } from "./chat"; -import { bufToHex, hexToBuf } from "./utils"; -import { CommunityChat } from "./wire/community_chat"; -import { CommunityDescription } from "./wire/community_description"; +import { Chat } from './chat' +import { bufToHex, hexToBuf } from './utils' +import { CommunityChat } from './wire/community_chat' +import { CommunityDescription } from './wire/community_description' -const dbg = debug("communities:community"); +const dbg = debug('communities:community') export class Community { - public publicKey: Uint8Array; - private waku: Waku; - public chats: Map; // Chat id, Chat - public description?: CommunityDescription; + public publicKey: Uint8Array + private waku: Waku + public chats: Map // Chat id, Chat + public description?: CommunityDescription constructor(publicKey: Uint8Array, waku: Waku) { - this.publicKey = publicKey; - this.waku = waku; - this.chats = new Map(); + this.publicKey = publicKey + this.waku = waku + this.chats = new Map() } /** @@ -34,15 +34,15 @@ export class Community { publicKey: string, waku: Waku ): Promise { - const community = new Community(hexToBuf(publicKey), waku); + const community = new Community(hexToBuf(publicKey), waku) - await community.refreshCommunityDescription(); + await community.refreshCommunityDescription() - return community; + return community } public get publicKeyStr(): string { - return bufToHex(this.publicKey); + return bufToHex(this.publicKey) } /** @@ -53,20 +53,20 @@ export class Community { const desc = await CommunityDescription.retrieve( this.publicKey, this.waku.store - ); + ) if (!desc) { - dbg(`Failed to retrieve Community Description for ${this.publicKeyStr}`); - return; + dbg(`Failed to retrieve Community Description for ${this.publicKeyStr}`) + return } - this.description = desc; + this.description = desc await Promise.all( Array.from(this.description.chats).map(([chatUuid, communityChat]) => { - return this.instantiateChat(chatUuid, communityChat); + return this.instantiateChat(chatUuid, communityChat) }) - ); + ) } /** @@ -80,13 +80,13 @@ export class Community { communityChat: CommunityChat ): Promise { if (!this.description) - throw "Failed to retrieve community description, cannot instantiate chat"; + throw 'Failed to retrieve community description, cannot instantiate chat' - const chatId = this.publicKeyStr + chatUuid; - if (this.chats.get(chatId)) return; + const chatId = this.publicKeyStr + chatUuid + if (this.chats.get(chatId)) return - const chat = await Chat.create(chatId, communityChat); + const chat = await Chat.create(chatId, communityChat) - this.chats.set(chatId, chat); + this.chats.set(chatId, chat) } } diff --git a/packages/status-core/src/contacts.ts b/packages/status-core/src/contacts.ts index ee67b930..73d0499b 100644 --- a/packages/status-core/src/contacts.ts +++ b/packages/status-core/src/contacts.ts @@ -1,22 +1,22 @@ -import { PageDirection, Waku, WakuMessage } from "js-waku"; +import { PageDirection, Waku, WakuMessage } from 'js-waku' -import { idToContactCodeTopic } from "./contentTopic"; -import { Identity } from "./identity"; -import { StatusUpdate_StatusType } from "./proto/communities/v1/status_update"; -import { bufToHex, getLatestUserNickname } from "./utils"; -import { ChatIdentity } from "./wire/chat_identity"; -import { StatusUpdate } from "./wire/status_update"; +import { idToContactCodeTopic } from './contentTopic' +import { Identity } from './identity' +import { StatusUpdate_StatusType } from './proto/communities/v1/status_update' +import { bufToHex, getLatestUserNickname } from './utils' +import { ChatIdentity } from './wire/chat_identity' +import { StatusUpdate } from './wire/status_update' -const STATUS_BROADCAST_INTERVAL = 30000; -const NICKNAME_BROADCAST_INTERVAL = 300000; +const STATUS_BROADCAST_INTERVAL = 30000 +const NICKNAME_BROADCAST_INTERVAL = 300000 export class Contacts { - waku: Waku; - identity: Identity | undefined; - nickname?: string; - private callback: (publicKey: string, clock: number) => void; - private callbackNickname: (publicKey: string, nickname: string) => void; - private contacts: string[] = []; + waku: Waku + identity: Identity | undefined + nickname?: string + private callback: (publicKey: string, clock: number) => void + private callbackNickname: (publicKey: string, nickname: string) => void + private contacts: string[] = [] /** * Contacts holds a list of user contacts and listens to their status broadcast @@ -38,14 +38,14 @@ export class Contacts { callbackNickname: (publicKey: string, nickname: string) => void, nickname?: string ) { - this.waku = waku; - this.identity = identity; - this.nickname = nickname; - this.callback = callback; - this.callbackNickname = callbackNickname; - this.startBroadcast(); + this.waku = waku + this.identity = identity + this.nickname = nickname + this.callback = callback + this.callbackNickname = callbackNickname + this.startBroadcast() if (identity) { - this.addContact(bufToHex(identity.publicKey)); + this.addContact(bufToHex(identity.publicKey)) } } @@ -57,44 +57,44 @@ export class Contacts { * @param publicKey public key of user */ public addContact(publicKey: string): void { - if (!this.contacts.find((e) => publicKey === e)) { - const now = new Date(); + if (!this.contacts.find(e => publicKey === e)) { + const now = new Date() const callback = (wakuMessage: WakuMessage): void => { if (wakuMessage.payload) { - const msg = StatusUpdate.decode(wakuMessage.payload); - this.callback(publicKey, msg.clock ?? 0); + const msg = StatusUpdate.decode(wakuMessage.payload) + this.callback(publicKey, msg.clock ?? 0) } - }; - this.contacts.push(publicKey); - this.callback(publicKey, 0); + } + this.contacts.push(publicKey) + this.callback(publicKey, 0) this.waku.store.queryHistory([idToContactCodeTopic(publicKey)], { - callback: (msgs) => msgs.forEach((e) => callback(e)), + callback: msgs => msgs.forEach(e => callback(e)), timeFilter: { startTime: new Date(now.getTime() - STATUS_BROADCAST_INTERVAL * 2), endTime: now, }, - }); + }) this.waku.store.queryHistory([idToContactCodeTopic(publicKey)], { - callback: (msgs) => - msgs.some((e) => { + callback: msgs => + msgs.some(e => { try { if (e.payload) { - const chatIdentity = ChatIdentity.decode(e?.payload); + const chatIdentity = ChatIdentity.decode(e?.payload) if (chatIdentity) { this.callbackNickname( publicKey, - chatIdentity?.displayName ?? "" - ); + chatIdentity?.displayName ?? '' + ) } - return true; + return true } } catch { - return false; + return false } }), pageDirection: PageDirection.BACKWARD, - }); - this.waku.relay.addObserver(callback, [idToContactCodeTopic(publicKey)]); + }) + this.waku.relay.addObserver(callback, [idToContactCodeTopic(publicKey)]) } } @@ -103,67 +103,67 @@ export class Contacts { if (this.identity) { const statusUpdate = StatusUpdate.create( StatusUpdate_StatusType.AUTOMATIC, - "" - ); + '' + ) const msg = await WakuMessage.fromBytes( statusUpdate.encode(), idToContactCodeTopic(bufToHex(this.identity.publicKey)) - ); - this.waku.relay.send(msg); + ) + this.waku.relay.send(msg) } - }; + } const handleNickname = async (): Promise => { if (this.identity) { - const now = new Date().getTime(); + const now = new Date().getTime() const { clock, nickname: newNickname } = await getLatestUserNickname( this.identity.publicKey, this.waku - ); + ) if (this.nickname) { if (this.nickname !== newNickname) { - await sendNickname(); + await sendNickname() } else { if (clock < now - NICKNAME_BROADCAST_INTERVAL) { - await sendNickname(); + await sendNickname() } } } else { - this.nickname = newNickname; - this.callbackNickname(bufToHex(this.identity.publicKey), newNickname); + this.nickname = newNickname + this.callbackNickname(bufToHex(this.identity.publicKey), newNickname) if (clock < now - NICKNAME_BROADCAST_INTERVAL) { - await sendNickname(); + await sendNickname() } } } - setInterval(send, NICKNAME_BROADCAST_INTERVAL); - }; + setInterval(send, NICKNAME_BROADCAST_INTERVAL) + } const sendNickname = async (): Promise => { if (this.identity) { - const publicKey = bufToHex(this.identity.publicKey); + const publicKey = bufToHex(this.identity.publicKey) if (this.nickname) { const chatIdentity = new ChatIdentity({ clock: new Date().getTime(), - color: "", - description: "", - emoji: "", + color: '', + description: '', + emoji: '', images: {}, - ensName: "", - displayName: this?.nickname ?? "", - }); + ensName: '', + displayName: this?.nickname ?? '', + }) const msg = await WakuMessage.fromBytes( chatIdentity.encode(), idToContactCodeTopic(publicKey), { sigPrivKey: this.identity.privateKey } - ); - await this.waku.relay.send(msg); + ) + await this.waku.relay.send(msg) } } - }; - handleNickname(); - send(); - setInterval(send, STATUS_BROADCAST_INTERVAL); + } + handleNickname() + send() + setInterval(send, STATUS_BROADCAST_INTERVAL) } } diff --git a/packages/status-core/src/contentTopic.ts b/packages/status-core/src/contentTopic.ts index 48c1dc22..a13259fe 100644 --- a/packages/status-core/src/contentTopic.ts +++ b/packages/status-core/src/contentTopic.ts @@ -1,8 +1,8 @@ -import { Buffer } from "buffer"; +import { Buffer } from 'buffer' -import { keccak256 } from "js-sha3"; +import { keccak256 } from 'js-sha3' -const TopicLength = 4; +const TopicLength = 4 /** * Get the content topic of for a given Chat or Community @@ -10,13 +10,13 @@ const TopicLength = 4; * @returns string The Waku v2 Content Topic. */ export function idToContentTopic(id: string): string { - const hash = keccak256.arrayBuffer(id); + const hash = keccak256.arrayBuffer(id) - const topic = Buffer.from(hash).slice(0, TopicLength); + const topic = Buffer.from(hash).slice(0, TopicLength) - return "/waku/1/" + "0x" + topic.toString("hex") + "/rfc26"; + return '/waku/1/' + '0x' + topic.toString('hex') + '/rfc26' } export function idToContactCodeTopic(id: string): string { - return idToContentTopic(id + "-contact-code"); + return idToContentTopic(id + '-contact-code') } diff --git a/packages/status-core/src/encryption.spec.ts b/packages/status-core/src/encryption.spec.ts index c4b51897..4f466d4b 100644 --- a/packages/status-core/src/encryption.spec.ts +++ b/packages/status-core/src/encryption.spec.ts @@ -1,24 +1,24 @@ -import { expect } from "chai"; +import { expect } from 'chai' -import { createSymKeyFromPassword } from "./encryption"; +import { createSymKeyFromPassword } from './encryption' -describe("Encryption", () => { - it("Generate symmetric key from password", async function () { - const str = "arbitrary data here"; - const symKey = await createSymKeyFromPassword(str); +describe('Encryption', () => { + it('Generate symmetric key from password', async function () { + const str = 'arbitrary data here' + const symKey = await createSymKeyFromPassword(str) - expect(Buffer.from(symKey).toString("hex")).to.eq( - "c49ad65ebf2a7b7253bf400e3d27719362a91b2c9b9f54d50a69117021666c33" - ); - }); + expect(Buffer.from(symKey).toString('hex')).to.eq( + 'c49ad65ebf2a7b7253bf400e3d27719362a91b2c9b9f54d50a69117021666c33' + ) + }) - it("Generate symmetric key from password for chat", async function () { + it('Generate symmetric key from password for chat', async function () { const str = - "0x02dcec6041fb999d65f1d33363e08c93d3c1f6f0fbbb26add383e2cf46c2b921f41dc14fd8-9a8b-4df5-a358-2c3067be5439"; - const symKey = await createSymKeyFromPassword(str); + '0x02dcec6041fb999d65f1d33363e08c93d3c1f6f0fbbb26add383e2cf46c2b921f41dc14fd8-9a8b-4df5-a358-2c3067be5439' + const symKey = await createSymKeyFromPassword(str) - expect(Buffer.from(symKey).toString("hex")).to.eq( - "76ff5bf0a74a8e724367c7fc003f066d477641f468768a8da2817addf5c2ce76" - ); - }); -}); + expect(Buffer.from(symKey).toString('hex')).to.eq( + '76ff5bf0a74a8e724367c7fc003f066d477641f468768a8da2817addf5c2ce76' + ) + }) +}) diff --git a/packages/status-core/src/encryption.ts b/packages/status-core/src/encryption.ts index e27d06af..d6e5f197 100644 --- a/packages/status-core/src/encryption.ts +++ b/packages/status-core/src/encryption.ts @@ -1,15 +1,15 @@ -import pbkdf2 from "pbkdf2"; +import pbkdf2 from 'pbkdf2' -const AESKeyLength = 32; // bytes +const AESKeyLength = 32 // bytes export async function createSymKeyFromPassword( password: string ): Promise { return pbkdf2.pbkdf2Sync( - Buffer.from(password, "utf-8"), - "", + Buffer.from(password, 'utf-8'), + '', 65356, AESKeyLength, - "sha256" - ); + 'sha256' + ) } diff --git a/packages/status-core/src/groupChats.ts b/packages/status-core/src/groupChats.ts index ce85c818..93cf0eeb 100644 --- a/packages/status-core/src/groupChats.ts +++ b/packages/status-core/src/groupChats.ts @@ -1,68 +1,68 @@ -import { Waku, WakuMessage } from "js-waku"; -import { DecryptionMethod } from "js-waku/build/main/lib/waku_message"; +import { Waku, WakuMessage } from 'js-waku' +import { DecryptionMethod } from 'js-waku/build/main/lib/waku_message' -import { createSymKeyFromPassword } from "./encryption"; -import { Identity } from "./identity"; -import { MembershipUpdateEvent_EventType } from "./proto/communities/v1/membership_update_message"; -import { getNegotiatedTopic, getPartitionedTopic } from "./topics"; -import { bufToHex, compressPublicKey } from "./utils"; +import { createSymKeyFromPassword } from './encryption' +import { Identity } from './identity' +import { MembershipUpdateEvent_EventType } from './proto/communities/v1/membership_update_message' +import { getNegotiatedTopic, getPartitionedTopic } from './topics' +import { bufToHex, compressPublicKey } from './utils' import { MembershipSignedEvent, MembershipUpdateMessage, -} from "./wire/membership_update_message"; +} from './wire/membership_update_message' -import { ChatMessage, Content } from "."; +import { ChatMessage, Content } from '.' type GroupMember = { - id: string; - topic: string; - symKey: Uint8Array; - partitionedTopic: string; -}; + id: string + topic: string + symKey: Uint8Array + partitionedTopic: string +} export type GroupChat = { - chatId: string; - members: GroupMember[]; - admins?: string[]; - name?: string; - removed: boolean; -}; + chatId: string + members: GroupMember[] + admins?: string[] + name?: string + removed: boolean +} export type GroupChatsType = { - [id: string]: GroupChat; -}; + [id: string]: GroupChat +} /* TODO: add chat messages encryption */ class GroupChatUsers { - private users: { [id: string]: GroupMember } = {}; - private identity: Identity; + private users: { [id: string]: GroupMember } = {} + private identity: Identity public constructor(_identity: Identity) { - this.identity = _identity; + this.identity = _identity } public async getUser(id: string): Promise { if (this.users[id]) { - return this.users[id]; + return this.users[id] } - const topic = await getNegotiatedTopic(this.identity, id); - const symKey = await createSymKeyFromPassword(topic); - const partitionedTopic = getPartitionedTopic(id); - const groupUser: GroupMember = { topic, symKey, id, partitionedTopic }; - this.users[id] = groupUser; - return groupUser; + const topic = await getNegotiatedTopic(this.identity, id) + const symKey = await createSymKeyFromPassword(topic) + const partitionedTopic = getPartitionedTopic(id) + const groupUser: GroupMember = { topic, symKey, id, partitionedTopic } + this.users[id] = groupUser + return groupUser } } export class GroupChats { - waku: Waku; - identity: Identity; - private callback: (chats: GroupChat) => void; - private removeCallback: (chats: GroupChat) => void; - private addMessage: (message: ChatMessage, sender: string) => void; - private groupChatUsers; + waku: Waku + identity: Identity + private callback: (chats: GroupChat) => void + private removeCallback: (chats: GroupChat) => void + private addMessage: (message: ChatMessage, sender: string) => void + private groupChatUsers - public chats: GroupChatsType = {}; + public chats: GroupChatsType = {} /** * GroupChats holds a list of private chats and listens to their status broadcast * @@ -83,13 +83,13 @@ export class GroupChats { removeCallback: (chat: GroupChat) => void, addMessage: (message: ChatMessage, sender: string) => void ) { - this.waku = waku; - this.identity = identity; - this.groupChatUsers = new GroupChatUsers(identity); - this.callback = callback; - this.removeCallback = removeCallback; - this.addMessage = addMessage; - this.listen(); + this.waku = waku + this.identity = identity + this.groupChatUsers = new GroupChatUsers(identity) + this.callback = callback + this.removeCallback = removeCallback + this.addMessage = addMessage + this.listen() } /** @@ -104,26 +104,26 @@ export class GroupChats { content: Content, responseTo?: string ): Promise { - const now = Date.now(); - const chat = this.chats[chatId]; + const now = Date.now() + const chat = this.chats[chatId] if (chat) { await Promise.all( - chat.members.map(async (member) => { + chat.members.map(async member => { const chatMessage = ChatMessage.createMessage( now, now, chatId, content, responseTo - ); + ) const wakuMessage = await WakuMessage.fromBytes( chatMessage.encode(), member.topic, { sigPrivKey: this.identity.privateKey, symKey: member.symKey } - ); - this.waku.relay.send(wakuMessage); + ) + this.waku.relay.send(wakuMessage) }) - ); + ) } } @@ -132,18 +132,18 @@ export class GroupChats { event: MembershipSignedEvent, useCallback: boolean ): Promise { - const signer = event.signer ? bufToHex(event.signer) : ""; - const thisUser = bufToHex(this.identity.publicKey); - const chat: GroupChat | undefined = this.chats[chatId]; + const signer = event.signer ? bufToHex(event.signer) : '' + const thisUser = bufToHex(this.identity.publicKey) + const chat: GroupChat | undefined = this.chats[chatId] if (signer) { switch (event.event.type) { case MembershipUpdateEvent_EventType.CHAT_CREATED: { - const members: GroupMember[] = []; + const members: GroupMember[] = [] await Promise.all( - event.event.members.map(async (member) => { - members.push(await this.groupChatUsers.getUser(member)); + event.event.members.map(async member => { + members.push(await this.groupChatUsers.getUser(member)) }) - ); + ) await this.addChat( { chatId: chatId, @@ -152,14 +152,14 @@ export class GroupChats { removed: false, }, useCallback - ); - break; + ) + break } case MembershipUpdateEvent_EventType.MEMBER_REMOVED: { if (chat) { chat.members = chat.members.filter( - (member) => !event.event.members.includes(member.id) - ); + member => !event.event.members.includes(member.id) + ) if (event.event.members.includes(thisUser)) { await this.removeChat( { @@ -167,41 +167,39 @@ export class GroupChats { removed: true, }, useCallback - ); + ) } else { if (!chat.removed && useCallback) { - this.callback(this.chats[chatId]); + this.callback(this.chats[chatId]) } } } - break; + break } case MembershipUpdateEvent_EventType.MEMBERS_ADDED: { if (chat && chat.admins?.includes(signer)) { - const members: GroupMember[] = []; + const members: GroupMember[] = [] await Promise.all( - event.event.members.map(async (member) => { - members.push(await this.groupChatUsers.getUser(member)); + event.event.members.map(async member => { + members.push(await this.groupChatUsers.getUser(member)) }) - ); - chat.members.push(...members); - if ( - chat.members.findIndex((member) => member.id === thisUser) > -1 - ) { - chat.removed = false; - await this.addChat(chat, useCallback); + ) + chat.members.push(...members) + if (chat.members.findIndex(member => member.id === thisUser) > -1) { + chat.removed = false + await this.addChat(chat, useCallback) } } - break; + break } case MembershipUpdateEvent_EventType.NAME_CHANGED: { if (chat) { if (chat.admins?.includes(signer)) { - chat.name = event.event.name; - this.callback(chat); + chat.name = event.event.name + this.callback(chat) } } - break; + break } } } @@ -213,22 +211,20 @@ export class GroupChats { ): Promise { try { if (message?.payload) { - const membershipUpdate = MembershipUpdateMessage.decode( - message.payload - ); + const membershipUpdate = MembershipUpdateMessage.decode(message.payload) await Promise.all( membershipUpdate.events.map( - async (event) => + async event => await this.handleUpdateEvent( membershipUpdate.chatId, event, useCallback ) ) - ); + ) } } catch { - return; + return } } @@ -239,19 +235,19 @@ export class GroupChats { ): void { try { if (message.payload) { - const chatMessage = ChatMessage.decode(message.payload); + const chatMessage = ChatMessage.decode(message.payload) if (chatMessage) { if (chatMessage.chatId === chat.chatId) { - let sender = member; + let sender = member if (message.signaturePublicKey) { - sender = compressPublicKey(message.signaturePublicKey); + sender = compressPublicKey(message.signaturePublicKey) } - this.addMessage(chatMessage, sender); + this.addMessage(chatMessage, sender) } } } } catch { - return; + return } } @@ -259,34 +255,34 @@ export class GroupChats { chat: GroupChat, removeObserver?: boolean ): Promise { - const observerFunction = removeObserver ? "deleteObserver" : "addObserver"; + const observerFunction = removeObserver ? 'deleteObserver' : 'addObserver' await Promise.all( - chat.members.map(async (member) => { + chat.members.map(async member => { if (!removeObserver) { this.waku.relay.addDecryptionKey(member.symKey, { method: DecryptionMethod.Symmetric, contentTopics: [member.topic], - }); + }) } this.waku.relay[observerFunction]( - (message) => this.handleWakuChatMessage(message, chat, member.id), + message => this.handleWakuChatMessage(message, chat, member.id), [member.topic] - ); + ) }) - ); + ) } private async addChat(chat: GroupChat, useCallback: boolean): Promise { if (this.chats[chat.chatId]) { - this.chats[chat.chatId] = chat; + this.chats[chat.chatId] = chat if (useCallback) { - this.callback(chat); + this.callback(chat) } } else { - this.chats[chat.chatId] = chat; + this.chats[chat.chatId] = chat if (useCallback) { - await this.handleChatObserver(chat); - this.callback(chat); + await this.handleChatObserver(chat) + this.callback(chat) } } } @@ -295,34 +291,34 @@ export class GroupChats { chat: GroupChat, useCallback: boolean ): Promise { - this.chats[chat.chatId] = chat; + this.chats[chat.chatId] = chat if (useCallback) { - await this.handleChatObserver(chat, true); - this.removeCallback(chat); + await this.handleChatObserver(chat, true) + this.removeCallback(chat) } } private async listen(): Promise { - const topic = getPartitionedTopic(bufToHex(this.identity.publicKey)); - const messages = await this.waku.store.queryHistory([topic]); + const topic = getPartitionedTopic(bufToHex(this.identity.publicKey)) + const messages = await this.waku.store.queryHistory([topic]) messages.sort((a, b) => (a?.timestamp?.getTime() ?? 0) < (b?.timestamp?.getTime() ?? 0) ? -1 : 1 - ); + ) for (let i = 0; i < messages.length; i++) { - await this.decodeUpdateMessage(messages[i], false); + await this.decodeUpdateMessage(messages[i], false) } this.waku.relay.addObserver( - (message) => this.decodeUpdateMessage(message, true), + message => this.decodeUpdateMessage(message, true), [topic] - ); + ) await Promise.all( - Object.values(this.chats).map(async (chat) => { + Object.values(this.chats).map(async chat => { if (!chat?.removed) { - await this.handleChatObserver(chat); - this.callback(chat); + await this.handleChatObserver(chat) + this.callback(chat) } }) - ); + ) } private async sendUpdateMessage( @@ -331,11 +327,11 @@ export class GroupChats { ): Promise { const wakuMessages = await Promise.all( members.map( - async (member) => + async member => await WakuMessage.fromBytes(payload, member.partitionedTopic) ) - ); - wakuMessages.forEach((msg) => this.waku.relay.send(msg)); + ) + wakuMessages.forEach(msg => this.waku.relay.send(msg)) } /** @@ -346,11 +342,11 @@ export class GroupChats { * @param name a name which chat should be changed to */ public async changeChatName(chatId: string, name: string): Promise { - const payload = MembershipUpdateMessage.create(chatId, this.identity); - const chat = this.chats[chatId]; + const payload = MembershipUpdateMessage.create(chatId, this.identity) + const chat = this.chats[chatId] if (chat && payload) { - payload.addNameChangeEvent(name); - await this.sendUpdateMessage(payload.encode(), chat.members); + payload.addNameChangeEvent(name) + await this.sendUpdateMessage(payload.encode(), chat.members) } } @@ -362,27 +358,27 @@ export class GroupChats { * @param members a list of members to be added */ public async addMembers(chatId: string, members: string[]): Promise { - const payload = MembershipUpdateMessage.create(chatId, this.identity); - const chat = this.chats[chatId]; + const payload = MembershipUpdateMessage.create(chatId, this.identity) + const chat = this.chats[chatId] if (chat && payload) { - const newMembers: GroupMember[] = []; + const newMembers: GroupMember[] = [] await Promise.all( members .filter( - (member) => - !chat.members.map((chatMember) => chatMember.id).includes(member) + member => + !chat.members.map(chatMember => chatMember.id).includes(member) ) - .map(async (member) => { - newMembers.push(await this.groupChatUsers.getUser(member)); + .map(async member => { + newMembers.push(await this.groupChatUsers.getUser(member)) }) - ); + ) - payload.addMembersAddedEvent(newMembers.map((member) => member.id)); + payload.addMembersAddedEvent(newMembers.map(member => member.id)) await this.sendUpdateMessage(payload.encode(), [ ...chat.members, ...newMembers, - ]); + ]) } } @@ -395,17 +391,17 @@ export class GroupChats { const payload = MembershipUpdateMessage.createChat( this.identity, members - ).encode(); + ).encode() - const newMembers: GroupMember[] = []; + const newMembers: GroupMember[] = [] await Promise.all( - members.map(async (member) => { - newMembers.push(await this.groupChatUsers.getUser(member)); + members.map(async member => { + newMembers.push(await this.groupChatUsers.getUser(member)) }) - ); + ) - await this.sendUpdateMessage(payload, newMembers); + await this.sendUpdateMessage(payload, newMembers) } /** @@ -414,10 +410,10 @@ export class GroupChats { * @param chatId id of private group chat */ public async quitChat(chatId: string): Promise { - const payload = MembershipUpdateMessage.create(chatId, this.identity); - const chat = this.chats[chatId]; - payload.addMemberRemovedEvent(bufToHex(this.identity.publicKey)); - await this.sendUpdateMessage(payload.encode(), chat.members); + const payload = MembershipUpdateMessage.create(chatId, this.identity) + const chat = this.chats[chatId] + payload.addMemberRemovedEvent(bufToHex(this.identity.publicKey)) + await this.sendUpdateMessage(payload.encode(), chat.members) } /** @@ -429,31 +425,31 @@ export class GroupChats { startTime: Date, endTime: Date ): Promise { - const chat = this.chats[chatId]; + const chat = this.chats[chatId] if (!chat) - throw `Failed to retrieve messages, chat is not joined: ${chatId}`; + throw `Failed to retrieve messages, chat is not joined: ${chatId}` const _callback = (wakuMessages: WakuMessage[], member: string): void => { wakuMessages.forEach((wakuMessage: WakuMessage) => this.handleWakuChatMessage(wakuMessage, chat, member) - ); - }; + ) + } - const amountOfMessages: number[] = []; + const amountOfMessages: number[] = [] await Promise.all( - chat.members.map(async (member) => { + chat.members.map(async member => { const msgLength = ( await this.waku.store.queryHistory([member.topic], { timeFilter: { startTime, endTime }, - callback: (msg) => _callback(msg, member.id), + callback: msg => _callback(msg, member.id), decryptionKeys: [member.symKey], }) - ).length; - amountOfMessages.push(msgLength); + ).length + amountOfMessages.push(msgLength) }) - ); - return amountOfMessages.reduce((a, b) => a + b); + ) + return amountOfMessages.reduce((a, b) => a + b) } } diff --git a/packages/status-core/src/identity.ts b/packages/status-core/src/identity.ts index c8011024..6eebef76 100644 --- a/packages/status-core/src/identity.ts +++ b/packages/status-core/src/identity.ts @@ -1,39 +1,39 @@ -import { Buffer } from "buffer"; +import { Buffer } from 'buffer' -import { keccak256 } from "js-sha3"; -import { generatePrivateKey } from "js-waku"; -import * as secp256k1 from "secp256k1"; +import { keccak256 } from 'js-sha3' +import { generatePrivateKey } from 'js-waku' +import * as secp256k1 from 'secp256k1' -import { hexToBuf } from "./utils"; +import { hexToBuf } from './utils' export class Identity { - private pubKey: Uint8Array; + private pubKey: Uint8Array public constructor(public privateKey: Uint8Array) { - this.pubKey = secp256k1.publicKeyCreate(this.privateKey, true); + this.pubKey = secp256k1.publicKeyCreate(this.privateKey, true) } public static generate(): Identity { - const privateKey = generatePrivateKey(); - return new Identity(privateKey); + const privateKey = generatePrivateKey() + return new Identity(privateKey) } /** * Hashes the payload with SHA3-256 and signs the result using the internal private key. */ public sign(payload: Uint8Array): Uint8Array { - const hash = keccak256(payload); + const hash = keccak256(payload) const { signature, recid } = secp256k1.ecdsaSign( hexToBuf(hash), this.privateKey - ); + ) - return Buffer.concat([signature, Buffer.from([recid])]); + return Buffer.concat([signature, Buffer.from([recid])]) } /** * Returns the compressed public key. */ public get publicKey(): Uint8Array { - return this.pubKey; + return this.pubKey } } diff --git a/packages/status-core/src/index.ts b/packages/status-core/src/index.ts index 1ccede10..8fb7553e 100644 --- a/packages/status-core/src/index.ts +++ b/packages/status-core/src/index.ts @@ -1,11 +1,11 @@ -export { Identity } from "./identity"; -export { Messenger } from "./messenger"; -export { Community } from "./community"; -export { Contacts } from "./contacts"; -export { Chat } from "./chat"; -export * from "./groupChats"; -export * as utils from "./utils"; -export { ApplicationMetadataMessage } from "./wire/application_metadata_message"; +export { Identity } from './identity' +export { Messenger } from './messenger' +export { Community } from './community' +export { Contacts } from './contacts' +export { Chat } from './chat' +export * from './groupChats' +export * as utils from './utils' +export { ApplicationMetadataMessage } from './wire/application_metadata_message' export { ChatMessage, ContentType, @@ -14,5 +14,5 @@ export { ImageContent, AudioContent, TextContent, -} from "./wire/chat_message"; -export { getNodesFromHostedJson } from "js-waku"; +} from './wire/chat_message' +export { getNodesFromHostedJson } from 'js-waku' diff --git a/packages/status-core/src/messenger.spec.ts b/packages/status-core/src/messenger.spec.ts index 24e488e9..dd8b5864 100644 --- a/packages/status-core/src/messenger.spec.ts +++ b/packages/status-core/src/messenger.spec.ts @@ -1,178 +1,177 @@ -import { expect } from "chai"; -import debug from "debug"; -import { Protocols } from "js-waku/build/main/lib/waku"; +import { expect } from 'chai' +import debug from 'debug' +import { Protocols } from 'js-waku/build/main/lib/waku' -import { Community } from "./community"; -import { Identity } from "./identity"; -import { Messenger } from "./messenger"; -import { bufToHex } from "./utils"; -import { ApplicationMetadataMessage } from "./wire/application_metadata_message"; -import { ContentType } from "./wire/chat_message"; +import { Community } from './community' +import { Identity } from './identity' +import { Messenger } from './messenger' +import { bufToHex } from './utils' +import { ApplicationMetadataMessage } from './wire/application_metadata_message' +import { ContentType } from './wire/chat_message' -const testChatId = "test-chat-id"; +const testChatId = 'test-chat-id' -const dbg = debug("communities:test:messenger"); +const dbg = debug('communities:test:messenger') -describe("Messenger", () => { - let messengerAlice: Messenger; - let messengerBob: Messenger; - let identityAlice: Identity; - let identityBob: Identity; +describe('Messenger', () => { + let messengerAlice: Messenger + let messengerBob: Messenger + let identityAlice: Identity + let identityBob: Identity beforeEach(async function () { - this.timeout(20_000); + this.timeout(20_000) - dbg("Generate keys"); - identityAlice = Identity.generate(); - identityBob = Identity.generate(); + dbg('Generate keys') + identityAlice = Identity.generate() + identityBob = Identity.generate() - dbg("Create messengers"); - - [messengerAlice, messengerBob] = await Promise.all([ + dbg('Create messengers') + ;[messengerAlice, messengerBob] = await Promise.all([ Messenger.create(identityAlice, { bootstrap: {} }), Messenger.create(identityBob, { bootstrap: {}, - libp2p: { addresses: { listen: ["/ip4/0.0.0.0/tcp/0/ws"] } }, + libp2p: { addresses: { listen: ['/ip4/0.0.0.0/tcp/0/ws'] } }, }), - ]); + ]) - dbg("Connect messengers"); + dbg('Connect messengers') // Connect both messengers together for test purposes messengerAlice.waku.addPeerToAddressBook( messengerBob.waku.libp2p.peerId, messengerBob.waku.libp2p.multiaddrs - ); + ) - dbg("Wait for remote peer"); + dbg('Wait for remote peer') await Promise.all([ messengerAlice.waku.waitForRemotePeer([Protocols.Relay]), messengerBob.waku.waitForRemotePeer([Protocols.Relay]), - ]); - dbg("Messengers ready"); - }); + ]) + dbg('Messengers ready') + }) - it("Sends & Receive public chat messages", async function () { - this.timeout(10_000); + it('Sends & Receive public chat messages', async function () { + this.timeout(10_000) - await messengerAlice.joinChatById(testChatId); - await messengerBob.joinChatById(testChatId); + await messengerAlice.joinChatById(testChatId) + await messengerBob.joinChatById(testChatId) - const text = "This is a message."; + const text = 'This is a message.' const receivedMessagePromise: Promise = - new Promise((resolve) => { - messengerBob.addObserver((message) => { - resolve(message); - }, testChatId); - }); + new Promise(resolve => { + messengerBob.addObserver(message => { + resolve(message) + }, testChatId) + }) await messengerAlice.sendMessage(testChatId, { text, contentType: ContentType.Text, - }); + }) - const receivedMessage = await receivedMessagePromise; + const receivedMessage = await receivedMessagePromise - expect(receivedMessage.chatMessage?.text).to.eq(text); - }); + expect(receivedMessage.chatMessage?.text).to.eq(text) + }) - it("public chat messages have signers", async function () { - this.timeout(10_000); + it('public chat messages have signers', async function () { + this.timeout(10_000) - await messengerAlice.joinChatById(testChatId); - await messengerBob.joinChatById(testChatId); + await messengerAlice.joinChatById(testChatId) + await messengerBob.joinChatById(testChatId) - const text = "This is a message."; + const text = 'This is a message.' const receivedMessagePromise: Promise = - new Promise((resolve) => { - messengerBob.addObserver((message) => { - resolve(message); - }, testChatId); - }); + new Promise(resolve => { + messengerBob.addObserver(message => { + resolve(message) + }, testChatId) + }) await messengerAlice.sendMessage(testChatId, { text, contentType: ContentType.Text, - }); + }) - const receivedMessage = await receivedMessagePromise; + const receivedMessage = await receivedMessagePromise expect(bufToHex(receivedMessage.signer!)).to.eq( bufToHex(identityAlice.publicKey) - ); - }); + ) + }) afterEach(async function () { - this.timeout(5000); - await messengerAlice.stop(); - await messengerBob.stop(); - }); -}); + this.timeout(5000) + await messengerAlice.stop() + await messengerBob.stop() + }) +}) -describe("Messenger [live data]", () => { +describe('Messenger [live data]', () => { before(function () { if (process.env.CI) { // Skip live data test in CI - this.skip(); + this.skip() } - }); + }) - let messenger: Messenger; - let identity: Identity; + let messenger: Messenger + let identity: Identity beforeEach(async function () { - this.timeout(20_000); + this.timeout(20_000) - dbg("Generate keys"); - identity = Identity.generate(); + dbg('Generate keys') + identity = Identity.generate() - dbg("Create messengers"); + dbg('Create messengers') messenger = await Messenger.create(identity, { bootstrap: { default: true }, - }); + }) - dbg("Wait to be connected to a peer"); - await messenger.waku.waitForRemotePeer(); - dbg("Messengers ready"); - }); + dbg('Wait to be connected to a peer') + await messenger.waku.waitForRemotePeer() + dbg('Messengers ready') + }) - it("Receive public chat messages", async function () { - this.timeout(20_000); + it('Receive public chat messages', async function () { + this.timeout(20_000) const community = await Community.instantiateCommunity( - "0x02cf13719c8b836bebd4e430c497ee38e798a43e4d8c4760c34bbd9bf4f2434d26", + '0x02cf13719c8b836bebd4e430c497ee38e798a43e4d8c4760c34bbd9bf4f2434d26', messenger.waku - ); + ) - await messenger.joinChats(community.chats.values()); + await messenger.joinChats(community.chats.values()) - const startTime = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000); - const endTime = new Date(); + const startTime = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000) + const endTime = new Date() const chat = Array.from(community.chats.values()).find( - (chat) => chat.communityChat?.identity?.displayName === "Test Chat" - ); + chat => chat.communityChat?.identity?.displayName === 'Test Chat' + ) - if (!chat) throw "Could not find foobar chat"; + if (!chat) throw 'Could not find foobar chat' - console.log(chat); + console.log(chat) await messenger.retrievePreviousMessages( chat.id, startTime, endTime, - (metadata) => { - metadata.forEach((m) => { - console.log("Message", m.chatMessage?.text); - }); + metadata => { + metadata.forEach(m => { + console.log('Message', m.chatMessage?.text) + }) } - ); - }); + ) + }) afterEach(async function () { - this.timeout(5000); - await messenger.stop(); - }); -}); + this.timeout(5000) + await messenger.stop() + }) +}) diff --git a/packages/status-core/src/messenger.ts b/packages/status-core/src/messenger.ts index 2ebbd650..7a537b8e 100644 --- a/packages/status-core/src/messenger.ts +++ b/packages/status-core/src/messenger.ts @@ -1,20 +1,20 @@ -import debug from "debug"; -import { Waku, WakuMessage } from "js-waku"; -import { CreateOptions as WakuCreateOptions } from "js-waku/build/main/lib/waku"; -import { DecryptionMethod } from "js-waku/build/main/lib/waku_message"; +import debug from 'debug' +import { Waku, WakuMessage } from 'js-waku' +import { CreateOptions as WakuCreateOptions } from 'js-waku/build/main/lib/waku' +import { DecryptionMethod } from 'js-waku/build/main/lib/waku_message' -import { Chat } from "./chat"; -import { Identity } from "./identity"; -import { ApplicationMetadataMessage_Type } from "./proto/status/v1/application_metadata_message"; -import { getLatestUserNickname } from "./utils"; -import { ApplicationMetadataMessage } from "./wire/application_metadata_message"; -import { ChatMessage, Content } from "./wire/chat_message"; +import { Chat } from './chat' +import { Identity } from './identity' +import { ApplicationMetadataMessage_Type } from './proto/status/v1/application_metadata_message' +import { getLatestUserNickname } from './utils' +import { ApplicationMetadataMessage } from './wire/application_metadata_message' +import { ChatMessage, Content } from './wire/chat_message' -const dbg = debug("communities:messenger"); +const dbg = debug('communities:messenger') export class Messenger { - waku: Waku; - chatsById: Map; + waku: Waku + chatsById: Map observers: { [chatId: string]: Set< ( @@ -22,15 +22,15 @@ export class Messenger { timestamp: Date, chatId: string ) => void - >; - }; - identity: Identity | undefined; + > + } + identity: Identity | undefined private constructor(identity: Identity | undefined, waku: Waku) { - this.identity = identity; - this.waku = waku; - this.chatsById = new Map(); - this.observers = {}; + this.identity = identity + this.waku = waku + this.chatsById = new Map() + this.observers = {} } public static async create( @@ -40,9 +40,9 @@ export class Messenger { const _wakuOptions = Object.assign( { bootstrap: { default: true } }, wakuOptions - ); - const waku = await Waku.create(_wakuOptions); - return new Messenger(identity, waku); + ) + const waku = await Waku.create(_wakuOptions) + return new Messenger(identity, waku) } /** @@ -53,9 +53,9 @@ export class Messenger { * Use `addListener` to get messages received on this chat. */ public async joinChatById(chatId: string): Promise { - const chat = await Chat.create(chatId); + const chat = await Chat.create(chatId) - await this.joinChat(chat); + await this.joinChat(chat) } /** @@ -65,10 +65,10 @@ export class Messenger { */ public async joinChats(chats: Iterable): Promise { await Promise.all( - Array.from(chats).map((chat) => { - return this.joinChat(chat); + Array.from(chats).map(chat => { + return this.joinChat(chat) }) - ); + ) } /** @@ -78,31 +78,31 @@ export class Messenger { */ public async joinChat(chat: Chat): Promise { if (this.chatsById.has(chat.id)) - throw `Failed to join chat, it is already joined: ${chat.id}`; + throw `Failed to join chat, it is already joined: ${chat.id}` this.waku.addDecryptionKey(chat.symKey, { method: DecryptionMethod.Symmetric, contentTopics: [chat.contentTopic], - }); + }) this.waku.relay.addObserver( (wakuMessage: WakuMessage) => { - if (!wakuMessage.payload || !wakuMessage.timestamp) return; + if (!wakuMessage.payload || !wakuMessage.timestamp) return - const message = ApplicationMetadataMessage.decode(wakuMessage.payload); + const message = ApplicationMetadataMessage.decode(wakuMessage.payload) switch (message.type) { case ApplicationMetadataMessage_Type.TYPE_CHAT_MESSAGE: - this._handleNewChatMessage(chat, message, wakuMessage.timestamp); - break; + this._handleNewChatMessage(chat, message, wakuMessage.timestamp) + break default: - dbg("Received unsupported message type", message.type); + dbg('Received unsupported message type', message.type) } }, [chat.contentTopic] - ); + ) - this.chatsById.set(chat.id, chat); + this.chatsById.set(chat.id, chat) } /** @@ -114,24 +114,24 @@ export class Messenger { responseTo?: string ): Promise { if (this.identity) { - const chat = this.chatsById.get(chatId); - if (!chat) throw `Failed to send message, chat not joined: ${chatId}`; + const chat = this.chatsById.get(chatId) + if (!chat) throw `Failed to send message, chat not joined: ${chatId}` - const chatMessage = chat.createMessage(content, responseTo); + const chatMessage = chat.createMessage(content, responseTo) const appMetadataMessage = ApplicationMetadataMessage.create( chatMessage.encode(), ApplicationMetadataMessage_Type.TYPE_CHAT_MESSAGE, this.identity - ); + ) const wakuMessage = await WakuMessage.fromBytes( appMetadataMessage.encode(), chat.contentTopic, { symKey: chat.symKey, sigPrivKey: this.identity.privateKey } - ); + ) - await this.waku.relay.send(wakuMessage); + await this.waku.relay.send(wakuMessage) } } @@ -148,23 +148,23 @@ export class Messenger { ) => void, chatId: string | string[] ): void { - let chats = []; + let chats = [] - if (typeof chatId === "string") { - chats.push(chatId); + if (typeof chatId === 'string') { + chats.push(chatId) } else { - chats = [...chatId]; + chats = [...chatId] } - chats.forEach((id) => { + chats.forEach(id => { if (!this.chatsById.has(id)) - throw "Cannot add observer on a chat that is not joined."; + throw 'Cannot add observer on a chat that is not joined.' if (!this.observers[id]) { - this.observers[id] = new Set(); + this.observers[id] = new Set() } - this.observers[id].add(observer); - }); + this.observers[id].add(observer) + }) } /** @@ -178,7 +178,7 @@ export class Messenger { chatId: string ): void { if (this.observers[chatId]) { - this.observers[chatId].delete(observer); + this.observers[chatId].delete(observer) } } @@ -186,7 +186,7 @@ export class Messenger { * Stops the messenger. */ public async stop(): Promise { - await this.waku.stop(); + await this.waku.stop() } /** @@ -202,43 +202,43 @@ export class Messenger { endTime: Date, callback?: (messages: ApplicationMetadataMessage[]) => void ): Promise { - const chat = this.chatsById.get(chatId); + const chat = this.chatsById.get(chatId) if (!chat) - throw `Failed to retrieve messages, chat is not joined: ${chatId}`; + throw `Failed to retrieve messages, chat is not joined: ${chatId}` const _callback = (wakuMessages: WakuMessage[]): void => { const isDefined = ( msg: ApplicationMetadataMessage | undefined ): msg is ApplicationMetadataMessage => { - return !!msg; - }; + return !!msg + } const messages = wakuMessages.map((wakuMessage: WakuMessage) => { - if (!wakuMessage.payload || !wakuMessage.timestamp) return; + if (!wakuMessage.payload || !wakuMessage.timestamp) return - const message = ApplicationMetadataMessage.decode(wakuMessage.payload); + const message = ApplicationMetadataMessage.decode(wakuMessage.payload) switch (message.type) { case ApplicationMetadataMessage_Type.TYPE_CHAT_MESSAGE: - this._handleNewChatMessage(chat, message, wakuMessage.timestamp); - return message; + this._handleNewChatMessage(chat, message, wakuMessage.timestamp) + return message default: - dbg("Retrieved unsupported message type", message.type); - return; + dbg('Retrieved unsupported message type', message.type) + return } - }); + }) if (callback) { - callback(messages.filter(isDefined)); + callback(messages.filter(isDefined)) } - }; + } const allMessages = await this.waku.store.queryHistory( [chat.contentTopic], { timeFilter: { startTime, endTime }, callback: _callback, } - ); - return allMessages.length; + ) + return allMessages.length } private _handleNewChatMessage( @@ -246,15 +246,15 @@ export class Messenger { message: ApplicationMetadataMessage, timestamp: Date ): void { - if (!message.payload || !message.type || !message.signature) return; + if (!message.payload || !message.type || !message.signature) return - const chatMessage = ChatMessage.decode(message.payload); - chat.handleNewMessage(chatMessage); + const chatMessage = ChatMessage.decode(message.payload) + chat.handleNewMessage(chatMessage) if (this.observers[chat.id]) { - this.observers[chat.id].forEach((observer) => { - observer(message, timestamp, chat.id); - }); + this.observers[chat.id].forEach(observer => { + observer(message, timestamp, chat.id) + }) } } @@ -262,7 +262,7 @@ export class Messenger { const { clock, nickname } = await getLatestUserNickname( publicKey, this.waku - ); - return clock > 0 && nickname !== ""; + ) + return clock > 0 && nickname !== '' } } diff --git a/packages/status-core/src/proto/communities/v1/chat_identity.ts b/packages/status-core/src/proto/communities/v1/chat_identity.ts index c75a7900..89e35d07 100644 --- a/packages/status-core/src/proto/communities/v1/chat_identity.ts +++ b/packages/status-core/src/proto/communities/v1/chat_identity.ts @@ -1,33 +1,33 @@ /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import Long from 'long' +import _m0 from 'protobufjs/minimal' import { ImageType, imageTypeFromJSON, imageTypeToJSON, -} from "../../communities/v1/enums"; +} from '../../communities/v1/enums' -export const protobufPackage = "communities.v1"; +export const protobufPackage = 'communities.v1' /** ChatIdentity represents the user defined identity associated with their public chat key */ export interface ChatIdentity { /** Lamport timestamp of the message */ - clock: number; + clock: number /** ens_name is the valid ENS name associated with the chat key */ - ensName: string; + ensName: string /** images is a string indexed mapping of images associated with an identity */ - images: { [key: string]: IdentityImage }; + images: { [key: string]: IdentityImage } /** display name is the user set identity, valid only for organisations */ - displayName: string; + displayName: string /** description is the user set description, valid only for organisations */ - description: string; - color: string; - emoji: string; + description: string + color: string + emoji: string } export interface ChatIdentity_ImagesEntry { - key: string; - value: IdentityImage | undefined; + key: string + value: IdentityImage | undefined } /** ProfileImage represents data associated with a user's profile image */ @@ -36,11 +36,11 @@ export interface IdentityImage { * payload is a context based payload for the profile image data, * context is determined by the `source_type` */ - payload: Uint8Array; + payload: Uint8Array /** source_type signals the image payload source */ - sourceType: IdentityImage_SourceType; + sourceType: IdentityImage_SourceType /** image_type signals the image type and method of parsing the payload */ - imageType: ImageType; + imageType: ImageType } /** SourceType are the predefined types of image source allowed */ @@ -63,18 +63,18 @@ export function identityImage_SourceTypeFromJSON( ): IdentityImage_SourceType { switch (object) { case 0: - case "UNKNOWN_SOURCE_TYPE": - return IdentityImage_SourceType.UNKNOWN_SOURCE_TYPE; + case 'UNKNOWN_SOURCE_TYPE': + return IdentityImage_SourceType.UNKNOWN_SOURCE_TYPE case 1: - case "RAW_PAYLOAD": - return IdentityImage_SourceType.RAW_PAYLOAD; + case 'RAW_PAYLOAD': + return IdentityImage_SourceType.RAW_PAYLOAD case 2: - case "ENS_AVATAR": - return IdentityImage_SourceType.ENS_AVATAR; + case 'ENS_AVATAR': + return IdentityImage_SourceType.ENS_AVATAR case -1: - case "UNRECOGNIZED": + case 'UNRECOGNIZED': default: - return IdentityImage_SourceType.UNRECOGNIZED; + return IdentityImage_SourceType.UNRECOGNIZED } } @@ -83,24 +83,24 @@ export function identityImage_SourceTypeToJSON( ): string { switch (object) { case IdentityImage_SourceType.UNKNOWN_SOURCE_TYPE: - return "UNKNOWN_SOURCE_TYPE"; + return 'UNKNOWN_SOURCE_TYPE' case IdentityImage_SourceType.RAW_PAYLOAD: - return "RAW_PAYLOAD"; + return 'RAW_PAYLOAD' case IdentityImage_SourceType.ENS_AVATAR: - return "ENS_AVATAR"; + return 'ENS_AVATAR' default: - return "UNKNOWN"; + return 'UNKNOWN' } } const baseChatIdentity: object = { clock: 0, - ensName: "", - displayName: "", - description: "", - color: "", - emoji: "", -}; + ensName: '', + displayName: '', + description: '', + color: '', + emoji: '', +} export const ChatIdentity = { encode( @@ -108,246 +108,244 @@ export const ChatIdentity = { writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.clock !== 0) { - writer.uint32(8).uint64(message.clock); + writer.uint32(8).uint64(message.clock) } - if (message.ensName !== "") { - writer.uint32(18).string(message.ensName); + if (message.ensName !== '') { + writer.uint32(18).string(message.ensName) } Object.entries(message.images).forEach(([key, value]) => { ChatIdentity_ImagesEntry.encode( { key: key as any, value }, writer.uint32(26).fork() - ).ldelim(); - }); - if (message.displayName !== "") { - writer.uint32(34).string(message.displayName); + ).ldelim() + }) + if (message.displayName !== '') { + writer.uint32(34).string(message.displayName) } - if (message.description !== "") { - writer.uint32(42).string(message.description); + if (message.description !== '') { + writer.uint32(42).string(message.description) } - if (message.color !== "") { - writer.uint32(50).string(message.color); + if (message.color !== '') { + writer.uint32(50).string(message.color) } - if (message.emoji !== "") { - writer.uint32(58).string(message.emoji); + if (message.emoji !== '') { + writer.uint32(58).string(message.emoji) } - return writer; + return writer }, decode(input: _m0.Reader | Uint8Array, length?: number): ChatIdentity { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseChatIdentity } as ChatIdentity; - message.images = {}; + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = { ...baseChatIdentity } as ChatIdentity + message.images = {} while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.clock = longToNumber(reader.uint64() as Long); - break; + message.clock = longToNumber(reader.uint64() as Long) + break case 2: - message.ensName = reader.string(); - break; + message.ensName = reader.string() + break case 3: const entry3 = ChatIdentity_ImagesEntry.decode( reader, reader.uint32() - ); + ) if (entry3.value !== undefined) { - message.images[entry3.key] = entry3.value; + message.images[entry3.key] = entry3.value } - break; + break case 4: - message.displayName = reader.string(); - break; + message.displayName = reader.string() + break case 5: - message.description = reader.string(); - break; + message.description = reader.string() + break case 6: - message.color = reader.string(); - break; + message.color = reader.string() + break case 7: - message.emoji = reader.string(); - break; + message.emoji = reader.string() + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): ChatIdentity { - const message = { ...baseChatIdentity } as ChatIdentity; - message.images = {}; + const message = { ...baseChatIdentity } as ChatIdentity + message.images = {} if (object.clock !== undefined && object.clock !== null) { - message.clock = Number(object.clock); + message.clock = Number(object.clock) } else { - message.clock = 0; + message.clock = 0 } if (object.ensName !== undefined && object.ensName !== null) { - message.ensName = String(object.ensName); + message.ensName = String(object.ensName) } else { - message.ensName = ""; + message.ensName = '' } if (object.images !== undefined && object.images !== null) { Object.entries(object.images).forEach(([key, value]) => { - message.images[key] = IdentityImage.fromJSON(value); - }); + message.images[key] = IdentityImage.fromJSON(value) + }) } if (object.displayName !== undefined && object.displayName !== null) { - message.displayName = String(object.displayName); + message.displayName = String(object.displayName) } else { - message.displayName = ""; + message.displayName = '' } if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); + message.description = String(object.description) } else { - message.description = ""; + message.description = '' } if (object.color !== undefined && object.color !== null) { - message.color = String(object.color); + message.color = String(object.color) } else { - message.color = ""; + message.color = '' } if (object.emoji !== undefined && object.emoji !== null) { - message.emoji = String(object.emoji); + message.emoji = String(object.emoji) } else { - message.emoji = ""; + message.emoji = '' } - return message; + return message }, toJSON(message: ChatIdentity): unknown { - const obj: any = {}; - message.clock !== undefined && (obj.clock = message.clock); - message.ensName !== undefined && (obj.ensName = message.ensName); - obj.images = {}; + const obj: any = {} + message.clock !== undefined && (obj.clock = message.clock) + message.ensName !== undefined && (obj.ensName = message.ensName) + obj.images = {} if (message.images) { Object.entries(message.images).forEach(([k, v]) => { - obj.images[k] = IdentityImage.toJSON(v); - }); + obj.images[k] = IdentityImage.toJSON(v) + }) } - message.displayName !== undefined && - (obj.displayName = message.displayName); - message.description !== undefined && - (obj.description = message.description); - message.color !== undefined && (obj.color = message.color); - message.emoji !== undefined && (obj.emoji = message.emoji); - return obj; + message.displayName !== undefined && (obj.displayName = message.displayName) + message.description !== undefined && (obj.description = message.description) + message.color !== undefined && (obj.color = message.color) + message.emoji !== undefined && (obj.emoji = message.emoji) + return obj }, fromPartial(object: DeepPartial): ChatIdentity { - const message = { ...baseChatIdentity } as ChatIdentity; - message.images = {}; + const message = { ...baseChatIdentity } as ChatIdentity + message.images = {} if (object.clock !== undefined && object.clock !== null) { - message.clock = object.clock; + message.clock = object.clock } else { - message.clock = 0; + message.clock = 0 } if (object.ensName !== undefined && object.ensName !== null) { - message.ensName = object.ensName; + message.ensName = object.ensName } else { - message.ensName = ""; + message.ensName = '' } if (object.images !== undefined && object.images !== null) { Object.entries(object.images).forEach(([key, value]) => { if (value !== undefined) { - message.images[key] = IdentityImage.fromPartial(value); + message.images[key] = IdentityImage.fromPartial(value) } - }); + }) } if (object.displayName !== undefined && object.displayName !== null) { - message.displayName = object.displayName; + message.displayName = object.displayName } else { - message.displayName = ""; + message.displayName = '' } if (object.description !== undefined && object.description !== null) { - message.description = object.description; + message.description = object.description } else { - message.description = ""; + message.description = '' } if (object.color !== undefined && object.color !== null) { - message.color = object.color; + message.color = object.color } else { - message.color = ""; + message.color = '' } if (object.emoji !== undefined && object.emoji !== null) { - message.emoji = object.emoji; + message.emoji = object.emoji } else { - message.emoji = ""; + message.emoji = '' } - return message; + return message }, -}; +} -const baseChatIdentity_ImagesEntry: object = { key: "" }; +const baseChatIdentity_ImagesEntry: object = { key: '' } export const ChatIdentity_ImagesEntry = { encode( message: ChatIdentity_ImagesEntry, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); + if (message.key !== '') { + writer.uint32(10).string(message.key) } if (message.value !== undefined) { - IdentityImage.encode(message.value, writer.uint32(18).fork()).ldelim(); + IdentityImage.encode(message.value, writer.uint32(18).fork()).ldelim() } - return writer; + return writer }, decode( input: _m0.Reader | Uint8Array, length?: number ): ChatIdentity_ImagesEntry { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length const message = { ...baseChatIdentity_ImagesEntry, - } as ChatIdentity_ImagesEntry; + } as ChatIdentity_ImagesEntry while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.key = reader.string(); - break; + message.key = reader.string() + break case 2: - message.value = IdentityImage.decode(reader, reader.uint32()); - break; + message.value = IdentityImage.decode(reader, reader.uint32()) + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): ChatIdentity_ImagesEntry { const message = { ...baseChatIdentity_ImagesEntry, - } as ChatIdentity_ImagesEntry; + } as ChatIdentity_ImagesEntry if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); + message.key = String(object.key) } else { - message.key = ""; + message.key = '' } if (object.value !== undefined && object.value !== null) { - message.value = IdentityImage.fromJSON(object.value); + message.value = IdentityImage.fromJSON(object.value) } else { - message.value = undefined; + message.value = undefined } - return message; + return message }, toJSON(message: ChatIdentity_ImagesEntry): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); + const obj: any = {} + message.key !== undefined && (obj.key = message.key) message.value !== undefined && (obj.value = message.value ? IdentityImage.toJSON(message.value) - : undefined); - return obj; + : undefined) + return obj }, fromPartial( @@ -355,22 +353,22 @@ export const ChatIdentity_ImagesEntry = { ): ChatIdentity_ImagesEntry { const message = { ...baseChatIdentity_ImagesEntry, - } as ChatIdentity_ImagesEntry; + } as ChatIdentity_ImagesEntry if (object.key !== undefined && object.key !== null) { - message.key = object.key; + message.key = object.key } else { - message.key = ""; + message.key = '' } if (object.value !== undefined && object.value !== null) { - message.value = IdentityImage.fromPartial(object.value); + message.value = IdentityImage.fromPartial(object.value) } else { - message.value = undefined; + message.value = undefined } - return message; + return message }, -}; +} -const baseIdentityImage: object = { sourceType: 0, imageType: 0 }; +const baseIdentityImage: object = { sourceType: 0, imageType: 0 } export const IdentityImage = { encode( @@ -378,127 +376,127 @@ export const IdentityImage = { writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.payload.length !== 0) { - writer.uint32(10).bytes(message.payload); + writer.uint32(10).bytes(message.payload) } if (message.sourceType !== 0) { - writer.uint32(16).int32(message.sourceType); + writer.uint32(16).int32(message.sourceType) } if (message.imageType !== 0) { - writer.uint32(24).int32(message.imageType); + writer.uint32(24).int32(message.imageType) } - return writer; + return writer }, decode(input: _m0.Reader | Uint8Array, length?: number): IdentityImage { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseIdentityImage } as IdentityImage; - message.payload = new Uint8Array(); + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = { ...baseIdentityImage } as IdentityImage + message.payload = new Uint8Array() while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.payload = reader.bytes(); - break; + message.payload = reader.bytes() + break case 2: - message.sourceType = reader.int32() as any; - break; + message.sourceType = reader.int32() as any + break case 3: - message.imageType = reader.int32() as any; - break; + message.imageType = reader.int32() as any + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): IdentityImage { - const message = { ...baseIdentityImage } as IdentityImage; - message.payload = new Uint8Array(); + const message = { ...baseIdentityImage } as IdentityImage + message.payload = new Uint8Array() if (object.payload !== undefined && object.payload !== null) { - message.payload = bytesFromBase64(object.payload); + message.payload = bytesFromBase64(object.payload) } if (object.sourceType !== undefined && object.sourceType !== null) { - message.sourceType = identityImage_SourceTypeFromJSON(object.sourceType); + message.sourceType = identityImage_SourceTypeFromJSON(object.sourceType) } else { - message.sourceType = 0; + message.sourceType = 0 } if (object.imageType !== undefined && object.imageType !== null) { - message.imageType = imageTypeFromJSON(object.imageType); + message.imageType = imageTypeFromJSON(object.imageType) } else { - message.imageType = 0; + message.imageType = 0 } - return message; + return message }, toJSON(message: IdentityImage): unknown { - const obj: any = {}; + const obj: any = {} message.payload !== undefined && (obj.payload = base64FromBytes( message.payload !== undefined ? message.payload : new Uint8Array() - )); + )) message.sourceType !== undefined && - (obj.sourceType = identityImage_SourceTypeToJSON(message.sourceType)); + (obj.sourceType = identityImage_SourceTypeToJSON(message.sourceType)) message.imageType !== undefined && - (obj.imageType = imageTypeToJSON(message.imageType)); - return obj; + (obj.imageType = imageTypeToJSON(message.imageType)) + return obj }, fromPartial(object: DeepPartial): IdentityImage { - const message = { ...baseIdentityImage } as IdentityImage; + const message = { ...baseIdentityImage } as IdentityImage if (object.payload !== undefined && object.payload !== null) { - message.payload = object.payload; + message.payload = object.payload } else { - message.payload = new Uint8Array(); + message.payload = new Uint8Array() } if (object.sourceType !== undefined && object.sourceType !== null) { - message.sourceType = object.sourceType; + message.sourceType = object.sourceType } else { - message.sourceType = 0; + message.sourceType = 0 } if (object.imageType !== undefined && object.imageType !== null) { - message.imageType = object.imageType; + message.imageType = object.imageType } else { - message.imageType = 0; + message.imageType = 0 } - return message; + return message }, -}; +} -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: any | undefined; +declare var self: any | undefined +declare var window: any | undefined +declare var global: any | undefined var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); + if (typeof globalThis !== 'undefined') return globalThis + if (typeof self !== 'undefined') return self + if (typeof window !== 'undefined') return window + if (typeof global !== 'undefined') return global + throw 'Unable to locate global object' +})() const atob: (b64: string) => string = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); + (b64 => globalThis.Buffer.from(b64, 'base64').toString('binary')) function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); + const bin = atob(b64) + const arr = new Uint8Array(bin.length) for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); + arr[i] = bin.charCodeAt(i) } - return arr; + return arr } const btoa: (bin: string) => string = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); + (bin => globalThis.Buffer.from(bin, 'binary').toString('base64')) function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; + const bin: string[] = [] for (const byte of arr) { - bin.push(String.fromCharCode(byte)); + bin.push(String.fromCharCode(byte)) } - return btoa(bin.join("")); + return btoa(bin.join('')) } type Builtin = @@ -508,7 +506,7 @@ type Builtin = | string | number | boolean - | undefined; + | undefined export type DeepPartial = T extends Builtin ? T : T extends Array @@ -517,16 +515,16 @@ export type DeepPartial = T extends Builtin ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; + : Partial function longToNumber(long: Long): number { if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + throw new globalThis.Error('Value is larger than Number.MAX_SAFE_INTEGER') } - return long.toNumber(); + return long.toNumber() } if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); + _m0.util.Long = Long as any + _m0.configure() } diff --git a/packages/status-core/src/proto/communities/v1/chat_message.ts b/packages/status-core/src/proto/communities/v1/chat_message.ts index 41adb57b..bef0d103 100644 --- a/packages/status-core/src/proto/communities/v1/chat_message.ts +++ b/packages/status-core/src/proto/communities/v1/chat_message.ts @@ -1,6 +1,6 @@ /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import Long from 'long' +import _m0 from 'protobufjs/minimal' import { ImageType, MessageType, @@ -8,24 +8,24 @@ import { imageTypeToJSON, messageTypeFromJSON, messageTypeToJSON, -} from "../../communities/v1/enums"; +} from '../../communities/v1/enums' -export const protobufPackage = "communities.v1"; +export const protobufPackage = 'communities.v1' export interface StickerMessage { - hash: string; - pack: number; + hash: string + pack: number } export interface ImageMessage { - payload: Uint8Array; - type: ImageType; + payload: Uint8Array + type: ImageType } export interface AudioMessage { - payload: Uint8Array; - type: AudioMessage_AudioType; - durationMs: number; + payload: Uint8Array + type: AudioMessage_AudioType + durationMs: number } export enum AudioMessage_AudioType { @@ -40,18 +40,18 @@ export function audioMessage_AudioTypeFromJSON( ): AudioMessage_AudioType { switch (object) { case 0: - case "AUDIO_TYPE_UNKNOWN_UNSPECIFIED": - return AudioMessage_AudioType.AUDIO_TYPE_UNKNOWN_UNSPECIFIED; + case 'AUDIO_TYPE_UNKNOWN_UNSPECIFIED': + return AudioMessage_AudioType.AUDIO_TYPE_UNKNOWN_UNSPECIFIED case 1: - case "AUDIO_TYPE_AAC": - return AudioMessage_AudioType.AUDIO_TYPE_AAC; + case 'AUDIO_TYPE_AAC': + return AudioMessage_AudioType.AUDIO_TYPE_AAC case 2: - case "AUDIO_TYPE_AMR": - return AudioMessage_AudioType.AUDIO_TYPE_AMR; + case 'AUDIO_TYPE_AMR': + return AudioMessage_AudioType.AUDIO_TYPE_AMR case -1: - case "UNRECOGNIZED": + case 'UNRECOGNIZED': default: - return AudioMessage_AudioType.UNRECOGNIZED; + return AudioMessage_AudioType.UNRECOGNIZED } } @@ -60,69 +60,69 @@ export function audioMessage_AudioTypeToJSON( ): string { switch (object) { case AudioMessage_AudioType.AUDIO_TYPE_UNKNOWN_UNSPECIFIED: - return "AUDIO_TYPE_UNKNOWN_UNSPECIFIED"; + return 'AUDIO_TYPE_UNKNOWN_UNSPECIFIED' case AudioMessage_AudioType.AUDIO_TYPE_AAC: - return "AUDIO_TYPE_AAC"; + return 'AUDIO_TYPE_AAC' case AudioMessage_AudioType.AUDIO_TYPE_AMR: - return "AUDIO_TYPE_AMR"; + return 'AUDIO_TYPE_AMR' default: - return "UNKNOWN"; + return 'UNKNOWN' } } export interface EditMessage { - clock: number; + clock: number /** Text of the message */ - text: string; - chatId: string; - messageId: string; + text: string + chatId: string + messageId: string /** Grant for community edit messages */ - grant: Uint8Array; + grant: Uint8Array /** The type of message (public/one-to-one/private-group-chat) */ - messageType: MessageType; + messageType: MessageType } export interface DeleteMessage { - clock: number; - chatId: string; - messageId: string; + clock: number + chatId: string + messageId: string /** Grant for community delete messages */ - grant: Uint8Array; + grant: Uint8Array /** The type of message (public/one-to-one/private-group-chat) */ - messageType: MessageType; + messageType: MessageType } export interface ChatMessage { /** Lamport timestamp of the chat message */ - clock: number; + clock: number /** * Unix timestamps in milliseconds, currently not used as we use whisper as more reliable, but here * so that we don't rely on it */ - timestamp: number; + timestamp: number /** Text of the message */ - text: string; + text: string /** Id of the message that we are replying to */ - responseTo: string; + responseTo: string /** Ens name of the sender */ - ensName: string; + ensName: string /** * Chat id, this field is symmetric for public-chats and private group chats, * but asymmetric in case of one-to-ones, as the sender will use the chat-id * of the received, while the receiver will use the chat-id of the sender. * Probably should be the concatenation of sender-pk & receiver-pk in alphabetical order */ - chatId: string; + chatId: string /** The type of message (public/one-to-one/private-group-chat) */ - messageType: MessageType; + messageType: MessageType /** The type of the content of the message */ - contentType: ChatMessage_ContentType; - sticker: StickerMessage | undefined; - image: ImageMessage | undefined; - audio: AudioMessage | undefined; - community: Uint8Array | undefined; + contentType: ChatMessage_ContentType + sticker: StickerMessage | undefined + image: ImageMessage | undefined + audio: AudioMessage | undefined + community: Uint8Array | undefined /** Grant for community chat messages */ - grant?: Uint8Array | undefined; + grant?: Uint8Array | undefined } export enum ChatMessage_ContentType { @@ -147,42 +147,42 @@ export function chatMessage_ContentTypeFromJSON( ): ChatMessage_ContentType { switch (object) { case 0: - case "CONTENT_TYPE_UNKNOWN_UNSPECIFIED": - return ChatMessage_ContentType.CONTENT_TYPE_UNKNOWN_UNSPECIFIED; + case 'CONTENT_TYPE_UNKNOWN_UNSPECIFIED': + return ChatMessage_ContentType.CONTENT_TYPE_UNKNOWN_UNSPECIFIED case 1: - case "CONTENT_TYPE_TEXT_PLAIN": - return ChatMessage_ContentType.CONTENT_TYPE_TEXT_PLAIN; + case 'CONTENT_TYPE_TEXT_PLAIN': + return ChatMessage_ContentType.CONTENT_TYPE_TEXT_PLAIN case 2: - case "CONTENT_TYPE_STICKER": - return ChatMessage_ContentType.CONTENT_TYPE_STICKER; + case 'CONTENT_TYPE_STICKER': + return ChatMessage_ContentType.CONTENT_TYPE_STICKER case 3: - case "CONTENT_TYPE_STATUS": - return ChatMessage_ContentType.CONTENT_TYPE_STATUS; + case 'CONTENT_TYPE_STATUS': + return ChatMessage_ContentType.CONTENT_TYPE_STATUS case 4: - case "CONTENT_TYPE_EMOJI": - return ChatMessage_ContentType.CONTENT_TYPE_EMOJI; + case 'CONTENT_TYPE_EMOJI': + return ChatMessage_ContentType.CONTENT_TYPE_EMOJI case 5: - case "CONTENT_TYPE_TRANSACTION_COMMAND": - return ChatMessage_ContentType.CONTENT_TYPE_TRANSACTION_COMMAND; + case 'CONTENT_TYPE_TRANSACTION_COMMAND': + return ChatMessage_ContentType.CONTENT_TYPE_TRANSACTION_COMMAND case 6: - case "CONTENT_TYPE_SYSTEM_MESSAGE_CONTENT_PRIVATE_GROUP": - return ChatMessage_ContentType.CONTENT_TYPE_SYSTEM_MESSAGE_CONTENT_PRIVATE_GROUP; + case 'CONTENT_TYPE_SYSTEM_MESSAGE_CONTENT_PRIVATE_GROUP': + return ChatMessage_ContentType.CONTENT_TYPE_SYSTEM_MESSAGE_CONTENT_PRIVATE_GROUP case 7: - case "CONTENT_TYPE_IMAGE": - return ChatMessage_ContentType.CONTENT_TYPE_IMAGE; + case 'CONTENT_TYPE_IMAGE': + return ChatMessage_ContentType.CONTENT_TYPE_IMAGE case 8: - case "CONTENT_TYPE_AUDIO": - return ChatMessage_ContentType.CONTENT_TYPE_AUDIO; + case 'CONTENT_TYPE_AUDIO': + return ChatMessage_ContentType.CONTENT_TYPE_AUDIO case 9: - case "CONTENT_TYPE_COMMUNITY": - return ChatMessage_ContentType.CONTENT_TYPE_COMMUNITY; + case 'CONTENT_TYPE_COMMUNITY': + return ChatMessage_ContentType.CONTENT_TYPE_COMMUNITY case 10: - case "CONTENT_TYPE_SYSTEM_MESSAGE_GAP": - return ChatMessage_ContentType.CONTENT_TYPE_SYSTEM_MESSAGE_GAP; + case 'CONTENT_TYPE_SYSTEM_MESSAGE_GAP': + return ChatMessage_ContentType.CONTENT_TYPE_SYSTEM_MESSAGE_GAP case -1: - case "UNRECOGNIZED": + case 'UNRECOGNIZED': default: - return ChatMessage_ContentType.UNRECOGNIZED; + return ChatMessage_ContentType.UNRECOGNIZED } } @@ -191,108 +191,108 @@ export function chatMessage_ContentTypeToJSON( ): string { switch (object) { case ChatMessage_ContentType.CONTENT_TYPE_UNKNOWN_UNSPECIFIED: - return "CONTENT_TYPE_UNKNOWN_UNSPECIFIED"; + return 'CONTENT_TYPE_UNKNOWN_UNSPECIFIED' case ChatMessage_ContentType.CONTENT_TYPE_TEXT_PLAIN: - return "CONTENT_TYPE_TEXT_PLAIN"; + return 'CONTENT_TYPE_TEXT_PLAIN' case ChatMessage_ContentType.CONTENT_TYPE_STICKER: - return "CONTENT_TYPE_STICKER"; + return 'CONTENT_TYPE_STICKER' case ChatMessage_ContentType.CONTENT_TYPE_STATUS: - return "CONTENT_TYPE_STATUS"; + return 'CONTENT_TYPE_STATUS' case ChatMessage_ContentType.CONTENT_TYPE_EMOJI: - return "CONTENT_TYPE_EMOJI"; + return 'CONTENT_TYPE_EMOJI' case ChatMessage_ContentType.CONTENT_TYPE_TRANSACTION_COMMAND: - return "CONTENT_TYPE_TRANSACTION_COMMAND"; + return 'CONTENT_TYPE_TRANSACTION_COMMAND' case ChatMessage_ContentType.CONTENT_TYPE_SYSTEM_MESSAGE_CONTENT_PRIVATE_GROUP: - return "CONTENT_TYPE_SYSTEM_MESSAGE_CONTENT_PRIVATE_GROUP"; + return 'CONTENT_TYPE_SYSTEM_MESSAGE_CONTENT_PRIVATE_GROUP' case ChatMessage_ContentType.CONTENT_TYPE_IMAGE: - return "CONTENT_TYPE_IMAGE"; + return 'CONTENT_TYPE_IMAGE' case ChatMessage_ContentType.CONTENT_TYPE_AUDIO: - return "CONTENT_TYPE_AUDIO"; + return 'CONTENT_TYPE_AUDIO' case ChatMessage_ContentType.CONTENT_TYPE_COMMUNITY: - return "CONTENT_TYPE_COMMUNITY"; + return 'CONTENT_TYPE_COMMUNITY' case ChatMessage_ContentType.CONTENT_TYPE_SYSTEM_MESSAGE_GAP: - return "CONTENT_TYPE_SYSTEM_MESSAGE_GAP"; + return 'CONTENT_TYPE_SYSTEM_MESSAGE_GAP' default: - return "UNKNOWN"; + return 'UNKNOWN' } } -const baseStickerMessage: object = { hash: "", pack: 0 }; +const baseStickerMessage: object = { hash: '', pack: 0 } export const StickerMessage = { encode( message: StickerMessage, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.hash !== "") { - writer.uint32(10).string(message.hash); + if (message.hash !== '') { + writer.uint32(10).string(message.hash) } if (message.pack !== 0) { - writer.uint32(16).int32(message.pack); + writer.uint32(16).int32(message.pack) } - return writer; + return writer }, decode(input: _m0.Reader | Uint8Array, length?: number): StickerMessage { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseStickerMessage } as StickerMessage; + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = { ...baseStickerMessage } as StickerMessage while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.hash = reader.string(); - break; + message.hash = reader.string() + break case 2: - message.pack = reader.int32(); - break; + message.pack = reader.int32() + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): StickerMessage { - const message = { ...baseStickerMessage } as StickerMessage; + const message = { ...baseStickerMessage } as StickerMessage if (object.hash !== undefined && object.hash !== null) { - message.hash = String(object.hash); + message.hash = String(object.hash) } else { - message.hash = ""; + message.hash = '' } if (object.pack !== undefined && object.pack !== null) { - message.pack = Number(object.pack); + message.pack = Number(object.pack) } else { - message.pack = 0; + message.pack = 0 } - return message; + return message }, toJSON(message: StickerMessage): unknown { - const obj: any = {}; - message.hash !== undefined && (obj.hash = message.hash); - message.pack !== undefined && (obj.pack = message.pack); - return obj; + const obj: any = {} + message.hash !== undefined && (obj.hash = message.hash) + message.pack !== undefined && (obj.pack = message.pack) + return obj }, fromPartial(object: DeepPartial): StickerMessage { - const message = { ...baseStickerMessage } as StickerMessage; + const message = { ...baseStickerMessage } as StickerMessage if (object.hash !== undefined && object.hash !== null) { - message.hash = object.hash; + message.hash = object.hash } else { - message.hash = ""; + message.hash = '' } if (object.pack !== undefined && object.pack !== null) { - message.pack = object.pack; + message.pack = object.pack } else { - message.pack = 0; + message.pack = 0 } - return message; + return message }, -}; +} -const baseImageMessage: object = { type: 0 }; +const baseImageMessage: object = { type: 0 } export const ImageMessage = { encode( @@ -300,77 +300,77 @@ export const ImageMessage = { writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.payload.length !== 0) { - writer.uint32(10).bytes(message.payload); + writer.uint32(10).bytes(message.payload) } if (message.type !== 0) { - writer.uint32(16).int32(message.type); + writer.uint32(16).int32(message.type) } - return writer; + return writer }, decode(input: _m0.Reader | Uint8Array, length?: number): ImageMessage { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseImageMessage } as ImageMessage; - message.payload = new Uint8Array(); + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = { ...baseImageMessage } as ImageMessage + message.payload = new Uint8Array() while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.payload = reader.bytes(); - break; + message.payload = reader.bytes() + break case 2: - message.type = reader.int32() as any; - break; + message.type = reader.int32() as any + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): ImageMessage { - const message = { ...baseImageMessage } as ImageMessage; - message.payload = new Uint8Array(); + const message = { ...baseImageMessage } as ImageMessage + message.payload = new Uint8Array() if (object.payload !== undefined && object.payload !== null) { - message.payload = bytesFromBase64(object.payload); + message.payload = bytesFromBase64(object.payload) } if (object.type !== undefined && object.type !== null) { - message.type = imageTypeFromJSON(object.type); + message.type = imageTypeFromJSON(object.type) } else { - message.type = 0; + message.type = 0 } - return message; + return message }, toJSON(message: ImageMessage): unknown { - const obj: any = {}; + const obj: any = {} message.payload !== undefined && (obj.payload = base64FromBytes( message.payload !== undefined ? message.payload : new Uint8Array() - )); - message.type !== undefined && (obj.type = imageTypeToJSON(message.type)); - return obj; + )) + message.type !== undefined && (obj.type = imageTypeToJSON(message.type)) + return obj }, fromPartial(object: DeepPartial): ImageMessage { - const message = { ...baseImageMessage } as ImageMessage; + const message = { ...baseImageMessage } as ImageMessage if (object.payload !== undefined && object.payload !== null) { - message.payload = object.payload; + message.payload = object.payload } else { - message.payload = new Uint8Array(); + message.payload = new Uint8Array() } if (object.type !== undefined && object.type !== null) { - message.type = object.type; + message.type = object.type } else { - message.type = 0; + message.type = 0 } - return message; + return message }, -}; +} -const baseAudioMessage: object = { type: 0, durationMs: 0 }; +const baseAudioMessage: object = { type: 0, durationMs: 0 } export const AudioMessage = { encode( @@ -378,101 +378,101 @@ export const AudioMessage = { writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.payload.length !== 0) { - writer.uint32(10).bytes(message.payload); + writer.uint32(10).bytes(message.payload) } if (message.type !== 0) { - writer.uint32(16).int32(message.type); + writer.uint32(16).int32(message.type) } if (message.durationMs !== 0) { - writer.uint32(24).uint64(message.durationMs); + writer.uint32(24).uint64(message.durationMs) } - return writer; + return writer }, decode(input: _m0.Reader | Uint8Array, length?: number): AudioMessage { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseAudioMessage } as AudioMessage; - message.payload = new Uint8Array(); + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = { ...baseAudioMessage } as AudioMessage + message.payload = new Uint8Array() while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.payload = reader.bytes(); - break; + message.payload = reader.bytes() + break case 2: - message.type = reader.int32() as any; - break; + message.type = reader.int32() as any + break case 3: - message.durationMs = longToNumber(reader.uint64() as Long); - break; + message.durationMs = longToNumber(reader.uint64() as Long) + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): AudioMessage { - const message = { ...baseAudioMessage } as AudioMessage; - message.payload = new Uint8Array(); + const message = { ...baseAudioMessage } as AudioMessage + message.payload = new Uint8Array() if (object.payload !== undefined && object.payload !== null) { - message.payload = bytesFromBase64(object.payload); + message.payload = bytesFromBase64(object.payload) } if (object.type !== undefined && object.type !== null) { - message.type = audioMessage_AudioTypeFromJSON(object.type); + message.type = audioMessage_AudioTypeFromJSON(object.type) } else { - message.type = 0; + message.type = 0 } if (object.durationMs !== undefined && object.durationMs !== null) { - message.durationMs = Number(object.durationMs); + message.durationMs = Number(object.durationMs) } else { - message.durationMs = 0; + message.durationMs = 0 } - return message; + return message }, toJSON(message: AudioMessage): unknown { - const obj: any = {}; + const obj: any = {} message.payload !== undefined && (obj.payload = base64FromBytes( message.payload !== undefined ? message.payload : new Uint8Array() - )); + )) message.type !== undefined && - (obj.type = audioMessage_AudioTypeToJSON(message.type)); - message.durationMs !== undefined && (obj.durationMs = message.durationMs); - return obj; + (obj.type = audioMessage_AudioTypeToJSON(message.type)) + message.durationMs !== undefined && (obj.durationMs = message.durationMs) + return obj }, fromPartial(object: DeepPartial): AudioMessage { - const message = { ...baseAudioMessage } as AudioMessage; + const message = { ...baseAudioMessage } as AudioMessage if (object.payload !== undefined && object.payload !== null) { - message.payload = object.payload; + message.payload = object.payload } else { - message.payload = new Uint8Array(); + message.payload = new Uint8Array() } if (object.type !== undefined && object.type !== null) { - message.type = object.type; + message.type = object.type } else { - message.type = 0; + message.type = 0 } if (object.durationMs !== undefined && object.durationMs !== null) { - message.durationMs = object.durationMs; + message.durationMs = object.durationMs } else { - message.durationMs = 0; + message.durationMs = 0 } - return message; + return message }, -}; +} const baseEditMessage: object = { clock: 0, - text: "", - chatId: "", - messageId: "", + text: '', + chatId: '', + messageId: '', messageType: 0, -}; +} export const EditMessage = { encode( @@ -480,151 +480,151 @@ export const EditMessage = { writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.clock !== 0) { - writer.uint32(8).uint64(message.clock); + writer.uint32(8).uint64(message.clock) } - if (message.text !== "") { - writer.uint32(18).string(message.text); + if (message.text !== '') { + writer.uint32(18).string(message.text) } - if (message.chatId !== "") { - writer.uint32(26).string(message.chatId); + if (message.chatId !== '') { + writer.uint32(26).string(message.chatId) } - if (message.messageId !== "") { - writer.uint32(34).string(message.messageId); + if (message.messageId !== '') { + writer.uint32(34).string(message.messageId) } if (message.grant.length !== 0) { - writer.uint32(42).bytes(message.grant); + writer.uint32(42).bytes(message.grant) } if (message.messageType !== 0) { - writer.uint32(48).int32(message.messageType); + writer.uint32(48).int32(message.messageType) } - return writer; + return writer }, decode(input: _m0.Reader | Uint8Array, length?: number): EditMessage { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEditMessage } as EditMessage; - message.grant = new Uint8Array(); + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = { ...baseEditMessage } as EditMessage + message.grant = new Uint8Array() while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.clock = longToNumber(reader.uint64() as Long); - break; + message.clock = longToNumber(reader.uint64() as Long) + break case 2: - message.text = reader.string(); - break; + message.text = reader.string() + break case 3: - message.chatId = reader.string(); - break; + message.chatId = reader.string() + break case 4: - message.messageId = reader.string(); - break; + message.messageId = reader.string() + break case 5: - message.grant = reader.bytes(); - break; + message.grant = reader.bytes() + break case 6: - message.messageType = reader.int32() as any; - break; + message.messageType = reader.int32() as any + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): EditMessage { - const message = { ...baseEditMessage } as EditMessage; - message.grant = new Uint8Array(); + const message = { ...baseEditMessage } as EditMessage + message.grant = new Uint8Array() if (object.clock !== undefined && object.clock !== null) { - message.clock = Number(object.clock); + message.clock = Number(object.clock) } else { - message.clock = 0; + message.clock = 0 } if (object.text !== undefined && object.text !== null) { - message.text = String(object.text); + message.text = String(object.text) } else { - message.text = ""; + message.text = '' } if (object.chatId !== undefined && object.chatId !== null) { - message.chatId = String(object.chatId); + message.chatId = String(object.chatId) } else { - message.chatId = ""; + message.chatId = '' } if (object.messageId !== undefined && object.messageId !== null) { - message.messageId = String(object.messageId); + message.messageId = String(object.messageId) } else { - message.messageId = ""; + message.messageId = '' } if (object.grant !== undefined && object.grant !== null) { - message.grant = bytesFromBase64(object.grant); + message.grant = bytesFromBase64(object.grant) } if (object.messageType !== undefined && object.messageType !== null) { - message.messageType = messageTypeFromJSON(object.messageType); + message.messageType = messageTypeFromJSON(object.messageType) } else { - message.messageType = 0; + message.messageType = 0 } - return message; + return message }, toJSON(message: EditMessage): unknown { - const obj: any = {}; - message.clock !== undefined && (obj.clock = message.clock); - message.text !== undefined && (obj.text = message.text); - message.chatId !== undefined && (obj.chatId = message.chatId); - message.messageId !== undefined && (obj.messageId = message.messageId); + const obj: any = {} + message.clock !== undefined && (obj.clock = message.clock) + message.text !== undefined && (obj.text = message.text) + message.chatId !== undefined && (obj.chatId = message.chatId) + message.messageId !== undefined && (obj.messageId = message.messageId) message.grant !== undefined && (obj.grant = base64FromBytes( message.grant !== undefined ? message.grant : new Uint8Array() - )); + )) message.messageType !== undefined && - (obj.messageType = messageTypeToJSON(message.messageType)); - return obj; + (obj.messageType = messageTypeToJSON(message.messageType)) + return obj }, fromPartial(object: DeepPartial): EditMessage { - const message = { ...baseEditMessage } as EditMessage; + const message = { ...baseEditMessage } as EditMessage if (object.clock !== undefined && object.clock !== null) { - message.clock = object.clock; + message.clock = object.clock } else { - message.clock = 0; + message.clock = 0 } if (object.text !== undefined && object.text !== null) { - message.text = object.text; + message.text = object.text } else { - message.text = ""; + message.text = '' } if (object.chatId !== undefined && object.chatId !== null) { - message.chatId = object.chatId; + message.chatId = object.chatId } else { - message.chatId = ""; + message.chatId = '' } if (object.messageId !== undefined && object.messageId !== null) { - message.messageId = object.messageId; + message.messageId = object.messageId } else { - message.messageId = ""; + message.messageId = '' } if (object.grant !== undefined && object.grant !== null) { - message.grant = object.grant; + message.grant = object.grant } else { - message.grant = new Uint8Array(); + message.grant = new Uint8Array() } if (object.messageType !== undefined && object.messageType !== null) { - message.messageType = object.messageType; + message.messageType = object.messageType } else { - message.messageType = 0; + message.messageType = 0 } - return message; + return message }, -}; +} const baseDeleteMessage: object = { clock: 0, - chatId: "", - messageId: "", + chatId: '', + messageId: '', messageType: 0, -}; +} export const DeleteMessage = { encode( @@ -632,138 +632,138 @@ export const DeleteMessage = { writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.clock !== 0) { - writer.uint32(8).uint64(message.clock); + writer.uint32(8).uint64(message.clock) } - if (message.chatId !== "") { - writer.uint32(18).string(message.chatId); + if (message.chatId !== '') { + writer.uint32(18).string(message.chatId) } - if (message.messageId !== "") { - writer.uint32(26).string(message.messageId); + if (message.messageId !== '') { + writer.uint32(26).string(message.messageId) } if (message.grant.length !== 0) { - writer.uint32(34).bytes(message.grant); + writer.uint32(34).bytes(message.grant) } if (message.messageType !== 0) { - writer.uint32(40).int32(message.messageType); + writer.uint32(40).int32(message.messageType) } - return writer; + return writer }, decode(input: _m0.Reader | Uint8Array, length?: number): DeleteMessage { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseDeleteMessage } as DeleteMessage; - message.grant = new Uint8Array(); + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = { ...baseDeleteMessage } as DeleteMessage + message.grant = new Uint8Array() while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.clock = longToNumber(reader.uint64() as Long); - break; + message.clock = longToNumber(reader.uint64() as Long) + break case 2: - message.chatId = reader.string(); - break; + message.chatId = reader.string() + break case 3: - message.messageId = reader.string(); - break; + message.messageId = reader.string() + break case 4: - message.grant = reader.bytes(); - break; + message.grant = reader.bytes() + break case 5: - message.messageType = reader.int32() as any; - break; + message.messageType = reader.int32() as any + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): DeleteMessage { - const message = { ...baseDeleteMessage } as DeleteMessage; - message.grant = new Uint8Array(); + const message = { ...baseDeleteMessage } as DeleteMessage + message.grant = new Uint8Array() if (object.clock !== undefined && object.clock !== null) { - message.clock = Number(object.clock); + message.clock = Number(object.clock) } else { - message.clock = 0; + message.clock = 0 } if (object.chatId !== undefined && object.chatId !== null) { - message.chatId = String(object.chatId); + message.chatId = String(object.chatId) } else { - message.chatId = ""; + message.chatId = '' } if (object.messageId !== undefined && object.messageId !== null) { - message.messageId = String(object.messageId); + message.messageId = String(object.messageId) } else { - message.messageId = ""; + message.messageId = '' } if (object.grant !== undefined && object.grant !== null) { - message.grant = bytesFromBase64(object.grant); + message.grant = bytesFromBase64(object.grant) } if (object.messageType !== undefined && object.messageType !== null) { - message.messageType = messageTypeFromJSON(object.messageType); + message.messageType = messageTypeFromJSON(object.messageType) } else { - message.messageType = 0; + message.messageType = 0 } - return message; + return message }, toJSON(message: DeleteMessage): unknown { - const obj: any = {}; - message.clock !== undefined && (obj.clock = message.clock); - message.chatId !== undefined && (obj.chatId = message.chatId); - message.messageId !== undefined && (obj.messageId = message.messageId); + const obj: any = {} + message.clock !== undefined && (obj.clock = message.clock) + message.chatId !== undefined && (obj.chatId = message.chatId) + message.messageId !== undefined && (obj.messageId = message.messageId) message.grant !== undefined && (obj.grant = base64FromBytes( message.grant !== undefined ? message.grant : new Uint8Array() - )); + )) message.messageType !== undefined && - (obj.messageType = messageTypeToJSON(message.messageType)); - return obj; + (obj.messageType = messageTypeToJSON(message.messageType)) + return obj }, fromPartial(object: DeepPartial): DeleteMessage { - const message = { ...baseDeleteMessage } as DeleteMessage; + const message = { ...baseDeleteMessage } as DeleteMessage if (object.clock !== undefined && object.clock !== null) { - message.clock = object.clock; + message.clock = object.clock } else { - message.clock = 0; + message.clock = 0 } if (object.chatId !== undefined && object.chatId !== null) { - message.chatId = object.chatId; + message.chatId = object.chatId } else { - message.chatId = ""; + message.chatId = '' } if (object.messageId !== undefined && object.messageId !== null) { - message.messageId = object.messageId; + message.messageId = object.messageId } else { - message.messageId = ""; + message.messageId = '' } if (object.grant !== undefined && object.grant !== null) { - message.grant = object.grant; + message.grant = object.grant } else { - message.grant = new Uint8Array(); + message.grant = new Uint8Array() } if (object.messageType !== undefined && object.messageType !== null) { - message.messageType = object.messageType; + message.messageType = object.messageType } else { - message.messageType = 0; + message.messageType = 0 } - return message; + return message }, -}; +} const baseChatMessage: object = { clock: 0, timestamp: 0, - text: "", - responseTo: "", - ensName: "", - chatId: "", + text: '', + responseTo: '', + ensName: '', + chatId: '', messageType: 0, contentType: 0, -}; +} export const ChatMessage = { encode( @@ -771,307 +771,307 @@ export const ChatMessage = { writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.clock !== 0) { - writer.uint32(8).uint64(message.clock); + writer.uint32(8).uint64(message.clock) } if (message.timestamp !== 0) { - writer.uint32(16).uint64(message.timestamp); + writer.uint32(16).uint64(message.timestamp) } - if (message.text !== "") { - writer.uint32(26).string(message.text); + if (message.text !== '') { + writer.uint32(26).string(message.text) } - if (message.responseTo !== "") { - writer.uint32(34).string(message.responseTo); + if (message.responseTo !== '') { + writer.uint32(34).string(message.responseTo) } - if (message.ensName !== "") { - writer.uint32(42).string(message.ensName); + if (message.ensName !== '') { + writer.uint32(42).string(message.ensName) } - if (message.chatId !== "") { - writer.uint32(50).string(message.chatId); + if (message.chatId !== '') { + writer.uint32(50).string(message.chatId) } if (message.messageType !== 0) { - writer.uint32(56).int32(message.messageType); + writer.uint32(56).int32(message.messageType) } if (message.contentType !== 0) { - writer.uint32(64).int32(message.contentType); + writer.uint32(64).int32(message.contentType) } if (message.sticker !== undefined) { - StickerMessage.encode(message.sticker, writer.uint32(74).fork()).ldelim(); + StickerMessage.encode(message.sticker, writer.uint32(74).fork()).ldelim() } if (message.image !== undefined) { - ImageMessage.encode(message.image, writer.uint32(82).fork()).ldelim(); + ImageMessage.encode(message.image, writer.uint32(82).fork()).ldelim() } if (message.audio !== undefined) { - AudioMessage.encode(message.audio, writer.uint32(90).fork()).ldelim(); + AudioMessage.encode(message.audio, writer.uint32(90).fork()).ldelim() } if (message.community !== undefined) { - writer.uint32(98).bytes(message.community); + writer.uint32(98).bytes(message.community) } if (message.grant !== undefined) { - writer.uint32(106).bytes(message.grant); + writer.uint32(106).bytes(message.grant) } - return writer; + return writer }, decode(input: _m0.Reader | Uint8Array, length?: number): ChatMessage { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseChatMessage } as ChatMessage; + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = { ...baseChatMessage } as ChatMessage while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.clock = longToNumber(reader.uint64() as Long); - break; + message.clock = longToNumber(reader.uint64() as Long) + break case 2: - message.timestamp = longToNumber(reader.uint64() as Long); - break; + message.timestamp = longToNumber(reader.uint64() as Long) + break case 3: - message.text = reader.string(); - break; + message.text = reader.string() + break case 4: - message.responseTo = reader.string(); - break; + message.responseTo = reader.string() + break case 5: - message.ensName = reader.string(); - break; + message.ensName = reader.string() + break case 6: - message.chatId = reader.string(); - break; + message.chatId = reader.string() + break case 7: - message.messageType = reader.int32() as any; - break; + message.messageType = reader.int32() as any + break case 8: - message.contentType = reader.int32() as any; - break; + message.contentType = reader.int32() as any + break case 9: - message.sticker = StickerMessage.decode(reader, reader.uint32()); - break; + message.sticker = StickerMessage.decode(reader, reader.uint32()) + break case 10: - message.image = ImageMessage.decode(reader, reader.uint32()); - break; + message.image = ImageMessage.decode(reader, reader.uint32()) + break case 11: - message.audio = AudioMessage.decode(reader, reader.uint32()); - break; + message.audio = AudioMessage.decode(reader, reader.uint32()) + break case 12: - message.community = reader.bytes(); - break; + message.community = reader.bytes() + break case 13: - message.grant = reader.bytes(); - break; + message.grant = reader.bytes() + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): ChatMessage { - const message = { ...baseChatMessage } as ChatMessage; + const message = { ...baseChatMessage } as ChatMessage if (object.clock !== undefined && object.clock !== null) { - message.clock = Number(object.clock); + message.clock = Number(object.clock) } else { - message.clock = 0; + message.clock = 0 } if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = Number(object.timestamp); + message.timestamp = Number(object.timestamp) } else { - message.timestamp = 0; + message.timestamp = 0 } if (object.text !== undefined && object.text !== null) { - message.text = String(object.text); + message.text = String(object.text) } else { - message.text = ""; + message.text = '' } if (object.responseTo !== undefined && object.responseTo !== null) { - message.responseTo = String(object.responseTo); + message.responseTo = String(object.responseTo) } else { - message.responseTo = ""; + message.responseTo = '' } if (object.ensName !== undefined && object.ensName !== null) { - message.ensName = String(object.ensName); + message.ensName = String(object.ensName) } else { - message.ensName = ""; + message.ensName = '' } if (object.chatId !== undefined && object.chatId !== null) { - message.chatId = String(object.chatId); + message.chatId = String(object.chatId) } else { - message.chatId = ""; + message.chatId = '' } if (object.messageType !== undefined && object.messageType !== null) { - message.messageType = messageTypeFromJSON(object.messageType); + message.messageType = messageTypeFromJSON(object.messageType) } else { - message.messageType = 0; + message.messageType = 0 } if (object.contentType !== undefined && object.contentType !== null) { - message.contentType = chatMessage_ContentTypeFromJSON(object.contentType); + message.contentType = chatMessage_ContentTypeFromJSON(object.contentType) } else { - message.contentType = 0; + message.contentType = 0 } if (object.sticker !== undefined && object.sticker !== null) { - message.sticker = StickerMessage.fromJSON(object.sticker); + message.sticker = StickerMessage.fromJSON(object.sticker) } else { - message.sticker = undefined; + message.sticker = undefined } if (object.image !== undefined && object.image !== null) { - message.image = ImageMessage.fromJSON(object.image); + message.image = ImageMessage.fromJSON(object.image) } else { - message.image = undefined; + message.image = undefined } if (object.audio !== undefined && object.audio !== null) { - message.audio = AudioMessage.fromJSON(object.audio); + message.audio = AudioMessage.fromJSON(object.audio) } else { - message.audio = undefined; + message.audio = undefined } if (object.community !== undefined && object.community !== null) { - message.community = bytesFromBase64(object.community); + message.community = bytesFromBase64(object.community) } if (object.grant !== undefined && object.grant !== null) { - message.grant = bytesFromBase64(object.grant); + message.grant = bytesFromBase64(object.grant) } - return message; + return message }, toJSON(message: ChatMessage): unknown { - const obj: any = {}; - message.clock !== undefined && (obj.clock = message.clock); - message.timestamp !== undefined && (obj.timestamp = message.timestamp); - message.text !== undefined && (obj.text = message.text); - message.responseTo !== undefined && (obj.responseTo = message.responseTo); - message.ensName !== undefined && (obj.ensName = message.ensName); - message.chatId !== undefined && (obj.chatId = message.chatId); + const obj: any = {} + message.clock !== undefined && (obj.clock = message.clock) + message.timestamp !== undefined && (obj.timestamp = message.timestamp) + message.text !== undefined && (obj.text = message.text) + message.responseTo !== undefined && (obj.responseTo = message.responseTo) + message.ensName !== undefined && (obj.ensName = message.ensName) + message.chatId !== undefined && (obj.chatId = message.chatId) message.messageType !== undefined && - (obj.messageType = messageTypeToJSON(message.messageType)); + (obj.messageType = messageTypeToJSON(message.messageType)) message.contentType !== undefined && - (obj.contentType = chatMessage_ContentTypeToJSON(message.contentType)); + (obj.contentType = chatMessage_ContentTypeToJSON(message.contentType)) message.sticker !== undefined && (obj.sticker = message.sticker ? StickerMessage.toJSON(message.sticker) - : undefined); + : undefined) message.image !== undefined && (obj.image = message.image ? ImageMessage.toJSON(message.image) - : undefined); + : undefined) message.audio !== undefined && (obj.audio = message.audio ? AudioMessage.toJSON(message.audio) - : undefined); + : undefined) message.community !== undefined && (obj.community = message.community !== undefined ? base64FromBytes(message.community) - : undefined); + : undefined) message.grant !== undefined && (obj.grant = message.grant !== undefined ? base64FromBytes(message.grant) - : undefined); - return obj; + : undefined) + return obj }, fromPartial(object: DeepPartial): ChatMessage { - const message = { ...baseChatMessage } as ChatMessage; + const message = { ...baseChatMessage } as ChatMessage if (object.clock !== undefined && object.clock !== null) { - message.clock = object.clock; + message.clock = object.clock } else { - message.clock = 0; + message.clock = 0 } if (object.timestamp !== undefined && object.timestamp !== null) { - message.timestamp = object.timestamp; + message.timestamp = object.timestamp } else { - message.timestamp = 0; + message.timestamp = 0 } if (object.text !== undefined && object.text !== null) { - message.text = object.text; + message.text = object.text } else { - message.text = ""; + message.text = '' } if (object.responseTo !== undefined && object.responseTo !== null) { - message.responseTo = object.responseTo; + message.responseTo = object.responseTo } else { - message.responseTo = ""; + message.responseTo = '' } if (object.ensName !== undefined && object.ensName !== null) { - message.ensName = object.ensName; + message.ensName = object.ensName } else { - message.ensName = ""; + message.ensName = '' } if (object.chatId !== undefined && object.chatId !== null) { - message.chatId = object.chatId; + message.chatId = object.chatId } else { - message.chatId = ""; + message.chatId = '' } if (object.messageType !== undefined && object.messageType !== null) { - message.messageType = object.messageType; + message.messageType = object.messageType } else { - message.messageType = 0; + message.messageType = 0 } if (object.contentType !== undefined && object.contentType !== null) { - message.contentType = object.contentType; + message.contentType = object.contentType } else { - message.contentType = 0; + message.contentType = 0 } if (object.sticker !== undefined && object.sticker !== null) { - message.sticker = StickerMessage.fromPartial(object.sticker); + message.sticker = StickerMessage.fromPartial(object.sticker) } else { - message.sticker = undefined; + message.sticker = undefined } if (object.image !== undefined && object.image !== null) { - message.image = ImageMessage.fromPartial(object.image); + message.image = ImageMessage.fromPartial(object.image) } else { - message.image = undefined; + message.image = undefined } if (object.audio !== undefined && object.audio !== null) { - message.audio = AudioMessage.fromPartial(object.audio); + message.audio = AudioMessage.fromPartial(object.audio) } else { - message.audio = undefined; + message.audio = undefined } if (object.community !== undefined && object.community !== null) { - message.community = object.community; + message.community = object.community } else { - message.community = undefined; + message.community = undefined } if (object.grant !== undefined && object.grant !== null) { - message.grant = object.grant; + message.grant = object.grant } else { - message.grant = undefined; + message.grant = undefined } - return message; + return message }, -}; +} -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: any | undefined; +declare var self: any | undefined +declare var window: any | undefined +declare var global: any | undefined var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); + if (typeof globalThis !== 'undefined') return globalThis + if (typeof self !== 'undefined') return self + if (typeof window !== 'undefined') return window + if (typeof global !== 'undefined') return global + throw 'Unable to locate global object' +})() const atob: (b64: string) => string = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); + (b64 => globalThis.Buffer.from(b64, 'base64').toString('binary')) function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); + const bin = atob(b64) + const arr = new Uint8Array(bin.length) for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); + arr[i] = bin.charCodeAt(i) } - return arr; + return arr } const btoa: (bin: string) => string = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); + (bin => globalThis.Buffer.from(bin, 'binary').toString('base64')) function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; + const bin: string[] = [] for (const byte of arr) { - bin.push(String.fromCharCode(byte)); + bin.push(String.fromCharCode(byte)) } - return btoa(bin.join("")); + return btoa(bin.join('')) } type Builtin = @@ -1081,7 +1081,7 @@ type Builtin = | string | number | boolean - | undefined; + | undefined export type DeepPartial = T extends Builtin ? T : T extends Array @@ -1090,16 +1090,16 @@ export type DeepPartial = T extends Builtin ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; + : Partial function longToNumber(long: Long): number { if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + throw new globalThis.Error('Value is larger than Number.MAX_SAFE_INTEGER') } - return long.toNumber(); + return long.toNumber() } if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); + _m0.util.Long = Long as any + _m0.configure() } diff --git a/packages/status-core/src/proto/communities/v1/communities.ts b/packages/status-core/src/proto/communities/v1/communities.ts index aabe78ec..f96d34fb 100644 --- a/packages/status-core/src/proto/communities/v1/communities.ts +++ b/packages/status-core/src/proto/communities/v1/communities.ts @@ -1,19 +1,19 @@ /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { ChatIdentity } from "../../communities/v1/chat_identity"; +import Long from 'long' +import _m0 from 'protobufjs/minimal' +import { ChatIdentity } from '../../communities/v1/chat_identity' -export const protobufPackage = "communities.v1"; +export const protobufPackage = 'communities.v1' export interface Grant { - communityId: Uint8Array; - memberId: Uint8Array; - chatId: string; - clock: number; + communityId: Uint8Array + memberId: Uint8Array + chatId: string + clock: number } export interface CommunityMember { - roles: CommunityMember_Roles[]; + roles: CommunityMember_Roles[] } export enum CommunityMember_Roles { @@ -28,18 +28,18 @@ export function communityMember_RolesFromJSON( ): CommunityMember_Roles { switch (object) { case 0: - case "UNKNOWN_ROLE": - return CommunityMember_Roles.UNKNOWN_ROLE; + case 'UNKNOWN_ROLE': + return CommunityMember_Roles.UNKNOWN_ROLE case 1: - case "ROLE_ALL": - return CommunityMember_Roles.ROLE_ALL; + case 'ROLE_ALL': + return CommunityMember_Roles.ROLE_ALL case 2: - case "ROLE_MANAGE_USERS": - return CommunityMember_Roles.ROLE_MANAGE_USERS; + case 'ROLE_MANAGE_USERS': + return CommunityMember_Roles.ROLE_MANAGE_USERS case -1: - case "UNRECOGNIZED": + case 'UNRECOGNIZED': default: - return CommunityMember_Roles.UNRECOGNIZED; + return CommunityMember_Roles.UNRECOGNIZED } } @@ -48,21 +48,21 @@ export function communityMember_RolesToJSON( ): string { switch (object) { case CommunityMember_Roles.UNKNOWN_ROLE: - return "UNKNOWN_ROLE"; + return 'UNKNOWN_ROLE' case CommunityMember_Roles.ROLE_ALL: - return "ROLE_ALL"; + return 'ROLE_ALL' case CommunityMember_Roles.ROLE_MANAGE_USERS: - return "ROLE_MANAGE_USERS"; + return 'ROLE_MANAGE_USERS' default: - return "UNKNOWN"; + return 'UNKNOWN' } } export interface CommunityPermissions { - ensOnly: boolean; + ensOnly: boolean /** https://gitlab.matrix.org/matrix-org/olm/blob/master/docs/megolm.md is a candidate for the algorithm to be used in case we want to have private communityal chats, lighter than pairwise encryption using the DR, less secure, but more efficient for large number of participants */ - private: boolean; - access: CommunityPermissions_Access; + private: boolean + access: CommunityPermissions_Access } export enum CommunityPermissions_Access { @@ -78,21 +78,21 @@ export function communityPermissions_AccessFromJSON( ): CommunityPermissions_Access { switch (object) { case 0: - case "UNKNOWN_ACCESS": - return CommunityPermissions_Access.UNKNOWN_ACCESS; + case 'UNKNOWN_ACCESS': + return CommunityPermissions_Access.UNKNOWN_ACCESS case 1: - case "NO_MEMBERSHIP": - return CommunityPermissions_Access.NO_MEMBERSHIP; + case 'NO_MEMBERSHIP': + return CommunityPermissions_Access.NO_MEMBERSHIP case 2: - case "INVITATION_ONLY": - return CommunityPermissions_Access.INVITATION_ONLY; + case 'INVITATION_ONLY': + return CommunityPermissions_Access.INVITATION_ONLY case 3: - case "ON_REQUEST": - return CommunityPermissions_Access.ON_REQUEST; + case 'ON_REQUEST': + return CommunityPermissions_Access.ON_REQUEST case -1: - case "UNRECOGNIZED": + case 'UNRECOGNIZED': default: - return CommunityPermissions_Access.UNRECOGNIZED; + return CommunityPermissions_Access.UNRECOGNIZED } } @@ -101,276 +101,276 @@ export function communityPermissions_AccessToJSON( ): string { switch (object) { case CommunityPermissions_Access.UNKNOWN_ACCESS: - return "UNKNOWN_ACCESS"; + return 'UNKNOWN_ACCESS' case CommunityPermissions_Access.NO_MEMBERSHIP: - return "NO_MEMBERSHIP"; + return 'NO_MEMBERSHIP' case CommunityPermissions_Access.INVITATION_ONLY: - return "INVITATION_ONLY"; + return 'INVITATION_ONLY' case CommunityPermissions_Access.ON_REQUEST: - return "ON_REQUEST"; + return 'ON_REQUEST' default: - return "UNKNOWN"; + return 'UNKNOWN' } } export interface CommunityDescription { - clock: number; - members: { [key: string]: CommunityMember }; - permissions: CommunityPermissions | undefined; - identity: ChatIdentity | undefined; - chats: { [key: string]: CommunityChat }; - banList: string[]; - categories: { [key: string]: CommunityCategory }; + clock: number + members: { [key: string]: CommunityMember } + permissions: CommunityPermissions | undefined + identity: ChatIdentity | undefined + chats: { [key: string]: CommunityChat } + banList: string[] + categories: { [key: string]: CommunityCategory } } export interface CommunityDescription_MembersEntry { - key: string; - value: CommunityMember | undefined; + key: string + value: CommunityMember | undefined } export interface CommunityDescription_ChatsEntry { - key: string; - value: CommunityChat | undefined; + key: string + value: CommunityChat | undefined } export interface CommunityDescription_CategoriesEntry { - key: string; - value: CommunityCategory | undefined; + key: string + value: CommunityCategory | undefined } export interface CommunityChat { - members: { [key: string]: CommunityMember }; - permissions: CommunityPermissions | undefined; - identity: ChatIdentity | undefined; - categoryId: string; - position: number; + members: { [key: string]: CommunityMember } + permissions: CommunityPermissions | undefined + identity: ChatIdentity | undefined + categoryId: string + position: number } export interface CommunityChat_MembersEntry { - key: string; - value: CommunityMember | undefined; + key: string + value: CommunityMember | undefined } export interface CommunityCategory { - categoryId: string; - name: string; - position: number; + categoryId: string + name: string + position: number } export interface CommunityInvitation { - communityDescription: Uint8Array; - grant: Uint8Array; - chatId: string; - publicKey: Uint8Array; + communityDescription: Uint8Array + grant: Uint8Array + chatId: string + publicKey: Uint8Array } export interface CommunityRequestToJoin { - clock: number; - ensName: string; - chatId: string; - communityId: Uint8Array; + clock: number + ensName: string + chatId: string + communityId: Uint8Array } export interface CommunityRequestToJoinResponse { - clock: number; - community: CommunityDescription | undefined; - accepted: boolean; - grant: Uint8Array; + clock: number + community: CommunityDescription | undefined + accepted: boolean + grant: Uint8Array } -const baseGrant: object = { chatId: "", clock: 0 }; +const baseGrant: object = { chatId: '', clock: 0 } export const Grant = { encode(message: Grant, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.communityId.length !== 0) { - writer.uint32(10).bytes(message.communityId); + writer.uint32(10).bytes(message.communityId) } if (message.memberId.length !== 0) { - writer.uint32(18).bytes(message.memberId); + writer.uint32(18).bytes(message.memberId) } - if (message.chatId !== "") { - writer.uint32(26).string(message.chatId); + if (message.chatId !== '') { + writer.uint32(26).string(message.chatId) } if (message.clock !== 0) { - writer.uint32(32).uint64(message.clock); + writer.uint32(32).uint64(message.clock) } - return writer; + return writer }, decode(input: _m0.Reader | Uint8Array, length?: number): Grant { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGrant } as Grant; - message.communityId = new Uint8Array(); - message.memberId = new Uint8Array(); + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = { ...baseGrant } as Grant + message.communityId = new Uint8Array() + message.memberId = new Uint8Array() while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.communityId = reader.bytes(); - break; + message.communityId = reader.bytes() + break case 2: - message.memberId = reader.bytes(); - break; + message.memberId = reader.bytes() + break case 3: - message.chatId = reader.string(); - break; + message.chatId = reader.string() + break case 4: - message.clock = longToNumber(reader.uint64() as Long); - break; + message.clock = longToNumber(reader.uint64() as Long) + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): Grant { - const message = { ...baseGrant } as Grant; - message.communityId = new Uint8Array(); - message.memberId = new Uint8Array(); + const message = { ...baseGrant } as Grant + message.communityId = new Uint8Array() + message.memberId = new Uint8Array() if (object.communityId !== undefined && object.communityId !== null) { - message.communityId = bytesFromBase64(object.communityId); + message.communityId = bytesFromBase64(object.communityId) } if (object.memberId !== undefined && object.memberId !== null) { - message.memberId = bytesFromBase64(object.memberId); + message.memberId = bytesFromBase64(object.memberId) } if (object.chatId !== undefined && object.chatId !== null) { - message.chatId = String(object.chatId); + message.chatId = String(object.chatId) } else { - message.chatId = ""; + message.chatId = '' } if (object.clock !== undefined && object.clock !== null) { - message.clock = Number(object.clock); + message.clock = Number(object.clock) } else { - message.clock = 0; + message.clock = 0 } - return message; + return message }, toJSON(message: Grant): unknown { - const obj: any = {}; + const obj: any = {} message.communityId !== undefined && (obj.communityId = base64FromBytes( message.communityId !== undefined ? message.communityId : new Uint8Array() - )); + )) message.memberId !== undefined && (obj.memberId = base64FromBytes( message.memberId !== undefined ? message.memberId : new Uint8Array() - )); - message.chatId !== undefined && (obj.chatId = message.chatId); - message.clock !== undefined && (obj.clock = message.clock); - return obj; + )) + message.chatId !== undefined && (obj.chatId = message.chatId) + message.clock !== undefined && (obj.clock = message.clock) + return obj }, fromPartial(object: DeepPartial): Grant { - const message = { ...baseGrant } as Grant; + const message = { ...baseGrant } as Grant if (object.communityId !== undefined && object.communityId !== null) { - message.communityId = object.communityId; + message.communityId = object.communityId } else { - message.communityId = new Uint8Array(); + message.communityId = new Uint8Array() } if (object.memberId !== undefined && object.memberId !== null) { - message.memberId = object.memberId; + message.memberId = object.memberId } else { - message.memberId = new Uint8Array(); + message.memberId = new Uint8Array() } if (object.chatId !== undefined && object.chatId !== null) { - message.chatId = object.chatId; + message.chatId = object.chatId } else { - message.chatId = ""; + message.chatId = '' } if (object.clock !== undefined && object.clock !== null) { - message.clock = object.clock; + message.clock = object.clock } else { - message.clock = 0; + message.clock = 0 } - return message; + return message }, -}; +} -const baseCommunityMember: object = { roles: 0 }; +const baseCommunityMember: object = { roles: 0 } export const CommunityMember = { encode( message: CommunityMember, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - writer.uint32(10).fork(); + writer.uint32(10).fork() for (const v of message.roles) { - writer.int32(v); + writer.int32(v) } - writer.ldelim(); - return writer; + writer.ldelim() + return writer }, decode(input: _m0.Reader | Uint8Array, length?: number): CommunityMember { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommunityMember } as CommunityMember; - message.roles = []; + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = { ...baseCommunityMember } as CommunityMember + message.roles = [] while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; + const end2 = reader.uint32() + reader.pos while (reader.pos < end2) { - message.roles.push(reader.int32() as any); + message.roles.push(reader.int32() as any) } } else { - message.roles.push(reader.int32() as any); + message.roles.push(reader.int32() as any) } - break; + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): CommunityMember { - const message = { ...baseCommunityMember } as CommunityMember; - message.roles = []; + const message = { ...baseCommunityMember } as CommunityMember + message.roles = [] if (object.roles !== undefined && object.roles !== null) { for (const e of object.roles) { - message.roles.push(communityMember_RolesFromJSON(e)); + message.roles.push(communityMember_RolesFromJSON(e)) } } - return message; + return message }, toJSON(message: CommunityMember): unknown { - const obj: any = {}; + const obj: any = {} if (message.roles) { - obj.roles = message.roles.map((e) => communityMember_RolesToJSON(e)); + obj.roles = message.roles.map(e => communityMember_RolesToJSON(e)) } else { - obj.roles = []; + obj.roles = [] } - return obj; + return obj }, fromPartial(object: DeepPartial): CommunityMember { - const message = { ...baseCommunityMember } as CommunityMember; - message.roles = []; + const message = { ...baseCommunityMember } as CommunityMember + message.roles = [] if (object.roles !== undefined && object.roles !== null) { for (const e of object.roles) { - message.roles.push(e); + message.roles.push(e) } } - return message; + return message }, -}; +} const baseCommunityPermissions: object = { ensOnly: false, private: false, access: 0, -}; +} export const CommunityPermissions = { encode( @@ -378,95 +378,95 @@ export const CommunityPermissions = { writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.ensOnly === true) { - writer.uint32(8).bool(message.ensOnly); + writer.uint32(8).bool(message.ensOnly) } if (message.private === true) { - writer.uint32(16).bool(message.private); + writer.uint32(16).bool(message.private) } if (message.access !== 0) { - writer.uint32(24).int32(message.access); + writer.uint32(24).int32(message.access) } - return writer; + return writer }, decode( input: _m0.Reader | Uint8Array, length?: number ): CommunityPermissions { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommunityPermissions } as CommunityPermissions; + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = { ...baseCommunityPermissions } as CommunityPermissions while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.ensOnly = reader.bool(); - break; + message.ensOnly = reader.bool() + break case 2: - message.private = reader.bool(); - break; + message.private = reader.bool() + break case 3: - message.access = reader.int32() as any; - break; + message.access = reader.int32() as any + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): CommunityPermissions { - const message = { ...baseCommunityPermissions } as CommunityPermissions; + const message = { ...baseCommunityPermissions } as CommunityPermissions if (object.ensOnly !== undefined && object.ensOnly !== null) { - message.ensOnly = Boolean(object.ensOnly); + message.ensOnly = Boolean(object.ensOnly) } else { - message.ensOnly = false; + message.ensOnly = false } if (object.private !== undefined && object.private !== null) { - message.private = Boolean(object.private); + message.private = Boolean(object.private) } else { - message.private = false; + message.private = false } if (object.access !== undefined && object.access !== null) { - message.access = communityPermissions_AccessFromJSON(object.access); + message.access = communityPermissions_AccessFromJSON(object.access) } else { - message.access = 0; + message.access = 0 } - return message; + return message }, toJSON(message: CommunityPermissions): unknown { - const obj: any = {}; - message.ensOnly !== undefined && (obj.ensOnly = message.ensOnly); - message.private !== undefined && (obj.private = message.private); + const obj: any = {} + message.ensOnly !== undefined && (obj.ensOnly = message.ensOnly) + message.private !== undefined && (obj.private = message.private) message.access !== undefined && - (obj.access = communityPermissions_AccessToJSON(message.access)); - return obj; + (obj.access = communityPermissions_AccessToJSON(message.access)) + return obj }, fromPartial(object: DeepPartial): CommunityPermissions { - const message = { ...baseCommunityPermissions } as CommunityPermissions; + const message = { ...baseCommunityPermissions } as CommunityPermissions if (object.ensOnly !== undefined && object.ensOnly !== null) { - message.ensOnly = object.ensOnly; + message.ensOnly = object.ensOnly } else { - message.ensOnly = false; + message.ensOnly = false } if (object.private !== undefined && object.private !== null) { - message.private = object.private; + message.private = object.private } else { - message.private = false; + message.private = false } if (object.access !== undefined && object.access !== null) { - message.access = object.access; + message.access = object.access } else { - message.access = 0; + message.access = 0 } - return message; + return message }, -}; +} -const baseCommunityDescription: object = { clock: 0, banList: "" }; +const baseCommunityDescription: object = { clock: 0, banList: '' } export const CommunityDescription = { encode( @@ -474,306 +474,304 @@ export const CommunityDescription = { writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.clock !== 0) { - writer.uint32(8).uint64(message.clock); + writer.uint32(8).uint64(message.clock) } Object.entries(message.members).forEach(([key, value]) => { CommunityDescription_MembersEntry.encode( { key: key as any, value }, writer.uint32(18).fork() - ).ldelim(); - }); + ).ldelim() + }) if (message.permissions !== undefined) { CommunityPermissions.encode( message.permissions, writer.uint32(26).fork() - ).ldelim(); + ).ldelim() } if (message.identity !== undefined) { - ChatIdentity.encode(message.identity, writer.uint32(42).fork()).ldelim(); + ChatIdentity.encode(message.identity, writer.uint32(42).fork()).ldelim() } Object.entries(message.chats).forEach(([key, value]) => { CommunityDescription_ChatsEntry.encode( { key: key as any, value }, writer.uint32(50).fork() - ).ldelim(); - }); + ).ldelim() + }) for (const v of message.banList) { - writer.uint32(58).string(v!); + writer.uint32(58).string(v!) } Object.entries(message.categories).forEach(([key, value]) => { CommunityDescription_CategoriesEntry.encode( { key: key as any, value }, writer.uint32(66).fork() - ).ldelim(); - }); - return writer; + ).ldelim() + }) + return writer }, decode( input: _m0.Reader | Uint8Array, length?: number ): CommunityDescription { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommunityDescription } as CommunityDescription; - message.members = {}; - message.chats = {}; - message.banList = []; - message.categories = {}; + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = { ...baseCommunityDescription } as CommunityDescription + message.members = {} + message.chats = {} + message.banList = [] + message.categories = {} while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.clock = longToNumber(reader.uint64() as Long); - break; + message.clock = longToNumber(reader.uint64() as Long) + break case 2: const entry2 = CommunityDescription_MembersEntry.decode( reader, reader.uint32() - ); + ) if (entry2.value !== undefined) { - message.members[entry2.key] = entry2.value; + message.members[entry2.key] = entry2.value } - break; + break case 3: message.permissions = CommunityPermissions.decode( reader, reader.uint32() - ); - break; + ) + break case 5: - message.identity = ChatIdentity.decode(reader, reader.uint32()); - break; + message.identity = ChatIdentity.decode(reader, reader.uint32()) + break case 6: const entry6 = CommunityDescription_ChatsEntry.decode( reader, reader.uint32() - ); + ) if (entry6.value !== undefined) { - message.chats[entry6.key] = entry6.value; + message.chats[entry6.key] = entry6.value } - break; + break case 7: - message.banList.push(reader.string()); - break; + message.banList.push(reader.string()) + break case 8: const entry8 = CommunityDescription_CategoriesEntry.decode( reader, reader.uint32() - ); + ) if (entry8.value !== undefined) { - message.categories[entry8.key] = entry8.value; + message.categories[entry8.key] = entry8.value } - break; + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): CommunityDescription { - const message = { ...baseCommunityDescription } as CommunityDescription; - message.members = {}; - message.chats = {}; - message.banList = []; - message.categories = {}; + const message = { ...baseCommunityDescription } as CommunityDescription + message.members = {} + message.chats = {} + message.banList = [] + message.categories = {} if (object.clock !== undefined && object.clock !== null) { - message.clock = Number(object.clock); + message.clock = Number(object.clock) } else { - message.clock = 0; + message.clock = 0 } if (object.members !== undefined && object.members !== null) { Object.entries(object.members).forEach(([key, value]) => { - message.members[key] = CommunityMember.fromJSON(value); - }); + message.members[key] = CommunityMember.fromJSON(value) + }) } if (object.permissions !== undefined && object.permissions !== null) { - message.permissions = CommunityPermissions.fromJSON(object.permissions); + message.permissions = CommunityPermissions.fromJSON(object.permissions) } else { - message.permissions = undefined; + message.permissions = undefined } if (object.identity !== undefined && object.identity !== null) { - message.identity = ChatIdentity.fromJSON(object.identity); + message.identity = ChatIdentity.fromJSON(object.identity) } else { - message.identity = undefined; + message.identity = undefined } if (object.chats !== undefined && object.chats !== null) { Object.entries(object.chats).forEach(([key, value]) => { - message.chats[key] = CommunityChat.fromJSON(value); - }); + message.chats[key] = CommunityChat.fromJSON(value) + }) } if (object.banList !== undefined && object.banList !== null) { for (const e of object.banList) { - message.banList.push(String(e)); + message.banList.push(String(e)) } } if (object.categories !== undefined && object.categories !== null) { Object.entries(object.categories).forEach(([key, value]) => { - message.categories[key] = CommunityCategory.fromJSON(value); - }); + message.categories[key] = CommunityCategory.fromJSON(value) + }) } - return message; + return message }, toJSON(message: CommunityDescription): unknown { - const obj: any = {}; - message.clock !== undefined && (obj.clock = message.clock); - obj.members = {}; + const obj: any = {} + message.clock !== undefined && (obj.clock = message.clock) + obj.members = {} if (message.members) { Object.entries(message.members).forEach(([k, v]) => { - obj.members[k] = CommunityMember.toJSON(v); - }); + obj.members[k] = CommunityMember.toJSON(v) + }) } message.permissions !== undefined && (obj.permissions = message.permissions ? CommunityPermissions.toJSON(message.permissions) - : undefined); + : undefined) message.identity !== undefined && (obj.identity = message.identity ? ChatIdentity.toJSON(message.identity) - : undefined); - obj.chats = {}; + : undefined) + obj.chats = {} if (message.chats) { Object.entries(message.chats).forEach(([k, v]) => { - obj.chats[k] = CommunityChat.toJSON(v); - }); + obj.chats[k] = CommunityChat.toJSON(v) + }) } if (message.banList) { - obj.banList = message.banList.map((e) => e); + obj.banList = message.banList.map(e => e) } else { - obj.banList = []; + obj.banList = [] } - obj.categories = {}; + obj.categories = {} if (message.categories) { Object.entries(message.categories).forEach(([k, v]) => { - obj.categories[k] = CommunityCategory.toJSON(v); - }); + obj.categories[k] = CommunityCategory.toJSON(v) + }) } - return obj; + return obj }, fromPartial(object: DeepPartial): CommunityDescription { - const message = { ...baseCommunityDescription } as CommunityDescription; - message.members = {}; - message.chats = {}; - message.banList = []; - message.categories = {}; + const message = { ...baseCommunityDescription } as CommunityDescription + message.members = {} + message.chats = {} + message.banList = [] + message.categories = {} if (object.clock !== undefined && object.clock !== null) { - message.clock = object.clock; + message.clock = object.clock } else { - message.clock = 0; + message.clock = 0 } if (object.members !== undefined && object.members !== null) { Object.entries(object.members).forEach(([key, value]) => { if (value !== undefined) { - message.members[key] = CommunityMember.fromPartial(value); + message.members[key] = CommunityMember.fromPartial(value) } - }); + }) } if (object.permissions !== undefined && object.permissions !== null) { - message.permissions = CommunityPermissions.fromPartial( - object.permissions - ); + message.permissions = CommunityPermissions.fromPartial(object.permissions) } else { - message.permissions = undefined; + message.permissions = undefined } if (object.identity !== undefined && object.identity !== null) { - message.identity = ChatIdentity.fromPartial(object.identity); + message.identity = ChatIdentity.fromPartial(object.identity) } else { - message.identity = undefined; + message.identity = undefined } if (object.chats !== undefined && object.chats !== null) { Object.entries(object.chats).forEach(([key, value]) => { if (value !== undefined) { - message.chats[key] = CommunityChat.fromPartial(value); + message.chats[key] = CommunityChat.fromPartial(value) } - }); + }) } if (object.banList !== undefined && object.banList !== null) { for (const e of object.banList) { - message.banList.push(e); + message.banList.push(e) } } if (object.categories !== undefined && object.categories !== null) { Object.entries(object.categories).forEach(([key, value]) => { if (value !== undefined) { - message.categories[key] = CommunityCategory.fromPartial(value); + message.categories[key] = CommunityCategory.fromPartial(value) } - }); + }) } - return message; + return message }, -}; +} -const baseCommunityDescription_MembersEntry: object = { key: "" }; +const baseCommunityDescription_MembersEntry: object = { key: '' } export const CommunityDescription_MembersEntry = { encode( message: CommunityDescription_MembersEntry, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); + if (message.key !== '') { + writer.uint32(10).string(message.key) } if (message.value !== undefined) { - CommunityMember.encode(message.value, writer.uint32(18).fork()).ldelim(); + CommunityMember.encode(message.value, writer.uint32(18).fork()).ldelim() } - return writer; + return writer }, decode( input: _m0.Reader | Uint8Array, length?: number ): CommunityDescription_MembersEntry { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length const message = { ...baseCommunityDescription_MembersEntry, - } as CommunityDescription_MembersEntry; + } as CommunityDescription_MembersEntry while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.key = reader.string(); - break; + message.key = reader.string() + break case 2: - message.value = CommunityMember.decode(reader, reader.uint32()); - break; + message.value = CommunityMember.decode(reader, reader.uint32()) + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): CommunityDescription_MembersEntry { const message = { ...baseCommunityDescription_MembersEntry, - } as CommunityDescription_MembersEntry; + } as CommunityDescription_MembersEntry if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); + message.key = String(object.key) } else { - message.key = ""; + message.key = '' } if (object.value !== undefined && object.value !== null) { - message.value = CommunityMember.fromJSON(object.value); + message.value = CommunityMember.fromJSON(object.value) } else { - message.value = undefined; + message.value = undefined } - return message; + return message }, toJSON(message: CommunityDescription_MembersEntry): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); + const obj: any = {} + message.key !== undefined && (obj.key = message.key) message.value !== undefined && (obj.value = message.value ? CommunityMember.toJSON(message.value) - : undefined); - return obj; + : undefined) + return obj }, fromPartial( @@ -781,88 +779,88 @@ export const CommunityDescription_MembersEntry = { ): CommunityDescription_MembersEntry { const message = { ...baseCommunityDescription_MembersEntry, - } as CommunityDescription_MembersEntry; + } as CommunityDescription_MembersEntry if (object.key !== undefined && object.key !== null) { - message.key = object.key; + message.key = object.key } else { - message.key = ""; + message.key = '' } if (object.value !== undefined && object.value !== null) { - message.value = CommunityMember.fromPartial(object.value); + message.value = CommunityMember.fromPartial(object.value) } else { - message.value = undefined; + message.value = undefined } - return message; + return message }, -}; +} -const baseCommunityDescription_ChatsEntry: object = { key: "" }; +const baseCommunityDescription_ChatsEntry: object = { key: '' } export const CommunityDescription_ChatsEntry = { encode( message: CommunityDescription_ChatsEntry, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); + if (message.key !== '') { + writer.uint32(10).string(message.key) } if (message.value !== undefined) { - CommunityChat.encode(message.value, writer.uint32(18).fork()).ldelim(); + CommunityChat.encode(message.value, writer.uint32(18).fork()).ldelim() } - return writer; + return writer }, decode( input: _m0.Reader | Uint8Array, length?: number ): CommunityDescription_ChatsEntry { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length const message = { ...baseCommunityDescription_ChatsEntry, - } as CommunityDescription_ChatsEntry; + } as CommunityDescription_ChatsEntry while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.key = reader.string(); - break; + message.key = reader.string() + break case 2: - message.value = CommunityChat.decode(reader, reader.uint32()); - break; + message.value = CommunityChat.decode(reader, reader.uint32()) + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): CommunityDescription_ChatsEntry { const message = { ...baseCommunityDescription_ChatsEntry, - } as CommunityDescription_ChatsEntry; + } as CommunityDescription_ChatsEntry if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); + message.key = String(object.key) } else { - message.key = ""; + message.key = '' } if (object.value !== undefined && object.value !== null) { - message.value = CommunityChat.fromJSON(object.value); + message.value = CommunityChat.fromJSON(object.value) } else { - message.value = undefined; + message.value = undefined } - return message; + return message }, toJSON(message: CommunityDescription_ChatsEntry): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); + const obj: any = {} + message.key !== undefined && (obj.key = message.key) message.value !== undefined && (obj.value = message.value ? CommunityChat.toJSON(message.value) - : undefined); - return obj; + : undefined) + return obj }, fromPartial( @@ -870,91 +868,88 @@ export const CommunityDescription_ChatsEntry = { ): CommunityDescription_ChatsEntry { const message = { ...baseCommunityDescription_ChatsEntry, - } as CommunityDescription_ChatsEntry; + } as CommunityDescription_ChatsEntry if (object.key !== undefined && object.key !== null) { - message.key = object.key; + message.key = object.key } else { - message.key = ""; + message.key = '' } if (object.value !== undefined && object.value !== null) { - message.value = CommunityChat.fromPartial(object.value); + message.value = CommunityChat.fromPartial(object.value) } else { - message.value = undefined; + message.value = undefined } - return message; + return message }, -}; +} -const baseCommunityDescription_CategoriesEntry: object = { key: "" }; +const baseCommunityDescription_CategoriesEntry: object = { key: '' } export const CommunityDescription_CategoriesEntry = { encode( message: CommunityDescription_CategoriesEntry, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); + if (message.key !== '') { + writer.uint32(10).string(message.key) } if (message.value !== undefined) { - CommunityCategory.encode( - message.value, - writer.uint32(18).fork() - ).ldelim(); + CommunityCategory.encode(message.value, writer.uint32(18).fork()).ldelim() } - return writer; + return writer }, decode( input: _m0.Reader | Uint8Array, length?: number ): CommunityDescription_CategoriesEntry { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length const message = { ...baseCommunityDescription_CategoriesEntry, - } as CommunityDescription_CategoriesEntry; + } as CommunityDescription_CategoriesEntry while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.key = reader.string(); - break; + message.key = reader.string() + break case 2: - message.value = CommunityCategory.decode(reader, reader.uint32()); - break; + message.value = CommunityCategory.decode(reader, reader.uint32()) + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): CommunityDescription_CategoriesEntry { const message = { ...baseCommunityDescription_CategoriesEntry, - } as CommunityDescription_CategoriesEntry; + } as CommunityDescription_CategoriesEntry if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); + message.key = String(object.key) } else { - message.key = ""; + message.key = '' } if (object.value !== undefined && object.value !== null) { - message.value = CommunityCategory.fromJSON(object.value); + message.value = CommunityCategory.fromJSON(object.value) } else { - message.value = undefined; + message.value = undefined } - return message; + return message }, toJSON(message: CommunityDescription_CategoriesEntry): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); + const obj: any = {} + message.key !== undefined && (obj.key = message.key) message.value !== undefined && (obj.value = message.value ? CommunityCategory.toJSON(message.value) - : undefined); - return obj; + : undefined) + return obj }, fromPartial( @@ -962,22 +957,22 @@ export const CommunityDescription_CategoriesEntry = { ): CommunityDescription_CategoriesEntry { const message = { ...baseCommunityDescription_CategoriesEntry, - } as CommunityDescription_CategoriesEntry; + } as CommunityDescription_CategoriesEntry if (object.key !== undefined && object.key !== null) { - message.key = object.key; + message.key = object.key } else { - message.key = ""; + message.key = '' } if (object.value !== undefined && object.value !== null) { - message.value = CommunityCategory.fromPartial(object.value); + message.value = CommunityCategory.fromPartial(object.value) } else { - message.value = undefined; + message.value = undefined } - return message; + return message }, -}; +} -const baseCommunityChat: object = { categoryId: "", position: 0 }; +const baseCommunityChat: object = { categoryId: '', position: 0 } export const CommunityChat = { encode( @@ -988,221 +983,219 @@ export const CommunityChat = { CommunityChat_MembersEntry.encode( { key: key as any, value }, writer.uint32(10).fork() - ).ldelim(); - }); + ).ldelim() + }) if (message.permissions !== undefined) { CommunityPermissions.encode( message.permissions, writer.uint32(18).fork() - ).ldelim(); + ).ldelim() } if (message.identity !== undefined) { - ChatIdentity.encode(message.identity, writer.uint32(26).fork()).ldelim(); + ChatIdentity.encode(message.identity, writer.uint32(26).fork()).ldelim() } - if (message.categoryId !== "") { - writer.uint32(34).string(message.categoryId); + if (message.categoryId !== '') { + writer.uint32(34).string(message.categoryId) } if (message.position !== 0) { - writer.uint32(40).int32(message.position); + writer.uint32(40).int32(message.position) } - return writer; + return writer }, decode(input: _m0.Reader | Uint8Array, length?: number): CommunityChat { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommunityChat } as CommunityChat; - message.members = {}; + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = { ...baseCommunityChat } as CommunityChat + message.members = {} while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: const entry1 = CommunityChat_MembersEntry.decode( reader, reader.uint32() - ); + ) if (entry1.value !== undefined) { - message.members[entry1.key] = entry1.value; + message.members[entry1.key] = entry1.value } - break; + break case 2: message.permissions = CommunityPermissions.decode( reader, reader.uint32() - ); - break; + ) + break case 3: - message.identity = ChatIdentity.decode(reader, reader.uint32()); - break; + message.identity = ChatIdentity.decode(reader, reader.uint32()) + break case 4: - message.categoryId = reader.string(); - break; + message.categoryId = reader.string() + break case 5: - message.position = reader.int32(); - break; + message.position = reader.int32() + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): CommunityChat { - const message = { ...baseCommunityChat } as CommunityChat; - message.members = {}; + const message = { ...baseCommunityChat } as CommunityChat + message.members = {} if (object.members !== undefined && object.members !== null) { Object.entries(object.members).forEach(([key, value]) => { - message.members[key] = CommunityMember.fromJSON(value); - }); + message.members[key] = CommunityMember.fromJSON(value) + }) } if (object.permissions !== undefined && object.permissions !== null) { - message.permissions = CommunityPermissions.fromJSON(object.permissions); + message.permissions = CommunityPermissions.fromJSON(object.permissions) } else { - message.permissions = undefined; + message.permissions = undefined } if (object.identity !== undefined && object.identity !== null) { - message.identity = ChatIdentity.fromJSON(object.identity); + message.identity = ChatIdentity.fromJSON(object.identity) } else { - message.identity = undefined; + message.identity = undefined } if (object.categoryId !== undefined && object.categoryId !== null) { - message.categoryId = String(object.categoryId); + message.categoryId = String(object.categoryId) } else { - message.categoryId = ""; + message.categoryId = '' } if (object.position !== undefined && object.position !== null) { - message.position = Number(object.position); + message.position = Number(object.position) } else { - message.position = 0; + message.position = 0 } - return message; + return message }, toJSON(message: CommunityChat): unknown { - const obj: any = {}; - obj.members = {}; + const obj: any = {} + obj.members = {} if (message.members) { Object.entries(message.members).forEach(([k, v]) => { - obj.members[k] = CommunityMember.toJSON(v); - }); + obj.members[k] = CommunityMember.toJSON(v) + }) } message.permissions !== undefined && (obj.permissions = message.permissions ? CommunityPermissions.toJSON(message.permissions) - : undefined); + : undefined) message.identity !== undefined && (obj.identity = message.identity ? ChatIdentity.toJSON(message.identity) - : undefined); - message.categoryId !== undefined && (obj.categoryId = message.categoryId); - message.position !== undefined && (obj.position = message.position); - return obj; + : undefined) + message.categoryId !== undefined && (obj.categoryId = message.categoryId) + message.position !== undefined && (obj.position = message.position) + return obj }, fromPartial(object: DeepPartial): CommunityChat { - const message = { ...baseCommunityChat } as CommunityChat; - message.members = {}; + const message = { ...baseCommunityChat } as CommunityChat + message.members = {} if (object.members !== undefined && object.members !== null) { Object.entries(object.members).forEach(([key, value]) => { if (value !== undefined) { - message.members[key] = CommunityMember.fromPartial(value); + message.members[key] = CommunityMember.fromPartial(value) } - }); + }) } if (object.permissions !== undefined && object.permissions !== null) { - message.permissions = CommunityPermissions.fromPartial( - object.permissions - ); + message.permissions = CommunityPermissions.fromPartial(object.permissions) } else { - message.permissions = undefined; + message.permissions = undefined } if (object.identity !== undefined && object.identity !== null) { - message.identity = ChatIdentity.fromPartial(object.identity); + message.identity = ChatIdentity.fromPartial(object.identity) } else { - message.identity = undefined; + message.identity = undefined } if (object.categoryId !== undefined && object.categoryId !== null) { - message.categoryId = object.categoryId; + message.categoryId = object.categoryId } else { - message.categoryId = ""; + message.categoryId = '' } if (object.position !== undefined && object.position !== null) { - message.position = object.position; + message.position = object.position } else { - message.position = 0; + message.position = 0 } - return message; + return message }, -}; +} -const baseCommunityChat_MembersEntry: object = { key: "" }; +const baseCommunityChat_MembersEntry: object = { key: '' } export const CommunityChat_MembersEntry = { encode( message: CommunityChat_MembersEntry, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); + if (message.key !== '') { + writer.uint32(10).string(message.key) } if (message.value !== undefined) { - CommunityMember.encode(message.value, writer.uint32(18).fork()).ldelim(); + CommunityMember.encode(message.value, writer.uint32(18).fork()).ldelim() } - return writer; + return writer }, decode( input: _m0.Reader | Uint8Array, length?: number ): CommunityChat_MembersEntry { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length const message = { ...baseCommunityChat_MembersEntry, - } as CommunityChat_MembersEntry; + } as CommunityChat_MembersEntry while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.key = reader.string(); - break; + message.key = reader.string() + break case 2: - message.value = CommunityMember.decode(reader, reader.uint32()); - break; + message.value = CommunityMember.decode(reader, reader.uint32()) + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): CommunityChat_MembersEntry { const message = { ...baseCommunityChat_MembersEntry, - } as CommunityChat_MembersEntry; + } as CommunityChat_MembersEntry if (object.key !== undefined && object.key !== null) { - message.key = String(object.key); + message.key = String(object.key) } else { - message.key = ""; + message.key = '' } if (object.value !== undefined && object.value !== null) { - message.value = CommunityMember.fromJSON(object.value); + message.value = CommunityMember.fromJSON(object.value) } else { - message.value = undefined; + message.value = undefined } - return message; + return message }, toJSON(message: CommunityChat_MembersEntry): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); + const obj: any = {} + message.key !== undefined && (obj.key = message.key) message.value !== undefined && (obj.value = message.value ? CommunityMember.toJSON(message.value) - : undefined); - return obj; + : undefined) + return obj }, fromPartial( @@ -1210,114 +1203,114 @@ export const CommunityChat_MembersEntry = { ): CommunityChat_MembersEntry { const message = { ...baseCommunityChat_MembersEntry, - } as CommunityChat_MembersEntry; + } as CommunityChat_MembersEntry if (object.key !== undefined && object.key !== null) { - message.key = object.key; + message.key = object.key } else { - message.key = ""; + message.key = '' } if (object.value !== undefined && object.value !== null) { - message.value = CommunityMember.fromPartial(object.value); + message.value = CommunityMember.fromPartial(object.value) } else { - message.value = undefined; + message.value = undefined } - return message; + return message }, -}; +} -const baseCommunityCategory: object = { categoryId: "", name: "", position: 0 }; +const baseCommunityCategory: object = { categoryId: '', name: '', position: 0 } export const CommunityCategory = { encode( message: CommunityCategory, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.categoryId !== "") { - writer.uint32(10).string(message.categoryId); + if (message.categoryId !== '') { + writer.uint32(10).string(message.categoryId) } - if (message.name !== "") { - writer.uint32(18).string(message.name); + if (message.name !== '') { + writer.uint32(18).string(message.name) } if (message.position !== 0) { - writer.uint32(24).int32(message.position); + writer.uint32(24).int32(message.position) } - return writer; + return writer }, decode(input: _m0.Reader | Uint8Array, length?: number): CommunityCategory { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommunityCategory } as CommunityCategory; + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = { ...baseCommunityCategory } as CommunityCategory while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.categoryId = reader.string(); - break; + message.categoryId = reader.string() + break case 2: - message.name = reader.string(); - break; + message.name = reader.string() + break case 3: - message.position = reader.int32(); - break; + message.position = reader.int32() + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): CommunityCategory { - const message = { ...baseCommunityCategory } as CommunityCategory; + const message = { ...baseCommunityCategory } as CommunityCategory if (object.categoryId !== undefined && object.categoryId !== null) { - message.categoryId = String(object.categoryId); + message.categoryId = String(object.categoryId) } else { - message.categoryId = ""; + message.categoryId = '' } if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); + message.name = String(object.name) } else { - message.name = ""; + message.name = '' } if (object.position !== undefined && object.position !== null) { - message.position = Number(object.position); + message.position = Number(object.position) } else { - message.position = 0; + message.position = 0 } - return message; + return message }, toJSON(message: CommunityCategory): unknown { - const obj: any = {}; - message.categoryId !== undefined && (obj.categoryId = message.categoryId); - message.name !== undefined && (obj.name = message.name); - message.position !== undefined && (obj.position = message.position); - return obj; + const obj: any = {} + message.categoryId !== undefined && (obj.categoryId = message.categoryId) + message.name !== undefined && (obj.name = message.name) + message.position !== undefined && (obj.position = message.position) + return obj }, fromPartial(object: DeepPartial): CommunityCategory { - const message = { ...baseCommunityCategory } as CommunityCategory; + const message = { ...baseCommunityCategory } as CommunityCategory if (object.categoryId !== undefined && object.categoryId !== null) { - message.categoryId = object.categoryId; + message.categoryId = object.categoryId } else { - message.categoryId = ""; + message.categoryId = '' } if (object.name !== undefined && object.name !== null) { - message.name = object.name; + message.name = object.name } else { - message.name = ""; + message.name = '' } if (object.position !== undefined && object.position !== null) { - message.position = object.position; + message.position = object.position } else { - message.position = 0; + message.position = 0 } - return message; + return message }, -}; +} -const baseCommunityInvitation: object = { chatId: "" }; +const baseCommunityInvitation: object = { chatId: '' } export const CommunityInvitation = { encode( @@ -1325,131 +1318,131 @@ export const CommunityInvitation = { writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.communityDescription.length !== 0) { - writer.uint32(10).bytes(message.communityDescription); + writer.uint32(10).bytes(message.communityDescription) } if (message.grant.length !== 0) { - writer.uint32(18).bytes(message.grant); + writer.uint32(18).bytes(message.grant) } - if (message.chatId !== "") { - writer.uint32(26).string(message.chatId); + if (message.chatId !== '') { + writer.uint32(26).string(message.chatId) } if (message.publicKey.length !== 0) { - writer.uint32(34).bytes(message.publicKey); + writer.uint32(34).bytes(message.publicKey) } - return writer; + return writer }, decode(input: _m0.Reader | Uint8Array, length?: number): CommunityInvitation { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommunityInvitation } as CommunityInvitation; - message.communityDescription = new Uint8Array(); - message.grant = new Uint8Array(); - message.publicKey = new Uint8Array(); + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = { ...baseCommunityInvitation } as CommunityInvitation + message.communityDescription = new Uint8Array() + message.grant = new Uint8Array() + message.publicKey = new Uint8Array() while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.communityDescription = reader.bytes(); - break; + message.communityDescription = reader.bytes() + break case 2: - message.grant = reader.bytes(); - break; + message.grant = reader.bytes() + break case 3: - message.chatId = reader.string(); - break; + message.chatId = reader.string() + break case 4: - message.publicKey = reader.bytes(); - break; + message.publicKey = reader.bytes() + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): CommunityInvitation { - const message = { ...baseCommunityInvitation } as CommunityInvitation; - message.communityDescription = new Uint8Array(); - message.grant = new Uint8Array(); - message.publicKey = new Uint8Array(); + const message = { ...baseCommunityInvitation } as CommunityInvitation + message.communityDescription = new Uint8Array() + message.grant = new Uint8Array() + message.publicKey = new Uint8Array() if ( object.communityDescription !== undefined && object.communityDescription !== null ) { message.communityDescription = bytesFromBase64( object.communityDescription - ); + ) } if (object.grant !== undefined && object.grant !== null) { - message.grant = bytesFromBase64(object.grant); + message.grant = bytesFromBase64(object.grant) } if (object.chatId !== undefined && object.chatId !== null) { - message.chatId = String(object.chatId); + message.chatId = String(object.chatId) } else { - message.chatId = ""; + message.chatId = '' } if (object.publicKey !== undefined && object.publicKey !== null) { - message.publicKey = bytesFromBase64(object.publicKey); + message.publicKey = bytesFromBase64(object.publicKey) } - return message; + return message }, toJSON(message: CommunityInvitation): unknown { - const obj: any = {}; + const obj: any = {} message.communityDescription !== undefined && (obj.communityDescription = base64FromBytes( message.communityDescription !== undefined ? message.communityDescription : new Uint8Array() - )); + )) message.grant !== undefined && (obj.grant = base64FromBytes( message.grant !== undefined ? message.grant : new Uint8Array() - )); - message.chatId !== undefined && (obj.chatId = message.chatId); + )) + message.chatId !== undefined && (obj.chatId = message.chatId) message.publicKey !== undefined && (obj.publicKey = base64FromBytes( message.publicKey !== undefined ? message.publicKey : new Uint8Array() - )); - return obj; + )) + return obj }, fromPartial(object: DeepPartial): CommunityInvitation { - const message = { ...baseCommunityInvitation } as CommunityInvitation; + const message = { ...baseCommunityInvitation } as CommunityInvitation if ( object.communityDescription !== undefined && object.communityDescription !== null ) { - message.communityDescription = object.communityDescription; + message.communityDescription = object.communityDescription } else { - message.communityDescription = new Uint8Array(); + message.communityDescription = new Uint8Array() } if (object.grant !== undefined && object.grant !== null) { - message.grant = object.grant; + message.grant = object.grant } else { - message.grant = new Uint8Array(); + message.grant = new Uint8Array() } if (object.chatId !== undefined && object.chatId !== null) { - message.chatId = object.chatId; + message.chatId = object.chatId } else { - message.chatId = ""; + message.chatId = '' } if (object.publicKey !== undefined && object.publicKey !== null) { - message.publicKey = object.publicKey; + message.publicKey = object.publicKey } else { - message.publicKey = new Uint8Array(); + message.publicKey = new Uint8Array() } - return message; + return message }, -}; +} const baseCommunityRequestToJoin: object = { clock: 0, - ensName: "", - chatId: "", -}; + ensName: '', + chatId: '', +} export const CommunityRequestToJoin = { encode( @@ -1457,121 +1450,121 @@ export const CommunityRequestToJoin = { writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.clock !== 0) { - writer.uint32(8).uint64(message.clock); + writer.uint32(8).uint64(message.clock) } - if (message.ensName !== "") { - writer.uint32(18).string(message.ensName); + if (message.ensName !== '') { + writer.uint32(18).string(message.ensName) } - if (message.chatId !== "") { - writer.uint32(26).string(message.chatId); + if (message.chatId !== '') { + writer.uint32(26).string(message.chatId) } if (message.communityId.length !== 0) { - writer.uint32(34).bytes(message.communityId); + writer.uint32(34).bytes(message.communityId) } - return writer; + return writer }, decode( input: _m0.Reader | Uint8Array, length?: number ): CommunityRequestToJoin { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseCommunityRequestToJoin } as CommunityRequestToJoin; - message.communityId = new Uint8Array(); + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = { ...baseCommunityRequestToJoin } as CommunityRequestToJoin + message.communityId = new Uint8Array() while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.clock = longToNumber(reader.uint64() as Long); - break; + message.clock = longToNumber(reader.uint64() as Long) + break case 2: - message.ensName = reader.string(); - break; + message.ensName = reader.string() + break case 3: - message.chatId = reader.string(); - break; + message.chatId = reader.string() + break case 4: - message.communityId = reader.bytes(); - break; + message.communityId = reader.bytes() + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): CommunityRequestToJoin { - const message = { ...baseCommunityRequestToJoin } as CommunityRequestToJoin; - message.communityId = new Uint8Array(); + const message = { ...baseCommunityRequestToJoin } as CommunityRequestToJoin + message.communityId = new Uint8Array() if (object.clock !== undefined && object.clock !== null) { - message.clock = Number(object.clock); + message.clock = Number(object.clock) } else { - message.clock = 0; + message.clock = 0 } if (object.ensName !== undefined && object.ensName !== null) { - message.ensName = String(object.ensName); + message.ensName = String(object.ensName) } else { - message.ensName = ""; + message.ensName = '' } if (object.chatId !== undefined && object.chatId !== null) { - message.chatId = String(object.chatId); + message.chatId = String(object.chatId) } else { - message.chatId = ""; + message.chatId = '' } if (object.communityId !== undefined && object.communityId !== null) { - message.communityId = bytesFromBase64(object.communityId); + message.communityId = bytesFromBase64(object.communityId) } - return message; + return message }, toJSON(message: CommunityRequestToJoin): unknown { - const obj: any = {}; - message.clock !== undefined && (obj.clock = message.clock); - message.ensName !== undefined && (obj.ensName = message.ensName); - message.chatId !== undefined && (obj.chatId = message.chatId); + const obj: any = {} + message.clock !== undefined && (obj.clock = message.clock) + message.ensName !== undefined && (obj.ensName = message.ensName) + message.chatId !== undefined && (obj.chatId = message.chatId) message.communityId !== undefined && (obj.communityId = base64FromBytes( message.communityId !== undefined ? message.communityId : new Uint8Array() - )); - return obj; + )) + return obj }, fromPartial( object: DeepPartial ): CommunityRequestToJoin { - const message = { ...baseCommunityRequestToJoin } as CommunityRequestToJoin; + const message = { ...baseCommunityRequestToJoin } as CommunityRequestToJoin if (object.clock !== undefined && object.clock !== null) { - message.clock = object.clock; + message.clock = object.clock } else { - message.clock = 0; + message.clock = 0 } if (object.ensName !== undefined && object.ensName !== null) { - message.ensName = object.ensName; + message.ensName = object.ensName } else { - message.ensName = ""; + message.ensName = '' } if (object.chatId !== undefined && object.chatId !== null) { - message.chatId = object.chatId; + message.chatId = object.chatId } else { - message.chatId = ""; + message.chatId = '' } if (object.communityId !== undefined && object.communityId !== null) { - message.communityId = object.communityId; + message.communityId = object.communityId } else { - message.communityId = new Uint8Array(); + message.communityId = new Uint8Array() } - return message; + return message }, -}; +} const baseCommunityRequestToJoinResponse: object = { clock: 0, accepted: false, -}; +} export const CommunityRequestToJoinResponse = { encode( @@ -1579,98 +1572,98 @@ export const CommunityRequestToJoinResponse = { writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.clock !== 0) { - writer.uint32(8).uint64(message.clock); + writer.uint32(8).uint64(message.clock) } if (message.community !== undefined) { CommunityDescription.encode( message.community, writer.uint32(18).fork() - ).ldelim(); + ).ldelim() } if (message.accepted === true) { - writer.uint32(24).bool(message.accepted); + writer.uint32(24).bool(message.accepted) } if (message.grant.length !== 0) { - writer.uint32(34).bytes(message.grant); + writer.uint32(34).bytes(message.grant) } - return writer; + return writer }, decode( input: _m0.Reader | Uint8Array, length?: number ): CommunityRequestToJoinResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length const message = { ...baseCommunityRequestToJoinResponse, - } as CommunityRequestToJoinResponse; - message.grant = new Uint8Array(); + } as CommunityRequestToJoinResponse + message.grant = new Uint8Array() while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.clock = longToNumber(reader.uint64() as Long); - break; + message.clock = longToNumber(reader.uint64() as Long) + break case 2: message.community = CommunityDescription.decode( reader, reader.uint32() - ); - break; + ) + break case 3: - message.accepted = reader.bool(); - break; + message.accepted = reader.bool() + break case 4: - message.grant = reader.bytes(); - break; + message.grant = reader.bytes() + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): CommunityRequestToJoinResponse { const message = { ...baseCommunityRequestToJoinResponse, - } as CommunityRequestToJoinResponse; - message.grant = new Uint8Array(); + } as CommunityRequestToJoinResponse + message.grant = new Uint8Array() if (object.clock !== undefined && object.clock !== null) { - message.clock = Number(object.clock); + message.clock = Number(object.clock) } else { - message.clock = 0; + message.clock = 0 } if (object.community !== undefined && object.community !== null) { - message.community = CommunityDescription.fromJSON(object.community); + message.community = CommunityDescription.fromJSON(object.community) } else { - message.community = undefined; + message.community = undefined } if (object.accepted !== undefined && object.accepted !== null) { - message.accepted = Boolean(object.accepted); + message.accepted = Boolean(object.accepted) } else { - message.accepted = false; + message.accepted = false } if (object.grant !== undefined && object.grant !== null) { - message.grant = bytesFromBase64(object.grant); + message.grant = bytesFromBase64(object.grant) } - return message; + return message }, toJSON(message: CommunityRequestToJoinResponse): unknown { - const obj: any = {}; - message.clock !== undefined && (obj.clock = message.clock); + const obj: any = {} + message.clock !== undefined && (obj.clock = message.clock) message.community !== undefined && (obj.community = message.community ? CommunityDescription.toJSON(message.community) - : undefined); - message.accepted !== undefined && (obj.accepted = message.accepted); + : undefined) + message.accepted !== undefined && (obj.accepted = message.accepted) message.grant !== undefined && (obj.grant = base64FromBytes( message.grant !== undefined ? message.grant : new Uint8Array() - )); - return obj; + )) + return obj }, fromPartial( @@ -1678,63 +1671,63 @@ export const CommunityRequestToJoinResponse = { ): CommunityRequestToJoinResponse { const message = { ...baseCommunityRequestToJoinResponse, - } as CommunityRequestToJoinResponse; + } as CommunityRequestToJoinResponse if (object.clock !== undefined && object.clock !== null) { - message.clock = object.clock; + message.clock = object.clock } else { - message.clock = 0; + message.clock = 0 } if (object.community !== undefined && object.community !== null) { - message.community = CommunityDescription.fromPartial(object.community); + message.community = CommunityDescription.fromPartial(object.community) } else { - message.community = undefined; + message.community = undefined } if (object.accepted !== undefined && object.accepted !== null) { - message.accepted = object.accepted; + message.accepted = object.accepted } else { - message.accepted = false; + message.accepted = false } if (object.grant !== undefined && object.grant !== null) { - message.grant = object.grant; + message.grant = object.grant } else { - message.grant = new Uint8Array(); + message.grant = new Uint8Array() } - return message; + return message }, -}; +} -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: any | undefined; +declare var self: any | undefined +declare var window: any | undefined +declare var global: any | undefined var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); + if (typeof globalThis !== 'undefined') return globalThis + if (typeof self !== 'undefined') return self + if (typeof window !== 'undefined') return window + if (typeof global !== 'undefined') return global + throw 'Unable to locate global object' +})() const atob: (b64: string) => string = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); + (b64 => globalThis.Buffer.from(b64, 'base64').toString('binary')) function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); + const bin = atob(b64) + const arr = new Uint8Array(bin.length) for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); + arr[i] = bin.charCodeAt(i) } - return arr; + return arr } const btoa: (bin: string) => string = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); + (bin => globalThis.Buffer.from(bin, 'binary').toString('base64')) function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; + const bin: string[] = [] for (const byte of arr) { - bin.push(String.fromCharCode(byte)); + bin.push(String.fromCharCode(byte)) } - return btoa(bin.join("")); + return btoa(bin.join('')) } type Builtin = @@ -1744,7 +1737,7 @@ type Builtin = | string | number | boolean - | undefined; + | undefined export type DeepPartial = T extends Builtin ? T : T extends Array @@ -1753,16 +1746,16 @@ export type DeepPartial = T extends Builtin ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; + : Partial function longToNumber(long: Long): number { if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + throw new globalThis.Error('Value is larger than Number.MAX_SAFE_INTEGER') } - return long.toNumber(); + return long.toNumber() } if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); + _m0.util.Long = Long as any + _m0.configure() } diff --git a/packages/status-core/src/proto/communities/v1/emoji_reaction.ts b/packages/status-core/src/proto/communities/v1/emoji_reaction.ts index 9a4ec13c..92961e8c 100644 --- a/packages/status-core/src/proto/communities/v1/emoji_reaction.ts +++ b/packages/status-core/src/proto/communities/v1/emoji_reaction.ts @@ -1,32 +1,32 @@ /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import Long from 'long' +import _m0 from 'protobufjs/minimal' import { MessageType, messageTypeFromJSON, messageTypeToJSON, -} from "../../communities/v1/enums"; +} from '../../communities/v1/enums' -export const protobufPackage = "communities.v1"; +export const protobufPackage = 'communities.v1' export interface EmojiReaction { /** clock Lamport timestamp of the chat message */ - clock: number; + clock: number /** * chat_id the ID of the chat the message belongs to, for query efficiency the chat_id is stored in the db even though the * target message also stores the chat_id */ - chatId: string; + chatId: string /** message_id the ID of the target message that the user wishes to react to */ - messageId: string; + messageId: string /** message_type is (somewhat confusingly) the ID of the type of chat the message belongs to */ - messageType: MessageType; + messageType: MessageType /** type the ID of the emoji the user wishes to react with */ - type: EmojiReaction_Type; + type: EmojiReaction_Type /** whether this is a rectraction of a previously sent emoji */ - retracted: boolean; + retracted: boolean /** Grant for organisation chat messages */ - grant: Uint8Array; + grant: Uint8Array } export enum EmojiReaction_Type { @@ -43,62 +43,62 @@ export enum EmojiReaction_Type { export function emojiReaction_TypeFromJSON(object: any): EmojiReaction_Type { switch (object) { case 0: - case "UNKNOWN_EMOJI_REACTION_TYPE": - return EmojiReaction_Type.UNKNOWN_EMOJI_REACTION_TYPE; + case 'UNKNOWN_EMOJI_REACTION_TYPE': + return EmojiReaction_Type.UNKNOWN_EMOJI_REACTION_TYPE case 1: - case "LOVE": - return EmojiReaction_Type.LOVE; + case 'LOVE': + return EmojiReaction_Type.LOVE case 2: - case "THUMBS_UP": - return EmojiReaction_Type.THUMBS_UP; + case 'THUMBS_UP': + return EmojiReaction_Type.THUMBS_UP case 3: - case "THUMBS_DOWN": - return EmojiReaction_Type.THUMBS_DOWN; + case 'THUMBS_DOWN': + return EmojiReaction_Type.THUMBS_DOWN case 4: - case "LAUGH": - return EmojiReaction_Type.LAUGH; + case 'LAUGH': + return EmojiReaction_Type.LAUGH case 5: - case "SAD": - return EmojiReaction_Type.SAD; + case 'SAD': + return EmojiReaction_Type.SAD case 6: - case "ANGRY": - return EmojiReaction_Type.ANGRY; + case 'ANGRY': + return EmojiReaction_Type.ANGRY case -1: - case "UNRECOGNIZED": + case 'UNRECOGNIZED': default: - return EmojiReaction_Type.UNRECOGNIZED; + return EmojiReaction_Type.UNRECOGNIZED } } export function emojiReaction_TypeToJSON(object: EmojiReaction_Type): string { switch (object) { case EmojiReaction_Type.UNKNOWN_EMOJI_REACTION_TYPE: - return "UNKNOWN_EMOJI_REACTION_TYPE"; + return 'UNKNOWN_EMOJI_REACTION_TYPE' case EmojiReaction_Type.LOVE: - return "LOVE"; + return 'LOVE' case EmojiReaction_Type.THUMBS_UP: - return "THUMBS_UP"; + return 'THUMBS_UP' case EmojiReaction_Type.THUMBS_DOWN: - return "THUMBS_DOWN"; + return 'THUMBS_DOWN' case EmojiReaction_Type.LAUGH: - return "LAUGH"; + return 'LAUGH' case EmojiReaction_Type.SAD: - return "SAD"; + return 'SAD' case EmojiReaction_Type.ANGRY: - return "ANGRY"; + return 'ANGRY' default: - return "UNKNOWN"; + return 'UNKNOWN' } } const baseEmojiReaction: object = { clock: 0, - chatId: "", - messageId: "", + chatId: '', + messageId: '', messageType: 0, type: 0, retracted: false, -}; +} export const EmojiReaction = { encode( @@ -106,195 +106,195 @@ export const EmojiReaction = { writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.clock !== 0) { - writer.uint32(8).uint64(message.clock); + writer.uint32(8).uint64(message.clock) } - if (message.chatId !== "") { - writer.uint32(18).string(message.chatId); + if (message.chatId !== '') { + writer.uint32(18).string(message.chatId) } - if (message.messageId !== "") { - writer.uint32(26).string(message.messageId); + if (message.messageId !== '') { + writer.uint32(26).string(message.messageId) } if (message.messageType !== 0) { - writer.uint32(32).int32(message.messageType); + writer.uint32(32).int32(message.messageType) } if (message.type !== 0) { - writer.uint32(40).int32(message.type); + writer.uint32(40).int32(message.type) } if (message.retracted === true) { - writer.uint32(48).bool(message.retracted); + writer.uint32(48).bool(message.retracted) } if (message.grant.length !== 0) { - writer.uint32(58).bytes(message.grant); + writer.uint32(58).bytes(message.grant) } - return writer; + return writer }, decode(input: _m0.Reader | Uint8Array, length?: number): EmojiReaction { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseEmojiReaction } as EmojiReaction; - message.grant = new Uint8Array(); + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = { ...baseEmojiReaction } as EmojiReaction + message.grant = new Uint8Array() while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.clock = longToNumber(reader.uint64() as Long); - break; + message.clock = longToNumber(reader.uint64() as Long) + break case 2: - message.chatId = reader.string(); - break; + message.chatId = reader.string() + break case 3: - message.messageId = reader.string(); - break; + message.messageId = reader.string() + break case 4: - message.messageType = reader.int32() as any; - break; + message.messageType = reader.int32() as any + break case 5: - message.type = reader.int32() as any; - break; + message.type = reader.int32() as any + break case 6: - message.retracted = reader.bool(); - break; + message.retracted = reader.bool() + break case 7: - message.grant = reader.bytes(); - break; + message.grant = reader.bytes() + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): EmojiReaction { - const message = { ...baseEmojiReaction } as EmojiReaction; - message.grant = new Uint8Array(); + const message = { ...baseEmojiReaction } as EmojiReaction + message.grant = new Uint8Array() if (object.clock !== undefined && object.clock !== null) { - message.clock = Number(object.clock); + message.clock = Number(object.clock) } else { - message.clock = 0; + message.clock = 0 } if (object.chatId !== undefined && object.chatId !== null) { - message.chatId = String(object.chatId); + message.chatId = String(object.chatId) } else { - message.chatId = ""; + message.chatId = '' } if (object.messageId !== undefined && object.messageId !== null) { - message.messageId = String(object.messageId); + message.messageId = String(object.messageId) } else { - message.messageId = ""; + message.messageId = '' } if (object.messageType !== undefined && object.messageType !== null) { - message.messageType = messageTypeFromJSON(object.messageType); + message.messageType = messageTypeFromJSON(object.messageType) } else { - message.messageType = 0; + message.messageType = 0 } if (object.type !== undefined && object.type !== null) { - message.type = emojiReaction_TypeFromJSON(object.type); + message.type = emojiReaction_TypeFromJSON(object.type) } else { - message.type = 0; + message.type = 0 } if (object.retracted !== undefined && object.retracted !== null) { - message.retracted = Boolean(object.retracted); + message.retracted = Boolean(object.retracted) } else { - message.retracted = false; + message.retracted = false } if (object.grant !== undefined && object.grant !== null) { - message.grant = bytesFromBase64(object.grant); + message.grant = bytesFromBase64(object.grant) } - return message; + return message }, toJSON(message: EmojiReaction): unknown { - const obj: any = {}; - message.clock !== undefined && (obj.clock = message.clock); - message.chatId !== undefined && (obj.chatId = message.chatId); - message.messageId !== undefined && (obj.messageId = message.messageId); + const obj: any = {} + message.clock !== undefined && (obj.clock = message.clock) + message.chatId !== undefined && (obj.chatId = message.chatId) + message.messageId !== undefined && (obj.messageId = message.messageId) message.messageType !== undefined && - (obj.messageType = messageTypeToJSON(message.messageType)); + (obj.messageType = messageTypeToJSON(message.messageType)) message.type !== undefined && - (obj.type = emojiReaction_TypeToJSON(message.type)); - message.retracted !== undefined && (obj.retracted = message.retracted); + (obj.type = emojiReaction_TypeToJSON(message.type)) + message.retracted !== undefined && (obj.retracted = message.retracted) message.grant !== undefined && (obj.grant = base64FromBytes( message.grant !== undefined ? message.grant : new Uint8Array() - )); - return obj; + )) + return obj }, fromPartial(object: DeepPartial): EmojiReaction { - const message = { ...baseEmojiReaction } as EmojiReaction; + const message = { ...baseEmojiReaction } as EmojiReaction if (object.clock !== undefined && object.clock !== null) { - message.clock = object.clock; + message.clock = object.clock } else { - message.clock = 0; + message.clock = 0 } if (object.chatId !== undefined && object.chatId !== null) { - message.chatId = object.chatId; + message.chatId = object.chatId } else { - message.chatId = ""; + message.chatId = '' } if (object.messageId !== undefined && object.messageId !== null) { - message.messageId = object.messageId; + message.messageId = object.messageId } else { - message.messageId = ""; + message.messageId = '' } if (object.messageType !== undefined && object.messageType !== null) { - message.messageType = object.messageType; + message.messageType = object.messageType } else { - message.messageType = 0; + message.messageType = 0 } if (object.type !== undefined && object.type !== null) { - message.type = object.type; + message.type = object.type } else { - message.type = 0; + message.type = 0 } if (object.retracted !== undefined && object.retracted !== null) { - message.retracted = object.retracted; + message.retracted = object.retracted } else { - message.retracted = false; + message.retracted = false } if (object.grant !== undefined && object.grant !== null) { - message.grant = object.grant; + message.grant = object.grant } else { - message.grant = new Uint8Array(); + message.grant = new Uint8Array() } - return message; + return message }, -}; +} -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: any | undefined; +declare var self: any | undefined +declare var window: any | undefined +declare var global: any | undefined var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); + if (typeof globalThis !== 'undefined') return globalThis + if (typeof self !== 'undefined') return self + if (typeof window !== 'undefined') return window + if (typeof global !== 'undefined') return global + throw 'Unable to locate global object' +})() const atob: (b64: string) => string = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); + (b64 => globalThis.Buffer.from(b64, 'base64').toString('binary')) function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); + const bin = atob(b64) + const arr = new Uint8Array(bin.length) for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); + arr[i] = bin.charCodeAt(i) } - return arr; + return arr } const btoa: (bin: string) => string = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); + (bin => globalThis.Buffer.from(bin, 'binary').toString('base64')) function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; + const bin: string[] = [] for (const byte of arr) { - bin.push(String.fromCharCode(byte)); + bin.push(String.fromCharCode(byte)) } - return btoa(bin.join("")); + return btoa(bin.join('')) } type Builtin = @@ -304,7 +304,7 @@ type Builtin = | string | number | boolean - | undefined; + | undefined export type DeepPartial = T extends Builtin ? T : T extends Array @@ -313,16 +313,16 @@ export type DeepPartial = T extends Builtin ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; + : Partial function longToNumber(long: Long): number { if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + throw new globalThis.Error('Value is larger than Number.MAX_SAFE_INTEGER') } - return long.toNumber(); + return long.toNumber() } if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); + _m0.util.Long = Long as any + _m0.configure() } diff --git a/packages/status-core/src/proto/communities/v1/enums.ts b/packages/status-core/src/proto/communities/v1/enums.ts index ee21d817..229cb9c9 100644 --- a/packages/status-core/src/proto/communities/v1/enums.ts +++ b/packages/status-core/src/proto/communities/v1/enums.ts @@ -1,8 +1,8 @@ /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import Long from 'long' +import _m0 from 'protobufjs/minimal' -export const protobufPackage = "communities.v1"; +export const protobufPackage = 'communities.v1' export enum MessageType { MESSAGE_TYPE_UNKNOWN_UNSPECIFIED = 0, @@ -20,51 +20,51 @@ export enum MessageType { export function messageTypeFromJSON(object: any): MessageType { switch (object) { case 0: - case "MESSAGE_TYPE_UNKNOWN_UNSPECIFIED": - return MessageType.MESSAGE_TYPE_UNKNOWN_UNSPECIFIED; + case 'MESSAGE_TYPE_UNKNOWN_UNSPECIFIED': + return MessageType.MESSAGE_TYPE_UNKNOWN_UNSPECIFIED case 1: - case "MESSAGE_TYPE_ONE_TO_ONE": - return MessageType.MESSAGE_TYPE_ONE_TO_ONE; + case 'MESSAGE_TYPE_ONE_TO_ONE': + return MessageType.MESSAGE_TYPE_ONE_TO_ONE case 2: - case "MESSAGE_TYPE_MESSAGE_TYPE_PUBLIC_GROUP": - return MessageType.MESSAGE_TYPE_MESSAGE_TYPE_PUBLIC_GROUP; + case 'MESSAGE_TYPE_MESSAGE_TYPE_PUBLIC_GROUP': + return MessageType.MESSAGE_TYPE_MESSAGE_TYPE_PUBLIC_GROUP case 3: - case "MESSAGE_TYPE_PRIVATE_GROUP": - return MessageType.MESSAGE_TYPE_PRIVATE_GROUP; + case 'MESSAGE_TYPE_PRIVATE_GROUP': + return MessageType.MESSAGE_TYPE_PRIVATE_GROUP case 4: - case "MESSAGE_TYPE_SYSTEM_MESSAGE_PRIVATE_GROUP": - return MessageType.MESSAGE_TYPE_SYSTEM_MESSAGE_PRIVATE_GROUP; + case 'MESSAGE_TYPE_SYSTEM_MESSAGE_PRIVATE_GROUP': + return MessageType.MESSAGE_TYPE_SYSTEM_MESSAGE_PRIVATE_GROUP case 5: - case "MESSAGE_TYPE_COMMUNITY_CHAT": - return MessageType.MESSAGE_TYPE_COMMUNITY_CHAT; + case 'MESSAGE_TYPE_COMMUNITY_CHAT': + return MessageType.MESSAGE_TYPE_COMMUNITY_CHAT case 6: - case "MESSAGE_TYPE_SYSTEM_MESSAGE_GAP": - return MessageType.MESSAGE_TYPE_SYSTEM_MESSAGE_GAP; + case 'MESSAGE_TYPE_SYSTEM_MESSAGE_GAP': + return MessageType.MESSAGE_TYPE_SYSTEM_MESSAGE_GAP case -1: - case "UNRECOGNIZED": + case 'UNRECOGNIZED': default: - return MessageType.UNRECOGNIZED; + return MessageType.UNRECOGNIZED } } export function messageTypeToJSON(object: MessageType): string { switch (object) { case MessageType.MESSAGE_TYPE_UNKNOWN_UNSPECIFIED: - return "MESSAGE_TYPE_UNKNOWN_UNSPECIFIED"; + return 'MESSAGE_TYPE_UNKNOWN_UNSPECIFIED' case MessageType.MESSAGE_TYPE_ONE_TO_ONE: - return "MESSAGE_TYPE_ONE_TO_ONE"; + return 'MESSAGE_TYPE_ONE_TO_ONE' case MessageType.MESSAGE_TYPE_MESSAGE_TYPE_PUBLIC_GROUP: - return "MESSAGE_TYPE_MESSAGE_TYPE_PUBLIC_GROUP"; + return 'MESSAGE_TYPE_MESSAGE_TYPE_PUBLIC_GROUP' case MessageType.MESSAGE_TYPE_PRIVATE_GROUP: - return "MESSAGE_TYPE_PRIVATE_GROUP"; + return 'MESSAGE_TYPE_PRIVATE_GROUP' case MessageType.MESSAGE_TYPE_SYSTEM_MESSAGE_PRIVATE_GROUP: - return "MESSAGE_TYPE_SYSTEM_MESSAGE_PRIVATE_GROUP"; + return 'MESSAGE_TYPE_SYSTEM_MESSAGE_PRIVATE_GROUP' case MessageType.MESSAGE_TYPE_COMMUNITY_CHAT: - return "MESSAGE_TYPE_COMMUNITY_CHAT"; + return 'MESSAGE_TYPE_COMMUNITY_CHAT' case MessageType.MESSAGE_TYPE_SYSTEM_MESSAGE_GAP: - return "MESSAGE_TYPE_SYSTEM_MESSAGE_GAP"; + return 'MESSAGE_TYPE_SYSTEM_MESSAGE_GAP' default: - return "UNKNOWN"; + return 'UNKNOWN' } } @@ -81,45 +81,45 @@ export enum ImageType { export function imageTypeFromJSON(object: any): ImageType { switch (object) { case 0: - case "IMAGE_TYPE_UNKNOWN_UNSPECIFIED": - return ImageType.IMAGE_TYPE_UNKNOWN_UNSPECIFIED; + case 'IMAGE_TYPE_UNKNOWN_UNSPECIFIED': + return ImageType.IMAGE_TYPE_UNKNOWN_UNSPECIFIED case 1: - case "IMAGE_TYPE_PNG": - return ImageType.IMAGE_TYPE_PNG; + case 'IMAGE_TYPE_PNG': + return ImageType.IMAGE_TYPE_PNG case 2: - case "IMAGE_TYPE_JPEG": - return ImageType.IMAGE_TYPE_JPEG; + case 'IMAGE_TYPE_JPEG': + return ImageType.IMAGE_TYPE_JPEG case 3: - case "IMAGE_TYPE_WEBP": - return ImageType.IMAGE_TYPE_WEBP; + case 'IMAGE_TYPE_WEBP': + return ImageType.IMAGE_TYPE_WEBP case 4: - case "IMAGE_TYPE_GIF": - return ImageType.IMAGE_TYPE_GIF; + case 'IMAGE_TYPE_GIF': + return ImageType.IMAGE_TYPE_GIF case -1: - case "UNRECOGNIZED": + case 'UNRECOGNIZED': default: - return ImageType.UNRECOGNIZED; + return ImageType.UNRECOGNIZED } } export function imageTypeToJSON(object: ImageType): string { switch (object) { case ImageType.IMAGE_TYPE_UNKNOWN_UNSPECIFIED: - return "IMAGE_TYPE_UNKNOWN_UNSPECIFIED"; + return 'IMAGE_TYPE_UNKNOWN_UNSPECIFIED' case ImageType.IMAGE_TYPE_PNG: - return "IMAGE_TYPE_PNG"; + return 'IMAGE_TYPE_PNG' case ImageType.IMAGE_TYPE_JPEG: - return "IMAGE_TYPE_JPEG"; + return 'IMAGE_TYPE_JPEG' case ImageType.IMAGE_TYPE_WEBP: - return "IMAGE_TYPE_WEBP"; + return 'IMAGE_TYPE_WEBP' case ImageType.IMAGE_TYPE_GIF: - return "IMAGE_TYPE_GIF"; + return 'IMAGE_TYPE_GIF' default: - return "UNKNOWN"; + return 'UNKNOWN' } } if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); + _m0.util.Long = Long as any + _m0.configure() } diff --git a/packages/status-core/src/proto/communities/v1/membership_update_message.ts b/packages/status-core/src/proto/communities/v1/membership_update_message.ts index 9c0e4e73..a3dfa504 100644 --- a/packages/status-core/src/proto/communities/v1/membership_update_message.ts +++ b/packages/status-core/src/proto/communities/v1/membership_update_message.ts @@ -1,20 +1,20 @@ /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { ChatMessage } from "../../communities/v1/chat_message"; -import { EmojiReaction } from "../../communities/v1/emoji_reaction"; +import Long from 'long' +import _m0 from 'protobufjs/minimal' +import { ChatMessage } from '../../communities/v1/chat_message' +import { EmojiReaction } from '../../communities/v1/emoji_reaction' -export const protobufPackage = "communities.v1"; +export const protobufPackage = 'communities.v1' export interface MembershipUpdateEvent { /** Lamport timestamp of the event */ - clock: number; + clock: number /** List of public keys of objects of the action */ - members: string[]; + members: string[] /** Name of the chat for the CHAT_CREATED/NAME_CHANGED event types */ - name: string; + name: string /** The type of the event */ - type: MembershipUpdateEvent_EventType; + type: MembershipUpdateEvent_EventType } export enum MembershipUpdateEvent_EventType { @@ -34,33 +34,33 @@ export function membershipUpdateEvent_EventTypeFromJSON( ): MembershipUpdateEvent_EventType { switch (object) { case 0: - case "UNKNOWN": - return MembershipUpdateEvent_EventType.UNKNOWN; + case 'UNKNOWN': + return MembershipUpdateEvent_EventType.UNKNOWN case 1: - case "CHAT_CREATED": - return MembershipUpdateEvent_EventType.CHAT_CREATED; + case 'CHAT_CREATED': + return MembershipUpdateEvent_EventType.CHAT_CREATED case 2: - case "NAME_CHANGED": - return MembershipUpdateEvent_EventType.NAME_CHANGED; + case 'NAME_CHANGED': + return MembershipUpdateEvent_EventType.NAME_CHANGED case 3: - case "MEMBERS_ADDED": - return MembershipUpdateEvent_EventType.MEMBERS_ADDED; + case 'MEMBERS_ADDED': + return MembershipUpdateEvent_EventType.MEMBERS_ADDED case 4: - case "MEMBER_JOINED": - return MembershipUpdateEvent_EventType.MEMBER_JOINED; + case 'MEMBER_JOINED': + return MembershipUpdateEvent_EventType.MEMBER_JOINED case 5: - case "MEMBER_REMOVED": - return MembershipUpdateEvent_EventType.MEMBER_REMOVED; + case 'MEMBER_REMOVED': + return MembershipUpdateEvent_EventType.MEMBER_REMOVED case 6: - case "ADMINS_ADDED": - return MembershipUpdateEvent_EventType.ADMINS_ADDED; + case 'ADMINS_ADDED': + return MembershipUpdateEvent_EventType.ADMINS_ADDED case 7: - case "ADMIN_REMOVED": - return MembershipUpdateEvent_EventType.ADMIN_REMOVED; + case 'ADMIN_REMOVED': + return MembershipUpdateEvent_EventType.ADMIN_REMOVED case -1: - case "UNRECOGNIZED": + case 'UNRECOGNIZED': default: - return MembershipUpdateEvent_EventType.UNRECOGNIZED; + return MembershipUpdateEvent_EventType.UNRECOGNIZED } } @@ -69,23 +69,23 @@ export function membershipUpdateEvent_EventTypeToJSON( ): string { switch (object) { case MembershipUpdateEvent_EventType.UNKNOWN: - return "UNKNOWN"; + return 'UNKNOWN' case MembershipUpdateEvent_EventType.CHAT_CREATED: - return "CHAT_CREATED"; + return 'CHAT_CREATED' case MembershipUpdateEvent_EventType.NAME_CHANGED: - return "NAME_CHANGED"; + return 'NAME_CHANGED' case MembershipUpdateEvent_EventType.MEMBERS_ADDED: - return "MEMBERS_ADDED"; + return 'MEMBERS_ADDED' case MembershipUpdateEvent_EventType.MEMBER_JOINED: - return "MEMBER_JOINED"; + return 'MEMBER_JOINED' case MembershipUpdateEvent_EventType.MEMBER_REMOVED: - return "MEMBER_REMOVED"; + return 'MEMBER_REMOVED' case MembershipUpdateEvent_EventType.ADMINS_ADDED: - return "ADMINS_ADDED"; + return 'ADMINS_ADDED' case MembershipUpdateEvent_EventType.ADMIN_REMOVED: - return "ADMIN_REMOVED"; + return 'ADMIN_REMOVED' default: - return "UNKNOWN"; + return 'UNKNOWN' } } @@ -96,22 +96,22 @@ export function membershipUpdateEvent_EventTypeToJSON( */ export interface MembershipUpdateMessage { /** The chat id of the private group chat */ - chatId: string; + chatId: string /** * A list of events for this group chat, first x bytes are the signature, then is a * protobuf encoded MembershipUpdateEvent */ - events: Uint8Array[]; - message: ChatMessage | undefined; - emojiReaction: EmojiReaction | undefined; + events: Uint8Array[] + message: ChatMessage | undefined + emojiReaction: EmojiReaction | undefined } const baseMembershipUpdateEvent: object = { clock: 0, - members: "", - name: "", + members: '', + name: '', type: 0, -}; +} export const MembershipUpdateEvent = { encode( @@ -119,225 +119,225 @@ export const MembershipUpdateEvent = { writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.clock !== 0) { - writer.uint32(8).uint64(message.clock); + writer.uint32(8).uint64(message.clock) } for (const v of message.members) { - writer.uint32(18).string(v!); + writer.uint32(18).string(v!) } - if (message.name !== "") { - writer.uint32(26).string(message.name); + if (message.name !== '') { + writer.uint32(26).string(message.name) } if (message.type !== 0) { - writer.uint32(32).int32(message.type); + writer.uint32(32).int32(message.type) } - return writer; + return writer }, decode( input: _m0.Reader | Uint8Array, length?: number ): MembershipUpdateEvent { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMembershipUpdateEvent } as MembershipUpdateEvent; - message.members = []; + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = { ...baseMembershipUpdateEvent } as MembershipUpdateEvent + message.members = [] while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.clock = longToNumber(reader.uint64() as Long); - break; + message.clock = longToNumber(reader.uint64() as Long) + break case 2: - message.members.push(reader.string()); - break; + message.members.push(reader.string()) + break case 3: - message.name = reader.string(); - break; + message.name = reader.string() + break case 4: - message.type = reader.int32() as any; - break; + message.type = reader.int32() as any + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): MembershipUpdateEvent { - const message = { ...baseMembershipUpdateEvent } as MembershipUpdateEvent; - message.members = []; + const message = { ...baseMembershipUpdateEvent } as MembershipUpdateEvent + message.members = [] if (object.clock !== undefined && object.clock !== null) { - message.clock = Number(object.clock); + message.clock = Number(object.clock) } else { - message.clock = 0; + message.clock = 0 } if (object.members !== undefined && object.members !== null) { for (const e of object.members) { - message.members.push(String(e)); + message.members.push(String(e)) } } if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); + message.name = String(object.name) } else { - message.name = ""; + message.name = '' } if (object.type !== undefined && object.type !== null) { - message.type = membershipUpdateEvent_EventTypeFromJSON(object.type); + message.type = membershipUpdateEvent_EventTypeFromJSON(object.type) } else { - message.type = 0; + message.type = 0 } - return message; + return message }, toJSON(message: MembershipUpdateEvent): unknown { - const obj: any = {}; - message.clock !== undefined && (obj.clock = message.clock); + const obj: any = {} + message.clock !== undefined && (obj.clock = message.clock) if (message.members) { - obj.members = message.members.map((e) => e); + obj.members = message.members.map(e => e) } else { - obj.members = []; + obj.members = [] } - message.name !== undefined && (obj.name = message.name); + message.name !== undefined && (obj.name = message.name) message.type !== undefined && - (obj.type = membershipUpdateEvent_EventTypeToJSON(message.type)); - return obj; + (obj.type = membershipUpdateEvent_EventTypeToJSON(message.type)) + return obj }, fromPartial( object: DeepPartial ): MembershipUpdateEvent { - const message = { ...baseMembershipUpdateEvent } as MembershipUpdateEvent; - message.members = []; + const message = { ...baseMembershipUpdateEvent } as MembershipUpdateEvent + message.members = [] if (object.clock !== undefined && object.clock !== null) { - message.clock = object.clock; + message.clock = object.clock } else { - message.clock = 0; + message.clock = 0 } if (object.members !== undefined && object.members !== null) { for (const e of object.members) { - message.members.push(e); + message.members.push(e) } } if (object.name !== undefined && object.name !== null) { - message.name = object.name; + message.name = object.name } else { - message.name = ""; + message.name = '' } if (object.type !== undefined && object.type !== null) { - message.type = object.type; + message.type = object.type } else { - message.type = 0; + message.type = 0 } - return message; + return message }, -}; +} -const baseMembershipUpdateMessage: object = { chatId: "" }; +const baseMembershipUpdateMessage: object = { chatId: '' } export const MembershipUpdateMessage = { encode( message: MembershipUpdateMessage, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.chatId !== "") { - writer.uint32(10).string(message.chatId); + if (message.chatId !== '') { + writer.uint32(10).string(message.chatId) } for (const v of message.events) { - writer.uint32(18).bytes(v!); + writer.uint32(18).bytes(v!) } if (message.message !== undefined) { - ChatMessage.encode(message.message, writer.uint32(26).fork()).ldelim(); + ChatMessage.encode(message.message, writer.uint32(26).fork()).ldelim() } if (message.emojiReaction !== undefined) { EmojiReaction.encode( message.emojiReaction, writer.uint32(34).fork() - ).ldelim(); + ).ldelim() } - return writer; + return writer }, decode( input: _m0.Reader | Uint8Array, length?: number ): MembershipUpdateMessage { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length const message = { ...baseMembershipUpdateMessage, - } as MembershipUpdateMessage; - message.events = []; + } as MembershipUpdateMessage + message.events = [] while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.chatId = reader.string(); - break; + message.chatId = reader.string() + break case 2: - message.events.push(reader.bytes()); - break; + message.events.push(reader.bytes()) + break case 3: - message.message = ChatMessage.decode(reader, reader.uint32()); - break; + message.message = ChatMessage.decode(reader, reader.uint32()) + break case 4: - message.emojiReaction = EmojiReaction.decode(reader, reader.uint32()); - break; + message.emojiReaction = EmojiReaction.decode(reader, reader.uint32()) + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): MembershipUpdateMessage { const message = { ...baseMembershipUpdateMessage, - } as MembershipUpdateMessage; - message.events = []; + } as MembershipUpdateMessage + message.events = [] if (object.chatId !== undefined && object.chatId !== null) { - message.chatId = String(object.chatId); + message.chatId = String(object.chatId) } else { - message.chatId = ""; + message.chatId = '' } if (object.events !== undefined && object.events !== null) { for (const e of object.events) { - message.events.push(bytesFromBase64(e)); + message.events.push(bytesFromBase64(e)) } } if (object.message !== undefined && object.message !== null) { - message.message = ChatMessage.fromJSON(object.message); + message.message = ChatMessage.fromJSON(object.message) } else { - message.message = undefined; + message.message = undefined } if (object.emojiReaction !== undefined && object.emojiReaction !== null) { - message.emojiReaction = EmojiReaction.fromJSON(object.emojiReaction); + message.emojiReaction = EmojiReaction.fromJSON(object.emojiReaction) } else { - message.emojiReaction = undefined; + message.emojiReaction = undefined } - return message; + return message }, toJSON(message: MembershipUpdateMessage): unknown { - const obj: any = {}; - message.chatId !== undefined && (obj.chatId = message.chatId); + const obj: any = {} + message.chatId !== undefined && (obj.chatId = message.chatId) if (message.events) { - obj.events = message.events.map((e) => + obj.events = message.events.map(e => base64FromBytes(e !== undefined ? e : new Uint8Array()) - ); + ) } else { - obj.events = []; + obj.events = [] } message.message !== undefined && (obj.message = message.message ? ChatMessage.toJSON(message.message) - : undefined); + : undefined) message.emojiReaction !== undefined && (obj.emojiReaction = message.emojiReaction ? EmojiReaction.toJSON(message.emojiReaction) - : undefined); - return obj; + : undefined) + return obj }, fromPartial( @@ -345,64 +345,64 @@ export const MembershipUpdateMessage = { ): MembershipUpdateMessage { const message = { ...baseMembershipUpdateMessage, - } as MembershipUpdateMessage; - message.events = []; + } as MembershipUpdateMessage + message.events = [] if (object.chatId !== undefined && object.chatId !== null) { - message.chatId = object.chatId; + message.chatId = object.chatId } else { - message.chatId = ""; + message.chatId = '' } if (object.events !== undefined && object.events !== null) { for (const e of object.events) { - message.events.push(e); + message.events.push(e) } } if (object.message !== undefined && object.message !== null) { - message.message = ChatMessage.fromPartial(object.message); + message.message = ChatMessage.fromPartial(object.message) } else { - message.message = undefined; + message.message = undefined } if (object.emojiReaction !== undefined && object.emojiReaction !== null) { - message.emojiReaction = EmojiReaction.fromPartial(object.emojiReaction); + message.emojiReaction = EmojiReaction.fromPartial(object.emojiReaction) } else { - message.emojiReaction = undefined; + message.emojiReaction = undefined } - return message; + return message }, -}; +} -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: any | undefined; +declare var self: any | undefined +declare var window: any | undefined +declare var global: any | undefined var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); + if (typeof globalThis !== 'undefined') return globalThis + if (typeof self !== 'undefined') return self + if (typeof window !== 'undefined') return window + if (typeof global !== 'undefined') return global + throw 'Unable to locate global object' +})() const atob: (b64: string) => string = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); + (b64 => globalThis.Buffer.from(b64, 'base64').toString('binary')) function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); + const bin = atob(b64) + const arr = new Uint8Array(bin.length) for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); + arr[i] = bin.charCodeAt(i) } - return arr; + return arr } const btoa: (bin: string) => string = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); + (bin => globalThis.Buffer.from(bin, 'binary').toString('base64')) function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; + const bin: string[] = [] for (const byte of arr) { - bin.push(String.fromCharCode(byte)); + bin.push(String.fromCharCode(byte)) } - return btoa(bin.join("")); + return btoa(bin.join('')) } type Builtin = @@ -412,7 +412,7 @@ type Builtin = | string | number | boolean - | undefined; + | undefined export type DeepPartial = T extends Builtin ? T : T extends Array @@ -421,16 +421,16 @@ export type DeepPartial = T extends Builtin ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; + : Partial function longToNumber(long: Long): number { if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + throw new globalThis.Error('Value is larger than Number.MAX_SAFE_INTEGER') } - return long.toNumber(); + return long.toNumber() } if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); + _m0.util.Long = Long as any + _m0.configure() } diff --git a/packages/status-core/src/proto/communities/v1/status_update.ts b/packages/status-core/src/proto/communities/v1/status_update.ts index 31e9f122..5c299fa5 100644 --- a/packages/status-core/src/proto/communities/v1/status_update.ts +++ b/packages/status-core/src/proto/communities/v1/status_update.ts @@ -1,8 +1,8 @@ /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import Long from 'long' +import _m0 from 'protobufjs/minimal' -export const protobufPackage = "communities.v1"; +export const protobufPackage = 'communities.v1' /** * Specs: @@ -18,9 +18,9 @@ export const protobufPackage = "communities.v1"; * Note: Only send pings if the user interacted with the app in the last x minutes. */ export interface StatusUpdate { - clock: number; - statusType: StatusUpdate_StatusType; - customText: string; + clock: number + statusType: StatusUpdate_StatusType + customText: string } export enum StatusUpdate_StatusType { @@ -37,24 +37,24 @@ export function statusUpdate_StatusTypeFromJSON( ): StatusUpdate_StatusType { switch (object) { case 0: - case "UNKNOWN_STATUS_TYPE": - return StatusUpdate_StatusType.UNKNOWN_STATUS_TYPE; + case 'UNKNOWN_STATUS_TYPE': + return StatusUpdate_StatusType.UNKNOWN_STATUS_TYPE case 1: - case "AUTOMATIC": - return StatusUpdate_StatusType.AUTOMATIC; + case 'AUTOMATIC': + return StatusUpdate_StatusType.AUTOMATIC case 2: - case "DO_NOT_DISTURB": - return StatusUpdate_StatusType.DO_NOT_DISTURB; + case 'DO_NOT_DISTURB': + return StatusUpdate_StatusType.DO_NOT_DISTURB case 3: - case "ALWAYS_ONLINE": - return StatusUpdate_StatusType.ALWAYS_ONLINE; + case 'ALWAYS_ONLINE': + return StatusUpdate_StatusType.ALWAYS_ONLINE case 4: - case "INACTIVE": - return StatusUpdate_StatusType.INACTIVE; + case 'INACTIVE': + return StatusUpdate_StatusType.INACTIVE case -1: - case "UNRECOGNIZED": + case 'UNRECOGNIZED': default: - return StatusUpdate_StatusType.UNRECOGNIZED; + return StatusUpdate_StatusType.UNRECOGNIZED } } @@ -63,21 +63,21 @@ export function statusUpdate_StatusTypeToJSON( ): string { switch (object) { case StatusUpdate_StatusType.UNKNOWN_STATUS_TYPE: - return "UNKNOWN_STATUS_TYPE"; + return 'UNKNOWN_STATUS_TYPE' case StatusUpdate_StatusType.AUTOMATIC: - return "AUTOMATIC"; + return 'AUTOMATIC' case StatusUpdate_StatusType.DO_NOT_DISTURB: - return "DO_NOT_DISTURB"; + return 'DO_NOT_DISTURB' case StatusUpdate_StatusType.ALWAYS_ONLINE: - return "ALWAYS_ONLINE"; + return 'ALWAYS_ONLINE' case StatusUpdate_StatusType.INACTIVE: - return "INACTIVE"; + return 'INACTIVE' default: - return "UNKNOWN"; + return 'UNKNOWN' } } -const baseStatusUpdate: object = { clock: 0, statusType: 0, customText: "" }; +const baseStatusUpdate: object = { clock: 0, statusType: 0, customText: '' } export const StatusUpdate = { encode( @@ -85,101 +85,101 @@ export const StatusUpdate = { writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.clock !== 0) { - writer.uint32(8).uint64(message.clock); + writer.uint32(8).uint64(message.clock) } if (message.statusType !== 0) { - writer.uint32(16).int32(message.statusType); + writer.uint32(16).int32(message.statusType) } - if (message.customText !== "") { - writer.uint32(26).string(message.customText); + if (message.customText !== '') { + writer.uint32(26).string(message.customText) } - return writer; + return writer }, decode(input: _m0.Reader | Uint8Array, length?: number): StatusUpdate { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseStatusUpdate } as StatusUpdate; + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = { ...baseStatusUpdate } as StatusUpdate while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.clock = longToNumber(reader.uint64() as Long); - break; + message.clock = longToNumber(reader.uint64() as Long) + break case 2: - message.statusType = reader.int32() as any; - break; + message.statusType = reader.int32() as any + break case 3: - message.customText = reader.string(); - break; + message.customText = reader.string() + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): StatusUpdate { - const message = { ...baseStatusUpdate } as StatusUpdate; + const message = { ...baseStatusUpdate } as StatusUpdate if (object.clock !== undefined && object.clock !== null) { - message.clock = Number(object.clock); + message.clock = Number(object.clock) } else { - message.clock = 0; + message.clock = 0 } if (object.statusType !== undefined && object.statusType !== null) { - message.statusType = statusUpdate_StatusTypeFromJSON(object.statusType); + message.statusType = statusUpdate_StatusTypeFromJSON(object.statusType) } else { - message.statusType = 0; + message.statusType = 0 } if (object.customText !== undefined && object.customText !== null) { - message.customText = String(object.customText); + message.customText = String(object.customText) } else { - message.customText = ""; + message.customText = '' } - return message; + return message }, toJSON(message: StatusUpdate): unknown { - const obj: any = {}; - message.clock !== undefined && (obj.clock = message.clock); + const obj: any = {} + message.clock !== undefined && (obj.clock = message.clock) message.statusType !== undefined && - (obj.statusType = statusUpdate_StatusTypeToJSON(message.statusType)); - message.customText !== undefined && (obj.customText = message.customText); - return obj; + (obj.statusType = statusUpdate_StatusTypeToJSON(message.statusType)) + message.customText !== undefined && (obj.customText = message.customText) + return obj }, fromPartial(object: DeepPartial): StatusUpdate { - const message = { ...baseStatusUpdate } as StatusUpdate; + const message = { ...baseStatusUpdate } as StatusUpdate if (object.clock !== undefined && object.clock !== null) { - message.clock = object.clock; + message.clock = object.clock } else { - message.clock = 0; + message.clock = 0 } if (object.statusType !== undefined && object.statusType !== null) { - message.statusType = object.statusType; + message.statusType = object.statusType } else { - message.statusType = 0; + message.statusType = 0 } if (object.customText !== undefined && object.customText !== null) { - message.customText = object.customText; + message.customText = object.customText } else { - message.customText = ""; + message.customText = '' } - return message; + return message }, -}; +} -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: any | undefined; +declare var self: any | undefined +declare var window: any | undefined +declare var global: any | undefined var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); + if (typeof globalThis !== 'undefined') return globalThis + if (typeof self !== 'undefined') return self + if (typeof window !== 'undefined') return window + if (typeof global !== 'undefined') return global + throw 'Unable to locate global object' +})() type Builtin = | Date @@ -188,7 +188,7 @@ type Builtin = | string | number | boolean - | undefined; + | undefined export type DeepPartial = T extends Builtin ? T : T extends Array @@ -197,16 +197,16 @@ export type DeepPartial = T extends Builtin ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; + : Partial function longToNumber(long: Long): number { if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + throw new globalThis.Error('Value is larger than Number.MAX_SAFE_INTEGER') } - return long.toNumber(); + return long.toNumber() } if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); + _m0.util.Long = Long as any + _m0.configure() } diff --git a/packages/status-core/src/proto/status/v1/application_metadata_message.ts b/packages/status-core/src/proto/status/v1/application_metadata_message.ts index 25a169f9..15bfb831 100644 --- a/packages/status-core/src/proto/status/v1/application_metadata_message.ts +++ b/packages/status-core/src/proto/status/v1/application_metadata_message.ts @@ -1,16 +1,16 @@ /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import Long from 'long' +import _m0 from 'protobufjs/minimal' -export const protobufPackage = "status.v1"; +export const protobufPackage = 'status.v1' export interface ApplicationMetadataMessage { /** Signature of the payload field */ - signature: Uint8Array; + signature: Uint8Array /** This is the encoded protobuf of the application level message, i.e ChatMessage */ - payload: Uint8Array; + payload: Uint8Array /** The type of protobuf message sent */ - type: ApplicationMetadataMessage_Type; + type: ApplicationMetadataMessage_Type } export enum ApplicationMetadataMessage_Type { @@ -56,111 +56,111 @@ export function applicationMetadataMessage_TypeFromJSON( ): ApplicationMetadataMessage_Type { switch (object) { case 0: - case "TYPE_UNKNOWN_UNSPECIFIED": - return ApplicationMetadataMessage_Type.TYPE_UNKNOWN_UNSPECIFIED; + case 'TYPE_UNKNOWN_UNSPECIFIED': + return ApplicationMetadataMessage_Type.TYPE_UNKNOWN_UNSPECIFIED case 1: - case "TYPE_CHAT_MESSAGE": - return ApplicationMetadataMessage_Type.TYPE_CHAT_MESSAGE; + case 'TYPE_CHAT_MESSAGE': + return ApplicationMetadataMessage_Type.TYPE_CHAT_MESSAGE case 2: - case "TYPE_CONTACT_UPDATE": - return ApplicationMetadataMessage_Type.TYPE_CONTACT_UPDATE; + case 'TYPE_CONTACT_UPDATE': + return ApplicationMetadataMessage_Type.TYPE_CONTACT_UPDATE case 3: - case "TYPE_MEMBERSHIP_UPDATE_MESSAGE": - return ApplicationMetadataMessage_Type.TYPE_MEMBERSHIP_UPDATE_MESSAGE; + case 'TYPE_MEMBERSHIP_UPDATE_MESSAGE': + return ApplicationMetadataMessage_Type.TYPE_MEMBERSHIP_UPDATE_MESSAGE case 4: - case "TYPE_PAIR_INSTALLATION": - return ApplicationMetadataMessage_Type.TYPE_PAIR_INSTALLATION; + case 'TYPE_PAIR_INSTALLATION': + return ApplicationMetadataMessage_Type.TYPE_PAIR_INSTALLATION case 5: - case "TYPE_SYNC_INSTALLATION": - return ApplicationMetadataMessage_Type.TYPE_SYNC_INSTALLATION; + case 'TYPE_SYNC_INSTALLATION': + return ApplicationMetadataMessage_Type.TYPE_SYNC_INSTALLATION case 6: - case "TYPE_REQUEST_ADDRESS_FOR_TRANSACTION": - return ApplicationMetadataMessage_Type.TYPE_REQUEST_ADDRESS_FOR_TRANSACTION; + case 'TYPE_REQUEST_ADDRESS_FOR_TRANSACTION': + return ApplicationMetadataMessage_Type.TYPE_REQUEST_ADDRESS_FOR_TRANSACTION case 7: - case "TYPE_ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION": - return ApplicationMetadataMessage_Type.TYPE_ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION; + case 'TYPE_ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION': + return ApplicationMetadataMessage_Type.TYPE_ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION case 8: - case "TYPE_DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION": - return ApplicationMetadataMessage_Type.TYPE_DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION; + case 'TYPE_DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION': + return ApplicationMetadataMessage_Type.TYPE_DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION case 9: - case "TYPE_REQUEST_TRANSACTION": - return ApplicationMetadataMessage_Type.TYPE_REQUEST_TRANSACTION; + case 'TYPE_REQUEST_TRANSACTION': + return ApplicationMetadataMessage_Type.TYPE_REQUEST_TRANSACTION case 10: - case "TYPE_SEND_TRANSACTION": - return ApplicationMetadataMessage_Type.TYPE_SEND_TRANSACTION; + case 'TYPE_SEND_TRANSACTION': + return ApplicationMetadataMessage_Type.TYPE_SEND_TRANSACTION case 11: - case "TYPE_DECLINE_REQUEST_TRANSACTION": - return ApplicationMetadataMessage_Type.TYPE_DECLINE_REQUEST_TRANSACTION; + case 'TYPE_DECLINE_REQUEST_TRANSACTION': + return ApplicationMetadataMessage_Type.TYPE_DECLINE_REQUEST_TRANSACTION case 12: - case "TYPE_SYNC_INSTALLATION_CONTACT": - return ApplicationMetadataMessage_Type.TYPE_SYNC_INSTALLATION_CONTACT; + case 'TYPE_SYNC_INSTALLATION_CONTACT': + return ApplicationMetadataMessage_Type.TYPE_SYNC_INSTALLATION_CONTACT case 13: - case "TYPE_SYNC_INSTALLATION_ACCOUNT": - return ApplicationMetadataMessage_Type.TYPE_SYNC_INSTALLATION_ACCOUNT; + case 'TYPE_SYNC_INSTALLATION_ACCOUNT': + return ApplicationMetadataMessage_Type.TYPE_SYNC_INSTALLATION_ACCOUNT case 14: - case "TYPE_SYNC_INSTALLATION_PUBLIC_CHAT": - return ApplicationMetadataMessage_Type.TYPE_SYNC_INSTALLATION_PUBLIC_CHAT; + case 'TYPE_SYNC_INSTALLATION_PUBLIC_CHAT': + return ApplicationMetadataMessage_Type.TYPE_SYNC_INSTALLATION_PUBLIC_CHAT case 15: - case "TYPE_CONTACT_CODE_ADVERTISEMENT": - return ApplicationMetadataMessage_Type.TYPE_CONTACT_CODE_ADVERTISEMENT; + case 'TYPE_CONTACT_CODE_ADVERTISEMENT': + return ApplicationMetadataMessage_Type.TYPE_CONTACT_CODE_ADVERTISEMENT case 16: - case "TYPE_PUSH_NOTIFICATION_REGISTRATION": - return ApplicationMetadataMessage_Type.TYPE_PUSH_NOTIFICATION_REGISTRATION; + case 'TYPE_PUSH_NOTIFICATION_REGISTRATION': + return ApplicationMetadataMessage_Type.TYPE_PUSH_NOTIFICATION_REGISTRATION case 17: - case "TYPE_PUSH_NOTIFICATION_REGISTRATION_RESPONSE": - return ApplicationMetadataMessage_Type.TYPE_PUSH_NOTIFICATION_REGISTRATION_RESPONSE; + case 'TYPE_PUSH_NOTIFICATION_REGISTRATION_RESPONSE': + return ApplicationMetadataMessage_Type.TYPE_PUSH_NOTIFICATION_REGISTRATION_RESPONSE case 18: - case "TYPE_PUSH_NOTIFICATION_QUERY": - return ApplicationMetadataMessage_Type.TYPE_PUSH_NOTIFICATION_QUERY; + case 'TYPE_PUSH_NOTIFICATION_QUERY': + return ApplicationMetadataMessage_Type.TYPE_PUSH_NOTIFICATION_QUERY case 19: - case "TYPE_PUSH_NOTIFICATION_QUERY_RESPONSE": - return ApplicationMetadataMessage_Type.TYPE_PUSH_NOTIFICATION_QUERY_RESPONSE; + case 'TYPE_PUSH_NOTIFICATION_QUERY_RESPONSE': + return ApplicationMetadataMessage_Type.TYPE_PUSH_NOTIFICATION_QUERY_RESPONSE case 20: - case "TYPE_PUSH_NOTIFICATION_REQUEST": - return ApplicationMetadataMessage_Type.TYPE_PUSH_NOTIFICATION_REQUEST; + case 'TYPE_PUSH_NOTIFICATION_REQUEST': + return ApplicationMetadataMessage_Type.TYPE_PUSH_NOTIFICATION_REQUEST case 21: - case "TYPE_PUSH_NOTIFICATION_RESPONSE": - return ApplicationMetadataMessage_Type.TYPE_PUSH_NOTIFICATION_RESPONSE; + case 'TYPE_PUSH_NOTIFICATION_RESPONSE': + return ApplicationMetadataMessage_Type.TYPE_PUSH_NOTIFICATION_RESPONSE case 22: - case "TYPE_EMOJI_REACTION": - return ApplicationMetadataMessage_Type.TYPE_EMOJI_REACTION; + case 'TYPE_EMOJI_REACTION': + return ApplicationMetadataMessage_Type.TYPE_EMOJI_REACTION case 23: - case "TYPE_GROUP_CHAT_INVITATION": - return ApplicationMetadataMessage_Type.TYPE_GROUP_CHAT_INVITATION; + case 'TYPE_GROUP_CHAT_INVITATION': + return ApplicationMetadataMessage_Type.TYPE_GROUP_CHAT_INVITATION case 24: - case "TYPE_CHAT_IDENTITY": - return ApplicationMetadataMessage_Type.TYPE_CHAT_IDENTITY; + case 'TYPE_CHAT_IDENTITY': + return ApplicationMetadataMessage_Type.TYPE_CHAT_IDENTITY case 25: - case "TYPE_COMMUNITY_DESCRIPTION": - return ApplicationMetadataMessage_Type.TYPE_COMMUNITY_DESCRIPTION; + case 'TYPE_COMMUNITY_DESCRIPTION': + return ApplicationMetadataMessage_Type.TYPE_COMMUNITY_DESCRIPTION case 26: - case "TYPE_COMMUNITY_INVITATION": - return ApplicationMetadataMessage_Type.TYPE_COMMUNITY_INVITATION; + case 'TYPE_COMMUNITY_INVITATION': + return ApplicationMetadataMessage_Type.TYPE_COMMUNITY_INVITATION case 27: - case "TYPE_COMMUNITY_REQUEST_TO_JOIN": - return ApplicationMetadataMessage_Type.TYPE_COMMUNITY_REQUEST_TO_JOIN; + case 'TYPE_COMMUNITY_REQUEST_TO_JOIN': + return ApplicationMetadataMessage_Type.TYPE_COMMUNITY_REQUEST_TO_JOIN case 28: - case "TYPE_PIN_MESSAGE": - return ApplicationMetadataMessage_Type.TYPE_PIN_MESSAGE; + case 'TYPE_PIN_MESSAGE': + return ApplicationMetadataMessage_Type.TYPE_PIN_MESSAGE case 29: - case "TYPE_EDIT_MESSAGE": - return ApplicationMetadataMessage_Type.TYPE_EDIT_MESSAGE; + case 'TYPE_EDIT_MESSAGE': + return ApplicationMetadataMessage_Type.TYPE_EDIT_MESSAGE case 30: - case "TYPE_STATUS_UPDATE": - return ApplicationMetadataMessage_Type.TYPE_STATUS_UPDATE; + case 'TYPE_STATUS_UPDATE': + return ApplicationMetadataMessage_Type.TYPE_STATUS_UPDATE case 31: - case "TYPE_DELETE_MESSAGE": - return ApplicationMetadataMessage_Type.TYPE_DELETE_MESSAGE; + case 'TYPE_DELETE_MESSAGE': + return ApplicationMetadataMessage_Type.TYPE_DELETE_MESSAGE case 32: - case "TYPE_SYNC_INSTALLATION_COMMUNITY": - return ApplicationMetadataMessage_Type.TYPE_SYNC_INSTALLATION_COMMUNITY; + case 'TYPE_SYNC_INSTALLATION_COMMUNITY': + return ApplicationMetadataMessage_Type.TYPE_SYNC_INSTALLATION_COMMUNITY case 33: - case "TYPE_ANONYMOUS_METRIC_BATCH": - return ApplicationMetadataMessage_Type.TYPE_ANONYMOUS_METRIC_BATCH; + case 'TYPE_ANONYMOUS_METRIC_BATCH': + return ApplicationMetadataMessage_Type.TYPE_ANONYMOUS_METRIC_BATCH case -1: - case "UNRECOGNIZED": + case 'UNRECOGNIZED': default: - return ApplicationMetadataMessage_Type.UNRECOGNIZED; + return ApplicationMetadataMessage_Type.UNRECOGNIZED } } @@ -169,79 +169,79 @@ export function applicationMetadataMessage_TypeToJSON( ): string { switch (object) { case ApplicationMetadataMessage_Type.TYPE_UNKNOWN_UNSPECIFIED: - return "TYPE_UNKNOWN_UNSPECIFIED"; + return 'TYPE_UNKNOWN_UNSPECIFIED' case ApplicationMetadataMessage_Type.TYPE_CHAT_MESSAGE: - return "TYPE_CHAT_MESSAGE"; + return 'TYPE_CHAT_MESSAGE' case ApplicationMetadataMessage_Type.TYPE_CONTACT_UPDATE: - return "TYPE_CONTACT_UPDATE"; + return 'TYPE_CONTACT_UPDATE' case ApplicationMetadataMessage_Type.TYPE_MEMBERSHIP_UPDATE_MESSAGE: - return "TYPE_MEMBERSHIP_UPDATE_MESSAGE"; + return 'TYPE_MEMBERSHIP_UPDATE_MESSAGE' case ApplicationMetadataMessage_Type.TYPE_PAIR_INSTALLATION: - return "TYPE_PAIR_INSTALLATION"; + return 'TYPE_PAIR_INSTALLATION' case ApplicationMetadataMessage_Type.TYPE_SYNC_INSTALLATION: - return "TYPE_SYNC_INSTALLATION"; + return 'TYPE_SYNC_INSTALLATION' case ApplicationMetadataMessage_Type.TYPE_REQUEST_ADDRESS_FOR_TRANSACTION: - return "TYPE_REQUEST_ADDRESS_FOR_TRANSACTION"; + return 'TYPE_REQUEST_ADDRESS_FOR_TRANSACTION' case ApplicationMetadataMessage_Type.TYPE_ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION: - return "TYPE_ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION"; + return 'TYPE_ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION' case ApplicationMetadataMessage_Type.TYPE_DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION: - return "TYPE_DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION"; + return 'TYPE_DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION' case ApplicationMetadataMessage_Type.TYPE_REQUEST_TRANSACTION: - return "TYPE_REQUEST_TRANSACTION"; + return 'TYPE_REQUEST_TRANSACTION' case ApplicationMetadataMessage_Type.TYPE_SEND_TRANSACTION: - return "TYPE_SEND_TRANSACTION"; + return 'TYPE_SEND_TRANSACTION' case ApplicationMetadataMessage_Type.TYPE_DECLINE_REQUEST_TRANSACTION: - return "TYPE_DECLINE_REQUEST_TRANSACTION"; + return 'TYPE_DECLINE_REQUEST_TRANSACTION' case ApplicationMetadataMessage_Type.TYPE_SYNC_INSTALLATION_CONTACT: - return "TYPE_SYNC_INSTALLATION_CONTACT"; + return 'TYPE_SYNC_INSTALLATION_CONTACT' case ApplicationMetadataMessage_Type.TYPE_SYNC_INSTALLATION_ACCOUNT: - return "TYPE_SYNC_INSTALLATION_ACCOUNT"; + return 'TYPE_SYNC_INSTALLATION_ACCOUNT' case ApplicationMetadataMessage_Type.TYPE_SYNC_INSTALLATION_PUBLIC_CHAT: - return "TYPE_SYNC_INSTALLATION_PUBLIC_CHAT"; + return 'TYPE_SYNC_INSTALLATION_PUBLIC_CHAT' case ApplicationMetadataMessage_Type.TYPE_CONTACT_CODE_ADVERTISEMENT: - return "TYPE_CONTACT_CODE_ADVERTISEMENT"; + return 'TYPE_CONTACT_CODE_ADVERTISEMENT' case ApplicationMetadataMessage_Type.TYPE_PUSH_NOTIFICATION_REGISTRATION: - return "TYPE_PUSH_NOTIFICATION_REGISTRATION"; + return 'TYPE_PUSH_NOTIFICATION_REGISTRATION' case ApplicationMetadataMessage_Type.TYPE_PUSH_NOTIFICATION_REGISTRATION_RESPONSE: - return "TYPE_PUSH_NOTIFICATION_REGISTRATION_RESPONSE"; + return 'TYPE_PUSH_NOTIFICATION_REGISTRATION_RESPONSE' case ApplicationMetadataMessage_Type.TYPE_PUSH_NOTIFICATION_QUERY: - return "TYPE_PUSH_NOTIFICATION_QUERY"; + return 'TYPE_PUSH_NOTIFICATION_QUERY' case ApplicationMetadataMessage_Type.TYPE_PUSH_NOTIFICATION_QUERY_RESPONSE: - return "TYPE_PUSH_NOTIFICATION_QUERY_RESPONSE"; + return 'TYPE_PUSH_NOTIFICATION_QUERY_RESPONSE' case ApplicationMetadataMessage_Type.TYPE_PUSH_NOTIFICATION_REQUEST: - return "TYPE_PUSH_NOTIFICATION_REQUEST"; + return 'TYPE_PUSH_NOTIFICATION_REQUEST' case ApplicationMetadataMessage_Type.TYPE_PUSH_NOTIFICATION_RESPONSE: - return "TYPE_PUSH_NOTIFICATION_RESPONSE"; + return 'TYPE_PUSH_NOTIFICATION_RESPONSE' case ApplicationMetadataMessage_Type.TYPE_EMOJI_REACTION: - return "TYPE_EMOJI_REACTION"; + return 'TYPE_EMOJI_REACTION' case ApplicationMetadataMessage_Type.TYPE_GROUP_CHAT_INVITATION: - return "TYPE_GROUP_CHAT_INVITATION"; + return 'TYPE_GROUP_CHAT_INVITATION' case ApplicationMetadataMessage_Type.TYPE_CHAT_IDENTITY: - return "TYPE_CHAT_IDENTITY"; + return 'TYPE_CHAT_IDENTITY' case ApplicationMetadataMessage_Type.TYPE_COMMUNITY_DESCRIPTION: - return "TYPE_COMMUNITY_DESCRIPTION"; + return 'TYPE_COMMUNITY_DESCRIPTION' case ApplicationMetadataMessage_Type.TYPE_COMMUNITY_INVITATION: - return "TYPE_COMMUNITY_INVITATION"; + return 'TYPE_COMMUNITY_INVITATION' case ApplicationMetadataMessage_Type.TYPE_COMMUNITY_REQUEST_TO_JOIN: - return "TYPE_COMMUNITY_REQUEST_TO_JOIN"; + return 'TYPE_COMMUNITY_REQUEST_TO_JOIN' case ApplicationMetadataMessage_Type.TYPE_PIN_MESSAGE: - return "TYPE_PIN_MESSAGE"; + return 'TYPE_PIN_MESSAGE' case ApplicationMetadataMessage_Type.TYPE_EDIT_MESSAGE: - return "TYPE_EDIT_MESSAGE"; + return 'TYPE_EDIT_MESSAGE' case ApplicationMetadataMessage_Type.TYPE_STATUS_UPDATE: - return "TYPE_STATUS_UPDATE"; + return 'TYPE_STATUS_UPDATE' case ApplicationMetadataMessage_Type.TYPE_DELETE_MESSAGE: - return "TYPE_DELETE_MESSAGE"; + return 'TYPE_DELETE_MESSAGE' case ApplicationMetadataMessage_Type.TYPE_SYNC_INSTALLATION_COMMUNITY: - return "TYPE_SYNC_INSTALLATION_COMMUNITY"; + return 'TYPE_SYNC_INSTALLATION_COMMUNITY' case ApplicationMetadataMessage_Type.TYPE_ANONYMOUS_METRIC_BATCH: - return "TYPE_ANONYMOUS_METRIC_BATCH"; + return 'TYPE_ANONYMOUS_METRIC_BATCH' default: - return "UNKNOWN"; + return 'UNKNOWN' } } -const baseApplicationMetadataMessage: object = { type: 0 }; +const baseApplicationMetadataMessage: object = { type: 0 } export const ApplicationMetadataMessage = { encode( @@ -249,81 +249,81 @@ export const ApplicationMetadataMessage = { writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.signature.length !== 0) { - writer.uint32(10).bytes(message.signature); + writer.uint32(10).bytes(message.signature) } if (message.payload.length !== 0) { - writer.uint32(18).bytes(message.payload); + writer.uint32(18).bytes(message.payload) } if (message.type !== 0) { - writer.uint32(24).int32(message.type); + writer.uint32(24).int32(message.type) } - return writer; + return writer }, decode( input: _m0.Reader | Uint8Array, length?: number ): ApplicationMetadataMessage { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input) + let end = length === undefined ? reader.len : reader.pos + length const message = { ...baseApplicationMetadataMessage, - } as ApplicationMetadataMessage; - message.signature = new Uint8Array(); - message.payload = new Uint8Array(); + } as ApplicationMetadataMessage + message.signature = new Uint8Array() + message.payload = new Uint8Array() while (reader.pos < end) { - const tag = reader.uint32(); + const tag = reader.uint32() switch (tag >>> 3) { case 1: - message.signature = reader.bytes(); - break; + message.signature = reader.bytes() + break case 2: - message.payload = reader.bytes(); - break; + message.payload = reader.bytes() + break case 3: - message.type = reader.int32() as any; - break; + message.type = reader.int32() as any + break default: - reader.skipType(tag & 7); - break; + reader.skipType(tag & 7) + break } } - return message; + return message }, fromJSON(object: any): ApplicationMetadataMessage { const message = { ...baseApplicationMetadataMessage, - } as ApplicationMetadataMessage; - message.signature = new Uint8Array(); - message.payload = new Uint8Array(); + } as ApplicationMetadataMessage + message.signature = new Uint8Array() + message.payload = new Uint8Array() if (object.signature !== undefined && object.signature !== null) { - message.signature = bytesFromBase64(object.signature); + message.signature = bytesFromBase64(object.signature) } if (object.payload !== undefined && object.payload !== null) { - message.payload = bytesFromBase64(object.payload); + message.payload = bytesFromBase64(object.payload) } if (object.type !== undefined && object.type !== null) { - message.type = applicationMetadataMessage_TypeFromJSON(object.type); + message.type = applicationMetadataMessage_TypeFromJSON(object.type) } else { - message.type = 0; + message.type = 0 } - return message; + return message }, toJSON(message: ApplicationMetadataMessage): unknown { - const obj: any = {}; + const obj: any = {} message.signature !== undefined && (obj.signature = base64FromBytes( message.signature !== undefined ? message.signature : new Uint8Array() - )); + )) message.payload !== undefined && (obj.payload = base64FromBytes( message.payload !== undefined ? message.payload : new Uint8Array() - )); + )) message.type !== undefined && - (obj.type = applicationMetadataMessage_TypeToJSON(message.type)); - return obj; + (obj.type = applicationMetadataMessage_TypeToJSON(message.type)) + return obj }, fromPartial( @@ -331,58 +331,58 @@ export const ApplicationMetadataMessage = { ): ApplicationMetadataMessage { const message = { ...baseApplicationMetadataMessage, - } as ApplicationMetadataMessage; + } as ApplicationMetadataMessage if (object.signature !== undefined && object.signature !== null) { - message.signature = object.signature; + message.signature = object.signature } else { - message.signature = new Uint8Array(); + message.signature = new Uint8Array() } if (object.payload !== undefined && object.payload !== null) { - message.payload = object.payload; + message.payload = object.payload } else { - message.payload = new Uint8Array(); + message.payload = new Uint8Array() } if (object.type !== undefined && object.type !== null) { - message.type = object.type; + message.type = object.type } else { - message.type = 0; + message.type = 0 } - return message; + return message }, -}; +} -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: any | undefined; +declare var self: any | undefined +declare var window: any | undefined +declare var global: any | undefined var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); + if (typeof globalThis !== 'undefined') return globalThis + if (typeof self !== 'undefined') return self + if (typeof window !== 'undefined') return window + if (typeof global !== 'undefined') return global + throw 'Unable to locate global object' +})() const atob: (b64: string) => string = globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); + (b64 => globalThis.Buffer.from(b64, 'base64').toString('binary')) function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); + const bin = atob(b64) + const arr = new Uint8Array(bin.length) for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); + arr[i] = bin.charCodeAt(i) } - return arr; + return arr } const btoa: (bin: string) => string = globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); + (bin => globalThis.Buffer.from(bin, 'binary').toString('base64')) function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; + const bin: string[] = [] for (const byte of arr) { - bin.push(String.fromCharCode(byte)); + bin.push(String.fromCharCode(byte)) } - return btoa(bin.join("")); + return btoa(bin.join('')) } type Builtin = @@ -392,7 +392,7 @@ type Builtin = | string | number | boolean - | undefined; + | undefined export type DeepPartial = T extends Builtin ? T : T extends Array @@ -401,9 +401,9 @@ export type DeepPartial = T extends Builtin ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; + : Partial if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); + _m0.util.Long = Long as any + _m0.configure() } diff --git a/packages/status-core/src/topics.ts b/packages/status-core/src/topics.ts index 389706c4..8e651ff1 100644 --- a/packages/status-core/src/topics.ts +++ b/packages/status-core/src/topics.ts @@ -1,15 +1,15 @@ -import { BN } from "bn.js"; -import { derive } from "ecies-geth"; -import { ec } from "elliptic"; -import { bufToHex } from "js-waku/build/main/lib/utils"; +import { BN } from 'bn.js' +import { derive } from 'ecies-geth' +import { ec } from 'elliptic' +import { bufToHex } from 'js-waku/build/main/lib/utils' -import { idToContentTopic } from "./contentTopic"; -import { hexToBuf } from "./utils"; +import { idToContentTopic } from './contentTopic' +import { hexToBuf } from './utils' -import { Identity } from "."; +import { Identity } from '.' -const EC = new ec("secp256k1"); -const partitionsNum = new BN(5000); +const EC = new ec('secp256k1') +const partitionsNum = new BN(5000) /** * Get the partitioned topic https://specs.status.im/spec/3#partitioned-topic @@ -17,14 +17,14 @@ const partitionsNum = new BN(5000); * @returns string The Waku v2 Content Topic. */ export function getPartitionedTopic(publicKey: string): string { - const key = EC.keyFromPublic(publicKey.slice(2), "hex"); - const X = key.getPublic().getX(); + const key = EC.keyFromPublic(publicKey.slice(2), 'hex') + const X = key.getPublic().getX() - const partition = X.mod(partitionsNum); + const partition = X.mod(partitionsNum) - const partitionTopic = `contact-discovery-${partition.toString()}`; + const partitionTopic = `contact-discovery-${partition.toString()}` - return idToContentTopic(partitionTopic); + return idToContentTopic(partitionTopic) } /** @@ -37,10 +37,10 @@ export async function getNegotiatedTopic( identity: Identity, publicKey: string ): Promise { - const key = EC.keyFromPublic(publicKey.slice(2), "hex"); + const key = EC.keyFromPublic(publicKey.slice(2), 'hex') const sharedSecret = await derive( Buffer.from(identity.privateKey), - hexToBuf(key.getPublic("hex")) - ); - return idToContentTopic(bufToHex(sharedSecret)); + hexToBuf(key.getPublic('hex')) + ) + return idToContentTopic(bufToHex(sharedSecret)) } diff --git a/packages/status-core/src/utils.ts b/packages/status-core/src/utils.ts index 84ecf2ff..0c558145 100644 --- a/packages/status-core/src/utils.ts +++ b/packages/status-core/src/utils.ts @@ -1,57 +1,57 @@ -import { ec } from "elliptic"; -import { PageDirection, utils, Waku } from "js-waku"; +import { ec } from 'elliptic' +import { PageDirection, utils, Waku } from 'js-waku' -import { idToContactCodeTopic } from "./contentTopic"; -import { ChatIdentity } from "./proto/communities/v1/chat_identity"; +import { idToContactCodeTopic } from './contentTopic' +import { ChatIdentity } from './proto/communities/v1/chat_identity' -const EC = new ec("secp256k1"); +const EC = new ec('secp256k1') -const hexToBuf = utils.hexToBuf; -export { hexToBuf }; +const hexToBuf = utils.hexToBuf +export { hexToBuf } /** * Return hex string with 0x prefix (commonly used for string format of a community id/public key. */ export function bufToHex(buf: Uint8Array): string { - return "0x" + utils.bufToHex(buf); + return '0x' + utils.bufToHex(buf) } export function compressPublicKey(key: Uint8Array): string { - const PubKey = EC.keyFromPublic(key); - return "0x" + PubKey.getPublic(true, "hex"); + const PubKey = EC.keyFromPublic(key) + return '0x' + PubKey.getPublic(true, 'hex') } export function genPrivateKeyWithEntropy(key: string): Uint8Array { - const pair = EC.genKeyPair({ entropy: key }); - return hexToBuf("0x" + pair.getPrivate("hex")); + const pair = EC.genKeyPair({ entropy: key }) + return hexToBuf('0x' + pair.getPrivate('hex')) } export async function getLatestUserNickname( key: Uint8Array, waku: Waku ): Promise<{ clock: number; nickname: string }> { - const publicKey = bufToHex(key); - let nickname = ""; - let clock = 0; + const publicKey = bufToHex(key) + let nickname = '' + let clock = 0 await waku.store.queryHistory([idToContactCodeTopic(publicKey)], { - callback: (msgs) => - msgs.some((e) => { + callback: msgs => + msgs.some(e => { try { if (e.payload) { - const chatIdentity = ChatIdentity.decode(e?.payload); + const chatIdentity = ChatIdentity.decode(e?.payload) if (chatIdentity) { if (chatIdentity?.displayName) { - clock = chatIdentity?.clock ?? 0; - nickname = chatIdentity?.displayName; + clock = chatIdentity?.clock ?? 0 + nickname = chatIdentity?.displayName } } - return true; + return true } } catch { - return false; + return false } }), pageDirection: PageDirection.BACKWARD, - }); - return { clock, nickname }; + }) + return { clock, nickname } } diff --git a/packages/status-core/src/wire/application_metadata_message.ts b/packages/status-core/src/wire/application_metadata_message.ts index f7458b57..48fbbdc4 100644 --- a/packages/status-core/src/wire/application_metadata_message.ts +++ b/packages/status-core/src/wire/application_metadata_message.ts @@ -1,13 +1,13 @@ -import { keccak256 } from "js-sha3"; -import { Reader } from "protobufjs"; -import secp256k1 from "secp256k1"; +import { keccak256 } from 'js-sha3' +import { Reader } from 'protobufjs' +import secp256k1 from 'secp256k1' -import { Identity } from "../identity"; -import * as proto from "../proto/status/v1/application_metadata_message"; -import { ApplicationMetadataMessage_Type } from "../proto/status/v1/application_metadata_message"; -import { hexToBuf } from "../utils"; +import { Identity } from '../identity' +import * as proto from '../proto/status/v1/application_metadata_message' +import { ApplicationMetadataMessage_Type } from '../proto/status/v1/application_metadata_message' +import { hexToBuf } from '../utils' -import { ChatMessage } from "./chat_message"; +import { ChatMessage } from './chat_message' export class ApplicationMetadataMessage { private constructor(public proto: proto.ApplicationMetadataMessage) {} @@ -20,56 +20,56 @@ export class ApplicationMetadataMessage { type: ApplicationMetadataMessage_Type, identity: Identity ): ApplicationMetadataMessage { - const signature = identity.sign(payload); + const signature = identity.sign(payload) const proto = { signature, payload, type, - }; + } - return new ApplicationMetadataMessage(proto); + return new ApplicationMetadataMessage(proto) } static decode(bytes: Uint8Array): ApplicationMetadataMessage { const protoBuf = proto.ApplicationMetadataMessage.decode( Reader.create(bytes) - ); + ) - return new ApplicationMetadataMessage(protoBuf); + return new ApplicationMetadataMessage(protoBuf) } encode(): Uint8Array { - return proto.ApplicationMetadataMessage.encode(this.proto).finish(); + return proto.ApplicationMetadataMessage.encode(this.proto).finish() } public get signature(): Uint8Array | undefined { - return this.proto.signature; + return this.proto.signature } public get payload(): Uint8Array | undefined { - return this.proto.payload; + return this.proto.payload } public get type(): ApplicationMetadataMessage_Type | undefined { - return this.proto.type; + return this.proto.type } /** * Returns a chat message if the type is [TYPE_CHAT_MESSAGE], undefined otherwise. */ public get chatMessage(): ChatMessage | undefined { - if (!this.payload) return; + if (!this.payload) return - return ChatMessage.decode(this.payload); + return ChatMessage.decode(this.payload) } public get signer(): Uint8Array | undefined { - if (!this.signature || !this.payload) return; + if (!this.signature || !this.payload) return - const signature = this.signature.slice(0, 64); - const recid = this.signature.slice(64)[0]; - const hash = keccak256(this.payload); + const signature = this.signature.slice(0, 64) + const recid = this.signature.slice(64)[0] + const hash = keccak256(this.payload) - return secp256k1.ecdsaRecover(signature, recid, hexToBuf(hash)); + return secp256k1.ecdsaRecover(signature, recid, hexToBuf(hash)) } } diff --git a/packages/status-core/src/wire/chat_identity.ts b/packages/status-core/src/wire/chat_identity.ts index b43c8ecb..68559ecb 100644 --- a/packages/status-core/src/wire/chat_identity.ts +++ b/packages/status-core/src/wire/chat_identity.ts @@ -1,51 +1,51 @@ -import { Reader } from "protobufjs"; +import { Reader } from 'protobufjs' -import * as proto from "../proto/communities/v1/chat_identity"; -import { IdentityImage } from "../proto/communities/v1/chat_identity"; +import * as proto from '../proto/communities/v1/chat_identity' +import { IdentityImage } from '../proto/communities/v1/chat_identity' export class ChatIdentity { public constructor(public proto: proto.ChatIdentity) {} static decode(bytes: Uint8Array): ChatIdentity { - const protoBuf = proto.ChatIdentity.decode(Reader.create(bytes)); + const protoBuf = proto.ChatIdentity.decode(Reader.create(bytes)) - return new ChatIdentity(protoBuf); + return new ChatIdentity(protoBuf) } encode(): Uint8Array { - return proto.ChatIdentity.encode(this.proto).finish(); + return proto.ChatIdentity.encode(this.proto).finish() } /** Lamport timestamp of the message */ get clock(): number | undefined { - return this.proto.clock; + return this.proto.clock } /** ens_name is the valid ENS name associated with the chat key */ get ensName(): string | undefined { - return this.proto.ensName; + return this.proto.ensName } /** images is a string indexed mapping of images associated with an identity */ get images(): { [key: string]: IdentityImage } | undefined { - return this.proto.images; + return this.proto.images } /** display name is the user set identity, valid only for organisations */ get displayName(): string | undefined { - return this.proto.displayName; + return this.proto.displayName } /** description is the user set description, valid only for organisations */ get description(): string | undefined { - return this.proto.description; + return this.proto.description } get color(): string | undefined { - return this.proto.color; + return this.proto.color } get emoji(): string | undefined { - return this.proto.emoji; + return this.proto.emoji } } diff --git a/packages/status-core/src/wire/chat_message.spec.ts b/packages/status-core/src/wire/chat_message.spec.ts index 48c0a56e..b63c14e3 100644 --- a/packages/status-core/src/wire/chat_message.spec.ts +++ b/packages/status-core/src/wire/chat_message.spec.ts @@ -1,10 +1,10 @@ -import { expect } from "chai"; +import { expect } from 'chai' import { AudioMessage_AudioType, ChatMessage_ContentType, -} from "../proto/communities/v1/chat_message"; -import { ImageType } from "../proto/communities/v1/enums"; +} from '../proto/communities/v1/chat_message' +import { ImageType } from '../proto/communities/v1/enums' import { AudioContent, @@ -12,67 +12,67 @@ import { ContentType, ImageContent, StickerContent, -} from "./chat_message"; +} from './chat_message' -describe("Chat Message", () => { - it("Encode & decode Image message", () => { - const payload = Buffer.from([1, 1]); +describe('Chat Message', () => { + it('Encode & decode Image message', () => { + const payload = Buffer.from([1, 1]) const imageContent: ImageContent = { image: payload, imageType: ImageType.IMAGE_TYPE_PNG, contentType: ContentType.Image, - }; + } - const message = ChatMessage.createMessage(1, 1, "chat-id", imageContent); + const message = ChatMessage.createMessage(1, 1, 'chat-id', imageContent) - const buf = message.encode(); - const dec = ChatMessage.decode(buf); + const buf = message.encode() + const dec = ChatMessage.decode(buf) - expect(dec.contentType).eq(ChatMessage_ContentType.CONTENT_TYPE_IMAGE); - expect(dec.image?.payload?.toString()).eq(payload.toString()); - expect(dec.image?.type).eq(ImageType.IMAGE_TYPE_PNG); - }); + expect(dec.contentType).eq(ChatMessage_ContentType.CONTENT_TYPE_IMAGE) + expect(dec.image?.payload?.toString()).eq(payload.toString()) + expect(dec.image?.type).eq(ImageType.IMAGE_TYPE_PNG) + }) - it("Encode & decode Audio message", () => { - const payload = Buffer.from([1, 1]); - const durationMs = 12345; + it('Encode & decode Audio message', () => { + const payload = Buffer.from([1, 1]) + const durationMs = 12345 const audioContent: AudioContent = { audio: payload, audioType: AudioMessage_AudioType.AUDIO_TYPE_AAC, durationMs, contentType: ContentType.Audio, - }; + } - const message = ChatMessage.createMessage(1, 1, "chat-id", audioContent); + const message = ChatMessage.createMessage(1, 1, 'chat-id', audioContent) - const buf = message.encode(); - const dec = ChatMessage.decode(buf); + const buf = message.encode() + const dec = ChatMessage.decode(buf) - expect(dec.contentType).eq(ChatMessage_ContentType.CONTENT_TYPE_AUDIO); - expect(dec.audio?.payload?.toString()).eq(payload.toString()); - expect(dec.audio?.type).eq(ImageType.IMAGE_TYPE_PNG); - expect(dec.audio?.durationMs).eq(durationMs); - }); + expect(dec.contentType).eq(ChatMessage_ContentType.CONTENT_TYPE_AUDIO) + expect(dec.audio?.payload?.toString()).eq(payload.toString()) + expect(dec.audio?.type).eq(ImageType.IMAGE_TYPE_PNG) + expect(dec.audio?.durationMs).eq(durationMs) + }) - it("Encode & decode Sticker message", () => { - const hash = "deadbeef"; - const pack = 12345; + it('Encode & decode Sticker message', () => { + const hash = 'deadbeef' + const pack = 12345 const stickerContent: StickerContent = { hash, pack, contentType: ContentType.Sticker, - }; + } - const message = ChatMessage.createMessage(1, 1, "chat-id", stickerContent); + const message = ChatMessage.createMessage(1, 1, 'chat-id', stickerContent) - const buf = message.encode(); - const dec = ChatMessage.decode(buf); + const buf = message.encode() + const dec = ChatMessage.decode(buf) - expect(dec.contentType).eq(ChatMessage_ContentType.CONTENT_TYPE_STICKER); - expect(dec.sticker?.hash).eq(hash); - expect(dec.sticker?.pack).eq(pack); - }); -}); + expect(dec.contentType).eq(ChatMessage_ContentType.CONTENT_TYPE_STICKER) + expect(dec.sticker?.hash).eq(hash) + expect(dec.sticker?.pack).eq(pack) + }) +}) diff --git a/packages/status-core/src/wire/chat_message.ts b/packages/status-core/src/wire/chat_message.ts index 3dda0482..e96dd19b 100644 --- a/packages/status-core/src/wire/chat_message.ts +++ b/packages/status-core/src/wire/chat_message.ts @@ -1,20 +1,16 @@ -import { Reader } from "protobufjs"; +import { Reader } from 'protobufjs' -import * as proto from "../proto/communities/v1/chat_message"; +import * as proto from '../proto/communities/v1/chat_message' import { AudioMessage, AudioMessage_AudioType, ChatMessage_ContentType, ImageMessage, StickerMessage, -} from "../proto/communities/v1/chat_message"; -import { ImageType, MessageType } from "../proto/communities/v1/enums"; +} from '../proto/communities/v1/chat_message' +import { ImageType, MessageType } from '../proto/communities/v1/enums' -export type Content = - | TextContent - | StickerContent - | ImageContent - | AudioContent; +export type Content = TextContent | StickerContent | ImageContent | AudioContent export enum ContentType { Text, @@ -24,43 +20,43 @@ export enum ContentType { } export interface TextContent { - text: string; - contentType: ContentType.Text; + text: string + contentType: ContentType.Text } export interface StickerContent { - hash: string; - pack: number; - contentType: ContentType.Sticker; + hash: string + pack: number + contentType: ContentType.Sticker } export interface ImageContent { - image: Uint8Array; - imageType: ImageType; - contentType: ContentType.Image; + image: Uint8Array + imageType: ImageType + contentType: ContentType.Image } export interface AudioContent { - audio: Uint8Array; - audioType: AudioMessage_AudioType; - durationMs: number; - contentType: ContentType.Audio; + audio: Uint8Array + audioType: AudioMessage_AudioType + durationMs: number + contentType: ContentType.Audio } function isText(content: Content): content is TextContent { - return content.contentType === ContentType.Text; + return content.contentType === ContentType.Text } function isSticker(content: Content): content is StickerContent { - return content.contentType === ContentType.Sticker; + return content.contentType === ContentType.Sticker } function isImage(content: Content): content is ImageContent { - return content.contentType === ContentType.Image; + return content.contentType === ContentType.Image } function isAudio(content: Content): content is AudioContent { - return content.contentType === ContentType.Audio; + return content.contentType === ContentType.Audio } export class ChatMessage { @@ -81,36 +77,36 @@ export class ChatMessage { let sticker, image, audio, - text = "Upgrade to the latest version to see this media content."; - let contentType = ChatMessage_ContentType.CONTENT_TYPE_TEXT_PLAIN; + text = 'Upgrade to the latest version to see this media content.' + let contentType = ChatMessage_ContentType.CONTENT_TYPE_TEXT_PLAIN if (isText(content)) { - if (!content.text) throw "Malformed Text Content"; - text = content.text; - contentType = ChatMessage_ContentType.CONTENT_TYPE_TEXT_PLAIN; + if (!content.text) throw 'Malformed Text Content' + text = content.text + contentType = ChatMessage_ContentType.CONTENT_TYPE_TEXT_PLAIN } else if (isSticker(content)) { - if (!content.hash || !content.pack) throw "Malformed Sticker Content"; + if (!content.hash || !content.pack) throw 'Malformed Sticker Content' sticker = { hash: content.hash, pack: content.pack, - }; - contentType = ChatMessage_ContentType.CONTENT_TYPE_STICKER; + } + contentType = ChatMessage_ContentType.CONTENT_TYPE_STICKER } else if (isImage(content)) { - if (!content.image || !content.imageType) throw "Malformed Image Content"; + if (!content.image || !content.imageType) throw 'Malformed Image Content' image = { payload: content.image, type: content.imageType, - }; - contentType = ChatMessage_ContentType.CONTENT_TYPE_IMAGE; + } + contentType = ChatMessage_ContentType.CONTENT_TYPE_IMAGE } else if (isAudio(content)) { if (!content.audio || !content.audioType || !content.durationMs) - throw "Malformed Audio Content"; + throw 'Malformed Audio Content' audio = { payload: content.audio, type: content.audioType, durationMs: content.durationMs, - }; - contentType = ChatMessage_ContentType.CONTENT_TYPE_AUDIO; + } + contentType = ChatMessage_ContentType.CONTENT_TYPE_AUDIO } const proto = { @@ -118,9 +114,9 @@ export class ChatMessage { timestamp, //ms? text, /** Id of the message that we are replying to */ - responseTo: responseTo ?? "", + responseTo: responseTo ?? '', /** Ens name of the sender */ - ensName: "", + ensName: '', /** Public Key of the community (TBC) **/ chatId, /** The type of message (public/one-to-one/private-group-chat) */ @@ -132,24 +128,24 @@ export class ChatMessage { audio, community: undefined, // Used to share a community grant: undefined, - }; + } - return new ChatMessage(proto); + return new ChatMessage(proto) } static decode(bytes: Uint8Array): ChatMessage { - const protoBuf = proto.ChatMessage.decode(Reader.create(bytes)); + const protoBuf = proto.ChatMessage.decode(Reader.create(bytes)) - return new ChatMessage(protoBuf); + return new ChatMessage(protoBuf) } encode(): Uint8Array { - return proto.ChatMessage.encode(this.proto).finish(); + return proto.ChatMessage.encode(this.proto).finish() } /** Lamport timestamp of the chat message */ public get clock(): number | undefined { - return this.proto.clock; + return this.proto.clock } /** @@ -157,28 +153,28 @@ export class ChatMessage { * so that we don't rely on it */ public get timestamp(): number | undefined { - return this.proto.timestamp; + return this.proto.timestamp } /** * Text of the message */ public get text(): string | undefined { - return this.proto.text; + return this.proto.text } /** * Id of the message that we are replying to */ public get responseTo(): string | undefined { - return this.proto.responseTo; + return this.proto.responseTo } /** * Ens name of the sender */ public get ensName(): string | undefined { - return this.proto.ensName; + return this.proto.ensName } /** @@ -188,39 +184,39 @@ export class ChatMessage { * Probably should be the concatenation of sender-pk & receiver-pk in alphabetical order */ public get chatId(): string { - return this.proto.chatId; + return this.proto.chatId } /** * The type of message (public/one-to-one/private-group-chat) */ public get messageType(): MessageType | undefined { - return this.proto.messageType; + return this.proto.messageType } /** * The type of the content of the message */ public get contentType(): ChatMessage_ContentType | undefined { - return this.proto.contentType; + return this.proto.contentType } public get sticker(): StickerMessage | undefined { - return this.proto.sticker; + return this.proto.sticker } public get image(): ImageMessage | undefined { - return this.proto.image; + return this.proto.image } public get audio(): AudioMessage | undefined { - return this.proto.audio; + return this.proto.audio } /** * Used when sharing a community via a chat message. */ public get community(): Uint8Array | undefined { - return this.proto.community; + return this.proto.community } } diff --git a/packages/status-core/src/wire/community_chat.ts b/packages/status-core/src/wire/community_chat.ts index 474c2b99..abcc476e 100644 --- a/packages/status-core/src/wire/community_chat.ts +++ b/packages/status-core/src/wire/community_chat.ts @@ -1,12 +1,12 @@ -import { Reader } from "protobufjs"; +import { Reader } from 'protobufjs' -import * as proto from "../proto/communities/v1/communities"; +import * as proto from '../proto/communities/v1/communities' import { CommunityMember, CommunityPermissions, -} from "../proto/communities/v1/communities"; +} from '../proto/communities/v1/communities' -import { ChatIdentity } from "./chat_identity"; +import { ChatIdentity } from './chat_identity' export class CommunityChat { public constructor(public proto: proto.CommunityChat) {} @@ -17,43 +17,43 @@ export class CommunityChat { * @throws */ static decode(bytes: Uint8Array): CommunityChat { - const protoBuf = proto.CommunityChat.decode(Reader.create(bytes)); + const protoBuf = proto.CommunityChat.decode(Reader.create(bytes)) - return new CommunityChat(protoBuf); + return new CommunityChat(protoBuf) } encode(): Uint8Array { - return proto.CommunityChat.encode(this.proto).finish(); + return proto.CommunityChat.encode(this.proto).finish() } // TODO: check and document what is the key of the returned Map; public get members(): Map { - const map = new Map(); + const map = new Map() for (const key of Object.keys(this.proto.members)) { - map.set(key, this.proto.members[key]); + map.set(key, this.proto.members[key]) } - return map; + return map } public get permissions(): CommunityPermissions | undefined { - return this.proto.permissions; + return this.proto.permissions } public get identity(): ChatIdentity | undefined { - if (!this.proto.identity) return; + if (!this.proto.identity) return - return new ChatIdentity(this.proto.identity); + return new ChatIdentity(this.proto.identity) } // TODO: Document this public get categoryId(): string | undefined { - return this.proto.categoryId; + return this.proto.categoryId } // TODO: Document this public get position(): number | undefined { - return this.proto.position; + return this.proto.position } } diff --git a/packages/status-core/src/wire/community_description.ts b/packages/status-core/src/wire/community_description.ts index b4bef503..d02cc8af 100644 --- a/packages/status-core/src/wire/community_description.ts +++ b/packages/status-core/src/wire/community_description.ts @@ -1,29 +1,29 @@ -import debug from "debug"; -import { WakuMessage, WakuStore } from "js-waku"; -import { Reader } from "protobufjs"; +import debug from 'debug' +import { WakuMessage, WakuStore } from 'js-waku' +import { Reader } from 'protobufjs' -import { idToContentTopic } from "../contentTopic"; -import { createSymKeyFromPassword } from "../encryption"; -import * as proto from "../proto/communities/v1/communities"; -import { bufToHex } from "../utils"; +import { idToContentTopic } from '../contentTopic' +import { createSymKeyFromPassword } from '../encryption' +import * as proto from '../proto/communities/v1/communities' +import { bufToHex } from '../utils' -import { ApplicationMetadataMessage } from "./application_metadata_message"; -import { ChatIdentity } from "./chat_identity"; -import { CommunityChat } from "./community_chat"; +import { ApplicationMetadataMessage } from './application_metadata_message' +import { ChatIdentity } from './chat_identity' +import { CommunityChat } from './community_chat' -const dbg = debug("communities:wire:community_description"); +const dbg = debug('communities:wire:community_description') export class CommunityDescription { private constructor(public proto: proto.CommunityDescription) {} static decode(bytes: Uint8Array): CommunityDescription { - const protoBuf = proto.CommunityDescription.decode(Reader.create(bytes)); + const protoBuf = proto.CommunityDescription.decode(Reader.create(bytes)) - return new CommunityDescription(protoBuf); + return new CommunityDescription(protoBuf) } encode(): Uint8Array { - return proto.CommunityDescription.encode(this.proto).finish(); + return proto.CommunityDescription.encode(this.proto).finish() } /** @@ -33,69 +33,69 @@ export class CommunityDescription { communityPublicKey: Uint8Array, wakuStore: WakuStore ): Promise { - const hexCommunityPublicKey = bufToHex(communityPublicKey); - const contentTopic = idToContentTopic(hexCommunityPublicKey); + const hexCommunityPublicKey = bufToHex(communityPublicKey) + const contentTopic = idToContentTopic(hexCommunityPublicKey) - let communityDescription: CommunityDescription | undefined; + let communityDescription: CommunityDescription | undefined const callback = (messages: WakuMessage[]): void => { // Value found, stop processing - if (communityDescription) return; + if (communityDescription) return // Process most recent message first - const orderedMessages = messages.reverse(); + const orderedMessages = messages.reverse() orderedMessages.forEach((message: WakuMessage) => { - if (!message.payload) return; + if (!message.payload) return try { - const metadata = ApplicationMetadataMessage.decode(message.payload); - if (!metadata.payload) return; + const metadata = ApplicationMetadataMessage.decode(message.payload) + if (!metadata.payload) return const _communityDescription = CommunityDescription.decode( metadata.payload - ); + ) - if (!_communityDescription.identity) return; + if (!_communityDescription.identity) return - communityDescription = _communityDescription; + communityDescription = _communityDescription } catch (e) { dbg( `Failed to decode message as CommunityDescription found on content topic ${contentTopic}`, e - ); + ) } - }); - }; + }) + } - const symKey = await createSymKeyFromPassword(hexCommunityPublicKey); + const symKey = await createSymKeyFromPassword(hexCommunityPublicKey) await wakuStore .queryHistory([contentTopic], { callback, decryptionKeys: [symKey], }) - .catch((e) => { + .catch(e => { dbg( `Failed to retrieve community description for ${hexCommunityPublicKey}`, e - ); - }); + ) + }) - return communityDescription; + return communityDescription } get identity(): ChatIdentity | undefined { - if (!this.proto.identity) return; + if (!this.proto.identity) return - return new ChatIdentity(this.proto.identity); + return new ChatIdentity(this.proto.identity) } get chats(): Map { - const map = new Map(); + const map = new Map() for (const key of Object.keys(this.proto.chats)) { - map.set(key, this.proto.chats[key]); + map.set(key, this.proto.chats[key]) } - return map; + return map } } diff --git a/packages/status-core/src/wire/membership_update_message.ts b/packages/status-core/src/wire/membership_update_message.ts index bc4bd543..1787d0b9 100644 --- a/packages/status-core/src/wire/membership_update_message.ts +++ b/packages/status-core/src/wire/membership_update_message.ts @@ -1,73 +1,73 @@ -import { keccak256 } from "js-sha3"; -import { Reader } from "protobufjs"; -import * as secp256k1 from "secp256k1"; -import { v4 as uuidV4 } from "uuid"; +import { keccak256 } from 'js-sha3' +import { Reader } from 'protobufjs' +import * as secp256k1 from 'secp256k1' +import { v4 as uuidV4 } from 'uuid' -import { Identity } from ".."; -import * as proto from "../proto/communities/v1/membership_update_message"; -import { bufToHex, hexToBuf } from "../utils"; +import { Identity } from '..' +import * as proto from '../proto/communities/v1/membership_update_message' +import { bufToHex, hexToBuf } from '../utils' export class MembershipUpdateEvent { public constructor(public proto: proto.MembershipUpdateEvent) {} static decode(bytes: Uint8Array): MembershipUpdateEvent { - const protoBuf = proto.MembershipUpdateEvent.decode(Reader.create(bytes)); - return new MembershipUpdateEvent(protoBuf); + const protoBuf = proto.MembershipUpdateEvent.decode(Reader.create(bytes)) + return new MembershipUpdateEvent(protoBuf) } encode(): Uint8Array { - return proto.MembershipUpdateEvent.encode(this.proto).finish(); + return proto.MembershipUpdateEvent.encode(this.proto).finish() } public get members(): string[] { - return this.proto.members; + return this.proto.members } public get name(): string { - return this.proto.name; + return this.proto.name } public get clock(): number { - return this.proto.clock; + return this.proto.clock } public get type(): proto.MembershipUpdateEvent_EventType { - return this.proto.type; + return this.proto.type } } export class MembershipSignedEvent { - public sig: Uint8Array; - public event: MembershipUpdateEvent; - private chatId: string; + public sig: Uint8Array + public event: MembershipUpdateEvent + private chatId: string public constructor( sig: Uint8Array, event: MembershipUpdateEvent, chatId: string ) { - this.sig = sig; - this.event = event; - this.chatId = chatId; + this.sig = sig + this.event = event + this.chatId = chatId } public get signer(): Uint8Array | undefined { - const encEvent = this.event.encode(); - const eventToSign = Buffer.concat([hexToBuf(this.chatId), encEvent]); + const encEvent = this.event.encode() + const eventToSign = Buffer.concat([hexToBuf(this.chatId), encEvent]) - if (!this.sig || !eventToSign) return; + if (!this.sig || !eventToSign) return - const signature = this.sig.slice(0, 64); - const recid = this.sig.slice(64)[0]; - const hash = keccak256(eventToSign); + const signature = this.sig.slice(0, 64) + const recid = this.sig.slice(64)[0] + const hash = keccak256(eventToSign) - return secp256k1.ecdsaRecover(signature, recid, hexToBuf(hash)); + return secp256k1.ecdsaRecover(signature, recid, hexToBuf(hash)) } } export class MembershipUpdateMessage { - private clock: number = Date.now(); - private identity: Identity = Identity.generate(); + private clock: number = Date.now() + private identity: Identity = Identity.generate() public constructor(public proto: proto.MembershipUpdateMessage) {} public static create( @@ -77,18 +77,18 @@ export class MembershipUpdateMessage { const partial = proto.MembershipUpdateMessage.fromPartial({ chatId, events: [], - }); - const newMessage = new MembershipUpdateMessage(partial); - newMessage.clock = Date.now(); - newMessage.identity = identity; - return newMessage; + }) + const newMessage = new MembershipUpdateMessage(partial) + newMessage.clock = Date.now() + newMessage.identity = identity + return newMessage } private addEvent(event: MembershipUpdateEvent): void { - const encEvent = event.encode(); - const eventToSign = Buffer.concat([hexToBuf(this.proto.chatId), encEvent]); - const signature = this.identity.sign(eventToSign); - this.proto.events.push(Buffer.concat([signature, encEvent])); + const encEvent = event.encode() + const eventToSign = Buffer.concat([hexToBuf(this.proto.chatId), encEvent]) + const signature = this.identity.sign(eventToSign) + this.proto.events.push(Buffer.concat([signature, encEvent])) } public static createChat( @@ -96,106 +96,106 @@ export class MembershipUpdateMessage { members: string[], name?: string ): MembershipUpdateMessage { - const chatId = `${uuidV4()}-${bufToHex(identity.publicKey)}`; + const chatId = `${uuidV4()}-${bufToHex(identity.publicKey)}` - const message = this.create(chatId, identity); - const type = proto.MembershipUpdateEvent_EventType.CHAT_CREATED; + const message = this.create(chatId, identity) + const type = proto.MembershipUpdateEvent_EventType.CHAT_CREATED const event = new MembershipUpdateEvent({ clock: message.clock, members, - name: name ?? "", + name: name ?? '', type, - }); - message.addEvent(event); - return message; + }) + message.addEvent(event) + return message } public addNameChangeEvent(name: string): void { - const type = proto.MembershipUpdateEvent_EventType.NAME_CHANGED; + const type = proto.MembershipUpdateEvent_EventType.NAME_CHANGED const event = new MembershipUpdateEvent({ clock: this.clock, members: [], name: name, type, - }); - this.addEvent(event); + }) + this.addEvent(event) } public addMembersAddedEvent(members: string[]): void { - const type = proto.MembershipUpdateEvent_EventType.MEMBERS_ADDED; + const type = proto.MembershipUpdateEvent_EventType.MEMBERS_ADDED const event = new MembershipUpdateEvent({ clock: this.clock, members, - name: "", + name: '', type, - }); - this.addEvent(event); + }) + this.addEvent(event) } public addMemberJoinedEvent(member: string): void { - const type = proto.MembershipUpdateEvent_EventType.MEMBER_JOINED; + const type = proto.MembershipUpdateEvent_EventType.MEMBER_JOINED const event = new MembershipUpdateEvent({ clock: this.clock, members: [member], - name: "", + name: '', type, - }); - this.addEvent(event); + }) + this.addEvent(event) } public addMemberRemovedEvent(member: string): void { - const type = proto.MembershipUpdateEvent_EventType.MEMBER_REMOVED; + const type = proto.MembershipUpdateEvent_EventType.MEMBER_REMOVED const event = new MembershipUpdateEvent({ clock: this.clock, members: [member], - name: "", + name: '', type, - }); - this.addEvent(event); + }) + this.addEvent(event) } public addAdminsAddedEvent(members: string[]): void { - const type = proto.MembershipUpdateEvent_EventType.ADMINS_ADDED; + const type = proto.MembershipUpdateEvent_EventType.ADMINS_ADDED const event = new MembershipUpdateEvent({ clock: this.clock, members, - name: "", + name: '', type, - }); - this.addEvent(event); + }) + this.addEvent(event) } public addAdminRemovedEvent(member: string): void { - const type = proto.MembershipUpdateEvent_EventType.ADMINS_ADDED; + const type = proto.MembershipUpdateEvent_EventType.ADMINS_ADDED const event = new MembershipUpdateEvent({ clock: this.clock, members: [member], - name: "", + name: '', type, - }); - this.addEvent(event); + }) + this.addEvent(event) } static decode(bytes: Uint8Array): MembershipUpdateMessage { - const protoBuf = proto.MembershipUpdateMessage.decode(Reader.create(bytes)); - return new MembershipUpdateMessage(protoBuf); + const protoBuf = proto.MembershipUpdateMessage.decode(Reader.create(bytes)) + return new MembershipUpdateMessage(protoBuf) } public get events(): MembershipSignedEvent[] { - return this.proto.events.map((bufArray) => { + return this.proto.events.map(bufArray => { return new MembershipSignedEvent( bufArray.slice(0, 65), MembershipUpdateEvent.decode(bufArray.slice(65)), this.chatId - ); - }); + ) + }) } public get chatId(): string { - return this.proto.chatId; + return this.proto.chatId } encode(): Uint8Array { - return proto.MembershipUpdateMessage.encode(this.proto).finish(); + return proto.MembershipUpdateMessage.encode(this.proto).finish() } } diff --git a/packages/status-core/src/wire/status_update.ts b/packages/status-core/src/wire/status_update.ts index 25d5e357..f1573cf6 100644 --- a/packages/status-core/src/wire/status_update.ts +++ b/packages/status-core/src/wire/status_update.ts @@ -1,6 +1,6 @@ -import { Reader } from "protobufjs"; +import { Reader } from 'protobufjs' -import * as proto from "../proto/communities/v1/status_update"; +import * as proto from '../proto/communities/v1/status_update' export class StatusUpdate { public constructor(public proto: proto.StatusUpdate) {} @@ -9,15 +9,15 @@ export class StatusUpdate { statusType: proto.StatusUpdate_StatusType, customText: string ): StatusUpdate { - const clock = Date.now(); + const clock = Date.now() const proto = { clock, statusType, customText, - }; + } - return new StatusUpdate(proto); + return new StatusUpdate(proto) } /** @@ -26,24 +26,24 @@ export class StatusUpdate { * @throws */ static decode(bytes: Uint8Array): StatusUpdate { - const protoBuf = proto.StatusUpdate.decode(Reader.create(bytes)); + const protoBuf = proto.StatusUpdate.decode(Reader.create(bytes)) - return new StatusUpdate(protoBuf); + return new StatusUpdate(protoBuf) } encode(): Uint8Array { - return proto.StatusUpdate.encode(this.proto).finish(); + return proto.StatusUpdate.encode(this.proto).finish() } public get clock(): number | undefined { - return this.proto.clock; + return this.proto.clock } public get statusType(): proto.StatusUpdate_StatusType | undefined { - return this.proto.statusType; + return this.proto.statusType } public get customText(): string | undefined { - return this.proto.customText; + return this.proto.customText } } diff --git a/packages/status-react/package.json b/packages/status-react/package.json index 8f6911ac..b3ceca3f 100644 --- a/packages/status-react/package.json +++ b/packages/status-react/package.json @@ -19,11 +19,9 @@ "build:esm": "tsc --module es2020 --target es2017 --outDir dist/esm", "build:cjs": "tsc --outDir dist/cjs", "fix": "run-s 'fix:*'", - "fix:prettier": "prettier './{src,test}/**/*.{ts,tsx}' \"./*.json\" --write", "fix:lint": "eslint './{src,test}/**/*.{ts,tsx}' --fix", "test": "run-s 'test:*'", "test:lint": "eslint './{src,test}/**/*.{ts,tsx}'", - "test:prettier": "prettier './{src,test}/**/*.{ts,tsx}' \"./*.json\" --list-different", "proto": "run-s 'proto:*'", "proto:lint": "buf lint", "proto:build": "buf generate" @@ -49,7 +47,6 @@ "mocha": "^9.0.3", "npm-run-all": "^4.1.5", "npm-watch": "^0.11.0", - "prettier": "^2.3.2", "qrcode.react": "^1.0.1", "rimraf": "^3.0.2", "ts-node": "^10.1.0", diff --git a/packages/status-react/src/components/ActivityCenter/ActivityButton.tsx b/packages/status-react/src/components/ActivityCenter/ActivityButton.tsx index 939b7ee2..a2c5a875 100644 --- a/packages/status-react/src/components/ActivityCenter/ActivityButton.tsx +++ b/packages/status-react/src/components/ActivityCenter/ActivityButton.tsx @@ -1,30 +1,30 @@ -import React, { useMemo, useRef, useState } from "react"; -import styled from "styled-components"; +import React, { useMemo, useRef, useState } from 'react' +import styled from 'styled-components' -import { useIdentity } from "../../contexts/identityProvider"; -import { useActivities } from "../../hooks/useActivities"; -import { useClickOutside } from "../../hooks/useClickOutside"; -import { TopBtn } from "../Chat/ChatTopbar"; -import { ActivityIcon } from "../Icons/ActivityIcon"; +import { useIdentity } from '../../contexts/identityProvider' +import { useActivities } from '../../hooks/useActivities' +import { useClickOutside } from '../../hooks/useClickOutside' +import { TopBtn } from '../Chat/ChatTopbar' +import { ActivityIcon } from '../Icons/ActivityIcon' -import { ActivityCenter } from "./ActivityCenter"; +import { ActivityCenter } from './ActivityCenter' interface ActivityButtonProps { - className?: string; + className?: string } export function ActivityButton({ className }: ActivityButtonProps) { - const { activities, activityDispatch } = useActivities(); - const identity = useIdentity(); - const disabled = useMemo(() => !identity, [identity]); - const ref = useRef(null); - useClickOutside(ref, () => setShowActivityCenter(false)); + const { activities, activityDispatch } = useActivities() + const identity = useIdentity() + const disabled = useMemo(() => !identity, [identity]) + const ref = useRef(null) + useClickOutside(ref, () => setShowActivityCenter(false)) - const [showActivityCenter, setShowActivityCenter] = useState(false); + const [showActivityCenter, setShowActivityCenter] = useState(false) const badgeAmount = useMemo( - () => activities.filter((activity) => !activity.isRead).length, + () => activities.filter(activity => !activity.isRead).length, [activities] - ); + ) return ( @@ -37,13 +37,13 @@ export function ActivityButton({ className }: ActivityButtonProps) { 99 - ? "countless" + ? 'countless' : badgeAmount > 9 - ? "wide" + ? 'wide' : undefined } > - {badgeAmount < 100 ? badgeAmount : "∞"} + {badgeAmount < 100 ? badgeAmount : '∞'} )} @@ -55,7 +55,7 @@ export function ActivityButton({ className }: ActivityButtonProps) { /> )} - ); + ) } export const ActivityWrapper = styled.div` @@ -64,7 +64,7 @@ export const ActivityWrapper = styled.div` position: relative; &:before { - content: ""; + content: ''; position: absolute; left: 0; top: 50%; @@ -85,7 +85,7 @@ export const ActivityWrapper = styled.div` height: 0px; } } -`; +` const NotificationBagde = styled.div` width: 18px; @@ -113,4 +113,4 @@ const NotificationBagde = styled.div` &.countless { width: 22px; } -`; +` diff --git a/packages/status-react/src/components/ActivityCenter/ActivityCenter.tsx b/packages/status-react/src/components/ActivityCenter/ActivityCenter.tsx index 5c18c8d3..6fbd70ec 100644 --- a/packages/status-react/src/components/ActivityCenter/ActivityCenter.tsx +++ b/packages/status-react/src/components/ActivityCenter/ActivityCenter.tsx @@ -1,21 +1,21 @@ -import React, { useMemo, useState } from "react"; -import styled from "styled-components"; +import React, { useMemo, useState } from 'react' +import styled from 'styled-components' -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { ActivityAction } from "../../hooks/useActivities"; -import { Activity } from "../../models/Activity"; -import { buttonTransparentStyles } from "../Buttons/buttonStyle"; -import { Tooltip } from "../Form/Tooltip"; -import { HideIcon } from "../Icons/HideIcon"; -import { ReadIcon } from "../Icons/ReadIcon"; -import { ShowIcon } from "../Icons/ShowIcon"; +import { useMessengerContext } from '../../contexts/messengerProvider' +import { ActivityAction } from '../../hooks/useActivities' +import { Activity } from '../../models/Activity' +import { buttonTransparentStyles } from '../Buttons/buttonStyle' +import { Tooltip } from '../Form/Tooltip' +import { HideIcon } from '../Icons/HideIcon' +import { ReadIcon } from '../Icons/ReadIcon' +import { ShowIcon } from '../Icons/ShowIcon' -import { ActivityMessage } from "./ActivityMessage"; +import { ActivityMessage } from './ActivityMessage' interface ActivityCenterProps { - activities: Activity[]; - setShowActivityCenter: (val: boolean) => void; - activityDispatch: React.Dispatch; + activities: Activity[] + setShowActivityCenter: (val: boolean) => void + activityDispatch: React.Dispatch } export function ActivityCenter({ @@ -23,43 +23,43 @@ export function ActivityCenter({ setShowActivityCenter, activityDispatch, }: ActivityCenterProps) { - const { contacts } = useMessengerContext(); + const { contacts } = useMessengerContext() const shownActivities = useMemo( () => activities.filter( - (activity) => !contacts?.[activity.user]?.blocked ?? true + activity => !contacts?.[activity.user]?.blocked ?? true ), [contacts, activities] - ); + ) - const [hideRead, setHideRead] = useState(false); + const [hideRead, setHideRead] = useState(false) - const [filter, setFilter] = useState(""); + const [filter, setFilter] = useState('') - const filteredActivities = shownActivities.filter((activity) => + const filteredActivities = shownActivities.filter(activity => filter ? activity.type === filter : hideRead ? activity.isRead !== true : activity - ); + ) return ( - setFilter("")}>All - setFilter("mention")}>Mentions - setFilter("reply")}>Replies - setFilter("request")}> + setFilter('')}>All + setFilter('mention')}>Mentions + setFilter('reply')}>Replies + setFilter('request')}> Contact requests activityDispatch({ type: "setAllAsRead" })} + onClick={() => activityDispatch({ type: 'setAllAsRead' })} > @@ -69,13 +69,13 @@ export function ActivityCenter({ setHideRead(!hideRead)}> {hideRead ? : } - + {filteredActivities.length > 0 ? ( - {filteredActivities.map((activity) => ( + {filteredActivities.map(activity => ( Notifications will appear here )} - ); + ) } const ActivityBlock = styled.div` @@ -103,17 +103,17 @@ const ActivityBlock = styled.div` top: calc(100% + 4px); right: 0; z-index: 100; -`; +` const ActivityFilter = styled.div` display: flex; justify-content: space-between; padding: 13px 16px; -`; +` export const FlexDiv = styled.div` display: flex; -`; +` const FilterBtn = styled.button` ${buttonTransparentStyles} @@ -121,7 +121,7 @@ const FilterBtn = styled.button` & + & { margin-left: 8px; } -`; +` const BtnWrapper = styled.div` position: relative; @@ -129,7 +129,7 @@ const BtnWrapper = styled.div` &:hover > div { visibility: visible; } -`; +` export const ActivityBtn = styled.button` width: 32px; @@ -165,14 +165,14 @@ export const ActivityBtn = styled.button` & + & { margin-left: 8px; } -`; +` const Activities = styled.div` display: flex; flex-direction: column; width: 100%; overflow: auto; -`; +` const EmptyActivities = styled.div` display: flex; @@ -181,9 +181,9 @@ const EmptyActivities = styled.div` flex: 1; width: 100%; color: ${({ theme }) => theme.secondary}; -`; +` const Btns = styled.div` display: flex; align-items: center; -`; +` diff --git a/packages/status-react/src/components/ActivityCenter/ActivityMessage.tsx b/packages/status-react/src/components/ActivityCenter/ActivityMessage.tsx index 455e8a92..d43856d2 100644 --- a/packages/status-react/src/components/ActivityCenter/ActivityMessage.tsx +++ b/packages/status-react/src/components/ActivityCenter/ActivityMessage.tsx @@ -1,27 +1,27 @@ -import React, { useEffect, useMemo, useRef, useState } from "react"; -import styled from "styled-components"; +import React, { useEffect, useMemo, useRef, useState } from 'react' +import styled from 'styled-components' -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useModal } from "../../contexts/modalProvider"; -import { useScrollToMessage } from "../../contexts/scrollProvider"; -import { ActivityAction } from "../../hooks/useActivities"; -import { useClickOutside } from "../../hooks/useClickOutside"; -import { Activity } from "../../models/Activity"; -import { equalDate } from "../../utils/equalDate"; -import { DownloadButton } from "../Buttons/DownloadButton"; -import { Mention } from "../Chat/ChatMessageContent"; -import { Logo } from "../CommunityIdentity"; -import { ContactMenu } from "../Form/ContactMenu"; -import { Tooltip } from "../Form/Tooltip"; -import { CheckIcon } from "../Icons/CheckIcon"; -import { ClearSvg } from "../Icons/ClearIcon"; -import { CommunityIcon } from "../Icons/CommunityIcon"; -import { GroupIcon } from "../Icons/GroupIcon"; -import { MoreIcon } from "../Icons/MoreIcon"; -import { ReadMessageIcon } from "../Icons/ReadMessageIcon"; -import { ReplyIcon } from "../Icons/ReplyActivityIcon"; -import { UntrustworthIcon } from "../Icons/UntrustworthIcon"; -import { UserIcon } from "../Icons/UserIcon"; +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useModal } from '../../contexts/modalProvider' +import { useScrollToMessage } from '../../contexts/scrollProvider' +import { ActivityAction } from '../../hooks/useActivities' +import { useClickOutside } from '../../hooks/useClickOutside' +import { Activity } from '../../models/Activity' +import { equalDate } from '../../utils/equalDate' +import { DownloadButton } from '../Buttons/DownloadButton' +import { Mention } from '../Chat/ChatMessageContent' +import { Logo } from '../CommunityIdentity' +import { ContactMenu } from '../Form/ContactMenu' +import { Tooltip } from '../Form/Tooltip' +import { CheckIcon } from '../Icons/CheckIcon' +import { ClearSvg } from '../Icons/ClearIcon' +import { CommunityIcon } from '../Icons/CommunityIcon' +import { GroupIcon } from '../Icons/GroupIcon' +import { MoreIcon } from '../Icons/MoreIcon' +import { ReadMessageIcon } from '../Icons/ReadMessageIcon' +import { ReplyIcon } from '../Icons/ReplyActivityIcon' +import { UntrustworthIcon } from '../Icons/UntrustworthIcon' +import { UserIcon } from '../Icons/UserIcon' import { ContentWrapper, DateSeparator, @@ -32,52 +32,52 @@ import { UserAddress, UserName, UserNameWrapper, -} from "../Messages/Styles"; -import { ProfileModalName } from "../Modals/ProfileModal"; -import { textMediumStyles, textSmallStyles } from "../Text"; +} from '../Messages/Styles' +import { ProfileModalName } from '../Modals/ProfileModal' +import { textMediumStyles, textSmallStyles } from '../Text' -import { ActivityBtn, FlexDiv } from "./ActivityCenter"; +import { ActivityBtn, FlexDiv } from './ActivityCenter' -const today = new Date(); +const today = new Date() type ActivityMessageProps = { - activity: Activity; - setShowActivityCenter: (val: boolean) => void; - activityDispatch: React.Dispatch; -}; + activity: Activity + setShowActivityCenter: (val: boolean) => void + activityDispatch: React.Dispatch +} export function ActivityMessage({ activity, setShowActivityCenter, activityDispatch, }: ActivityMessageProps) { - const { contacts, channelsDispatch } = useMessengerContext(); - const scroll = useScrollToMessage(); - const { setModal } = useModal(ProfileModalName); + const { contacts, channelsDispatch } = useMessengerContext() + const scroll = useScrollToMessage() + const { setModal } = useModal(ProfileModalName) const showChannel = () => { - "channel" in activity && - channelsDispatch({ type: "ChangeActive", payload: activity.channel.id }), - setShowActivityCenter(false); - }; + 'channel' in activity && + channelsDispatch({ type: 'ChangeActive', payload: activity.channel.id }), + setShowActivityCenter(false) + } - const [showMenu, setShowMenu] = useState(false); + const [showMenu, setShowMenu] = useState(false) - const type = activity.type; + const type = activity.type const contact = useMemo( () => contacts[activity.user], [activity.user, contacts] - ); + ) const [elements, setElements] = useState< (string | React.ReactElement | undefined)[] - >(["message" in activity ? activity.message?.content : undefined]); + >(['message' in activity ? activity.message?.content : undefined]) useEffect(() => { - if ("message" in activity) { - const split = activity.message?.content.split(" "); + if ('message' in activity) { + const split = activity.message?.content.split(' ') const newSplit = split.flatMap((element, idx) => { - if (element.startsWith("@")) { + if (element.startsWith('@')) { return [ true} className="activity" />, - " ", - ]; + ' ', + ] } - return [element, " "]; - }); - newSplit.pop(); - setElements(newSplit); + return [element, ' '] + }) + newSplit.pop() + setElements(newSplit) } - }, [activity]); + }, [activity]) - const ref = useRef(null); - useClickOutside(ref, () => setShowMenu(false)); + const ref = useRef(null) + useClickOutside(ref, () => setShowMenu(false)) return ( {equalDate(activity.date, today) - ? "Today" + ? 'Today' : activity.date.toLocaleDateString()} - + <> @@ -118,10 +118,10 @@ export function ActivityMessage({ id: activity.user, renamingState: false, requestState: false, - }); + }) }} > - {" "} + {' '} {contact?.customName ?? activity.user.slice(0, 10)} {contact?.customName && ( @@ -132,22 +132,22 @@ export function ActivityMessage({ {contact.isUntrustworthy && } - {activity.date.toLocaleString("en-US", { - hour: "numeric", - minute: "numeric", + {activity.date.toLocaleString('en-US', { + hour: 'numeric', + minute: 'numeric', hour12: true, })} - {type === "request" && ( + {type === 'request' && ( Contact request - {activity.requestType === "outcome" + {activity.requestType === 'outcome' ? ` to ${activity.user.slice(0, 10)}` - : ": "} + : ': '} )} - {type === "invitation" && ( + {type === 'invitation' && ( {`Invited you to join a community `} @@ -156,7 +156,7 @@ export function ActivityMessage({ style={{ backgroundImage: activity.invitation?.icon ? `url(${activity.invitation?.icon}` - : "", + : '', }} > {activity.invitation?.icon === undefined && @@ -167,29 +167,29 @@ export function ActivityMessage({ )} - {"message" in activity && activity.message?.content && ( + {'message' in activity && activity.message?.content && (
{ - scroll(activity.message, activity.channel.id); - setShowActivityCenter(false); + scroll(activity.message, activity.channel.id) + setShowActivityCenter(false) }} > - {elements.map((el) => el)} + {elements.map(el => el)}
)} - {activity.type === "request" && - activity.requestType === "income" && + {activity.type === 'request' && + activity.requestType === 'income' && activity.request}
- {type === "mention" && + {type === 'mention' && activity.channel && - activity.channel.type !== "dm" && ( + activity.channel.type !== 'dm' && ( - {activity.channel.type === "group" ? : "#"}{" "} + {activity.channel.type === 'group' ? : '#'}{' '} {` ${activity.channel.name.slice(0, 10)}`} )} - {type === "reply" && activity.quote && ( + {type === 'reply' && activity.quote && ( {activity.quote.image && ( Posted an image in @@ -199,7 +199,7 @@ export function ActivityMessage({ )} - {type === "invitation" && ( + {type === 'invitation' && ( {`To access other communities, `} @@ -207,16 +207,16 @@ export function ActivityMessage({ )}
- {type === "request" && + {type === 'request' && !activity.status && - activity.requestType === "income" && ( + activity.requestType === 'income' && ( <> { activityDispatch({ - type: "setStatus", - payload: { id: activity.id, status: "accepted" }, - }); + type: 'setStatus', + payload: { id: activity.id, status: 'accepted' }, + }) }} className="accept" > @@ -225,9 +225,9 @@ export function ActivityMessage({ { activityDispatch({ - type: "setStatus", - payload: { id: activity.id, status: "declined" }, - }); + type: 'setStatus', + payload: { id: activity.id, status: 'declined' }, + }) }} className="decline" > @@ -235,7 +235,7 @@ export function ActivityMessage({ { - setShowMenu((e) => !e); + setShowMenu(e => !e) }} ref={ref} > @@ -246,22 +246,22 @@ export function ActivityMessage({ )} - {type === "request" && activity.status === "accepted" && ( + {type === 'request' && activity.status === 'accepted' && ( Accepted )} - {type === "request" && activity.status === "declined" && ( + {type === 'request' && activity.status === 'declined' && ( Declined )} - {type === "request" && activity.status === "sent" && ( + {type === 'request' && activity.status === 'sent' && ( Sent )} - {(type === "mention" || type === "reply") && ( + {(type === 'mention' || type === 'reply') && ( - activityDispatch({ type: "setAsRead", payload: activity.id }) + activityDispatch({ type: 'setAsRead', payload: activity.id }) } - className={`${activity.isRead && "read"}`} + className={`${activity.isRead && 'read'}`} > @@ -270,13 +270,13 @@ export function ActivityMessage({ )}
- ); + ) } const InviteDiv = styled.div` display: flex; margin-top: -4px; -`; +` const BtnWrapper = styled.div` position: relative; @@ -284,13 +284,13 @@ const BtnWrapper = styled.div` &:hover > div { visibility: visible; } -`; +` const ActivityDate = styled(DateSeparator)` justify-content: flex-start; padding: 8px 16px; margin: 0; -`; +` const MessageWrapper = styled.div` width: 100%; @@ -301,12 +301,12 @@ const MessageWrapper = styled.div` &.unread { background: ${({ theme }) => theme.buttonBgHover}; } -`; +` const ActivityText = styled(MessageText)` white-space: unset; margin-bottom: 8px; -`; +` const Tag = styled.div` width: fit-content; @@ -328,7 +328,7 @@ const Tag = styled.div` white-space: nowrap; overflow: hidden; } -`; +` const ContextHeading = styled.p` font-style: italic; @@ -336,7 +336,7 @@ const ContextHeading = styled.p` flex-shrink: 0; white-space: pre-wrap; ${textMediumStyles} -`; +` const RequestStatus = styled.p` font-weight: 500; @@ -352,12 +352,12 @@ const RequestStatus = styled.p` &.declined { color: ${({ theme }) => theme.redColor}; } -`; +` const ActivityContent = styled(ContentWrapper)` max-width: calc(100% - 80px); flex: 1; -`; +` const ActivityUserName = styled(UserName)` cursor: pointer; @@ -365,7 +365,7 @@ const ActivityUserName = styled(UserName)` &:hover { text-decoration: underline; } -`; +` const ReplyWrapper = styled.div` max-width: 100%; @@ -375,7 +375,7 @@ const ReplyWrapper = styled.div` & > p { margin-right: 4px; } -`; +` const CommunityLogo = styled(Logo)` width: 16px; @@ -383,4 +383,4 @@ const CommunityLogo = styled(Logo)` margin: 0 2px 0 4px; ${textSmallStyles} -`; +` diff --git a/packages/status-react/src/components/Buttons/BackButton.tsx b/packages/status-react/src/components/Buttons/BackButton.tsx index 152c6265..1297630a 100644 --- a/packages/status-react/src/components/Buttons/BackButton.tsx +++ b/packages/status-react/src/components/Buttons/BackButton.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' -import { LeftIcon } from "../Icons/LeftIcon"; +import { LeftIcon } from '../Icons/LeftIcon' interface BackButtonProps { - onBtnClick: () => void; - className?: string; + onBtnClick: () => void + className?: string } export function BackButton({ onBtnClick, className }: BackButtonProps) { @@ -13,7 +13,7 @@ export function BackButton({ onBtnClick, className }: BackButtonProps) { - ); + ) } const BackBtn = styled.button` @@ -28,4 +28,4 @@ const BackBtn = styled.button` position: static; margin-right: 13px; } -`; +` diff --git a/packages/status-react/src/components/Buttons/DownloadButton.tsx b/packages/status-react/src/components/Buttons/DownloadButton.tsx index aabbb4b4..a684befc 100644 --- a/packages/status-react/src/components/Buttons/DownloadButton.tsx +++ b/packages/status-react/src/components/Buttons/DownloadButton.tsx @@ -1,50 +1,50 @@ -import React, { useEffect, useState } from "react"; -import styled from "styled-components"; +import React, { useEffect, useState } from 'react' +import styled from 'styled-components' -import { buttonStyles } from "./buttonStyle"; +import { buttonStyles } from './buttonStyle' -const userAgent = window.navigator.userAgent; -const platform = window.navigator.platform; -const macosPlatforms = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"]; -const windowsPlatforms = ["Win32", "Win64", "Windows", "WinCE"]; -const iosPlatforms = ["iPhone", "iPad", "iPod"]; +const userAgent = window.navigator.userAgent +const platform = window.navigator.platform +const macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'] +const windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'] +const iosPlatforms = ['iPhone', 'iPad', 'iPod'] interface DownloadButtonProps { - className?: string; + className?: string } export const DownloadButton = ({ className }: DownloadButtonProps) => { - const [link, setlink] = useState("https://status.im/get/"); - const [os, setOs] = useState(null); + const [link, setlink] = useState('https://status.im/get/') + const [os, setOs] = useState(null) useEffect(() => { if (macosPlatforms.includes(platform)) { setlink( - "https://status-im-files.ams3.cdn.digitaloceanspaces.com/StatusIm-Desktop-v0.3.0-beta-a8c37d.dmg" - ); - setOs("Mac"); + 'https://status-im-files.ams3.cdn.digitaloceanspaces.com/StatusIm-Desktop-v0.3.0-beta-a8c37d.dmg' + ) + setOs('Mac') } else if (iosPlatforms.includes(platform)) { setlink( - "https://apps.apple.com/us/app/status-private-communication/id1178893006" - ); - setOs("iOS"); + 'https://apps.apple.com/us/app/status-private-communication/id1178893006' + ) + setOs('iOS') } else if (windowsPlatforms.includes(platform)) { setlink( - "https://status-im-files.ams3.cdn.digitaloceanspaces.com/StatusIm-Desktop-v0.3.0-beta-a8c37d.exe" - ); - setOs("Windows"); + 'https://status-im-files.ams3.cdn.digitaloceanspaces.com/StatusIm-Desktop-v0.3.0-beta-a8c37d.exe' + ) + setOs('Windows') } else if (/Android/.test(userAgent)) { setlink( - "https://play.google.com/store/apps/details?id=im.status.ethereum" - ); - setOs("Android"); + 'https://play.google.com/store/apps/details?id=im.status.ethereum' + ) + setOs('Android') } else if (/Linux/.test(platform)) { setlink( - "https://status-im-files.ams3.cdn.digitaloceanspaces.com/StatusIm-Desktop-v0.3.0-beta-a8c37d.tar.gz" - ); - setOs("Linux"); + 'https://status-im-files.ams3.cdn.digitaloceanspaces.com/StatusIm-Desktop-v0.3.0-beta-a8c37d.tar.gz' + ) + setOs('Linux') } - }, []); + }, []) return ( { rel="noopener noreferrer" > {os - ? `${className === "activity" ? "d" : "D"}ownload Status for ${os}` - : `${className === "activity" ? "d" : "D"}ownload Status`} + ? `${className === 'activity' ? 'd' : 'D'}ownload Status for ${os}` + : `${className === 'activity' ? 'd' : 'D'}ownload Status`} - ); -}; + ) +} const Link = styled.a` margin-top: 24px; @@ -81,4 +81,4 @@ const Link = styled.a` color: ${({ theme }) => theme.tertiary}; } } -`; +` diff --git a/packages/status-react/src/components/Buttons/buttonStyle.ts b/packages/status-react/src/components/Buttons/buttonStyle.ts index fd29e47b..55c2f8c0 100644 --- a/packages/status-react/src/components/Buttons/buttonStyle.ts +++ b/packages/status-react/src/components/Buttons/buttonStyle.ts @@ -1,7 +1,7 @@ -import styled, { css } from "styled-components"; +import styled, { css } from 'styled-components' export const buttonStyles = css` - font-family: "Inter"; + font-family: 'Inter'; font-weight: 500; font-size: 15px; line-height: 22px; @@ -17,10 +17,10 @@ export const buttonStyles = css` &:focus { background: ${({ theme }) => theme.buttonBg}; } -`; +` export const buttonTransparentStyles = css` - font-family: "Inter"; + font-family: 'Inter'; font-weight: 500; font-size: 13px; line-height: 18px; @@ -37,7 +37,7 @@ export const buttonTransparentStyles = css` &:focus { background: ${({ theme }) => theme.buttonBg}; } -`; +` export const ButtonNo = styled.button` padding: 11px 24px; @@ -50,10 +50,10 @@ export const ButtonNo = styled.button` &:hover { background: ${({ theme }) => theme.buttonNoBgHover}; } -`; +` export const ButtonYes = styled.button` padding: 11px 24px; ${buttonStyles} -`; +` diff --git a/packages/status-react/src/components/Channels/Channel.tsx b/packages/status-react/src/components/Channels/Channel.tsx index 6aa60d91..b463c4e2 100644 --- a/packages/status-react/src/components/Channels/Channel.tsx +++ b/packages/status-react/src/components/Channels/Channel.tsx @@ -1,29 +1,29 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useNarrow } from "../../contexts/narrowProvider"; -import { ChannelData } from "../../models/ChannelData"; -import { ChannelMenu } from "../Form/ChannelMenu"; -import { Tooltip } from "../Form/Tooltip"; -import { GroupIcon } from "../Icons/GroupIcon"; -import { MutedIcon } from "../Icons/MutedIcon"; -import { textMediumStyles } from "../Text"; +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useNarrow } from '../../contexts/narrowProvider' +import { ChannelData } from '../../models/ChannelData' +import { ChannelMenu } from '../Form/ChannelMenu' +import { Tooltip } from '../Form/Tooltip' +import { GroupIcon } from '../Icons/GroupIcon' +import { MutedIcon } from '../Icons/MutedIcon' +import { textMediumStyles } from '../Text' -import { ChannelIcon } from "./ChannelIcon"; +import { ChannelIcon } from './ChannelIcon' function RenderChannelName({ channel, activeView, className, }: { - channel: ChannelData; - activeView?: boolean; - className?: string; + channel: ChannelData + activeView?: boolean + className?: string }) { - const { activeChannel } = useMessengerContext(); + const { activeChannel } = useMessengerContext() switch (channel.type) { - case "group": + case 'group': return (
{!activeView && ( @@ -31,22 +31,22 @@ function RenderChannelName({ )} {` ${channel.name}`}
- ); - case "channel": - return
{`# ${channel.name}`}
; - case "dm": - return
{channel.name.slice(0, 20)}
; + ) + case 'channel': + return
{`# ${channel.name}`}
+ case 'dm': + return
{channel.name.slice(0, 20)}
} } interface ChannelProps { - channel: ChannelData; - notified?: boolean; - mention?: number; - isActive: boolean; - activeView?: boolean; - onClick?: () => void; - setEditGroup?: React.Dispatch>; + channel: ChannelData + notified?: boolean + mention?: number + isActive: boolean + activeView?: boolean + onClick?: () => void + setEditGroup?: React.Dispatch> } export function Channel({ @@ -58,15 +58,15 @@ export function Channel({ mention, setEditGroup, }: ChannelProps) { - const narrow = useNarrow(); - const { channelsDispatch } = useMessengerContext(); + const narrow = useNarrow() + const { channelsDispatch } = useMessengerContext() return ( @@ -82,7 +82,7 @@ export function Channel({ {channel?.isMuted && activeView && !narrow && ( - channelsDispatch({ type: "ToggleMuted", payload: channel.id }) + channelsDispatch({ type: 'ToggleMuted', payload: channel.id }) } > @@ -103,15 +103,15 @@ export function Channel({ )} - ); + ) } const ChannelWrapper = styled.div<{ isNarrow?: boolean }>` - width: ${({ isNarrow }) => (isNarrow ? "calc(100% - 162px)" : "100%")}; + width: ${({ isNarrow }) => (isNarrow ? 'calc(100% - 162px)' : '100%')}; display: flex; justify-content: space-between; align-items: center; @@ -128,13 +128,13 @@ const ChannelWrapper = styled.div<{ isNarrow?: boolean }>` &:hover { background-color: ${({ theme, isNarrow }) => isNarrow && theme.border}; } -`; +` export const ChannelInfo = styled.div<{ activeView?: boolean }>` display: flex; - align-items: ${({ activeView }) => (activeView ? "flex-start" : "center")}; + align-items: ${({ activeView }) => (activeView ? 'flex-start' : 'center')}; overflow-x: hidden; -`; +` const ChannelTextInfo = styled.div<{ activeView?: boolean }>` display: flex; @@ -142,33 +142,33 @@ const ChannelTextInfo = styled.div<{ activeView?: boolean }>` text-overflow: ellipsis; overflow-x: hidden; white-space: nowrap; - padding: ${({ activeView }) => activeView && "0 24px 24px 0"}; -`; + padding: ${({ activeView }) => activeView && '0 24px 24px 0'}; +` const ChannelNameWrapper = styled.div` display: flex; align-items: center; -`; +` export const ChannelName = styled(RenderChannelName)<{ - muted?: boolean; - notified?: boolean; - active?: boolean; - activeView?: boolean; + muted?: boolean + notified?: boolean + active?: boolean + activeView?: boolean }>` font-weight: ${({ notified, muted, active }) => - notified && !muted && !active ? "600" : "500"}; + notified && !muted && !active ? '600' : '500'}; opacity: ${({ notified, muted, active }) => - muted ? "0.4" : notified || active ? "1.0" : "0.7"}; + muted ? '0.4' : notified || active ? '1.0' : '0.7'}; color: ${({ theme }) => theme.primary}; margin-right: ${({ muted, activeView }) => - muted && activeView ? "8px" : ""}; + muted && activeView ? '8px' : ''}; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; ${textMediumStyles} -`; +` const ChannelDescription = styled.p` font-size: 12px; @@ -178,7 +178,7 @@ const ChannelDescription = styled.p` text-overflow: ellipsis; overflow: hidden; white-space: nowrap; -`; +` const NotificationBagde = styled.div` width: 24px; @@ -193,7 +193,7 @@ const NotificationBagde = styled.div` align-items: center; justify-content: center; flex-shrink: 0; -`; +` const MutedBtn = styled.button` padding: 0; @@ -208,4 +208,4 @@ const MutedBtn = styled.button` &:hover > div { visibility: visible; } -`; +` diff --git a/packages/status-react/src/components/Channels/ChannelIcon.tsx b/packages/status-react/src/components/Channels/ChannelIcon.tsx index 7f736b48..4cba2e2c 100644 --- a/packages/status-react/src/components/Channels/ChannelIcon.tsx +++ b/packages/status-react/src/components/Channels/ChannelIcon.tsx @@ -1,25 +1,25 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' -import { useNarrow } from "../../contexts/narrowProvider"; -import { ChannelData } from "../../models/ChannelData"; +import { useNarrow } from '../../contexts/narrowProvider' +import { ChannelData } from '../../models/ChannelData' interface ChannelIconProps { - channel: ChannelData; - activeView?: boolean; + channel: ChannelData + activeView?: boolean } export function ChannelIcon({ channel, activeView }: ChannelIconProps) { - const narrow = useNarrow(); + const narrow = useNarrow() return ( {!channel.icon && channel.name.slice(0, 1).toUpperCase()} - ); + ) } export const ChannelLogo = styled.div<{ icon?: string }>` @@ -51,4 +51,4 @@ export const ChannelLogo = styled.div<{ icon?: string }>` height: 40px; font-size: 20px; } -`; +` diff --git a/packages/status-react/src/components/Channels/Channels.tsx b/packages/status-react/src/components/Channels/Channels.tsx index 9fdc2043..3ef7be90 100644 --- a/packages/status-react/src/components/Channels/Channels.tsx +++ b/packages/status-react/src/components/Channels/Channels.tsx @@ -1,22 +1,22 @@ -import React, { useMemo } from "react"; -import styled from "styled-components"; +import React, { useMemo } from 'react' +import styled from 'styled-components' -import { ChatState, useChatState } from "../../contexts/chatStateProvider"; -import { useIdentity } from "../../contexts/identityProvider"; -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { CreateIcon } from "../Icons/CreateIcon"; -import { UserCreation } from "../UserCreation/UserCreation"; +import { ChatState, useChatState } from '../../contexts/chatStateProvider' +import { useIdentity } from '../../contexts/identityProvider' +import { useMessengerContext } from '../../contexts/messengerProvider' +import { CreateIcon } from '../Icons/CreateIcon' +import { UserCreation } from '../UserCreation/UserCreation' -import { Channel } from "./Channel"; +import { Channel } from './Channel' interface ChannelsProps { - onCommunityClick?: () => void; - setEditGroup?: React.Dispatch>; + onCommunityClick?: () => void + setEditGroup?: React.Dispatch> } type GenerateChannelsProps = ChannelsProps & { - type: string; -}; + type: string +} function GenerateChannels({ type, @@ -24,16 +24,16 @@ function GenerateChannels({ setEditGroup, }: GenerateChannelsProps) { const { mentions, notifications, activeChannel, channelsDispatch, channels } = - useMessengerContext(); + useMessengerContext() - const channelList = useMemo(() => Object.values(channels), [channels]); + const channelList = useMemo(() => Object.values(channels), [channels]) - const setChatState = useChatState()[1]; + const setChatState = useChatState()[1] return ( <> {channelList - .filter((channel) => channel.type === type) - .map((channel) => ( + .filter(channel => channel.type === type) + .map(channel => ( 0} mention={mentions?.[channel.id]} onClick={() => { - channelsDispatch({ type: "ChangeActive", payload: channel.id }); + channelsDispatch({ type: 'ChangeActive', payload: channel.id }) if (onCommunityClick) { - onCommunityClick(); + onCommunityClick() } - setChatState(ChatState.ChatBody); + setChatState(ChatState.ChatBody) }} setEditGroup={setEditGroup} /> ))} - ); + ) } type ChatsListProps = { - onCommunityClick?: () => void; - setEditGroup?: React.Dispatch>; -}; + onCommunityClick?: () => void + setEditGroup?: React.Dispatch> +} function ChatsSideBar({ onCommunityClick, setEditGroup }: ChatsListProps) { - const setChatState = useChatState()[1]; + const setChatState = useChatState()[1] return ( <> @@ -71,21 +71,21 @@ function ChatsSideBar({ onCommunityClick, setEditGroup }: ChatsListProps) { - + - ); + ) } export function Channels({ onCommunityClick, setEditGroup }: ChannelsProps) { - const identity = useIdentity(); + const identity = useIdentity() return ( - + {identity ? ( - ); + ) } export const ChannelList = styled.div` @@ -107,7 +107,7 @@ export const ChannelList = styled.div` &::-webkit-scrollbar { width: 0; } -`; +` const Chats = styled.div` display: flex; @@ -117,7 +117,7 @@ const Chats = styled.div` position: relative; &::before { - content: ""; + content: ''; position: absolute; top: 0; left: 50%; @@ -127,26 +127,26 @@ const Chats = styled.div` background-color: ${({ theme }) => theme.primary}; opacity: 0.1; } -`; +` const ChatsBar = styled.div` display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; -`; +` const ChatsList = styled.div` display: flex; flex-direction: column; -`; +` const Heading = styled.p` font-weight: bold; font-size: 17px; line-height: 24px; color: ${({ theme }) => theme.primary}; -`; +` const EditBtn = styled.button` width: 32px; @@ -161,4 +161,4 @@ const EditBtn = styled.button` &:active { background: ${({ theme }) => theme.sectionBackgroundColor}; } -`; +` diff --git a/packages/status-react/src/components/Channels/EmptyChannel.tsx b/packages/status-react/src/components/Channels/EmptyChannel.tsx index 2af55a36..3858b51a 100644 --- a/packages/status-react/src/components/Channels/EmptyChannel.tsx +++ b/packages/status-react/src/components/Channels/EmptyChannel.tsx @@ -1,44 +1,44 @@ -import React, { useMemo } from "react"; -import styled from "styled-components"; +import React, { useMemo } from 'react' +import styled from 'styled-components' -import { useUserPublicKey } from "../../contexts/identityProvider"; -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useNarrow } from "../../contexts/narrowProvider"; -import { ChannelData } from "../../models/ChannelData"; -import { textMediumStyles } from "../Text"; +import { useUserPublicKey } from '../../contexts/identityProvider' +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useNarrow } from '../../contexts/narrowProvider' +import { ChannelData } from '../../models/ChannelData' +import { textMediumStyles } from '../Text' -import { ChannelInfo, ChannelName } from "./Channel"; -import { ChannelLogo } from "./ChannelIcon"; +import { ChannelInfo, ChannelName } from './Channel' +import { ChannelLogo } from './ChannelIcon' type ChannelBeggingTextProps = { - channel: ChannelData; -}; + channel: ChannelData +} function ChannelBeggingText({ channel }: ChannelBeggingTextProps) { - const userPK = useUserPublicKey(); - const { contacts } = useMessengerContext(); + const userPK = useUserPublicKey() + const { contacts } = useMessengerContext() const members = useMemo(() => { if (channel?.members && userPK) { return channel.members - .filter((contact) => contact.id !== userPK) - .map((member) => contacts?.[member.id] ?? member); + .filter(contact => contact.id !== userPK) + .map(member => contacts?.[member.id] ?? member) } - return []; - }, [channel, contacts, userPK]); + return [] + }, [channel, contacts, userPK]) switch (channel.type) { - case "dm": + case 'dm': return ( Any messages you send here are encrypted and can only be read by you and
{channel.name.slice(0, 10)}.
- ); - case "group": + ) + case 'group': return ( - {userPK && {userPK}} created a group with{" "} + {userPK && {userPK}} created a group with{' '} {members.map((contact, idx) => ( {contact?.customName ?? contact.trueName.slice(0, 10)} @@ -46,36 +46,36 @@ function ChannelBeggingText({ channel }: ChannelBeggingTextProps) { ))} - ); - case "channel": + ) + case 'channel': return ( Welcome to the beginning of the #{channel.name} channel! - ); + ) } - return null; + return null } type EmptyChannelProps = { - channel: ChannelData; -}; + channel: ChannelData +} export function EmptyChannel({ channel }: EmptyChannelProps) { - const narrow = useNarrow(); + const narrow = useNarrow() return ( - + - {" "} + {' '} {!channel.icon && channel.name.slice(0, 1).toUpperCase()} - ); + ) } const Wrapper = styled.div` @@ -87,11 +87,11 @@ const Wrapper = styled.div` &.wide { margin-top: 24px; } -`; +` const ChannelInfoEmpty = styled(ChannelInfo)` flex-direction: column; -`; +` const ChannelLogoEmpty = styled(ChannelLogo)` width: 120px; @@ -100,14 +100,14 @@ const ChannelLogoEmpty = styled(ChannelLogo)` font-size: 51px; line-height: 62px; margin-bottom: 16px; -`; +` const ChannelNameEmpty = styled(ChannelName)` font-weight: bold; font-size: 22px; line-height: 30px; margin-bottom: 16px; -`; +` const EmptyText = styled.p` display: inline-block; @@ -120,10 +120,10 @@ const EmptyText = styled.p` } ${textMediumStyles} -`; +` const EmptyTextGroup = styled(EmptyText)` & > span { word-break: break-all; } -`; +` diff --git a/packages/status-react/src/components/Chat/ChatBody.tsx b/packages/status-react/src/components/Chat/ChatBody.tsx index a83fea70..06c5b29f 100644 --- a/packages/status-react/src/components/Chat/ChatBody.tsx +++ b/packages/status-react/src/components/Chat/ChatBody.tsx @@ -1,19 +1,19 @@ -import React, { useCallback, useEffect, useMemo, useState } from "react"; -import styled from "styled-components"; +import React, { useCallback, useEffect, useMemo, useState } from 'react' +import styled from 'styled-components' -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useNarrow } from "../../contexts/narrowProvider"; -import { Reply } from "../../hooks/useReply"; -import { ChannelData } from "../../models/ChannelData"; -import { TokenRequirement } from "../Form/TokenRequirement"; -import { MessagesList } from "../Messages/MessagesList"; -import { NarrowChannels } from "../NarrowMode/NarrowChannels"; -import { NarrowMembers } from "../NarrowMode/NarrowMembers"; -import { LoadingSkeleton } from "../Skeleton/LoadingSkeleton"; +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useNarrow } from '../../contexts/narrowProvider' +import { Reply } from '../../hooks/useReply' +import { ChannelData } from '../../models/ChannelData' +import { TokenRequirement } from '../Form/TokenRequirement' +import { MessagesList } from '../Messages/MessagesList' +import { NarrowChannels } from '../NarrowMode/NarrowChannels' +import { NarrowMembers } from '../NarrowMode/NarrowMembers' +import { LoadingSkeleton } from '../Skeleton/LoadingSkeleton' -import { ChatCreation } from "./ChatCreation"; -import { ChatInput } from "./ChatInput"; -import { ChatTopbar, ChatTopbarLoading } from "./ChatTopbar"; +import { ChatCreation } from './ChatCreation' +import { ChatInput } from './ChatInput' +import { ChatTopbar, ChatTopbarLoading } from './ChatTopbar' export enum ChatBodyState { Chat, @@ -22,30 +22,30 @@ export enum ChatBodyState { } function ChatBodyLoading() { - const narrow = useNarrow(); + const narrow = useNarrow() return ( - + undefined} /> - ); + ) } type ChatBodyContentProps = { - showState: ChatBodyState; - switchShowState: (state: ChatBodyState) => void; - channel: ChannelData; -}; + showState: ChatBodyState + switchShowState: (state: ChatBodyState) => void + channel: ChannelData +} function ChatBodyContent({ showState, switchShowState, channel, }: ChatBodyContentProps) { - const [reply, setReply] = useState(undefined); + const [reply, setReply] = useState(undefined) switch (showState) { case ChatBodyState.Chat: @@ -54,28 +54,28 @@ function ChatBodyContent({ - ); + ) case ChatBodyState.Channels: return ( switchShowState(ChatBodyState.Channels)} /> - ); + ) case ChatBodyState.Members: return ( switchShowState(ChatBodyState.Members)} /> - ); + ) } } interface ChatBodyProps { - onClick: () => void; - showMembers: boolean; - permission: boolean; - editGroup: boolean; - setEditGroup: React.Dispatch>; + onClick: () => void + showMembers: boolean + permission: boolean + editGroup: boolean + setEditGroup: React.Dispatch> } export function ChatBody({ @@ -85,26 +85,26 @@ export function ChatBody({ editGroup, setEditGroup, }: ChatBodyProps) { - const { activeChannel, loadingMessenger } = useMessengerContext(); + const { activeChannel, loadingMessenger } = useMessengerContext() - const narrow = useNarrow(); - const className = useMemo(() => (narrow ? "narrow" : ""), [narrow]); + const narrow = useNarrow() + const className = useMemo(() => (narrow ? 'narrow' : ''), [narrow]) - const [showState, setShowState] = useState(ChatBodyState.Chat); + const [showState, setShowState] = useState(ChatBodyState.Chat) const switchShowState = useCallback( (state: ChatBodyState) => { if (narrow) { - setShowState((prev) => (prev === state ? ChatBodyState.Chat : state)); + setShowState(prev => (prev === state ? ChatBodyState.Chat : state)) } }, [narrow] - ); + ) useEffect(() => { if (!narrow) { - setShowState(ChatBodyState.Chat); + setShowState(ChatBodyState.Chat) } - }, [narrow]); + }, [narrow]) if (!loadingMessenger && activeChannel) { return ( @@ -138,10 +138,10 @@ export function ChatBody({ )} - ); + ) } - return ; + return } export const Wrapper = styled.div` @@ -156,7 +156,7 @@ export const Wrapper = styled.div` &.narrow { width: 100%; } -`; +` const ChatBodyWrapper = styled.div` width: 100%; @@ -165,7 +165,7 @@ const ChatBodyWrapper = styled.div` flex-direction: column; flex: 1; background: ${({ theme }) => theme.bodyBackgroundColor}; -`; +` const BluredWrapper = styled.div` width: 100%; @@ -179,4 +179,4 @@ const BluredWrapper = styled.div` background: ${({ theme }) => theme.bodyBackgroundGradient}; backdrop-filter: blur(4px); z-index: 2; -`; +` diff --git a/packages/status-react/src/components/Chat/ChatCreation.tsx b/packages/status-react/src/components/Chat/ChatCreation.tsx index 9d5e409e..49d37890 100644 --- a/packages/status-react/src/components/Chat/ChatCreation.tsx +++ b/packages/status-react/src/components/Chat/ChatCreation.tsx @@ -1,107 +1,107 @@ -import React, { useCallback, useMemo, useState } from "react"; -import styled from "styled-components"; +import React, { useCallback, useMemo, useState } from 'react' +import styled from 'styled-components' -import { ChatState, useChatState } from "../../contexts/chatStateProvider"; -import { useUserPublicKey } from "../../contexts/identityProvider"; -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useNarrow } from "../../contexts/narrowProvider"; -import { ChannelData } from "../../models/ChannelData"; -import { ActivityButton } from "../ActivityCenter/ActivityButton"; -import { BackButton } from "../Buttons/BackButton"; -import { buttonStyles } from "../Buttons/buttonStyle"; -import { CrossIcon } from "../Icons/CrossIcon"; -import { Member } from "../Members/Member"; -import { SearchBlock } from "../SearchBlock"; -import { textMediumStyles } from "../Text"; +import { ChatState, useChatState } from '../../contexts/chatStateProvider' +import { useUserPublicKey } from '../../contexts/identityProvider' +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useNarrow } from '../../contexts/narrowProvider' +import { ChannelData } from '../../models/ChannelData' +import { ActivityButton } from '../ActivityCenter/ActivityButton' +import { BackButton } from '../Buttons/BackButton' +import { buttonStyles } from '../Buttons/buttonStyle' +import { CrossIcon } from '../Icons/CrossIcon' +import { Member } from '../Members/Member' +import { SearchBlock } from '../SearchBlock' +import { textMediumStyles } from '../Text' -import { ChatInput } from "./ChatInput"; +import { ChatInput } from './ChatInput' interface ChatCreationProps { - setEditGroup?: (val: boolean) => void; - activeChannel?: ChannelData; + setEditGroup?: (val: boolean) => void + activeChannel?: ChannelData } export function ChatCreation({ setEditGroup, activeChannel, }: ChatCreationProps) { - const narrow = useNarrow(); - const userPK = useUserPublicKey(); - const [query, setQuery] = useState(""); + const narrow = useNarrow() + const userPK = useUserPublicKey() + const [query, setQuery] = useState('') const [groupChatMembersIds, setGroupChatMembersIds] = useState( - activeChannel?.members?.map((member) => member.id) ?? [] - ); - const { contacts, createGroupChat, addMembers } = useMessengerContext(); + activeChannel?.members?.map(member => member.id) ?? [] + ) + const { contacts, createGroupChat, addMembers } = useMessengerContext() const groupChatMembers = useMemo( - () => groupChatMembersIds.map((id) => contacts[id]).filter((e) => !!e), + () => groupChatMembersIds.map(id => contacts[id]).filter(e => !!e), [groupChatMembersIds, contacts] - ); + ) const contactsList = useMemo(() => { return Object.values(contacts) .filter( - (member) => + member => member.id.includes(query) || member?.customName?.includes(query) || member.trueName.includes(query) ) - .filter((member) => !groupChatMembersIds.includes(member.id)); - }, [query, groupChatMembersIds, contacts]); + .filter(member => !groupChatMembersIds.includes(member.id)) + }, [query, groupChatMembersIds, contacts]) - const setChatState = useChatState()[1]; + const setChatState = useChatState()[1] const addMember = useCallback( (member: string) => { setGroupChatMembersIds((prevMembers: string[]) => { if ( - prevMembers.find((mem) => mem === member) || + prevMembers.find(mem => mem === member) || prevMembers.length >= 5 ) { - return prevMembers; + return prevMembers } else { - return [...prevMembers, member]; + return [...prevMembers, member] } - }); - setQuery(""); + }) + setQuery('') }, [setGroupChatMembersIds] - ); + ) const removeMember = useCallback( (member: string) => { - setGroupChatMembersIds((prev) => prev.filter((e) => e != member)); + setGroupChatMembersIds(prev => prev.filter(e => e != member)) }, [setGroupChatMembersIds] - ); + ) const createChat = useCallback( (group: string[]) => { if (userPK) { - const newGroup = group.slice(); - newGroup.push(userPK); - createGroupChat(newGroup); - setChatState(ChatState.ChatBody); + const newGroup = group.slice() + newGroup.push(userPK) + createGroupChat(newGroup) + setChatState(ChatState.ChatBody) } }, [userPK, createGroupChat, setChatState] - ); + ) const handleCreationClick = useCallback(() => { if (!activeChannel) { - createChat(groupChatMembers.map((member) => member.id)); + createChat(groupChatMembers.map(member => member.id)) } else { addMembers( - groupChatMembers.map((member) => member.id), + groupChatMembers.map(member => member.id), activeChannel.id - ); + ) } - setEditGroup?.(false); - }, [activeChannel, groupChatMembers, createChat, addMembers, setEditGroup]); + setEditGroup?.(false) + }, [activeChannel, groupChatMembers, createChat, addMembers, setEditGroup]) return ( - + {narrow && ( To: - {groupChatMembers.map((member) => ( + {groupChatMembers.map(member => ( {member?.customName?.slice(0, 10) ?? @@ -133,7 +133,7 @@ export function ChatCreation({ setQuery(e.currentTarget.value)} + onInput={e => setQuery(e.currentTarget.value)} /> )} @@ -166,7 +166,7 @@ export function ChatCreation({ Contacts {userPK && narrow - ? contactsList.map((contact) => ( + ? contactsList.map(contact => ( - e.id != userPK && !groupChatMembersIds.includes(e.id) + e => e.id != userPK && !groupChatMembersIds.includes(e.id) ) - .map((contact) => ( + .map(contact => ( - You only can send direct messages to your Contacts.{" "} + You only can send direct messages to your Contacts.{' '} - {" "} + {' '} Send a contact request to the person you would like to chat with, you will be able to chat with them once they have accepted your contact request. @@ -209,11 +208,11 @@ export function ChatCreation({ {!activeChannel && ( member.id)} + group={groupChatMembers.map(member => member.id)} /> )} - ); + ) } const CreationWrapper = styled.div` @@ -229,7 +228,7 @@ const CreationWrapper = styled.div` width: 100%; max-width: 100%; } -`; +` const CreationBar = styled.div` display: flex; @@ -240,7 +239,7 @@ const CreationBar = styled.div` &.limit { align-items: flex-start; } -`; +` const Column = styled.div` display: flex; @@ -249,7 +248,7 @@ const Column = styled.div` flex: 1; margin-right: 16px; overflow-x: hidden; -`; +` const InputBar = styled.div` display: flex; @@ -262,7 +261,7 @@ const InputBar = styled.div` padding: 6px 16px; ${textMediumStyles} -`; +` const Input = styled.input` width: 100%; @@ -278,12 +277,12 @@ const Input = styled.input` outline: none; caret-color: ${({ theme }) => theme.notificationColor}; } -`; +` const InputText = styled.div` color: ${({ theme }) => theme.secondary}; margin-right: 8px; -`; +` const CreationBtn = styled.button` padding: 11px 24px; @@ -293,7 +292,7 @@ const CreationBtn = styled.button` background: ${({ theme }) => theme.inputColor}; color: ${({ theme }) => theme.secondary}; } -`; +` const StyledList = styled.div` display: flex; @@ -303,7 +302,7 @@ const StyledList = styled.div` &::-webkit-scrollbar { display: none; } -`; +` const StyledMember = styled.div` display: flex; @@ -316,18 +315,18 @@ const StyledMember = styled.div` & + & { margin-left: 8px; } -`; +` const StyledName = styled.p` color: ${({ theme }) => theme.bodyBackgroundColor}; ${textMediumStyles} -`; +` const CloseButton = styled.button` width: 20px; height: 20px; -`; +` const Contacts = styled.div` height: calc(100% - 44px); @@ -335,7 +334,7 @@ const Contacts = styled.div` flex-direction: column; flex: 1; overflow: auto; -`; +` const Contact = styled.div` display: flex; @@ -346,34 +345,34 @@ const Contact = styled.div` &:hover { background: ${({ theme }) => theme.inputColor}; } -`; +` const ContactsHeading = styled.p` color: ${({ theme }) => theme.secondary}; ${textMediumStyles} -`; +` export const ContactsList = styled.div` display: flex; flex-direction: column; -`; +` const EmptyContacts = styled(Contacts)` justify-content: center; align-items: center; -`; +` const EmptyContactsHeading = styled(ContactsHeading)` max-width: 550px; margin-bottom: 24px; text-align: center; -`; +` const SearchMembers = styled.div` position: relative; flex: 1; -`; +` const LimitAlert = styled.p` text-transform: uppercase; @@ -384,4 +383,4 @@ const LimitAlert = styled.p` &.narrow { margin: 8px 0 0; } -`; +` diff --git a/packages/status-react/src/components/Chat/ChatInput.tsx b/packages/status-react/src/components/Chat/ChatInput.tsx index fb90817d..0a009fcc 100644 --- a/packages/status-react/src/components/Chat/ChatInput.tsx +++ b/packages/status-react/src/components/Chat/ChatInput.tsx @@ -1,42 +1,36 @@ -import { EmojiData } from "emoji-mart"; -import React, { - useCallback, - useEffect, - useMemo, - useRef, - useState, -} from "react"; -import styled from "styled-components"; +import { EmojiData } from 'emoji-mart' +import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' +import styled from 'styled-components' -import { ChatState, useChatState } from "../../contexts/chatStateProvider"; -import { useIdentity } from "../../contexts/identityProvider"; -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useModal } from "../../contexts/modalProvider"; -import { useNarrow } from "../../contexts/narrowProvider"; -import { useClickOutside } from "../../hooks/useClickOutside"; -import { Reply } from "../../hooks/useReply"; -import { uintToImgUrl } from "../../utils/uintToImgUrl"; -import { ClearBtn } from "../Form/inputStyles"; -import { ClearSvg } from "../Icons/ClearIcon"; -import { ClearSvgFull } from "../Icons/ClearIconFull"; -import { EmojiIcon } from "../Icons/EmojiIcon"; -import { GifIcon } from "../Icons/GifIcon"; -import { PictureIcon } from "../Icons/PictureIcon"; -import { ReplySvg } from "../Icons/ReplyIcon"; -import { StickerIcon } from "../Icons/StickerIcon"; -import "emoji-mart/css/emoji-mart.css"; -import { SizeLimitModal, SizeLimitModalName } from "../Modals/SizeLimitModal"; -import { UserCreationStartModalName } from "../Modals/UserCreationStartModal"; -import { SearchBlock } from "../SearchBlock"; -import { textMediumStyles, textSmallStyles } from "../Text"; +import { ChatState, useChatState } from '../../contexts/chatStateProvider' +import { useIdentity } from '../../contexts/identityProvider' +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useModal } from '../../contexts/modalProvider' +import { useNarrow } from '../../contexts/narrowProvider' +import { useClickOutside } from '../../hooks/useClickOutside' +import { Reply } from '../../hooks/useReply' +import { uintToImgUrl } from '../../utils/uintToImgUrl' +import { ClearBtn } from '../Form/inputStyles' +import { ClearSvg } from '../Icons/ClearIcon' +import { ClearSvgFull } from '../Icons/ClearIconFull' +import { EmojiIcon } from '../Icons/EmojiIcon' +import { GifIcon } from '../Icons/GifIcon' +import { PictureIcon } from '../Icons/PictureIcon' +import { ReplySvg } from '../Icons/ReplyIcon' +import { StickerIcon } from '../Icons/StickerIcon' +import 'emoji-mart/css/emoji-mart.css' +import { SizeLimitModal, SizeLimitModalName } from '../Modals/SizeLimitModal' +import { UserCreationStartModalName } from '../Modals/UserCreationStartModal' +import { SearchBlock } from '../SearchBlock' +import { textMediumStyles, textSmallStyles } from '../Text' -import { EmojiPicker } from "./EmojiPicker"; +import { EmojiPicker } from './EmojiPicker' interface ChatInputProps { - reply?: Reply | undefined; - setReply?: (val: Reply | undefined) => void; - createChat?: (group: string[]) => void; - group?: string[]; + reply?: Reply | undefined + setReply?: (val: Reply | undefined) => void + createChat?: (group: string[]) => void + group?: string[] } export function ChatInput({ @@ -45,109 +39,109 @@ export function ChatInput({ createChat, group, }: ChatInputProps) { - const narrow = useNarrow(); - const identity = useIdentity(); - const setChatState = useChatState()[1]; - const disabled = useMemo(() => !identity, [identity]); - const { sendMessage, contacts } = useMessengerContext(); - const [content, setContent] = useState(""); - const [clearComponent, setClearComponent] = useState(""); - const [showEmoji, setShowEmoji] = useState(false); - const [inputHeight, setInputHeight] = useState(40); - const [imageUint, setImageUint] = useState(undefined); + const narrow = useNarrow() + const identity = useIdentity() + const setChatState = useChatState()[1] + const disabled = useMemo(() => !identity, [identity]) + const { sendMessage, contacts } = useMessengerContext() + const [content, setContent] = useState('') + const [clearComponent, setClearComponent] = useState('') + const [showEmoji, setShowEmoji] = useState(false) + const [inputHeight, setInputHeight] = useState(40) + const [imageUint, setImageUint] = useState(undefined) - const { setModal } = useModal(SizeLimitModalName); + const { setModal } = useModal(SizeLimitModalName) const { setModal: setCreationStartModal } = useModal( UserCreationStartModalName - ); + ) - const [query, setQuery] = useState(""); + const [query, setQuery] = useState('') - const inputRef = useRef(null); + const inputRef = useRef(null) - const ref = useRef(null); - useClickOutside(ref, () => setShowEmoji(false)); + const ref = useRef(null) + useClickOutside(ref, () => setShowEmoji(false)) const image = useMemo( - () => (imageUint ? uintToImgUrl(imageUint) : ""), + () => (imageUint ? uintToImgUrl(imageUint) : ''), [imageUint] - ); + ) const addEmoji = useCallback( (e: EmojiData) => { - if ("unified" in e) { - const sym = e.unified.split("-"); - const codesArray: string[] = []; - sym.forEach((el: string) => codesArray.push("0x" + el)); + if ('unified' in e) { + const sym = e.unified.split('-') + const codesArray: string[] = [] + sym.forEach((el: string) => codesArray.push('0x' + el)) const emoji = String.fromCodePoint( ...(codesArray as unknown as number[]) - ); + ) if (inputRef.current) { - inputRef.current.appendChild(document.createTextNode(emoji)); + inputRef.current.appendChild(document.createTextNode(emoji)) } - setContent((p) => p + emoji); + setContent(p => p + emoji) } }, [setContent] - ); + ) const resizeTextArea = useCallback((target: HTMLDivElement) => { - target.style.height = "40px"; - target.style.height = `${Math.min(target.scrollHeight, 438)}px`; - setInputHeight(target.scrollHeight); - }, []); + target.style.height = '40px' + target.style.height = `${Math.min(target.scrollHeight, 438)}px` + setInputHeight(target.scrollHeight) + }, []) - const rowHeight = inputHeight + (image ? 73 : 0); + const rowHeight = inputHeight + (image ? 73 : 0) const onInputChange = useCallback( (e: React.ChangeEvent) => { - const element = document.getSelection(); - const inputElement = inputRef.current; + const element = document.getSelection() + const inputElement = inputRef.current if (inputElement && element && element.rangeCount > 0) { - const selection = element?.getRangeAt(0)?.startOffset; - const parentElement = element.anchorNode?.parentElement; - if (parentElement && parentElement.tagName === "B") { - parentElement.outerHTML = parentElement.innerText; - const range = document.createRange(); - const sel = window.getSelection(); + const selection = element?.getRangeAt(0)?.startOffset + const parentElement = element.anchorNode?.parentElement + if (parentElement && parentElement.tagName === 'B') { + parentElement.outerHTML = parentElement.innerText + const range = document.createRange() + const sel = window.getSelection() if (element.anchorNode.firstChild) { const childNumber = - element.focusOffset === 0 ? 0 : element.focusOffset - 1; + element.focusOffset === 0 ? 0 : element.focusOffset - 1 range.setStart( element.anchorNode.childNodes[childNumber], selection - ); + ) } - range.collapse(true); + range.collapse(true) - sel?.removeAllRanges(); - sel?.addRange(range); + sel?.removeAllRanges() + sel?.addRange(range) } } - const target = e.target; - resizeTextArea(target); - setContent(target.textContent ?? ""); + const target = e.target + resizeTextArea(target) + setContent(target.textContent ?? '') }, [resizeTextArea] - ); + ) const onInputKeyPress = useCallback( (e: React.KeyboardEvent) => { - if (e.key == "Enter" && !e.getModifierState("Shift")) { - e.preventDefault(); - (e.target as HTMLDivElement).style.height = "40px"; - setInputHeight(40); - sendMessage(content, imageUint, reply?.id); - setImageUint(undefined); - setClearComponent(""); + if (e.key == 'Enter' && !e.getModifierState('Shift')) { + e.preventDefault() + ;(e.target as HTMLDivElement).style.height = '40px' + setInputHeight(40) + sendMessage(content, imageUint, reply?.id) + setImageUint(undefined) + setClearComponent('') if (inputRef.current) { - inputRef.current.innerHTML = ""; + inputRef.current.innerHTML = '' } - setContent(""); - if (setReply) setReply(undefined); + setContent('') + if (setReply) setReply(undefined) if (createChat && group) { - createChat(group); - setChatState(ChatState.ChatBody); + createChat(group) + setChatState(ChatState.ChatBody) } } }, @@ -161,88 +155,88 @@ export function ChatInput({ setChatState, setReply, ] - ); + ) const [selectedElement, setSelectedElement] = useState<{ - element: Selection | null; - start: number; - end: number; - text: string; - node: Node | null; - }>({ element: null, start: 0, end: 0, text: "", node: null }); + element: Selection | null + start: number + end: number + text: string + node: Node | null + }>({ element: null, start: 0, end: 0, text: '', node: null }) const handleCursorChange = useCallback(() => { - const element = document.getSelection(); + const element = document.getSelection() if (element && element.rangeCount > 0) { - const selection = element?.getRangeAt(0)?.startOffset; - const text = element?.anchorNode?.textContent; + const selection = element?.getRangeAt(0)?.startOffset + const text = element?.anchorNode?.textContent if (selection && text) { - const end = text.indexOf(" ", selection); - const start = text.lastIndexOf(" ", selection - 1); + const end = text.indexOf(' ', selection) + const start = text.lastIndexOf(' ', selection - 1) setSelectedElement({ element, start, end, text, node: element.anchorNode, - }); + }) const substring = text.substring( start > -1 ? start + 1 : 0, end > -1 ? end : undefined - ); - if (substring.startsWith("@")) { - setQuery(substring.slice(1)); + ) + if (substring.startsWith('@')) { + setQuery(substring.slice(1)) } else { - setQuery(""); + setQuery('') } } } - }, []); + }, []) - useEffect(handleCursorChange, [content, handleCursorChange]); + useEffect(handleCursorChange, [content, handleCursorChange]) const addMention = useCallback( (contact: string) => { if (inputRef?.current) { - const { element, start, end, text, node } = selectedElement; + const { element, start, end, text, node } = selectedElement if (element && text && node) { - const firstSlice = text.slice(0, start > -1 ? start : 0); - const secondSlice = text.slice(end > -1 ? end : content.length); - const replaceContent = `${firstSlice} @${contact}${secondSlice}`; - const spaceElement = document.createTextNode(" "); - const contactElement = document.createElement("span"); - contactElement.innerText = `@${contact}`; + const firstSlice = text.slice(0, start > -1 ? start : 0) + const secondSlice = text.slice(end > -1 ? end : content.length) + const replaceContent = `${firstSlice} @${contact}${secondSlice}` + const spaceElement = document.createTextNode(' ') + const contactElement = document.createElement('span') + contactElement.innerText = `@${contact}` if (contactElement && element.rangeCount > 0) { - const range = element.getRangeAt(0); - range.setStart(node, start > -1 ? start : 0); + const range = element.getRangeAt(0) + range.setStart(node, start > -1 ? start : 0) if (end === -1 || end > text.length) { - range.setEnd(node, text.length); + range.setEnd(node, text.length) } else { - range.setEnd(node, end); + range.setEnd(node, end) } - range.deleteContents(); + range.deleteContents() if (end === -1) { - range.insertNode(spaceElement.cloneNode()); + range.insertNode(spaceElement.cloneNode()) } - range.insertNode(contactElement); + range.insertNode(contactElement) if (start > -1) { - range.insertNode(spaceElement.cloneNode()); + range.insertNode(spaceElement.cloneNode()) } - range.collapse(); + range.collapse() } - inputRef.current.focus(); - setQuery(""); - setContent(replaceContent); - resizeTextArea(inputRef.current); + inputRef.current.focus() + setQuery('') + setContent(replaceContent) + resizeTextArea(inputRef.current) } } }, [inputRef, content, selectedElement, resizeTextArea] - ); + ) return ( - + @@ -251,18 +245,18 @@ export function ChatInput({ type="file" multiple={true} accept="image/png, image/jpeg" - onChange={(e) => { - const fileReader = new FileReader(); - fileReader.onloadend = (s) => { - const arr = new Uint8Array(s.target?.result as ArrayBuffer); - setImageUint(arr); - }; + onChange={e => { + const fileReader = new FileReader() + fileReader.onloadend = s => { + const arr = new Uint8Array(s.target?.result as ArrayBuffer) + setImageUint(arr) + } if (e?.target?.files?.[0]) { if (e.target.files[0].size < 1024 * 1024) { - fileReader.readAsArrayBuffer(e.target.files[0]); + fileReader.readAsArrayBuffer(e.target.files[0]) } else { - setModal(true); + setModal(true) } } }} @@ -272,8 +266,8 @@ export function ChatInput({ {reply && ( - {" "} - {" "} + {' '} + {' '} {contacts[reply.sender]?.customName ?? contacts[reply.sender].trueName} @@ -281,10 +275,10 @@ export function ChatInput({ {reply.image && } { - if (setReply) setReply(undefined); + if (setReply) setReply(undefined) }} > - {" "} + {' '} @@ -314,10 +308,10 @@ export function ChatInput({ onClick={handleCursorChange} dangerouslySetInnerHTML={{ __html: disabled - ? "You need to join this community to send messages" + ? 'You need to join this community to send messages' : clearComponent, }} - className={`${disabled && "disabled"} `} + className={`${disabled && 'disabled'} `} /> )} {query && ( @@ -333,7 +327,7 @@ export function ChatInput({ { - if (!disabled) setShowEmoji(!showEmoji); + if (!disabled) setShowEmoji(!showEmoji) }} disabled={disabled} > @@ -355,7 +349,7 @@ export function ChatInput({ - ); + ) } const InputWrapper = styled.div` @@ -363,11 +357,11 @@ const InputWrapper = styled.div` flex-direction: column; width: 100%; position: relative; -`; +` const EmojiWrapper = styled.div` position: relative; -`; +` const View = styled.div` display: flex; @@ -378,7 +372,7 @@ const View = styled.div` &.creation { padding: 0; } -`; +` const InputArea = styled.div` position: relative; @@ -389,7 +383,7 @@ const InputArea = styled.div` padding: 2px; background: ${({ theme }) => theme.inputColor}; border-radius: 16px 16px 4px 16px; -`; +` const Row = styled.div` position: relative; @@ -400,7 +394,7 @@ const Row = styled.div` padding-right: 6px; background: ${({ theme }) => theme.inputColor}; border-radius: 16px 16px 4px 16px; -`; +` const InputButtons = styled.div` display: flex; @@ -409,19 +403,19 @@ const InputButtons = styled.div` button + button { margin-left: 4px; } -`; +` const ImageWrapper = styled.div` width: 64px; position: relative; -`; +` const ImagePreview = styled.img` width: 64px; height: 64px; border-radius: 16px 16px 4px 16px; margin-left: 8px; margin-top: 9px; -`; +` const ClearImgBtn = styled(ClearBtn)` width: 24px; @@ -432,7 +426,7 @@ const ClearImgBtn = styled(ClearBtn)` padding: 0; border: 2px solid ${({ theme }) => theme.inputColor}; background-color: ${({ theme }) => theme.inputColor}; -`; +` const Input = styled.div` display: block; @@ -480,7 +474,7 @@ const Input = styled.div` cursor: default; } } -`; +` const AddPictureInputWrapper = styled.div` position: relative; @@ -491,14 +485,14 @@ const AddPictureInputWrapper = styled.div` height: 32px; margin-right: 4px; - & > input[type="file"]::-webkit-file-upload-button { + & > input[type='file']::-webkit-file-upload-button { cursor: pointer; } & > input:disabled::-webkit-file-upload-button { cursor: default; } -`; +` const AddPictureInput = styled.input` position: absolute; @@ -507,7 +501,7 @@ const AddPictureInput = styled.input` width: 100%; height: 100%; opacity: 0; -`; +` const ChatButton = styled.button` width: 32px; @@ -516,13 +510,13 @@ const ChatButton = styled.button` &:disabled { cursor: default; } -`; +` const CloseButton = styled(ChatButton)` position: absolute; top: 0; right: 0; -`; +` const ReplyWrapper = styled.div` display: flex; @@ -533,14 +527,14 @@ const ReplyWrapper = styled.div` color: ${({ theme }) => theme.primary}; border-radius: 14px 14px 4px 14px; position: relative; -`; +` export const ReplyTo = styled.div` display: flex; align-items: center; font-weight: 500; ${textSmallStyles}; -`; +` export const ReplyOn = styled.div` width: 100%; @@ -548,7 +542,7 @@ export const ReplyOn = styled.div` white-space: nowrap; text-overflow: ellipsis; ${textSmallStyles}; -`; +` const JoinBtn = styled.button` color: ${({ theme }) => theme.secondary}; @@ -559,4 +553,4 @@ const JoinBtn = styled.button` text-align: start; ${textMediumStyles}; -`; +` diff --git a/packages/status-react/src/components/Chat/ChatMessageContent.tsx b/packages/status-react/src/components/Chat/ChatMessageContent.tsx index 87e4bf6a..38759206 100644 --- a/packages/status-react/src/components/Chat/ChatMessageContent.tsx +++ b/packages/status-react/src/components/Chat/ChatMessageContent.tsx @@ -1,39 +1,39 @@ -import { decode } from "html-entities"; -import React, { useEffect, useMemo, useRef, useState } from "react"; -import styled from "styled-components"; +import { decode } from 'html-entities' +import React, { useEffect, useMemo, useRef, useState } from 'react' +import styled from 'styled-components' -import { useFetchMetadata } from "../../contexts/fetchMetadataProvider"; -import { useUserPublicKey } from "../../contexts/identityProvider"; -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useClickOutside } from "../../hooks/useClickOutside"; -import { ChatMessage } from "../../models/ChatMessage"; -import { Metadata } from "../../models/Metadata"; -import { ContactMenu } from "../Form/ContactMenu"; -import { ImageMenu } from "../Form/ImageMenu"; -import { textMediumStyles, textSmallStyles } from "../Text"; +import { useFetchMetadata } from '../../contexts/fetchMetadataProvider' +import { useUserPublicKey } from '../../contexts/identityProvider' +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useClickOutside } from '../../hooks/useClickOutside' +import { ChatMessage } from '../../models/ChatMessage' +import { Metadata } from '../../models/Metadata' +import { ContactMenu } from '../Form/ContactMenu' +import { ImageMenu } from '../Form/ImageMenu' +import { textMediumStyles, textSmallStyles } from '../Text' interface MentionProps { - id: string; - setMentioned: (val: boolean) => void; - className?: string; + id: string + setMentioned: (val: boolean) => void + className?: string } export function Mention({ id, setMentioned, className }: MentionProps) { - const { contacts } = useMessengerContext(); - const contact = useMemo(() => contacts[id.slice(1)], [id, contacts]); - const [showMenu, setShowMenu] = useState(false); - const userPK = useUserPublicKey(); + const { contacts } = useMessengerContext() + const contact = useMemo(() => contacts[id.slice(1)], [id, contacts]) + const [showMenu, setShowMenu] = useState(false) + const userPK = useUserPublicKey() useEffect(() => { if (userPK && contact) { - if (contact.id === userPK) setMentioned(true); + if (contact.id === userPK) setMentioned(true) } - }, [contact, userPK, setMentioned]); + }, [contact, userPK, setMentioned]) - const ref = useRef(null); - useClickOutside(ref, () => setShowMenu(false)); + const ref = useRef(null) + useClickOutside(ref, () => setShowMenu(false)) - if (!contact) return <>{id}; + if (!contact) return <>{id} return ( setShowMenu(!showMenu)} @@ -43,15 +43,15 @@ export function Mention({ id, setMentioned, className }: MentionProps) { {`@${contact?.customName ?? contact.trueName}`} {showMenu && } - ); + ) } type ChatMessageContentProps = { - message: ChatMessage; - setImage: (image: string) => void; - setLinkOpen: (link: string) => void; - setMentioned: (val: boolean) => void; -}; + message: ChatMessage + setImage: (image: string) => void + setLinkOpen: (link: string) => void + setMentioned: (val: boolean) => void +} export function ChatMessageContent({ message, @@ -59,82 +59,82 @@ export function ChatMessageContent({ setLinkOpen, setMentioned, }: ChatMessageContentProps) { - const fetchMetadata = useFetchMetadata(); - const { content, image } = useMemo(() => message, [message]); + const fetchMetadata = useFetchMetadata() + const { content, image } = useMemo(() => message, [message]) const [elements, setElements] = useState<(string | React.ReactElement)[]>([ content, - ]); - const [link, setLink] = useState(undefined); - const [openGraph, setOpenGraph] = useState(undefined); + ]) + const [link, setLink] = useState(undefined) + const [openGraph, setOpenGraph] = useState(undefined) useEffect(() => { - let link; - const split = content.split(" "); + let link + const split = content.split(' ') const newSplit = split.flatMap((element, idx) => { - if (element.startsWith("http://") || element.startsWith("https://")) { - link = element; + if (element.startsWith('http://') || element.startsWith('https://')) { + link = element return [ setLinkOpen(element)}> {element} , - " ", - ]; + ' ', + ] } - if (element.startsWith("@")) { + if (element.startsWith('@')) { return [ , - " ", - ]; + ' ', + ] } - return [element, " "]; - }); - newSplit.pop(); - setLink(link); - setElements(newSplit); - }, [content, setLink, setMentioned, setElements, setLinkOpen]); + return [element, ' '] + }) + newSplit.pop() + setLink(link) + setElements(newSplit) + }, [content, setLink, setMentioned, setElements, setLinkOpen]) useEffect(() => { const updatePreview = async () => { if (link && fetchMetadata) { try { - const metadata = await fetchMetadata(link); + const metadata = await fetchMetadata(link) if (metadata) { - setOpenGraph(metadata); + setOpenGraph(metadata) } } catch { - return; + return } } - }; - updatePreview(); - }, [link, fetchMetadata]); + } + updatePreview() + }, [link, fetchMetadata]) return ( -
{elements.map((el) => el)}
+
{elements.map(el => el)}
{image && ( { - setImage(image); + setImage(image) }} /> )} {openGraph && ( - setLinkOpen(link ?? "")}> - - {openGraph["og:title"]} + setLinkOpen(link ?? '')}> + + {openGraph['og:title']} - {openGraph["og:site_name"]} + {openGraph['og:site_name']} )}
- ); + ) } const MessageImageWrapper = styled.div` @@ -142,7 +142,7 @@ const MessageImageWrapper = styled.div` height: 196px; margin-top: 8px; position: relative; -`; +` const MessageImage = styled.img` width: 100%; @@ -150,10 +150,10 @@ const MessageImage = styled.img` object-fit: cover; border-radius: 16px; cursor: pointer; -`; +` const PreviewSiteNameWrapper = styled.div` - font-family: "Inter"; + font-family: 'Inter'; font-style: normal; font-weight: normal; font-size: 12px; @@ -162,7 +162,7 @@ const PreviewSiteNameWrapper = styled.div` margin-top: 2px; color: #939ba1; margin-left: 12px; -`; +` const PreviewTitleWrapper = styled.div` margin-top: 7px; @@ -176,13 +176,13 @@ const PreviewTitleWrapper = styled.div` margin-left: 12px; ${textSmallStyles} -`; +` const PreviewImage = styled.img` border-radius: 15px 15px 15px 4px; width: 305px; height: 170px; -`; +` const PreviewWrapper = styled.div` margin-top: 9px; @@ -195,12 +195,12 @@ const PreviewWrapper = styled.div` display: flex; flex-direction: column; padding: 0px; -`; +` const ContentWrapper = styled.div` display: flex; flex-direction: column; -`; +` const MentionBLock = styled.div` display: inline-flex; @@ -224,10 +224,10 @@ const MentionBLock = styled.div` } ${textMediumStyles} -`; +` const Link = styled.a` text-decoration: underline; cursor: pointer; color: ${({ theme }) => theme.memberNameColor}; -`; +` diff --git a/packages/status-react/src/components/Chat/ChatTopbar.tsx b/packages/status-react/src/components/Chat/ChatTopbar.tsx index 32d521a7..318cf6f6 100644 --- a/packages/status-react/src/components/Chat/ChatTopbar.tsx +++ b/packages/status-react/src/components/Chat/ChatTopbar.tsx @@ -1,30 +1,30 @@ -import React, { useRef, useState } from "react"; -import styled from "styled-components"; +import React, { useRef, useState } from 'react' +import styled from 'styled-components' -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useNarrow } from "../../contexts/narrowProvider"; -import { useClickOutside } from "../../hooks/useClickOutside"; +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useNarrow } from '../../contexts/narrowProvider' +import { useClickOutside } from '../../hooks/useClickOutside' import { ActivityButton, ActivityWrapper, -} from "../ActivityCenter/ActivityButton"; -import { Channel } from "../Channels/Channel"; -import { Community } from "../Community"; -import { ChannelMenu } from "../Form/ChannelMenu"; -import { ActivityIcon } from "../Icons/ActivityIcon"; -import { MembersIcon } from "../Icons/MembersIcon"; -import { MoreIcon } from "../Icons/MoreIcon"; -import { CommunitySkeleton } from "../Skeleton/CommunitySkeleton"; -import { Loading } from "../Skeleton/Loading"; +} from '../ActivityCenter/ActivityButton' +import { Channel } from '../Channels/Channel' +import { Community } from '../Community' +import { ChannelMenu } from '../Form/ChannelMenu' +import { ActivityIcon } from '../Icons/ActivityIcon' +import { MembersIcon } from '../Icons/MembersIcon' +import { MoreIcon } from '../Icons/MoreIcon' +import { CommunitySkeleton } from '../Skeleton/CommunitySkeleton' +import { Loading } from '../Skeleton/Loading' -import { ChatBodyState } from "./ChatBody"; +import { ChatBodyState } from './ChatBody' export function ChatTopbarLoading() { - const narrow = useNarrow(); + const narrow = useNarrow() return ( - - + + @@ -46,16 +46,16 @@ export function ChatTopbarLoading() { - ); + ) } type ChatTopbarProps = { - showState: ChatBodyState; - onClick: () => void; - switchShowState: (state: ChatBodyState) => void; - showMembers: boolean; - setEditGroup: React.Dispatch>; -}; + showState: ChatBodyState + onClick: () => void + switchShowState: (state: ChatBodyState) => void + showMembers: boolean + setEditGroup: React.Dispatch> +} export function ChatTopbar({ showState, @@ -64,27 +64,27 @@ export function ChatTopbar({ showMembers, setEditGroup, }: ChatTopbarProps) { - const { activeChannel, loadingMessenger } = useMessengerContext(); + const { activeChannel, loadingMessenger } = useMessengerContext() - const narrow = useNarrow(); - const [showChannelMenu, setShowChannelMenu] = useState(false); + const narrow = useNarrow() + const [showChannelMenu, setShowChannelMenu] = useState(false) - const ref = useRef(null); - useClickOutside(ref, () => setShowChannelMenu(false)); + const ref = useRef(null) + useClickOutside(ref, () => setShowChannelMenu(false)) if (!activeChannel) { - return ; + return } return ( - + {!loadingMessenger ? ( <> {narrow && ( - + )} @@ -104,8 +104,8 @@ export function ChatTopbar({ - {!narrow && activeChannel.type !== "dm" && ( - + {!narrow && activeChannel.type !== 'dm' && ( + )} @@ -119,7 +119,7 @@ export function ChatTopbar({ switchMemberList={() => switchShowState(ChatBodyState.Members)} setShowChannelMenu={setShowChannelMenu} setEditGroup={setEditGroup} - className={`${narrow && "narrow"}`} + className={`${narrow && 'narrow'}`} /> )} @@ -128,7 +128,7 @@ export function ChatTopbar({ {loadingMessenger && } - ); + ) } const Topbar = styled.div` @@ -142,7 +142,7 @@ const Topbar = styled.div` &.narrow { width: 100%; } -`; +` const ChannelWrapper = styled.div` display: flex; @@ -152,11 +152,11 @@ const ChannelWrapper = styled.div` &.narrow { width: calc(100% - 46px); } -`; +` const SkeletonWrapper = styled.div` padding: 8px; -`; +` const CommunityWrap = styled.div` padding-right: 10px; @@ -168,7 +168,7 @@ const CommunityWrap = styled.div` } &:after { - content: ""; + content: ''; position: absolute; right: 0; top: 50%; @@ -179,13 +179,13 @@ const CommunityWrap = styled.div` background: ${({ theme }) => theme.primary}; opacity: 0.1; } -`; +` const MenuWrapper = styled.div` display: flex; align-items: center; padding: 8px 0; -`; +` export const TopBtn = styled.button` width: 32px; @@ -206,4 +206,4 @@ export const TopBtn = styled.button` &:disabled { cursor: default; } -`; +` diff --git a/packages/status-react/src/components/Chat/EmojiPicker.tsx b/packages/status-react/src/components/Chat/EmojiPicker.tsx index eb424031..0f598e4f 100644 --- a/packages/status-react/src/components/Chat/EmojiPicker.tsx +++ b/packages/status-react/src/components/Chat/EmojiPicker.tsx @@ -1,41 +1,41 @@ -import { EmojiData, Picker } from "emoji-mart"; -import React from "react"; -import { useTheme } from "styled-components"; +import { EmojiData, Picker } from 'emoji-mart' +import React from 'react' +import { useTheme } from 'styled-components' -import { useLow } from "../../contexts/narrowProvider"; -import { lightTheme, Theme } from "../../styles/themes"; +import { useLow } from '../../contexts/narrowProvider' +import { lightTheme, Theme } from '../../styles/themes' type EmojiPickerProps = { - showEmoji: boolean; - addEmoji: (e: EmojiData) => void; - bottom: number; -}; + showEmoji: boolean + addEmoji: (e: EmojiData) => void + bottom: number +} export function EmojiPicker({ showEmoji, addEmoji, bottom }: EmojiPickerProps) { - const theme = useTheme() as Theme; - const low = useLow(); + const theme = useTheme() as Theme + const low = useLow() if (showEmoji) { return ( - ); + ) } - return null; + return null } diff --git a/packages/status-react/src/components/Community.tsx b/packages/status-react/src/components/Community.tsx index d25a0ec5..650e655c 100644 --- a/packages/status-react/src/components/Community.tsx +++ b/packages/status-react/src/components/Community.tsx @@ -1,27 +1,27 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' -import { useMessengerContext } from "../contexts/messengerProvider"; -import { useModal } from "../contexts/modalProvider"; +import { useMessengerContext } from '../contexts/messengerProvider' +import { useModal } from '../contexts/modalProvider' -import { CommunityIdentity } from "./CommunityIdentity"; -import { CommunityModalName } from "./Modals/CommunityModal"; -import { CommunitySkeleton } from "./Skeleton/CommunitySkeleton"; +import { CommunityIdentity } from './CommunityIdentity' +import { CommunityModalName } from './Modals/CommunityModal' +import { CommunitySkeleton } from './Skeleton/CommunitySkeleton' interface CommunityProps { - className?: string; + className?: string } export function Community({ className }: CommunityProps) { - const { communityData } = useMessengerContext(); - const { setModal } = useModal(CommunityModalName); + const { communityData } = useMessengerContext() + const { setModal } = useModal(CommunityModalName) if (!communityData) { return ( - ); + ) } return ( @@ -30,9 +30,9 @@ export function Community({ className }: CommunityProps) { - ); + ) } const SkeletonWrapper = styled.div` margin-bottom: 16px; -`; +` diff --git a/packages/status-react/src/components/CommunityChat.tsx b/packages/status-react/src/components/CommunityChat.tsx index 7a65c5bc..6b77b23a 100644 --- a/packages/status-react/src/components/CommunityChat.tsx +++ b/packages/status-react/src/components/CommunityChat.tsx @@ -1,28 +1,28 @@ -import React, { useRef } from "react"; -import { ThemeProvider } from "styled-components"; -import styled from "styled-components"; +import React, { useRef } from 'react' +import { ThemeProvider } from 'styled-components' +import styled from 'styled-components' -import { ConfigType } from ".."; -import { ChatStateProvider } from "../contexts/chatStateProvider"; -import { ConfigProvider } from "../contexts/configProvider"; -import { FetchMetadataProvider } from "../contexts/fetchMetadataProvider"; -import { IdentityProvider } from "../contexts/identityProvider"; -import { MessengerProvider } from "../contexts/messengerProvider"; -import { ModalProvider } from "../contexts/modalProvider"; -import { NarrowProvider } from "../contexts/narrowProvider"; -import { ScrollProvider } from "../contexts/scrollProvider"; -import { ToastProvider } from "../contexts/toastProvider"; -import { Metadata } from "../models/Metadata"; -import { GlobalStyle } from "../styles/GlobalStyle"; -import { Theme } from "../styles/themes"; +import { ConfigType } from '..' +import { ChatStateProvider } from '../contexts/chatStateProvider' +import { ConfigProvider } from '../contexts/configProvider' +import { FetchMetadataProvider } from '../contexts/fetchMetadataProvider' +import { IdentityProvider } from '../contexts/identityProvider' +import { MessengerProvider } from '../contexts/messengerProvider' +import { ModalProvider } from '../contexts/modalProvider' +import { NarrowProvider } from '../contexts/narrowProvider' +import { ScrollProvider } from '../contexts/scrollProvider' +import { ToastProvider } from '../contexts/toastProvider' +import { Metadata } from '../models/Metadata' +import { GlobalStyle } from '../styles/GlobalStyle' +import { Theme } from '../styles/themes' -import { CommunityChatRoom } from "./CommunityChatRoom"; +import { CommunityChatRoom } from './CommunityChatRoom' interface CommunityChatProps { - theme: Theme; - communityKey: string; - config: ConfigType; - fetchMetadata?: (url: string) => Promise; + theme: Theme + communityKey: string + config: ConfigType + fetchMetadata?: (url: string) => Promise } export function CommunityChat({ @@ -31,7 +31,7 @@ export function CommunityChat({ fetchMetadata, communityKey, }: CommunityChatProps) { - const ref = useRef(null); + const ref = useRef(null) return ( @@ -58,10 +58,10 @@ export function CommunityChat({ - ); + ) } const Wrapper = styled.div` height: 100%; overflow: hidden; -`; +` diff --git a/packages/status-react/src/components/CommunityChatRoom.tsx b/packages/status-react/src/components/CommunityChatRoom.tsx index 9208ad60..6b9e3ac2 100644 --- a/packages/status-react/src/components/CommunityChatRoom.tsx +++ b/packages/status-react/src/components/CommunityChatRoom.tsx @@ -1,29 +1,29 @@ -import React, { useState } from "react"; -import styled from "styled-components"; +import React, { useState } from 'react' +import styled from 'styled-components' -import { ChatState, useChatState } from "../contexts/chatStateProvider"; -import { useMessengerContext } from "../contexts/messengerProvider"; -import { useNarrow } from "../contexts/narrowProvider"; +import { ChatState, useChatState } from '../contexts/chatStateProvider' +import { useMessengerContext } from '../contexts/messengerProvider' +import { useNarrow } from '../contexts/narrowProvider' -import { Channels } from "./Channels/Channels"; -import { ChatBody } from "./Chat/ChatBody"; -import { ChatCreation } from "./Chat/ChatCreation"; -import { Community } from "./Community"; -import { Members } from "./Members/Members"; -import { AgreementModal } from "./Modals/AgreementModal"; -import { CoinbaseModal } from "./Modals/CoinbaseModal"; -import { CommunityModal } from "./Modals/CommunityModal"; -import { EditModal } from "./Modals/EditModal"; -import { LeavingModal } from "./Modals/LeavingModal"; -import { LogoutModal } from "./Modals/LogoutModal"; -import { ProfileFoundModal } from "./Modals/ProfileFoundModal"; -import { ProfileModal } from "./Modals/ProfileModal"; -import { StatusModal } from "./Modals/StatusModal"; -import { UserCreationModal } from "./Modals/UserCreationModal"; -import { UserCreationStartModal } from "./Modals/UserCreationStartModal"; -import { WalletConnectModal } from "./Modals/WalletConnectModal"; -import { WalletModal } from "./Modals/WalletModal"; -import { ToastMessageList } from "./ToastMessages/ToastMessageList"; +import { Channels } from './Channels/Channels' +import { ChatBody } from './Chat/ChatBody' +import { ChatCreation } from './Chat/ChatCreation' +import { Community } from './Community' +import { Members } from './Members/Members' +import { AgreementModal } from './Modals/AgreementModal' +import { CoinbaseModal } from './Modals/CoinbaseModal' +import { CommunityModal } from './Modals/CommunityModal' +import { EditModal } from './Modals/EditModal' +import { LeavingModal } from './Modals/LeavingModal' +import { LogoutModal } from './Modals/LogoutModal' +import { ProfileFoundModal } from './Modals/ProfileFoundModal' +import { ProfileModal } from './Modals/ProfileModal' +import { StatusModal } from './Modals/StatusModal' +import { UserCreationModal } from './Modals/UserCreationModal' +import { UserCreationStartModal } from './Modals/UserCreationStartModal' +import { WalletConnectModal } from './Modals/WalletConnectModal' +import { WalletModal } from './Modals/WalletModal' +import { ToastMessageList } from './ToastMessages/ToastMessageList' function Modals() { return ( @@ -42,15 +42,15 @@ function Modals() { - ); + ) } export function CommunityChatRoom() { - const [state] = useChatState(); - const [showMembers, setShowMembers] = useState(false); - const [editGroup, setEditGroup] = useState(false); - const narrow = useNarrow(); - const { activeChannel } = useMessengerContext(); + const [state] = useChatState() + const [showMembers, setShowMembers] = useState(false) + const [editGroup, setEditGroup] = useState(false) + const narrow = useNarrow() + const { activeChannel } = useMessengerContext() return ( @@ -73,12 +73,12 @@ export function CommunityChatRoom() { !narrow && state === ChatState.ChatBody && activeChannel && - activeChannel.type !== "dm" && } + activeChannel.type !== 'dm' && } {state === ChatState.ChatCreation && } - ); + ) } const ChatWrapper = styled.div` @@ -86,7 +86,7 @@ const ChatWrapper = styled.div` height: 100%; display: flex; position: relative; -`; +` const ChannelsWrapper = styled.div` width: 21%; @@ -96,9 +96,9 @@ const ChannelsWrapper = styled.div` padding: 10px 16px; display: flex; flex-direction: column; -`; +` const StyledCommunity = styled(Community)` padding: 0 0 0 8px; margin: 0 0 16px; -`; +` diff --git a/packages/status-react/src/components/CommunityIdentity.tsx b/packages/status-react/src/components/CommunityIdentity.tsx index 1219e9ad..da50b62c 100644 --- a/packages/status-react/src/components/CommunityIdentity.tsx +++ b/packages/status-react/src/components/CommunityIdentity.tsx @@ -1,20 +1,20 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' -import { useMessengerContext } from "../contexts/messengerProvider"; +import { useMessengerContext } from '../contexts/messengerProvider' -import { textMediumStyles } from "./Text"; +import { textMediumStyles } from './Text' export interface CommunityIdentityProps { - subtitle: string; - className?: string; + subtitle: string + className?: string } export const CommunityIdentity = ({ subtitle, className, }: CommunityIdentityProps) => { - const { communityData } = useMessengerContext(); + const { communityData } = useMessengerContext() return ( @@ -22,10 +22,10 @@ export const CommunityIdentity = ({ style={{ backgroundImage: communityData?.icon ? `url(${communityData?.icon}` - : "", + : '', }} > - {" "} + {' '} {communityData?.icon === undefined && communityData?.name.slice(0, 1).toUpperCase()} @@ -34,18 +34,18 @@ export const CommunityIdentity = ({ {subtitle} - ); -}; + ) +} const Row = styled.div` display: flex; -`; +` export const Column = styled.div` display: flex; flex-direction: column; align-items: flex-start; -`; +` export const Logo = styled.div` width: 36px; @@ -63,22 +63,22 @@ export const Logo = styled.div` font-weight: bold; font-size: 15px; line-height: 20px; -`; +` const Name = styled.p` - font-family: "Inter", sans-serif; + font-family: 'Inter', sans-serif; font-weight: 500; text-align: left; color: ${({ theme }) => theme.primary}; white-space: nowrap; ${textMediumStyles} -`; +` const Subtitle = styled.p` - font-family: "Inter", sans-serif; + font-family: 'Inter', sans-serif; font-size: 12px; line-height: 16px; letter-spacing: 0.1px; color: ${({ theme }) => theme.secondary}; -`; +` diff --git a/packages/status-react/src/components/Form/ChannelMenu.tsx b/packages/status-react/src/components/Form/ChannelMenu.tsx index d5f4e660..e719817d 100644 --- a/packages/status-react/src/components/Form/ChannelMenu.tsx +++ b/packages/status-react/src/components/Form/ChannelMenu.tsx @@ -1,36 +1,36 @@ -import React, { useMemo, useRef, useState } from "react"; -import styled from "styled-components"; +import React, { useMemo, useRef, useState } from 'react' +import styled from 'styled-components' -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useModal } from "../../contexts/modalProvider"; -import { useNarrow } from "../../contexts/narrowProvider"; -import { useClickOutside } from "../../hooks/useClickOutside"; -import { useContextMenu } from "../../hooks/useContextMenu"; -import { ChannelData } from "../../models/ChannelData"; -import { AddMemberIcon } from "../Icons/AddMemberIcon"; -import { CheckIcon } from "../Icons/CheckIcon"; -import { DeleteIcon } from "../Icons/DeleteIcon"; -import { DownloadIcon } from "../Icons/DownloadIcon"; -import { EditIcon } from "../Icons/EditIcon"; -import { LeftIcon } from "../Icons/LeftIcon"; -import { MembersSmallIcon } from "../Icons/MembersSmallIcon"; -import { MuteIcon } from "../Icons/MuteIcon"; -import { NextIcon } from "../Icons/NextIcon"; -import { ProfileIcon } from "../Icons/ProfileIcon"; -import { EditModalName } from "../Modals/EditModal"; -import { LeavingModalName } from "../Modals/LeavingModal"; -import { ProfileModalName } from "../Modals/ProfileModal"; +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useModal } from '../../contexts/modalProvider' +import { useNarrow } from '../../contexts/narrowProvider' +import { useClickOutside } from '../../hooks/useClickOutside' +import { useContextMenu } from '../../hooks/useContextMenu' +import { ChannelData } from '../../models/ChannelData' +import { AddMemberIcon } from '../Icons/AddMemberIcon' +import { CheckIcon } from '../Icons/CheckIcon' +import { DeleteIcon } from '../Icons/DeleteIcon' +import { DownloadIcon } from '../Icons/DownloadIcon' +import { EditIcon } from '../Icons/EditIcon' +import { LeftIcon } from '../Icons/LeftIcon' +import { MembersSmallIcon } from '../Icons/MembersSmallIcon' +import { MuteIcon } from '../Icons/MuteIcon' +import { NextIcon } from '../Icons/NextIcon' +import { ProfileIcon } from '../Icons/ProfileIcon' +import { EditModalName } from '../Modals/EditModal' +import { LeavingModalName } from '../Modals/LeavingModal' +import { ProfileModalName } from '../Modals/ProfileModal' -import { DropdownMenu, MenuItem, MenuSection, MenuText } from "./DropdownMenu"; -import { MuteMenu } from "./MuteMenu"; +import { DropdownMenu, MenuItem, MenuSection, MenuText } from './DropdownMenu' +import { MuteMenu } from './MuteMenu' interface ChannelMenuProps { - channel: ChannelData; - setShowChannelMenu?: (val: boolean) => void; - showNarrowMembers?: boolean; - switchMemberList?: () => void; - setEditGroup?: (val: boolean) => void; - className?: string; + channel: ChannelData + setShowChannelMenu?: (val: boolean) => void + showNarrowMembers?: boolean + switchMemberList?: () => void + setEditGroup?: (val: boolean) => void + className?: string } export const ChannelMenu = ({ @@ -41,45 +41,45 @@ export const ChannelMenu = ({ setEditGroup, className, }: ChannelMenuProps) => { - const narrow = useNarrow(); - const { clearNotifications, channelsDispatch } = useMessengerContext(); - const { setModal } = useModal(EditModalName); - const { setModal: setLeavingModal } = useModal(LeavingModalName); - const { setModal: setProfileModal } = useModal(ProfileModalName); - const [showSubmenu, setShowSubmenu] = useState(false); + const narrow = useNarrow() + const { clearNotifications, channelsDispatch } = useMessengerContext() + const { setModal } = useModal(EditModalName) + const { setModal: setLeavingModal } = useModal(LeavingModalName) + const { setModal: setProfileModal } = useModal(ProfileModalName) + const [showSubmenu, setShowSubmenu] = useState(false) const { showMenu, setShowMenu: setShowSideMenu } = useContextMenu( - channel.id + "contextMenu" - ); + channel.id + 'contextMenu' + ) const setShowMenu = useMemo( () => (setShowChannelMenu ? setShowChannelMenu : setShowSideMenu), [setShowChannelMenu, setShowSideMenu] - ); + ) - const ref = useRef(null); - useClickOutside(ref, () => setShowMenu(false)); + const ref = useRef(null) + useClickOutside(ref, () => setShowMenu(false)) if (showMenu || setShowChannelMenu) { return ( - {narrow && channel.type !== "dm" && ( + {narrow && channel.type !== 'dm' && ( { - if (switchMemberList) switchMemberList(); - setShowMenu(false); + if (switchMemberList) switchMemberList() + setShowMenu(false) }} > - {showNarrowMembers ? "Hide" : "View"} Members + {showNarrowMembers ? 'Hide' : 'View'} Members )} - {channel.type === "group" && ( + {channel.type === 'group' && ( <> { - if (setEditGroup) setEditGroup(true); - setShowMenu(false); + if (setEditGroup) setEditGroup(true) + setShowMenu(false) }} > @@ -91,50 +91,50 @@ export const ChannelMenu = ({ )} - {channel.type === "dm" && ( + {channel.type === 'dm' && ( { setProfileModal({ id: channel.name, renamingState: false, requestState: false, - }); - setShowMenu(false); + }) + setShowMenu(false) }} > View Profile )} - + { if (channel.isMuted) { channelsDispatch({ - type: "ToggleMuted", + type: 'ToggleMuted', payload: channel.id, - }); - setShowMenu(false); + }) + setShowMenu(false) } }} onMouseEnter={() => { - if (!channel.isMuted) setShowSubmenu(true); + if (!channel.isMuted) setShowSubmenu(true) }} onMouseLeave={() => { - if (!channel.isMuted) setShowSubmenu(false); + if (!channel.isMuted) setShowSubmenu(false) }} > {!channel.isMuted && } - {(channel.isMuted ? "Unmute" : "Mute") + - (channel.type === "group" ? " Group" : "Chat")} + {(channel.isMuted ? 'Unmute' : 'Mute') + + (channel.type === 'group' ? ' Group' : 'Chat')} {!channel.isMuted && showSubmenu && ( channelsDispatch({ - type: "ToggleMuted", + type: 'ToggleMuted', payload: channel.id, }) } @@ -151,30 +151,30 @@ export const ChannelMenu = ({ Fetch Messages - {(channel.type === "group" || channel.type === "dm") && ( + {(channel.type === 'group' || channel.type === 'dm') && ( { - setLeavingModal(true); - setShowMenu(false); + setLeavingModal(true) + setShowMenu(false) }} > - {channel.type === "group" && ( + {channel.type === 'group' && ( )} - {channel.type === "dm" && ( + {channel.type === 'dm' && ( )} - {channel.type === "group" ? "Leave Group" : "Delete Chat"} + {channel.type === 'group' ? 'Leave Group' : 'Delete Chat'} )} - ); + ) } else { - return null; + return null } -}; +} const ChannelDropdown = styled(DropdownMenu)` top: calc(100% + 4px); @@ -190,4 +190,4 @@ const ChannelDropdown = styled(DropdownMenu)` top: 20px; right: 8px; } -`; +` diff --git a/packages/status-react/src/components/Form/ContactMenu.tsx b/packages/status-react/src/components/Form/ContactMenu.tsx index 4749c58d..01987fd5 100644 --- a/packages/status-react/src/components/Form/ContactMenu.tsx +++ b/packages/status-react/src/components/Form/ContactMenu.tsx @@ -1,43 +1,43 @@ -import React, { useMemo } from "react"; -import styled from "styled-components"; +import React, { useMemo } from 'react' +import styled from 'styled-components' -import { useUserPublicKey } from "../../contexts/identityProvider"; -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useModal } from "../../contexts/modalProvider"; -import { AddContactIcon } from "../Icons/AddContactIcon"; -import { BlockSvg } from "../Icons/BlockIcon"; -import { ChatSvg } from "../Icons/ChatIcon"; -import { EditIcon } from "../Icons/EditIcon"; -import { ProfileIcon } from "../Icons/ProfileIcon"; -import { UntrustworthIcon } from "../Icons/UntrustworthIcon"; -import { UserIcon } from "../Icons/UserIcon"; -import { WarningSvg } from "../Icons/WarningIcon"; -import { UserAddress } from "../Messages/Styles"; -import { ProfileModalName } from "../Modals/ProfileModal"; -import { textMediumStyles } from "../Text"; +import { useUserPublicKey } from '../../contexts/identityProvider' +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useModal } from '../../contexts/modalProvider' +import { AddContactIcon } from '../Icons/AddContactIcon' +import { BlockSvg } from '../Icons/BlockIcon' +import { ChatSvg } from '../Icons/ChatIcon' +import { EditIcon } from '../Icons/EditIcon' +import { ProfileIcon } from '../Icons/ProfileIcon' +import { UntrustworthIcon } from '../Icons/UntrustworthIcon' +import { UserIcon } from '../Icons/UserIcon' +import { WarningSvg } from '../Icons/WarningIcon' +import { UserAddress } from '../Messages/Styles' +import { ProfileModalName } from '../Modals/ProfileModal' +import { textMediumStyles } from '../Text' -import { DropdownMenu, MenuItem, MenuText } from "./DropdownMenu"; +import { DropdownMenu, MenuItem, MenuText } from './DropdownMenu' type ContactMenuProps = { - id: string; - setShowMenu: (val: boolean) => void; -}; + id: string + setShowMenu: (val: boolean) => void +} export function ContactMenu({ id, setShowMenu }: ContactMenuProps) { - const userPK = useUserPublicKey(); - const { contacts, contactsDispatch } = useMessengerContext(); - const contact = useMemo(() => contacts[id], [id, contacts]); + const userPK = useUserPublicKey() + const { contacts, contactsDispatch } = useMessengerContext() + const contact = useMemo(() => contacts[id], [id, contacts]) const isUser = useMemo(() => { if (userPK) { - return id === userPK; + return id === userPK } else { - return false; + return false } - }, [id, userPK]); + }, [id, userPK]) - const { setModal } = useModal(ProfileModalName); + const { setModal } = useModal(ProfileModalName) - if (!contact) return null; + if (!contact) return null return ( @@ -56,7 +56,7 @@ export function ContactMenu({ id, setShowMenu }: ContactMenuProps) { { - setModal({ id, renamingState: false, requestState: false }); + setModal({ id, renamingState: false, requestState: false }) }} > @@ -65,7 +65,7 @@ export function ContactMenu({ id, setShowMenu }: ContactMenuProps) { {!contact.isFriend && ( { - setModal({ id, requestState: true }); + setModal({ id, requestState: true }) }} > @@ -80,7 +80,7 @@ export function ContactMenu({ id, setShowMenu }: ContactMenuProps) { )} { - setModal({ id, renamingState: true }); + setModal({ id, renamingState: true }) }} > @@ -90,69 +90,69 @@ export function ContactMenu({ id, setShowMenu }: ContactMenuProps) { - contactsDispatch({ type: "toggleTrustworthy", payload: { id } }) + contactsDispatch({ type: 'toggleTrustworthy', payload: { id } }) } > - + {contact.isUntrustworthy - ? "Remove Untrustworthy Mark" - : "Mark as Untrustworthy"} + ? 'Remove Untrustworthy Mark' + : 'Mark as Untrustworthy'} {!contact.isFriend && !isUser && ( { - contactsDispatch({ type: "toggleBlocked", payload: { id } }); - setShowMenu(false); + contactsDispatch({ type: 'toggleBlocked', payload: { id } }) + setShowMenu(false) }} > - {contact.blocked ? "Unblock User" : "Block User"} + {contact.blocked ? 'Unblock User' : 'Block User'} )} - ); + ) } const ContactDropdown = styled(DropdownMenu)` top: 20px; left: 0px; width: 222px; -`; +` const ContactInfo = styled.div` display: flex; flex-direction: column; align-items: center; -`; +` const MenuSection = styled.div` margin-top: 5px; padding-top: 5px; border-top: 1px solid ${({ theme }) => theme.inputColor}; -`; +` const UserNameWrapper = styled.div` display: flex; align-items: center; margin-bottom: 4px; -`; +` const UserName = styled.p` color: ${({ theme }) => theme.primary}; margin-right: 4px; ${textMediumStyles} -`; +` const UserTrueName = styled.p` color: ${({ theme }) => theme.primary}; @@ -160,4 +160,4 @@ const UserTrueName = styled.p` line-height: 16px; letter-spacing: 0.1px; margin-top: 4px; -`; +` diff --git a/packages/status-react/src/components/Form/CopyInput.tsx b/packages/status-react/src/components/Form/CopyInput.tsx index 06ecd829..bc303f0f 100644 --- a/packages/status-react/src/components/Form/CopyInput.tsx +++ b/packages/status-react/src/components/Form/CopyInput.tsx @@ -1,7 +1,7 @@ -import React from "react"; +import React from 'react' -import { copy } from "../../utils/copy"; -import { reduceString } from "../../utils/reduceString"; +import { copy } from '../../utils/copy' +import { reduceString } from '../../utils/reduceString' import { ButtonWrapper, @@ -10,11 +10,11 @@ import { Label, Text, Wrapper, -} from "./inputStyles"; +} from './inputStyles' interface CopyInputProps { - label?: string; - value: string; + label?: string + value: string } export const CopyInput = ({ label, value }: CopyInputProps) => ( @@ -27,4 +27,4 @@ export const CopyInput = ({ label, value }: CopyInputProps) => ( -); +) diff --git a/packages/status-react/src/components/Form/DropdownMenu.tsx b/packages/status-react/src/components/Form/DropdownMenu.tsx index 0542cf45..6dfc2006 100644 --- a/packages/status-react/src/components/Form/DropdownMenu.tsx +++ b/packages/status-react/src/components/Form/DropdownMenu.tsx @@ -1,15 +1,15 @@ -import React, { ReactNode } from "react"; -import styled from "styled-components"; +import React, { ReactNode } from 'react' +import styled from 'styled-components' -import { textSmallStyles } from "../Text"; +import { textSmallStyles } from '../Text' type DropdownMenuProps = { - children: ReactNode; - className?: string; - style?: { top: number; left: number }; - menuRef?: React.MutableRefObject; - id?: string; -}; + children: ReactNode + className?: string + style?: { top: number; left: number } + menuRef?: React.MutableRefObject + id?: string +} export function DropdownMenu({ children, @@ -22,7 +22,7 @@ export function DropdownMenu({ {children} - ); + ) } const MenuBlock = styled.div` @@ -34,11 +34,11 @@ const MenuBlock = styled.div` padding: 8px 0; position: absolute; z-index: 2; -`; +` const MenuList = styled.ul` list-style: none; -`; +` export const MenuItem = styled.li` width: 100%; @@ -61,7 +61,7 @@ export const MenuItem = styled.li` & > svg.red { fill: ${({ theme }) => theme.redColor}; } -`; +` export const MenuText = styled.span` margin-left: 6px; @@ -72,7 +72,7 @@ export const MenuText = styled.span` } ${textSmallStyles} -`; +` export const MenuSection = styled.div` padding: 4px 0; @@ -91,4 +91,4 @@ export const MenuSection = styled.div` margin: 4px 0 0; border-bottom: none; } -`; +` diff --git a/packages/status-react/src/components/Form/ImageMenu.tsx b/packages/status-react/src/components/Form/ImageMenu.tsx index 4fa1a934..72b612d0 100644 --- a/packages/status-react/src/components/Form/ImageMenu.tsx +++ b/packages/status-react/src/components/Form/ImageMenu.tsx @@ -1,24 +1,24 @@ -import React, { useRef } from "react"; -import styled from "styled-components"; +import React, { useRef } from 'react' +import styled from 'styled-components' -import { useClickOutside } from "../../hooks/useClickOutside"; -import { useContextMenu } from "../../hooks/useContextMenu"; -import { copyImg } from "../../utils/copyImg"; -import { downloadImg } from "../../utils/downloadImg"; -import { CopyIcon } from "../Icons/CopyIcon"; -import { DownloadIcon } from "../Icons/DownloadIcon"; +import { useClickOutside } from '../../hooks/useClickOutside' +import { useContextMenu } from '../../hooks/useContextMenu' +import { copyImg } from '../../utils/copyImg' +import { downloadImg } from '../../utils/downloadImg' +import { CopyIcon } from '../Icons/CopyIcon' +import { DownloadIcon } from '../Icons/DownloadIcon' -import { DropdownMenu, MenuItem, MenuText } from "./DropdownMenu"; +import { DropdownMenu, MenuItem, MenuText } from './DropdownMenu' interface ImageMenuProps { - imageId: string; + imageId: string } export const ImageMenu = ({ imageId }: ImageMenuProps) => { - const { showMenu, setShowMenu } = useContextMenu(imageId); + const { showMenu, setShowMenu } = useContextMenu(imageId) - const ref = useRef(null); - useClickOutside(ref, () => setShowMenu(false)); + const ref = useRef(null) + useClickOutside(ref, () => setShowMenu(false)) return showMenu ? ( @@ -32,11 +32,11 @@ export const ImageMenu = ({ imageId }: ImageMenuProps) => { ) : ( <> - ); -}; + ) +} const ImageDropdown = styled(DropdownMenu)` width: 176px; left: 120px; top: 46px; -`; +` diff --git a/packages/status-react/src/components/Form/LoginInstructions.tsx b/packages/status-react/src/components/Form/LoginInstructions.tsx index 820e7c41..85e75834 100644 --- a/packages/status-react/src/components/Form/LoginInstructions.tsx +++ b/packages/status-react/src/components/Form/LoginInstructions.tsx @@ -1,52 +1,52 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' -import { MobileIcon } from "../Icons/MobileIcon"; -import { ProfileIcon } from "../Icons/ProfileIcon"; -import { ScanIcon } from "../Icons/ScanIcon"; -import { textMediumStyles } from "../Text"; +import { MobileIcon } from '../Icons/MobileIcon' +import { ProfileIcon } from '../Icons/ProfileIcon' +import { ScanIcon } from '../Icons/ScanIcon' +import { textMediumStyles } from '../Text' interface LoginInstructionsProps { - mobileFlow: boolean; + mobileFlow: boolean } export function LoginInstructions({ mobileFlow }: LoginInstructionsProps) { return ( - Open Status App on your {mobileFlow ? "mobile" : "desktop"} + Open Status App on your {mobileFlow ? 'mobile' : 'desktop'} - Navigate yourself to{" "} + Navigate yourself to{' '} - {" "} + {' '} Profile - {" "} + {' '} tab - Select{" "} + Select{' '} - {" "} + {' '} Sync Settings - Tap{" "} + Tap{' '} - {" "} - {" "} - {" "} - {mobileFlow ? "Scan" : "Display"} sync code + {' '} + {' '} + {' '} + {mobileFlow ? 'Scan' : 'Display'} sync code {mobileFlow - ? "Scan the sync code from this screen" - : "Paste the sync code above"}{" "} + ? 'Scan the sync code from this screen' + : 'Paste the sync code above'}{' '} ↑ - ); + ) } const Instructions = styled.ol` @@ -56,7 +56,7 @@ const Instructions = styled.ol` counter-reset: ollist; ${textMediumStyles} -`; +` const InstructionStep = styled.li` display: flex; @@ -72,10 +72,10 @@ const InstructionStep = styled.li` &::before { counter-increment: ollist; - content: counter(ollist) "."; + content: counter(ollist) '.'; margin-right: 4px; } -`; +` const InstructionIcon = styled.div` width: 40px; @@ -90,4 +90,4 @@ const InstructionIcon = styled.div` font-size: 8px; line-height: 10px; margin: 0 6px; -`; +` diff --git a/packages/status-react/src/components/Form/MessageMenu.tsx b/packages/status-react/src/components/Form/MessageMenu.tsx index 476a5e2e..332eedc0 100644 --- a/packages/status-react/src/components/Form/MessageMenu.tsx +++ b/packages/status-react/src/components/Form/MessageMenu.tsx @@ -1,28 +1,28 @@ -import { BaseEmoji } from "emoji-mart"; -import React, { useMemo, useRef } from "react"; -import styled from "styled-components"; +import { BaseEmoji } from 'emoji-mart' +import React, { useMemo, useRef } from 'react' +import styled from 'styled-components' -import { useUserPublicKey } from "../../contexts/identityProvider"; -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useClickOutside } from "../../hooks/useClickOutside"; -import { useClickPosition } from "../../hooks/useClickPosition"; -import { useContextMenu } from "../../hooks/useContextMenu"; -import { Reply } from "../../hooks/useReply"; -import { ChatMessage } from "../../models/ChatMessage"; -import { DeleteIcon } from "../Icons/DeleteIcon"; -import { EditIcon } from "../Icons/EditIcon"; -import { PinIcon } from "../Icons/PinIcon"; -import { ReplySvg } from "../Icons/ReplyIcon"; -import { ReactionPicker } from "../Reactions/ReactionPicker"; +import { useUserPublicKey } from '../../contexts/identityProvider' +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useClickOutside } from '../../hooks/useClickOutside' +import { useClickPosition } from '../../hooks/useClickPosition' +import { useContextMenu } from '../../hooks/useContextMenu' +import { Reply } from '../../hooks/useReply' +import { ChatMessage } from '../../models/ChatMessage' +import { DeleteIcon } from '../Icons/DeleteIcon' +import { EditIcon } from '../Icons/EditIcon' +import { PinIcon } from '../Icons/PinIcon' +import { ReplySvg } from '../Icons/ReplyIcon' +import { ReactionPicker } from '../Reactions/ReactionPicker' -import { DropdownMenu, MenuItem, MenuSection, MenuText } from "./DropdownMenu"; +import { DropdownMenu, MenuItem, MenuSection, MenuText } from './DropdownMenu' interface MessageMenuProps { - message: ChatMessage; - messageReactions: BaseEmoji[]; - setMessageReactions: React.Dispatch>; - setReply: (val: Reply | undefined) => void; - messageRef: React.MutableRefObject; + message: ChatMessage + messageReactions: BaseEmoji[] + setMessageReactions: React.Dispatch> + setReply: (val: Reply | undefined) => void + messageRef: React.MutableRefObject } export const MessageMenu = ({ @@ -32,25 +32,25 @@ export const MessageMenu = ({ setReply, messageRef, }: MessageMenuProps) => { - const userPK = useUserPublicKey(); - const { activeChannel } = useMessengerContext(); - const { showMenu, setShowMenu } = useContextMenu(message.id); - const { topPosition, leftPosition } = useClickPosition(messageRef); + const userPK = useUserPublicKey() + const { activeChannel } = useMessengerContext() + const { showMenu, setShowMenu } = useContextMenu(message.id) + const { topPosition, leftPosition } = useClickPosition(messageRef) const menuStyle = useMemo(() => { return { top: topPosition, left: leftPosition, - }; - }, [topPosition, leftPosition]); + } + }, [topPosition, leftPosition]) - const ref = useRef(null); - useClickOutside(ref, () => setShowMenu(false)); + const ref = useRef(null) + useClickOutside(ref, () => setShowMenu(false)) const userMessage = useMemo( () => !!userPK && message.sender === userPK, [userPK, message] - ); + ) return userPK && showMenu ? ( @@ -61,7 +61,7 @@ export const MessageMenu = ({ className="menu" /> - + { setReply({ @@ -69,8 +69,8 @@ export const MessageMenu = ({ content: message.content, image: message.image, id: message.id, - }); - setShowMenu(false); + }) + setShowMenu(false) }} > @@ -80,17 +80,17 @@ export const MessageMenu = ({ {userMessage && ( { - setShowMenu(false); + setShowMenu(false) }} > Edit )} - {activeChannel?.type !== "channel" && ( + {activeChannel?.type !== 'channel' && ( { - setShowMenu(false); + setShowMenu(false) }} > @@ -101,7 +101,7 @@ export const MessageMenu = ({ {userMessage && ( { - setShowMenu(false); + setShowMenu(false) }} > @@ -111,9 +111,9 @@ export const MessageMenu = ({ ) : ( <> - ); -}; + ) +} const MessageDropdown = styled(DropdownMenu)` width: 176px; -`; +` diff --git a/packages/status-react/src/components/Form/MuteMenu.tsx b/packages/status-react/src/components/Form/MuteMenu.tsx index 9efd1790..a1411986 100644 --- a/packages/status-react/src/components/Form/MuteMenu.tsx +++ b/packages/status-react/src/components/Form/MuteMenu.tsx @@ -1,24 +1,24 @@ -import React, { useCallback } from "react"; -import styled from "styled-components"; +import React, { useCallback } from 'react' +import styled from 'styled-components' -import { DropdownMenu, MenuItem, MenuText } from "./DropdownMenu"; +import { DropdownMenu, MenuItem, MenuText } from './DropdownMenu' interface SubMenuProps { - setIsMuted: (val: boolean) => void; - className?: string; + setIsMuted: (val: boolean) => void + className?: string } export const MuteMenu = ({ setIsMuted, className }: SubMenuProps) => { const muteChannel = useCallback( (timeout: number) => { - setIsMuted(true); - const timer = setTimeout(() => setIsMuted(false), timeout * 6000000); + setIsMuted(true) + const timer = setTimeout(() => setIsMuted(false), timeout * 6000000) return () => { - clearTimeout(timer); - }; + clearTimeout(timer) + } }, [setIsMuted] - ); + ) return ( @@ -38,8 +38,8 @@ export const MuteMenu = ({ setIsMuted, className }: SubMenuProps) => { Until I turn it back on - ); -}; + ) +} const MuteDropdown = styled(DropdownMenu)` width: 176px; @@ -61,4 +61,4 @@ const MuteDropdown = styled(DropdownMenu)` right: -16px; z-index: 3; } -`; +` diff --git a/packages/status-react/src/components/Form/NameError.tsx b/packages/status-react/src/components/Form/NameError.tsx index b47d0c62..aa3043fd 100644 --- a/packages/status-react/src/components/Form/NameError.tsx +++ b/packages/status-react/src/components/Form/NameError.tsx @@ -1,38 +1,38 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' -import { NameErrors } from "../../hooks/useNameError"; -import { Hint } from "../Modals/ModalStyle"; +import { NameErrors } from '../../hooks/useNameError' +import { Hint } from '../Modals/ModalStyle' type NameErrorProps = { - error: NameErrors; -}; + error: NameErrors +} export function NameError({ error }: NameErrorProps) { switch (error) { case NameErrors.NoError: - return null; + return null case NameErrors.NameExists: return ( Sorry, the name you have chosen is not allowed, try picking another username - ); + ) case NameErrors.BadCharacters: return ( Only letters, numbers, underscores and hypens allowed - ); + ) case NameErrors.EndingWithEth: return ( Usernames ending with “_eth” or "-eth" are not allowed - ); + ) case NameErrors.TooLong: - return 24 character username limit; + return 24 character username limit } } @@ -41,4 +41,4 @@ const ErrorText = styled(Hint)` text-align: center; width: 328px; margin: 8px 0; -`; +` diff --git a/packages/status-react/src/components/Form/PasteInput.tsx b/packages/status-react/src/components/Form/PasteInput.tsx index b09a6f15..c82933aa 100644 --- a/packages/status-react/src/components/Form/PasteInput.tsx +++ b/packages/status-react/src/components/Form/PasteInput.tsx @@ -1,7 +1,7 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' -import { paste } from "../../utils/paste"; +import { paste } from '../../utils/paste' import { ButtonWrapper, @@ -10,10 +10,10 @@ import { InputWrapper, Label, Wrapper, -} from "./inputStyles"; +} from './inputStyles' interface PasteInputProps { - label: string; + label: string } export const PasteInput = ({ label }: PasteInputProps) => ( @@ -22,11 +22,11 @@ export const PasteInput = ({ label }: PasteInputProps) => ( - paste("pasteInput")}>Paste + paste('pasteInput')}>Paste -); +) const Input = styled.input` ${inputStyles} @@ -37,4 +37,4 @@ const Input = styled.input` } border: none; -`; +` diff --git a/packages/status-react/src/components/Form/TokenRequirement.tsx b/packages/status-react/src/components/Form/TokenRequirement.tsx index de308ad5..13bbb9b4 100644 --- a/packages/status-react/src/components/Form/TokenRequirement.tsx +++ b/packages/status-react/src/components/Form/TokenRequirement.tsx @@ -1,33 +1,33 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { textMediumStyles } from "../Text"; +import { useMessengerContext } from '../../contexts/messengerProvider' +import { textMediumStyles } from '../Text' const communityRequirements = { requirements: [ { - name: "STN", + name: 'STN', amount: 10, - logo: "https://status.im/img/logo.svg", + logo: 'https://status.im/img/logo.svg', }, ], alternativeRequirements: [ { - name: "ETH", + name: 'ETH', amount: 1, - logo: "https://ethereum.org/static/a110735dade3f354a46fc2446cd52476/db4de/eth-home-icon.webp", + logo: 'https://ethereum.org/static/a110735dade3f354a46fc2446cd52476/db4de/eth-home-icon.webp', }, { - name: "MKR", + name: 'MKR', amount: 10, - logo: "https://cryptologos.cc/logos/maker-mkr-logo.svg?v=017", + logo: 'https://cryptologos.cc/logos/maker-mkr-logo.svg?v=017', }, ], -}; +} export function TokenRequirement() { - const { communityData } = useMessengerContext(); + const { communityData } = useMessengerContext() return ( @@ -35,7 +35,7 @@ export function TokenRequirement() { hold: - {communityRequirements.requirements.map((req) => ( + {communityRequirements.requirements.map(req => ( - {req.amount} {req.name}{" "} + {req.amount} {req.name}{' '} ))} {communityRequirements.alternativeRequirements && or} - {communityRequirements.alternativeRequirements.map((req) => ( + {communityRequirements.alternativeRequirements.map(req => ( - {req.amount} {req.name}{" "} + {req.amount} {req.name}{' '} ))} - ); + ) } const Wrapper = styled.div` @@ -72,7 +72,7 @@ const Wrapper = styled.div` flex-direction: column; align-items: center; height: 50%; -`; +` const Text = styled.p` color: ${({ theme }) => theme.primary}; @@ -84,7 +84,7 @@ const Text = styled.p` } ${textMediumStyles} -`; +` const Requirement = styled.div` display: flex; @@ -102,7 +102,7 @@ const Requirement = styled.div` & + & { margin-left: 18px; } -`; +` const Amount = styled.p` font-weight: 500; @@ -110,13 +110,13 @@ const Amount = styled.p` margin-left: 6px; ${textMediumStyles} -`; +` const Row = styled.div` display: flex; align-items: center; margin-bottom: 16px; -`; +` const Logo = styled.div` width: 28px; @@ -128,4 +128,4 @@ const Logo = styled.div` border-radius: 50%; background-size: cover; background-repeat: no-repeat; -`; +` diff --git a/packages/status-react/src/components/Form/Tooltip.tsx b/packages/status-react/src/components/Form/Tooltip.tsx index 42489e22..2e7d9fef 100644 --- a/packages/status-react/src/components/Form/Tooltip.tsx +++ b/packages/status-react/src/components/Form/Tooltip.tsx @@ -1,13 +1,13 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' -import { TipIcon } from "../Icons/TipIcon"; -import { textSmallStyles } from "../Text"; +import { TipIcon } from '../Icons/TipIcon' +import { textSmallStyles } from '../Text' type TooltipProps = { - tip: string; - className?: string; -}; + tip: string + className?: string +} export function Tooltip({ tip, className }: TooltipProps) { return ( @@ -17,7 +17,7 @@ export function Tooltip({ tip, className }: TooltipProps) { - ); + ) } const TooltipWrapper = styled.div` @@ -36,16 +36,16 @@ const TooltipWrapper = styled.div` top: calc(100% + 8px); z-index: 10; } -`; +` const TooltipBlock = styled.div` background: ${({ theme }) => theme.primary}; border-radius: 8px; position: relative; padding: 8px; -`; +` const TooltipText = styled.p` font-weight: 500; color: ${({ theme }) => theme.bodyBackgroundColor}; ${textSmallStyles}; -`; +` diff --git a/packages/status-react/src/components/Form/inputStyles.ts b/packages/status-react/src/components/Form/inputStyles.ts index 8c3ed884..2e47973b 100644 --- a/packages/status-react/src/components/Form/inputStyles.ts +++ b/packages/status-react/src/components/Form/inputStyles.ts @@ -1,6 +1,6 @@ -import styled, { css } from "styled-components"; +import styled, { css } from 'styled-components' -import { textMediumStyles, textSmallStyles } from "../Text"; +import { textMediumStyles, textSmallStyles } from '../Text' export const inputStyles = css` background: ${({ theme }) => theme.inputColor}; @@ -15,7 +15,7 @@ export const inputStyles = css` outline: 1px solid ${({ theme }) => theme.tertiary}; caret-color: ${({ theme }) => theme.notificationColor}; } -`; +` export const Label = styled.p` margin-bottom: 7px; @@ -25,24 +25,24 @@ export const Label = styled.p` color: ${({ theme }) => theme.primary}; ${textSmallStyles} -`; +` export const InputWrapper = styled.div` width: 100%; -`; +` export const Wrapper = styled.div` position: relative; padding: 14px 70px 14px 8px; background: ${({ theme }) => theme.inputColor}; border-radius: 8px; -`; +` export const Text = styled.p` color: ${({ theme }) => theme.primary}; ${textMediumStyles} -`; +` export const ButtonWrapper = styled.div` position: absolute; @@ -56,7 +56,7 @@ export const ButtonWrapper = styled.div` transform: translateY(-50%); background: ${({ theme }) => theme.inputColor}; border-radius: 8px; -`; +` export const InputBtn = styled.button` padding: 6px 12px; @@ -67,18 +67,18 @@ export const InputBtn = styled.button` background: ${({ theme }) => theme.buttonBg}; border: 1px solid ${({ theme }) => theme.tertiary}; border-radius: 6px; -`; +` export const NameInputWrapper = styled.div` position: relative; -`; +` export const NameInput = styled.input` width: 328px; padding: 11px 16px; ${inputStyles} -`; +` export const ClearBtn = styled.button` position: absolute; @@ -90,4 +90,4 @@ export const ClearBtn = styled.button` & > svg { fill: ${({ theme }) => theme.secondary}; } -`; +` diff --git a/packages/status-react/src/components/Icons/ActivityIcon.tsx b/packages/status-react/src/components/Icons/ActivityIcon.tsx index 764d4b8f..7eeeee0f 100644 --- a/packages/status-react/src/components/Icons/ActivityIcon.tsx +++ b/packages/status-react/src/components/Icons/ActivityIcon.tsx @@ -1,5 +1,5 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' export const ActivityIcon = () => { return ( @@ -16,9 +16,9 @@ export const ActivityIcon = () => { d="M15.2815 19C14.9452 19 14.7036 19.3279 14.7349 19.6628C14.7449 19.7703 14.7504 19.8827 14.7504 20C14.7504 21.3889 13.5441 22.75 12.0004 22.75C10.4568 22.75 9.25041 21.3889 9.25041 20C9.25041 19.8827 9.25591 19.7703 9.26596 19.6628C9.29725 19.3279 9.05564 19 8.71934 19H5.52151C3.78523 19 2.87368 16.9394 4.04163 15.6547L5.21849 14.3601C5.72921 13.7983 6.06949 13.1028 6.19958 12.3548L7.31505 5.94085C7.71121 3.66293 9.6883 2 12.0004 2C14.3125 2 16.2896 3.66293 16.6858 5.94085L17.8012 12.3548C17.9313 13.1028 18.2716 13.7983 18.7823 14.3601L19.9592 15.6547C21.1271 16.9394 20.2156 19 18.4793 19H15.2815ZM11.0327 19.0283L11.0318 19.0293L11.0395 19.0214L11.0419 19.0188C11.0432 19.0175 11.0438 19.0168 11.0439 19.0167C11.0443 19.0163 11.0439 19.0167 11.0439 19.0167L11.0419 19.0188C11.0529 19.0073 11.0685 19 11.0845 19H12.9164C12.9323 19 12.9474 19.0068 12.9584 19.0183C12.9612 19.0217 12.9684 19.0302 12.9785 19.0438C13.0015 19.0744 13.0394 19.13 13.0796 19.2104C13.1587 19.3687 13.2504 19.6296 13.2504 20C13.2504 20.6111 12.6659 21.25 12.0004 21.25C11.3349 21.25 10.7504 20.6111 10.7504 20C10.7504 19.6296 10.8421 19.3687 10.9212 19.2104C10.9614 19.13 10.9993 19.0744 11.0223 19.0438C11.0325 19.0302 11.0391 19.0222 11.0419 19.0188L11.0395 19.0214L11.0377 19.0233L11.0345 19.0265L11.0327 19.0283ZM5.15154 16.6637L6.3284 15.3691C7.03064 14.5967 7.49853 13.6403 7.6774 12.6118L8.79286 6.19786C9.06407 4.63842 10.4176 3.5 12.0004 3.5C13.5833 3.5 14.9368 4.63842 15.208 6.19786L16.3234 12.6118C16.5023 13.6403 16.9702 14.5967 17.6724 15.3691L18.8493 16.6637C19.1413 16.9849 18.9134 17.5 18.4793 17.5H5.52151C5.08744 17.5 4.85956 16.9849 5.15154 16.6637Z" /> - ); -}; + ) +} const Icon = styled.svg` fill: ${({ theme }) => theme.primary}; -`; +` diff --git a/packages/status-react/src/components/Icons/AddContactIcon.tsx b/packages/status-react/src/components/Icons/AddContactIcon.tsx index dd75b0c2..e74b0918 100644 --- a/packages/status-react/src/components/Icons/AddContactIcon.tsx +++ b/packages/status-react/src/components/Icons/AddContactIcon.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type AddContactIconProps = { - width: number; - height: number; - className?: string; -}; + width: number + height: number + className?: string +} export function AddContactIcon({ width, @@ -29,9 +29,9 @@ export function AddContactIcon({ - ); + ) } const Icon = styled.svg` fill: ${({ theme }) => theme.tertiary}; -`; +` diff --git a/packages/status-react/src/components/Icons/AddIcon.tsx b/packages/status-react/src/components/Icons/AddIcon.tsx index ad164009..103ad369 100644 --- a/packages/status-react/src/components/Icons/AddIcon.tsx +++ b/packages/status-react/src/components/Icons/AddIcon.tsx @@ -1,5 +1,5 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' export const AddIcon = () => { return ( @@ -12,11 +12,11 @@ export const AddIcon = () => { > - ); -}; + ) +} const Icon = styled.svg` & > path { fill: ${({ theme }) => theme.bodyBackgroundColor}; } -`; +` diff --git a/packages/status-react/src/components/Icons/AddMemberIcon.tsx b/packages/status-react/src/components/Icons/AddMemberIcon.tsx index 9e3104dc..a3314e81 100644 --- a/packages/status-react/src/components/Icons/AddMemberIcon.tsx +++ b/packages/status-react/src/components/Icons/AddMemberIcon.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type AddMemberIconProps = { - width: number; - height: number; - className?: string; -}; + width: number + height: number + className?: string +} export function AddMemberIcon({ width, @@ -31,9 +31,9 @@ export function AddMemberIcon({ - ); + ) } const Icon = styled.svg` fill: ${({ theme }) => theme.tertiary}; -`; +` diff --git a/packages/status-react/src/components/Icons/BlockIcon.tsx b/packages/status-react/src/components/Icons/BlockIcon.tsx index eae2daa4..60d3c330 100644 --- a/packages/status-react/src/components/Icons/BlockIcon.tsx +++ b/packages/status-react/src/components/Icons/BlockIcon.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type BlockSvgProps = { - width: number; - height: number; - className?: string; -}; + width: number + height: number + className?: string +} export function BlockSvg({ width, height, className }: BlockSvgProps) { return ( @@ -23,12 +23,12 @@ export function BlockSvg({ width, height, className }: BlockSvgProps) { d="M8.00065 14.6673C4.31875 14.6673 1.33398 11.6825 1.33398 8.00065C1.33398 4.31875 4.31875 1.33398 8.00065 1.33398C11.6826 1.33398 14.6673 4.31875 14.6673 8.00065C14.6673 11.6826 11.6825 14.6673 8.00065 14.6673ZM3.91306 11.3811C3.77473 11.5195 3.54679 11.5099 3.43096 11.3523C2.74134 10.4136 2.33398 9.2547 2.33398 8.00065C2.33398 4.87104 4.87104 2.33398 8.00065 2.33398C9.2547 2.33398 10.4136 2.74135 11.3523 3.43096C11.5099 3.54679 11.5195 3.77473 11.3811 3.91306L3.91306 11.3811ZM4.62017 12.0882C4.48183 12.2266 4.49138 12.4545 4.64904 12.5703C5.58769 13.26 6.7466 13.6673 8.00065 13.6673C11.1303 13.6673 13.6673 11.1303 13.6673 8.00065C13.6673 6.7466 13.26 5.58769 12.5703 4.64904C12.4545 4.49138 12.2266 4.48183 12.0882 4.62017L4.62017 12.0882Z" /> - ); + ) } export const BlockIcon = () => { - return ; -}; + return +} const Icon = styled(BlockSvg)` & > path { @@ -38,4 +38,4 @@ const Icon = styled(BlockSvg)` &:hover > path { fill: ${({ theme }) => theme.bodyBackgroundColor}; } -`; +` diff --git a/packages/status-react/src/components/Icons/ChainIcon.tsx b/packages/status-react/src/components/Icons/ChainIcon.tsx index 3fb34b9c..4c86082c 100644 --- a/packages/status-react/src/components/Icons/ChainIcon.tsx +++ b/packages/status-react/src/components/Icons/ChainIcon.tsx @@ -1,8 +1,8 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' interface ChainIconProps { - className?: string; + className?: string } export const ChainIcon = ({ className }: ChainIconProps) => { @@ -17,8 +17,8 @@ export const ChainIcon = ({ className }: ChainIconProps) => { > - ); -}; + ) +} const Icon = styled.svg` fill: ${({ theme }) => theme.secondary}; @@ -27,4 +27,4 @@ const Icon = styled.svg` &.transformed { transform: matrix(-0.97, 0.26, 0.26, 0.97, 0, 0); } -`; +` diff --git a/packages/status-react/src/components/Icons/ChatIcon.tsx b/packages/status-react/src/components/Icons/ChatIcon.tsx index dbf998ac..f53b8575 100644 --- a/packages/status-react/src/components/Icons/ChatIcon.tsx +++ b/packages/status-react/src/components/Icons/ChatIcon.tsx @@ -1,10 +1,10 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type ChatSvgProps = { - width: number; - height: number; -}; + width: number + height: number +} export function ChatSvg({ width, height }: ChatSvgProps) { return ( @@ -20,12 +20,12 @@ export function ChatSvg({ width, height }: ChatSvgProps) { d="M1.69922 7.99922C1.69922 4.51983 4.51983 1.69922 7.99922 1.69922C11.4786 1.69922 14.2992 4.51983 14.2992 7.99922V11.9992C14.2992 13.2695 13.2695 14.2992 11.9992 14.2992H7.99922C4.51983 14.2992 1.69922 11.4786 1.69922 7.99922ZM7.99922 3.19922C5.34825 3.19922 3.19922 5.34825 3.19922 7.99922C3.19922 10.6502 5.34825 12.7992 7.99922 12.7992H11.9992C12.441 12.7992 12.7992 12.441 12.7992 11.9992V7.99922C12.7992 5.34825 10.6502 3.19922 7.99922 3.19922Z" /> - ); + ) } export const ChatIcon = () => { - return ; -}; + return +} const Icon = styled(ChatSvg)` & > path { @@ -35,4 +35,4 @@ const Icon = styled(ChatSvg)` &:hover > path { fill: ${({ theme }) => theme.bodyBackgroundColor}; } -`; +` diff --git a/packages/status-react/src/components/Icons/CheckIcon.tsx b/packages/status-react/src/components/Icons/CheckIcon.tsx index 91870685..e16c59f5 100644 --- a/packages/status-react/src/components/Icons/CheckIcon.tsx +++ b/packages/status-react/src/components/Icons/CheckIcon.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type CheckIconProps = { - width: number; - height: number; - className?: string; -}; + width: number + height: number + className?: string +} export function CheckIcon({ width, height, className }: CheckIconProps) { return ( @@ -23,7 +23,7 @@ export function CheckIcon({ width, height, className }: CheckIconProps) { d="M7.99992 14.6668C4.31802 14.6668 1.33325 11.6821 1.33325 8.00016C1.33325 4.31826 4.31802 1.3335 7.99992 1.3335C11.6818 1.3335 14.6666 4.31826 14.6666 8.00016C14.6666 11.6821 11.6818 14.6668 7.99992 14.6668ZM7.99992 13.6668C4.8703 13.6668 2.33325 11.1298 2.33325 8.00016C2.33325 4.87055 4.8703 2.3335 7.99992 2.3335C11.1295 2.3335 13.6666 4.87055 13.6666 8.00016C13.6666 11.1298 11.1295 13.6668 7.99992 13.6668Z" /> - ); + ) } const Icon = styled.svg` @@ -32,4 +32,4 @@ const Icon = styled.svg` &.green { fill: ${({ theme }) => theme.greenColor}; } -`; +` diff --git a/packages/status-react/src/components/Icons/ClearIcon.tsx b/packages/status-react/src/components/Icons/ClearIcon.tsx index 41ec2120..8dc36fad 100644 --- a/packages/status-react/src/components/Icons/ClearIcon.tsx +++ b/packages/status-react/src/components/Icons/ClearIcon.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type ClearSvgProps = { - width: number; - height: number; - className?: string; -}; + width: number + height: number + className?: string +} export function ClearSvg({ height, width, className }: ClearSvgProps) { return ( @@ -23,10 +23,10 @@ export function ClearSvg({ height, width, className }: ClearSvgProps) { d="M7.99992 14.6668C11.6818 14.6668 14.6666 11.6821 14.6666 8.00016C14.6666 4.31826 11.6818 1.3335 7.99992 1.3335C4.31802 1.3335 1.33325 4.31826 1.33325 8.00016C1.33325 11.6821 4.31802 14.6668 7.99992 14.6668ZM7.99992 13.6668C11.1295 13.6668 13.6666 11.1298 13.6666 8.00016C13.6666 4.87055 11.1295 2.3335 7.99992 2.3335C4.87031 2.3335 2.33325 4.87055 2.33325 8.00016C2.33325 11.1298 4.87031 13.6668 7.99992 13.6668Z" /> - ); + ) } - -; + export const ClearIcon = () => { - return ; -}; + return +} const Icon = styled.svg` fill: ${({ theme }) => theme.tertiary}; @@ -63,4 +63,4 @@ const Icon = styled.svg` &.decline { fill: ${({ theme }) => theme.redColor}; } -`; +` diff --git a/packages/status-react/src/components/Icons/ClearIconFull.tsx b/packages/status-react/src/components/Icons/ClearIconFull.tsx index 2144f2a4..66b268eb 100644 --- a/packages/status-react/src/components/Icons/ClearIconFull.tsx +++ b/packages/status-react/src/components/Icons/ClearIconFull.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type ClearSvgFullProps = { - width: number; - height: number; - className?: string; -}; + width: number + height: number + className?: string +} export function ClearSvgFull({ height, width, className }: ClearSvgFullProps) { return ( @@ -23,7 +23,7 @@ export function ClearSvgFull({ height, width, className }: ClearSvgFullProps) { d="M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15ZM11 5C11.2441 5.24408 11.2441 5.63981 11 5.88388L8.88393 8L11 10.1161C11.2441 10.3602 11.2441 10.7559 11 11C10.756 11.2441 10.3602 11.2441 10.1162 11L8.00005 8.88389L5.88393 11C5.63985 11.2441 5.24412 11.2441 5.00005 11C4.75597 10.7559 4.75597 10.3602 5.00005 10.1161L7.11616 8L5.00005 5.88389C4.75597 5.63981 4.75597 5.24408 5.00005 5C5.24412 4.75593 5.63985 4.75593 5.88393 5L8.00005 7.11612L10.1162 5C10.3602 4.75592 10.756 4.75592 11 5Z" /> - ); + ) } const Icon = styled.svg` @@ -32,4 +32,4 @@ const Icon = styled.svg` &:hover { fill: ${({ theme }) => theme.primary}; } -`; +` diff --git a/packages/status-react/src/components/Icons/CoinbaseLogo.tsx b/packages/status-react/src/components/Icons/CoinbaseLogo.tsx index 210cbae8..b968ebd6 100644 --- a/packages/status-react/src/components/Icons/CoinbaseLogo.tsx +++ b/packages/status-react/src/components/Icons/CoinbaseLogo.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React from 'react' export const CoinbaseLogo = () => { return ( @@ -46,5 +46,5 @@ export const CoinbaseLogo = () => { - ); -}; + ) +} diff --git a/packages/status-react/src/components/Icons/ColorChatIcon.tsx b/packages/status-react/src/components/Icons/ColorChatIcon.tsx index af0e6a82..fa0323db 100644 --- a/packages/status-react/src/components/Icons/ColorChatIcon.tsx +++ b/packages/status-react/src/components/Icons/ColorChatIcon.tsx @@ -1,10 +1,10 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type ColorChatSvgProps = { - width: number; - height: number; -}; + width: number + height: number +} export function ColorChatSvg({ width, height }: ColorChatSvgProps) { return ( @@ -130,12 +130,12 @@ export function ColorChatSvg({ width, height }: ColorChatSvgProps) { - ); + ) } export const ColorChatIcon = () => { - return ; -}; + return +} const Icon = styled(ColorChatSvg)` & > path { @@ -145,4 +145,4 @@ const Icon = styled(ColorChatSvg)` &:hover > path { fill: ${({ theme }) => theme.bodyBackgroundColor}; } -`; +` diff --git a/packages/status-react/src/components/Icons/CommunityIcon.tsx b/packages/status-react/src/components/Icons/CommunityIcon.tsx index ab7fbc56..2c7da05a 100644 --- a/packages/status-react/src/components/Icons/CommunityIcon.tsx +++ b/packages/status-react/src/components/Icons/CommunityIcon.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type CommunityIconProps = { - width: number; - height: number; - className?: string; -}; + width: number + height: number + className?: string +} export const CommunityIcon = ({ width, @@ -27,8 +27,8 @@ export const CommunityIcon = ({ d="M10.6641 14C11.7686 14 12.6641 13.1046 12.6641 12C13.7686 12 14.6641 11.1046 14.6641 10V4C14.6641 2.89543 13.7686 2 12.6641 2C7.14121 2 2.66406 6.47715 2.66406 12C2.66406 13.1046 3.55949 14 4.66406 14H10.6641ZM5.16406 12C4.88792 12 4.66244 11.7755 4.67944 11.4999C4.92738 7.47997 8.14404 4.26332 12.164 4.01538C12.4396 3.99838 12.6641 4.22386 12.6641 4.5V5.5C12.6641 5.77614 12.4394 5.99783 12.1642 6.02052C9.24919 6.26094 6.925 8.58513 6.68459 11.5002C6.66189 11.7754 6.4402 12 6.16406 12H5.16406ZM12.6641 8.5C12.6641 8.22386 12.4391 7.99672 12.1651 8.03082C10.3549 8.25609 8.92015 9.69083 8.69489 11.501C8.66078 11.775 8.88792 12 9.16406 12H10.1641C10.4402 12 10.6576 11.7727 10.7258 11.5051C10.9057 10.7982 11.4622 10.2417 12.1691 10.0617C12.4367 9.99359 12.6641 9.77614 12.6641 9.5V8.5Z" /> - ); -}; + ) +} const Icon = styled.svg` fill: ${({ theme }) => theme.secondary}; @@ -40,4 +40,4 @@ const Icon = styled.svg` &.red { fill: ${({ theme }) => theme.redColor}; } -`; +` diff --git a/packages/status-react/src/components/Icons/CopyIcon.tsx b/packages/status-react/src/components/Icons/CopyIcon.tsx index 72bba1d6..2b8a23f0 100644 --- a/packages/status-react/src/components/Icons/CopyIcon.tsx +++ b/packages/status-react/src/components/Icons/CopyIcon.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type CopyIconProps = { - width: number; - height: number; - className?: string; -}; + width: number + height: number + className?: string +} export function CopyIcon({ width, height, className }: CopyIconProps) { return ( @@ -23,9 +23,9 @@ export function CopyIcon({ width, height, className }: CopyIconProps) { d="M6.00016 4.00065C6.00016 2.52789 7.19407 1.33398 8.66683 1.33398H12.0002C13.4729 1.33398 14.6668 2.52789 14.6668 4.00065V7.33398C14.6668 8.80674 13.4729 10.0007 12.0002 10.0007H8.66683C7.19407 10.0007 6.00016 8.80674 6.00016 7.33398V4.00065ZM8.66683 2.33398H12.0002C12.9206 2.33398 13.6668 3.08018 13.6668 4.00065V7.33398C13.6668 8.25446 12.9206 9.00065 12.0002 9.00065H8.66683C7.74636 9.00065 7.00016 8.25446 7.00016 7.33398V4.00065C7.00016 3.08018 7.74636 2.33398 8.66683 2.33398Z" /> - ); + ) } const Icon = styled.svg` fill: ${({ theme }) => theme.tertiary}; -`; +` diff --git a/packages/status-react/src/components/Icons/CreateIcon.tsx b/packages/status-react/src/components/Icons/CreateIcon.tsx index bbac7845..60981479 100644 --- a/packages/status-react/src/components/Icons/CreateIcon.tsx +++ b/packages/status-react/src/components/Icons/CreateIcon.tsx @@ -1,5 +1,5 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' export const CreateIcon = () => { return ( @@ -17,11 +17,11 @@ export const CreateIcon = () => { d="M21.2803 2.71986C20.2971 1.73661 18.7029 1.73661 17.7197 2.71986L9.33613 11.1034C9.00567 11.4339 8.76487 11.8431 8.63648 12.2925L7.77886 15.2941C7.70403 15.556 7.77707 15.8379 7.96967 16.0305C8.16227 16.2231 8.44415 16.2962 8.70604 16.2213L11.7077 15.3637C12.1571 15.2353 12.5663 14.9945 12.8968 14.6641L21.2803 6.28052C22.2636 5.29727 22.2636 3.70311 21.2803 2.71986ZM18.7803 3.78052C19.1778 3.38306 19.8222 3.38306 20.2197 3.78052C20.6171 4.17798 20.6171 4.8224 20.2197 5.21986L11.8361 13.6034C11.6859 13.7536 11.4999 13.8631 11.2956 13.9214C10.5531 14.1336 9.86662 13.4471 10.0788 12.7045C10.1371 12.5003 10.2466 12.3143 10.3968 12.1641L18.7803 3.78052Z" /> - ); -}; + ) +} const Icon = styled.svg` & > path { fill: ${({ theme }) => theme.primary}; } -`; +` diff --git a/packages/status-react/src/components/Icons/CrossIcon.tsx b/packages/status-react/src/components/Icons/CrossIcon.tsx index 4d7d8d51..2d235ca0 100644 --- a/packages/status-react/src/components/Icons/CrossIcon.tsx +++ b/packages/status-react/src/components/Icons/CrossIcon.tsx @@ -1,8 +1,8 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' interface CrossIconProps { - memberView?: boolean; + memberView?: boolean } export const CrossIcon = ({ memberView }: CrossIconProps) => ( @@ -12,7 +12,7 @@ export const CrossIcon = ({ memberView }: CrossIconProps) => ( viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" - className={memberView ? "white" : ""} + className={memberView ? 'white' : ''} > ( d="M6 4.57404L1.72275 0.296796C1.32616 -0.0997918 0.689941 -0.0975927 0.296174 0.296174C-0.100338 0.692686 -0.0973145 1.32864 0.296796 1.72275L4.57404 6L0.296796 10.2772C-0.0997918 10.6738 -0.0975927 11.3101 0.296174 11.7038C0.692686 12.1003 1.32864 12.0973 1.72275 11.7032L6 7.42596L10.2772 11.7032C10.6738 12.0998 11.3101 12.0976 11.7038 11.7038C12.1003 11.3073 12.0973 10.6714 11.7032 10.2772L7.42596 6L11.7032 1.72275C12.0998 1.32616 12.0976 0.689941 11.7038 0.296174C11.3073 -0.100338 10.6714 -0.0973145 10.2772 0.296796L6 4.57404Z" /> -); +) const Icon = styled.svg` & > path { @@ -32,4 +32,4 @@ const Icon = styled.svg` fill: ${({ theme }) => theme.bodyBackgroundColor}; } } -`; +` diff --git a/packages/status-react/src/components/Icons/DeleteIcon.tsx b/packages/status-react/src/components/Icons/DeleteIcon.tsx index 7e3c693e..e209928d 100644 --- a/packages/status-react/src/components/Icons/DeleteIcon.tsx +++ b/packages/status-react/src/components/Icons/DeleteIcon.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type DeleteIconProps = { - width: number; - height: number; - className?: string; -}; + width: number + height: number + className?: string +} export const DeleteIcon = ({ width, height, className }: DeleteIconProps) => { return ( @@ -22,8 +22,8 @@ export const DeleteIcon = ({ width, height, className }: DeleteIconProps) => { d="M6.26191 1.5C5.47293 1.5 4.83333 2.13959 4.83333 2.92857C4.83333 3.33621 4.50288 3.66667 4.09524 3.66667H2C1.72386 3.66667 1.5 3.89052 1.5 4.16667C1.5 4.44281 1.72386 4.66667 2 4.66667H2.49251C2.66109 4.66667 2.80314 4.79253 2.82342 4.95989L3.71566 12.3209C3.87795 13.6597 5.0143 14.6667 6.36295 14.6667H9.63705C10.9857 14.6667 12.1221 13.6597 12.2843 12.3209L13.1766 4.95989C13.1969 4.79253 13.3389 4.66667 13.5075 4.66667H14C14.2761 4.66667 14.5 4.44281 14.5 4.16667C14.5 3.89052 14.2761 3.66667 14 3.66667H11.9048C11.4971 3.66667 11.1667 3.33621 11.1667 2.92857C11.1667 2.13959 10.5271 1.5 9.7381 1.5L6.26191 1.5ZM9.80586 3.66667C10.0501 3.66667 10.2156 3.40724 10.1826 3.16524C10.1721 3.08786 10.1667 3.00885 10.1667 2.92857C10.1667 2.69188 9.97479 2.5 9.7381 2.5L6.2619 2.5C6.02521 2.5 5.83333 2.69188 5.83333 2.92857C5.83333 3.00885 5.82789 3.08786 5.81736 3.16524C5.78441 3.40725 5.9499 3.66667 6.19414 3.66667L9.80586 3.66667ZM11.9048 4.66667C12.0643 4.66667 12.1879 4.80617 12.1687 4.96453L11.2916 12.2006C11.1902 13.0373 10.48 13.6667 9.63705 13.6667H6.36295C5.52004 13.6667 4.80983 13.0373 4.7084 12.2006L3.8313 4.96453C3.81211 4.80616 3.93572 4.66667 4.09524 4.66667L11.9048 4.66667Z" /> - ); -}; + ) +} const Icon = styled.svg` fill: ${({ theme }) => theme.tertiary}; @@ -35,4 +35,4 @@ const Icon = styled.svg` &.grey { fill: ${({ theme }) => theme.secondary}; } -`; +` diff --git a/packages/status-react/src/components/Icons/DownloadIcon.tsx b/packages/status-react/src/components/Icons/DownloadIcon.tsx index eedb0ec0..b928851a 100644 --- a/packages/status-react/src/components/Icons/DownloadIcon.tsx +++ b/packages/status-react/src/components/Icons/DownloadIcon.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type DownloadIconProps = { - width: number; - height: number; - className?: string; -}; + width: number + height: number + className?: string +} export function DownloadIcon({ width, height, className }: DownloadIconProps) { return ( @@ -19,9 +19,9 @@ export function DownloadIcon({ width, height, className }: DownloadIconProps) { - ); + ) } const Icon = styled.svg` fill: ${({ theme }) => theme.tertiary}; -`; +` diff --git a/packages/status-react/src/components/Icons/EditIcon.tsx b/packages/status-react/src/components/Icons/EditIcon.tsx index 3489b80b..e61820ec 100644 --- a/packages/status-react/src/components/Icons/EditIcon.tsx +++ b/packages/status-react/src/components/Icons/EditIcon.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type EditIconProps = { - width: number; - height: number; - className?: string; -}; + width: number + height: number + className?: string +} export function EditIcon({ width, height, className }: EditIconProps) { return ( @@ -22,7 +22,7 @@ export function EditIcon({ width, height, className }: EditIconProps) { d="M10.7914 2.16376C11.6321 1.32302 12.9952 1.32302 13.836 2.16376C14.6767 3.00451 14.6767 4.36763 13.836 5.20838L6.0015 13.0429C5.71671 13.3276 5.36405 13.5352 4.97679 13.6458L2.1717 14.4472C1.99679 14.4972 1.80854 14.4484 1.67992 14.3198C1.55129 14.1912 1.50251 14.0029 1.55249 13.828L2.35394 11.0229C2.46459 10.6357 2.6721 10.283 2.95688 9.99823L10.7914 2.16376ZM13.1276 2.87212C12.6781 2.42258 11.9492 2.42258 11.4997 2.87212L3.66524 10.7066C3.50083 10.871 3.38103 11.0746 3.31716 11.2981C3.07579 12.1429 3.85682 12.9239 4.70159 12.6826C4.92515 12.6187 5.12874 12.4989 5.29315 12.3345L13.1276 4.50003C13.5772 4.05049 13.5772 3.32165 13.1276 2.87212Z" /> - ); + ) } const Icon = styled.svg` @@ -31,4 +31,4 @@ const Icon = styled.svg` &.grey { fill: ${({ theme }) => theme.secondary}; } -`; +` diff --git a/packages/status-react/src/components/Icons/EmojiIcon.tsx b/packages/status-react/src/components/Icons/EmojiIcon.tsx index 4487f25c..363d252e 100644 --- a/packages/status-react/src/components/Icons/EmojiIcon.tsx +++ b/packages/status-react/src/components/Icons/EmojiIcon.tsx @@ -1,8 +1,8 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' interface ThemeProps { - isActive?: boolean; + isActive?: boolean } export const EmojiIcon = ({ isActive }: ThemeProps) => { @@ -14,26 +14,26 @@ export const EmojiIcon = ({ isActive }: ThemeProps) => { xmlns="http://www.w3.org/2000/svg" > - ); -}; + ) +} const Icon = styled.svg` & > path { @@ -43,4 +43,4 @@ const Icon = styled.svg` & > path.active { fill: ${({ theme }) => theme.tertiary}; } -`; +` diff --git a/packages/status-react/src/components/Icons/EthereumLogo.tsx b/packages/status-react/src/components/Icons/EthereumLogo.tsx index 0c0364d6..ad1ee0cf 100644 --- a/packages/status-react/src/components/Icons/EthereumLogo.tsx +++ b/packages/status-react/src/components/Icons/EthereumLogo.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React from 'react' export const EthereumLogo = () => ( ( fillOpacity="0.602" /> -); +) diff --git a/packages/status-react/src/components/Icons/GifIcon.tsx b/packages/status-react/src/components/Icons/GifIcon.tsx index 1321e041..a0a97b50 100644 --- a/packages/status-react/src/components/Icons/GifIcon.tsx +++ b/packages/status-react/src/components/Icons/GifIcon.tsx @@ -1,8 +1,8 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' interface ThemeProps { - isActive?: boolean; + isActive?: boolean } export const GifIcon = ({ isActive }: ThemeProps) => { @@ -14,26 +14,26 @@ export const GifIcon = ({ isActive }: ThemeProps) => { xmlns="http://www.w3.org/2000/svg" > - ); -}; + ) +} const Icon = styled.svg` & > path { @@ -43,4 +43,4 @@ const Icon = styled.svg` & > path.active { fill: ${({ theme }) => theme.tertiary}; } -`; +` diff --git a/packages/status-react/src/components/Icons/GroupIcon.tsx b/packages/status-react/src/components/Icons/GroupIcon.tsx index 6781d101..aa18c9c3 100644 --- a/packages/status-react/src/components/Icons/GroupIcon.tsx +++ b/packages/status-react/src/components/Icons/GroupIcon.tsx @@ -1,8 +1,8 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' interface GroupIconProps { - active?: boolean; + active?: boolean } export const GroupIcon = ({ active }: GroupIconProps) => { @@ -13,15 +13,15 @@ export const GroupIcon = ({ active }: GroupIconProps) => { viewBox="0 0 14 10" fill="none" xmlns="http://www.w3.org/2000/svg" - className={`${active && "active"}`} + className={`${active && 'active'}`} > - ); -}; + ) +} const Icon = styled.svg` fill: ${({ theme }) => theme.secondary}; @@ -29,4 +29,4 @@ const Icon = styled.svg` &.active { fill: ${({ theme }) => theme.primary}; } -`; +` diff --git a/packages/status-react/src/components/Icons/HideIcon.tsx b/packages/status-react/src/components/Icons/HideIcon.tsx index 967e090e..ceabe981 100644 --- a/packages/status-react/src/components/Icons/HideIcon.tsx +++ b/packages/status-react/src/components/Icons/HideIcon.tsx @@ -1,5 +1,5 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' export const HideIcon = () => ( ( -); +) const Icon = styled.svg` fill: ${({ theme }) => theme.tertiary}; -`; +` diff --git a/packages/status-react/src/components/Icons/LeftIcon.tsx b/packages/status-react/src/components/Icons/LeftIcon.tsx index 971b9545..98e6669e 100644 --- a/packages/status-react/src/components/Icons/LeftIcon.tsx +++ b/packages/status-react/src/components/Icons/LeftIcon.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type LeftIconProps = { - width: number; - height: number; - className?: string; -}; + width: number + height: number + className?: string +} export function LeftIcon({ width, height, className }: LeftIconProps) { return ( @@ -18,7 +18,7 @@ export function LeftIcon({ width, height, className }: LeftIconProps) { > - ); + ) } const Icon = styled.svg` @@ -31,4 +31,4 @@ const Icon = styled.svg` &.red { fill: ${({ theme }) => theme.redColor}; } -`; +` diff --git a/packages/status-react/src/components/Icons/LoadingIcon.tsx b/packages/status-react/src/components/Icons/LoadingIcon.tsx index e8d3772e..00ea1b7e 100644 --- a/packages/status-react/src/components/Icons/LoadingIcon.tsx +++ b/packages/status-react/src/components/Icons/LoadingIcon.tsx @@ -1,5 +1,5 @@ -import React from "react"; -import styled, { keyframes } from "styled-components"; +import React from 'react' +import styled, { keyframes } from 'styled-components' const rotation = keyframes` from { @@ -8,10 +8,10 @@ const rotation = keyframes` to { transform: rotate(360deg); } -`; +` interface LoadingIconProps { - className?: string; + className?: string } export const LoadingIcon = ({ className }: LoadingIconProps) => ( @@ -28,7 +28,7 @@ export const LoadingIcon = ({ className }: LoadingIconProps) => ( d="M10.7682 5.07742C10.5667 4.18403 10.0777 3.37742 9.37244 2.77889C8.66702 2.18025 7.78327 1.8222 6.85295 1.7598C5.9226 1.69741 4.99749 1.93417 4.21597 2.43357C3.4346 2.93289 2.83935 3.66744 2.51731 4.52621C2.19533 5.38485 2.16318 6.32294 2.4255 7.20091C2.68785 8.07899 3.23118 8.85135 3.9762 9.40157C4.72137 9.95188 5.62791 10.25 6.56041 10.25L6.56041 11.75C5.30863 11.75 4.08949 11.3499 3.0851 10.6082C2.08057 9.86633 1.34435 8.82207 0.988276 7.63032C0.632173 6.43846 0.675924 5.16459 1.11282 3.99953C1.54966 2.8346 2.35554 1.84232 3.40827 1.16961C4.46086 0.496978 5.7044 0.179402 6.95332 0.263164C8.20227 0.346928 9.39145 0.827686 10.343 1.63521C11.2947 2.44286 11.9578 3.53431 12.2314 4.74738L10.7682 5.07742Z" /> -); +) const Icon = styled.svg` & > path { @@ -41,4 +41,4 @@ const Icon = styled.svg` fill: ${({ theme }) => theme.secondary}; } } -`; +` diff --git a/packages/status-react/src/components/Icons/LogoutIcon.tsx b/packages/status-react/src/components/Icons/LogoutIcon.tsx index 4e9534a0..5db52e26 100644 --- a/packages/status-react/src/components/Icons/LogoutIcon.tsx +++ b/packages/status-react/src/components/Icons/LogoutIcon.tsx @@ -1,5 +1,5 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' export const LogoutIcon = () => { return ( @@ -13,9 +13,9 @@ export const LogoutIcon = () => { - ); -}; + ) +} const Icon = styled.svg` fill: ${({ theme }) => theme.tertiary}; -`; +` diff --git a/packages/status-react/src/components/Icons/MarkerdaoLogo.tsx b/packages/status-react/src/components/Icons/MarkerdaoLogo.tsx index 1cb39939..25408eef 100644 --- a/packages/status-react/src/components/Icons/MarkerdaoLogo.tsx +++ b/packages/status-react/src/components/Icons/MarkerdaoLogo.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React from 'react' export const MarkerdaoLogo = () => ( ( -); +) diff --git a/packages/status-react/src/components/Icons/MembersIcon.tsx b/packages/status-react/src/components/Icons/MembersIcon.tsx index 47cbd809..edc6891a 100644 --- a/packages/status-react/src/components/Icons/MembersIcon.tsx +++ b/packages/status-react/src/components/Icons/MembersIcon.tsx @@ -1,5 +1,5 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' export const MembersIcon = () => { return ( @@ -16,11 +16,11 @@ export const MembersIcon = () => { /> - ); -}; + ) +} const Icon = styled.svg` & > path { fill: ${({ theme }) => theme.primary}; } -`; +` diff --git a/packages/status-react/src/components/Icons/MembersSmallIcon.tsx b/packages/status-react/src/components/Icons/MembersSmallIcon.tsx index f5b574ac..794409b1 100644 --- a/packages/status-react/src/components/Icons/MembersSmallIcon.tsx +++ b/packages/status-react/src/components/Icons/MembersSmallIcon.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type MembersSmallIconProps = { - width: number; - height: number; - className?: string; -}; + width: number + height: number + className?: string +} export function MembersSmallIcon({ height, @@ -28,9 +28,9 @@ export function MembersSmallIcon({ /> - ); + ) } const Icon = styled.svg` fill: ${({ theme }) => theme.tertiary}; -`; +` diff --git a/packages/status-react/src/components/Icons/MetamaskLogo.tsx b/packages/status-react/src/components/Icons/MetamaskLogo.tsx index 33a5f161..d6917a2e 100644 --- a/packages/status-react/src/components/Icons/MetamaskLogo.tsx +++ b/packages/status-react/src/components/Icons/MetamaskLogo.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React from 'react' export const MetamaskLogo = () => { return ( @@ -213,5 +213,5 @@ export const MetamaskLogo = () => { strokeLinejoin="round" /> - ); -}; + ) +} diff --git a/packages/status-react/src/components/Icons/MobileIcon.tsx b/packages/status-react/src/components/Icons/MobileIcon.tsx index f35c8c0b..420c46f1 100644 --- a/packages/status-react/src/components/Icons/MobileIcon.tsx +++ b/packages/status-react/src/components/Icons/MobileIcon.tsx @@ -1,5 +1,5 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' export const MobileIcon = () => { return ( @@ -17,9 +17,9 @@ export const MobileIcon = () => { d="M5 6C5 3.79086 6.79086 2 9 2H15C17.2091 2 19 3.79086 19 6V18C19 20.2091 17.2091 22 15 22H9C6.79086 22 5 20.2091 5 18V6ZM6.5 6C6.5 4.61929 7.61929 3.5 9 3.5H15C16.3807 3.5 17.5 4.61929 17.5 6V18C17.5 19.3807 16.3807 20.5 15 20.5H9C7.61929 20.5 6.5 19.3807 6.5 18V6Z" /> - ); -}; + ) +} const Icon = styled.svg` fill: ${({ theme }) => theme.tertiary}; -`; +` diff --git a/packages/status-react/src/components/Icons/MoreIcon.tsx b/packages/status-react/src/components/Icons/MoreIcon.tsx index 39d257c0..bf0e6cb9 100644 --- a/packages/status-react/src/components/Icons/MoreIcon.tsx +++ b/packages/status-react/src/components/Icons/MoreIcon.tsx @@ -1,5 +1,5 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' export const MoreIcon = () => { return ( @@ -14,11 +14,11 @@ export const MoreIcon = () => { - ); -}; + ) +} const Icon = styled.svg` & > path { fill: ${({ theme }) => theme.primary}; } -`; +` diff --git a/packages/status-react/src/components/Icons/MuteIcon.tsx b/packages/status-react/src/components/Icons/MuteIcon.tsx index 33a37caa..4fd5e742 100644 --- a/packages/status-react/src/components/Icons/MuteIcon.tsx +++ b/packages/status-react/src/components/Icons/MuteIcon.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type MuteIconProps = { - width: number; - height: number; - className?: string; -}; + width: number + height: number + className?: string +} export function MuteIcon({ width, height, className }: MuteIconProps) { return ( @@ -23,9 +23,9 @@ export function MuteIcon({ width, height, className }: MuteIconProps) { d="M10.1873 12.6668C9.96313 12.6668 9.80205 12.8855 9.82292 13.1087C9.82962 13.1804 9.83328 13.2553 9.83328 13.3335C9.83328 14.2594 9.02904 15.1668 7.99995 15.1668C6.97085 15.1668 6.16662 14.2594 6.16662 13.3335C6.16662 13.2553 6.17028 13.1804 6.17698 13.1087C6.19784 12.8855 6.03677 12.6668 5.81257 12.6668H3.68068C2.52316 12.6668 1.91546 11.2931 2.6941 10.4366L3.47867 9.57357C3.81915 9.19905 4.046 8.73536 4.13273 8.23669L4.87637 3.96073C5.14048 2.44212 6.45854 1.3335 7.99995 1.3335C9.54136 1.3335 10.8594 2.44211 11.1235 3.96073L11.8672 8.23668C11.9539 8.73535 12.1808 9.19905 12.5212 9.57357L13.3058 10.4366C14.0844 11.2931 13.4767 12.6668 12.3192 12.6668H10.1873ZM7.35483 12.6857L7.35418 12.6864L7.35935 12.6811L7.36097 12.6794C7.3618 12.6785 7.36222 12.678 7.36227 12.678C7.36253 12.6777 7.36229 12.6779 7.36227 12.678L7.36097 12.6794C7.36831 12.6717 7.37871 12.6668 7.38931 12.6668H8.61059C8.62119 12.6668 8.63124 12.6714 8.63858 12.6791C8.64051 12.6813 8.64525 12.687 8.65203 12.696C8.66736 12.7164 8.69261 12.7535 8.7194 12.8071C8.77216 12.9126 8.83328 13.0865 8.83328 13.3335C8.83328 13.7409 8.44361 14.1668 7.99995 14.1668C7.55628 14.1668 7.16662 13.7409 7.16662 13.3335C7.16662 13.0865 7.22773 12.9126 7.2805 12.8071C7.30729 12.7535 7.33254 12.7164 7.34787 12.696C7.35465 12.687 7.35905 12.6816 7.36097 12.6794L7.35935 12.6811L7.35811 12.6824L7.35603 12.6845L7.35483 12.6857ZM3.43404 11.1093L4.21861 10.2462C4.68676 9.73127 4.99869 9.0937 5.11794 8.40803L5.86158 4.13207C6.04239 3.09244 6.94472 2.3335 7.99995 2.3335C9.05518 2.3335 9.95751 3.09244 10.1383 4.13207L10.882 8.40803C11.0012 9.0937 11.3131 9.73127 11.7813 10.2462L12.5659 11.1093C12.7605 11.3234 12.6086 11.6668 12.3192 11.6668H3.68068C3.3913 11.6668 3.23938 11.3234 3.43404 11.1093Z" /> - ); + ) } const Icon = styled.svg` fill: ${({ theme }) => theme.tertiary}; -`; +` diff --git a/packages/status-react/src/components/Icons/MutedIcon.tsx b/packages/status-react/src/components/Icons/MutedIcon.tsx index 4435bae5..1fed12b8 100644 --- a/packages/status-react/src/components/Icons/MutedIcon.tsx +++ b/packages/status-react/src/components/Icons/MutedIcon.tsx @@ -1,5 +1,5 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' export const MutedIcon = () => { return ( @@ -12,11 +12,11 @@ export const MutedIcon = () => { - ); -}; + ) +} const Icon = styled.svg` fill: ${({ theme }) => theme.primary}; fill-opacity: 0.2; flex-shrink: 0; -`; +` diff --git a/packages/status-react/src/components/Icons/NextIcon.tsx b/packages/status-react/src/components/Icons/NextIcon.tsx index 88be547c..68b4bbe8 100644 --- a/packages/status-react/src/components/Icons/NextIcon.tsx +++ b/packages/status-react/src/components/Icons/NextIcon.tsx @@ -1,5 +1,5 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' export const NextIcon = () => { return ( @@ -16,8 +16,8 @@ export const NextIcon = () => { d="M9.46967 5.46967C9.76256 5.17678 10.2374 5.17678 10.5303 5.46967L16.1768 11.1161C16.6649 11.6043 16.6649 12.3957 16.1768 12.8839L10.5303 18.5303C10.2374 18.8232 9.76256 18.8232 9.46967 18.5303C9.17678 18.2374 9.17678 17.7626 9.46967 17.4697L14.5858 12.3536C14.781 12.1583 14.781 11.8417 14.5858 11.6464L9.46967 6.53033C9.17678 6.23744 9.17678 5.76256 9.46967 5.46967Z" /> - ); -}; + ) +} const Icon = styled.svg` fill: ${({ theme }) => theme.primary}; @@ -25,4 +25,4 @@ const Icon = styled.svg` right: 8px; top: 50%; transform: translateY(-50%); -`; +` diff --git a/packages/status-react/src/components/Icons/PictureIcon.tsx b/packages/status-react/src/components/Icons/PictureIcon.tsx index 5eeb3878..436e752a 100644 --- a/packages/status-react/src/components/Icons/PictureIcon.tsx +++ b/packages/status-react/src/components/Icons/PictureIcon.tsx @@ -1,5 +1,5 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' export const PictureIcon = () => { return ( @@ -20,11 +20,11 @@ export const PictureIcon = () => { d="M4 0C1.79086 0 0 1.79086 0 4V14C0 16.2091 1.79086 18 4 18H16C18.2091 18 20 16.2091 20 14V4C20 1.79086 18.2091 0 16 0H4ZM16 1.5H4C2.61929 1.5 1.5 2.61929 1.5 4V7.23223C1.5 7.67768 2.03857 7.90077 2.35355 7.58579L3.76256 6.17678C4.44598 5.49336 5.55402 5.49336 6.23744 6.17678L16.3181 16.2575C16.4372 16.3765 16.6094 16.4311 16.7695 16.3793C17.7737 16.0548 18.5 15.1122 18.5 14V4C18.5 2.61929 17.3807 1.5 16 1.5ZM1.53033 10.5303C1.51153 10.5491 1.5 10.5742 1.5 10.6008V14C1.5 15.3807 2.61929 16.5 4 16.5H13.2322C13.6777 16.5 13.9008 15.9614 13.5858 15.6464L5.17678 7.23744C5.07914 7.1398 4.92085 7.13981 4.82322 7.23744L1.53033 10.5303Z" /> - ); -}; + ) +} const Icon = styled.svg` & > path { fill: ${({ theme }) => theme.secondary}; } -`; +` diff --git a/packages/status-react/src/components/Icons/PinIcon.tsx b/packages/status-react/src/components/Icons/PinIcon.tsx index a2cb3dae..ecd68d45 100644 --- a/packages/status-react/src/components/Icons/PinIcon.tsx +++ b/packages/status-react/src/components/Icons/PinIcon.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type PinIconProps = { - width: number; - height: number; - className?: string; -}; + width: number + height: number + className?: string +} export function PinIcon({ width, height, className }: PinIconProps) { return ( @@ -24,7 +24,7 @@ export function PinIcon({ width, height, className }: PinIconProps) { d="M12 2C8.68629 2 6 4.68629 6 8C6 10.9077 8.06835 13.3323 10.814 13.8828C11.0613 13.9324 11.25 14.1429 11.25 14.3951L11.25 21C11.25 21.4142 11.5858 21.75 12 21.75C12.4142 21.75 12.75 21.4142 12.75 21L12.75 14.3951C12.75 14.1429 12.9387 13.9324 13.186 13.8828C15.9317 13.3323 18 10.9077 18 8C18 4.68629 15.3137 2 12 2ZM7.5 8C7.5 10.4853 9.51472 12.5 12 12.5C14.4853 12.5 16.5 10.4853 16.5 8C16.5 5.51472 14.4853 3.5 12 3.5C9.51472 3.5 7.5 5.51472 7.5 8Z" /> - ); + ) } const Icon = styled.svg` @@ -38,4 +38,4 @@ const Icon = styled.svg` width: 14px; height: 14px; } -`; +` diff --git a/packages/status-react/src/components/Icons/ProfileIcon.tsx b/packages/status-react/src/components/Icons/ProfileIcon.tsx index a0a13941..1f5cbc6b 100644 --- a/packages/status-react/src/components/Icons/ProfileIcon.tsx +++ b/packages/status-react/src/components/Icons/ProfileIcon.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type ProfileIconProps = { - width: number; - height: number; - className?: string; -}; + width: number + height: number + className?: string +} export function ProfileIcon({ width, height, className }: ProfileIconProps) { return ( @@ -29,9 +29,9 @@ export function ProfileIcon({ width, height, className }: ProfileIconProps) { d="M8.00065 14.6673C11.6825 14.6673 14.6673 11.6825 14.6673 8.00065C14.6673 4.31875 11.6825 1.33398 8.00065 1.33398C4.31875 1.33398 1.33398 4.31875 1.33398 8.00065C1.33398 11.6825 4.31875 14.6673 8.00065 14.6673ZM8.00065 13.6673C11.1303 13.6673 13.6673 11.1303 13.6673 8.00065C13.6673 4.87104 11.1303 2.33398 8.00065 2.33398C4.87104 2.33398 2.33398 4.87104 2.33398 8.00065C2.33398 11.1303 4.87104 13.6673 8.00065 13.6673Z" /> - ); + ) } const Icon = styled.svg` fill: ${({ theme }) => theme.tertiary}; -`; +` diff --git a/packages/status-react/src/components/Icons/QuoteIcon.tsx b/packages/status-react/src/components/Icons/QuoteIcon.tsx index af683958..f2863e69 100644 --- a/packages/status-react/src/components/Icons/QuoteIcon.tsx +++ b/packages/status-react/src/components/Icons/QuoteIcon.tsx @@ -1,10 +1,10 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type QuoteProps = { - width: number; - height: number; -}; + width: number + height: number +} export function QuoteSvg({ width, height }: QuoteProps) { return ( @@ -23,7 +23,7 @@ export function QuoteSvg({ width, height }: QuoteProps) { strokeLinejoin="round" /> - ); + ) } const Icon = styled.svg` @@ -34,4 +34,4 @@ const Icon = styled.svg` left: 16px; top: 50%; transform: translateY(-50%); -`; +` diff --git a/packages/status-react/src/components/Icons/ReactionIcon.tsx b/packages/status-react/src/components/Icons/ReactionIcon.tsx index aed61508..fff95437 100644 --- a/packages/status-react/src/components/Icons/ReactionIcon.tsx +++ b/packages/status-react/src/components/Icons/ReactionIcon.tsx @@ -1,9 +1,9 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type ReactionProps = { - className?: string; -}; + className?: string +} export function ReactionSvg({ className }: ReactionProps) { return ( @@ -32,7 +32,7 @@ export function ReactionSvg({ className }: ReactionProps) { /> - ); + ) } const Icon = styled.svg` @@ -48,4 +48,4 @@ const Icon = styled.svg` width: 18px; height: 18px; } -`; +` diff --git a/packages/status-react/src/components/Icons/ReadIcon.tsx b/packages/status-react/src/components/Icons/ReadIcon.tsx index 5c18d16c..af52b560 100644 --- a/packages/status-react/src/components/Icons/ReadIcon.tsx +++ b/packages/status-react/src/components/Icons/ReadIcon.tsx @@ -1,8 +1,8 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' interface ReadIconProps { - isRead?: boolean; + isRead?: boolean } export const ReadIcon = ({ isRead }: ReadIconProps) => { @@ -13,7 +13,7 @@ export const ReadIcon = ({ isRead }: ReadIconProps) => { viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" - className={`${isRead && "read"}`} + className={`${isRead && 'read'}`} > { d="M1.0183 12.48C1.31 12.1859 1.78487 12.184 2.07895 12.4757L8.09656 18.4446C8.39064 18.7363 8.39257 19.2112 8.10087 19.5053C7.80917 19.7994 7.3343 19.8013 7.04022 19.5096L1.02261 13.5407C0.728529 13.249 0.7266 12.7741 1.0183 12.48Z" /> - ); -}; + ) +} const Icon = styled.svg` fill: ${({ theme }) => theme.tertiary}; @@ -40,4 +40,4 @@ const Icon = styled.svg` &.read { fill: ${({ theme }) => theme.secondary}; } -`; +` diff --git a/packages/status-react/src/components/Icons/ReadMessageIcon.tsx b/packages/status-react/src/components/Icons/ReadMessageIcon.tsx index f2e60395..23f3f6e6 100644 --- a/packages/status-react/src/components/Icons/ReadMessageIcon.tsx +++ b/packages/status-react/src/components/Icons/ReadMessageIcon.tsx @@ -1,8 +1,8 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' interface ReadMessageIconProps { - isRead?: boolean; + isRead?: boolean } export const ReadMessageIcon = ({ isRead }: ReadMessageIconProps) => { @@ -13,7 +13,7 @@ export const ReadMessageIcon = ({ isRead }: ReadMessageIconProps) => { viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" - className={`${isRead && "read"}`} + className={`${isRead && 'read'}`} > { d="M20.7751 5.57055C21.1415 5.90642 21.1662 6.47573 20.8304 6.84214L10.2605 18.3729C10.0946 18.5539 9.862 18.6592 9.61658 18.6646C9.37116 18.6699 9.13421 18.5747 8.96064 18.4012L3.19524 12.6358C2.84377 12.2843 2.84377 11.7145 3.19524 11.363C3.54672 11.0115 4.11656 11.0115 4.46804 11.363L9.1995 16.0945C9.40079 16.2957 9.72928 16.2886 9.92163 16.0788L19.5035 5.62584C19.8394 5.25943 20.4087 5.23468 20.7751 5.57055Z" /> - ); -}; + ) +} const Icon = styled.svg` fill: ${({ theme }) => theme.tertiary}; @@ -30,4 +30,4 @@ const Icon = styled.svg` &.read { fill: ${({ theme }) => theme.secondary}; } -`; +` diff --git a/packages/status-react/src/components/Icons/ReplyActivityIcon.tsx b/packages/status-react/src/components/Icons/ReplyActivityIcon.tsx index 815d582b..62bdfead 100644 --- a/packages/status-react/src/components/Icons/ReplyActivityIcon.tsx +++ b/packages/status-react/src/components/Icons/ReplyActivityIcon.tsx @@ -1,5 +1,5 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' export const ReplyIcon = () => ( ( > -); +) const Icon = styled.svg` fill: ${({ theme }) => theme.secondary}; flex-shrink: 0; -`; +` diff --git a/packages/status-react/src/components/Icons/ReplyIcon.tsx b/packages/status-react/src/components/Icons/ReplyIcon.tsx index e5c6a87b..17e033ea 100644 --- a/packages/status-react/src/components/Icons/ReplyIcon.tsx +++ b/packages/status-react/src/components/Icons/ReplyIcon.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type ReplyProps = { - width: number; - height: number; - className?: string; -}; + width: number + height: number + className?: string +} export function ReplySvg({ width, height, className }: ReplyProps) { return ( @@ -18,7 +18,7 @@ export function ReplySvg({ width, height, className }: ReplyProps) { > - ); + ) } const Icon = styled.svg` @@ -31,4 +31,4 @@ const Icon = styled.svg` &.menu { fill: ${({ theme }) => theme.tertiary}; } -`; +` diff --git a/packages/status-react/src/components/Icons/ScanIcon.tsx b/packages/status-react/src/components/Icons/ScanIcon.tsx index e6c506cb..065552c8 100644 --- a/packages/status-react/src/components/Icons/ScanIcon.tsx +++ b/packages/status-react/src/components/Icons/ScanIcon.tsx @@ -1,5 +1,5 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' export const ScanIcon = () => { return ( @@ -32,9 +32,9 @@ export const ScanIcon = () => { d="M21.9998 17.2498C21.9998 19.8731 19.8732 21.9998 17.2498 21.9998H15.2498C14.8356 21.9998 14.4998 21.664 14.4998 21.2498C14.4998 20.8355 14.8356 20.4998 15.2498 20.4998H17.2498C19.0448 20.4998 20.4998 19.0447 20.4998 17.2498V15.4626C20.4998 15.0483 20.8356 14.7126 21.2498 14.7126C21.6641 14.7126 21.9998 15.0483 21.9998 15.4626V17.2498Z" /> - ); -}; + ) +} const Icon = styled.svg` fill: ${({ theme }) => theme.tertiary}; -`; +` diff --git a/packages/status-react/src/components/Icons/ShowIcon.tsx b/packages/status-react/src/components/Icons/ShowIcon.tsx index 22eb5aef..9dfb0277 100644 --- a/packages/status-react/src/components/Icons/ShowIcon.tsx +++ b/packages/status-react/src/components/Icons/ShowIcon.tsx @@ -1,5 +1,5 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' export const ShowIcon = () => ( ( d="M2.30151 12.4833C3.33634 14.0671 6.96373 19 12.0005 19C17.0373 19 20.6647 14.0671 21.6996 12.4833C21.8932 12.1868 21.8932 11.8132 21.6996 11.5167C20.6647 9.93293 17.0373 5 12.0005 5C6.96373 5 3.33634 9.93293 2.30151 11.5167C2.10783 11.8132 2.10783 12.1868 2.30151 12.4833ZM12.0005 17.5C9.98328 17.5 8.15372 16.5088 6.6278 15.1978C5.82477 14.5079 5.14518 13.7625 4.6125 13.1052C4.08889 12.459 4.08889 11.541 4.6125 10.8948C5.14518 10.2375 5.82477 9.49212 6.6278 8.80219C8.15372 7.49115 9.98328 6.5 12.0005 6.5C14.0178 6.5 15.8473 7.49116 17.3733 8.80219C18.1763 9.49212 18.8559 10.2375 19.3886 10.8948C19.9122 11.541 19.9122 12.459 19.3886 13.1052C18.8559 13.7625 18.1763 14.5079 17.3733 15.1978C15.8473 16.5088 14.0178 17.5 12.0005 17.5Z" /> -); +) const Icon = styled.svg` fill: ${({ theme }) => theme.tertiary}; -`; +` diff --git a/packages/status-react/src/components/Icons/StatusIcon.tsx b/packages/status-react/src/components/Icons/StatusIcon.tsx index 69b6e229..fafbf739 100644 --- a/packages/status-react/src/components/Icons/StatusIcon.tsx +++ b/packages/status-react/src/components/Icons/StatusIcon.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React from 'react' export const StatusIcon = () => ( ( fill="#4360DF" /> -); +) diff --git a/packages/status-react/src/components/Icons/StatusLogo.tsx b/packages/status-react/src/components/Icons/StatusLogo.tsx index ad152316..5b9c3c62 100644 --- a/packages/status-react/src/components/Icons/StatusLogo.tsx +++ b/packages/status-react/src/components/Icons/StatusLogo.tsx @@ -1,5 +1,5 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' export const StatusLogo = () => ( ( fill="black" /> -); +) const Icon = styled.svg` & > path:first-child { @@ -38,4 +38,4 @@ const Icon = styled.svg` & > path:last-child { fill: ${({ theme }) => theme.primary}; } -`; +` diff --git a/packages/status-react/src/components/Icons/StickerIcon.tsx b/packages/status-react/src/components/Icons/StickerIcon.tsx index 0c9ba06b..2af0a996 100644 --- a/packages/status-react/src/components/Icons/StickerIcon.tsx +++ b/packages/status-react/src/components/Icons/StickerIcon.tsx @@ -1,8 +1,8 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' interface ThemeProps { - isActive?: boolean; + isActive?: boolean } export const StickerIcon = ({ isActive }: ThemeProps) => { @@ -14,18 +14,18 @@ export const StickerIcon = ({ isActive }: ThemeProps) => { xmlns="http://www.w3.org/2000/svg" > - ); -}; + ) +} const Icon = styled.svg` & > path { @@ -35,4 +35,4 @@ const Icon = styled.svg` & > path.active { fill: ${({ theme }) => theme.tertiary}; } -`; +` diff --git a/packages/status-react/src/components/Icons/TipIcon.tsx b/packages/status-react/src/components/Icons/TipIcon.tsx index 8588c887..46286bfb 100644 --- a/packages/status-react/src/components/Icons/TipIcon.tsx +++ b/packages/status-react/src/components/Icons/TipIcon.tsx @@ -1,9 +1,9 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type TipIconProps = { - className?: string; -}; + className?: string +} export const TipIcon = ({ className }: TipIconProps) => { return ( @@ -17,8 +17,8 @@ export const TipIcon = ({ className }: TipIconProps) => { > - ); -}; + ) +} const Icon = styled.svg` fill: ${({ theme }) => theme.primary}; @@ -35,4 +35,4 @@ const Icon = styled.svg` top: -8px; transform: rotate(180deg) translateX(50%); } -`; +` diff --git a/packages/status-react/src/components/Icons/UntrustworthIcon.tsx b/packages/status-react/src/components/Icons/UntrustworthIcon.tsx index 99797a38..dd18c693 100644 --- a/packages/status-react/src/components/Icons/UntrustworthIcon.tsx +++ b/packages/status-react/src/components/Icons/UntrustworthIcon.tsx @@ -1,5 +1,5 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' export const UntrustworthIcon = () => { return ( @@ -18,11 +18,11 @@ export const UntrustworthIcon = () => { fill="white" /> - ); -}; + ) +} const Icon = styled.svg` & > circle { fill: ${({ theme }) => theme.redColor}; } -`; +` diff --git a/packages/status-react/src/components/Icons/UserIcon.tsx b/packages/status-react/src/components/Icons/UserIcon.tsx index a919e284..468ad957 100644 --- a/packages/status-react/src/components/Icons/UserIcon.tsx +++ b/packages/status-react/src/components/Icons/UserIcon.tsx @@ -1,9 +1,9 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' interface UserIconProps { - memberView?: boolean; - modalView?: boolean; + memberView?: boolean + modalView?: boolean } export const UserIcon = ({ memberView, modalView }: UserIconProps) => { @@ -22,17 +22,17 @@ export const UserIcon = ({ memberView, modalView }: UserIconProps) => { d="M6.14814 30.8957C4.70584 30.0257 4.143 28.2122 4.92859 26.7222C7.3653 22.1006 11.8615 19 17.005 19C22.1956 19 26.7268 22.1576 29.1477 26.8493C29.9221 28.3501 29.3384 30.163 27.8819 31.0177C24.6426 32.9186 20.9805 33.9995 17.1067 33.9995C13.1509 33.9995 9.42482 32.8723 6.14814 30.8957Z" /> - ); -}; + ) +} const Icon = styled.svg` width: ${({ memberView, modalView }) => - memberView ? "20px" : modalView ? "80px" : "34px"}; + memberView ? '20px' : modalView ? '80px' : '34px'}; height: ${({ memberView, modalView }) => - memberView ? "20px" : modalView ? "80px" : "34px"}; + memberView ? '20px' : modalView ? '80px' : '34px'}; & > path, & > ellipse { fill: ${({ theme }) => theme.iconUserColor}; } -`; +` diff --git a/packages/status-react/src/components/Icons/WalletConnectLogo.tsx b/packages/status-react/src/components/Icons/WalletConnectLogo.tsx index e55bdc4d..2e0febc1 100644 --- a/packages/status-react/src/components/Icons/WalletConnectLogo.tsx +++ b/packages/status-react/src/components/Icons/WalletConnectLogo.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React from 'react' export const WalletConnectLogo = () => { return ( @@ -31,5 +31,5 @@ export const WalletConnectLogo = () => { - ); -}; + ) +} diff --git a/packages/status-react/src/components/Icons/WarningIcon.tsx b/packages/status-react/src/components/Icons/WarningIcon.tsx index 6e06ec57..97244960 100644 --- a/packages/status-react/src/components/Icons/WarningIcon.tsx +++ b/packages/status-react/src/components/Icons/WarningIcon.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' type WarningSvgProps = { - width: number; - height: number; - className?: string; -}; + width: number + height: number + className?: string +} export function WarningSvg({ width, height, className }: WarningSvgProps) { return ( @@ -25,12 +25,12 @@ export function WarningSvg({ width, height, className }: WarningSvgProps) { d="M1.33398 8.00065C1.33398 11.6825 4.31875 14.6673 8.00065 14.6673C11.6825 14.6673 14.6673 11.6825 14.6673 8.00065C14.6673 4.31875 11.6826 1.33398 8.00065 1.33398C4.31875 1.33398 1.33398 4.31875 1.33398 8.00065ZM2.33398 8.00065C2.33398 11.1303 4.87104 13.6673 8.00065 13.6673C11.1303 13.6673 13.6673 11.1303 13.6673 8.00065C13.6673 4.87104 11.1303 2.33398 8.00065 2.33398C4.87104 2.33398 2.33398 4.87104 2.33398 8.00065Z" /> - ); + ) } export const WarningIcon = () => { - return ; -}; + return +} const Icon = styled(WarningSvg)` & > path { @@ -44,4 +44,4 @@ const Icon = styled(WarningSvg)` &:hover > path { fill: ${({ theme }) => theme.bodyBackgroundColor}; } -`; +` diff --git a/packages/status-react/src/components/Members/Member.tsx b/packages/status-react/src/components/Members/Member.tsx index b84866f0..a5bfae38 100644 --- a/packages/status-react/src/components/Members/Member.tsx +++ b/packages/status-react/src/components/Members/Member.tsx @@ -1,40 +1,40 @@ -import React, { useRef, useState } from "react"; -import styled from "styled-components"; +import React, { useRef, useState } from 'react' +import styled from 'styled-components' -import { useIdentity } from "../../contexts/identityProvider"; -import { useClickOutside } from "../../hooks/useClickOutside"; -import { Contact } from "../../models/Contact"; -import { ContactMenu } from "../Form/ContactMenu"; -import { IconBtn, UserAddress } from "../Messages/Styles"; +import { useIdentity } from '../../contexts/identityProvider' +import { useClickOutside } from '../../hooks/useClickOutside' +import { Contact } from '../../models/Contact' +import { ContactMenu } from '../Form/ContactMenu' +import { IconBtn, UserAddress } from '../Messages/Styles' -import { UserLogo } from "./UserLogo"; +import { UserLogo } from './UserLogo' interface MemberProps { - contact: Contact; - isOnline?: boolean; - isYou?: boolean; - onClick?: () => void; + contact: Contact + isOnline?: boolean + isYou?: boolean + onClick?: () => void } export function Member({ contact, isOnline, isYou, onClick }: MemberProps) { - const identity = useIdentity(); + const identity = useIdentity() - const [showMenu, setShowMenu] = useState(false); + const [showMenu, setShowMenu] = useState(false) - const ref = useRef(null); - useClickOutside(ref, () => setShowMenu(false)); + const ref = useRef(null) + useClickOutside(ref, () => setShowMenu(false)) return ( - + { - if (identity) setShowMenu((e) => !e); + if (identity) setShowMenu(e => !e) }} ref={ref} > @@ -43,9 +43,9 @@ export function Member({ contact, isOnline, isYou, onClick }: MemberProps) { contact={contact} radius={30} colorWheel={[ - ["red", 150], - ["blue", 250], - ["green", 360], + ['red', 150], + ['blue', 250], + ['green', 360], ]} /> @@ -56,7 +56,7 @@ export function Member({ contact, isOnline, isYou, onClick }: MemberProps) { - ); + ) } export const MemberData = styled.div` @@ -69,7 +69,7 @@ export const MemberData = styled.div` margin-bottom: 0; cursor: default; } -`; +` export const MemberName = styled.p` font-weight: 500; @@ -80,7 +80,7 @@ export const MemberName = styled.p` text-overflow: ellipsis; overflow: hidden; white-space: nowrap; -`; +` export const MemberIcon = styled(IconBtn)` width: 29px; @@ -88,7 +88,7 @@ export const MemberIcon = styled(IconBtn)` &.offline { &::after { - content: ""; + content: ''; position: absolute; right: -1px; bottom: -2px; @@ -102,7 +102,7 @@ export const MemberIcon = styled(IconBtn)` &.online { &::after { - content: ""; + content: ''; position: absolute; right: -1px; bottom: -2px; @@ -113,7 +113,7 @@ export const MemberIcon = styled(IconBtn)` border: 2px solid ${({ theme }) => theme.bodyBackgroundColor}; } } -`; +` const Column = styled.div` display: flex; @@ -122,4 +122,4 @@ const Column = styled.div` text-overflow: ellipsis; overflow: hidden; white-space: nowrap; -`; +` diff --git a/packages/status-react/src/components/Members/Members.tsx b/packages/status-react/src/components/Members/Members.tsx index 3ea35eb4..297f8028 100644 --- a/packages/status-react/src/components/Members/Members.tsx +++ b/packages/status-react/src/components/Members/Members.tsx @@ -1,26 +1,26 @@ -import React, { useMemo } from "react"; -import styled from "styled-components"; +import React, { useMemo } from 'react' +import styled from 'styled-components' -import { useMessengerContext } from "../../contexts/messengerProvider"; +import { useMessengerContext } from '../../contexts/messengerProvider' -import { MembersList } from "./MembersList"; +import { MembersList } from './MembersList' export function Members() { - const { activeChannel } = useMessengerContext(); + const { activeChannel } = useMessengerContext() const heading = useMemo( () => - activeChannel && activeChannel?.type === "group" - ? "Group members" - : "Members", + activeChannel && activeChannel?.type === 'group' + ? 'Group members' + : 'Members', [activeChannel] - ); + ) return ( {heading} - ); + ) } const MembersWrapper = styled.div` @@ -32,7 +32,7 @@ const MembersWrapper = styled.div` background-color: ${({ theme }) => theme.sectionBackgroundColor}; padding: 16px; overflow-y: scroll; -`; +` const MemberHeading = styled.h2` font-weight: 500; @@ -40,4 +40,4 @@ const MemberHeading = styled.h2` line-height: 22px; color: ${({ theme }) => theme.primary}; margin-bottom: 16px; -`; +` diff --git a/packages/status-react/src/components/Members/MembersList.tsx b/packages/status-react/src/components/Members/MembersList.tsx index 2aa725d9..a2ba7338 100644 --- a/packages/status-react/src/components/Members/MembersList.tsx +++ b/packages/status-react/src/components/Members/MembersList.tsx @@ -1,50 +1,47 @@ -import React, { useMemo } from "react"; -import styled from "styled-components"; +import React, { useMemo } from 'react' +import styled from 'styled-components' -import { useUserPublicKey } from "../../contexts/identityProvider"; -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useModal } from "../../contexts/modalProvider"; -import { Contact } from "../../models/Contact"; -import { buttonStyles } from "../Buttons/buttonStyle"; -import { LogoutIcon } from "../Icons/LogoutIcon"; -import { LogoutModalName } from "../Modals/LogoutModal"; +import { useUserPublicKey } from '../../contexts/identityProvider' +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useModal } from '../../contexts/modalProvider' +import { Contact } from '../../models/Contact' +import { buttonStyles } from '../Buttons/buttonStyle' +import { LogoutIcon } from '../Icons/LogoutIcon' +import { LogoutModalName } from '../Modals/LogoutModal' -import { Member } from "./Member"; +import { Member } from './Member' export function MembersList() { - const { contacts, nickname, activeChannel } = useMessengerContext(); - const userPK = useUserPublicKey(); - const { setModal } = useModal(LogoutModalName); + const { contacts, nickname, activeChannel } = useMessengerContext() + const userPK = useUserPublicKey() + const { setModal } = useModal(LogoutModalName) const members = useMemo(() => { - const contactsArray = Object.values(contacts); + const contactsArray = Object.values(contacts) if (userPK) { if ( activeChannel && - activeChannel.type === "group" && + activeChannel.type === 'group' && activeChannel.members ) { - const returnContacts: Contact[] = []; - activeChannel.members.forEach((member) => { + const returnContacts: Contact[] = [] + activeChannel.members.forEach(member => { if (contacts[member.id] && member.id != userPK) { - returnContacts.push(contacts[member.id]); + returnContacts.push(contacts[member.id]) } - }); - return returnContacts; + }) + return returnContacts } - return contactsArray.filter((e) => e.id !== userPK); + return contactsArray.filter(e => e.id !== userPK) } - return contactsArray; - }, [activeChannel, contacts, userPK]); + return contactsArray + }, [activeChannel, contacts, userPK]) - const onlineContacts = useMemo( - () => members.filter((e) => e.online), - [members] - ); + const onlineContacts = useMemo(() => members.filter(e => e.online), [members]) const offlineContacts = useMemo( - () => members.filter((e) => !e.online), + () => members.filter(e => !e.online), [members] - ); + ) return ( @@ -69,7 +66,7 @@ export function MembersList() { {onlineContacts.length > 0 && ( Online - {onlineContacts.map((contact) => ( + {onlineContacts.map(contact => ( 0 && ( Offline - {offlineContacts.map((contact) => ( + {offlineContacts.map(contact => ( )} - ); + ) } const MembersListWrap = styled.div` @@ -101,13 +98,13 @@ const MembersListWrap = styled.div` &::-webkit-scrollbar { width: 0; } -`; +` const MemberCategory = styled.div` display: flex; flex-direction: column; margin-bottom: 16px; -`; +` const MemberCategoryName = styled.h3` font-weight: normal; @@ -115,13 +112,13 @@ const MemberCategoryName = styled.h3` line-height: 18px; color: ${({ theme }) => theme.secondary}; margin-bottom: 8px; -`; +` const Row = styled.div` display: flex; align-items: center; justify-content: space-between; -`; +` const LogoutBtn = styled.button` ${buttonStyles} @@ -129,4 +126,4 @@ const LogoutBtn = styled.button` height: 32px; border-radius: 50%; padding: 0; -`; +` diff --git a/packages/status-react/src/components/Members/UserLogo.tsx b/packages/status-react/src/components/Members/UserLogo.tsx index 7698e121..f1c2f73a 100644 --- a/packages/status-react/src/components/Members/UserLogo.tsx +++ b/packages/status-react/src/components/Members/UserLogo.tsx @@ -1,15 +1,15 @@ -import React, { useMemo } from "react"; -import styled from "styled-components"; +import React, { useMemo } from 'react' +import styled from 'styled-components' -import { Contact } from "../../models/Contact"; +import { Contact } from '../../models/Contact' type UserLogoProps = { - radius: number; - colorWheel: [string, number][]; - contact?: Contact; - showOnlineStatus?: boolean; - icon?: string; -}; + radius: number + colorWheel: [string, number][] + contact?: Contact + showOnlineStatus?: boolean + icon?: string +} export function UserLogo({ icon, @@ -21,43 +21,43 @@ export function UserLogo({ const conicGradient = useMemo(() => { const colors = colorWheel .map((color, idx) => { - const prevDeg = idx === 0 ? "0deg" : `${colorWheel[idx - 1][1]}deg`; - return `${color[0]} ${prevDeg} ${color[1]}deg`; + const prevDeg = idx === 0 ? '0deg' : `${colorWheel[idx - 1][1]}deg` + return `${color[0]} ${prevDeg} ${color[1]}deg` }) - .join(","); - return `conic-gradient(${colors})`; - }, [colorWheel]); + .join(',') + return `conic-gradient(${colors})` + }, [colorWheel]) const letters = useMemo(() => { if (contact && contact?.customName) { - return contact.customName.slice(0, 2); + return contact.customName.slice(0, 2) } if (contact && contact.trueName) { - return contact.trueName.slice(0, 2); + return contact.trueName.slice(0, 2) } - }, [contact]); + }, [contact]) const logoClassnName = useMemo(() => { if (showOnlineStatus) { if (contact && contact.online) { - return "online"; + return 'online' } - return "offline"; + return 'offline' } - return ""; - }, [contact, showOnlineStatus]); + return '' + }, [contact, showOnlineStatus]) return ( {!icon && {letters}} - ); + ) } const TextWrapper = styled.div<{ radius: number }>` @@ -69,7 +69,7 @@ const TextWrapper = styled.div<{ radius: number }>` text-align: center; letter-spacing: -0.4px; color: ${({ theme }) => theme.iconTextColor}; -`; +` const Logo = styled.div<{ radius: number; icon?: string }>` width: calc(${({ radius }) => radius}px - 6px); @@ -89,7 +89,7 @@ const Logo = styled.div<{ radius: number; icon?: string }>` &.offline { &::after { - content: ""; + content: ''; position: absolute; right: -1px; bottom: -2px; @@ -103,7 +103,7 @@ const Logo = styled.div<{ radius: number; icon?: string }>` &.online { &::after { - content: ""; + content: ''; position: absolute; right: -1px; bottom: -2px; @@ -119,7 +119,7 @@ const Logo = styled.div<{ radius: number; icon?: string }>` background-color: ${({ theme }) => theme.bodyBackgroundColor}; background-image: none; } -`; +` export const Wrapper = styled.div<{ radius: number; conicGradient: string }>` width: ${({ radius }) => radius}px; @@ -129,4 +129,4 @@ export const Wrapper = styled.div<{ radius: number; conicGradient: string }>` justify-content: center; border-radius: 50%; background: ${({ conicGradient }) => conicGradient}; -`; +` diff --git a/packages/status-react/src/components/Messages/MessageQuote.tsx b/packages/status-react/src/components/Messages/MessageQuote.tsx index 34c976d7..99088977 100644 --- a/packages/status-react/src/components/Messages/MessageQuote.tsx +++ b/packages/status-react/src/components/Messages/MessageQuote.tsx @@ -1,47 +1,47 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useScrollToMessage } from "../../contexts/scrollProvider"; -import { ChatMessage } from "../../models/ChatMessage"; -import { ReplyOn, ReplyTo } from "../Chat/ChatInput"; -import { QuoteSvg } from "../Icons/QuoteIcon"; -import { UserIcon } from "../Icons/UserIcon"; +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useScrollToMessage } from '../../contexts/scrollProvider' +import { ChatMessage } from '../../models/ChatMessage' +import { ReplyOn, ReplyTo } from '../Chat/ChatInput' +import { QuoteSvg } from '../Icons/QuoteIcon' +import { UserIcon } from '../Icons/UserIcon' function calcHeight(quote: ChatMessage) { if (quote.image && quote.content) { - return 88; + return 88 } else if (quote.image && !quote.content) { - return 68; + return 68 } else { - return 25; + return 25 } } type MessageQuoteProps = { - quote: ChatMessage | undefined; -}; + quote: ChatMessage | undefined +} export function MessageQuote({ quote }: MessageQuoteProps) { - const { contacts } = useMessengerContext(); - const scroll = useScrollToMessage(); + const { contacts } = useMessengerContext() + const scroll = useScrollToMessage() if (quote && quote.sender) { return ( scroll(quote)}> - {" "} - {" "} + {' '} + {' '} {contacts[quote.sender]?.customName ?? contacts[quote.sender].trueName} {quote.content} {quote.image && } - ); + ) } - return null; + return null } const QuoteWrapper = styled.div` @@ -49,19 +49,19 @@ const QuoteWrapper = styled.div` flex-direction: column; padding-left: 48px; position: relative; -`; +` const QuoteSender = styled(ReplyTo)` color: ${({ theme }) => theme.secondary}; -`; +` const Quote = styled(ReplyOn)` color: ${({ theme }) => theme.secondary}; -`; +` const QuoteImage = styled.img` width: 56px; height: 56px; border-radius: 4px; margin-top: 4px; -`; +` diff --git a/packages/status-react/src/components/Messages/MessageReactions.tsx b/packages/status-react/src/components/Messages/MessageReactions.tsx index ce79b23a..5e53b284 100644 --- a/packages/status-react/src/components/Messages/MessageReactions.tsx +++ b/packages/status-react/src/components/Messages/MessageReactions.tsx @@ -1,12 +1,12 @@ -import { BaseEmoji, Emoji } from "emoji-mart"; -import React, { useCallback } from "react"; -import styled from "styled-components"; +import { BaseEmoji, Emoji } from 'emoji-mart' +import React, { useCallback } from 'react' +import styled from 'styled-components' -import { ReactionButton } from "../Reactions/ReactionButton"; +import { ReactionButton } from '../Reactions/ReactionButton' interface MessageReactionsProps { - messageReactions: BaseEmoji[]; - setMessageReactions: React.Dispatch>; + messageReactions: BaseEmoji[] + setMessageReactions: React.Dispatch> } export function MessageReactions({ @@ -14,26 +14,26 @@ export function MessageReactions({ setMessageReactions, }: MessageReactionsProps) { const isMyReactionIncluded = (emoji: BaseEmoji) => - messageReactions.includes(emoji); // temporary function while message reactions are not added to waku + messageReactions.includes(emoji) // temporary function while message reactions are not added to waku const handleReaction = useCallback( (emoji: BaseEmoji) => { - messageReactions.find((e) => e === emoji) - ? setMessageReactions((prev) => prev.filter((e) => e != emoji)) - : setMessageReactions((prev) => [...prev, emoji]); + messageReactions.find(e => e === emoji) + ? setMessageReactions(prev => prev.filter(e => e != emoji)) + : setMessageReactions(prev => [...prev, emoji]) }, [messageReactions, setMessageReactions] - ); + ) return ( - {messageReactions.map((reaction) => ( + {messageReactions.map(reaction => ( handleReaction(reaction)} > - +

1

))} @@ -43,14 +43,14 @@ export function MessageReactions({ className="small" />
- ); + ) } export const Reactions = styled.div` display: flex; align-items: center; margin-top: 6px; -`; +` const EmojiReaction = styled.button` display: flex; @@ -80,4 +80,4 @@ const EmojiReaction = styled.button` border: 1px solid ${({ theme }) => theme.tertiary}; color: ${({ theme }) => theme.tertiary}; } -`; +` diff --git a/packages/status-react/src/components/Messages/MessagesList.tsx b/packages/status-react/src/components/Messages/MessagesList.tsx index 73a897ef..4d8c77b5 100644 --- a/packages/status-react/src/components/Messages/MessagesList.tsx +++ b/packages/status-react/src/components/Messages/MessagesList.tsx @@ -1,63 +1,61 @@ -import React, { useEffect, useMemo, useRef, useState } from "react"; -import styled from "styled-components"; +import React, { useEffect, useMemo, useRef, useState } from 'react' +import styled from 'styled-components' -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useModal } from "../../contexts/modalProvider"; -import { useNarrow } from "../../contexts/narrowProvider"; -import { useChatScrollHandle } from "../../hooks/useChatScrollHandle"; -import { Reply } from "../../hooks/useReply"; -import { ChannelData } from "../../models/ChannelData"; -import { EmptyChannel } from "../Channels/EmptyChannel"; -import { LoadingIcon } from "../Icons/LoadingIcon"; -import { LinkModal, LinkModalName } from "../Modals/LinkModal"; -import { PictureModal, PictureModalName } from "../Modals/PictureModal"; +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useModal } from '../../contexts/modalProvider' +import { useNarrow } from '../../contexts/narrowProvider' +import { useChatScrollHandle } from '../../hooks/useChatScrollHandle' +import { Reply } from '../../hooks/useReply' +import { ChannelData } from '../../models/ChannelData' +import { EmptyChannel } from '../Channels/EmptyChannel' +import { LoadingIcon } from '../Icons/LoadingIcon' +import { LinkModal, LinkModalName } from '../Modals/LinkModal' +import { PictureModal, PictureModalName } from '../Modals/PictureModal' -import { UiMessage } from "./UiMessage"; +import { UiMessage } from './UiMessage' interface MessagesListProps { - setReply: (val: Reply | undefined) => void; - channel: ChannelData; + setReply: (val: Reply | undefined) => void + channel: ChannelData } export function MessagesList({ setReply, channel }: MessagesListProps) { - const narrow = useNarrow(); - const { messages, contacts } = useMessengerContext(); - const ref = useRef(null); - const loadingMessages = useChatScrollHandle(messages, ref); + const narrow = useNarrow() + const { messages, contacts } = useMessengerContext() + const ref = useRef(null) + const loadingMessages = useChatScrollHandle(messages, ref) const shownMessages = useMemo( () => - messages.filter( - (message) => !contacts?.[message.sender]?.blocked ?? true - ), + messages.filter(message => !contacts?.[message.sender]?.blocked ?? true), [contacts, messages] - ); + ) - const [image, setImage] = useState(""); - const [link, setLink] = useState(""); + const [image, setImage] = useState('') + const [link, setLink] = useState('') const { setModal: setPictureModal, isVisible: showPictureModal } = - useModal(PictureModalName); + useModal(PictureModalName) const { setModal: setLinkModal, isVisible: showLinkModal } = - useModal(LinkModalName); + useModal(LinkModalName) useEffect( () => (!image ? undefined : setPictureModal(true)), [image, setPictureModal] - ); + ) useEffect( () => (!link ? undefined : setLinkModal(true)), [link, setLinkModal] - ); + ) useEffect( - () => (!showPictureModal ? setImage("") : undefined), + () => (!showPictureModal ? setImage('') : undefined), [showPictureModal] - ); - useEffect(() => (!showLinkModal ? setLink("") : undefined), [showLinkModal]); + ) + useEffect(() => (!showLinkModal ? setLink('') : undefined), [showLinkModal]) return ( - + @@ -78,7 +76,7 @@ export function MessagesList({ setReply, channel }: MessagesListProps) { /> ))} - ); + ) } const LoadingWrapper = styled.div` @@ -88,7 +86,7 @@ const LoadingWrapper = styled.div` justify-content: center; background: ${({ theme }) => theme.bodyBackgroundColor}; position: relative; -`; +` const MessagesWrapper = styled.div` display: flex; @@ -104,4 +102,4 @@ const MessagesWrapper = styled.div` &::-webkit-scrollbar { width: 0; } -`; +` diff --git a/packages/status-react/src/components/Messages/Styles.tsx b/packages/status-react/src/components/Messages/Styles.tsx index 26f84d9b..9dd48384 100644 --- a/packages/status-react/src/components/Messages/Styles.tsx +++ b/packages/status-react/src/components/Messages/Styles.tsx @@ -1,6 +1,6 @@ -import styled from "styled-components"; +import styled from 'styled-components' -import { textMediumStyles, textSmallStyles } from "../Text"; +import { textMediumStyles, textSmallStyles } from '../Text' export const MessageWrapper = styled.div` width: 100%; @@ -28,14 +28,14 @@ export const MessageWrapper = styled.div` background: ${({ theme }) => theme.mentionBgHover}; border-color: ${({ theme }) => theme.mentionColor}; } -`; +` export const MessageOuterWrapper = styled.div` width: 100%; display: flex; flex-direction: column; position: relative; -`; +` export const DateSeparator = styled.div` width: 100%; @@ -45,7 +45,7 @@ export const DateSeparator = styled.div` text-align: center; justify-content: center; align-items: center; - font-family: "Inter"; + font-family: 'Inter'; font-style: normal; font-weight: 500; color: #939ba1; @@ -53,23 +53,23 @@ export const DateSeparator = styled.div` margin-bottom: 16px; ${textSmallStyles} -`; +` export const ContentWrapper = styled.div` display: flex; flex-direction: column; margin-left: 8px; -`; +` export const MessageHeaderWrapper = styled.div` display: flex; align-items: center; -`; +` export const UserNameWrapper = styled.div` display: flex; align-items: center; -`; +` export const UserName = styled.p` font-weight: 500; @@ -77,7 +77,7 @@ export const UserName = styled.p` margin-right: 4px; ${textMediumStyles} -`; +` export const UserNameBtn = styled.button` padding: 0; @@ -94,7 +94,7 @@ export const UserNameBtn = styled.button` cursor: default; text-decoration: none; } -`; +` export const UserAddress = styled.p` font-size: 10px; @@ -105,7 +105,7 @@ export const UserAddress = styled.p` padding-right: 8px; &.chat:after { - content: ""; + content: ''; position: absolute; right: 0; top: 50%; @@ -115,7 +115,7 @@ export const UserAddress = styled.p` border-radius: 50%; background: ${({ theme }) => theme.secondary}; } -`; +` export const TimeWrapper = styled.div` font-size: 10px; @@ -124,14 +124,14 @@ export const TimeWrapper = styled.div` text-transform: uppercase; color: ${({ theme }) => theme.secondary}; margin-left: 4px; -`; +` export const MessageText = styled.div` overflow-wrap: anywhere; width: 100%; white-space: pre-wrap; color: ${({ theme }) => theme.primary}; -`; +` export const IconBtn = styled.button` width: 40px; @@ -153,4 +153,4 @@ export const IconBtn = styled.button` &:disabled { cursor: default; } -`; +` diff --git a/packages/status-react/src/components/Messages/UiMessage.tsx b/packages/status-react/src/components/Messages/UiMessage.tsx index d5748941..1e79c778 100644 --- a/packages/status-react/src/components/Messages/UiMessage.tsx +++ b/packages/status-react/src/components/Messages/UiMessage.tsx @@ -1,22 +1,22 @@ -import { BaseEmoji } from "emoji-mart"; -import React, { useMemo, useRef, useState } from "react"; -import styled from "styled-components"; +import { BaseEmoji } from 'emoji-mart' +import React, { useMemo, useRef, useState } from 'react' +import styled from 'styled-components' -import { useIdentity } from "../../contexts/identityProvider"; -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useClickOutside } from "../../hooks/useClickOutside"; -import { Reply } from "../../hooks/useReply"; -import { ChatMessage } from "../../models/ChatMessage"; -import { equalDate } from "../../utils"; -import { ChatMessageContent } from "../Chat/ChatMessageContent"; -import { ContactMenu } from "../Form/ContactMenu"; -import { MessageMenu } from "../Form/MessageMenu"; -import { UntrustworthIcon } from "../Icons/UntrustworthIcon"; -import { UserLogo } from "../Members/UserLogo"; -import { Reactions } from "../Reactions/Reactions"; +import { useIdentity } from '../../contexts/identityProvider' +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useClickOutside } from '../../hooks/useClickOutside' +import { Reply } from '../../hooks/useReply' +import { ChatMessage } from '../../models/ChatMessage' +import { equalDate } from '../../utils' +import { ChatMessageContent } from '../Chat/ChatMessageContent' +import { ContactMenu } from '../Form/ContactMenu' +import { MessageMenu } from '../Form/MessageMenu' +import { UntrustworthIcon } from '../Icons/UntrustworthIcon' +import { UserLogo } from '../Members/UserLogo' +import { Reactions } from '../Reactions/Reactions' -import { MessageQuote } from "./MessageQuote"; -import { MessageReactions } from "./MessageReactions"; +import { MessageQuote } from './MessageQuote' +import { MessageReactions } from './MessageReactions' import { ContentWrapper, DateSeparator, @@ -30,16 +30,16 @@ import { UserName, UserNameBtn, UserNameWrapper, -} from "./Styles"; +} from './Styles' type UiMessageProps = { - idx: number; - message: ChatMessage; - prevMessage: ChatMessage; - setImage: (img: string) => void; - setLink: (link: string) => void; - setReply: (val: Reply | undefined) => void; -}; + idx: number + message: ChatMessage + prevMessage: ChatMessage + setImage: (img: string) => void + setLink: (link: string) => void + setReply: (val: Reply | undefined) => void +} export function UiMessage({ message, @@ -49,39 +49,39 @@ export function UiMessage({ setLink, setReply, }: UiMessageProps) { - const today = new Date(); - const { contacts } = useMessengerContext(); - const identity = useIdentity(); + const today = new Date() + const { contacts } = useMessengerContext() + const identity = useIdentity() const contact = useMemo( () => contacts[message.sender], [message.sender, contacts] - ); - const [showMenu, setShowMenu] = useState(false); + ) + const [showMenu, setShowMenu] = useState(false) - const [mentioned, setMentioned] = useState(false); - const [messageReactions, setMessageReactions] = useState([]); + const [mentioned, setMentioned] = useState(false) + const [messageReactions, setMessageReactions] = useState([]) - const ref = useRef(null); - useClickOutside(ref, () => setShowMenu(false)); + const ref = useRef(null) + useClickOutside(ref, () => setShowMenu(false)) - const messageRef = useRef(null); + const messageRef = useRef(null) return ( {(idx === 0 || !equalDate(prevMessage.date, message.date)) && ( {equalDate(message.date, today) - ? "Today" + ? 'Today' : message.date.toLocaleDateString()} )} - + { - if (identity) setShowMenu((e) => !e); + if (identity) setShowMenu(e => !e) }} disabled={!identity} ref={ref} @@ -93,9 +93,9 @@ export function UiMessage({ contact={contact} radius={40} colorWheel={[ - ["red", 150], - ["blue", 250], - ["green", 360], + ['red', 150], + ['blue', 250], + ['green', 360], ]} /> @@ -104,12 +104,12 @@ export function UiMessage({ { - if (identity) setShowMenu((e) => !e); + if (identity) setShowMenu(e => !e) }} disabled={!identity} > - {" "} + {' '} {contact?.customName ?? contact.trueName} @@ -153,11 +153,11 @@ export function UiMessage({ )} - ); + ) } const UserMessageWrapper = styled.div` width: 100%; display: flex; position: relative; -`; +` diff --git a/packages/status-react/src/components/Modals/AgreementModal.tsx b/packages/status-react/src/components/Modals/AgreementModal.tsx index a542d451..a4ebcd39 100644 --- a/packages/status-react/src/components/Modals/AgreementModal.tsx +++ b/packages/status-react/src/components/Modals/AgreementModal.tsx @@ -1,25 +1,25 @@ -import HCaptcha from "@hcaptcha/react-hcaptcha"; -import React, { useState } from "react"; -import styled, { useTheme } from "styled-components"; +import HCaptcha from '@hcaptcha/react-hcaptcha' +import React, { useState } from 'react' +import styled, { useTheme } from 'styled-components' -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useModal } from "../../contexts/modalProvider"; -import { lightTheme, Theme } from "../../styles/themes"; -import { Logo } from "../CommunityIdentity"; -import { textMediumStyles } from "../Text"; +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useModal } from '../../contexts/modalProvider' +import { lightTheme, Theme } from '../../styles/themes' +import { Logo } from '../CommunityIdentity' +import { textMediumStyles } from '../Text' -import { Modal } from "./Modal"; -import { Btn, ButtonSection, Heading, Section, Text } from "./ModalStyle"; +import { Modal } from './Modal' +import { Btn, ButtonSection, Heading, Section, Text } from './ModalStyle' -export const AgreementModalName = "AgreementModal"; +export const AgreementModalName = 'AgreementModal' export function AgreementModal() { - const theme = useTheme() as Theme; - const { communityData } = useMessengerContext(); - const { setModal } = useModal(AgreementModalName); + const theme = useTheme() as Theme + const { communityData } = useMessengerContext() + const { setModal } = useModal(AgreementModalName) - const [checked, setChecked] = useState(false); - const [token, setToken] = useState(""); + const [checked, setChecked] = useState(false) + const [token, setToken] = useState('') return ( @@ -32,10 +32,10 @@ export function AgreementModal() { style={{ backgroundImage: communityData?.icon ? `url(${communityData?.icon}` - : "", + : '', }} > - {" "} + {' '} {communityData?.icon === undefined && communityData?.name.slice(0, 1).toUpperCase()} @@ -50,7 +50,7 @@ export function AgreementModal() { name="agreement" value="user agreement" checked={checked} - onChange={(e) => setChecked(e.target.checked)} + onChange={e => setChecked(e.target.checked)} required /> I agree with the above @@ -59,7 +59,7 @@ export function AgreementModal() {
@@ -68,7 +68,7 @@ export function AgreementModal() { { - setModal(false); + setModal(false) }} disabled={!token || !checked} > @@ -76,29 +76,29 @@ export function AgreementModal() {
- ); + ) } const LogoWrapper = styled.div` display: flex; justify-content: center; margin-bottom: 24px; -`; +` const CommunityLogo = styled(Logo)` width: 64px; height: 64px; -`; +` const AgreementSection = styled.div` margin-bottom: 24px; -`; +` const Agreements = styled.div` display: flex; justify-content: center; align-items: center; -`; +` const Agreement = styled.label` display: flex; @@ -119,14 +119,14 @@ const Agreement = styled.label` & input:checked ~ span:after { display: block; } -`; +` const AgreementInput = styled.input` position: absolute; opacity: 0; height: 0; width: 0; -`; +` const Checkmark = styled.span` position: absolute; @@ -141,7 +141,7 @@ const Checkmark = styled.span` margin: 0 8px 0 0; &:after { - content: ""; + content: ''; position: absolute; display: none; @@ -153,4 +153,4 @@ const Checkmark = styled.span` border-width: 0 2px 2px 0; transform: rotate(45deg); } -`; +` diff --git a/packages/status-react/src/components/Modals/CoinbaseModal.tsx b/packages/status-react/src/components/Modals/CoinbaseModal.tsx index 787f96f0..3b880ace 100644 --- a/packages/status-react/src/components/Modals/CoinbaseModal.tsx +++ b/packages/status-react/src/components/Modals/CoinbaseModal.tsx @@ -1,9 +1,9 @@ -import React from "react"; +import React from 'react' -import { ConnectModal } from "./ConnectModal"; -import { Modal } from "./Modal"; +import { ConnectModal } from './ConnectModal' +import { Modal } from './Modal' -export const CoinbaseModalName = "CoinbaseModal"; +export const CoinbaseModalName = 'CoinbaseModal' export function CoinbaseModal() { return ( @@ -14,5 +14,5 @@ export function CoinbaseModal() { address="https://www.coinbase.com/wallet" /> - ); + ) } diff --git a/packages/status-react/src/components/Modals/CommunityModal.tsx b/packages/status-react/src/components/Modals/CommunityModal.tsx index c739f005..aa89a959 100644 --- a/packages/status-react/src/components/Modals/CommunityModal.tsx +++ b/packages/status-react/src/components/Modals/CommunityModal.tsx @@ -1,27 +1,24 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useNarrow } from "../../contexts/narrowProvider"; -import { DownloadButton } from "../Buttons/DownloadButton"; -import { - CommunityIdentity, - CommunityIdentityProps, -} from "../CommunityIdentity"; -import { CopyInput } from "../Form/CopyInput"; -import { StatusLogo } from "../Icons/StatusLogo"; -import { textSmallStyles } from "../Text"; +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useNarrow } from '../../contexts/narrowProvider' +import { DownloadButton } from '../Buttons/DownloadButton' +import { CommunityIdentity, CommunityIdentityProps } from '../CommunityIdentity' +import { CopyInput } from '../Form/CopyInput' +import { StatusLogo } from '../Icons/StatusLogo' +import { textSmallStyles } from '../Text' -import { Modal } from "./Modal"; -import { Section, Text } from "./ModalStyle"; +import { Modal } from './Modal' +import { Section, Text } from './ModalStyle' -export const CommunityModalName = "CommunityModal"; +export const CommunityModalName = 'CommunityModal' -type CommunityModalProps = CommunityIdentityProps; +type CommunityModalProps = CommunityIdentityProps export const CommunityModal = ({ subtitle }: CommunityModalProps) => { - const narrow = useNarrow(); - const { communityData } = useMessengerContext(); + const narrow = useNarrow() + const { communityData } = useMessengerContext() return (
@@ -32,7 +29,7 @@ export const CommunityModal = ({ subtitle }: CommunityModalProps) => {
@@ -48,14 +45,14 @@ export const CommunityModal = ({ subtitle }: CommunityModalProps) => { )} - ); -}; + ) +} const BottomSection = styled(Section)` display: flex; flex-direction: column; align-items: center; -`; +` const StyledDownloadButton = styled(DownloadButton)` display: inline; @@ -66,11 +63,11 @@ const StyledDownloadButton = styled(DownloadButton)` line-height: 18px; text-decoration: underline; color: ${({ theme }) => theme.secondary}; -`; +` const Hint = styled.p` margin-top: 16px; color: ${({ theme }) => theme.secondary}; ${textSmallStyles} -`; +` diff --git a/packages/status-react/src/components/Modals/ConnectModal.tsx b/packages/status-react/src/components/Modals/ConnectModal.tsx index cbacd2e5..61acdd0d 100644 --- a/packages/status-react/src/components/Modals/ConnectModal.tsx +++ b/packages/status-react/src/components/Modals/ConnectModal.tsx @@ -1,16 +1,16 @@ -import QRCode from "qrcode.react"; -import React from "react"; +import QRCode from 'qrcode.react' +import React from 'react' -import { CopyInput } from "../Form/CopyInput"; +import { CopyInput } from '../Form/CopyInput' -import { Heading, MiddleSection, QRWrapper, Section, Text } from "./ModalStyle"; +import { Heading, MiddleSection, QRWrapper, Section, Text } from './ModalStyle' -export const ConnectModalName = "ConnectModal"; +export const ConnectModalName = 'ConnectModal' interface ConnectModalProps { - name: string; - address: string; - text: string; + name: string + address: string + text: string } export function ConnectModal({ name, address, text }: ConnectModalProps) { @@ -22,11 +22,11 @@ export function ConnectModal({ name, address, text }: ConnectModalProps) { {text} - {" "} + {' '} - ); + ) } diff --git a/packages/status-react/src/components/Modals/EditModal.tsx b/packages/status-react/src/components/Modals/EditModal.tsx index e6b24df5..799246b6 100644 --- a/packages/status-react/src/components/Modals/EditModal.tsx +++ b/packages/status-react/src/components/Modals/EditModal.tsx @@ -1,51 +1,45 @@ -import React, { useState } from "react"; -import styled from "styled-components"; +import React, { useState } from 'react' +import styled from 'styled-components' -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useModal } from "../../contexts/modalProvider"; -import { buttonStyles } from "../Buttons/buttonStyle"; -import { ChannelLogo } from "../Channels/ChannelIcon"; -import { inputStyles } from "../Form/inputStyles"; -import { AddIcon } from "../Icons/AddIcon"; -import { textMediumStyles } from "../Text"; +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useModal } from '../../contexts/modalProvider' +import { buttonStyles } from '../Buttons/buttonStyle' +import { ChannelLogo } from '../Channels/ChannelIcon' +import { inputStyles } from '../Form/inputStyles' +import { AddIcon } from '../Icons/AddIcon' +import { textMediumStyles } from '../Text' -import { Modal } from "./Modal"; -import { - AddWrapper, - ButtonSection, - Heading, - Hint, - Section, -} from "./ModalStyle"; +import { Modal } from './Modal' +import { AddWrapper, ButtonSection, Heading, Hint, Section } from './ModalStyle' -export const EditModalName = "editModal"; +export const EditModalName = 'editModal' export const EditModal = () => { - const { activeChannel, changeGroupChatName } = useMessengerContext(); - const { setModal } = useModal(EditModalName); + const { activeChannel, changeGroupChatName } = useMessengerContext() + const { setModal } = useModal(EditModalName) - const [groupName, setGroupName] = useState(""); - const [image, setImage] = useState(""); + const [groupName, setGroupName] = useState('') + const [image, setImage] = useState('') const handleChange = (e: React.FormEvent) => { if (e.currentTarget?.files?.length) { - setImage(URL.createObjectURL(e.currentTarget.files[0])); + setImage(URL.createObjectURL(e.currentTarget.files[0])) } - }; + } const handleUpload = () => { if (activeChannel) { if (image) { - activeChannel.icon = image; // Need function to send image to waku - setImage(""); + activeChannel.icon = image // Need function to send image to waku + setImage('') } if (groupName) { - changeGroupChatName(groupName, activeChannel.id); - setGroupName(""); + changeGroupChatName(groupName, activeChannel.id) + setGroupName('') } - setModal(false); + setModal(false) } - }; + } return ( @@ -65,7 +59,7 @@ export const EditModal = () => { type="text" placeholder="A catchy name" maxLength={30} - onInput={(e) => setGroupName(e.currentTarget.value)} + onInput={e => setGroupName(e.currentTarget.value)} /> @@ -90,40 +84,40 @@ export const EditModal = () => { Save changes - ); -}; + ) +} const NameSection = styled.div` display: flex; flex-direction: column; margin-bottom: 16px; -`; +` const LabelGroup = styled.div` display: flex; justify-content: space-between; align-items: center; -`; +` const Label = styled.p` color: ${({ theme }) => theme.primary}; padding: 10px 0; ${textMediumStyles} -`; +` const NameInput = styled.input` padding: 14px 70px 14px 8px; ${inputStyles} -`; +` const LogoSection = styled.div` display: flex; flex-direction: column; justify-content: center; margin-bottom: 8px; -`; +` const GroupLogo = styled(ChannelLogo)` width: 128px; @@ -133,18 +127,18 @@ const GroupLogo = styled(ChannelLogo)` position: relative; align-self: center; margin-right: 0; -`; +` const LogoPreview = styled.img` width: 128px; height: 128px; border-radius: 50%; -`; +` const AddPictureInputWrapper = styled(AddWrapper)` top: 0; right: 8px; -`; +` const AddPictureInput = styled.input` position: absolute; @@ -155,10 +149,10 @@ const AddPictureInput = styled.input` opacity: 0; z-index: 2; cursor: pointer; -`; +` const SaveBtn = styled.button` padding: 11px 24px; ${buttonStyles} -`; +` diff --git a/packages/status-react/src/components/Modals/LeavingModal.tsx b/packages/status-react/src/components/Modals/LeavingModal.tsx index 16a02c12..fc49ff34 100644 --- a/packages/status-react/src/components/Modals/LeavingModal.tsx +++ b/packages/status-react/src/components/Modals/LeavingModal.tsx @@ -1,48 +1,48 @@ -import React from "react"; +import React from 'react' -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useModal } from "../../contexts/modalProvider"; -import { ButtonNo } from "../Buttons/buttonStyle"; +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useModal } from '../../contexts/modalProvider' +import { ButtonNo } from '../Buttons/buttonStyle' -import { Modal } from "./Modal"; -import { ButtonSection, Heading, Section, Text } from "./ModalStyle"; +import { Modal } from './Modal' +import { ButtonSection, Heading, Section, Text } from './ModalStyle' -export const LeavingModalName = "LeavingModal"; +export const LeavingModalName = 'LeavingModal' export const LeavingModal = () => { - const { setModal } = useModal(LeavingModalName); - const { activeChannel, removeChannel } = useMessengerContext(); + const { setModal } = useModal(LeavingModalName) + const { activeChannel, removeChannel } = useMessengerContext() if (activeChannel) return (
- {activeChannel.type === "dm" ? "Delete chat" : "Leave group"} + {activeChannel.type === 'dm' ? 'Delete chat' : 'Leave group'}
- Are you sure you want to{" "} - {activeChannel.type === "dm" - ? "delete this chat" - : "leave this group"} + Are you sure you want to{' '} + {activeChannel.type === 'dm' + ? 'delete this chat' + : 'leave this group'} ?
{ - removeChannel(activeChannel.id); - setModal(false); + removeChannel(activeChannel.id) + setModal(false) }} > - {activeChannel.type === "dm" ? "Delete" : "Leave"} + {activeChannel.type === 'dm' ? 'Delete' : 'Leave'}
- ); + ) else { - return null; + return null } -}; +} diff --git a/packages/status-react/src/components/Modals/LinkModal.tsx b/packages/status-react/src/components/Modals/LinkModal.tsx index 6c260bc8..3df0547a 100644 --- a/packages/status-react/src/components/Modals/LinkModal.tsx +++ b/packages/status-react/src/components/Modals/LinkModal.tsx @@ -1,21 +1,21 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' -import { useModal } from "../../contexts/modalProvider"; -import { ButtonNo, ButtonYes } from "../Buttons/buttonStyle"; -import { textMediumStyles } from "../Text"; +import { useModal } from '../../contexts/modalProvider' +import { ButtonNo, ButtonYes } from '../Buttons/buttonStyle' +import { textMediumStyles } from '../Text' -import { Modal } from "./Modal"; -import { ButtonSection, Heading, Section } from "./ModalStyle"; +import { Modal } from './Modal' +import { ButtonSection, Heading, Section } from './ModalStyle' -export const LinkModalName = "LinkModal"; +export const LinkModalName = 'LinkModal' interface LinkModalProps { - link: string; + link: string } export const LinkModal = ({ link }: LinkModalProps) => { - const { setModal } = useModal(LinkModalName); + const { setModal } = useModal(LinkModalName) return (
@@ -28,16 +28,16 @@ export const LinkModal = ({ link }: LinkModalProps) => { setModal(false)}>No { - window?.open(link, "_blank", "noopener")?.focus(); - setModal(false); + window?.open(link, '_blank', 'noopener')?.focus() + setModal(false) }} > Yes, take me there - ); -}; + ) +} const Link = styled.a` text-decoration: none; @@ -45,4 +45,4 @@ const Link = styled.a` color: ${({ theme }) => theme.primary}; ${textMediumStyles} -`; +` diff --git a/packages/status-react/src/components/Modals/LogoutModal.tsx b/packages/status-react/src/components/Modals/LogoutModal.tsx index 4e0bcf99..89bc15fc 100644 --- a/packages/status-react/src/components/Modals/LogoutModal.tsx +++ b/packages/status-react/src/components/Modals/LogoutModal.tsx @@ -1,34 +1,34 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' import { useSetIdentity, useSetNikcname, useUserPublicKey, -} from "../../contexts/identityProvider"; -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useModal } from "../../contexts/modalProvider"; -import { ButtonNo, ButtonYes } from "../Buttons/buttonStyle"; -import { UserLogo } from "../Members/UserLogo"; +} from '../../contexts/identityProvider' +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useModal } from '../../contexts/modalProvider' +import { ButtonNo, ButtonYes } from '../Buttons/buttonStyle' +import { UserLogo } from '../Members/UserLogo' -import { Modal } from "./Modal"; -import { ButtonSection, Heading, Section, Text } from "./ModalStyle"; +import { Modal } from './Modal' +import { ButtonSection, Heading, Section, Text } from './ModalStyle' import { EmojiKey, UserAddress, UserAddressWrapper, UserName, UserNameWrapper, -} from "./ProfileModal"; +} from './ProfileModal' -export const LogoutModalName = "LogoutModal"; +export const LogoutModalName = 'LogoutModal' export const LogoutModal = () => { - const { setModal } = useModal(LogoutModalName); - const logout = useSetIdentity(); - const setNickname = useSetNikcname(); - const userPK = useUserPublicKey(); - const { nickname } = useMessengerContext(); + const { setModal } = useModal(LogoutModalName) + const logout = useSetIdentity() + const setNickname = useSetNikcname() + const userPK = useUserPublicKey() + const { nickname } = useMessengerContext() if (userPK) { return ( @@ -47,21 +47,21 @@ export const LogoutModal = () => { }} radius={80} colorWheel={[ - ["red", 150], - ["blue", 250], - ["green", 360], + ['red', 150], + ['blue', 250], + ['green', 360], ]} /> - {" "} + {' '} {nickname} - {" "} + {' '} Chatkey: {userPK.slice(0, 10)}... - {userPK.slice(-3)}{" "} + {userPK.slice(-3)}{' '} 🎩🍞🥑🦍🌈📡💅🏻♣️🔔⛸👵🅱 @@ -70,31 +70,31 @@ export const LogoutModal = () => { { - setModal(false); - logout(undefined); - setNickname(undefined); + setModal(false) + logout(undefined) + setNickname(undefined) }} > Disconnect { - setModal(false); + setModal(false) }} > Stay Connected - ); + ) } - return null; -}; + return null +} const UserSection = styled.div` display: flex; flex-direction: column; align-items: center; margin: 8px 0; -`; +` diff --git a/packages/status-react/src/components/Modals/Modal.tsx b/packages/status-react/src/components/Modals/Modal.tsx index e86d07f4..40babd29 100644 --- a/packages/status-react/src/components/Modals/Modal.tsx +++ b/packages/status-react/src/components/Modals/Modal.tsx @@ -1,43 +1,43 @@ -import React, { ReactNode, useCallback, useEffect } from "react"; -import { createPortal } from "react-dom"; -import styled from "styled-components"; +import React, { ReactNode, useCallback, useEffect } from 'react' +import { createPortal } from 'react-dom' +import styled from 'styled-components' -import { useModal } from "../../contexts/modalProvider"; -import { CrossIcon } from "../Icons/CrossIcon"; +import { useModal } from '../../contexts/modalProvider' +import { CrossIcon } from '../Icons/CrossIcon' export interface BasicModalProps { - name: string; - className?: string; + name: string + className?: string } export interface ModalProps extends BasicModalProps { - children: ReactNode; + children: ReactNode } export const Modal = ({ name, children, className }: ModalProps) => { - const { isVisible, setModal } = useModal(name); + const { isVisible, setModal } = useModal(name) const listenKeyboard = useCallback( (event: KeyboardEvent) => { - if (event.key === "Escape" || event.keyCode === 27) { - setModal(false); + if (event.key === 'Escape' || event.keyCode === 27) { + setModal(false) } }, [setModal] - ); + ) useEffect(() => { if (isVisible) { - window.addEventListener("keydown", listenKeyboard, true); + window.addEventListener('keydown', listenKeyboard, true) return () => { - window.removeEventListener("keydown", listenKeyboard, true); - }; + window.removeEventListener('keydown', listenKeyboard, true) + } } - }, [isVisible, listenKeyboard]); + }, [isVisible, listenKeyboard]) - if (!isVisible) return null; + if (!isVisible) return null - const element = document.getElementById("modal-root"); + const element = document.getElementById('modal-root') if (element) { return createPortal( @@ -51,10 +51,10 @@ export const Modal = ({ name, children, className }: ModalProps) => { , element - ); + ) } - return null; -}; + return null +} const ModalView = styled.div` position: fixed; @@ -65,7 +65,7 @@ const ModalView = styled.div` width: 100%; height: 100%; z-index: 9999; -`; +` const ModalBody = styled.div` position: absolute; @@ -86,7 +86,7 @@ const ModalBody = styled.div` &.wide { max-width: 640px; } -`; +` const ModalOverlay = styled.div` position: fixed; @@ -98,7 +98,7 @@ const ModalOverlay = styled.div` height: 100%; background: ${({ theme }) => theme.primary}; opacity: 0.4; -`; +` const CloseButton = styled.button` position: absolute; @@ -109,4 +109,4 @@ const CloseButton = styled.button` &.picture { display: none; } -`; +` diff --git a/packages/status-react/src/components/Modals/ModalStyle.tsx b/packages/status-react/src/components/Modals/ModalStyle.tsx index 690808ef..f28c6e12 100644 --- a/packages/status-react/src/components/Modals/ModalStyle.tsx +++ b/packages/status-react/src/components/Modals/ModalStyle.tsx @@ -1,7 +1,7 @@ -import styled from "styled-components"; +import styled from 'styled-components' -import { buttonStyles } from "../Buttons/buttonStyle"; -import { textMediumStyles } from "../Text"; +import { buttonStyles } from '../Buttons/buttonStyle' +import { textMediumStyles } from '../Text' export const Section = styled.div` padding: 16px; @@ -9,26 +9,26 @@ export const Section = styled.div` & + & { border-top: 1px solid ${({ theme }) => theme.border}; } -`; +` export const MiddleSection = styled(Section)` display: flex; flex-direction: column; align-items: center; -`; +` export const Heading = styled.p` color: ${({ theme }) => theme.primary}; font-weight: bold; font-size: 17px; line-height: 24px; -`; +` export const Text = styled.p` color: ${({ theme }) => theme.primary}; ${textMediumStyles} -`; +` export const Btn = styled.button` padding: 11px 24px; @@ -39,7 +39,7 @@ export const Btn = styled.button` background: ${({ theme }) => theme.border}; color: ${({ theme }) => theme.secondary}; } -`; +` export const BackBtn = styled(Btn)` position: absolute; @@ -54,20 +54,20 @@ export const BackBtn = styled(Btn)` & > svg { fill: ${({ theme }) => theme.tertiary}; } -`; +` export const ButtonSection = styled(Section)` display: flex; justify-content: flex-end; align-items: center; position: relative; -`; +` export const Hint = styled.p` color: ${({ theme }) => theme.secondary}; font-size: 12px; line-height: 16px; -`; +` export const AddWrapper = styled.div` display: flex; @@ -78,8 +78,8 @@ export const AddWrapper = styled.div` height: 40px; background: ${({ theme }) => theme.tertiary}; border-radius: 50%; -`; +` export const QRWrapper = styled.div` margin: 30px 0; -`; +` diff --git a/packages/status-react/src/components/Modals/PictureModal.tsx b/packages/status-react/src/components/Modals/PictureModal.tsx index 6e863fe1..675b1d17 100644 --- a/packages/status-react/src/components/Modals/PictureModal.tsx +++ b/packages/status-react/src/components/Modals/PictureModal.tsx @@ -1,12 +1,12 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' -import { Modal } from "./Modal"; +import { Modal } from './Modal' -export const PictureModalName = "PictureModal" as const; +export const PictureModalName = 'PictureModal' as const export interface PictureModalProps { - image: string; + image: string } export const PictureModal = ({ image }: PictureModalProps) => { @@ -16,16 +16,16 @@ export const PictureModal = ({ image }: PictureModalProps) => { - ); -}; + ) +} const ModalImageWrapper = styled.div` display: flex; max-width: 820px; max-height: 820px; -`; +` const ModalImage = styled.img` width: 100%; height: 100%; -`; +` diff --git a/packages/status-react/src/components/Modals/ProfileFoundModal.tsx b/packages/status-react/src/components/Modals/ProfileFoundModal.tsx index d943656b..8dcbfcab 100644 --- a/packages/status-react/src/components/Modals/ProfileFoundModal.tsx +++ b/packages/status-react/src/components/Modals/ProfileFoundModal.tsx @@ -1,15 +1,15 @@ -import { Identity, utils } from "@status-im/core"; -import React, { useEffect, useMemo, useState } from "react"; -import styled from "styled-components"; +import { Identity, utils } from '@status-im/core' +import React, { useEffect, useMemo, useState } from 'react' +import styled from 'styled-components' -import { useNickname, useSetIdentity } from "../../contexts/identityProvider"; -import { useModal } from "../../contexts/modalProvider"; -import { decryptIdentity, loadEncryptedIdentity } from "../../utils"; -import { buttonTransparentStyles } from "../Buttons/buttonStyle"; -import { UserLogo } from "../Members/UserLogo"; -import { textMediumStyles } from "../Text"; +import { useNickname, useSetIdentity } from '../../contexts/identityProvider' +import { useModal } from '../../contexts/modalProvider' +import { decryptIdentity, loadEncryptedIdentity } from '../../utils' +import { buttonTransparentStyles } from '../Buttons/buttonStyle' +import { UserLogo } from '../Members/UserLogo' +import { textMediumStyles } from '../Text' -import { Modal } from "./Modal"; +import { Modal } from './Modal' import { Btn, ButtonSection, @@ -17,37 +17,37 @@ import { MiddleSection, Section, Text, -} from "./ModalStyle"; +} from './ModalStyle' import { EmojiKey, UserAddress, UserAddressWrapper, UserName, -} from "./ProfileModal"; -import { UserCreationModalName } from "./UserCreationModal"; +} from './ProfileModal' +import { UserCreationModalName } from './UserCreationModal' -export const ProfileFoundModalName = "ProfileFoundModal"; +export const ProfileFoundModalName = 'ProfileFoundModal' export function ProfileFoundModal() { - const { setModal } = useModal(ProfileFoundModalName); - const { setModal: setCreationModal } = useModal(UserCreationModalName); + const { setModal } = useModal(ProfileFoundModalName) + const { setModal: setCreationModal } = useModal(UserCreationModalName) - const setIdentity = useSetIdentity(); - const encryptedIdentity = useMemo(() => loadEncryptedIdentity(), []); - const nickname = useNickname(); + const setIdentity = useSetIdentity() + const encryptedIdentity = useMemo(() => loadEncryptedIdentity(), []) + const nickname = useNickname() const [decryptedIdentity, setDecryptedIdentity] = useState< Identity | undefined - >(undefined); + >(undefined) useEffect(() => { if (encryptedIdentity) (async () => { setDecryptedIdentity( - await decryptIdentity(encryptedIdentity, "noPassword") - ); - })(); - }, [encryptedIdentity]); + await decryptIdentity(encryptedIdentity, 'noPassword') + ) + })() + }, [encryptedIdentity]) if (decryptedIdentity) { return ( @@ -64,9 +64,9 @@ export function ProfileFoundModal() { }} radius={80} colorWheel={[ - ["red", 150], - ["blue", 250], - ["green", 360], + ['red', 150], + ['blue', 250], + ['green', 360], ]} /> @@ -74,56 +74,56 @@ export function ProfileFoundModal() { - {" "} + {' '} Chatkey: {decryptedIdentity.privateKey.slice(0, 10)}... - {decryptedIdentity.privateKey.slice(-3)}{" "} + {decryptedIdentity.privateKey.slice(-3)}{' '} 🎩🍞🥑🦍🌈📡💅🏻♣️🔔⛸👵🅱 Throwaway Profile is found in your local browser’s cache. Would you - like to load it and use it?{" "} + like to load it and use it?{' '} { - setCreationModal(true); - setModal(false); + setCreationModal(true) + setModal(false) }} > Skip { - setIdentity(decryptedIdentity); - setModal(false); + setIdentity(decryptedIdentity) + setModal(false) }} > Load Throwaway Profile - ); + ) } else { - return null; + return null } } const Logo = styled(UserLogo)` margin-bottom: 8px; -`; +` const Name = styled(UserName)` margin-bottom: 8px; -`; +` const EmojiKeyBlock = styled(EmojiKey)` margin-bottom: 24px; -`; +` const SkipBtn = styled.button` ${buttonTransparentStyles} ${textMediumStyles} -`; +` diff --git a/packages/status-react/src/components/Modals/ProfileModal.tsx b/packages/status-react/src/components/Modals/ProfileModal.tsx index b10f14c5..2641cc25 100644 --- a/packages/status-react/src/components/Modals/ProfileModal.tsx +++ b/packages/status-react/src/components/Modals/ProfileModal.tsx @@ -1,27 +1,27 @@ -import React, { useEffect, useMemo, useState } from "react"; -import styled from "styled-components"; +import React, { useEffect, useMemo, useState } from 'react' +import styled from 'styled-components' -import { useUserPublicKey } from "../../contexts/identityProvider"; -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useModal } from "../../contexts/modalProvider"; -import { useToasts } from "../../contexts/toastProvider"; -import { copy } from "../../utils"; -import { buttonStyles } from "../Buttons/buttonStyle"; +import { useUserPublicKey } from '../../contexts/identityProvider' +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useModal } from '../../contexts/modalProvider' +import { useToasts } from '../../contexts/toastProvider' +import { copy } from '../../utils' +import { buttonStyles } from '../Buttons/buttonStyle' import { ClearBtn, inputStyles, NameInput, NameInputWrapper, -} from "../Form/inputStyles"; -import { ClearSvgFull } from "../Icons/ClearIconFull"; -import { CopyIcon } from "../Icons/CopyIcon"; -import { EditIcon } from "../Icons/EditIcon"; -import { LeftIcon } from "../Icons/LeftIcon"; -import { UntrustworthIcon } from "../Icons/UntrustworthIcon"; -import { UserIcon } from "../Icons/UserIcon"; -import { textMediumStyles, textSmallStyles } from "../Text"; +} from '../Form/inputStyles' +import { ClearSvgFull } from '../Icons/ClearIconFull' +import { CopyIcon } from '../Icons/CopyIcon' +import { EditIcon } from '../Icons/EditIcon' +import { LeftIcon } from '../Icons/LeftIcon' +import { UntrustworthIcon } from '../Icons/UntrustworthIcon' +import { UserIcon } from '../Icons/UserIcon' +import { textMediumStyles, textSmallStyles } from '../Text' -import { Modal } from "./Modal"; +import { Modal } from './Modal' import { BackBtn, Btn, @@ -29,80 +29,80 @@ import { Heading, Hint, Section, -} from "./ModalStyle"; +} from './ModalStyle' -export const ProfileModalName = "profileModal" as const; +export const ProfileModalName = 'profileModal' as const export type ProfileModalProps = { - id: string; - image?: string; - renamingState?: boolean; - requestState?: boolean; -}; + id: string + image?: string + renamingState?: boolean + requestState?: boolean +} export const ProfileModal = () => { - const { props } = useModal(ProfileModalName); + const { props } = useModal(ProfileModalName) const { id, image, renamingState, requestState } = useMemo( - () => (props ? props : { id: "" }), + () => (props ? props : { id: '' }), [props] - ); + ) - const { setToasts } = useToasts(); - const { setModal } = useModal(ProfileModalName); + const { setToasts } = useToasts() + const { setModal } = useModal(ProfileModalName) - const userPK = useUserPublicKey(); + const userPK = useUserPublicKey() const isUser = useMemo(() => { if (userPK) { - return id === userPK; + return id === userPK } else { - return false; + return false } - }, [id, userPK]); + }, [id, userPK]) - const [renaming, setRenaming] = useState(renamingState ?? false); + const [renaming, setRenaming] = useState(renamingState ?? false) useEffect(() => { - setRenaming(renamingState ?? false); - }, [renamingState]); + setRenaming(renamingState ?? false) + }, [renamingState]) - const [request, setRequest] = useState(""); - const [requestCreation, setRequestCreation] = useState(requestState ?? false); + const [request, setRequest] = useState('') + const [requestCreation, setRequestCreation] = useState(requestState ?? false) useEffect(() => { - setRequestCreation(requestState ?? false); - }, [requestState]); + setRequestCreation(requestState ?? false) + }, [requestState]) - const { contacts, contactsDispatch } = useMessengerContext(); - const contact = useMemo(() => contacts[id], [id, contacts]); - const [customNameInput, setCustomNameInput] = useState(""); + const { contacts, contactsDispatch } = useMessengerContext() + const contact = useMemo(() => contacts[id], [id, contacts]) + const [customNameInput, setCustomNameInput] = useState('') - if (!contact) return null; + if (!contact) return null return ( - +
{contact.trueName}’s Profile
- + {image ? ( ) : ( )} - + {contact?.customName ?? contact.trueName} {contact.isUntrustworthy && } {!renaming && ( )} @@ -116,16 +116,16 @@ export const ProfileModal = () => { setCustomNameInput(e.currentTarget.value)} + onChange={e => setCustomNameInput(e.currentTarget.value)} /> {customNameInput && ( { contactsDispatch({ - type: "setCustomName", + type: 'setCustomName', payload: { id, customName: undefined }, - }); - setCustomNameInput(""); + }) + setCustomNameInput('') }} > @@ -134,14 +134,14 @@ export const ProfileModal = () => { ) : ( <> - + {requestCreation ? ( {id.slice(0, 10)}...{id.slice(-3)} ) : ( <> - + Chatkey: {id.slice(0, 30)} @@ -151,9 +151,9 @@ export const ProfileModal = () => { )} - + 🎩🍞🥑🦍🌈📡💅🏻♣️🔔⛸👵🅱 - {" "} + {' '} )} {requestCreation && ( @@ -163,7 +163,7 @@ export const ProfileModal = () => { value={request} placeholder="Say who you are / why you want to became a contact..." maxLength={280} - onInput={(e) => setRequest(e.currentTarget.value)} + onInput={e => setRequest(e.currentTarget.value)} required autoFocus /> @@ -180,10 +180,10 @@ export const ProfileModal = () => { disabled={!customNameInput} onClick={() => { contactsDispatch({ - type: "setCustomName", + type: 'setCustomName', payload: { id, customName: customNameInput }, - }); - setRenaming(false); + }) + setRenaming(false) }} > Apply nickname @@ -197,17 +197,17 @@ export const ProfileModal = () => { { - setToasts((prev) => [ + setToasts(prev => [ ...prev, { id: id + request, - type: "confirmation", - text: "Contact Request Sent", + type: 'confirmation', + text: 'Contact Request Sent', }, ]), setRequestCreation(false), setModal(false), - setRequest(""); + setRequest('') }} > Send Contact Request @@ -217,12 +217,12 @@ export const ProfileModal = () => { <> {!contact.isFriend && !isUser && ( { - contactsDispatch({ type: "toggleBlocked", payload: { id } }); + contactsDispatch({ type: 'toggleBlocked', payload: { id } }) }} > - {contact.blocked ? "Unblock" : "Block"} + {contact.blocked ? 'Unblock' : 'Block'} )} {contact.isFriend && ( @@ -230,7 +230,7 @@ export const ProfileModal = () => { className="red" onClick={() => contactsDispatch({ - type: "setIsFriend", + type: 'setIsFriend', payload: { id, isFriend: false }, }) } @@ -239,14 +239,14 @@ export const ProfileModal = () => { )} - contactsDispatch({ type: "toggleTrustworthy", payload: { id } }) + contactsDispatch({ type: 'toggleTrustworthy', payload: { id } }) } > {contact.isUntrustworthy - ? "Remove Untrustworthy Mark" - : "Mark as Untrustworthy"} + ? 'Remove Untrustworthy Mark' + : 'Mark as Untrustworthy'} {!contact.isFriend && ( setRequestCreation(true)}> @@ -257,14 +257,14 @@ export const ProfileModal = () => { )}
- ); -}; + ) +} const ProfileSection = styled(Section)` display: flex; flex-direction: column; align-items: center; -`; +` const NameSection = styled.div` display: flex; @@ -276,7 +276,7 @@ const NameSection = styled.div` &.small { margin-bottom: 0; } -`; +` const ProfileIcon = styled.div` width: 80px; @@ -296,7 +296,7 @@ const ProfileIcon = styled.div` width: 64px; height: 64px; } -`; +` export const UserNameWrapper = styled.div` display: flex; @@ -311,7 +311,7 @@ export const UserNameWrapper = styled.div` &.logout { margin: 8px 0; } -`; +` export const UserName = styled.p` color: ${({ theme }) => theme.primary}; @@ -326,7 +326,7 @@ export const UserName = styled.p` line-height: 24px; margin-right: 0; } -`; +` const UserTrueName = styled.p` color: ${({ theme }) => theme.primary}; @@ -334,7 +334,7 @@ const UserTrueName = styled.p` line-height: 16px; letter-spacing: 0.1px; margin-top: 8px; -`; +` export const UserAddressWrapper = styled.div` display: flex; @@ -345,7 +345,7 @@ export const UserAddressWrapper = styled.div` &.small { margin-bottom: 8px; } -`; +` export const UserAddress = styled.p` display: flex; @@ -360,7 +360,7 @@ export const UserAddress = styled.p` ${textSmallStyles} } -`; +` export const EmojiKey = styled.div` width: 116px; gap: 8px; @@ -372,7 +372,7 @@ export const EmojiKey = styled.div` width: 83px; ${textSmallStyles} } -`; +` const ProfileBtn = styled.button` padding: 11px 24px; @@ -388,13 +388,13 @@ const ProfileBtn = styled.button` &.red:hover { background: ${({ theme }) => theme.buttonNoBgHover}; } -`; +` const CopyButton = styled.button` & > svg { fill: ${({ theme }) => theme.tertiary}; } -`; +` const RequestSection = styled.div` width: 100%; @@ -402,7 +402,7 @@ const RequestSection = styled.div` flex-direction: column; align-items: flex-end; margin: 16px 0; -`; +` const RequestInput = styled.textarea` width: 100%; @@ -410,7 +410,7 @@ const RequestInput = styled.textarea` padding: 10px 16px; resize: none; margin-top: 16px; - font-family: "Inter"; + font-family: 'Inter'; ${inputStyles} -`; +` diff --git a/packages/status-react/src/components/Modals/SizeLimitModal.tsx b/packages/status-react/src/components/Modals/SizeLimitModal.tsx index 1127559c..ae3b6264 100644 --- a/packages/status-react/src/components/Modals/SizeLimitModal.tsx +++ b/packages/status-react/src/components/Modals/SizeLimitModal.tsx @@ -1,19 +1,19 @@ -import React from "react"; +import React from 'react' -import { useModal } from "../../contexts/modalProvider"; +import { useModal } from '../../contexts/modalProvider' -import { Modal } from "./Modal"; +import { Modal } from './Modal' -export const SizeLimitModalName = "SizeLimitModal"; +export const SizeLimitModalName = 'SizeLimitModal' export function SizeLimitModal() { - const { setModal } = useModal(SizeLimitModalName); + const { setModal } = useModal(SizeLimitModalName) return ( -
setModal(false)} style={{ padding: "20px" }}> +
setModal(false)} style={{ padding: '20px' }}> File size must be less than 1MB
- ); + ) } diff --git a/packages/status-react/src/components/Modals/StatusModal.tsx b/packages/status-react/src/components/Modals/StatusModal.tsx index e6fb2840..becf4d99 100644 --- a/packages/status-react/src/components/Modals/StatusModal.tsx +++ b/packages/status-react/src/components/Modals/StatusModal.tsx @@ -1,15 +1,15 @@ -import QRCode from "qrcode.react"; -import React, { useState } from "react"; -import styled from "styled-components"; +import QRCode from 'qrcode.react' +import React, { useState } from 'react' +import styled from 'styled-components' -import { buttonStyles } from "../Buttons/buttonStyle"; -import { LoginInstructions } from "../Form/LoginInstructions"; -import { PasteInput } from "../Form/PasteInput"; +import { buttonStyles } from '../Buttons/buttonStyle' +import { LoginInstructions } from '../Form/LoginInstructions' +import { PasteInput } from '../Form/PasteInput' -import { Modal } from "./Modal"; -import { Heading, MiddleSection, Section } from "./ModalStyle"; +import { Modal } from './Modal' +import { Heading, MiddleSection, Section } from './ModalStyle' -export const StatusModalName = "StatusModal"; +export const StatusModalName = 'StatusModal' export enum StatusModalState { Mobile, @@ -19,14 +19,14 @@ export enum StatusModalState { export function StatusModal() { const [modalState, setModalState] = useState( StatusModalState.Mobile - ); + ) - const mobileFlow = modalState === StatusModalState.Mobile; - const desktopFlow = modalState === StatusModalState.Desktop; + const mobileFlow = modalState === StatusModalState.Mobile + const desktopFlow = modalState === StatusModalState.Desktop const switchModalState = (state: StatusModalState) => { - setModalState((prev) => (prev === state ? StatusModalState.Mobile : state)); - }; + setModalState(prev => (prev === state ? StatusModalState.Mobile : state)) + } return (
@@ -35,13 +35,13 @@ export function StatusModal() { switchModalState(StatusModalState.Mobile)} > From mobile switchModalState(StatusModalState.Desktop)} > From desktop @@ -55,18 +55,18 @@ export function StatusModal() { - ); + ) } const MiddleSectionStatus = styled(MiddleSection)` height: 514px; -`; +` const Switch = styled.div` display: flex; align-items: center; margin-bottom: 32px; -`; +` const SwitchBtn = styled.button` ${buttonStyles} @@ -82,8 +82,8 @@ const SwitchBtn = styled.button` color: ${({ theme }) => theme.bodyBackgroundColor}; z-index: 10000; } -`; +` const SwitchBtnMobile = styled(SwitchBtn)` margin-left: -8px; -`; +` diff --git a/packages/status-react/src/components/Modals/UserCreationModal.tsx b/packages/status-react/src/components/Modals/UserCreationModal.tsx index b327578d..777d82d5 100644 --- a/packages/status-react/src/components/Modals/UserCreationModal.tsx +++ b/packages/status-react/src/components/Modals/UserCreationModal.tsx @@ -1,27 +1,27 @@ -import { Identity } from "@status-im/core"; -import React, { useState } from "react"; -import styled from "styled-components"; +import { Identity } from '@status-im/core' +import React, { useState } from 'react' +import styled from 'styled-components' import { useSetIdentity, useSetNikcname, useUserPublicKey, useWalletIdentity, -} from "../../contexts/identityProvider"; -import { useModal } from "../../contexts/modalProvider"; -import { useNameError } from "../../hooks/useNameError"; -import { Contact } from "../../models/Contact"; -import { saveIdentity } from "../../utils"; -import { NameError } from "../Form/NameError"; -import { ClearBtn, NameInput, NameInputWrapper } from "../Form/inputStyles"; -import { AddIcon } from "../Icons/AddIcon"; -import { ChainIcon } from "../Icons/ChainIcon"; -import { ClearSvgFull } from "../Icons/ClearIconFull"; -import { LeftIcon } from "../Icons/LeftIcon"; -import { UserLogo } from "../Members/UserLogo"; +} from '../../contexts/identityProvider' +import { useModal } from '../../contexts/modalProvider' +import { useNameError } from '../../hooks/useNameError' +import { Contact } from '../../models/Contact' +import { saveIdentity } from '../../utils' +import { NameError } from '../Form/NameError' +import { ClearBtn, NameInput, NameInputWrapper } from '../Form/inputStyles' +import { AddIcon } from '../Icons/AddIcon' +import { ChainIcon } from '../Icons/ChainIcon' +import { ClearSvgFull } from '../Icons/ClearIconFull' +import { LeftIcon } from '../Icons/LeftIcon' +import { UserLogo } from '../Members/UserLogo' -import { AgreementModalName } from "./AgreementModal"; -import { Modal } from "./Modal"; +import { AgreementModalName } from './AgreementModal' +import { Modal } from './Modal' import { AddWrapper, BackBtn, @@ -31,29 +31,29 @@ import { Hint, Section, Text, -} from "./ModalStyle"; -import { EmojiKey, UserAddress } from "./ProfileModal"; +} from './ModalStyle' +import { EmojiKey, UserAddress } from './ProfileModal' -export const UserCreationModalName = "UserCreationModal"; +export const UserCreationModalName = 'UserCreationModal' export function UserCreationModal() { - const walletIdentity = useWalletIdentity(); - const userPK = useUserPublicKey(); - const setIdentity = useSetIdentity(); - const setNickname = useSetNikcname(); + const walletIdentity = useWalletIdentity() + const userPK = useUserPublicKey() + const setIdentity = useSetIdentity() + const setNickname = useSetNikcname() - const [customNameInput, setCustomNameInput] = useState(""); - const error = useNameError(customNameInput); - const [nextStep, setNextStep] = useState(false); - const { setModal } = useModal(UserCreationModalName); - const { setModal: setAgreementModal } = useModal(AgreementModalName); + const [customNameInput, setCustomNameInput] = useState('') + const error = useNameError(customNameInput) + const [nextStep, setNextStep] = useState(false) + const { setModal } = useModal(UserCreationModalName) + const { setModal: setAgreementModal } = useModal(AgreementModalName) return (
Create a Status Profile
- + {nextStep ? ( Your emojihash and identicon ring ) : ( @@ -61,7 +61,7 @@ export function UserCreationModal() { )} {nextStep ? ( - {" "} + {' '} This set of emojis and coloured ring around your avatar are unique and represent your chat key, so your friends can easily distinguish you from potential impersonators. @@ -78,9 +78,9 @@ export function UserCreationModal() { contact={{ trueName: customNameInput } as Contact} radius={80} colorWheel={[ - ["red", 150], - ["blue", 250], - ["green", 360], + ['red', 150], + ['blue', 250], + ['green', 360], ]} /> {!nextStep && ( @@ -98,7 +98,7 @@ export function UserCreationModal() { maxLength={24} /> {customNameInput && ( - setCustomNameInput("")}> + setCustomNameInput('')}> )} @@ -110,9 +110,9 @@ export function UserCreationModal() { {nextStep && userPK && ( <> - {" "} + {' '} Chatkey: {userPK.slice(0, 10)}... - {userPK.slice(-3)}{" "} + {userPK.slice(-3)}{' '} @@ -123,9 +123,9 @@ export function UserCreationModal() { @@ -139,14 +139,14 @@ export function UserCreationModal() { { if (nextStep) { - setModal(false); - setAgreementModal(true); + setModal(false) + setAgreementModal(true) } else { - const identity = walletIdentity || Identity.generate(); - setNickname(customNameInput); - setIdentity(identity); - !walletIdentity && saveIdentity(identity, "noPassword"); - setNextStep(true); + const identity = walletIdentity || Identity.generate() + setNickname(customNameInput) + setIdentity(identity) + !walletIdentity && saveIdentity(identity, 'noPassword') + setNextStep(true) } }} disabled={!customNameInput || error !== 0} @@ -155,7 +155,7 @@ export function UserCreationModal() {
- ); + ) } const MiddleSection = styled(Section)` @@ -167,7 +167,7 @@ const MiddleSection = styled(Section)` &.initial { padding: 32px; } -`; +` const Title = styled(Text)` font-weight: bold; @@ -175,26 +175,26 @@ const Title = styled(Text)` line-height: 30px; letter-spacing: -0.2px; margin-bottom: 16px; -`; +` const StyledHint = styled(Hint)` font-size: 15px; line-height: 22px; margin-bottom: 32px; text-align: center; -`; +` const LogoWrapper = styled.div` position: relative; display: flex; margin-bottom: 32px; -`; +` const AddIconWrapper = styled(AddWrapper)` top: 0; right: -50%; transform: translateX(-50%); -`; +` const ChainIcons = styled.div` width: 104px; @@ -202,7 +202,7 @@ const ChainIcons = styled.div` justify-content: space-between; align-items: center; margin: 16px 0; -`; +` const UserAttributes = styled.div` width: 200px; @@ -210,4 +210,4 @@ const UserAttributes = styled.div` justify-content: space-between; align-items: center; margin-bottom: 32px; -`; +` diff --git a/packages/status-react/src/components/Modals/UserCreationStartModal.tsx b/packages/status-react/src/components/Modals/UserCreationStartModal.tsx index 404ba391..6f2d094d 100644 --- a/packages/status-react/src/components/Modals/UserCreationStartModal.tsx +++ b/packages/status-react/src/components/Modals/UserCreationStartModal.tsx @@ -1,12 +1,12 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' -import { UserCreationButtons } from "../UserCreation/UserCreationButtons"; +import { UserCreationButtons } from '../UserCreation/UserCreationButtons' -import { Modal } from "./Modal"; -import { Heading, Section } from "./ModalStyle"; +import { Modal } from './Modal' +import { Heading, Section } from './ModalStyle' -export const UserCreationStartModalName = "UserCreationStartModal"; +export const UserCreationStartModalName = 'UserCreationStartModal' export const UserCreationStartModal = () => { return ( @@ -18,9 +18,9 @@ export const UserCreationStartModal = () => { - ); -}; + ) +} const MiddleSection = styled(Section)` padding: 48px 0; -`; +` diff --git a/packages/status-react/src/components/Modals/WalletConnectModal.tsx b/packages/status-react/src/components/Modals/WalletConnectModal.tsx index 0bd0b145..6d69ea18 100644 --- a/packages/status-react/src/components/Modals/WalletConnectModal.tsx +++ b/packages/status-react/src/components/Modals/WalletConnectModal.tsx @@ -1,9 +1,9 @@ -import React from "react"; +import React from 'react' -import { ConnectModal } from "./ConnectModal"; -import { Modal } from "./Modal"; +import { ConnectModal } from './ConnectModal' +import { Modal } from './Modal' -export const WalletConnectModalName = "WalletConnectModal"; +export const WalletConnectModalName = 'WalletConnectModal' export function WalletConnectModal() { return ( @@ -15,5 +15,5 @@ export function WalletConnectModal() { address="https://walletconnect.com/" /> - ); + ) } diff --git a/packages/status-react/src/components/Modals/WalletModal.tsx b/packages/status-react/src/components/Modals/WalletModal.tsx index a730a371..91295d05 100644 --- a/packages/status-react/src/components/Modals/WalletModal.tsx +++ b/packages/status-react/src/components/Modals/WalletModal.tsx @@ -1,106 +1,106 @@ -import { Identity, genPrivateKeyWithEntropy } from "@status-im/core"; -import React, { useCallback } from "react"; -import styled from "styled-components"; +import { Identity, genPrivateKeyWithEntropy } from '@status-im/core' +import React, { useCallback } from 'react' +import styled from 'styled-components' -import { useConfig } from "../../contexts/configProvider"; +import { useConfig } from '../../contexts/configProvider' import { useSetIdentity, useSetWalletIdentity, -} from "../../contexts/identityProvider"; -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useModal } from "../../contexts/modalProvider"; -import { CoinbaseLogo } from "../Icons/CoinbaseLogo"; -import { MetamaskLogo } from "../Icons/MetamaskLogo"; -import { WalletConnectLogo } from "../Icons/WalletConnectLogo"; +} from '../../contexts/identityProvider' +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useModal } from '../../contexts/modalProvider' +import { CoinbaseLogo } from '../Icons/CoinbaseLogo' +import { MetamaskLogo } from '../Icons/MetamaskLogo' +import { WalletConnectLogo } from '../Icons/WalletConnectLogo' -import { CoinbaseModalName } from "./CoinbaseModal"; -import { Modal } from "./Modal"; -import { Heading, MiddleSection, Section, Text } from "./ModalStyle"; -import { UserCreationModalName } from "./UserCreationModal"; -import { WalletConnectModalName } from "./WalletConnectModal"; +import { CoinbaseModalName } from './CoinbaseModal' +import { Modal } from './Modal' +import { Heading, MiddleSection, Section, Text } from './ModalStyle' +import { UserCreationModalName } from './UserCreationModal' +import { WalletConnectModalName } from './WalletConnectModal' -export const WalletModalName = "WalletModal"; +export const WalletModalName = 'WalletModal' export function WalletModal() { - const { setModal } = useModal(WalletModalName); - const setIdentity = useSetIdentity(); - const setWalletIdentity = useSetWalletIdentity(); - const { setModal: setUserCreationModal } = useModal(UserCreationModalName); - const { setModal: setWalleConnectModal } = useModal(WalletConnectModalName); - const { setModal: setCoinbaseModal } = useModal(CoinbaseModalName); - const { messenger } = useMessengerContext(); - const { dappUrl } = useConfig(); + const { setModal } = useModal(WalletModalName) + const setIdentity = useSetIdentity() + const setWalletIdentity = useSetWalletIdentity() + const { setModal: setUserCreationModal } = useModal(UserCreationModalName) + const { setModal: setWalleConnectModal } = useModal(WalletConnectModalName) + const { setModal: setCoinbaseModal } = useModal(CoinbaseModalName) + const { messenger } = useMessengerContext() + const { dappUrl } = useConfig() const handleMetamaskClick = useCallback(async () => { - const ethereum = (window as any)?.ethereum as any | undefined; + const ethereum = (window as any)?.ethereum as any | undefined if (document.location.origin !== dappUrl) { - alert("You are not signing in from correct url!"); - return; + alert('You are not signing in from correct url!') + return } if (ethereum && messenger) { try { if (ethereum?.isMetaMask) { const [account] = await ethereum.request({ - method: "eth_requestAccounts", - }); + method: 'eth_requestAccounts', + }) const msgParams = JSON.stringify({ domain: { chainId: 1, name: window.location.origin, - version: "1", + version: '1', }, message: { - action: "Status CommunityChatRoom Key", + action: 'Status CommunityChatRoom Key', onlySignOn: dappUrl, message: "This signature will be used to decrypt chat communications; check that the 'onlySignOn' property of this message matches the current website address.", }, - primaryType: "Mail", + primaryType: 'Mail', types: { EIP712Domain: [ - { name: "name", type: "string" }, - { name: "version", type: "string" }, - { name: "chainId", type: "uint256" }, + { name: 'name', type: 'string' }, + { name: 'version', type: 'string' }, + { name: 'chainId', type: 'uint256' }, ], Mail: [ - { name: "action", type: "string" }, - { name: "onlySignOn", type: "string" }, - { name: "message", type: "string" }, + { name: 'action', type: 'string' }, + { name: 'onlySignOn', type: 'string' }, + { name: 'message', type: 'string' }, ], }, - }); + }) - const params = [account, msgParams]; - const method = "eth_signTypedData_v4"; + const params = [account, msgParams] + const method = 'eth_signTypedData_v4' const signature = await ethereum.request({ method, params, from: account, - }); - const privateKey = genPrivateKeyWithEntropy(signature); + }) + const privateKey = genPrivateKeyWithEntropy(signature) - const loadedIdentity = new Identity(privateKey); + const loadedIdentity = new Identity(privateKey) const userInNetwork = await messenger.checkIfUserInWakuNetwork( loadedIdentity.publicKey - ); + ) if (userInNetwork) { - setIdentity(loadedIdentity); + setIdentity(loadedIdentity) } else { - setWalletIdentity(loadedIdentity); - setUserCreationModal(true); + setWalletIdentity(loadedIdentity) + setUserCreationModal(true) } - setModal(false); - return; + setModal(false) + return } } catch { - alert("Error"); + alert('Error') } } - alert("Metamask not found"); + alert('Metamask not found') }, [ messenger, dappUrl, @@ -108,7 +108,7 @@ export function WalletModal() { setModal, setWalletIdentity, setUserCreationModal, - ]); + ]) return ( @@ -133,19 +133,19 @@ export function WalletModal() { - ); + ) } const MiddleSectionWallet = styled(MiddleSection)` align-items: stretch; -`; +` const Wallets = styled.div` display: flex; flex-direction: column; align-items: center; margin-top: 16px; -`; +` const Wallet = styled.div` width: 100%; @@ -161,4 +161,4 @@ const Wallet = styled.div` &:hover { background: ${({ theme }) => theme.buttonBgHover}; } -`; +` diff --git a/packages/status-react/src/components/NarrowMode/NarrowChannels.tsx b/packages/status-react/src/components/NarrowMode/NarrowChannels.tsx index 2dae6253..330ee26d 100644 --- a/packages/status-react/src/components/NarrowMode/NarrowChannels.tsx +++ b/packages/status-react/src/components/NarrowMode/NarrowChannels.tsx @@ -1,11 +1,11 @@ -import React from "react"; +import React from 'react' -import { Channels } from "../Channels/Channels"; +import { Channels } from '../Channels/Channels' -import { ListWrapper, NarrowTopbar } from "./NarrowTopbar"; +import { ListWrapper, NarrowTopbar } from './NarrowTopbar' interface NarrowChannelsProps { - setShowChannels: (val: boolean) => void; + setShowChannels: (val: boolean) => void } export function NarrowChannels({ setShowChannels }: NarrowChannelsProps) { @@ -14,5 +14,5 @@ export function NarrowChannels({ setShowChannels }: NarrowChannelsProps) { setShowChannels(false)} /> setShowChannels(false)} /> - ); + ) } diff --git a/packages/status-react/src/components/NarrowMode/NarrowMembers.tsx b/packages/status-react/src/components/NarrowMode/NarrowMembers.tsx index 47e44871..cf8f9ab6 100644 --- a/packages/status-react/src/components/NarrowMode/NarrowMembers.tsx +++ b/packages/status-react/src/components/NarrowMode/NarrowMembers.tsx @@ -1,28 +1,28 @@ -import React, { useMemo } from "react"; +import React, { useMemo } from 'react' -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { MembersList } from "../Members/MembersList"; +import { useMessengerContext } from '../../contexts/messengerProvider' +import { MembersList } from '../Members/MembersList' -import { ListWrapper, NarrowTopbar } from "./NarrowTopbar"; +import { ListWrapper, NarrowTopbar } from './NarrowTopbar' interface NarrowMembersProps { - switchShowMembersList: () => void; + switchShowMembersList: () => void } export function NarrowMembers({ switchShowMembersList }: NarrowMembersProps) { - const { activeChannel } = useMessengerContext(); + const { activeChannel } = useMessengerContext() const listName = useMemo( () => - activeChannel && activeChannel?.type === "group" - ? "Group members" - : "Community members", + activeChannel && activeChannel?.type === 'group' + ? 'Group members' + : 'Community members', [activeChannel] - ); + ) return ( - ); + ) } diff --git a/packages/status-react/src/components/NarrowMode/NarrowTopbar.tsx b/packages/status-react/src/components/NarrowMode/NarrowTopbar.tsx index f49fc3e9..125e99f9 100644 --- a/packages/status-react/src/components/NarrowMode/NarrowTopbar.tsx +++ b/packages/status-react/src/components/NarrowMode/NarrowTopbar.tsx @@ -1,29 +1,29 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { BackButton } from "../Buttons/BackButton"; +import { useMessengerContext } from '../../contexts/messengerProvider' +import { BackButton } from '../Buttons/BackButton' interface NarrowTopbarProps { - list: string; - onBtnClick: () => void; + list: string + onBtnClick: () => void } export function NarrowTopbar({ list, onBtnClick }: NarrowTopbarProps) { - const { communityData, activeChannel } = useMessengerContext(); + const { communityData, activeChannel } = useMessengerContext() return ( {list} - {activeChannel?.type === "group" + {activeChannel?.type === 'group' ? activeChannel.name : communityData?.name} - ); + ) } const TopbarWrapper = styled.div` @@ -32,28 +32,28 @@ const TopbarWrapper = styled.div` background-color: ${({ theme }) => theme.bodyBackgroundColor}; margin-bottom: 16px; position: relative; -`; +` const HeadingWrapper = styled.div` display: flex; justify-content: center; flex-direction: column; text-align: center; -`; +` const Heading = styled.p` font-weight: 500; color: ${({ theme }) => theme.primary}; -`; +` const SubHeading = styled.p` font-weight: 500; color: ${({ theme }) => theme.secondary}; -`; +` export const ListWrapper = styled.div` padding: 16px; background: ${({ theme }) => theme.bodyBackgroundColor}; overflow: auto; flex: 1; -`; +` diff --git a/packages/status-react/src/components/Reactions/ReactionButton.tsx b/packages/status-react/src/components/Reactions/ReactionButton.tsx index 6e41d7e7..6e3a963d 100644 --- a/packages/status-react/src/components/Reactions/ReactionButton.tsx +++ b/packages/status-react/src/components/Reactions/ReactionButton.tsx @@ -1,17 +1,17 @@ -import { BaseEmoji } from "emoji-mart"; -import React, { useRef, useState } from "react"; -import styled from "styled-components"; +import { BaseEmoji } from 'emoji-mart' +import React, { useRef, useState } from 'react' +import styled from 'styled-components' -import { useClickOutside } from "../../hooks/useClickOutside"; -import { Tooltip } from "../Form/Tooltip"; -import { ReactionSvg } from "../Icons/ReactionIcon"; +import { useClickOutside } from '../../hooks/useClickOutside' +import { Tooltip } from '../Form/Tooltip' +import { ReactionSvg } from '../Icons/ReactionIcon' -import { ReactionPicker } from "./ReactionPicker"; +import { ReactionPicker } from './ReactionPicker' interface ReactionButtonProps { - className?: string; - messageReactions: BaseEmoji[]; - setMessageReactions: React.Dispatch>; + className?: string + messageReactions: BaseEmoji[] + setMessageReactions: React.Dispatch> } export function ReactionButton({ @@ -19,10 +19,10 @@ export function ReactionButton({ messageReactions, setMessageReactions, }: ReactionButtonProps) { - const ref = useRef(null); - useClickOutside(ref, () => setShowReactions(false)); + const ref = useRef(null) + useClickOutside(ref, () => setShowReactions(false)) - const [showReactions, setShowReactions] = useState(false); + const [showReactions, setShowReactions] = useState(false) return ( @@ -41,12 +41,12 @@ export function ReactionButton({ {!className && !showReactions && } - ); + ) } const Wrapper = styled.div` position: relative; -`; +` export const ReactionBtn = styled.button` width: 32px; @@ -87,4 +87,4 @@ export const ReactionBtn = styled.button` background: inherit; } } -`; +` diff --git a/packages/status-react/src/components/Reactions/ReactionPicker.tsx b/packages/status-react/src/components/Reactions/ReactionPicker.tsx index 95b9c4d9..cfda4aa6 100644 --- a/packages/status-react/src/components/Reactions/ReactionPicker.tsx +++ b/packages/status-react/src/components/Reactions/ReactionPicker.tsx @@ -1,14 +1,14 @@ -import { BaseEmoji, Emoji, getEmojiDataFromNative } from "emoji-mart"; -import data from "emoji-mart/data/all.json"; -import React, { useCallback } from "react"; -import styled from "styled-components"; +import { BaseEmoji, Emoji, getEmojiDataFromNative } from 'emoji-mart' +import data from 'emoji-mart/data/all.json' +import React, { useCallback } from 'react' +import styled from 'styled-components' -const emojiHeart = getEmojiDataFromNative("❤️", "twitter", data); -const emojiLike = getEmojiDataFromNative("👍", "twitter", data); -const emojiDislike = getEmojiDataFromNative("👎", "twitter", data); -const emojiLaughing = getEmojiDataFromNative("😆", "twitter", data); -const emojiDisappointed = getEmojiDataFromNative("😥", "twitter", data); -const emojiRage = getEmojiDataFromNative("😡", "twitter", data); +const emojiHeart = getEmojiDataFromNative('❤️', 'twitter', data) +const emojiLike = getEmojiDataFromNative('👍', 'twitter', data) +const emojiDislike = getEmojiDataFromNative('👎', 'twitter', data) +const emojiLaughing = getEmojiDataFromNative('😆', 'twitter', data) +const emojiDisappointed = getEmojiDataFromNative('😥', 'twitter', data) +const emojiRage = getEmojiDataFromNative('😡', 'twitter', data) export const emojiArr = [ emojiHeart, @@ -17,12 +17,12 @@ export const emojiArr = [ emojiLaughing, emojiDisappointed, emojiRage, -]; +] interface ReactionPickerProps { - className?: string; - messageReactions: BaseEmoji[]; - setMessageReactions: React.Dispatch>; + className?: string + messageReactions: BaseEmoji[] + setMessageReactions: React.Dispatch> } export function ReactionPicker({ @@ -32,33 +32,33 @@ export function ReactionPicker({ }: ReactionPickerProps) { const handleReaction = useCallback( (emoji: BaseEmoji) => { - messageReactions.find((e) => e === emoji) - ? setMessageReactions((prev) => prev.filter((e) => e != emoji)) - : setMessageReactions((prev) => [...prev, emoji]); + messageReactions.find(e => e === emoji) + ? setMessageReactions(prev => prev.filter(e => e != emoji)) + : setMessageReactions(prev => [...prev, emoji]) }, [messageReactions, setMessageReactions] - ); + ) return ( - {emojiArr.map((emoji) => ( + {emojiArr.map(emoji => ( handleReaction(emoji)} - className={`${messageReactions.includes(emoji) && "chosen"}`} - menuMode={className === "menu"} + className={`${messageReactions.includes(emoji) && 'chosen'}`} + menuMode={className === 'menu'} > - {" "} + {' '} ))} - ); + ) } const Wrapper = styled.div` @@ -87,11 +87,11 @@ const Wrapper = styled.div` border: none; padding: 0; } -`; +` export const EmojiBtn = styled.button<{ menuMode: boolean }>` - width: ${({ menuMode }) => (menuMode ? "24px" : "40px")}; - height: ${({ menuMode }) => (menuMode ? "24px" : "40px")}; + width: ${({ menuMode }) => (menuMode ? '24px' : '40px')}; + height: ${({ menuMode }) => (menuMode ? '24px' : '40px')}; display: flex; justify-content: center; align-items: center; @@ -105,4 +105,4 @@ export const EmojiBtn = styled.button<{ menuMode: boolean }>` background: ${({ theme }) => theme.reactionBg}; border: 1px solid ${({ theme }) => theme.tertiary}; } -`; +` diff --git a/packages/status-react/src/components/Reactions/Reactions.tsx b/packages/status-react/src/components/Reactions/Reactions.tsx index 2b83d8ae..3c9d309e 100644 --- a/packages/status-react/src/components/Reactions/Reactions.tsx +++ b/packages/status-react/src/components/Reactions/Reactions.tsx @@ -1,24 +1,24 @@ -import { BaseEmoji } from "emoji-mart"; -import React, { useMemo } from "react"; -import styled from "styled-components"; +import { BaseEmoji } from 'emoji-mart' +import React, { useMemo } from 'react' +import styled from 'styled-components' -import { useUserPublicKey } from "../../contexts/identityProvider"; -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { Reply } from "../../hooks/useReply"; -import { ChatMessage } from "../../models/ChatMessage"; -import { Tooltip } from "../Form/Tooltip"; -import { DeleteIcon } from "../Icons/DeleteIcon"; -import { EditIcon } from "../Icons/EditIcon"; -import { PinIcon } from "../Icons/PinIcon"; -import { ReplySvg } from "../Icons/ReplyIcon"; +import { useUserPublicKey } from '../../contexts/identityProvider' +import { useMessengerContext } from '../../contexts/messengerProvider' +import { Reply } from '../../hooks/useReply' +import { ChatMessage } from '../../models/ChatMessage' +import { Tooltip } from '../Form/Tooltip' +import { DeleteIcon } from '../Icons/DeleteIcon' +import { EditIcon } from '../Icons/EditIcon' +import { PinIcon } from '../Icons/PinIcon' +import { ReplySvg } from '../Icons/ReplyIcon' -import { ReactionBtn, ReactionButton } from "./ReactionButton"; +import { ReactionBtn, ReactionButton } from './ReactionButton' interface ReactionsProps { - message: ChatMessage; - setReply: (val: Reply | undefined) => void; - messageReactions: BaseEmoji[]; - setMessageReactions: React.Dispatch>; + message: ChatMessage + setReply: (val: Reply | undefined) => void + messageReactions: BaseEmoji[] + setMessageReactions: React.Dispatch> } export function Reactions({ @@ -27,13 +27,13 @@ export function Reactions({ messageReactions, setMessageReactions, }: ReactionsProps) { - const userPK = useUserPublicKey(); - const { activeChannel } = useMessengerContext(); + const userPK = useUserPublicKey() + const { activeChannel } = useMessengerContext() const userMessage = useMemo( () => !!userPK && message.sender === userPK, [userPK, message] - ); + ) return ( @@ -60,7 +60,7 @@ export function Reactions({ )} - {activeChannel?.type !== "channel" && ( + {activeChannel?.type !== 'channel' && ( @@ -73,7 +73,7 @@ export function Reactions({ )} - ); + ) } const Wrapper = styled.div` @@ -86,4 +86,4 @@ const Wrapper = styled.div` background: ${({ theme }) => theme.bodyBackgroundColor}; padding: 2px; visibility: hidden; -`; +` diff --git a/packages/status-react/src/components/SearchBlock.tsx b/packages/status-react/src/components/SearchBlock.tsx index 7b9dd0ee..69337e2a 100644 --- a/packages/status-react/src/components/SearchBlock.tsx +++ b/packages/status-react/src/components/SearchBlock.tsx @@ -1,16 +1,16 @@ -import React, { useMemo } from "react"; -import styled from "styled-components"; +import React, { useMemo } from 'react' +import styled from 'styled-components' -import { useMessengerContext } from "../contexts/messengerProvider"; +import { useMessengerContext } from '../contexts/messengerProvider' -import { ContactsList } from "./Chat/ChatCreation"; -import { Member } from "./Members/Member"; +import { ContactsList } from './Chat/ChatCreation' +import { Member } from './Members/Member' interface SearchBlockProps { - query: string; - discludeList: string[]; - onClick: (member: string) => void; - onBotttom?: boolean; + query: string + discludeList: string[] + onClick: (member: string) => void + onBotttom?: boolean } export const SearchBlock = ({ @@ -19,36 +19,36 @@ export const SearchBlock = ({ onClick, onBotttom, }: SearchBlockProps) => { - const { contacts } = useMessengerContext(); + const { contacts } = useMessengerContext() const searchList = useMemo(() => { return Object.values(contacts) .filter( - (member) => + member => member.id.includes(query) || member?.customName?.includes(query) || member.trueName.includes(query) ) - .filter((member) => !discludeList.includes(member.id)); - }, [query, discludeList, contacts]); + .filter(member => !discludeList.includes(member.id)) + }, [query, discludeList, contacts]) if (searchList.length === 0 || !query) { - return null; + return null } return ( - {searchList.map((member) => ( + {searchList.map(member => ( onClick(member.id)} /> ))} - ); -}; + ) +} const SearchContacts = styled.div` display: flex; @@ -63,7 +63,7 @@ const SearchContacts = styled.div` left: 0; max-height: 200px; overflow: auto; -`; +` const SearchContact = styled.div` width: 340px; @@ -75,4 +75,4 @@ const SearchContact = styled.div` &:hover { background: ${({ theme }) => theme.inputColor}; } -`; +` diff --git a/packages/status-react/src/components/Skeleton/CommunitySkeleton.tsx b/packages/status-react/src/components/Skeleton/CommunitySkeleton.tsx index f48c6691..f744bef3 100644 --- a/packages/status-react/src/components/Skeleton/CommunitySkeleton.tsx +++ b/packages/status-react/src/components/Skeleton/CommunitySkeleton.tsx @@ -1,9 +1,9 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' -import { Column } from "../CommunityIdentity"; +import { Column } from '../CommunityIdentity' -import { Skeleton } from "./Skeleton"; +import { Skeleton } from './Skeleton' export const CommunitySkeleton = () => { return ( @@ -14,16 +14,16 @@ export const CommunitySkeleton = () => { - ); -}; + ) +} const LogoSkeleton = styled(Skeleton)` border-radius: 50%; margin-right: 8px; flex-shrink: 0; -`; +` const Loading = styled.div` display: flex; padding: 0 0 0 10px; -`; +` diff --git a/packages/status-react/src/components/Skeleton/Loading.tsx b/packages/status-react/src/components/Skeleton/Loading.tsx index c15a2200..59088898 100644 --- a/packages/status-react/src/components/Skeleton/Loading.tsx +++ b/packages/status-react/src/components/Skeleton/Loading.tsx @@ -1,8 +1,8 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' -import { LoadingIcon } from "../Icons/LoadingIcon"; -import { textSmallStyles } from "../Text"; +import { LoadingIcon } from '../Icons/LoadingIcon' +import { textSmallStyles } from '../Text' export const Loading = () => { return ( @@ -10,8 +10,8 @@ export const Loading = () => { Loading messages... - ); -}; + ) +} const LoadingBlock = styled.div` display: flex; @@ -26,7 +26,7 @@ const LoadingBlock = styled.div` box-shadow: ${({ theme }) => theme.shadow}; border-radius: 8px; z-index: 2; -`; +` const LoadingText = styled.p` color: ${({ theme }) => theme.primary}; @@ -34,4 +34,4 @@ const LoadingText = styled.p` font-weight: 500; ${textSmallStyles} -`; +` diff --git a/packages/status-react/src/components/Skeleton/LoadingSkeleton.tsx b/packages/status-react/src/components/Skeleton/LoadingSkeleton.tsx index 7cade447..381efd72 100644 --- a/packages/status-react/src/components/Skeleton/LoadingSkeleton.tsx +++ b/packages/status-react/src/components/Skeleton/LoadingSkeleton.tsx @@ -1,8 +1,8 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' -import { MessageSkeleton } from "./MessageSkeleton"; -import { Skeleton } from "./Skeleton"; +import { MessageSkeleton } from './MessageSkeleton' +import { Skeleton } from './Skeleton' export const LoadingSkeleton = () => { return ( @@ -42,8 +42,8 @@ export const LoadingSkeleton = () => { - ); -}; + ) +} const Loading = styled.div` display: flex; @@ -52,4 +52,4 @@ const Loading = styled.div` height: calc(100% - 44px); padding: 8px 16px 0; overflow: auto; -`; +` diff --git a/packages/status-react/src/components/Skeleton/MessageSkeleton.tsx b/packages/status-react/src/components/Skeleton/MessageSkeleton.tsx index b960c85f..b37c8724 100644 --- a/packages/status-react/src/components/Skeleton/MessageSkeleton.tsx +++ b/packages/status-react/src/components/Skeleton/MessageSkeleton.tsx @@ -1,10 +1,10 @@ -import React, { ReactNode } from "react"; -import styled from "styled-components"; +import React, { ReactNode } from 'react' +import styled from 'styled-components' -import { Skeleton } from "./Skeleton"; +import { Skeleton } from './Skeleton' interface MessageSkeletonProps { - children: ReactNode; + children: ReactNode } export const MessageSkeleton = ({ children }: MessageSkeletonProps) => { @@ -19,40 +19,40 @@ export const MessageSkeleton = ({ children }: MessageSkeletonProps) => { {children} - ); -}; + ) +} const MessageWrapper = styled.div` display: flex; padding: 8px 0; margin-bottom: 8px; -`; +` const ContentWrapper = styled.div` display: flex; flex-direction: column; flex: 1; -`; +` const MessageHeaderWrapper = styled.div` display: flex; align-items: center; -`; +` const MessageBodyWrapper = styled.div` display: flex; flex-direction: column; -`; +` const AvatarSkeleton = styled(Skeleton)` border-radius: 50%; margin-right: 8px; -`; +` const UserNameSkeleton = styled(Skeleton)` margin-right: 4px; -`; +` const TimeSkeleton = styled(Skeleton)` margin-right: 4px; -`; +` diff --git a/packages/status-react/src/components/Skeleton/Skeleton.tsx b/packages/status-react/src/components/Skeleton/Skeleton.tsx index 63da25ad..dd6cd0f2 100644 --- a/packages/status-react/src/components/Skeleton/Skeleton.tsx +++ b/packages/status-react/src/components/Skeleton/Skeleton.tsx @@ -1,9 +1,9 @@ -import styled, { keyframes } from "styled-components"; +import styled, { keyframes } from 'styled-components' interface SkeletonProps { - width?: string; - height?: string; - borderRadius?: string; + width?: string + height?: string + borderRadius?: string } const waveKeyframe = keyframes` @@ -16,15 +16,15 @@ const waveKeyframe = keyframes` 100% { transform: translateX(100%); } -`; +` export const Skeleton = styled.div` position: relative; display: inline-block; - width: ${({ width }) => width || "100%"}; - height: ${({ height }) => height || "22px"}; + width: ${({ width }) => width || '100%'}; + height: ${({ height }) => height || '22px'}; background: ${({ theme }) => theme.skeletonDark}; - border-radius: ${({ borderRadius }) => borderRadius || "8px"}; + border-radius: ${({ borderRadius }) => borderRadius || '8px'}; margin-bottom: 5px; overflow: hidden; @@ -35,7 +35,7 @@ export const Skeleton = styled.div` ${({ theme }) => theme.skeletonLight} 0%, ${({ theme }) => theme.skeletonDark} 100% ); - content: ""; + content: ''; position: absolute; transform: translateX(-100%); bottom: 0; @@ -43,4 +43,4 @@ export const Skeleton = styled.div` right: 0; top: 0; } -`; +` diff --git a/packages/status-react/src/components/Text.tsx b/packages/status-react/src/components/Text.tsx index aeefa04f..04567cf6 100644 --- a/packages/status-react/src/components/Text.tsx +++ b/packages/status-react/src/components/Text.tsx @@ -1,11 +1,11 @@ -import { css } from "styled-components"; +import { css } from 'styled-components' export const textSmallStyles = css` font-size: 13px; line-height: 18px; -`; +` export const textMediumStyles = css` font-size: 15px; line-height: 22px; -`; +` diff --git a/packages/status-react/src/components/ToastMessages/ToastMessage.tsx b/packages/status-react/src/components/ToastMessages/ToastMessage.tsx index adb5c9f9..33712fea 100644 --- a/packages/status-react/src/components/ToastMessages/ToastMessage.tsx +++ b/packages/status-react/src/components/ToastMessages/ToastMessage.tsx @@ -1,14 +1,14 @@ -import React from "react"; -import styled, { keyframes } from "styled-components"; +import React from 'react' +import styled, { keyframes } from 'styled-components' -import { useToasts } from "../../contexts/toastProvider"; -import { Toast } from "../../models/Toast"; -import { Column } from "../CommunityIdentity"; -import { CheckIcon } from "../Icons/CheckIcon"; -import { CommunityIcon } from "../Icons/CommunityIcon"; -import { CrossIcon } from "../Icons/CrossIcon"; -import { ProfileIcon } from "../Icons/ProfileIcon"; -import { textSmallStyles } from "../Text"; +import { useToasts } from '../../contexts/toastProvider' +import { Toast } from '../../models/Toast' +import { Column } from '../CommunityIdentity' +import { CheckIcon } from '../Icons/CheckIcon' +import { CommunityIcon } from '../Icons/CommunityIcon' +import { CrossIcon } from '../Icons/CrossIcon' +import { ProfileIcon } from '../Icons/ProfileIcon' +import { textSmallStyles } from '../Text' export function AnimationToastMessage() { return keyframes` @@ -18,41 +18,41 @@ export function AnimationToastMessage() { 100% { opacity: 1; transform: translateY(0); } -`; +` } type ToastMessageProps = { - toast: Toast; -}; + toast: Toast +} export function ToastMessage({ toast }: ToastMessageProps) { - const { setToasts } = useToasts(); + const { setToasts } = useToasts() const closeToast = () => { - setToasts((prev) => prev.filter((e) => e != toast)); - }; + setToasts(prev => prev.filter(e => e != toast)) + } return ( - {toast.type === "confirmation" && ( + {toast.type === 'confirmation' && ( )} - {toast.type === "incoming" && ( + {toast.type === 'incoming' && ( )} - {(toast.type === "approvement" || toast.type === "rejection") && ( + {(toast.type === 'approvement' || toast.type === 'rejection') && ( )} @@ -65,7 +65,7 @@ export function ToastMessage({ toast }: ToastMessageProps) { - ); + ) } const ToastWrapper = styled.div` @@ -79,18 +79,18 @@ const ToastWrapper = styled.div` box-shadow: ${({ theme }) => theme.shadow}; border-radius: 8px; animation: ${AnimationToastMessage} 2s ease; -`; +` const ToastBlock = styled.div` display: flex; align-items: center; color: ${({ theme }) => theme.primary}; -`; +` const ToastText = styled.p` font-weight: 500; ${textSmallStyles}; -`; +` const ToastRequest = styled(ToastText)` width: 243px; @@ -98,7 +98,7 @@ const ToastRequest = styled(ToastText)` text-overflow: ellipsis; white-space: nowrap; overflow: hidden; -`; +` const IconWrapper = styled.div` width: 32px; @@ -120,9 +120,9 @@ const IconWrapper = styled.div` &.red { background: ${({ theme }) => theme.buttonNoBg}; } -`; +` const CloseButton = styled.button` width: 32px; height: 32px; -`; +` diff --git a/packages/status-react/src/components/ToastMessages/ToastMessageList.tsx b/packages/status-react/src/components/ToastMessages/ToastMessageList.tsx index a16e8a25..4be2e4ff 100644 --- a/packages/status-react/src/components/ToastMessages/ToastMessageList.tsx +++ b/packages/status-react/src/components/ToastMessages/ToastMessageList.tsx @@ -1,20 +1,20 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' -import { useToasts } from "../../contexts/toastProvider"; +import { useToasts } from '../../contexts/toastProvider' -import { ToastMessage } from "./ToastMessage"; +import { ToastMessage } from './ToastMessage' export function ToastMessageList() { - const { toasts } = useToasts(); + const { toasts } = useToasts() return ( - {toasts.map((toast) => ( + {toasts.map(toast => ( ))} - ); + ) } const ToastsWrapper = styled.div` @@ -26,4 +26,4 @@ const ToastsWrapper = styled.div` flex-direction: column-reverse; align-items: center; z-index: 999; -`; +` diff --git a/packages/status-react/src/components/UserCreation/UserCreation.tsx b/packages/status-react/src/components/UserCreation/UserCreation.tsx index 4207998e..295f06af 100644 --- a/packages/status-react/src/components/UserCreation/UserCreation.tsx +++ b/packages/status-react/src/components/UserCreation/UserCreation.tsx @@ -1,17 +1,17 @@ -import React from "react"; -import styled from "styled-components"; +import React from 'react' +import styled from 'styled-components' -import { useNarrow } from "../../contexts/narrowProvider"; -import { ColorChatIcon } from "../Icons/ColorChatIcon"; +import { useNarrow } from '../../contexts/narrowProvider' +import { ColorChatIcon } from '../Icons/ColorChatIcon' -import { UserCreationButtons } from "./UserCreationButtons"; +import { UserCreationButtons } from './UserCreationButtons' interface UserCreationProps { - permission: boolean; + permission: boolean } export function UserCreation({ permission }: UserCreationProps) { - const narrow = useNarrow(); + const narrow = useNarrow() if (!narrow) { return ( @@ -20,9 +20,9 @@ export function UserCreation({ permission }: UserCreationProps) { Want to jump into the discussion? - ); + ) } else { - return null; + return null } } @@ -33,7 +33,7 @@ const Wrapper = styled.div` justify-content: center; flex: 1; background-color: ${({ theme }) => theme.sectionBackgroundColor}; -`; +` const TitleWrapper = styled.div` font-weight: bold; @@ -42,4 +42,4 @@ const TitleWrapper = styled.div` text-align: center; margin: 24px 0; color: ${({ theme }) => theme.primary}; -`; +` diff --git a/packages/status-react/src/components/UserCreation/UserCreationButtons.tsx b/packages/status-react/src/components/UserCreation/UserCreationButtons.tsx index daec9217..7330a7d0 100644 --- a/packages/status-react/src/components/UserCreation/UserCreationButtons.tsx +++ b/packages/status-react/src/components/UserCreation/UserCreationButtons.tsx @@ -1,65 +1,65 @@ -import React, { useMemo } from "react"; -import styled from "styled-components"; +import React, { useMemo } from 'react' +import styled from 'styled-components' -import { useModal } from "../../contexts/modalProvider"; -import { useNarrow } from "../../contexts/narrowProvider"; -import { loadEncryptedIdentity } from "../../utils"; -import { buttonStyles, buttonTransparentStyles } from "../Buttons/buttonStyle"; -import { ProfileFoundModalName } from "../Modals/ProfileFoundModal"; -import { StatusModalName } from "../Modals/StatusModal"; -import { UserCreationModalName } from "../Modals/UserCreationModal"; -import { UserCreationStartModalName } from "../Modals/UserCreationStartModal"; -import { WalletModalName } from "../Modals/WalletModal"; -import { textSmallStyles } from "../Text"; +import { useModal } from '../../contexts/modalProvider' +import { useNarrow } from '../../contexts/narrowProvider' +import { loadEncryptedIdentity } from '../../utils' +import { buttonStyles, buttonTransparentStyles } from '../Buttons/buttonStyle' +import { ProfileFoundModalName } from '../Modals/ProfileFoundModal' +import { StatusModalName } from '../Modals/StatusModal' +import { UserCreationModalName } from '../Modals/UserCreationModal' +import { UserCreationStartModalName } from '../Modals/UserCreationStartModal' +import { WalletModalName } from '../Modals/WalletModal' +import { textSmallStyles } from '../Text' interface UserCreationProps { - permission: boolean; + permission: boolean } export function UserCreationButtons({ permission }: UserCreationProps) { - const narrow = useNarrow(); - const { setModal } = useModal(UserCreationModalName); - const { setModal: setStatusModal } = useModal(StatusModalName); - const { setModal: setWalletModal } = useModal(WalletModalName); - const { setModal: setProfileFoundModal } = useModal(ProfileFoundModalName); + const narrow = useNarrow() + const { setModal } = useModal(UserCreationModalName) + const { setModal: setStatusModal } = useModal(StatusModalName) + const { setModal: setWalletModal } = useModal(WalletModalName) + const { setModal: setProfileFoundModal } = useModal(ProfileFoundModalName) const { setModal: setCreationStartModal } = useModal( UserCreationStartModalName - ); + ) - const encryptedIdentity = useMemo(() => loadEncryptedIdentity(), []); + const encryptedIdentity = useMemo(() => loadEncryptedIdentity(), []) return ( { - setStatusModal(true); - setCreationStartModal(false); + setStatusModal(true) + setCreationStartModal(false) }} - className={`${narrow && "narrow"}`} + className={`${narrow && 'narrow'}`} > Sync with Status profile { - setWalletModal(true); - setCreationStartModal(false); + setWalletModal(true) + setCreationStartModal(false) }} - className={`${narrow && "narrow"}`} + className={`${narrow && 'narrow'}`} > Connect Ethereum Wallet {permission && ( { - encryptedIdentity ? setProfileFoundModal(true) : setModal(true); - setCreationStartModal(false); + encryptedIdentity ? setProfileFoundModal(true) : setModal(true) + setCreationStartModal(false) }} > Use a throwaway profile )} - ); + ) } const Wrapper = styled.div` @@ -67,7 +67,7 @@ const Wrapper = styled.div` flex-direction: column; align-items: center; justify-content: center; -`; +` const LoginBtn = styled.button` ${buttonStyles} @@ -78,8 +78,8 @@ const LoginBtn = styled.button` &.narrow { margin-bottom: 32px; } -`; +` const ThrowAwayButton = styled.button` ${buttonTransparentStyles} -`; +` diff --git a/packages/status-react/src/contexts/chatStateProvider.tsx b/packages/status-react/src/contexts/chatStateProvider.tsx index 44b9bba2..3c158c0b 100644 --- a/packages/status-react/src/contexts/chatStateProvider.tsx +++ b/packages/status-react/src/contexts/chatStateProvider.tsx @@ -1,4 +1,4 @@ -import React, { createContext, useContext, useState } from "react"; +import React, { createContext, useContext, useState } from 'react' export enum ChatState { ChatCreation, @@ -8,18 +8,18 @@ export enum ChatState { type ChatStateContextType = [ ChatState, React.Dispatch> -]; +] const ChatStateContext = createContext([ ChatState.ChatBody, () => undefined, -]); +]) export function useChatState() { - return useContext(ChatStateContext); + return useContext(ChatStateContext) } export function ChatStateProvider({ children }: { children: React.ReactNode }) { - const state = useState(ChatState.ChatBody); - return ; + const state = useState(ChatState.ChatBody) + return } diff --git a/packages/status-react/src/contexts/configProvider.tsx b/packages/status-react/src/contexts/configProvider.tsx index 50c1b395..a522031b 100644 --- a/packages/status-react/src/contexts/configProvider.tsx +++ b/packages/status-react/src/contexts/configProvider.tsx @@ -1,24 +1,24 @@ -import React, { createContext, useContext } from "react"; +import React, { createContext, useContext } from 'react' export type ConfigType = { - environment: string; - dappUrl: string; -}; + environment: string + dappUrl: string +} const ConfigContext = createContext({ - environment: "production", - dappUrl: "", -}); + environment: 'production', + dappUrl: '', +}) export function useConfig() { - return useContext(ConfigContext); + return useContext(ConfigContext) } type ConfigProviderProps = { - children: React.ReactNode; - config: ConfigType; -}; + children: React.ReactNode + config: ConfigType +} export function ConfigProvider({ children, config }: ConfigProviderProps) { - return ; + return } diff --git a/packages/status-react/src/contexts/fetchMetadataProvider.tsx b/packages/status-react/src/contexts/fetchMetadataProvider.tsx index c96fc4f4..b11ace2d 100644 --- a/packages/status-react/src/contexts/fetchMetadataProvider.tsx +++ b/packages/status-react/src/contexts/fetchMetadataProvider.tsx @@ -1,16 +1,16 @@ -import React, { createContext, useContext } from "react"; +import React, { createContext, useContext } from 'react' const FetchMetadataContext = createContext< ((link: string) => Promise) | undefined ->(undefined); +>(undefined) export function useFetchMetadata() { - return useContext(FetchMetadataContext); + return useContext(FetchMetadataContext) } interface FetchMetadataProviderProps { - children: React.ReactNode; - fetchMetadata?: (link: string) => Promise; + children: React.ReactNode + fetchMetadata?: (link: string) => Promise } export function FetchMetadataProvider({ @@ -19,5 +19,5 @@ export function FetchMetadataProvider({ }: FetchMetadataProviderProps) { return ( - ); + ) } diff --git a/packages/status-react/src/contexts/identityProvider.tsx b/packages/status-react/src/contexts/identityProvider.tsx index 19f32a7e..529cd241 100644 --- a/packages/status-react/src/contexts/identityProvider.tsx +++ b/packages/status-react/src/contexts/identityProvider.tsx @@ -1,14 +1,14 @@ -import { Identity, bufToHex } from "@status-im/core"; -import React, { createContext, useContext, useMemo, useState } from "react"; +import { Identity, bufToHex } from '@status-im/core' +import React, { createContext, useContext, useMemo, useState } from 'react' const IdentityContext = createContext<{ - identity: Identity | undefined; - setIdentity: React.Dispatch>; - publicKey: string | undefined; - walletIdentity: Identity | undefined; - setWalletIdentity: React.Dispatch>; - nickname: string | undefined; - setNickname: React.Dispatch>; + identity: Identity | undefined + setIdentity: React.Dispatch> + publicKey: string | undefined + walletIdentity: Identity | undefined + setWalletIdentity: React.Dispatch> + nickname: string | undefined + setNickname: React.Dispatch> }>({ identity: undefined, setIdentity: () => undefined, @@ -17,50 +17,50 @@ const IdentityContext = createContext<{ setWalletIdentity: () => undefined, nickname: undefined, setNickname: () => undefined, -}); +}) export function useIdentity() { - return useContext(IdentityContext).identity; + return useContext(IdentityContext).identity } export function useUserPublicKey() { - return useContext(IdentityContext).publicKey; + return useContext(IdentityContext).publicKey } export function useSetIdentity() { - return useContext(IdentityContext).setIdentity; + return useContext(IdentityContext).setIdentity } export function useWalletIdentity() { - return useContext(IdentityContext).walletIdentity; + return useContext(IdentityContext).walletIdentity } export function useSetWalletIdentity() { - return useContext(IdentityContext).setWalletIdentity; + return useContext(IdentityContext).setWalletIdentity } export function useNickname() { - return useContext(IdentityContext).nickname; + return useContext(IdentityContext).nickname } export function useSetNikcname() { - return useContext(IdentityContext).setNickname; + return useContext(IdentityContext).setNickname } interface IdentityProviderProps { - children: React.ReactNode; + children: React.ReactNode } export function IdentityProvider({ children }: IdentityProviderProps) { - const [identity, setIdentity] = useState(undefined); + const [identity, setIdentity] = useState(undefined) const publicKey = useMemo( () => (identity ? bufToHex(identity.publicKey) : undefined), [identity] - ); + ) const [walletIdentity, setWalletIdentity] = useState( undefined - ); - const [nickname, setNickname] = useState(undefined); + ) + const [nickname, setNickname] = useState(undefined) return ( - ); + ) } diff --git a/packages/status-react/src/contexts/messengerProvider.tsx b/packages/status-react/src/contexts/messengerProvider.tsx index 08678e83..4bac2107 100644 --- a/packages/status-react/src/contexts/messengerProvider.tsx +++ b/packages/status-react/src/contexts/messengerProvider.tsx @@ -1,8 +1,8 @@ -import React, { createContext, useContext } from "react"; +import React, { createContext, useContext } from 'react' -import { MessengerType, useMessenger } from "../hooks/messenger/useMessenger"; +import { MessengerType, useMessenger } from '../hooks/messenger/useMessenger' -import { useIdentity, useNickname } from "./identityProvider"; +import { useIdentity, useNickname } from './identityProvider' const MessengerContext = createContext({ messenger: undefined, @@ -28,23 +28,23 @@ const MessengerContext = createContext({ addMembers: () => undefined, nickname: undefined, subscriptionsDispatch: () => undefined, -}); +}) export function useMessengerContext() { - return useContext(MessengerContext); + return useContext(MessengerContext) } interface MessengerProviderProps { - communityKey: string | undefined; - children: React.ReactNode; + communityKey: string | undefined + children: React.ReactNode } export function MessengerProvider({ communityKey, children, }: MessengerProviderProps) { - const identity = useIdentity(); - const nickname = useNickname(); - const messenger = useMessenger(communityKey, identity, nickname); - return ; + const identity = useIdentity() + const nickname = useNickname() + const messenger = useMessenger(communityKey, identity, nickname) + return } diff --git a/packages/status-react/src/contexts/modalProvider.tsx b/packages/status-react/src/contexts/modalProvider.tsx index 69dee0d8..312c5794 100644 --- a/packages/status-react/src/contexts/modalProvider.tsx +++ b/packages/status-react/src/contexts/modalProvider.tsx @@ -4,60 +4,60 @@ import React, { useContext, useMemo, useState, -} from "react"; +} from 'react' import { ProfileModalName, ProfileModalProps, -} from "../components/Modals/ProfileModal"; +} from '../components/Modals/ProfileModal' type TypeMap = { - [ProfileModalName]?: ProfileModalProps; -}; + [ProfileModalName]?: ProfileModalProps +} type ModalsState = TypeMap & { - [name: string]: boolean | undefined; -}; + [name: string]: boolean | undefined +} type ModalContextType = [ state: ModalsState, setState: React.Dispatch> -]; +] -const ModalContext = createContext([{}, () => undefined]); +const ModalContext = createContext([{}, () => undefined]) export function useModal(name: T) { - const [modals, setModals] = useContext(ModalContext); + const [modals, setModals] = useContext(ModalContext) const setModal = useCallback( (state: T extends keyof TypeMap ? TypeMap[T] | false : boolean) => { - setModals((prev) => { + setModals(prev => { if (!state) { return { ...prev, [name]: undefined, - }; + } } return { ...prev, [name]: state, - }; - }); + } + }) }, [name, setModals] - ); - const isVisible = useMemo(() => !!modals?.[name], [modals, name]); + ) + const isVisible = useMemo(() => !!modals?.[name], [modals, name]) - const props = useMemo(() => modals?.[name], [modals, name]); + const props = useMemo(() => modals?.[name], [modals, name]) - return { isVisible, setModal, props }; + return { isVisible, setModal, props } } interface IdentityProviderProps { - children: React.ReactNode; + children: React.ReactNode } export function ModalProvider({ children }: IdentityProviderProps) { - const modalState = useState({}); - return ; + const modalState = useState({}) + return } diff --git a/packages/status-react/src/contexts/narrowProvider.tsx b/packages/status-react/src/contexts/narrowProvider.tsx index 6def64a3..d0a51ae5 100644 --- a/packages/status-react/src/contexts/narrowProvider.tsx +++ b/packages/status-react/src/contexts/narrowProvider.tsx @@ -1,29 +1,29 @@ -import React, { createContext, useContext } from "react"; +import React, { createContext, useContext } from 'react' -import { useRefBreak } from "../hooks/useRefBreak"; +import { useRefBreak } from '../hooks/useRefBreak' const NarrowContext = createContext<{ narrow: boolean; low: boolean }>({ narrow: false, low: false, -}); +}) export function useNarrow() { - const { narrow } = useContext(NarrowContext); - return narrow; + const { narrow } = useContext(NarrowContext) + return narrow } export function useLow() { - const { low } = useContext(NarrowContext); - return low; + const { low } = useContext(NarrowContext) + return low } interface NarrowProviderProps { - children: React.ReactNode; - myRef: React.RefObject; + children: React.ReactNode + myRef: React.RefObject } export function NarrowProvider({ children, myRef }: NarrowProviderProps) { - const narrow = useRefBreak(myRef?.current?.offsetWidth ?? 0, 736); - const low = useRefBreak(myRef?.current?.offsetHeight ?? 0, 465); - return ; + const narrow = useRefBreak(myRef?.current?.offsetWidth ?? 0, 736) + const low = useRefBreak(myRef?.current?.offsetHeight ?? 0, 465) + return } diff --git a/packages/status-react/src/contexts/scrollProvider.tsx b/packages/status-react/src/contexts/scrollProvider.tsx index 3e8b8540..85ab4b03 100644 --- a/packages/status-react/src/contexts/scrollProvider.tsx +++ b/packages/status-react/src/contexts/scrollProvider.tsx @@ -4,67 +4,67 @@ import React, { useContext, useEffect, useState, -} from "react"; +} from 'react' -import { useMessengerContext } from "../contexts/messengerProvider"; -import { ChatMessage } from "../models/ChatMessage"; +import { useMessengerContext } from '../contexts/messengerProvider' +import { ChatMessage } from '../models/ChatMessage' const ScrollContext = createContext< (msg: ChatMessage, channelId?: string) => void ->(() => undefined); +>(() => undefined) export function useScrollToMessage() { - return useContext(ScrollContext); + return useContext(ScrollContext) } interface ScrollProviderProps { - children: React.ReactNode; + children: React.ReactNode } export function ScrollProvider({ children }: ScrollProviderProps) { const scrollToDivId = useCallback((id: string) => { - const quoteDiv = document.getElementById(id); + const quoteDiv = document.getElementById(id) if (quoteDiv) { quoteDiv.scrollIntoView({ - behavior: "smooth", - block: "center", - inline: "center", - }); - quoteDiv.style.background = "lightblue"; - quoteDiv.style.transition = "background-color 1000ms linear"; + behavior: 'smooth', + block: 'center', + inline: 'center', + }) + quoteDiv.style.background = 'lightblue' + quoteDiv.style.transition = 'background-color 1000ms linear' window.setTimeout(() => { - quoteDiv.style.background = ""; + quoteDiv.style.background = '' window.setTimeout(() => { - quoteDiv.style.transition = ""; - }, 1000); - }, 1000); + quoteDiv.style.transition = '' + }, 1000) + }, 1000) } - }, []); + }, []) - const { activeChannel, channelsDispatch } = useMessengerContext(); - const [scrollToMessage, setScrollToMessage] = useState(""); - const [messageChannel, setMessageChannel] = useState(""); + const { activeChannel, channelsDispatch } = useMessengerContext() + const [scrollToMessage, setScrollToMessage] = useState('') + const [messageChannel, setMessageChannel] = useState('') useEffect(() => { if (scrollToMessage && messageChannel) { if (activeChannel?.id === messageChannel) { - scrollToDivId(scrollToMessage); - setScrollToMessage(""); - setMessageChannel(""); + scrollToDivId(scrollToMessage) + setScrollToMessage('') + setMessageChannel('') } } - }, [activeChannel, scrollToMessage, messageChannel, scrollToDivId]); + }, [activeChannel, scrollToMessage, messageChannel, scrollToDivId]) const scroll = useCallback( (msg: ChatMessage, channelId?: string) => { if (!channelId || activeChannel?.id === channelId) { - scrollToDivId(msg.id); + scrollToDivId(msg.id) } else { - setMessageChannel(channelId); - setScrollToMessage(msg.id); - channelsDispatch({ type: "ChangeActive", payload: channelId }); + setMessageChannel(channelId) + setScrollToMessage(msg.id) + channelsDispatch({ type: 'ChangeActive', payload: channelId }) } }, [scrollToDivId, channelsDispatch, activeChannel] - ); - return ; + ) + return } diff --git a/packages/status-react/src/contexts/toastProvider.tsx b/packages/status-react/src/contexts/toastProvider.tsx index 06eeb627..a44d58d0 100644 --- a/packages/status-react/src/contexts/toastProvider.tsx +++ b/packages/status-react/src/contexts/toastProvider.tsx @@ -1,26 +1,26 @@ -import React, { createContext, useContext, useState } from "react"; +import React, { createContext, useContext, useState } from 'react' -import { Toast } from "../models/Toast"; +import { Toast } from '../models/Toast' const ToastContext = createContext<{ - toasts: Toast[]; - setToasts: React.Dispatch>; + toasts: Toast[] + setToasts: React.Dispatch> }>({ toasts: [], setToasts: () => undefined, -}); +}) export function useToasts() { - return useContext(ToastContext); + return useContext(ToastContext) } interface ToastProviderProps { - children: React.ReactNode; + children: React.ReactNode } export function ToastProvider({ children }: ToastProviderProps) { - const [toasts, setToasts] = useState([]); + const [toasts, setToasts] = useState([]) return ( - ); + ) } diff --git a/packages/status-react/src/groupChatComponents/GroupChat.tsx b/packages/status-react/src/groupChatComponents/GroupChat.tsx index 6c7d8f45..30e5cf21 100644 --- a/packages/status-react/src/groupChatComponents/GroupChat.tsx +++ b/packages/status-react/src/groupChatComponents/GroupChat.tsx @@ -1,30 +1,30 @@ -import React, { useRef } from "react"; -import { ThemeProvider } from "styled-components"; -import styled from "styled-components"; +import React, { useRef } from 'react' +import { ThemeProvider } from 'styled-components' +import styled from 'styled-components' -import { ConfigType } from ".."; -import { ChatStateProvider } from "../contexts/chatStateProvider"; -import { ConfigProvider } from "../contexts/configProvider"; -import { FetchMetadataProvider } from "../contexts/fetchMetadataProvider"; -import { IdentityProvider } from "../contexts/identityProvider"; -import { MessengerProvider } from "../contexts/messengerProvider"; -import { ModalProvider } from "../contexts/modalProvider"; -import { NarrowProvider } from "../contexts/narrowProvider"; -import { ToastProvider } from "../contexts/toastProvider"; -import { Metadata } from "../models/Metadata"; -import { GlobalStyle } from "../styles/GlobalStyle"; -import { Theme } from "../styles/themes"; +import { ConfigType } from '..' +import { ChatStateProvider } from '../contexts/chatStateProvider' +import { ConfigProvider } from '../contexts/configProvider' +import { FetchMetadataProvider } from '../contexts/fetchMetadataProvider' +import { IdentityProvider } from '../contexts/identityProvider' +import { MessengerProvider } from '../contexts/messengerProvider' +import { ModalProvider } from '../contexts/modalProvider' +import { NarrowProvider } from '../contexts/narrowProvider' +import { ToastProvider } from '../contexts/toastProvider' +import { Metadata } from '../models/Metadata' +import { GlobalStyle } from '../styles/GlobalStyle' +import { Theme } from '../styles/themes' -import { GroupChatRoom } from "./GroupChatRoom"; +import { GroupChatRoom } from './GroupChatRoom' interface GroupChatProps { - theme: Theme; - config: ConfigType; - fetchMetadata?: (url: string) => Promise; + theme: Theme + config: ConfigType + fetchMetadata?: (url: string) => Promise } export function GroupChat({ theme, config, fetchMetadata }: GroupChatProps) { - const ref = useRef(null); + const ref = useRef(null) return ( @@ -49,10 +49,10 @@ export function GroupChat({ theme, config, fetchMetadata }: GroupChatProps) { - ); + ) } const Wrapper = styled.div` height: 100%; overflow: hidden; -`; +` diff --git a/packages/status-react/src/groupChatComponents/GroupChat/GroupChatBody.tsx b/packages/status-react/src/groupChatComponents/GroupChat/GroupChatBody.tsx index 5d0cc3e1..180cb466 100644 --- a/packages/status-react/src/groupChatComponents/GroupChat/GroupChatBody.tsx +++ b/packages/status-react/src/groupChatComponents/GroupChat/GroupChatBody.tsx @@ -1,21 +1,18 @@ -import React, { useCallback, useEffect, useMemo, useState } from "react"; -import styled from "styled-components"; +import React, { useCallback, useEffect, useMemo, useState } from 'react' +import styled from 'styled-components' -import { ChatCreation } from "../../components/Chat/ChatCreation"; -import { ChatInput } from "../../components/Chat/ChatInput"; -import { - ChatTopbar, - ChatTopbarLoading, -} from "../../components/Chat/ChatTopbar"; -import { TokenRequirement } from "../../components/Form/TokenRequirement"; -import { MessagesList } from "../../components/Messages/MessagesList"; -import { NarrowChannels } from "../../components/NarrowMode/NarrowChannels"; -import { NarrowMembers } from "../../components/NarrowMode/NarrowMembers"; -import { LoadingSkeleton } from "../../components/Skeleton/LoadingSkeleton"; -import { useMessengerContext } from "../../contexts/messengerProvider"; -import { useNarrow } from "../../contexts/narrowProvider"; -import { Reply } from "../../hooks/useReply"; -import { ChannelData } from "../../models/ChannelData"; +import { ChatCreation } from '../../components/Chat/ChatCreation' +import { ChatInput } from '../../components/Chat/ChatInput' +import { ChatTopbar, ChatTopbarLoading } from '../../components/Chat/ChatTopbar' +import { TokenRequirement } from '../../components/Form/TokenRequirement' +import { MessagesList } from '../../components/Messages/MessagesList' +import { NarrowChannels } from '../../components/NarrowMode/NarrowChannels' +import { NarrowMembers } from '../../components/NarrowMode/NarrowMembers' +import { LoadingSkeleton } from '../../components/Skeleton/LoadingSkeleton' +import { useMessengerContext } from '../../contexts/messengerProvider' +import { useNarrow } from '../../contexts/narrowProvider' +import { Reply } from '../../hooks/useReply' +import { ChannelData } from '../../models/ChannelData' export enum ChatBodyState { Chat, @@ -24,30 +21,30 @@ export enum ChatBodyState { } function ChatBodyLoading() { - const narrow = useNarrow(); + const narrow = useNarrow() return ( - + undefined} /> - ); + ) } type ChatBodyContentProps = { - showState: ChatBodyState; - switchShowState: (state: ChatBodyState) => void; - channel: ChannelData; -}; + showState: ChatBodyState + switchShowState: (state: ChatBodyState) => void + channel: ChannelData +} function ChatBodyContent({ showState, switchShowState, channel, }: ChatBodyContentProps) { - const [reply, setReply] = useState(undefined); + const [reply, setReply] = useState(undefined) switch (showState) { case ChatBodyState.Chat: @@ -56,28 +53,28 @@ function ChatBodyContent({ - ); + ) case ChatBodyState.Channels: return ( switchShowState(ChatBodyState.Channels)} /> - ); + ) case ChatBodyState.Members: return ( switchShowState(ChatBodyState.Members)} /> - ); + ) } } interface GroupChatBodyProps { - onClick: () => void; - showMembers: boolean; - permission: boolean; - editGroup: boolean; - setEditGroup: React.Dispatch>; + onClick: () => void + showMembers: boolean + permission: boolean + editGroup: boolean + setEditGroup: React.Dispatch> } export function GroupChatBody({ @@ -87,26 +84,26 @@ export function GroupChatBody({ editGroup, setEditGroup, }: GroupChatBodyProps) { - const { activeChannel, loadingMessenger } = useMessengerContext(); + const { activeChannel, loadingMessenger } = useMessengerContext() - const narrow = useNarrow(); - const className = useMemo(() => (narrow ? "narrow" : ""), [narrow]); + const narrow = useNarrow() + const className = useMemo(() => (narrow ? 'narrow' : ''), [narrow]) - const [showState, setShowState] = useState(ChatBodyState.Chat); + const [showState, setShowState] = useState(ChatBodyState.Chat) const switchShowState = useCallback( (state: ChatBodyState) => { if (narrow) { - setShowState((prev) => (prev === state ? ChatBodyState.Chat : state)); + setShowState(prev => (prev === state ? ChatBodyState.Chat : state)) } }, [narrow] - ); + ) useEffect(() => { if (!narrow) { - setShowState(ChatBodyState.Chat); + setShowState(ChatBodyState.Chat) } - }, [narrow]); + }, [narrow]) if (!loadingMessenger && activeChannel) { return ( @@ -138,10 +135,10 @@ export function GroupChatBody({ )} - ); + ) } - return ; + return } export const Wrapper = styled.div` @@ -156,7 +153,7 @@ export const Wrapper = styled.div` &.narrow { width: 100%; } -`; +` const ChatBodyWrapper = styled.div` width: 100%; @@ -165,7 +162,7 @@ const ChatBodyWrapper = styled.div` flex-direction: column; flex: 1; background: ${({ theme }) => theme.bodyBackgroundColor}; -`; +` const BluredWrapper = styled.div` width: 100%; @@ -179,4 +176,4 @@ const BluredWrapper = styled.div` background: ${({ theme }) => theme.bodyBackgroundGradient}; backdrop-filter: blur(4px); z-index: 2; -`; +` diff --git a/packages/status-react/src/groupChatComponents/GroupChatRoom.tsx b/packages/status-react/src/groupChatComponents/GroupChatRoom.tsx index b6f09af2..f5bc54b4 100644 --- a/packages/status-react/src/groupChatComponents/GroupChatRoom.tsx +++ b/packages/status-react/src/groupChatComponents/GroupChatRoom.tsx @@ -1,26 +1,26 @@ -import React, { useState } from "react"; -import styled from "styled-components"; +import React, { useState } from 'react' +import styled from 'styled-components' -import { Channels } from "../components/Channels/Channels"; -import { ChatCreation } from "../components/Chat/ChatCreation"; -import { AgreementModal } from "../components/Modals/AgreementModal"; -import { CoinbaseModal } from "../components/Modals/CoinbaseModal"; -import { EditModal } from "../components/Modals/EditModal"; -import { LeavingModal } from "../components/Modals/LeavingModal"; -import { LogoutModal } from "../components/Modals/LogoutModal"; -import { ProfileFoundModal } from "../components/Modals/ProfileFoundModal"; -import { ProfileModal } from "../components/Modals/ProfileModal"; -import { StatusModal } from "../components/Modals/StatusModal"; -import { UserCreationModal } from "../components/Modals/UserCreationModal"; -import { UserCreationStartModal } from "../components/Modals/UserCreationStartModal"; -import { WalletConnectModal } from "../components/Modals/WalletConnectModal"; -import { WalletModal } from "../components/Modals/WalletModal"; -import { ToastMessageList } from "../components/ToastMessages/ToastMessageList"; -import { ChatState, useChatState } from "../contexts/chatStateProvider"; -import { useNarrow } from "../contexts/narrowProvider"; +import { Channels } from '../components/Channels/Channels' +import { ChatCreation } from '../components/Chat/ChatCreation' +import { AgreementModal } from '../components/Modals/AgreementModal' +import { CoinbaseModal } from '../components/Modals/CoinbaseModal' +import { EditModal } from '../components/Modals/EditModal' +import { LeavingModal } from '../components/Modals/LeavingModal' +import { LogoutModal } from '../components/Modals/LogoutModal' +import { ProfileFoundModal } from '../components/Modals/ProfileFoundModal' +import { ProfileModal } from '../components/Modals/ProfileModal' +import { StatusModal } from '../components/Modals/StatusModal' +import { UserCreationModal } from '../components/Modals/UserCreationModal' +import { UserCreationStartModal } from '../components/Modals/UserCreationStartModal' +import { WalletConnectModal } from '../components/Modals/WalletConnectModal' +import { WalletModal } from '../components/Modals/WalletModal' +import { ToastMessageList } from '../components/ToastMessages/ToastMessageList' +import { ChatState, useChatState } from '../contexts/chatStateProvider' +import { useNarrow } from '../contexts/narrowProvider' -import { GroupChatBody } from "./GroupChat/GroupChatBody"; -import { GroupMembers } from "./GroupMembers/GroupMembers"; +import { GroupChatBody } from './GroupChat/GroupChatBody' +import { GroupMembers } from './GroupMembers/GroupMembers' function Modals() { return ( @@ -38,14 +38,14 @@ function Modals() { - ); + ) } export function GroupChatRoom() { - const [state] = useChatState(); - const [showMembers, setShowMembers] = useState(false); - const [editGroup, setEditGroup] = useState(false); - const narrow = useNarrow(); + const [state] = useChatState() + const [showMembers, setShowMembers] = useState(false) + const [editGroup, setEditGroup] = useState(false) + const narrow = useNarrow() return ( {!narrow && ( @@ -69,7 +69,7 @@ export function GroupChatRoom() { - ); + ) } const ChatWrapper = styled.div` @@ -77,7 +77,7 @@ const ChatWrapper = styled.div` height: 100%; display: flex; position: relative; -`; +` const ChannelsWrapper = styled.div` width: 21%; @@ -87,4 +87,4 @@ const ChannelsWrapper = styled.div` padding: 10px 16px; display: flex; flex-direction: column; -`; +` diff --git a/packages/status-react/src/groupChatComponents/GroupMembers/GroupMembers.tsx b/packages/status-react/src/groupChatComponents/GroupMembers/GroupMembers.tsx index dd4fd4a4..25ae0f4a 100644 --- a/packages/status-react/src/groupChatComponents/GroupMembers/GroupMembers.tsx +++ b/packages/status-react/src/groupChatComponents/GroupMembers/GroupMembers.tsx @@ -1,19 +1,19 @@ -import React, { useMemo, useState } from "react"; -import styled from "styled-components"; +import React, { useMemo, useState } from 'react' +import styled from 'styled-components' -import { MembersList } from "../../components/Members/MembersList"; -import { useMessengerContext } from "../../contexts/messengerProvider"; +import { MembersList } from '../../components/Members/MembersList' +import { useMessengerContext } from '../../contexts/messengerProvider' export function GroupMembers() { - const { addContact, activeChannel } = useMessengerContext(); + const { addContact, activeChannel } = useMessengerContext() const heading = useMemo( () => - activeChannel && activeChannel?.type === "group" - ? "Group members" - : "Members", + activeChannel && activeChannel?.type === 'group' + ? 'Group members' + : 'Members', [activeChannel] - ); - const [newUserInput, setNewUserInput] = useState(""); + ) + const [newUserInput, setNewUserInput] = useState('') return ( <> @@ -21,12 +21,12 @@ export function GroupMembers() { setNewUserInput(e.target.value)} + onChange={e => setNewUserInput(e.target.value)} /> - ); + ) } const MembersWrapper = styled.div` @@ -38,7 +38,7 @@ const MembersWrapper = styled.div` background-color: ${({ theme }) => theme.sectionBackgroundColor}; padding: 16px; overflow-y: scroll; -`; +` const MemberHeading = styled.h2` font-weight: 500; @@ -46,4 +46,4 @@ const MemberHeading = styled.h2` line-height: 22px; color: ${({ theme }) => theme.primary}; margin-bottom: 16px; -`; +` diff --git a/packages/status-react/src/hooks/messenger/useChannelsReducer.ts b/packages/status-react/src/hooks/messenger/useChannelsReducer.ts index 728a8f31..0f68a098 100644 --- a/packages/status-react/src/hooks/messenger/useChannelsReducer.ts +++ b/packages/status-react/src/hooks/messenger/useChannelsReducer.ts @@ -1,79 +1,79 @@ -import { useReducer } from "react"; +import { useReducer } from 'react' -import { ChannelData, ChannelsData } from "../../models/ChannelData"; +import { ChannelData, ChannelsData } from '../../models/ChannelData' export type ChannelsState = { - channels: ChannelsData; - activeChannel: ChannelData; -}; + channels: ChannelsData + activeChannel: ChannelData +} export type ChannelAction = - | { type: "AddChannel"; payload: ChannelData } - | { type: "UpdateActive"; payload: ChannelData } - | { type: "ChangeActive"; payload: string } - | { type: "ToggleMuted"; payload: string } - | { type: "RemoveChannel"; payload: string }; + | { type: 'AddChannel'; payload: ChannelData } + | { type: 'UpdateActive'; payload: ChannelData } + | { type: 'ChangeActive'; payload: string } + | { type: 'ToggleMuted'; payload: string } + | { type: 'RemoveChannel'; payload: string } function channelReducer( state: ChannelsState, action: ChannelAction ): ChannelsState { switch (action.type) { - case "AddChannel": { + case 'AddChannel': { const channels = { ...state.channels, [action.payload.id]: action.payload, - }; - return { channels, activeChannel: action.payload }; + } + return { channels, activeChannel: action.payload } } - case "UpdateActive": { - const activeChannel = state.activeChannel; + case 'UpdateActive': { + const activeChannel = state.activeChannel if (activeChannel) { return { channels: { ...state.channels, [activeChannel.id]: action.payload }, activeChannel: action.payload, - }; + } } - return state; + return state } - case "ChangeActive": { - const newActive = state.channels[action.payload]; + case 'ChangeActive': { + const newActive = state.channels[action.payload] if (newActive) { - return { ...state, activeChannel: newActive }; + return { ...state, activeChannel: newActive } } - return state; + return state } - case "ToggleMuted": { - const channel = state.channels[action.payload]; + case 'ToggleMuted': { + const channel = state.channels[action.payload] if (channel) { const updatedChannel: ChannelData = { ...channel, isMuted: !channel.isMuted, - }; + } return { channels: { ...state.channels, [channel.id]: updatedChannel }, activeChannel: updatedChannel, - }; + } } - return state; + return state } - case "RemoveChannel": { - const channelsCopy = { ...state.channels }; - delete channelsCopy[action.payload]; - let newActive = { id: "", name: "", type: "channel" } as ChannelData; + case 'RemoveChannel': { + const channelsCopy = { ...state.channels } + delete channelsCopy[action.payload] + let newActive = { id: '', name: '', type: 'channel' } as ChannelData if (Object.values(channelsCopy).length > 0) { - newActive = Object.values(channelsCopy)[0]; + newActive = Object.values(channelsCopy)[0] } - return { channels: channelsCopy, activeChannel: newActive }; + return { channels: channelsCopy, activeChannel: newActive } } default: - throw new Error(); + throw new Error() } } export function useChannelsReducer() { return useReducer(channelReducer, { channels: {}, - activeChannel: { id: "", name: "", type: "channel" }, - } as ChannelsState); + activeChannel: { id: '', name: '', type: 'channel' }, + } as ChannelsState) } diff --git a/packages/status-react/src/hooks/messenger/useContacts.ts b/packages/status-react/src/hooks/messenger/useContacts.ts index c32cd60c..af826e31 100644 --- a/packages/status-react/src/hooks/messenger/useContacts.ts +++ b/packages/status-react/src/hooks/messenger/useContacts.ts @@ -2,93 +2,93 @@ import { Contacts as ContactsClass, Identity, Messenger, - bufToHex -} from "@status-im/core"; -import { useMemo, useReducer, useState } from "react"; + bufToHex, +} from '@status-im/core' +import { useMemo, useReducer, useState } from 'react' -import { Contacts } from "../../models/Contact"; +import { Contacts } from '../../models/Contact' export type ContactsAction = - | { type: "updateOnline"; payload: { id: string; clock: number } } - | { type: "setTrueName"; payload: { id: string; trueName: string } } + | { type: 'updateOnline'; payload: { id: string; clock: number } } + | { type: 'setTrueName'; payload: { id: string; trueName: string } } | { - type: "setCustomName"; - payload: { id: string; customName: string | undefined }; + type: 'setCustomName' + payload: { id: string; customName: string | undefined } } | { - type: "setIsUntrustworthy"; - payload: { id: string; isUntrustworthy: boolean }; + type: 'setIsUntrustworthy' + payload: { id: string; isUntrustworthy: boolean } } - | { type: "setIsFriend"; payload: { id: string; isFriend: boolean } } - | { type: "setBlocked"; payload: { id: string; blocked: boolean } } - | { type: "toggleBlocked"; payload: { id: string } } - | { type: "toggleTrustworthy"; payload: { id: string } }; + | { type: 'setIsFriend'; payload: { id: string; isFriend: boolean } } + | { type: 'setBlocked'; payload: { id: string; blocked: boolean } } + | { type: 'toggleBlocked'; payload: { id: string } } + | { type: 'toggleTrustworthy'; payload: { id: string } } function contactsReducer(state: Contacts, action: ContactsAction): Contacts { - const id = action.payload.id; - const prev = state[id]; + const id = action.payload.id + const prev = state[id] switch (action.type) { - case "updateOnline": { - const now = Date.now(); - const clock = action.payload.clock; + case 'updateOnline': { + const now = Date.now() + const clock = action.payload.clock if (prev) { - return { ...state, [id]: { ...prev, online: clock > now - 301000 } }; + return { ...state, [id]: { ...prev, online: clock > now - 301000 } } } - return { ...state, [id]: { id, trueName: id.slice(0, 10) } }; + return { ...state, [id]: { id, trueName: id.slice(0, 10) } } } - case "setTrueName": { - const trueName = action.payload.trueName; + case 'setTrueName': { + const trueName = action.payload.trueName if (prev) { - return { ...state, [id]: { ...prev, trueName } }; + return { ...state, [id]: { ...prev, trueName } } } - return { ...state, [id]: { id, trueName } }; + return { ...state, [id]: { id, trueName } } } - case "setCustomName": { - const customName = action.payload.customName; + case 'setCustomName': { + const customName = action.payload.customName if (prev) { - return { ...state, [id]: { ...prev, customName } }; + return { ...state, [id]: { ...prev, customName } } } - return state; + return state } - case "setIsUntrustworthy": { - const isUntrustworthy = action.payload.isUntrustworthy; + case 'setIsUntrustworthy': { + const isUntrustworthy = action.payload.isUntrustworthy if (prev) { - return { ...state, [id]: { ...prev, isUntrustworthy } }; + return { ...state, [id]: { ...prev, isUntrustworthy } } } - return state; + return state } - case "setIsFriend": { - const isFriend = action.payload.isFriend; + case 'setIsFriend': { + const isFriend = action.payload.isFriend if (prev) { - return { ...state, [id]: { ...prev, isFriend } }; + return { ...state, [id]: { ...prev, isFriend } } } - return state; + return state } - case "setBlocked": { - const blocked = action.payload.blocked; + case 'setBlocked': { + const blocked = action.payload.blocked if (prev) { - return { ...state, [id]: { ...prev, blocked } }; + return { ...state, [id]: { ...prev, blocked } } } - return state; + return state } - case "toggleBlocked": { + case 'toggleBlocked': { if (prev) { - return { ...state, [id]: { ...prev, blocked: !prev.blocked } }; + return { ...state, [id]: { ...prev, blocked: !prev.blocked } } } - return state; + return state } - case "toggleTrustworthy": { + case 'toggleTrustworthy': { if (prev) { return { ...state, [id]: { ...prev, isUntrustworthy: !prev.isUntrustworthy }, - }; + } } - return state; + return state } default: - throw new Error(); + throw new Error() } } @@ -97,8 +97,8 @@ export function useContacts( identity: Identity | undefined, newNickname: string | undefined ) { - const [nickname, setNickname] = useState(undefined); - const [contacts, contactsDispatch] = useReducer(contactsReducer, {}); + const [nickname, setNickname] = useState(undefined) + const [contacts, contactsDispatch] = useReducer(contactsReducer, {}) const contactsClass = useMemo(() => { if (messenger && messenger.identity === identity) { @@ -106,21 +106,21 @@ export function useContacts( identity, messenger.waku, (id, clock) => - contactsDispatch({ type: "updateOnline", payload: { id, clock } }), + contactsDispatch({ type: 'updateOnline', payload: { id, clock } }), (id, nickname) => { if (identity?.publicKey && id === bufToHex(identity.publicKey)) { - setNickname(nickname); + setNickname(nickname) } contactsDispatch({ - type: "setTrueName", + type: 'setTrueName', payload: { id, trueName: nickname }, - }); + }) }, newNickname - ); - return newContacts; + ) + return newContacts } - }, [messenger, identity, newNickname]); + }, [messenger, identity, newNickname]) - return { contacts, contactsDispatch, contactsClass, nickname }; + return { contacts, contactsDispatch, contactsClass, nickname } } diff --git a/packages/status-react/src/hooks/messenger/useGroupChats.ts b/packages/status-react/src/hooks/messenger/useGroupChats.ts index ec381c90..ec75e01c 100644 --- a/packages/status-react/src/hooks/messenger/useGroupChats.ts +++ b/packages/status-react/src/hooks/messenger/useGroupChats.ts @@ -5,15 +5,15 @@ import { Identity, Messenger, ChatMessage as StatusChatMessage, -} from "@status-im/core"; -import { useCallback, useMemo } from "react"; +} from '@status-im/core' +import { useCallback, useMemo } from 'react' -import { ChannelData } from "../../models/ChannelData"; -import { ChatMessage } from "../../models/ChatMessage"; -import { Contact } from "../../models/Contact"; -import { uintToImgUrl } from "../../utils"; +import { ChannelData } from '../../models/ChannelData' +import { ChatMessage } from '../../models/ChatMessage' +import { Contact } from '../../models/Contact' +import { uintToImgUrl } from '../../utils' -import { ChannelAction } from "./useChannelsReducer"; +import { ChannelAction } from './useChannelsReducer' const contactFromId = (member: string): Contact => { return { @@ -22,8 +22,8 @@ const contactFromId = (member: string): Contact => { isUntrustworthy: false, online: false, trueName: member, - }; -}; + } +} export function useGroupChats( messenger: Messenger | undefined, @@ -35,92 +35,90 @@ export function useGroupChats( const groupChat = useMemo(() => { if (messenger && identity && contactsClass) { const addChat = (chat: GroupChat) => { - const members = chat.members - .map(member => member.id) - .map(contactFromId); + const members = chat.members.map(member => member.id).map(contactFromId) const channel: ChannelData = chat.members.length > 2 ? { id: chat.chatId, name: chat.name ?? chat.chatId.slice(0, 10), - type: "group", + type: 'group', description: `${chat.members.length} members`, members, } : { id: chat.chatId, name: chat.members[0].id, - type: "dm", + type: 'dm', description: `Chatkey: ${chat.members[0].id}`, members, - }; - chat.members.forEach(member => contactsClass.addContact(member.id)); - dispatch({ type: "AddChannel", payload: channel }); - }; + } + chat.members.forEach(member => contactsClass.addContact(member.id)) + dispatch({ type: 'AddChannel', payload: channel }) + } const removeChat = (chat: GroupChat) => { - dispatch({ type: "RemoveChannel", payload: chat.chatId }); - }; + dispatch({ type: 'RemoveChannel', payload: chat.chatId }) + } const handleMessage = (msg: StatusChatMessage, sender: string) => { - let image: string | undefined = undefined; + let image: string | undefined = undefined if (msg.image) { - image = uintToImgUrl(msg.image.payload); + image = uintToImgUrl(msg.image.payload) } addChatMessage( new ChatMessage( - msg.text ?? "", + msg.text ?? '', new Date(msg.clock ?? 0), sender, image, msg.responseTo ), msg.chatId - ); - }; + ) + } return new GroupChats( identity, messenger.waku, addChat, removeChat, handleMessage - ); + ) } - }, [messenger, identity, contactsClass, addChatMessage, dispatch]); + }, [messenger, identity, contactsClass, addChatMessage, dispatch]) const createGroupChat = useCallback( (members: string[]) => { if (groupChat) { - groupChat.createGroupChat(members); + groupChat.createGroupChat(members) } }, [groupChat] - ); + ) const changeGroupChatName = useCallback( (name: string, chatId: string) => { if (groupChat) { - groupChat.changeChatName(chatId, name); + groupChat.changeChatName(chatId, name) } }, [groupChat] - ); + ) const removeChannel = useCallback( (channelId: string) => { if (groupChat) { - groupChat.quitChat(channelId); + groupChat.quitChat(channelId) } }, [groupChat] - ); + ) const addMembers = useCallback( (members: string[], chatId: string) => { if (groupChat) { - groupChat.addMembers(chatId, members); + groupChat.addMembers(chatId, members) } }, [groupChat] - ); + ) return { createGroupChat, @@ -128,5 +126,5 @@ export function useGroupChats( groupChat, changeGroupChatName, addMembers, - }; + } } diff --git a/packages/status-react/src/hooks/messenger/useLoadPrevDay.ts b/packages/status-react/src/hooks/messenger/useLoadPrevDay.ts index 6fa7094d..114f93c7 100644 --- a/packages/status-react/src/hooks/messenger/useLoadPrevDay.ts +++ b/packages/status-react/src/hooks/messenger/useLoadPrevDay.ts @@ -1,7 +1,7 @@ -import { GroupChats, Messenger } from "@status-im/core"; -import { useCallback, useEffect, useRef, useState } from "react"; +import { GroupChats, Messenger } from '@status-im/core' +import { useCallback, useEffect, useRef, useState } from 'react' -const _MS_PER_DAY = 1000 * 60 * 60 * 24; +const _MS_PER_DAY = 1000 * 60 * 60 * 24 export function useLoadPrevDay( chatId: string, @@ -9,62 +9,62 @@ export function useLoadPrevDay( groupChats?: GroupChats ) { const loadingPreviousMessages = useRef<{ - [chatId: string]: boolean; - }>({}); + [chatId: string]: boolean + }>({}) const lastLoadTime = useRef<{ - [chatId: string]: Date; - }>({}); - const [loadingMessages, setLoadingMessages] = useState(false); + [chatId: string]: Date + }>({}) + const [loadingMessages, setLoadingMessages] = useState(false) useEffect(() => { if (chatId) { - setLoadingMessages(loadingPreviousMessages.current[chatId]); + setLoadingMessages(loadingPreviousMessages.current[chatId]) } - }, [chatId]); + }, [chatId]) const loadPrevDay = useCallback( async (id: string, groupChat?: boolean) => { if (messenger && id) { - const endTime = lastLoadTime.current[id] ?? new Date(); - const startTime = new Date(endTime.getTime() - _MS_PER_DAY * 5); + const endTime = lastLoadTime.current[id] ?? new Date() + const startTime = new Date(endTime.getTime() - _MS_PER_DAY * 5) const timeDiff = Math.floor( (new Date().getTime() - endTime.getTime()) / _MS_PER_DAY - ); + ) if (timeDiff < 28) { if (!loadingPreviousMessages.current[id]) { - loadingPreviousMessages.current[id] = true; - setLoadingMessages(true); - let amountOfMessages = 0; - let failed = true; + loadingPreviousMessages.current[id] = true + setLoadingMessages(true) + let amountOfMessages = 0 + let failed = true try { if (groupChat && groupChats) { amountOfMessages = await groupChats.retrievePreviousMessages( id, startTime, endTime - ); + ) } else { amountOfMessages = await messenger.retrievePreviousMessages( id, startTime, endTime - ); + ) } - lastLoadTime.current[id] = startTime; - failed = false; + lastLoadTime.current[id] = startTime + failed = false } catch { - failed = true; + failed = true } - loadingPreviousMessages.current[id] = false; - setLoadingMessages(false); + loadingPreviousMessages.current[id] = false + setLoadingMessages(false) if (amountOfMessages === 0 && !failed) { - loadPrevDay(id, groupChat); + loadPrevDay(id, groupChat) } } } } }, [messenger, groupChats] - ); - return { loadingMessages, loadPrevDay }; + ) + return { loadingMessages, loadPrevDay } } diff --git a/packages/status-react/src/hooks/messenger/useMessages.ts b/packages/status-react/src/hooks/messenger/useMessages.ts index b3b7d92b..70661f2f 100644 --- a/packages/status-react/src/hooks/messenger/useMessages.ts +++ b/packages/status-react/src/hooks/messenger/useMessages.ts @@ -2,14 +2,14 @@ import { ApplicationMetadataMessage, Contacts, Identity, - bufToHex -} from "@status-im/core"; -import { useCallback, useMemo, useState } from "react"; + bufToHex, +} from '@status-im/core' +import { useCallback, useMemo, useState } from 'react' -import { ChatMessage } from "../../models/ChatMessage"; -import { binarySetInsert } from "../../utils"; +import { ChatMessage } from '../../models/ChatMessage' +import { binarySetInsert } from '../../utils' -import { useNotifications } from "./useNotifications"; +import { useNotifications } from './useNotifications' export function useMessages( chatId: string, @@ -21,25 +21,25 @@ export function useMessages( ) { const [messages, setMessages] = useState<{ [chatId: string]: ChatMessage[] }>( {} - ); + ) const { notifications, incNotification, clearNotifications } = - useNotifications(); + useNotifications() const { notifications: mentions, incNotification: incMentions, clearNotifications: clearMentions, - } = useNotifications(); + } = useNotifications() const addChatMessage = useCallback( (newMessage: ChatMessage | undefined, id: string) => { if (newMessage) { - contacts?.addContact(newMessage.sender); + contacts?.addContact(newMessage.sender) setMessages(prev => { if (newMessage.responseTo && prev[id]) { newMessage.quote = prev[id].find( msg => msg.id === newMessage.responseTo - ); + ) } return { ...prev, @@ -49,37 +49,37 @@ export function useMessages( (a, b) => a.date < b.date, (a, b) => a.date.getTime() === b.date.getTime() ), - }; - }); + } + }) subscriptions.current.forEach(subscription => subscription(newMessage, id) - ); - incNotification(id); + ) + incNotification(id) if ( identity && newMessage.content.includes(`@${bufToHex(identity.publicKey)}`) ) { - incMentions(id); + incMentions(id) } } }, [contacts, identity, subscriptions, incMentions, incNotification] - ); + ) const addMessage = useCallback( (msg: ApplicationMetadataMessage, id: string, date: Date) => { - const newMessage = ChatMessage.fromMetadataMessage(msg, date); - addChatMessage(newMessage, id); + const newMessage = ChatMessage.fromMetadataMessage(msg, date) + addChatMessage(newMessage, id) }, [addChatMessage] - ); + ) const activeMessages = useMemo(() => { if (messages?.[chatId]) { - return [...messages[chatId]]; + return [...messages[chatId]] } - return []; - }, [messages, chatId]); + return [] + }, [messages, chatId]) return { messages: activeMessages, @@ -89,5 +89,5 @@ export function useMessages( mentions, clearMentions, addChatMessage, - }; + } } diff --git a/packages/status-react/src/hooks/messenger/useMessenger.ts b/packages/status-react/src/hooks/messenger/useMessenger.ts index 85e50643..a1816e1c 100644 --- a/packages/status-react/src/hooks/messenger/useMessenger.ts +++ b/packages/status-react/src/hooks/messenger/useMessenger.ts @@ -5,7 +5,7 @@ import { Contacts as ContactsClass, Identity, Messenger, -} from "@status-im/core"; +} from '@status-im/core' import { useCallback, useEffect, @@ -13,63 +13,63 @@ import { useReducer, useRef, useState, -} from "react"; +} from 'react' -import { useConfig } from "../../contexts/configProvider"; -import { ChannelData, ChannelsData } from "../../models/ChannelData"; -import { ChatMessage } from "../../models/ChatMessage"; -import { CommunityData } from "../../models/CommunityData"; -import { Contacts } from "../../models/Contact"; -import { createCommunity } from "../../utils/createCommunity"; -import { createMessenger } from "../../utils/createMessenger"; -import { uintToImgUrl } from "../../utils/uintToImgUrl"; +import { useConfig } from '../../contexts/configProvider' +import { ChannelData, ChannelsData } from '../../models/ChannelData' +import { ChatMessage } from '../../models/ChatMessage' +import { CommunityData } from '../../models/CommunityData' +import { Contacts } from '../../models/Contact' +import { createCommunity } from '../../utils/createCommunity' +import { createMessenger } from '../../utils/createMessenger' +import { uintToImgUrl } from '../../utils/uintToImgUrl' -import { ChannelAction, useChannelsReducer } from "./useChannelsReducer"; -import { ContactsAction, useContacts } from "./useContacts"; -import { useGroupChats } from "./useGroupChats"; -import { useLoadPrevDay } from "./useLoadPrevDay"; -import { useMessages } from "./useMessages"; +import { ChannelAction, useChannelsReducer } from './useChannelsReducer' +import { ContactsAction, useContacts } from './useContacts' +import { useGroupChats } from './useGroupChats' +import { useLoadPrevDay } from './useLoadPrevDay' +import { useMessages } from './useMessages' export type MessengerType = { - messenger: Messenger | undefined; - messages: ChatMessage[]; + messenger: Messenger | undefined + messages: ChatMessage[] sendMessage: ( messageText?: string | undefined, image?: Uint8Array | undefined, responseTo?: string - ) => Promise; - notifications: { [chatId: string]: number }; - clearNotifications: (id: string) => void; - mentions: { [chatId: string]: number }; - clearMentions: (id: string) => void; - loadPrevDay: (id: string, groupChat?: boolean) => Promise; - loadingMessages: boolean; - loadingMessenger: boolean; - communityData: CommunityData | undefined; - contacts: Contacts; - contactsDispatch: (action: ContactsAction) => void; - addContact: (publicKey: string) => void; - channels: ChannelsData; - channelsDispatch: (action: ChannelAction) => void; - removeChannel: (channelId: string) => void; - activeChannel: ChannelData | undefined; - createGroupChat: (members: string[]) => void; - changeGroupChatName: (name: string, chatId: string) => void; - addMembers: (members: string[], chatId: string) => void; - nickname: string | undefined; - subscriptionsDispatch: (action: SubscriptionAction) => void; -}; + ) => Promise + notifications: { [chatId: string]: number } + clearNotifications: (id: string) => void + mentions: { [chatId: string]: number } + clearMentions: (id: string) => void + loadPrevDay: (id: string, groupChat?: boolean) => Promise + loadingMessages: boolean + loadingMessenger: boolean + communityData: CommunityData | undefined + contacts: Contacts + contactsDispatch: (action: ContactsAction) => void + addContact: (publicKey: string) => void + channels: ChannelsData + channelsDispatch: (action: ChannelAction) => void + removeChannel: (channelId: string) => void + activeChannel: ChannelData | undefined + createGroupChat: (members: string[]) => void + changeGroupChatName: (name: string, chatId: string) => void + addMembers: (members: string[], chatId: string) => void + nickname: string | undefined + subscriptionsDispatch: (action: SubscriptionAction) => void +} function useCreateMessenger(identity: Identity | undefined) { - const { environment } = useConfig(); - const [messenger, setMessenger] = useState(undefined); + const { environment } = useConfig() + const [messenger, setMessenger] = useState(undefined) useEffect(() => { createMessenger(identity, environment).then(e => { - setMessenger(e); - }); - }, [identity, environment]); + setMessenger(e) + }) + }, [identity, environment]) - return messenger; + return messenger } function useCreateCommunity( @@ -79,7 +79,7 @@ function useCreateCommunity( addMessage: (msg: ApplicationMetadataMessage, id: string, date: Date) => void, contactsClass: ContactsClass | undefined ) { - const [community, setCommunity] = useState(undefined); + const [community, setCommunity] = useState(undefined) useEffect(() => { if ( @@ -90,73 +90,73 @@ function useCreateCommunity( messenger.identity === identity ) { createCommunity(communityKey, addMessage, messenger).then(comm => { - setCommunity(comm); - }); + setCommunity(comm) + }) } - }, [messenger, communityKey, addMessage, contactsClass, identity]); + }, [messenger, communityKey, addMessage, contactsClass, identity]) const communityData = useMemo(() => { if (community?.description) { - const membersList = Object.keys(community.description.proto.members); + const membersList = Object.keys(community.description.proto.members) if (contactsClass) { - membersList.forEach(contactsClass.addContact, contactsClass); + membersList.forEach(contactsClass.addContact, contactsClass) } return { id: community.publicKeyStr, - name: community.description.identity?.displayName ?? "", + name: community.description.identity?.displayName ?? '', icon: uintToImgUrl( community.description?.identity?.images?.thumbnail?.payload ?? new Uint8Array() ), members: membersList.length, membersList, - description: community.description.identity?.description ?? "", - }; + description: community.description.identity?.description ?? '', + } } else { - return undefined; + return undefined } - }, [community, contactsClass]); + }, [community, contactsClass]) - return { community, communityData }; + return { community, communityData } } type Subscriptions = { - [id: string]: (msg: ChatMessage, id: string) => void; -}; + [id: string]: (msg: ChatMessage, id: string) => void +} type SubscriptionAction = | { - type: "addSubscription"; + type: 'addSubscription' payload: { - name: string; - subFunction: (msg: ChatMessage, id: string) => void; - }; + name: string + subFunction: (msg: ChatMessage, id: string) => void + } } - | { type: "removeSubscription"; payload: { name: string } }; + | { type: 'removeSubscription'; payload: { name: string } } function subscriptionReducer( state: Subscriptions, action: SubscriptionAction ): Subscriptions { switch (action.type) { - case "addSubscription": { + case 'addSubscription': { if (state[action.payload.name]) { - throw new Error("Subscription already exists"); + throw new Error('Subscription already exists') } - return { ...state, [action.payload.name]: action.payload.subFunction }; + return { ...state, [action.payload.name]: action.payload.subFunction } } - case "removeSubscription": { + case 'removeSubscription': { if (state[action.payload.name]) { - const newState = { ...state }; - delete newState[action.payload.name]; - return newState; + const newState = { ...state } + delete newState[action.payload.name] + return newState } - return state; + return state } default: - throw new Error("Wrong subscription action type"); + throw new Error('Wrong subscription action type') } } @@ -168,28 +168,28 @@ export function useMessenger( const [subscriptions, subscriptionsDispatch] = useReducer( subscriptionReducer, {} - ); - const subList = useRef<((msg: ChatMessage, id: string) => void)[]>([]); + ) + const subList = useRef<((msg: ChatMessage, id: string) => void)[]>([]) useEffect(() => { - subList.current = Object.values(subscriptions); - }, [subscriptions]); + subList.current = Object.values(subscriptions) + }, [subscriptions]) - const [channelsState, channelsDispatch] = useChannelsReducer(); - const messenger = useCreateMessenger(identity); + const [channelsState, channelsDispatch] = useChannelsReducer() + const messenger = useCreateMessenger(identity) const { contacts, contactsDispatch, contactsClass, nickname } = useContacts( messenger, identity, newNickname - ); + ) const addContact = useCallback( (publicKey: string) => { if (contactsClass) { - contactsClass.addContact(publicKey); + contactsClass.addContact(publicKey) } }, [contactsClass] - ); + ) const { addChatMessage, @@ -204,7 +204,7 @@ export function useMessenger( identity, subList, contactsClass - ); + ) const { community, communityData } = useCreateCommunity( messenger, @@ -212,43 +212,43 @@ export function useMessenger( communityKey, addMessage, contactsClass - ); + ) useEffect(() => { if (community?.chats) { for (const chat of community.chats.values()) { channelsDispatch({ - type: "AddChannel", + type: 'AddChannel', payload: { id: chat.id, - name: chat.communityChat?.identity?.displayName ?? "", - description: chat.communityChat?.identity?.description ?? "", - type: "channel", + name: chat.communityChat?.identity?.displayName ?? '', + description: chat.communityChat?.identity?.description ?? '', + type: 'channel', }, - }); + }) } } - }, [community, channelsDispatch]); + }, [community, channelsDispatch]) useEffect(() => { Object.values(channelsState.channels) - .filter(channel => channel.type === "dm") + .filter(channel => channel.type === 'dm') .forEach(channel => { - const contact = contacts?.[channel?.members?.[1]?.id ?? ""]; + const contact = contacts?.[channel?.members?.[1]?.id ?? ''] if ( contact && channel.name !== (contact?.customName ?? contact.trueName) ) { channelsDispatch({ - type: "AddChannel", + type: 'AddChannel', payload: { ...channel, name: contact?.customName ?? contact.trueName, }, - }); + }) } - }); - }, [contacts, channelsState.channels, channelsDispatch]); + }) + }, [contacts, channelsState.channels, channelsDispatch]) const { groupChat, @@ -262,73 +262,71 @@ export function useMessenger( channelsDispatch, addChatMessage, contactsClass - ); + ) const { loadPrevDay, loadingMessages } = useLoadPrevDay( channelsState.activeChannel.id, messenger, groupChat - ); + ) useEffect(() => { if (messenger && community?.chats) { - Array.from(community?.chats.values()).forEach(({ id }) => - loadPrevDay(id) - ); + Array.from(community?.chats.values()).forEach(({ id }) => loadPrevDay(id)) } - }, [messenger, community, loadPrevDay]); + }, [messenger, community, loadPrevDay]) const sendMessage = useCallback( async (messageText?: string, image?: Uint8Array, responseTo?: string) => { - let content; + let content if (messageText) { content = { text: messageText, contentType: 0, - }; + } } if (image) { content = { image, imageType: 1, contentType: 2, - }; + } } if (content) { - if (channelsState.activeChannel.type !== "channel") { + if (channelsState.activeChannel.type !== 'channel') { await groupChat?.sendMessage( channelsState.activeChannel.id, content, responseTo - ); + ) } else { await messenger?.sendMessage( channelsState.activeChannel.id, content, responseTo - ); + ) } } }, [messenger, groupChat, channelsState.activeChannel] - ); + ) useEffect(() => { if (channelsState.activeChannel) { if (notifications[channelsState.activeChannel.id] > 0) { - clearNotifications(channelsState.activeChannel.id); - clearMentions(channelsState.activeChannel.id); + clearNotifications(channelsState.activeChannel.id) + clearMentions(channelsState.activeChannel.id) } } - }, [notifications, channelsState, clearNotifications, clearMentions]); + }, [notifications, channelsState, clearNotifications, clearMentions]) const loadingMessenger = useMemo(() => { return Boolean( (communityKey && !communityData) || !messenger || (communityKey && !channelsState.activeChannel.id) - ); - }, [communityData, messenger, channelsState, communityKey]); + ) + }, [communityData, messenger, channelsState, communityKey]) return { messenger, @@ -354,5 +352,5 @@ export function useMessenger( addMembers, nickname, subscriptionsDispatch, - }; + } } diff --git a/packages/status-react/src/hooks/messenger/useNotifications.ts b/packages/status-react/src/hooks/messenger/useNotifications.ts index 8e9b6093..185d488f 100644 --- a/packages/status-react/src/hooks/messenger/useNotifications.ts +++ b/packages/status-react/src/hooks/messenger/useNotifications.ts @@ -1,24 +1,24 @@ -import { useCallback, useState } from "react"; +import { useCallback, useState } from 'react' export function useNotifications() { const [notifications, setNotifications] = useState<{ - [chatId: string]: number; - }>({}); + [chatId: string]: number + }>({}) const incNotification = useCallback((id: string) => { - setNotifications((prevNotifications) => { + setNotifications(prevNotifications => { return { ...prevNotifications, [id]: (prevNotifications?.[id] ?? 0) + 1, - }; - }); - }, []); + } + }) + }, []) const clearNotifications = useCallback((id: string) => { - setNotifications((prevNotifications) => { + setNotifications(prevNotifications => { return { ...prevNotifications, [id]: 0, - }; - }); - }, []); - return { notifications, incNotification, clearNotifications }; + } + }) + }, []) + return { notifications, incNotification, clearNotifications } } diff --git a/packages/status-react/src/hooks/useActivities.ts b/packages/status-react/src/hooks/useActivities.ts index c66c3e0f..f1e66be3 100644 --- a/packages/status-react/src/hooks/useActivities.ts +++ b/packages/status-react/src/hooks/useActivities.ts @@ -1,71 +1,71 @@ -import { useEffect, useMemo, useReducer } from "react"; +import { useEffect, useMemo, useReducer } from 'react' -import { useUserPublicKey } from "../contexts/identityProvider"; -import { useMessengerContext } from "../contexts/messengerProvider"; -import { Activities, Activity, ActivityStatus } from "../models/Activity"; -import { ChatMessage } from "../models/ChatMessage"; +import { useUserPublicKey } from '../contexts/identityProvider' +import { useMessengerContext } from '../contexts/messengerProvider' +import { Activities, Activity, ActivityStatus } from '../models/Activity' +import { ChatMessage } from '../models/ChatMessage' export type ActivityAction = - | { type: "addActivity"; payload: Activity } - | { type: "removeActivity"; payload: "string" } - | { type: "setAsRead"; payload: string } - | { type: "setAllAsRead" } - | { type: "setStatus"; payload: { id: string; status: ActivityStatus } }; + | { type: 'addActivity'; payload: Activity } + | { type: 'removeActivity'; payload: 'string' } + | { type: 'setAsRead'; payload: string } + | { type: 'setAllAsRead' } + | { type: 'setStatus'; payload: { id: string; status: ActivityStatus } } function activityReducer( state: Activities, action: ActivityAction ): Activities { switch (action.type) { - case "setStatus": { - const activity = state[action.payload.id]; - if (activity && "status" in activity) { - activity.status = action.payload.status; - activity.isRead = true; - return { ...state, [activity.id]: activity }; + case 'setStatus': { + const activity = state[action.payload.id] + if (activity && 'status' in activity) { + activity.status = action.payload.status + activity.isRead = true + return { ...state, [activity.id]: activity } } - return state; + return state } - case "setAsRead": { - const activity = state[action.payload]; + case 'setAsRead': { + const activity = state[action.payload] if (activity) { - activity.isRead = true; - return { ...state, [activity.id]: activity }; + activity.isRead = true + return { ...state, [activity.id]: activity } } - return state; + return state } - case "setAllAsRead": { + case 'setAllAsRead': { return Object.entries(state).reduce((prev, curr) => { - const activity = curr[1]; - activity.isRead = true; - return { ...prev, [curr[0]]: activity }; - }, {}); + const activity = curr[1] + activity.isRead = true + return { ...prev, [curr[0]]: activity } + }, {}) } - case "addActivity": { - return { ...state, [action.payload.id]: action.payload }; + case 'addActivity': { + return { ...state, [action.payload.id]: action.payload } } - case "removeActivity": { + case 'removeActivity': { if (state[action.payload]) { - const newState = { ...state }; - delete newState[action.payload]; - return newState; + const newState = { ...state } + delete newState[action.payload] + return newState } else { - return state; + return state } } default: - throw new Error("Wrong activity reducer type"); + throw new Error('Wrong activity reducer type') } } export function useActivities() { - const [activitiesObj, dispatch] = useReducer(activityReducer, {}); + const [activitiesObj, dispatch] = useReducer(activityReducer, {}) const activities = useMemo( () => Object.values(activitiesObj), [activitiesObj] - ); - const userPK = useUserPublicKey(); - const { subscriptionsDispatch, channels } = useMessengerContext(); + ) + const userPK = useUserPublicKey() + const { subscriptionsDispatch, channels } = useMessengerContext() useEffect(() => { if (userPK) { @@ -73,43 +73,43 @@ export function useActivities() { if (message.quote && message.quote.sender === userPK) { const newActivity: Activity = { id: message.date.getTime().toString() + message.content, - type: "reply", + type: 'reply', date: message.date, user: message.sender, message: message, channel: channels[id], quote: message.quote, - }; - dispatch({ type: "addActivity", payload: newActivity }); + } + dispatch({ type: 'addActivity', payload: newActivity }) } - const split = message.content.split(" "); + const split = message.content.split(' ') const userMentioned = split.some( - (fragment) => fragment.startsWith("@") && fragment.slice(1) == userPK - ); + fragment => fragment.startsWith('@') && fragment.slice(1) == userPK + ) if (userMentioned) { const newActivity: Activity = { id: message.date.getTime().toString() + message.content, - type: "mention", + type: 'mention', date: message.date, user: message.sender, message: message, channel: channels[id], - }; - dispatch({ type: "addActivity", payload: newActivity }); + } + dispatch({ type: 'addActivity', payload: newActivity }) } - }; + } subscriptionsDispatch({ - type: "addSubscription", - payload: { name: "activityCenter", subFunction: subscribeFunction }, - }); + type: 'addSubscription', + payload: { name: 'activityCenter', subFunction: subscribeFunction }, + }) } return () => subscriptionsDispatch({ - type: "removeSubscription", - payload: { name: "activityCenter" }, - }); - }, [subscriptionsDispatch, userPK, channels]); + type: 'removeSubscription', + payload: { name: 'activityCenter' }, + }) + }, [subscriptionsDispatch, userPK, channels]) - return { activities, activityDispatch: dispatch }; + return { activities, activityDispatch: dispatch } } diff --git a/packages/status-react/src/hooks/useChatScrollHandle.ts b/packages/status-react/src/hooks/useChatScrollHandle.ts index 5100a3f2..8fb74414 100644 --- a/packages/status-react/src/hooks/useChatScrollHandle.ts +++ b/packages/status-react/src/hooks/useChatScrollHandle.ts @@ -1,55 +1,55 @@ -import { useEffect, useState } from "react"; +import { useEffect, useState } from 'react' -import { useMessengerContext } from "../contexts/messengerProvider"; -import { ChatMessage } from "../models/ChatMessage"; +import { useMessengerContext } from '../contexts/messengerProvider' +import { ChatMessage } from '../models/ChatMessage' export function useChatScrollHandle( messages: ChatMessage[], ref: React.RefObject ) { - const { loadPrevDay, loadingMessages, activeChannel } = useMessengerContext(); - const [scrollOnBot, setScrollOnBot] = useState(true); + const { loadPrevDay, loadingMessages, activeChannel } = useMessengerContext() + const [scrollOnBot, setScrollOnBot] = useState(true) useEffect(() => { if (ref && ref.current && scrollOnBot) { - ref.current.scrollTop = ref.current.scrollHeight; + ref.current.scrollTop = ref.current.scrollHeight } - }, [messages.length, scrollOnBot, ref]); + }, [messages.length, scrollOnBot, ref]) useEffect(() => { if (activeChannel) { if ( (ref?.current?.clientHeight ?? 0) >= (ref?.current?.scrollHeight ?? 0) ) { - setScrollOnBot(true); - loadPrevDay(activeChannel.id, activeChannel.type !== "channel"); + setScrollOnBot(true) + loadPrevDay(activeChannel.id, activeChannel.type !== 'channel') } } - }, [messages.length, activeChannel, loadPrevDay, setScrollOnBot, ref]); + }, [messages.length, activeChannel, loadPrevDay, setScrollOnBot, ref]) useEffect(() => { - const currentRef = ref.current; + const currentRef = ref.current const setScroll = () => { if (ref?.current && activeChannel) { if (ref.current.scrollTop <= 0) { - loadPrevDay(activeChannel.id, activeChannel.type !== "channel"); + loadPrevDay(activeChannel.id, activeChannel.type !== 'channel') } if ( ref.current.scrollTop + ref.current.clientHeight == ref.current.scrollHeight ) { if (scrollOnBot === false) { - setScrollOnBot(true); + setScrollOnBot(true) } } else { if (scrollOnBot === true) { - setScrollOnBot(false); + setScrollOnBot(false) } } } - }; - currentRef?.addEventListener("scroll", setScroll); - return () => currentRef?.removeEventListener("scroll", setScroll); - }, [ref, scrollOnBot, activeChannel, loadPrevDay]); - return loadingMessages; + } + currentRef?.addEventListener('scroll', setScroll) + return () => currentRef?.removeEventListener('scroll', setScroll) + }, [ref, scrollOnBot, activeChannel, loadPrevDay]) + return loadingMessages } diff --git a/packages/status-react/src/hooks/useClickOutside.ts b/packages/status-react/src/hooks/useClickOutside.ts index 686913b9..933c239a 100644 --- a/packages/status-react/src/hooks/useClickOutside.ts +++ b/packages/status-react/src/hooks/useClickOutside.ts @@ -1,4 +1,4 @@ -import { RefObject, useCallback, useEffect } from "react"; +import { RefObject, useCallback, useEffect } from 'react' export const useClickOutside = ( ref: RefObject, @@ -7,17 +7,17 @@ export const useClickOutside = ( const handleClick = useCallback( (e: MouseEvent) => { if (ref.current && !ref.current.contains(e.target as HTMLInputElement)) { - callback(); + callback() } }, [ref, callback] - ); + ) useEffect(() => { - document.addEventListener("mousedown", handleClick); + document.addEventListener('mousedown', handleClick) return () => { - document.removeEventListener("mousedown", handleClick); - }; - }, [handleClick]); -}; + document.removeEventListener('mousedown', handleClick) + } + }, [handleClick]) +} diff --git a/packages/status-react/src/hooks/useClickPosition.ts b/packages/status-react/src/hooks/useClickPosition.ts index e97b4206..59260d9b 100644 --- a/packages/status-react/src/hooks/useClickPosition.ts +++ b/packages/status-react/src/hooks/useClickPosition.ts @@ -1,30 +1,30 @@ -import { RefObject, useCallback, useEffect, useState } from "react"; +import { RefObject, useCallback, useEffect, useState } from 'react' export const useClickPosition = (ref: RefObject) => { - const [topPosition, setTopPosition] = useState(0); - const [leftPosition, setLeftPosition] = useState(0); + const [topPosition, setTopPosition] = useState(0) + const [leftPosition, setLeftPosition] = useState(0) const getPosition = useCallback( (e: MouseEvent) => { if (ref.current) { - const target = e.target as HTMLImageElement; - const imgTarget = target.tagName === "IMG"; - const rect = ref.current.getBoundingClientRect(); - const x = ref.current.clientWidth - e.clientX < 180 ? 180 : 0; - setLeftPosition(imgTarget ? -200 : e.clientX - rect.left - x); - setTopPosition(imgTarget ? 0 : e.clientY - rect.top); + const target = e.target as HTMLImageElement + const imgTarget = target.tagName === 'IMG' + const rect = ref.current.getBoundingClientRect() + const x = ref.current.clientWidth - e.clientX < 180 ? 180 : 0 + setLeftPosition(imgTarget ? -200 : e.clientX - rect.left - x) + setTopPosition(imgTarget ? 0 : e.clientY - rect.top) } }, [setTopPosition, setLeftPosition, ref] - ); + ) useEffect(() => { - document.addEventListener("contextmenu", getPosition); + document.addEventListener('contextmenu', getPosition) return () => { - document.removeEventListener("contextmenu", getPosition); - }; - }); + document.removeEventListener('contextmenu', getPosition) + } + }) - return { topPosition, leftPosition }; -}; + return { topPosition, leftPosition } +} diff --git a/packages/status-react/src/hooks/useContextMenu.ts b/packages/status-react/src/hooks/useContextMenu.ts index e3d6fa68..9e52c6b4 100644 --- a/packages/status-react/src/hooks/useContextMenu.ts +++ b/packages/status-react/src/hooks/useContextMenu.ts @@ -1,27 +1,27 @@ -import { useCallback, useEffect, useState } from "react"; +import { useCallback, useEffect, useState } from 'react' export const useContextMenu = (elementId: string) => { - const [showMenu, setShowMenu] = useState(false); + const [showMenu, setShowMenu] = useState(false) const handleContextMenu = useCallback( - (event) => { - event.preventDefault(); - setShowMenu(true); + event => { + event.preventDefault() + setShowMenu(true) }, [setShowMenu] - ); + ) useEffect(() => { - const element = document.getElementById(elementId) || document; + const element = document.getElementById(elementId) || document - element.addEventListener("contextmenu", handleContextMenu); - document.addEventListener("click", () => setShowMenu(false)); + element.addEventListener('contextmenu', handleContextMenu) + document.addEventListener('click', () => setShowMenu(false)) return () => { - element.removeEventListener("contextmenu", handleContextMenu); - document.removeEventListener("click", () => setShowMenu(false)); - setShowMenu(false); - }; - }, [elementId, handleContextMenu]); + element.removeEventListener('contextmenu', handleContextMenu) + document.removeEventListener('click', () => setShowMenu(false)) + setShowMenu(false) + } + }, [elementId, handleContextMenu]) - return { showMenu, setShowMenu }; -}; + return { showMenu, setShowMenu } +} diff --git a/packages/status-react/src/hooks/useNameError.tsx b/packages/status-react/src/hooks/useNameError.tsx index ecd37b91..a142b9ef 100644 --- a/packages/status-react/src/hooks/useNameError.tsx +++ b/packages/status-react/src/hooks/useNameError.tsx @@ -1,6 +1,6 @@ -import { useMemo } from "react"; +import { useMemo } from 'react' -import { useMessengerContext } from "../contexts/messengerProvider"; +import { useMessengerContext } from '../contexts/messengerProvider' export enum NameErrors { NoError = 0, @@ -11,30 +11,30 @@ export enum NameErrors { } export function useNameError(name: string) { - const { contacts } = useMessengerContext(); + const { contacts } = useMessengerContext() const error = useMemo(() => { - const RegName = new RegExp("^[a-z0-9_-]+$"); - if (name === "") { - return NameErrors.NoError; + const RegName = new RegExp('^[a-z0-9_-]+$') + if (name === '') { + return NameErrors.NoError } const nameExists = Object.values(contacts).find( - (contact) => contact.trueName === name - ); + contact => contact.trueName === name + ) if (nameExists) { - return NameErrors.NameExists; + return NameErrors.NameExists } if (!name.match(RegName)) { - return NameErrors.BadCharacters; + return NameErrors.BadCharacters } - if (name.slice(-4) === "_eth" || name.slice(-4) === "-eth") { - return NameErrors.EndingWithEth; + if (name.slice(-4) === '_eth' || name.slice(-4) === '-eth') { + return NameErrors.EndingWithEth } if (name.length >= 24) { - return NameErrors.TooLong; + return NameErrors.TooLong } - return NameErrors.NoError; - }, [name, contacts]); + return NameErrors.NoError + }, [name, contacts]) - return error; + return error } diff --git a/packages/status-react/src/hooks/useRefBreak.ts b/packages/status-react/src/hooks/useRefBreak.ts index 0c983120..7185f3f1 100644 --- a/packages/status-react/src/hooks/useRefBreak.ts +++ b/packages/status-react/src/hooks/useRefBreak.ts @@ -1,26 +1,26 @@ -import { useEffect, useState } from "react"; +import { useEffect, useState } from 'react' export function useRefBreak(dimension: number, sizeThreshold: number) { - const [widthBreak, setWidthBreak] = useState(dimension < sizeThreshold); + const [widthBreak, setWidthBreak] = useState(dimension < sizeThreshold) useEffect(() => { const checkDimensions = () => { if (dimension && dimension < sizeThreshold && dimension > 0) { if (widthBreak === false) { - setWidthBreak(true); + setWidthBreak(true) } } else { if (widthBreak === true) { - setWidthBreak(false); + setWidthBreak(false) } } - }; - checkDimensions(); - window.addEventListener("resize", checkDimensions); + } + checkDimensions() + window.addEventListener('resize', checkDimensions) return () => { - window.removeEventListener("resize", checkDimensions); - }; - }, [dimension, widthBreak, sizeThreshold]); + window.removeEventListener('resize', checkDimensions) + } + }, [dimension, widthBreak, sizeThreshold]) - return widthBreak; + return widthBreak } diff --git a/packages/status-react/src/hooks/useReply.ts b/packages/status-react/src/hooks/useReply.ts index fb76a530..c483b557 100644 --- a/packages/status-react/src/hooks/useReply.ts +++ b/packages/status-react/src/hooks/useReply.ts @@ -1,6 +1,6 @@ export type Reply = { - sender: string; - content: string; - image?: string; - id: string; -}; + sender: string + content: string + image?: string + id: string +} diff --git a/packages/status-react/src/index.ts b/packages/status-react/src/index.ts index 66b3f67f..073680e4 100644 --- a/packages/status-react/src/index.ts +++ b/packages/status-react/src/index.ts @@ -1,6 +1,6 @@ -import { CommunityChat } from "./components/CommunityChat"; -import { ConfigType } from "./contexts/configProvider"; -import { GroupChat } from "./groupChatComponents/GroupChat"; -import { darkTheme, lightTheme } from "./styles/themes"; +import { CommunityChat } from './components/CommunityChat' +import { ConfigType } from './contexts/configProvider' +import { GroupChat } from './groupChatComponents/GroupChat' +import { darkTheme, lightTheme } from './styles/themes' -export { CommunityChat, GroupChat, lightTheme, darkTheme, ConfigType }; +export { CommunityChat, GroupChat, lightTheme, darkTheme, ConfigType } diff --git a/packages/status-react/src/models/Activity.ts b/packages/status-react/src/models/Activity.ts index 8df01491..99007453 100644 --- a/packages/status-react/src/models/Activity.ts +++ b/packages/status-react/src/models/Activity.ts @@ -1,49 +1,49 @@ -import { ChannelData } from "./ChannelData"; -import { ChatMessage } from "./ChatMessage"; -import { CommunityData } from "./CommunityData"; +import { ChannelData } from './ChannelData' +import { ChatMessage } from './ChatMessage' +import { CommunityData } from './CommunityData' -export type ActivityStatus = "sent" | "accepted" | "declined" | "blocked"; +export type ActivityStatus = 'sent' | 'accepted' | 'declined' | 'blocked' export type Activity = | { - id: string; - type: "mention"; - date: Date; - user: string; - message: ChatMessage; - channel: ChannelData; - isRead?: boolean; + id: string + type: 'mention' + date: Date + user: string + message: ChatMessage + channel: ChannelData + isRead?: boolean } | { - id: string; - type: "reply"; - date: Date; - user: string; - message: ChatMessage; - channel: ChannelData; - quote: ChatMessage; - isRead?: boolean; + id: string + type: 'reply' + date: Date + user: string + message: ChatMessage + channel: ChannelData + quote: ChatMessage + isRead?: boolean } | { - id: string; - type: "request"; - date: Date; - user: string; - isRead?: boolean; - request: string; - requestType: "outcome" | "income"; - status: ActivityStatus; + id: string + type: 'request' + date: Date + user: string + isRead?: boolean + request: string + requestType: 'outcome' | 'income' + status: ActivityStatus } | { - id: string; - type: "invitation"; - isRead?: boolean; - date: Date; - user: string; - status: ActivityStatus; - invitation?: CommunityData; - }; + id: string + type: 'invitation' + isRead?: boolean + date: Date + user: string + status: ActivityStatus + invitation?: CommunityData + } export type Activities = { - [id: string]: Activity; -}; + [id: string]: Activity +} diff --git a/packages/status-react/src/models/ChannelData.ts b/packages/status-react/src/models/ChannelData.ts index d2ce2c4e..4481a393 100644 --- a/packages/status-react/src/models/ChannelData.ts +++ b/packages/status-react/src/models/ChannelData.ts @@ -1,15 +1,15 @@ -import { Contact } from "./Contact"; +import { Contact } from './Contact' export type ChannelData = { - id: string; - name: string; - type: "channel" | "dm" | "group"; - description?: string; - icon?: string; - isMuted?: boolean; - members?: Contact[]; -}; + id: string + name: string + type: 'channel' | 'dm' | 'group' + description?: string + icon?: string + isMuted?: boolean + members?: Contact[] +} export type ChannelsData = { - [id: string]: ChannelData; -}; + [id: string]: ChannelData +} diff --git a/packages/status-react/src/models/ChatMessage.ts b/packages/status-react/src/models/ChatMessage.ts index 1e17adad..dad1acff 100644 --- a/packages/status-react/src/models/ChatMessage.ts +++ b/packages/status-react/src/models/ChatMessage.ts @@ -1,16 +1,16 @@ -import { ApplicationMetadataMessage, bufToHex } from "@status-im/core"; -import { keccak256 } from "js-sha3"; +import { ApplicationMetadataMessage, bufToHex } from '@status-im/core' +import { keccak256 } from 'js-sha3' -import { uintToImgUrl } from "../utils"; +import { uintToImgUrl } from '../utils' export class ChatMessage { - content: string; - date: Date; - sender: string; - image?: string; - responseTo?: string; - quote?: ChatMessage; - id: string; + content: string + date: Date + sender: string + image?: string + responseTo?: string + quote?: ChatMessage + id: string constructor( content: string, @@ -19,12 +19,12 @@ export class ChatMessage { image?: string, responseTo?: string ) { - this.content = content; - this.date = date; - this.sender = sender; - this.image = image; - this.responseTo = responseTo; - this.id = keccak256(date.getTime().toString() + content); + this.content = content + this.date = date + this.sender = sender + this.image = image + this.responseTo = responseTo + this.id = keccak256(date.getTime().toString() + content) } public static fromMetadataMessage( @@ -36,21 +36,21 @@ export class ChatMessage { (msg.chatMessage?.text || msg.chatMessage?.image) && msg.chatMessage.clock ) { - const content = msg.chatMessage.text ?? ""; - let image: string | undefined = undefined; + const content = msg.chatMessage.text ?? '' + let image: string | undefined = undefined if (msg.chatMessage?.image) { - image = uintToImgUrl(msg.chatMessage?.image.payload); + image = uintToImgUrl(msg.chatMessage?.image.payload) } - const sender = bufToHex(msg.signer); + const sender = bufToHex(msg.signer) return new ChatMessage( content, date, sender, image, msg.chatMessage.responseTo - ); + ) } else { - return undefined; + return undefined } } } diff --git a/packages/status-react/src/models/CommunityData.ts b/packages/status-react/src/models/CommunityData.ts index 6ebefd83..4baaaf4f 100644 --- a/packages/status-react/src/models/CommunityData.ts +++ b/packages/status-react/src/models/CommunityData.ts @@ -1,8 +1,8 @@ export type CommunityData = { - id: string; - name: string; - icon: string; - members: number; - membersList: string[]; - description: string; -}; + id: string + name: string + icon: string + members: number + membersList: string[] + description: string +} diff --git a/packages/status-react/src/models/Contact.ts b/packages/status-react/src/models/Contact.ts index 79047b9b..38f8af9a 100644 --- a/packages/status-react/src/models/Contact.ts +++ b/packages/status-react/src/models/Contact.ts @@ -1,13 +1,13 @@ export type Contact = { - id: string; - online?: boolean; - trueName: string; - customName?: string; - isUntrustworthy?: boolean; - blocked?: boolean; - isFriend?: boolean; -}; + id: string + online?: boolean + trueName: string + customName?: string + isUntrustworthy?: boolean + blocked?: boolean + isFriend?: boolean +} export type Contacts = { - [id: string]: Contact; -}; + [id: string]: Contact +} diff --git a/packages/status-react/src/models/Metadata.ts b/packages/status-react/src/models/Metadata.ts index a24aa18b..1a6f01e2 100644 --- a/packages/status-react/src/models/Metadata.ts +++ b/packages/status-react/src/models/Metadata.ts @@ -1,5 +1,5 @@ export interface Metadata { - "og:site_name": string; - "og:title": string; - "og:image": string; + 'og:site_name': string + 'og:title': string + 'og:image': string } diff --git a/packages/status-react/src/models/Toast.ts b/packages/status-react/src/models/Toast.ts index 706cccf0..a691ffa9 100644 --- a/packages/status-react/src/models/Toast.ts +++ b/packages/status-react/src/models/Toast.ts @@ -1,6 +1,6 @@ export type Toast = { - id: string; - type: "confirmation" | "incoming" | "approvement" | "rejection"; - text: string; - request?: string; -}; + id: string + type: 'confirmation' | 'incoming' | 'approvement' | 'rejection' + text: string + request?: string +} diff --git a/packages/status-react/src/styles/GlobalStyle.tsx b/packages/status-react/src/styles/GlobalStyle.tsx index f707d420..aef742ed 100644 --- a/packages/status-react/src/styles/GlobalStyle.tsx +++ b/packages/status-react/src/styles/GlobalStyle.tsx @@ -1,4 +1,4 @@ -import { createGlobalStyle } from "styled-components"; +import { createGlobalStyle } from 'styled-components' export const GlobalStyle = createGlobalStyle` * { @@ -156,4 +156,4 @@ export const GlobalStyle = createGlobalStyle` text-decoration: none; cursor: pointer; } -`; +` diff --git a/packages/status-react/src/styles/themes.ts b/packages/status-react/src/styles/themes.ts index 98234da1..a378f3c1 100644 --- a/packages/status-react/src/styles/themes.ts +++ b/packages/status-react/src/styles/themes.ts @@ -1,107 +1,107 @@ export type Theme = { - primary: string; - secondary: string; - tertiary: string; - bodyBackgroundColor: string; - sectionBackgroundColor: string; - bodyBackgroundGradient: string; - guestNameColor: string; - iconColor: string; - iconUserColor: string; - iconTextColor: string; - logoColor: string; - activeChannelBackground: string; - notificationColor: string; - inputColor: string; - border: string; - buttonBg: string; - buttonBgHover: string; - buttonNoBg: string; - buttonNoBgHover: string; - skeletonLight: string; - skeletonDark: string; - redColor: string; - greenColor: string; - greenBg: string; - mentionColor: string; - mentionHover: string; - mentionBg: string; - mentionBgHover: string; - shadow: string; - reactionBg: string; - blueBg: string; -}; + primary: string + secondary: string + tertiary: string + bodyBackgroundColor: string + sectionBackgroundColor: string + bodyBackgroundGradient: string + guestNameColor: string + iconColor: string + iconUserColor: string + iconTextColor: string + logoColor: string + activeChannelBackground: string + notificationColor: string + inputColor: string + border: string + buttonBg: string + buttonBgHover: string + buttonNoBg: string + buttonNoBgHover: string + skeletonLight: string + skeletonDark: string + redColor: string + greenColor: string + greenBg: string + mentionColor: string + mentionHover: string + mentionBg: string + mentionBgHover: string + shadow: string + reactionBg: string + blueBg: string +} export const lightTheme: Theme = { - primary: "#000", - secondary: "#939BA1", - tertiary: "#4360DF", - bodyBackgroundColor: "#fff", - sectionBackgroundColor: "#F6F8FA", + primary: '#000', + secondary: '#939BA1', + tertiary: '#4360DF', + bodyBackgroundColor: '#fff', + sectionBackgroundColor: '#F6F8FA', bodyBackgroundGradient: - "linear-gradient(0deg, #FFFFFF 50%, rgba(255, 255, 255, 0) 102.57%)", - guestNameColor: "#887AF9", - iconColor: "#D37EF4", - iconUserColor: "#717199", - iconTextColor: "rgba(255, 255, 255, 0.7)", - logoColor: "#51D0F0", - activeChannelBackground: "#E9EDF1", - notificationColor: "#4360DF", - inputColor: "#EEF2F5", - border: "#EEF2F5", - buttonBg: "rgba(67, 96, 223, 0.1)", - buttonBgHover: "rgba(67, 96, 223, 0.2)", - buttonNoBg: "rgba(255, 45, 85, 0.1)", - buttonNoBgHover: "rgba(255, 45, 85, 0.2)", - skeletonLight: "#F6F8FA", - skeletonDark: "#E9EDF1", - redColor: "#FF2D55", - greenColor: "#4EBC60", - greenBg: "rgba(78, 188, 96, 0.1)", - mentionColor: "#0DA4C9", - mentionHover: "#BDE7F2", - mentionBg: "#E5F8FD", - mentionBgHover: "#D4F3FA", + 'linear-gradient(0deg, #FFFFFF 50%, rgba(255, 255, 255, 0) 102.57%)', + guestNameColor: '#887AF9', + iconColor: '#D37EF4', + iconUserColor: '#717199', + iconTextColor: 'rgba(255, 255, 255, 0.7)', + logoColor: '#51D0F0', + activeChannelBackground: '#E9EDF1', + notificationColor: '#4360DF', + inputColor: '#EEF2F5', + border: '#EEF2F5', + buttonBg: 'rgba(67, 96, 223, 0.1)', + buttonBgHover: 'rgba(67, 96, 223, 0.2)', + buttonNoBg: 'rgba(255, 45, 85, 0.1)', + buttonNoBgHover: 'rgba(255, 45, 85, 0.2)', + skeletonLight: '#F6F8FA', + skeletonDark: '#E9EDF1', + redColor: '#FF2D55', + greenColor: '#4EBC60', + greenBg: 'rgba(78, 188, 96, 0.1)', + mentionColor: '#0DA4C9', + mentionHover: '#BDE7F2', + mentionBg: '#E5F8FD', + mentionBgHover: '#D4F3FA', shadow: - "0px 2px 4px rgba(0, 34, 51, 0.16), 0px 4px 12px rgba(0, 34, 51, 0.08)", - reactionBg: "#eceffc", - blueBg: "rgba(67, 96, 223, 0.1)", -}; + '0px 2px 4px rgba(0, 34, 51, 0.16), 0px 4px 12px rgba(0, 34, 51, 0.08)', + reactionBg: '#eceffc', + blueBg: 'rgba(67, 96, 223, 0.1)', +} export const darkTheme: Theme = { - primary: "#fff", - secondary: "#909090", - tertiary: "#88B0FF", - bodyBackgroundColor: "#000", - sectionBackgroundColor: "#252525", + primary: '#fff', + secondary: '#909090', + tertiary: '#88B0FF', + bodyBackgroundColor: '#000', + sectionBackgroundColor: '#252525', bodyBackgroundGradient: - "linear-gradient(0deg, #000 50%, rgba(255, 255, 255, 0) 102.57%)", - guestNameColor: "#887AF9", - iconColor: "#D37EF4", - iconUserColor: "#717199", - logoColor: "#51D0F0", - iconTextColor: "rgba(0, 0, 0, 0.7)", - activeChannelBackground: "#2C2C2C", - notificationColor: "#887AF9", - inputColor: "#373737", - border: "#373737", - buttonBg: "rgba(134, 158, 255, 0.2)", - buttonBgHover: "rgba(67, 96, 223, 0.3)", - buttonNoBg: "rgba(255, 92, 123, 0.2)", - buttonNoBgHover: "rgba(255, 45, 85, 0.3)", - skeletonLight: "#2E2F31", - skeletonDark: "#141414", - redColor: "#FF5C7B", - greenColor: "#60C370", - greenBg: "rgba(96, 195, 112, 0.2)", - mentionColor: "#51D0F0", - mentionHover: "#004E60", - mentionBg: "#004050", - mentionBgHover: "#002D39", + 'linear-gradient(0deg, #000 50%, rgba(255, 255, 255, 0) 102.57%)', + guestNameColor: '#887AF9', + iconColor: '#D37EF4', + iconUserColor: '#717199', + logoColor: '#51D0F0', + iconTextColor: 'rgba(0, 0, 0, 0.7)', + activeChannelBackground: '#2C2C2C', + notificationColor: '#887AF9', + inputColor: '#373737', + border: '#373737', + buttonBg: 'rgba(134, 158, 255, 0.2)', + buttonBgHover: 'rgba(67, 96, 223, 0.3)', + buttonNoBg: 'rgba(255, 92, 123, 0.2)', + buttonNoBgHover: 'rgba(255, 45, 85, 0.3)', + skeletonLight: '#2E2F31', + skeletonDark: '#141414', + redColor: '#FF5C7B', + greenColor: '#60C370', + greenBg: 'rgba(96, 195, 112, 0.2)', + mentionColor: '#51D0F0', + mentionHover: '#004E60', + mentionBg: '#004050', + mentionBgHover: '#002D39', shadow: - "0px 2px 4px rgba(0, 34, 51, 0.16), 0px 4px 12px rgba(0, 34, 51, 0.08)", - reactionBg: "#373737", - blueBg: "rgba(134, 158, 255, 0.3)", -}; + '0px 2px 4px rgba(0, 34, 51, 0.16), 0px 4px 12px rgba(0, 34, 51, 0.08)', + reactionBg: '#373737', + blueBg: 'rgba(134, 158, 255, 0.3)', +} -export default { lightTheme, darkTheme }; +export default { lightTheme, darkTheme } diff --git a/packages/status-react/src/utils/binarySetInsert.ts b/packages/status-react/src/utils/binarySetInsert.ts index de163844..05859ac0 100644 --- a/packages/status-react/src/utils/binarySetInsert.ts +++ b/packages/status-react/src/utils/binarySetInsert.ts @@ -4,18 +4,18 @@ export function binarySetInsert( compFunc: (a: T, b: T) => boolean, eqFunc: (a: T, b: T) => boolean ) { - let low = 0; - let high = arr.length; + let low = 0 + let high = arr.length while (low < high) { - const mid = (low + high) >> 1; + const mid = (low + high) >> 1 if (compFunc(arr[mid], val)) { - low = mid + 1; + low = mid + 1 } else { - high = mid; + high = mid } } if (arr.length === low || !eqFunc(arr[low], val)) { - arr.splice(low, 0, val); + arr.splice(low, 0, val) } - return arr; + return arr } diff --git a/packages/status-react/src/utils/copy.ts b/packages/status-react/src/utils/copy.ts index 6a9ccc48..7dfecd39 100644 --- a/packages/status-react/src/utils/copy.ts +++ b/packages/status-react/src/utils/copy.ts @@ -1,5 +1,5 @@ export const copy = (text: string) => { - navigator.clipboard.writeText(text).catch((error) => { - console.log(error); - }); -}; + navigator.clipboard.writeText(text).catch(error => { + console.log(error) + }) +} diff --git a/packages/status-react/src/utils/copyImg.ts b/packages/status-react/src/utils/copyImg.ts index 89d66009..e965c040 100644 --- a/packages/status-react/src/utils/copyImg.ts +++ b/packages/status-react/src/utils/copyImg.ts @@ -4,15 +4,15 @@ const copyToClipboard = async (pngBlob: any) => { new ClipboardItem({ [pngBlob.type]: pngBlob, }), - ]); + ]) } catch (error) { - console.error(error); + console.error(error) } -}; +} //Images are already converted to png by useMessenger when received export const copyImg = async (image: string) => { - const img = await fetch(image); - const imgBlob = await img.blob(); - return copyToClipboard(imgBlob); -}; + const img = await fetch(image) + const imgBlob = await img.blob() + return copyToClipboard(imgBlob) +} diff --git a/packages/status-react/src/utils/createCommunity.ts b/packages/status-react/src/utils/createCommunity.ts index b6adfac6..ae387bd8 100644 --- a/packages/status-react/src/utils/createCommunity.ts +++ b/packages/status-react/src/utils/createCommunity.ts @@ -1,4 +1,8 @@ -import { Community, Messenger, ApplicationMetadataMessage } from "@status-im/core"; +import { + Community, + Messenger, + ApplicationMetadataMessage, +} from '@status-im/core' export async function createCommunity( communityKey: string, @@ -8,15 +12,15 @@ export async function createCommunity( const community = await Community.instantiateCommunity( communityKey, messenger.waku - ); + ) await Promise.all( Array.from(community.chats.values()).map(async chat => { - await messenger.joinChat(chat); + await messenger.joinChat(chat) messenger.addObserver( (msg, date) => addMessage(msg, chat.id, date), chat.id - ); + ) }) - ); - return community; + ) + return community } diff --git a/packages/status-react/src/utils/createMessenger.ts b/packages/status-react/src/utils/createMessenger.ts index 303b500c..da054070 100644 --- a/packages/status-react/src/utils/createMessenger.ts +++ b/packages/status-react/src/utils/createMessenger.ts @@ -1,17 +1,17 @@ -import { Identity, Messenger } from "@status-im/core"; -import { getNodesFromHostedJson } from "js-waku"; -import { Protocols } from "js-waku/build/main/lib/waku"; +import { Identity, Messenger } from '@status-im/core' +import { getNodesFromHostedJson } from 'js-waku' +import { Protocols } from 'js-waku/build/main/lib/waku' function createWakuOptions(env: string) { - let bootstrap: any = { default: true }; - if (env === "test") { + let bootstrap: any = { default: true } + if (env === 'test') { bootstrap = { getPeers: getNodesFromHostedJson.bind({}, [ - "fleets", - "wakuv2.test", - "waku-websocket", + 'fleets', + 'wakuv2.test', + 'waku-websocket', ]), - }; + } } return { bootstrap, @@ -23,16 +23,16 @@ function createWakuOptions(env: string) { }, }, }, - }; + } } export async function createMessenger( identity: Identity | undefined, env: string ) { - const WAKU_OPTIONS = createWakuOptions(env); - const messenger = await Messenger.create(identity, WAKU_OPTIONS); - await messenger.waku.waitForRemotePeer([Protocols.Store]); + const WAKU_OPTIONS = createWakuOptions(env) + const messenger = await Messenger.create(identity, WAKU_OPTIONS) + await messenger.waku.waitForRemotePeer([Protocols.Store]) - return messenger; + return messenger } diff --git a/packages/status-react/src/utils/downloadImg.ts b/packages/status-react/src/utils/downloadImg.ts index 9b23f9f7..d04302f7 100644 --- a/packages/status-react/src/utils/downloadImg.ts +++ b/packages/status-react/src/utils/downloadImg.ts @@ -1,10 +1,10 @@ export const downloadImg = async (image: string) => { try { - const a = document.createElement("a"); - a.download = `${image.split("/").pop()}.png`; - a.href = image; - a.click(); + const a = document.createElement('a') + a.download = `${image.split('/').pop()}.png` + a.href = image + a.click() } catch { - return; + return } -}; +} diff --git a/packages/status-react/src/utils/equalDate.ts b/packages/status-react/src/utils/equalDate.ts index 02ac9824..ccb33d83 100644 --- a/packages/status-react/src/utils/equalDate.ts +++ b/packages/status-react/src/utils/equalDate.ts @@ -3,5 +3,5 @@ export function equalDate(a: Date, b: Date) { a.getDate() === b.getDate() && a.getMonth() === b.getMonth() && a.getFullYear() === b.getFullYear() - ); + ) } diff --git a/packages/status-react/src/utils/identityStorage.ts b/packages/status-react/src/utils/identityStorage.ts index b0490a45..4d068057 100644 --- a/packages/status-react/src/utils/identityStorage.ts +++ b/packages/status-react/src/utils/identityStorage.ts @@ -1,79 +1,79 @@ -import { Identity, bufToHex, hexToBuf } from "@status-im/core"; +import { Identity, bufToHex, hexToBuf } from '@status-im/core' export async function saveIdentity(identity: Identity, password: string) { - const salt = window.crypto.getRandomValues(new Uint8Array(16)); - const wrapKey = await getWrapKey(password, salt); + const salt = window.crypto.getRandomValues(new Uint8Array(16)) + const wrapKey = await getWrapKey(password, salt) - const iv = window.crypto.getRandomValues(new Uint8Array(12)); + const iv = window.crypto.getRandomValues(new Uint8Array(12)) const cipher = await window.crypto.subtle.encrypt( { - name: "AES-GCM", + name: 'AES-GCM', iv: iv, }, wrapKey, identity.privateKey - ); + ) const data = { salt: bufToHex(salt), iv: bufToHex(iv), cipher: bufToHex(cipher), - }; + } - localStorage.setItem("cipherIdentity", JSON.stringify(data)); + localStorage.setItem('cipherIdentity', JSON.stringify(data)) } export function loadEncryptedIdentity(): string | null { - return localStorage.getItem("cipherIdentity"); + return localStorage.getItem('cipherIdentity') } async function getWrapKey(password: string, salt: Uint8Array) { - const enc = new TextEncoder(); + const enc = new TextEncoder() const keyMaterial = await window.crypto.subtle.importKey( - "raw", + 'raw', enc.encode(password), - { name: "PBKDF2" }, + { name: 'PBKDF2' }, false, - ["deriveBits", "deriveKey"] - ); + ['deriveBits', 'deriveKey'] + ) return await window.crypto.subtle.deriveKey( { - name: "PBKDF2", + name: 'PBKDF2', salt, iterations: 100000, - hash: "SHA-256", + hash: 'SHA-256', }, keyMaterial, - { name: "AES-GCM", length: 256 }, + { name: 'AES-GCM', length: 256 }, true, - ["encrypt", "decrypt"] - ); + ['encrypt', 'decrypt'] + ) } export async function decryptIdentity( encryptedIdentity: string, password: string ): Promise { - const data = JSON.parse(encryptedIdentity); + const data = JSON.parse(encryptedIdentity) - const salt = hexToBuf(data.salt); - const iv = hexToBuf(data.iv); - const cipherKeyPair = hexToBuf(data.cipher); + const salt = hexToBuf(data.salt) + const iv = hexToBuf(data.iv) + const cipherKeyPair = hexToBuf(data.cipher) - const key = await getWrapKey(password, salt); + const key = await getWrapKey(password, salt) try { const decrypted = await window.crypto.subtle.decrypt( { - name: "AES-GCM", + name: 'AES-GCM', iv: iv, }, key, cipherKeyPair - ); + ) - return new Identity(new Uint8Array(decrypted)); + return new Identity(new Uint8Array(decrypted)) } catch (e) { - return; + return } } diff --git a/packages/status-react/src/utils/index.ts b/packages/status-react/src/utils/index.ts index 9b50e9aa..5af856ef 100644 --- a/packages/status-react/src/utils/index.ts +++ b/packages/status-react/src/utils/index.ts @@ -1,12 +1,12 @@ -export { binarySetInsert } from "./binarySetInsert"; -export { copy } from "./copy"; -export { copyImg } from "./copyImg"; -export { downloadImg } from "./downloadImg"; +export { binarySetInsert } from './binarySetInsert' +export { copy } from './copy' +export { copyImg } from './copyImg' +export { downloadImg } from './downloadImg' export { saveIdentity, loadEncryptedIdentity, decryptIdentity, -} from "./identityStorage"; -export { reduceString } from "./reduceString"; -export { uintToImgUrl } from "./uintToImgUrl"; -export { equalDate } from "./equalDate"; +} from './identityStorage' +export { reduceString } from './reduceString' +export { uintToImgUrl } from './uintToImgUrl' +export { equalDate } from './equalDate' diff --git a/packages/status-react/src/utils/paste.ts b/packages/status-react/src/utils/paste.ts index ba171a10..08befe44 100644 --- a/packages/status-react/src/utils/paste.ts +++ b/packages/status-react/src/utils/paste.ts @@ -2,8 +2,8 @@ export const paste = (elementId: string) => { navigator.clipboard .readText() .then( - (clipText) => + clipText => ((document.getElementById(elementId)).value = clipText) - ); -}; + ) +} diff --git a/packages/status-react/src/utils/reduceString.ts b/packages/status-react/src/utils/reduceString.ts index 595eba49..e23aa3e2 100644 --- a/packages/status-react/src/utils/reduceString.ts +++ b/packages/status-react/src/utils/reduceString.ts @@ -5,5 +5,5 @@ export const reduceString = ( ) => { return `${string.substring(0, limitBefore)}...${string.substring( string.length - limitAfter - )}`; -}; + )}` +} diff --git a/packages/status-react/src/utils/uintToImgUrl.ts b/packages/status-react/src/utils/uintToImgUrl.ts index d1774aee..1048de74 100644 --- a/packages/status-react/src/utils/uintToImgUrl.ts +++ b/packages/status-react/src/utils/uintToImgUrl.ts @@ -1,4 +1,4 @@ export function uintToImgUrl(img: Uint8Array) { - const blob = new Blob([img], { type: "image/png" }); - return URL.createObjectURL(blob); + const blob = new Blob([img], { type: 'image/png' }) + return URL.createObjectURL(blob) } diff --git a/yarn.lock b/yarn.lock index 70c21efd..2da1a865 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,7 +9,7 @@ dependencies: "@babel/highlight" "^7.10.4" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.16.7", "@babel/code-frame@^7.8.3": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789" integrity sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg== @@ -95,7 +95,7 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.3.tgz#b07702b982990bf6fdc1da5049a23fece4c5c3d0" integrity sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA== -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5": +"@babel/runtime@^7.0.0": version "7.17.2" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.2.tgz#66f68591605e59da47523c631416b18508779941" integrity sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw== @@ -167,11 +167,6 @@ dependencies: "@cspotcode/source-map-consumer" "0.8.0" -"@discoveryjs/json-ext@^0.5.0": - version "0.5.6" - resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.6.tgz#d5e0706cf8c6acd8c6032f8d54070af261bbbb2f" - integrity sha512-ws57AidsDvREKrZKYffXddNkyaF14iHNHm8VQnZH6t99E8gczjNN0GpvcGny0imC80yQ0tHz1xVUKk/KFQSUyA== - "@emotion/is-prop-valid@^0.8.8": version "0.8.8" resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz#db28b1c4368a259b60a97311d6a952d4fd01ac1a" @@ -1028,17 +1023,6 @@ dependencies: defer-to-connect "^1.0.1" -"@testing-library/react-hooks@^7.0.1": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@testing-library/react-hooks/-/react-hooks-7.0.2.tgz#3388d07f562d91e7f2431a4a21b5186062ecfee0" - integrity sha512-dYxpz8u9m4q1TuzfcUApqi8iFfR6R0FaMbr2hjZJy1uC8z+bO/K4v8Gs9eogGKYQop7QsrBTFkv/BCF7MzD2Cg== - dependencies: - "@babel/runtime" "^7.12.5" - "@types/react" ">=16.9.0" - "@types/react-dom" ">=16.9.0" - "@types/react-test-renderer" ">=16.9.0" - react-error-boundary "^3.1.0" - "@tootallnate/once@1": version "1.1.2" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" @@ -1109,35 +1093,6 @@ dependencies: "@types/react" "*" -"@types/eslint-scope@^3.7.3": - version "3.7.3" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.3.tgz#125b88504b61e3c8bc6f870882003253005c3224" - integrity sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g== - dependencies: - "@types/eslint" "*" - "@types/estree" "*" - -"@types/eslint@*": - version "8.4.1" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.4.1.tgz#c48251553e8759db9e656de3efc846954ac32304" - integrity sha512-GE44+DNEyxxh2Kc6ro/VkIj+9ma0pO0bwv9+uHSyBrikYOHr8zYcdPvnBOp1aw8s+CjRvuSx7CyWqRrNFQ59mA== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*", "@types/estree@^0.0.51": - version "0.0.51" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" - integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== - -"@types/glob@^7.1.1": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" - integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA== - dependencies: - "@types/minimatch" "*" - "@types/node" "*" - "@types/hcaptcha__react-hcaptcha@^0.1.5": version "0.1.5" resolved "https://registry.yarnpkg.com/@types/hcaptcha__react-hcaptcha/-/hcaptcha__react-hcaptcha-0.1.5.tgz#c531629fb7b017b255b2255718561a7ae5eb1d4c" @@ -1145,11 +1100,6 @@ dependencies: "@types/react" "*" -"@types/history@^4.7.11": - version "4.7.11" - resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.11.tgz#56588b17ae8f50c53983a524fc3cc47437969d64" - integrity sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA== - "@types/hoist-non-react-statics@*": version "3.3.1" resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f" @@ -1158,11 +1108,6 @@ "@types/react" "*" hoist-non-react-statics "^3.3.0" -"@types/html-minifier-terser@^6.0.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz#4fc33a00c1d0c16987b1a20cf92d20614c55ac35" - integrity sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg== - "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": version "2.0.4" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" @@ -1183,7 +1128,7 @@ "@types/istanbul-lib-coverage" "*" "@types/istanbul-lib-report" "*" -"@types/json-schema@*", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.8": +"@types/json-schema@^7.0.7": version "7.0.9" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== @@ -1198,7 +1143,7 @@ resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.1.tgz#459c65fa1867dafe6a8f322c4c51695663cc55e9" integrity sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w== -"@types/minimatch@*", "@types/minimatch@^3.0.4": +"@types/minimatch@^3.0.4": version "3.0.5" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== @@ -1218,7 +1163,7 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.19.tgz#726171367f404bfbe8512ba608a09ebad810c7e6" integrity sha512-PfeQhvcMR4cPFVuYfBN4ifG7p9c+Dlh3yUZR6k+5yQK7wX3gDgVxBly4/WkBRs9x4dmcy1TVl08SY67wwtEvmA== -"@types/node@^16.4.12", "@types/node@^16.9.6": +"@types/node@^16.9.6": version "16.11.25" resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.25.tgz#bb812b58bacbd060ce85921250d8b4ca553cd4a2" integrity sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ== @@ -1252,38 +1197,14 @@ dependencies: "@types/react" "*" -"@types/react-dom@>=16.9.0", "@types/react-dom@^17.0.0", "@types/react-dom@^17.0.9": +"@types/react-dom@^17.0.0": version "17.0.11" resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-17.0.11.tgz#e1eadc3c5e86bdb5f7684e00274ae228e7bcc466" integrity sha512-f96K3k+24RaLGVu/Y2Ng3e1EbZ8/cVJvypZWd7cy0ofCBaf2lcM46xNhycMZ2xGwbBjRql7hOlZ+e2WlJ5MH3Q== dependencies: "@types/react" "*" -"@types/react-router-dom@^5.1.8": - version "5.3.3" - resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-5.3.3.tgz#e9d6b4a66fcdbd651a5f106c2656a30088cc1e83" - integrity sha512-kpqnYK4wcdm5UaWI3fLcELopqLrHgLqNsdpHauzlQktfkHL3npOSwtj1Uz9oKBAzs7lFtVkV8j83voAz2D8fhw== - dependencies: - "@types/history" "^4.7.11" - "@types/react" "*" - "@types/react-router" "*" - -"@types/react-router@*", "@types/react-router@^5.1.16": - version "5.1.18" - resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-5.1.18.tgz#c8851884b60bc23733500d86c1266e1cfbbd9ef3" - integrity sha512-YYknwy0D0iOwKQgz9v8nOzt2J6l4gouBmDnWqUUznltOTaon+r8US8ky8HvN0tXvc38U9m6z/t2RsVsnd1zM0g== - dependencies: - "@types/history" "^4.7.11" - "@types/react" "*" - -"@types/react-test-renderer@>=16.9.0": - version "17.0.1" - resolved "https://registry.yarnpkg.com/@types/react-test-renderer/-/react-test-renderer-17.0.1.tgz#3120f7d1c157fba9df0118dae20cb0297ee0e06b" - integrity sha512-3Fi2O6Zzq/f3QR9dRnlnHso9bMl7weKCviFmfF6B4LS1Uat6Hkm15k0ZAQuDz+UBq6B3+g+NM6IT2nr5QgPzCw== - dependencies: - "@types/react" "*" - -"@types/react@*", "@types/react@>=16.9.0", "@types/react@^17.0.0", "@types/react@^17.0.15", "@types/react@^17.0.16": +"@types/react@*", "@types/react@^17.0.0", "@types/react@^17.0.16": version "17.0.39" resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.39.tgz#d0f4cde092502a6db00a1cded6e6bf2abb7633ce" integrity sha512-UVavlfAxDd/AgAacMa60Azl7ygyQNRwC/DsHZmKgNvPmRR5p70AJ5Q9EAmL2NWOJmeV+vVUI4IAP7GZrN8h8Ug== @@ -1415,154 +1336,6 @@ resolved "https://registry.yarnpkg.com/@vascosantos/moving-average/-/moving-average-1.1.0.tgz#8d5793b09b2d6021ba5e620c6a0f876c20db7eaa" integrity sha512-MVEJ4vWAPNbrGLjz7ITnHYg+YXZ6ijAqtH5/cHwSoCpbvuJ98aLXwFfPKAUfZpJMQR5uXB58UJajbY130IRF/w== -"@webassemblyjs/ast@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7" - integrity sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw== - dependencies: - "@webassemblyjs/helper-numbers" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - -"@webassemblyjs/floating-point-hex-parser@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz#f6c61a705f0fd7a6aecaa4e8198f23d9dc179e4f" - integrity sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ== - -"@webassemblyjs/helper-api-error@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz#1a63192d8788e5c012800ba6a7a46c705288fd16" - integrity sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg== - -"@webassemblyjs/helper-buffer@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz#832a900eb444884cde9a7cad467f81500f5e5ab5" - integrity sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA== - -"@webassemblyjs/helper-numbers@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz#64d81da219fbbba1e3bd1bfc74f6e8c4e10a62ae" - integrity sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ== - dependencies: - "@webassemblyjs/floating-point-hex-parser" "1.11.1" - "@webassemblyjs/helper-api-error" "1.11.1" - "@xtuc/long" "4.2.2" - -"@webassemblyjs/helper-wasm-bytecode@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz#f328241e41e7b199d0b20c18e88429c4433295e1" - integrity sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q== - -"@webassemblyjs/helper-wasm-section@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz#21ee065a7b635f319e738f0dd73bfbda281c097a" - integrity sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - -"@webassemblyjs/ieee754@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz#963929e9bbd05709e7e12243a099180812992614" - integrity sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ== - dependencies: - "@xtuc/ieee754" "^1.2.0" - -"@webassemblyjs/leb128@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.1.tgz#ce814b45574e93d76bae1fb2644ab9cdd9527aa5" - integrity sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw== - dependencies: - "@xtuc/long" "4.2.2" - -"@webassemblyjs/utf8@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.1.tgz#d1f8b764369e7c6e6bae350e854dec9a59f0a3ff" - integrity sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ== - -"@webassemblyjs/wasm-edit@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz#ad206ebf4bf95a058ce9880a8c092c5dec8193d6" - integrity sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/helper-wasm-section" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - "@webassemblyjs/wasm-opt" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" - "@webassemblyjs/wast-printer" "1.11.1" - -"@webassemblyjs/wasm-gen@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz#86c5ea304849759b7d88c47a32f4f039ae3c8f76" - integrity sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/ieee754" "1.11.1" - "@webassemblyjs/leb128" "1.11.1" - "@webassemblyjs/utf8" "1.11.1" - -"@webassemblyjs/wasm-opt@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz#657b4c2202f4cf3b345f8a4c6461c8c2418985f2" - integrity sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" - -"@webassemblyjs/wasm-parser@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz#86ca734534f417e9bd3c67c7a1c75d8be41fb199" - integrity sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-api-error" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/ieee754" "1.11.1" - "@webassemblyjs/leb128" "1.11.1" - "@webassemblyjs/utf8" "1.11.1" - -"@webassemblyjs/wast-printer@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz#d0c73beda8eec5426f10ae8ef55cee5e7084c2f0" - integrity sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@xtuc/long" "4.2.2" - -"@webpack-cli/configtest@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-1.1.1.tgz#9f53b1b7946a6efc2a749095a4f450e2932e8356" - integrity sha512-1FBc1f9G4P/AxMqIgfZgeOTuRnwZMten8E7zap5zgpPInnCrP8D4Q81+4CWIch8i/Nf7nXjP0v6CjjbHOrXhKg== - -"@webpack-cli/info@^1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-1.4.1.tgz#2360ea1710cbbb97ff156a3f0f24556e0fc1ebea" - integrity sha512-PKVGmazEq3oAo46Q63tpMr4HipI3OPfP7LiNOEJg963RMgT0rqheag28NCML0o3GIzA3DmxP1ZIAv9oTX1CUIA== - dependencies: - envinfo "^7.7.3" - -"@webpack-cli/serve@^1.6.1": - version "1.6.1" - resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.6.1.tgz#0de2875ac31b46b6c5bb1ae0a7d7f0ba5678dffe" - integrity sha512-gNGTiTrjEVQ0OcVnzsRSqTxaBSr+dmTfm+qJsCDluky8uhdLWep7Gcr62QsAKHTMxjCS/8nEITsmFAhfIx+QSw== - -"@xtuc/ieee754@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" - integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== - -"@xtuc/long@4.2.2": - version "4.2.2" - resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" - integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== - abab@^2.0.3, abab@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" @@ -1592,14 +1365,6 @@ abortcontroller-polyfill@^1.1.9: resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.3.tgz#1b5b487bd6436b5b764fd52a612509702c3144b5" integrity sha512-zetDJxd89y3X99Kvo4qFx8GKlt6GsvN3UcRZHwU6iFA/0KiOmhkTVhe8oRoTBiTVPZu09x3vCra47+w8Yz1+2Q== -accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8: - version "1.3.8" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" - integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== - dependencies: - mime-types "~2.1.34" - negotiator "0.6.3" - acorn-globals@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45" @@ -1608,26 +1373,12 @@ acorn-globals@^6.0.0: acorn "^7.1.1" acorn-walk "^7.1.1" -acorn-import-assertions@^1.7.6: - version "1.8.0" - resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz#ba2b5939ce62c238db6d93d81c9b111b29b855e9" - integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw== - acorn-jsx@^5.3.1: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn-node@^1.6.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/acorn-node/-/acorn-node-1.8.2.tgz#114c95d64539e53dede23de8b9d96df7c7ae2af8" - integrity sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A== - dependencies: - acorn "^7.0.0" - acorn-walk "^7.0.0" - xtend "^4.0.2" - -acorn-walk@^7.0.0, acorn-walk@^7.1.1: +acorn-walk@^7.1.1: version "7.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== @@ -1637,7 +1388,7 @@ acorn-walk@^8.1.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^7.0.0, acorn@^7.1.1, acorn@^7.4.0: +acorn@^7.1.1, acorn@^7.4.0: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== @@ -1662,17 +1413,7 @@ aggregate-error@^3.0.0, aggregate-error@^3.1.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv-errors@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" - integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== - -ajv-keywords@^3.1.0, ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" - integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== - -ajv@^6.1.0, ajv@^6.10.0, ajv@^6.12.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: +ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -1704,21 +1445,6 @@ ansi-colors@4.1.1, ansi-colors@^4.1.1: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== -ansi-colors@^3.0.0: - version "3.2.4" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" - integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== - -ansi-html-community@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/ansi-html-community/-/ansi-html-community-0.0.8.tgz#69fbc4d6ccbe383f9736934ae34c3f8290f1bf41" - integrity sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw== - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - ansi-regex@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" @@ -1756,14 +1482,6 @@ any-signal@^3.0.0: resolved "https://registry.yarnpkg.com/any-signal/-/any-signal-3.0.0.tgz#4f6ee491e5cdda9e9a544f50fdf1d14be40535b6" integrity sha512-l1H1GEkGGIXVGfCtvq8N68YI7gHajmfzRdKhmb8sGyAQpLCblirLa8eB09j4uKaiwe7vodAChocUf7AT3mYq5g== -anymatch@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" - integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== - dependencies: - micromatch "^3.1.4" - normalize-path "^2.1.1" - anymatch@~3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" @@ -1777,11 +1495,6 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== -arg@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.1.tgz#eb0c9a8f77786cad2af8ff2b862899842d7b6adb" - integrity sha512-e0hDa9H2Z9AwFkk2qDlwhoMYE4eToKarchkQHovNdLTCYMHZHeRjI71crOh+dio4K6u1IcwubQqo79Ga4CyAQA== - argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -1794,32 +1507,7 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= - -arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= - -array-flatten@^2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099" - integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== - -array-includes@^3.1.3, array-includes@^3.1.4: +array-includes@^3.1.4: version "3.1.4" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.4.tgz#f5b493162c760f3539631f005ba2bb46acb45ba9" integrity sha512-ZTNSQkmWumEbiHO2GF4GmWxYVTiQyJy2XOTa15sdQSrvKn7l+180egQMqlrMOUMCyLMD7pmyQe4mMDUT6Behrw== @@ -1830,28 +1518,11 @@ array-includes@^3.1.3, array-includes@^3.1.4: get-intrinsic "^1.1.1" is-string "^1.0.7" -array-union@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" - integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= - dependencies: - array-uniq "^1.0.1" - array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -array-uniq@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= - array.prototype.flat@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz#07e0975d84bbc7c48cd1879d609e682598d33e13" @@ -1861,7 +1532,7 @@ array.prototype.flat@^1.2.5: define-properties "^1.1.3" es-abstract "^1.19.0" -array.prototype.flatmap@^1.2.4, array.prototype.flatmap@^1.2.5: +array.prototype.flatmap@^1.2.4: version "1.2.5" resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.2.5.tgz#908dc82d8a406930fdf38598d51e7411d18d4446" integrity sha512-08u6rVyi1Lj7oqWbS9nUxliETrtIROT4XGTA4D/LWGten6E3ocm7cy9SIrmNHOL5XVbVuckUp3X6Xyg8/zpvHA== @@ -1870,7 +1541,7 @@ array.prototype.flatmap@^1.2.4, array.prototype.flatmap@^1.2.5: define-properties "^1.1.3" es-abstract "^1.19.0" -asn1.js@^5.0.1, asn1.js@^5.2.0: +asn1.js@^5.0.1: version "5.4.1" resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== @@ -1892,48 +1563,16 @@ assert-plus@1.0.0, assert-plus@^1.0.0: resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= -assert@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/assert/-/assert-2.0.0.tgz#95fc1c616d48713510680f2eaf2d10dd22e02d32" - integrity sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A== - dependencies: - es6-object-assign "^1.1.0" - is-nan "^1.2.1" - object-is "^1.0.1" - util "^0.12.0" - assertion-error@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= - astral-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== -async-each@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" - integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== - -async-limiter@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" - integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== - -async@^2.6.2: - version "2.6.3" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" - integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== - dependencies: - lodash "^4.17.14" - async@^3.2.0: version "3.2.3" resolved "https://registry.yarnpkg.com/async/-/async-3.2.3.tgz#ac53dafd3f4720ee9e8a160628f18ea91df196c9" @@ -1944,33 +1583,6 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - -atob@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - -autoprefixer@^10.4.2: - version "10.4.2" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.2.tgz#25e1df09a31a9fba5c40b578936b90d35c9d4d3b" - integrity sha512-9fOPpHKuDW1w/0EKfRmVnxTDt8166MAnLI3mgZ1JCnhNtYWxcJ6Ud5CO/AVOZi/AvFa8DY9RTy3h3+tFBlrrdQ== - dependencies: - browserslist "^4.19.1" - caniuse-lite "^1.0.30001297" - fraction.js "^4.1.2" - normalize-range "^0.1.2" - picocolors "^1.0.0" - postcss-value-parser "^4.2.0" - -available-typed-arrays@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" - integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== - aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -2026,24 +1638,6 @@ base64url@^3.0.1: resolved "https://registry.yarnpkg.com/base64url/-/base64url-3.0.1.tgz#6399d572e2bc3f90a9a8b22d5dbb0a32d33f788d" integrity sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A== -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -batch@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" - integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY= - bcrypt-pbkdf@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" @@ -2051,11 +1645,6 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -big.js@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" - integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== - bigint-buffer@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/bigint-buffer/-/bigint-buffer-1.1.5.tgz#d038f31c8e4534c1f8d0015209bf34b4fa6dd442" @@ -2068,11 +1657,6 @@ bignumber.js@^9.0.1: resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.2.tgz#71c6c6bed38de64e24a65ebe16cfcf23ae693673" integrity sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw== -binary-extensions@^1.0.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" - integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== - binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" @@ -2099,44 +1683,16 @@ bluebird@^3.5.1: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: +bn.js@^4.0.0, bn.js@^4.11.9: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== -bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.2.0: +bn.js@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== -body-parser@1.19.2: - version "1.19.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.2.tgz#4714ccd9c157d44797b8b5607d72c0b89952f26e" - integrity sha512-SAAwOxgoCKMGs9uUAUFHygfLAyaniaoun6I8mFY9pRAJL9+Kec34aU+oIjDhTycub1jozEfEwx1W1IuOYxVSFw== - dependencies: - bytes "3.1.2" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.2" - http-errors "1.8.1" - iconv-lite "0.4.24" - on-finished "~2.3.0" - qs "6.9.7" - raw-body "2.4.3" - type-is "~1.6.18" - -bonjour@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/bonjour/-/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5" - integrity sha1-jokKGD2O6aI5OzhExpGkK897yfU= - dependencies: - array-flatten "^2.1.0" - deep-equal "^1.0.1" - dns-equal "^1.0.0" - dns-txt "^2.0.2" - multicast-dns "^6.0.1" - multicast-dns-service-types "^1.1.0" - boolbase@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" @@ -2164,22 +1720,6 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^2.3.1, braces@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== - dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" - braces@^3.0.1, braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" @@ -2187,7 +1727,7 @@ braces@^3.0.1, braces@~3.0.2: dependencies: fill-range "^7.0.1" -brorand@^1.0.1, brorand@^1.1.0: +brorand@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= @@ -2202,68 +1742,7 @@ browser-stdout@1.3.1: resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== -browserify-aes@^1.0.0, browserify-aes@^1.0.4: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserify-cipher@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" - integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: - version "4.1.0" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d" - integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== - dependencies: - bn.js "^5.0.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.1.tgz#eaf4add46dd54be3bb3b36c0cf15abbeba7956c3" - integrity sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== - dependencies: - bn.js "^5.1.1" - browserify-rsa "^4.0.1" - create-hash "^1.2.0" - create-hmac "^1.1.7" - elliptic "^6.5.3" - inherits "^2.0.4" - parse-asn1 "^5.1.5" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -browserify-zlib@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" - integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== - dependencies: - pako "~1.0.5" - -browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.16.6, browserslist@^4.19.1, browserslist@^4.6.6: +browserslist@^4.0.0, browserslist@^4.16.6, browserslist@^4.6.6: version "4.19.3" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.19.3.tgz#29b7caad327ecf2859485f696f9604214bedd383" integrity sha512-XK3X4xtKJ+Txj8G5c30B4gsm71s69lqXlkYui4s6EkKxuv49qjYlY6oVd+IFJ73d4YymtM3+djvvt/R/iJwwDg== @@ -2279,16 +1758,6 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -buffer-indexof@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" - integrity sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g== - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= - buffer@^6.0.1, buffer@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" @@ -2297,36 +1766,6 @@ buffer@^6.0.1, buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" -builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= - -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= - -bytes@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" - integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - cacheable-request@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" @@ -2353,19 +1792,6 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camel-case@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz#9728072a954f805228225a6deea6b38461e1bd5a" - integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== - dependencies: - pascal-case "^3.1.2" - tslib "^2.0.3" - -camelcase-css@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/camelcase-css/-/camelcase-css-2.0.1.tgz#ee978f6947914cc30c6b44741b6ed1df7f043fd5" - integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA== - camelcase@^5.0.0: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" @@ -2391,7 +1817,7 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001297, caniuse-lite@^1.0.30001312: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001312: version "1.0.30001312" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001312.tgz#e11eba4b87e24d22697dae05455d5aea28550d5f" integrity sha512-Wiz1Psk2MEK0pX3rUzWaunLTZzqS2JYZFzNKqAiJGiuxIjRPLgV6+VDPOg6lQOUxmDwhTlh198JsTTi8Hzw6aQ== @@ -2423,7 +1849,7 @@ chalk@^2.0.0, chalk@^2.3.0, chalk@^2.4.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: +chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -2436,7 +1862,7 @@ check-error@^1.0.2: resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= -chokidar@3.5.3, chokidar@^3.4.2, chokidar@^3.5.2, chokidar@^3.5.3: +chokidar@3.5.3, chokidar@^3.5.2: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -2451,25 +1877,6 @@ chokidar@3.5.3, chokidar@^3.4.2, chokidar@^3.5.2, chokidar@^3.5.3: optionalDependencies: fsevents "~2.3.2" -chokidar@^2.1.8: - version "2.1.8" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" - integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== - dependencies: - anymatch "^2.0.0" - async-each "^1.0.1" - braces "^2.3.2" - glob-parent "^3.1.0" - inherits "^2.0.3" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - normalize-path "^3.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.2.1" - upath "^1.1.1" - optionalDependencies: - fsevents "^1.2.7" - chrome-trace-event@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" @@ -2480,7 +1887,7 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: +cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== @@ -2493,23 +1900,6 @@ class-is@^1.1.0: resolved "https://registry.yarnpkg.com/class-is/-/class-is-1.1.0.tgz#9d3c0fba0440d211d843cec3dedfa48055005825" integrity sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw== -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -clean-css@^5.2.2: - version "5.2.4" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.2.4.tgz#982b058f8581adb2ae062520808fb2429bd487a4" - integrity sha512-nKseG8wCzEuji/4yrgM/5cthL9oTDc5UOQyFMvW/Q53oP6gLH690o1NbuTh6Y18nujr7BxlsFuS7gXLnLzKJGg== - dependencies: - source-map "~0.6.0" - clean-stack@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" @@ -2538,15 +1928,6 @@ cliui@^7.0.2: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" -clone-deep@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" - integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== - dependencies: - is-plain-object "^2.0.4" - kind-of "^6.0.2" - shallow-clone "^3.0.0" - clone-response@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" @@ -2559,14 +1940,6 @@ clone@^2.1.1: resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -2586,7 +1959,7 @@ color-name@1.1.3: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= -color-name@^1.1.4, color-name@~1.1.4: +color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== @@ -2596,11 +1969,6 @@ colord@^2.9.1: resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.2.tgz#25e2bacbbaa65991422c07ea209e2089428effb1" integrity sha512-Uqbg+J445nc1TKn4FoDPS6ZZqAvEDnwrH42yo8B40JSOgSLxMZ/gt3h4nmCtPLQeXhjJJkqBx7SCY35WnIixaQ== -colorette@^2.0.14: - version "2.0.16" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da" - integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== - combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -2618,36 +1986,6 @@ commander@^7.0.0, commander@^7.2.0: resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== -commander@^8.3.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" - integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== - -component-emitter@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" - integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== - -compressible@~2.0.16: - version "2.0.18" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" - integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== - dependencies: - mime-db ">= 1.43.0 < 2" - -compression@^1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" - integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== - dependencies: - accepts "~1.3.5" - bytes "3.0.0" - compressible "~2.0.16" - debug "2.6.9" - on-headers "~1.0.2" - safe-buffer "5.1.2" - vary "~1.1.2" - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -2665,38 +2003,6 @@ configstore@^5.0.1: write-file-atomic "^3.0.0" xdg-basedir "^4.0.0" -connect-history-api-fallback@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" - integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== - -content-disposition@0.5.4: - version "0.5.4" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" - integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== - dependencies: - safe-buffer "5.2.1" - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= - -cookie@0.4.2: - version "0.4.2" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" - integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== - -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= - copyfiles@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5" @@ -2720,17 +2026,6 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== -cosmiconfig@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" - integrity sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.1.0" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.7.2" - cosmiconfig@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d" @@ -2742,15 +2037,7 @@ cosmiconfig@^7.0.1: path-type "^4.0.0" yaml "^1.10.0" -create-ecdh@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" - integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== - dependencies: - bn.js "^4.1.0" - elliptic "^6.5.3" - -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: +create-hash@^1.1.0, create-hash@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== @@ -2761,7 +2048,7 @@ create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: ripemd160 "^2.0.1" sha.js "^2.4.0" -create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: +create-hmac@^1.1.4: version "1.1.7" resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== @@ -2798,23 +2085,6 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -crypto-browserify@^3.12.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - crypto-random-string@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" @@ -2832,20 +2102,6 @@ css-declaration-sorter@^6.0.3: dependencies: timsort "^0.3.0" -css-loader@^6.3.0: - version "6.6.0" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-6.6.0.tgz#c792ad5510bd1712618b49381bd0310574fafbd3" - integrity sha512-FK7H2lisOixPT406s5gZM1S3l8GrfhEBT3ZiL2UX1Ng1XWs0y2GPllz/OTyvbaHe12VgQrIXIzuEGVlbUhodqg== - dependencies: - icss-utils "^5.1.0" - postcss "^8.4.5" - postcss-modules-extract-imports "^3.0.0" - postcss-modules-local-by-default "^4.0.0" - postcss-modules-scope "^3.0.0" - postcss-modules-values "^4.0.0" - postcss-value-parser "^4.2.0" - semver "^7.3.5" - css-select@^4.1.3: version "4.2.1" resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.2.1.tgz#9e665d6ae4c7f9d65dbe69d0316e3221fb274cdd" @@ -2983,13 +2239,6 @@ dataloader@^1.4.0: resolved "https://registry.yarnpkg.com/dataloader/-/dataloader-1.4.0.tgz#bca11d867f5d3f1b9ed9f737bd15970c65dff5c8" integrity sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw== -debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - debug@4, debug@4.3.3, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.0, debug@^4.3.1: version "4.3.3" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" @@ -2997,7 +2246,14 @@ debug@4, debug@4.3.3, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.0, de dependencies: ms "2.1.2" -debug@^3.1.1, debug@^3.2.6, debug@^3.2.7: +debug@^2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== @@ -3019,11 +2275,6 @@ decimal.js@^10.2.1: resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.3.1.tgz#d8c3a444a9c6774ba60ca6ad7261c3a94fd5e783" integrity sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ== -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= - decompress-response@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" @@ -3038,18 +2289,6 @@ deep-eql@^3.0.1: dependencies: type-detect "^4.0.0" -deep-equal@^1.0.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" - integrity sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g== - dependencies: - is-arguments "^1.0.4" - is-date-object "^1.0.1" - is-regex "^1.0.4" - object-is "^1.0.1" - object-keys "^1.1.1" - regexp.prototype.flags "^1.2.0" - deep-extend@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" @@ -3065,14 +2304,6 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== -default-gateway@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-4.2.0.tgz#167104c7500c2115f6dd69b0a536bb8ed720552b" - integrity sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA== - dependencies: - execa "^1.0.0" - ip-regex "^2.1.0" - default-gateway@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-6.0.3.tgz#819494c888053bdb743edbf343d6cdf7f2943a71" @@ -3092,46 +2323,6 @@ define-properties@^1.1.3: dependencies: object-keys "^1.0.12" -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - -defined@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" - integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= - -del@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/del/-/del-4.1.1.tgz#9e8f117222ea44a31ff3a156c049b99052a9f0b4" - integrity sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ== - dependencies: - "@types/glob" "^7.1.1" - globby "^6.1.0" - is-path-cwd "^2.0.0" - is-path-in-cwd "^2.0.0" - p-map "^2.0.0" - pify "^4.0.1" - rimraf "^2.6.3" - delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -3142,48 +2333,11 @@ denque@^1.5.0: resolved "https://registry.yarnpkg.com/denque/-/denque-1.5.1.tgz#07f670e29c9a78f8faecb2566a1e2c11929c5cbf" integrity sha512-XwE+iZ4D6ZUB7mfYRMb5wByE8L74HCn30FBN7sWnXksWc1LO1bPDl67pBR9o/kC4z/xSNAwkMYcGgqDV3BE3Hw== -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - -des.js@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" - integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= - detect-libc@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= -detect-node@^2.0.4: - version "2.1.0" - resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" - integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g== - -detective@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/detective/-/detective-5.2.0.tgz#feb2a77e85b904ecdea459ad897cc90a99bd2a7b" - integrity sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg== - dependencies: - acorn-node "^1.6.1" - defined "^1.0.0" - minimist "^1.1.1" - -didyoumean@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037" - integrity sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw== - diff@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" @@ -3194,15 +2348,6 @@ diff@^4.0.1: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -3210,16 +2355,6 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -dlv@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79" - integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== - -dns-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" - integrity sha1-s55/HabrCnW6nBcySzR1PEfgZU0= - dns-over-http-resolver@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/dns-over-http-resolver/-/dns-over-http-resolver-1.2.3.tgz#194d5e140a42153f55bb79ac5a64dd2768c36af9" @@ -3229,14 +2364,6 @@ dns-over-http-resolver@^1.2.3: native-fetch "^3.0.0" receptacle "^1.3.2" -dns-packet@^1.3.1: - version "1.3.4" - resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-1.3.4.tgz#e3455065824a2507ba886c55a89963bb107dec6f" - integrity sha512-BQ6F4vycLXBvdrJZ6S3gZewt6rcrks9KBgM9vrhW+knGRqc8uEdT7fuCwloc7nny5xNoMJ17HGH0R/6fpo8ECA== - dependencies: - ip "^1.1.0" - safe-buffer "^5.0.1" - dns-packet@^5.2.4, dns-packet@^5.3.0: version "5.3.1" resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.3.1.tgz#eb94413789daec0f0ebe2fcc230bdc9d7c91b43d" @@ -3261,13 +2388,6 @@ dns-socket@^4.2.2: dependencies: dns-packet "^5.2.4" -dns-txt@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/dns-txt/-/dns-txt-2.0.2.tgz#b91d806f5d27188e4ab3e7d107d881a1cc4642b6" - integrity sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY= - dependencies: - buffer-indexof "^1.0.0" - doctrine@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" @@ -3282,13 +2402,6 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -dom-converter@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" - integrity sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA== - dependencies: - utila "~0.4" - dom-serializer@^1.0.1: version "1.3.2" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.3.2.tgz#6206437d32ceefaec7161803230c7a20bc1b4d91" @@ -3310,14 +2423,14 @@ domexception@^2.0.1: dependencies: webidl-conversions "^5.0.0" -domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.2.2, domhandler@^4.3.0: +domhandler@^4.2.0, domhandler@^4.2.2, domhandler@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.0.tgz#16c658c626cf966967e306f966b431f77d4a5626" integrity sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g== dependencies: domelementtype "^2.2.0" -domutils@^2.5.2, domutils@^2.8.0: +domutils@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== @@ -3326,14 +2439,6 @@ domutils@^2.5.2, domutils@^2.8.0: domelementtype "^2.2.0" domhandler "^4.2.0" -dot-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" - integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== - dependencies: - no-case "^3.0.4" - tslib "^2.0.3" - dot-prop@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" @@ -3372,11 +2477,6 @@ ecies-geth@^1.5.2, ecies-geth@^1.5.3: elliptic "^6.5.4" secp256k1 "^4.0.3" -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - electron-fetch@^1.7.2: version "1.7.4" resolved "https://registry.yarnpkg.com/electron-fetch/-/electron-fetch-1.7.4.tgz#af975ab92a14798bfaa025f88dcd2e54a7b0b769" @@ -3389,7 +2489,7 @@ electron-to-chromium@^1.4.71: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.71.tgz#17056914465da0890ce00351a3b946fd4cd51ff6" integrity sha512-Hk61vXXKRb2cd3znPE9F+2pLWdIOmP7GjiTj45y6L3W/lO+hSnUSUhq+6lEaERWBdZOHbk2s3YV5c9xVl3boVw== -elliptic@^6.5.3, elliptic@^6.5.4: +elliptic@^6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== @@ -3420,16 +2520,6 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -emojis-list@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" - integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - encoding@^0.1.13: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" @@ -3444,14 +2534,6 @@ end-of-stream@^1.1.0: dependencies: once "^1.4.0" -enhanced-resolve@^5.0.0, enhanced-resolve@^5.8.3: - version "5.9.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.9.0.tgz#49ac24953ac8452ed8fed2ef1340fc8e043667ee" - integrity sha512-weDYmzbBygL7HzGGS26M3hGQx68vehdEg6VUmqSOaFzXExFqlnKuSvsEJCVGQHScS8CQMbrAqftT+AzzHNt/YA== - dependencies: - graceful-fs "^4.2.4" - tapable "^2.2.0" - enquirer@^2.3.5: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" @@ -3469,23 +2551,11 @@ entities@^3.0.1: resolved "https://registry.yarnpkg.com/entities/-/entities-3.0.1.tgz#2b887ca62585e96db3903482d336c1006c3001d4" integrity sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q== -envinfo@^7.7.3: - version "7.8.1" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" - integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== - err-code@^3.0.0, err-code@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/err-code/-/err-code-3.0.1.tgz#a444c7b992705f2b120ee320b09972eef331c920" integrity sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA== -errno@^0.1.3: - version "0.1.8" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" - integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== - dependencies: - prr "~1.0.1" - error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -3493,7 +2563,7 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.18.5, es-abstract@^1.19.0, es-abstract@^1.19.1: +es-abstract@^1.19.0, es-abstract@^1.19.1: version "1.19.1" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" integrity sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w== @@ -3519,11 +2589,6 @@ es-abstract@^1.18.5, es-abstract@^1.19.0, es-abstract@^1.19.1: string.prototype.trimstart "^1.0.4" unbox-primitive "^1.0.1" -es-module-lexer@^0.9.0: - version "0.9.3" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" - integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== - es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -3533,148 +2598,11 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -es6-object-assign@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/es6-object-assign/-/es6-object-assign-1.1.0.tgz#c2c3582656247c39ea107cb1e6652b6f9f24523c" - integrity sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw= - es6-promisify@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-7.0.0.tgz#9a710008dd6a4ab75a89e280bad787bfb749927b" integrity sha512-ginqzK3J90Rd4/Yz7qRrqUeIpe3TwSXTPPZtPne7tGBPeAaQiU8qt4fpKApnxHcq1AwtUdHVg5P77x/yrggG8Q== -esbuild-android-arm64@0.14.23: - version "0.14.23" - resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.23.tgz#c89b3c50b4f47668dcbeb0b34ee4615258818e71" - integrity sha512-k9sXem++mINrZty1v4FVt6nC5BQCFG4K2geCIUUqHNlTdFnuvcqsY7prcKZLFhqVC1rbcJAr9VSUGFL/vD4vsw== - -esbuild-darwin-64@0.14.23: - version "0.14.23" - resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.23.tgz#1c131e8cb133ed935ca32f824349a117c896a15b" - integrity sha512-lB0XRbtOYYL1tLcYw8BoBaYsFYiR48RPrA0KfA/7RFTr4MV7Bwy/J4+7nLsVnv9FGuQummM3uJ93J3ptaTqFug== - -esbuild-darwin-arm64@0.14.23: - version "0.14.23" - resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.23.tgz#3c6245a50109dd84953f53d7833bd3b4f0e8c6fa" - integrity sha512-yat73Z/uJ5tRcfRiI4CCTv0FSnwErm3BJQeZAh+1tIP0TUNh6o+mXg338Zl5EKChD+YGp6PN+Dbhs7qa34RxSw== - -esbuild-freebsd-64@0.14.23: - version "0.14.23" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.23.tgz#0cdc54e72d3dd9cd992f9c2960055e68a7f8650c" - integrity sha512-/1xiTjoLuQ+LlbfjJdKkX45qK/M7ARrbLmyf7x3JhyQGMjcxRYVR6Dw81uH3qlMHwT4cfLW4aEVBhP1aNV7VsA== - -esbuild-freebsd-arm64@0.14.23: - version "0.14.23" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.23.tgz#1d11faed3a0c429e99b7dddef84103eb509788b2" - integrity sha512-uyPqBU/Zcp6yEAZS4LKj5jEE0q2s4HmlMBIPzbW6cTunZ8cyvjG6YWpIZXb1KK3KTJDe62ltCrk3VzmWHp+iLg== - -esbuild-linux-32@0.14.23: - version "0.14.23" - resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.23.tgz#fd9f033fc27dcab61100cb1eb1c936893a68c841" - integrity sha512-37R/WMkQyUfNhbH7aJrr1uCjDVdnPeTHGeDhZPUNhfoHV0lQuZNCKuNnDvlH/u/nwIYZNdVvz1Igv5rY/zfrzQ== - -esbuild-linux-64@0.14.23: - version "0.14.23" - resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.23.tgz#c04c438514f1359ecb1529205d0c836d4165f198" - integrity sha512-H0gztDP60qqr8zoFhAO64waoN5yBXkmYCElFklpd6LPoobtNGNnDe99xOQm28+fuD75YJ7GKHzp/MLCLhw2+vQ== - -esbuild-linux-arm64@0.14.23: - version "0.14.23" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.23.tgz#d1b3ab2988ab0734886eb9e811726f7db099ab96" - integrity sha512-c4MLOIByNHR55n3KoYf9hYDfBRghMjOiHLaoYLhkQkIabb452RWi+HsNgB41sUpSlOAqfpqKPFNg7VrxL3UX9g== - -esbuild-linux-arm@0.14.23: - version "0.14.23" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.23.tgz#df7558b6a5076f5eb9fd387c8704f768b61d97fb" - integrity sha512-x64CEUxi8+EzOAIpCUeuni0bZfzPw/65r8tC5cy5zOq9dY7ysOi5EVQHnzaxS+1NmV+/RVRpmrzGw1QgY2Xpmw== - -esbuild-linux-mips64le@0.14.23: - version "0.14.23" - resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.23.tgz#bb4c47fccc9493d460ffeb1f88e8a97a98a14f8b" - integrity sha512-kHKyKRIAedYhKug2EJpyJxOUj3VYuamOVA1pY7EimoFPzaF3NeY7e4cFBAISC/Av0/tiV0xlFCt9q0HJ68IBIw== - -esbuild-linux-ppc64le@0.14.23: - version "0.14.23" - resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.23.tgz#a332dbc8a1b4e30cfe1261bfaa5cef57c9c8c02a" - integrity sha512-7ilAiJEPuJJnJp/LiDO0oJm5ygbBPzhchJJh9HsHZzeqO+3PUzItXi+8PuicY08r0AaaOe25LA7sGJ0MzbfBag== - -esbuild-linux-riscv64@0.14.23: - version "0.14.23" - resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.23.tgz#85675f3f931f5cd7cfb238fd82f77a62ffcb6d86" - integrity sha512-fbL3ggK2wY0D8I5raPIMPhpCvODFE+Bhb5QGtNP3r5aUsRR6TQV+ZBXIaw84iyvKC8vlXiA4fWLGhghAd/h/Zg== - -esbuild-linux-s390x@0.14.23: - version "0.14.23" - resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.23.tgz#a526282a696e6d846f4c628f5315475518c0c0f0" - integrity sha512-GHMDCyfy7+FaNSO8RJ8KCFsnax8fLUsOrj9q5Gi2JmZMY0Zhp75keb5abTFCq2/Oy6KVcT0Dcbyo/bFb4rIFJA== - -esbuild-loader@^2.15.1: - version "2.18.0" - resolved "https://registry.yarnpkg.com/esbuild-loader/-/esbuild-loader-2.18.0.tgz#7b9548578ab954574fd94655693d22aa5ec74120" - integrity sha512-AKqxM3bI+gvGPV8o6NAhR+cBxVO8+dh+O0OXBHIXXwuSGumckbPWHzZ17subjBGI2YEGyJ1STH7Haj8aCrwL/w== - dependencies: - esbuild "^0.14.6" - joycon "^3.0.1" - json5 "^2.2.0" - loader-utils "^2.0.0" - tapable "^2.2.0" - webpack-sources "^2.2.0" - -esbuild-netbsd-64@0.14.23: - version "0.14.23" - resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.23.tgz#8e456605694719aa1be4be266d6cd569c06dfaf5" - integrity sha512-ovk2EX+3rrO1M2lowJfgMb/JPN1VwVYrx0QPUyudxkxLYrWeBxDKQvc6ffO+kB4QlDyTfdtAURrVzu3JeNdA2g== - -esbuild-openbsd-64@0.14.23: - version "0.14.23" - resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.23.tgz#f2fc51714b4ddabc86e4eb30ca101dd325db2f7d" - integrity sha512-uYYNqbVR+i7k8ojP/oIROAHO9lATLN7H2QeXKt2H310Fc8FJj4y3Wce6hx0VgnJ4k1JDrgbbiXM8rbEgQyg8KA== - -esbuild-sunos-64@0.14.23: - version "0.14.23" - resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.23.tgz#a408f33ea20e215909e20173a0fd78b1aaad1f8e" - integrity sha512-hAzeBeET0+SbScknPzS2LBY6FVDpgE+CsHSpe6CEoR51PApdn2IB0SyJX7vGelXzlyrnorM4CAsRyb9Qev4h9g== - -esbuild-windows-32@0.14.23: - version "0.14.23" - resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.23.tgz#b9005bbff54dac3975ff355d5de2b5e37165d128" - integrity sha512-Kttmi3JnohdaREbk6o9e25kieJR379TsEWF0l39PQVHXq3FR6sFKtVPgY8wk055o6IB+rllrzLnbqOw/UV60EA== - -esbuild-windows-64@0.14.23: - version "0.14.23" - resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.23.tgz#2b5a99befeaca6aefdad32d738b945730a60a060" - integrity sha512-JtIT0t8ymkpl6YlmOl6zoSWL5cnCgyLaBdf/SiU/Eg3C13r0NbHZWNT/RDEMKK91Y6t79kTs3vyRcNZbfu5a8g== - -esbuild-windows-arm64@0.14.23: - version "0.14.23" - resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.23.tgz#edc560bbadb097eb45fc235aeacb942cb94a38c0" - integrity sha512-cTFaQqT2+ik9e4hePvYtRZQ3pqOvKDVNarzql0VFIzhc0tru/ZgdLoXd6epLiKT+SzoSce6V9YJ+nn6RCn6SHw== - -esbuild@^0.14.6: - version "0.14.23" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.23.tgz#95e842cb22bc0c7d82c140adc16788aac91469fe" - integrity sha512-XjnIcZ9KB6lfonCa+jRguXyRYcldmkyZ99ieDksqW/C8bnyEX299yA4QH2XcgijCgaddEZePPTgvx/2imsq7Ig== - optionalDependencies: - esbuild-android-arm64 "0.14.23" - esbuild-darwin-64 "0.14.23" - esbuild-darwin-arm64 "0.14.23" - esbuild-freebsd-64 "0.14.23" - esbuild-freebsd-arm64 "0.14.23" - esbuild-linux-32 "0.14.23" - esbuild-linux-64 "0.14.23" - esbuild-linux-arm "0.14.23" - esbuild-linux-arm64 "0.14.23" - esbuild-linux-mips64le "0.14.23" - esbuild-linux-ppc64le "0.14.23" - esbuild-linux-riscv64 "0.14.23" - esbuild-linux-s390x "0.14.23" - esbuild-netbsd-64 "0.14.23" - esbuild-openbsd-64 "0.14.23" - esbuild-sunos-64 "0.14.23" - esbuild-windows-32 "0.14.23" - esbuild-windows-64 "0.14.23" - esbuild-windows-arm64 "0.14.23" - escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -3685,11 +2613,6 @@ escape-goat@^2.0.0: resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675" integrity sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q== -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" @@ -3752,13 +2675,6 @@ eslint-plugin-functional@^3.7.0: escape-string-regexp "^4.0.0" object.fromentries "^2.0.3" -eslint-plugin-hooks@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-hooks/-/eslint-plugin-hooks-0.2.0.tgz#a6339b4afc9d37501c08b1c15589eafa94e7f076" - integrity sha512-02x4B/LEtmM+i92OBau/1qqdo3NgfCS/5xUj4TPmjpZedVGeEVbRRE+pb8by6VTThsn+DiI+AK4lH78XfAFJmQ== - dependencies: - requireindex "~1.2.0" - eslint-plugin-import@^2.24.2: version "2.25.4" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz#322f3f916a4e9e991ac7af32032c25ce313209f1" @@ -3783,27 +2699,7 @@ eslint-plugin-react-hooks@^4.3.0: resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz#318dbf312e06fab1c835a4abef00121751ac1172" integrity sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA== -eslint-plugin-react@^7.24.0: - version "7.28.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.28.0.tgz#8f3ff450677571a659ce76efc6d80b6a525adbdf" - integrity sha512-IOlFIRHzWfEQQKcAD4iyYDndHwTQiCMcJVJjxempf203jnNLUnW34AXLrV33+nEXoifJE2ZEGmcjKPL8957eSw== - dependencies: - array-includes "^3.1.4" - array.prototype.flatmap "^1.2.5" - doctrine "^2.1.0" - estraverse "^5.3.0" - jsx-ast-utils "^2.4.1 || ^3.0.0" - minimatch "^3.0.4" - object.entries "^1.1.5" - object.fromentries "^2.0.5" - object.hasown "^1.1.0" - object.values "^1.1.5" - prop-types "^15.7.2" - resolve "^2.0.0-next.3" - semver "^6.3.0" - string.prototype.matchall "^4.0.6" - -eslint-scope@5.1.1, eslint-scope@^5.1.1: +eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -3914,7 +2810,7 @@ estraverse@^4.1.1: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== -estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0: +estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== @@ -3924,11 +2820,6 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= - event-iterator@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/event-iterator/-/event-iterator-2.0.0.tgz#10f06740cc1e9fd6bc575f334c2bc1ae9d2dbf62" @@ -3939,31 +2830,16 @@ event-target-shim@^5.0.0: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== -eventemitter3@^4.0.0, eventemitter3@^4.0.4: +eventemitter3@^4.0.4: version "4.0.7" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== -events@^3.2.0, events@^3.3.0: +events@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== -eventsource@^1.0.7: - version "1.1.0" - resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.1.0.tgz#00e8ca7c92109e94b0ddf32dac677d841028cfaf" - integrity sha512-VSJjT5oCNrFvCS6igjzPAt5hBzQ2qPBFIbJ03zLI9SE0mxwZpMw6BfJrbFHm1a141AavMEB8JHmBhWAd66PfCg== - dependencies: - original "^1.0.0" - -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - execa@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" @@ -3992,89 +2868,11 @@ execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -express@^4.17.1: - version "4.17.3" - resolved "https://registry.yarnpkg.com/express/-/express-4.17.3.tgz#f6c7302194a4fb54271b73a1fe7a06478c8f85a1" - integrity sha512-yuSQpz5I+Ch7gFrPCk4/c+dIBKlQUxtgwqzph132bsT6qhuzss6I8cLJQz7B3rFblzd6wtcI0ZbGltH/C4LjUg== - dependencies: - accepts "~1.3.8" - array-flatten "1.1.1" - body-parser "1.19.2" - content-disposition "0.5.4" - content-type "~1.0.4" - cookie "0.4.2" - cookie-signature "1.0.6" - debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "~1.1.2" - fresh "0.5.2" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.3" - path-to-regexp "0.1.7" - proxy-addr "~2.0.7" - qs "6.9.7" - range-parser "~1.2.1" - safe-buffer "5.2.1" - send "0.17.2" - serve-static "1.14.2" - setprototypeof "1.2.0" - statuses "~1.5.0" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" @@ -4095,7 +2893,7 @@ fast-fifo@^1.0.0: resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.1.0.tgz#17d1a3646880b9891dfa0c54e69c5fef33cad779" integrity sha512-Kl29QoNbNvn4nhDsLYjyIAaIqaJB6rBx5p3sL9VjaefJ+eMFBWVZiaoguaoZfzEKr5RhAti0UgM8703akGPJ6g== -fast-glob@^3.2.11, fast-glob@^3.2.9: +fast-glob@^3.2.9: version "3.2.11" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== @@ -4116,11 +2914,6 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= -fastest-levenshtein@^1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz#9990f7d3a88cc5a9ffd1f1745745251700d497e2" - integrity sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow== - fastq@^1.6.0: version "1.13.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" @@ -4128,13 +2921,6 @@ fastq@^1.6.0: dependencies: reusify "^1.0.4" -faye-websocket@^0.11.3: - version "0.11.4" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.4.tgz#7f0d9275cfdd86a1c963dc8b65fcc451edcbb1da" - integrity sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g== - dependencies: - websocket-driver ">=0.5.1" - file-entry-cache@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" @@ -4142,29 +2928,11 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" -file-loader@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-6.2.0.tgz#baef7cf8e1840df325e4390b4484879480eebe4d" - integrity sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw== - dependencies: - loader-utils "^2.0.0" - schema-utils "^3.0.0" - file-uri-to-path@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - fill-range@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" @@ -4172,19 +2940,6 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -finalhandler@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" - integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.3" - statuses "~1.5.0" - unpipe "~1.0.0" - find-up@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" @@ -4207,14 +2962,6 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" -find-up@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - flat-cache@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" @@ -4233,45 +2980,16 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.5.tgz#76c8584f4fc843db64702a6bd04ab7a8bd666da3" integrity sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg== -follow-redirects@^1.0.0, follow-redirects@^1.14.0: +follow-redirects@^1.14.0: version "1.14.9" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7" integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w== -for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= - -foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" - integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= - forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= -fork-ts-checker-webpack-plugin@^6.3.1: - version "6.5.0" - resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.0.tgz#0282b335fa495a97e167f69018f566ea7d2a2b5e" - integrity sha512-cS178Y+xxtIjEUorcHddKS7yCMlrDPV31mt47blKKRfMd70Kxu5xruAFE2o9sDY6wVC5deuob/u/alD04YYHnw== - dependencies: - "@babel/code-frame" "^7.8.3" - "@types/json-schema" "^7.0.5" - chalk "^4.1.0" - chokidar "^3.4.2" - cosmiconfig "^6.0.0" - deepmerge "^4.2.2" - fs-extra "^9.0.0" - glob "^7.1.6" - memfs "^3.1.2" - minimatch "^3.0.4" - schema-utils "2.7.0" - semver "^7.3.2" - tapable "^1.0.0" - form-data@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" @@ -4290,56 +3008,11 @@ form-data@~2.3.2: combined-stream "^1.0.6" mime-types "^2.1.12" -forwarded@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" - integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== - -fraction.js@^4.1.2: - version "4.1.3" - resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.1.3.tgz#be65b0f20762ef27e1e793860bc2dfb716e99e65" - integrity sha512-pUHWWt6vHzZZiQJcM6S/0PXfS+g6FM4BF5rj9wZyreivhQPdsh5PpE25VtSNxq80wHS5RfY51Ii+8Z0Zl/pmzg== - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= - dependencies: - map-cache "^0.2.2" - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= - -fs-extra@^9.0.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - -fs-monkey@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.3.tgz#ae3ac92d53bb328efe0e9a1d9541f6ad8d48e2d3" - integrity sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q== - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@^1.2.7: - version "1.2.13" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" - integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== - dependencies: - bindings "^1.5.0" - nan "^2.12.1" - fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" @@ -4411,11 +3084,6 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= - getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" @@ -4423,14 +3091,6 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" -glob-parent@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" - integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= - dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" - glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -4438,19 +3098,7 @@ glob-parent@^5.1.2, glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob-parent@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - -glob-to-regexp@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" - integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== - -glob@7.2.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.2, glob@^7.1.3, glob@^7.1.6: +glob@7.2.0, glob@^7.0.5, glob@^7.1.2, glob@^7.1.3: version "7.2.0" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== @@ -4493,17 +3141,6 @@ globby@^11.0.3: merge2 "^1.4.1" slash "^3.0.0" -globby@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" - integrity sha1-9abXDoOV4hyFj7BInWTfAkJNUGw= - dependencies: - array-union "^1.0.1" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - got@^9.6.0: version "9.6.0" resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" @@ -4521,7 +3158,7 @@ got@^9.6.0: to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.9: +graceful-fs@^4.1.2: version "4.2.9" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== @@ -4531,11 +3168,6 @@ growl@1.10.5: resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== -handle-thing@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e" - integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== - har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" @@ -4576,37 +3208,6 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - has-yarn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77" @@ -4641,7 +3242,7 @@ hashlru@^2.3.0: resolved "https://registry.yarnpkg.com/hashlru/-/hashlru-2.3.0.tgz#5dc15928b3f6961a2056416bb3a4910216fdfb51" integrity sha512-0cMsjjIC8I+D3M44pOQdsy0OHXGLVz6Z0beRuufhKa0KfaD2wGwAev6jILzXsd3/vpnNQJmWyZtIILqM1N+n5A== -he@1.2.0, he@^1.2.0: +he@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== @@ -4651,18 +3252,6 @@ hi-base32@^0.5.1: resolved "https://registry.yarnpkg.com/hi-base32/-/hi-base32-0.5.1.tgz#1279f2ddae2673219ea5870c2121d2a33132857e" integrity sha512-EmBBpvdYh/4XxsnUybsPag6VikPYnN30td+vQk+GI3qpahVEG9+gTkG0aXVxTjBqQ5T6ijbWIu77O+C5WFWsnA== -history@^4.9.0: - version "4.10.1" - resolved "https://registry.yarnpkg.com/history/-/history-4.10.1.tgz#33371a65e3a83b267434e2b3f3b1b4c58aad4cf3" - integrity sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew== - dependencies: - "@babel/runtime" "^7.1.2" - loose-envify "^1.2.0" - resolve-pathname "^3.0.0" - tiny-invariant "^1.0.2" - tiny-warning "^1.0.0" - value-equal "^1.0.1" - hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -4672,7 +3261,7 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0: +hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.3.0: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== @@ -4684,16 +3273,6 @@ hosted-git-info@^2.1.4: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== -hpack.js@^2.1.6: - version "2.1.6" - resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" - integrity sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI= - dependencies: - inherits "^2.0.1" - obuf "^1.0.0" - readable-stream "^2.0.1" - wbuf "^1.1.0" - html-encoding-sniffer@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" @@ -4701,40 +3280,11 @@ html-encoding-sniffer@^2.0.1: dependencies: whatwg-encoding "^1.0.5" -html-entities@^1.3.1: - version "1.4.0" - resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.4.0.tgz#cfbd1b01d2afaf9adca1b10ae7dffab98c71d2dc" - integrity sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA== - html-entities@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.3.2.tgz#760b404685cb1d794e4f4b744332e3b00dcfe488" integrity sha512-c3Ab/url5ksaT0WyleslpBEthOzWhrjQbg75y7XUsfSzi3Dgzt0l8w5e7DylRn15MTlMMD58dTfzddNS2kcAjQ== -html-minifier-terser@^6.0.2: - version "6.1.0" - resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz#bfc818934cc07918f6b3669f5774ecdfd48f32ab" - integrity sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw== - dependencies: - camel-case "^4.1.2" - clean-css "^5.2.2" - commander "^8.3.0" - he "^1.2.0" - param-case "^3.0.4" - relateurl "^0.2.7" - terser "^5.10.0" - -html-webpack-plugin@^5.3.2: - version "5.5.0" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-5.5.0.tgz#c3911936f57681c1f9f4d8b68c158cd9dfe52f50" - integrity sha512-sy88PC2cRTVxvETRgUHFrL4No3UxvcH8G1NepGhqaTT+GXN2kTamqasot0inS5hXeg1cMbFDt27zzo9p35lZVw== - dependencies: - "@types/html-minifier-terser" "^6.0.0" - html-minifier-terser "^6.0.2" - lodash "^4.17.21" - pretty-error "^4.0.0" - tapable "^2.0.0" - htmlnano@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/htmlnano/-/htmlnano-2.0.0.tgz#07376faa064f7e1e832dfd91e1a9f606b0bc9b78" @@ -4744,16 +3294,6 @@ htmlnano@^2.0.0: posthtml "^0.16.5" timsort "^0.3.0" -htmlparser2@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" - integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== - dependencies: - domelementtype "^2.0.1" - domhandler "^4.0.0" - domutils "^2.5.2" - entities "^2.0.0" - htmlparser2@^7.1.1: version "7.2.0" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-7.2.0.tgz#8817cdea38bbc324392a90b1990908e81a65f5a5" @@ -4769,37 +3309,6 @@ http-cache-semantics@^4.0.0: resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== -http-deceiver@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" - integrity sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc= - -http-errors@1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.1.tgz#7c3f28577cbc8a207388455dbd62295ed07bd68c" - integrity sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g== - dependencies: - depd "~1.1.2" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.1" - -http-errors@~1.6.2: - version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" - integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - -http-parser-js@>=0.5.1: - version "0.5.5" - resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.5.tgz#d7c30d5d3c90d865b4a2e870181f9d6f22ac7ac5" - integrity sha512-x+JVEkO2PoM8qqpbPbOL3cqHPwerep7OwzK7Ay+sMQjKzaKCqWvjoXm5tqMP9tXWWTnTzAjIhXg+J99XYuPhPA== - http-proxy-agent@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" @@ -4809,25 +3318,6 @@ http-proxy-agent@^4.0.1: agent-base "6" debug "4" -http-proxy-middleware@0.19.1: - version "0.19.1" - resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz#183c7dc4aa1479150306498c210cdaf96080a43a" - integrity sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q== - dependencies: - http-proxy "^1.17.0" - is-glob "^4.0.0" - lodash "^4.17.11" - micromatch "^3.1.10" - -http-proxy@^1.17.0: - version "1.18.1" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" - integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== - dependencies: - eventemitter3 "^4.0.0" - follow-redirects "^1.0.0" - requires-port "^1.0.0" - http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -4837,11 +3327,6 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -https-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" - integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= - https-proxy-agent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" @@ -4862,18 +3347,13 @@ iconv-lite@0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -iconv-lite@^0.6.2, iconv-lite@^0.6.3: +iconv-lite@^0.6.2: version "0.6.3" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== dependencies: safer-buffer ">= 2.1.2 < 3.0.0" -icss-utils@^5.0.0, icss-utils@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" - integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== - ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" @@ -4894,7 +3374,7 @@ ignore@^5.0.5, ignore@^5.1.8, ignore@^5.2.0: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== -import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1: +import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -4907,22 +3387,6 @@ import-lazy@^2.1.0: resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= -import-local@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" - integrity sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ== - dependencies: - pkg-dir "^3.0.0" - resolve-cwd "^2.0.0" - -import-local@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" - integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -4941,16 +3405,11 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4: +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - ini@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ini/-/ini-2.0.0.tgz#e5fd556ecdd5726be978fa1001862eacb0a94bc5" @@ -4981,14 +3440,6 @@ interface-store@^1.0.2: resolved "https://registry.yarnpkg.com/interface-store/-/interface-store-1.0.2.tgz#1ebd6cbbae387039a3a2de0cae665da52474800f" integrity sha512-rUBLYsgoWwxuUpnQoSUr+DR/3dH3reVeIu5aOHFZK31lAexmb++kR6ZECNRgrx6WvoaM3Akdo0A7TDrqgCzZaQ== -internal-ip@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-4.3.0.tgz#845452baad9d2ca3b69c635a137acb9a0dad0907" - integrity sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg== - dependencies: - default-gateway "^4.2.0" - ipaddr.js "^1.9.0" - internal-slot@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" @@ -4998,11 +3449,6 @@ internal-slot@^1.0.3: has "^1.0.3" side-channel "^1.0.4" -interpret@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" - integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== - ip-address@^8.0.0: version "8.1.0" resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-8.1.0.tgz#1fe9b4509b51ff7d2fbbef4d3d26994d9915a459" @@ -5011,26 +3457,11 @@ ip-address@^8.0.0: jsbn "1.1.0" sprintf-js "1.1.2" -ip-regex@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" - integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= - ip-regex@^4.0.0, ip-regex@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5" integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q== -ip@^1.1.0, ip@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" - integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= - -ipaddr.js@1.9.1, ipaddr.js@^1.9.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - ipaddr.js@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.0.1.tgz#eca256a7a877e917aeb368b0a7497ddf42ef81c0" @@ -5078,33 +3509,6 @@ ipfs-utils@^9.0.1: react-native-fetch-api "^2.0.0" stream-to-it "^0.2.2" -is-absolute-url@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698" - integrity sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q== - -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== - dependencies: - kind-of "^6.0.0" - -is-arguments@^1.0.4: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" - integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -5117,13 +3521,6 @@ is-bigint@^1.0.1: dependencies: has-bigints "^1.0.1" -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= - dependencies: - binary-extensions "^1.0.0" - is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" @@ -5139,11 +3536,6 @@ is-boolean-object@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - is-callable@^1.1.4, is-callable@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" @@ -5156,27 +3548,13 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" -is-core-module@^2.2.0, is-core-module@^2.8.0, is-core-module@^2.8.1: +is-core-module@^2.8.0, is-core-module@^2.8.1: version "2.8.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== dependencies: has "^1.0.3" -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== - dependencies: - kind-of "^6.0.0" - is-date-object@^1.0.1: version "1.0.5" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" @@ -5184,42 +3562,12 @@ is-date-object@^1.0.1: dependencies: has-tostringtag "^1.0.0" -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - is-electron@^2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/is-electron/-/is-electron-2.2.1.tgz#751b1dd8a74907422faa5c35aaa0cf66d98086e9" integrity sha512-r8EEQQsqT+Gn0aXFx7lTFygYQhILLCB+wn0WCDL5LZRINeLH/Rvw1j2oKodELLXYNImQ3CRlVsY8wW4cGOsyuw== -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^2.1.0, is-extglob@^2.1.1: +is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= @@ -5234,20 +3582,6 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-generator-function@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" - integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== - dependencies: - has-tostringtag "^1.0.0" - -is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" - integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= - dependencies: - is-extglob "^2.1.0" - is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" @@ -5280,14 +3614,6 @@ is-loopback-addr@^1.0.0: resolved "https://registry.yarnpkg.com/is-loopback-addr/-/is-loopback-addr-1.0.1.tgz#d4adf50d12d53100da62a397c61d6c83fe40aab9" integrity sha512-DhWU/kqY7X2F6KrrVTu7mHlbd2Pbo4D1YkAzasBMjQs6lJAoefxaA6m6CpSX0K6pjt9D0b9PNFI5zduy/vzOYw== -is-nan@^1.2.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d" - integrity sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - is-negative-zero@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" @@ -5305,13 +3631,6 @@ is-number-object@^1.0.4: dependencies: has-tostringtag "^1.0.0" -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= - dependencies: - kind-of "^3.0.2" - is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" @@ -5322,25 +3641,6 @@ is-obj@^2.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== -is-path-cwd@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" - integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== - -is-path-in-cwd@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz#bfe2dca26c69f397265a4009963602935a053acb" - integrity sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ== - dependencies: - is-path-inside "^2.1.0" - -is-path-inside@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-2.1.0.tgz#7c9810587d659a40d27bcdb4d5616eab059494b2" - integrity sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg== - dependencies: - path-is-inside "^1.0.2" - is-path-inside@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" @@ -5351,19 +3651,12 @@ is-plain-obj@^2.1.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== -is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - is-potential-custom-element-name@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== -is-regex@^1.0.4, is-regex@^1.1.4: +is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== @@ -5400,17 +3693,6 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" -is-typed-array@^1.1.3, is-typed-array@^1.1.7: - version "1.1.8" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.8.tgz#cbaa6585dc7db43318bc5b89523ea384a6f65e79" - integrity sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - es-abstract "^1.18.5" - foreach "^2.0.5" - has-tostringtag "^1.0.0" - is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -5428,16 +3710,6 @@ is-weakref@^1.0.1: dependencies: call-bind "^1.0.2" -is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -is-wsl@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" - integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= - is-yarn-global@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.3.0.tgz#d502d3382590ea3004893746754c89139973e232" @@ -5448,7 +3720,7 @@ isarray@0.0.1: resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= -isarray@1.0.0, isarray@~1.0.0: +isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= @@ -5471,18 +3743,6 @@ iso-url@^1.1.2, iso-url@^1.1.5: resolved "https://registry.yarnpkg.com/iso-url/-/iso-url-1.2.1.tgz#db96a49d8d9a64a1c889fc07cc525d093afb1811" integrity sha512-9JPDgCN4B7QPkLtYAAOrEuAWvP9rWvR5offAr0/SeF046wIkglqH3VXgYYP6NcsKslH80UIVgmPqNe3j7tG2ng== -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= - isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -5639,20 +3899,6 @@ jest-changed-files@^24.9.0: execa "^1.0.0" throat "^4.0.0" -jest-worker@^27.4.5: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" - integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -joycon@^3.0.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03" - integrity sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw== - js-sha3@^0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" @@ -5764,7 +4010,7 @@ json-buffer@3.0.0: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= -json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: +json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== @@ -5804,11 +4050,6 @@ json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= -json3@^3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.3.tgz#7fc10e375fc5ae42c4705a5cc0aa6f62be305b81" - integrity sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA== - json5@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" @@ -5816,22 +4057,13 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" -json5@^2.1.2, json5@^2.2.0: +json5@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== dependencies: minimist "^1.2.5" -jsonfile@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" - integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== - dependencies: - universalify "^2.0.0" - optionalDependencies: - graceful-fs "^4.1.6" - jsprim@^1.2.2: version "1.4.2" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" @@ -5842,14 +4074,6 @@ jsprim@^1.2.2: json-schema "0.4.0" verror "1.10.0" -"jsx-ast-utils@^2.4.1 || ^3.0.0": - version "3.2.1" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.2.1.tgz#720b97bfe7d901b927d87c3773637ae8ea48781b" - integrity sha512-uP5vu8xfy2F9A6LGC22KO7e2/vGTS1MhP+18f++ZNlf0Ohaxbc9nIEwHAsejlJKyzfZzU5UIhe5ItYkitcZnZA== - dependencies: - array-includes "^3.1.3" - object.assign "^4.1.2" - keypair@^1.0.1, keypair@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/keypair/-/keypair-1.0.4.tgz#a749a45f388593f3950f18b3757d32a93bd8ce83" @@ -5862,35 +4086,6 @@ keyv@^3.0.0: dependencies: json-buffer "3.0.0" -killable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892" - integrity sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg== - -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= - dependencies: - is-buffer "^1.1.5" - -kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - latest-version@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-5.1.0.tgz#119dfe908fe38d15dfa43ecd13fa12ec8832face" @@ -6128,7 +4323,7 @@ libp2p@^0.32.4: wherearewe "^1.0.0" xsalsa20 "^1.1.0" -lilconfig@^2.0.3, lilconfig@^2.0.4: +lilconfig@^2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.4.tgz#f4507d043d7058b380b6a8f5cb7bcd4b34cee082" integrity sha512-bfTIN7lEsiooCocSISTWXkiWJkRqtL9wYtYy+8EK3Y41qh3mpwPU0ycTOgjdY9ErwXCc8QyrQp82bdL0Xkm9yA== @@ -6159,20 +4354,6 @@ load-json-file@^4.0.0: pify "^3.0.0" strip-bom "^3.0.0" -loader-runner@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.2.0.tgz#d7022380d66d14c5fb1d496b89864ebcfd478384" - integrity sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw== - -loader-utils@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.2.tgz#d6e3b4fb81870721ae4e0868ab11dd638368c129" - integrity sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^2.1.2" - locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -6189,13 +4370,6 @@ locate-path@^3.0.0: p-locate "^3.0.0" path-exists "^3.0.0" -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - locate-path@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" @@ -6228,7 +4402,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0: +lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.4, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -6241,17 +4415,12 @@ log-symbols@4.1.0: chalk "^4.1.0" is-unicode-supported "^0.1.0" -loglevel@^1.6.8: - version "1.8.0" - resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.8.0.tgz#e7ec73a57e1e7b419cb6c6ac06bf050b67356114" - integrity sha512-G6A/nJLRgWOuuwdNuA6koovfEV1YpqqAG4pRUlFaz3jj2QNZ8M4vBqnVA+HBTmU/AMNUtlOsMmSpF6NyOjztbA== - long@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== -loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1, loose-envify@^1.4.0: +loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -6265,13 +4434,6 @@ loupe@^2.3.1: dependencies: get-func-name "^2.0.0" -lower-case@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" - integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== - dependencies: - tslib "^2.0.3" - lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" @@ -6308,18 +4470,6 @@ make-error@^1.1.1: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= - dependencies: - object-visit "^1.0.0" - md5.js@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" @@ -6334,36 +4484,11 @@ mdn-data@2.0.14: resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50" integrity sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow== -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= - -memfs@^3.1.2: - version "3.4.1" - resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.4.1.tgz#b78092f466a0dce054d63d39275b24c71d3f1305" - integrity sha512-1c9VPVvW5P7I85c35zAdEr1TD5+F11IToIHIlrVIcflfnzPkJa0ZoYEoEdYDP8KgPFoSZ/opDrUsAoZWym3mtw== - dependencies: - fs-monkey "1.0.3" - -memory-fs@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" - integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - memorystream@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" integrity sha1-htcJCzDORV1j+64S3aUaR93K+bI= -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= - merge-options@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/merge-options/-/merge-options-3.0.4.tgz#84709c2aa2a4b24c1981f66c179fe5565cc6dbb7" @@ -6381,31 +4506,7 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= - -micromatch@^3.1.10, micromatch@^3.1.4: - version "3.1.10" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.2" - -micromatch@^4.0.0, micromatch@^4.0.4: +micromatch@^4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== @@ -6413,41 +4514,18 @@ micromatch@^4.0.0, micromatch@^4.0.4: braces "^3.0.1" picomatch "^2.2.3" -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - mime-db@1.51.0: version "1.51.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g== -"mime-db@>= 1.43.0 < 2": - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12, mime-types@^2.1.27, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: +mime-types@^2.1.12, mime-types@~2.1.19: version "2.1.34" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24" integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A== dependencies: mime-db "1.51.0" -mime@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mime@^2.4.4: - version "2.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" - integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== - mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -6458,14 +4536,6 @@ mimic-response@^1.0.0, mimic-response@^1.0.1: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== -mini-create-react-context@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz#072171561bfdc922da08a60c2197a497cc2d1d5e" - integrity sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ== - dependencies: - "@babel/runtime" "^7.12.1" - tiny-warning "^1.0.3" - minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" @@ -6490,26 +4560,11 @@ minimatch@^3.0.3, minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" -minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5: +minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -mixin-deep@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" - integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -mkdirp@^0.5.1, mkdirp@^0.5.5: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - mkdirp@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" @@ -6601,19 +4656,6 @@ multibase@^4.0.1: dependencies: "@multiformats/base-x" "^4.0.1" -multicast-dns-service-types@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" - integrity sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE= - -multicast-dns@^6.0.1: - version "6.2.3" - resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.2.3.tgz#a0ec7bd9055c4282f790c3c82f4e28db3b31b229" - integrity sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g== - dependencies: - dns-packet "^1.3.1" - thunky "^1.0.2" - multiformats@^9.0.0, multiformats@^9.1.2, multiformats@^9.4.2, multiformats@^9.4.5: version "9.6.4" resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.6.4.tgz#5dce1f11a407dbb69aa612cb7e5076069bb759ca" @@ -6649,7 +4691,7 @@ mutable-proxy@^1.0.0: resolved "https://registry.yarnpkg.com/mutable-proxy/-/mutable-proxy-1.0.0.tgz#3c6e6f9304c2e5a4751bb65b5a66677de9bcf3c8" integrity sha512-4OvNRr1DJpy2QuDUV74m+BWZ//n4gG4bmd21MzDSPqHEidIDWqwyOjcadU1LBMO3vXYGurVKjfBrxrSQIHFu9A== -nan@^2.12.1, nan@^2.14.2: +nan@^2.14.2: version "2.15.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.15.0.tgz#3f34a473ff18e15c1b5626b62903b5ad6e665fee" integrity sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ== @@ -6664,23 +4706,6 @@ nanoid@^3.0.2, nanoid@^3.1.20, nanoid@^3.2.0: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== -nanomatch@^1.2.9: - version "1.2.13" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" - integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - native-abort-controller@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/native-abort-controller/-/native-abort-controller-1.0.4.tgz#39920155cc0c18209ff93af5bc90be856143f251" @@ -6696,16 +4721,6 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -negotiator@0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" - integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== - -neo-async@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - netmask@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/netmask/-/netmask-2.0.2.tgz#8b01a07644065d536383835823bc52004ebac5e7" @@ -6716,14 +4731,6 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -no-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" - integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== - dependencies: - lower-case "^2.0.2" - tslib "^2.0.3" - noble-ed25519@^1.2.6: version "1.2.6" resolved "https://registry.yarnpkg.com/noble-ed25519/-/noble-ed25519-1.2.6.tgz#a55b75c61da000498abb43ffd81caaa370bfed22" @@ -6744,13 +4751,6 @@ node-addon-api@^3.2.1: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== -node-fetch@^2.6.0: - version "2.6.7" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== - dependencies: - whatwg-url "^5.0.0" - "node-fetch@https://registry.npmjs.org/@achingbrain/node-fetch/-/node-fetch-2.6.7.tgz": version "2.6.7" uid "1b5d62978f2ed07b99444f64f0df39f960a6d34d" @@ -6817,23 +4817,11 @@ normalize-package-data@^2.3.2: semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-path@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= - dependencies: - remove-trailing-separator "^1.0.1" - normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -normalize-range@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" - integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= - normalize-url@^4.1.0: version "4.5.1" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a" @@ -6903,55 +4891,26 @@ oauth-sign@~0.9.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== -object-assign@^4.0.1, object-assign@^4.1.1: +object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - object-hash@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-1.3.1.tgz#fde452098a951cb145f039bb7d455449ddc126df" integrity sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA== -object-hash@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.2.0.tgz#5ad518581eefc443bd763472b8ff2e9c2c0d54a5" - integrity sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw== - object-inspect@^1.11.0, object-inspect@^1.9.0: version "1.12.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.0.tgz#6e2c120e868fd1fd18cb4f18c31741d0d6e776f0" integrity sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g== -object-is@^1.0.1: - version "1.1.5" - resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" - integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= - dependencies: - isobject "^3.0.0" - object.assign@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" @@ -6962,16 +4921,7 @@ object.assign@^4.1.2: has-symbols "^1.0.1" object-keys "^1.1.1" -object.entries@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.5.tgz#e1acdd17c4de2cd96d5a08487cfb9db84d881861" - integrity sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - -object.fromentries@^2.0.3, object.fromentries@^2.0.5: +object.fromentries@^2.0.3: version "2.0.5" resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.5.tgz#7b37b205109c21e741e605727fe8b0ad5fa08251" integrity sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw== @@ -6980,21 +4930,6 @@ object.fromentries@^2.0.3, object.fromentries@^2.0.5: define-properties "^1.1.3" es-abstract "^1.19.1" -object.hasown@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.0.tgz#7232ed266f34d197d15cac5880232f7a4790afe5" - integrity sha512-MhjYRfj3GBlhSkDHo6QmvgjRLXQ2zndabdf3nX0yTyZK9rPfxb6uRpAac8HXNLy1GpqWtZ81Qh4v3uOls2sRAg== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.19.1" - -object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= - dependencies: - isobject "^3.0.1" - object.values@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" @@ -7004,23 +4939,6 @@ object.values@^1.1.5: define-properties "^1.1.3" es-abstract "^1.19.1" -obuf@^1.0.0, obuf@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" - integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= - dependencies: - ee-first "1.1.1" - -on-headers@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" - integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== - once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -7035,13 +4953,6 @@ onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -opn@^5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc" - integrity sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA== - dependencies: - is-wsl "^1.1.0" - optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -7071,13 +4982,6 @@ ordered-binary@^1.2.4: resolved "https://registry.yarnpkg.com/ordered-binary/-/ordered-binary-1.2.4.tgz#51d3a03af078a0bdba6c7bc8f4fedd1f5d45d83e" integrity sha512-A/csN0d3n+igxBPfUrjbV5GC69LWj2pjZzAAeeHXLukQ4+fytfP4T1Lg0ju7MSPSwq7KtHkGaiwO8URZN5IpLg== -original@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/original/-/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f" - integrity sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg== - dependencies: - url-parse "^1.4.3" - p-any@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-any/-/p-any-3.0.0.tgz#79847aeed70b5d3a10ea625296c0c3d2e90a87b9" @@ -7121,7 +5025,7 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" -p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.2: +p-limit@^2.0.0, p-limit@^2.2.2: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== @@ -7149,13 +5053,6 @@ p-locate@^3.0.0: dependencies: p-limit "^2.0.0" -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - p-locate@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" @@ -7163,11 +5060,6 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" -p-map@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" - integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== - p-queue@^6.6.2: version "6.6.2" resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-6.6.2.tgz#2068a9dcf8e67dd0ec3e7a2bcb76810faa85e426" @@ -7181,13 +5073,6 @@ p-reflect@^2.1.0: resolved "https://registry.yarnpkg.com/p-reflect/-/p-reflect-2.1.0.tgz#5d67c7b3c577c4e780b9451fc9129675bd99fe67" integrity sha512-paHV8NUz8zDHu5lhr/ngGWQiW067DK/+IbJ+RfZ4k+s8y4EKyYCz8pGYWjxCg35eHztpJAt+NUgvN4L+GCbPlg== -p-retry@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-3.0.1.tgz#316b4c8893e2c8dc1cfa891f406c4b422bebf328" - integrity sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w== - dependencies: - retry "^0.12.0" - p-retry@^4.4.0: version "4.6.1" resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-4.6.1.tgz#8fcddd5cdf7a67a0911a9cf2ef0e5df7f602316c" @@ -7244,19 +5129,6 @@ package-json@^6.3.0: registry-url "^5.0.0" semver "^6.2.0" -pako@~1.0.5: - version "1.0.11" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" - integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== - -param-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5" - integrity sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A== - dependencies: - dot-case "^3.0.4" - tslib "^2.0.3" - parcel@^2.0.0: version "2.3.2" resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.3.2.tgz#d1cb475f27edae981edea7a7104e04d3a35a87ca" @@ -7284,17 +5156,6 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-asn1@^5.0.0, parse-asn1@^5.1.5: - version "5.1.6" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" - integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== - dependencies: - asn1.js "^5.2.0" - browserify-aes "^1.0.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - safe-buffer "^5.1.1" - parse-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" @@ -7318,29 +5179,6 @@ parse5@6.0.1: resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== -parseurl@~1.3.2, parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -pascal-case@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" - integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g== - dependencies: - no-case "^3.0.4" - tslib "^2.0.3" - -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= - -path-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= - path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" @@ -7356,11 +5194,6 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-is-inside@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= - path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" @@ -7371,23 +5204,11 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-parse@^1.0.6, path-parse@^1.0.7: +path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= - -path-to-regexp@^1.7.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a" - integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA== - dependencies: - isarray "0.0.1" - path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" @@ -7405,7 +5226,7 @@ pathval@^1.1.1: resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== -pbkdf2@^3.0.3, pbkdf2@^3.1.2: +pbkdf2@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== @@ -7466,61 +5287,11 @@ pidtree@^0.3.0: resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.3.1.tgz#ef09ac2cc0533df1f3250ccf2c4d366b0d12114a" integrity sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA== -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= - pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= -pify@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" - integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= - -pkg-dir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" - integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== - dependencies: - find-up "^3.0.0" - -pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -portfinder@^1.0.26: - version "1.0.28" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.28.tgz#67c4622852bd5374dd1dd900f779f53462fac778" - integrity sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA== - dependencies: - async "^2.6.2" - debug "^3.1.1" - mkdirp "^0.5.5" - -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= - postcss-calc@^8.2.0: version "8.2.4" resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-8.2.4.tgz#77b9c29bfcbe8a07ff6693dc87050828889739a5" @@ -7566,21 +5337,6 @@ postcss-discard-overridden@^5.0.4: resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-5.0.4.tgz#cc999d6caf18ea16eff8b2b58f48ec3ddee35c9c" integrity sha512-3j9QH0Qh1KkdxwiZOW82cId7zdwXVQv/gRXYDnwx5pBtR1sTkU4cXRK9lp5dSdiM0r0OICO/L8J6sV1/7m0kHg== -postcss-js@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-4.0.0.tgz#31db79889531b80dc7bc9b0ad283e418dce0ac00" - integrity sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ== - dependencies: - camelcase-css "^2.0.1" - -postcss-load-config@^3.1.0: - version "3.1.3" - resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.3.tgz#21935b2c43b9a86e6581a576ca7ee1bde2bd1d23" - integrity sha512-5EYgaM9auHGtO//ljHH+v/aC/TQ5LHXtL7bQajNAUBKUVKiYE8rYpFms7+V26D9FncaGe2zwCoPQsFKb5zF/Hw== - dependencies: - lilconfig "^2.0.4" - yaml "^1.10.2" - postcss-merge-longhand@^5.0.6: version "5.0.6" resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-5.0.6.tgz#090e60d5d3b3caad899f8774f8dccb33217d2166" @@ -7631,41 +5387,6 @@ postcss-minify-selectors@^5.1.3: dependencies: postcss-selector-parser "^6.0.5" -postcss-modules-extract-imports@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz#cda1f047c0ae80c97dbe28c3e76a43b88025741d" - integrity sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw== - -postcss-modules-local-by-default@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz#ebbb54fae1598eecfdf691a02b3ff3b390a5a51c" - integrity sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ== - dependencies: - icss-utils "^5.0.0" - postcss-selector-parser "^6.0.2" - postcss-value-parser "^4.1.0" - -postcss-modules-scope@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz#9ef3151456d3bbfa120ca44898dfca6f2fa01f06" - integrity sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg== - dependencies: - postcss-selector-parser "^6.0.4" - -postcss-modules-values@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz#d7c5e7e68c3bb3c9b27cbf48ca0bb3ffb4602c9c" - integrity sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ== - dependencies: - icss-utils "^5.0.0" - -postcss-nested@5.0.6: - version "5.0.6" - resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-5.0.6.tgz#466343f7fc8d3d46af3e7dba3fcd47d052a945bc" - integrity sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA== - dependencies: - postcss-selector-parser "^6.0.6" - postcss-normalize-charset@^5.0.3: version "5.0.3" resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-5.0.3.tgz#719fb9f9ca9835fcbd4fed8d6e0d72a79e7b5472" @@ -7752,7 +5473,7 @@ postcss-reduce-transforms@^5.0.4: dependencies: postcss-value-parser "^4.2.0" -postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5, postcss-selector-parser@^6.0.6, postcss-selector-parser@^6.0.9: +postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5, postcss-selector-parser@^6.0.9: version "6.0.9" resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.9.tgz#ee71c3b9ff63d9cd130838876c13a2ec1a992b2f" integrity sha512-UO3SgnZOVTwu4kyLR22UQ1xZh086RyNZppb7lLAKBFK8a32ttG5i87Y/P3+2bRSjZNyJ1B7hfFNo273tKe9YxQ== @@ -7775,12 +5496,12 @@ postcss-unique-selectors@^5.0.4: dependencies: postcss-selector-parser "^6.0.5" -postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0: +postcss-value-parser@^4.0.2, postcss-value-parser@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -postcss@^8.4.5, postcss@^8.4.6: +postcss@^8.4.5: version "8.4.6" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.6.tgz#c5ff3c3c457a23864f32cb45ac9b741498a09ae1" integrity sha512-OovjwIzs9Te46vlEx7+uXB0PLijpwjXGKXjVGGPIGubGpq7uh5Xgf6D6FiJ/SzJMBosHDp6a2hiXOS97iBXcaA== @@ -7826,19 +5547,11 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= -prettier@^2.3.2, prettier@^2.4.0, prettier@^2.5.1: +prettier@^2.5.1: version "2.5.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a" integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg== -pretty-error@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-4.0.0.tgz#90a703f46dd7234adb46d0f84823e9d1cb8f10d6" - integrity sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw== - dependencies: - lodash "^4.17.20" - renderkid "^3.0.0" - private-ip@^2.1.0, private-ip@^2.1.1: version "2.3.3" resolved "https://registry.yarnpkg.com/private-ip/-/private-ip-2.3.3.tgz#1e80ff8443e5ac78f555631aec3ea6ff027fa6aa" @@ -7854,17 +5567,12 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= - progress@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== -prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@^15.6.0: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -7892,19 +5600,6 @@ protobufjs@^6.10.2, protobufjs@^6.11.2, protobufjs@^6.8.8: "@types/node" ">=13.7.0" long "^4.0.0" -proxy-addr@~2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" - integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== - dependencies: - forwarded "0.2.0" - ipaddr.js "1.9.1" - -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= - psl@^1.1.28, psl@^1.1.33: version "1.8.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" @@ -7915,18 +5610,6 @@ pstree.remy@^1.1.8: resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a" integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w== -public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" - integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - safe-buffer "^5.1.2" - pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -7935,11 +5618,6 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= - punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" @@ -7966,66 +5644,23 @@ qrcode.react@^1.0.1: prop-types "^15.6.0" qr.js "0.0.0" -qs@6.9.7: - version "6.9.7" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.7.tgz#4610846871485e1e048f44ae3b94033f0e675afe" - integrity sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw== - qs@~6.5.2: version "6.5.3" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= - -querystringify@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" - integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== - queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -quick-lru@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" - integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== - -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: +randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - -range-parser@^1.2.1, range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.3.tgz#8f80305d11c2a0a545c2d9d89d7a0286fcead43c" - integrity sha512-UlTNLIcu0uzb4D2f4WltY6cVjLi+/jEN4lgEUj3E04tpMDpUlkBo/eSn6zou9hum2VMNpCCUone0O0WeJim07g== - dependencies: - bytes "3.1.2" - http-errors "1.8.1" - iconv-lite "0.4.24" - unpipe "1.0.0" - rc@^1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" @@ -8045,14 +5680,7 @@ react-dom@^17.0.0, react-dom@^17.0.2: object-assign "^4.1.1" scheduler "^0.20.2" -react-error-boundary@^3.1.0: - version "3.1.4" - resolved "https://registry.yarnpkg.com/react-error-boundary/-/react-error-boundary-3.1.4.tgz#255db92b23197108757a888b01e5b729919abde0" - integrity sha512-uM9uPzZJTF6wRQORmSrvOIgt4lJ9MC1sNgEOj2XGsDTRE4kmpWxg7ENK9EWNKJRMAOY9z0MuF4yIfl6gp4sotA== - dependencies: - "@babel/runtime" "^7.12.5" - -react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0: +react-is@^16.13.1, react-is@^16.7.0: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== @@ -8074,35 +5702,6 @@ react-refresh@^0.9.0: resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.9.0.tgz#71863337adc3e5c2f8a6bfddd12ae3bfe32aafbf" integrity sha512-Gvzk7OZpiqKSkxsQvO/mbTN1poglhmAV7gR/DdIrRrSMXraRQQlfikRJOr3Nb9GTMPC5kof948Zy6jJZIFtDvQ== -react-router-dom@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.3.0.tgz#da1bfb535a0e89a712a93b97dd76f47ad1f32363" - integrity sha512-ObVBLjUZsphUUMVycibxgMdh5jJ1e3o+KpAZBVeHcNQZ4W+uUGGWsokurzlF4YOldQYRQL4y6yFRWM4m3svmuQ== - dependencies: - "@babel/runtime" "^7.12.13" - history "^4.9.0" - loose-envify "^1.3.1" - prop-types "^15.6.2" - react-router "5.2.1" - tiny-invariant "^1.0.2" - tiny-warning "^1.0.0" - -react-router@5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.2.1.tgz#4d2e4e9d5ae9425091845b8dbc6d9d276239774d" - integrity sha512-lIboRiOtDLFdg1VTemMwud9vRVuOCZmUIT/7lUoZiSpPODiiH1UQlfXy+vPLC/7IWdFYnhRwAyNqA/+I7wnvKQ== - dependencies: - "@babel/runtime" "^7.12.13" - history "^4.9.0" - hoist-non-react-statics "^3.1.0" - loose-envify "^1.3.1" - mini-create-react-context "^0.4.0" - path-to-regexp "^1.7.0" - prop-types "^15.6.2" - react-is "^16.6.0" - tiny-invariant "^1.0.2" - tiny-warning "^1.0.0" - react@^17.0.0, react@^17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" @@ -8120,7 +5719,7 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" -readable-stream@3, readable-stream@^3.0.6, readable-stream@^3.4.0, readable-stream@^3.5.0, readable-stream@^3.6.0: +readable-stream@3, readable-stream@^3.4.0, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -8129,19 +5728,6 @@ readable-stream@3, readable-stream@^3.0.6, readable-stream@^3.4.0, readable-stre string_decoder "^1.1.1" util-deprecate "^1.0.1" -readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@~2.3.6: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - readable-stream@~1.0.31: version "1.0.34" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" @@ -8152,14 +5738,18 @@ readable-stream@~1.0.31: isarray "0.0.1" string_decoder "~0.10.x" -readdirp@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" - integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== +readable-stream@~2.3.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== dependencies: - graceful-fs "^4.1.11" - micromatch "^3.1.10" - readable-stream "^2.0.2" + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" readdirp@~3.6.0: version "3.6.0" @@ -8175,34 +5765,11 @@ receptacle@^1.3.2: dependencies: ms "^2.1.1" -rechoir@^0.7.0: - version "0.7.1" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.1.tgz#9478a96a1ca135b5e88fc027f03ee92d6c645686" - integrity sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg== - dependencies: - resolve "^1.9.0" - regenerator-runtime@^0.13.4, regenerator-runtime@^0.13.7: version "0.13.9" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.3.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz#b3f4c0059af9e47eca9f3f660e51d81307e72307" - integrity sha512-pMR7hBVUUGI7PMA37m2ofIdQCsomVnas+Jn5UPGAHQ+/LlwKm/aTLJHdasmHRzlfeZwHiAOaRSo2rbBDm3nNUQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - regexpp@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" @@ -8222,37 +5789,6 @@ registry-url@^5.0.0: dependencies: rc "^1.2.8" -relateurl@^0.2.7: - version "0.2.7" - resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" - integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= - -renderkid@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-3.0.0.tgz#5fd823e4d6951d37358ecc9a58b1f06836b6268a" - integrity sha512-q/7VIQA8lmM1hF+jn+sFSPWGlMkSAeNYcPLmDQx2zzuiDfaLrOmumR8iaUKlenFgh0XRPIUeSPlH3A+AW3Z5pg== - dependencies: - css-select "^4.1.3" - dom-converter "^0.2.0" - htmlparser2 "^6.1.0" - lodash "^4.17.21" - strip-ansi "^6.0.1" - -repeat-element@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9" - integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ== - -repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= - request@^2.88.2: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" @@ -8294,56 +5830,12 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== -requireindex@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.2.0.tgz#3463cdb22ee151902635aa6c9535d4de9c2ef1ef" - integrity sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww== - -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= - -resolve-cwd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" - integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= - dependencies: - resolve-from "^3.0.0" - -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" - integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== - dependencies: - resolve-from "^5.0.0" - -resolve-from@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" - integrity sha1-six699nWiBvItuZTM17rywoYh0g= - resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve-pathname@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd" - integrity sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng== - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= - -resolve@^1.10.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.9.0: +resolve@^1.10.0, resolve@^1.20.0: version "1.22.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== @@ -8352,14 +5844,6 @@ resolve@^1.10.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.9.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resolve@^2.0.0-next.3: - version "2.0.0-next.3" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.3.tgz#d41016293d4a8586a39ca5d9b5f15cbea1f55e46" - integrity sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q== - dependencies: - is-core-module "^2.2.0" - path-parse "^1.0.6" - responselike@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" @@ -8367,11 +5851,6 @@ responselike@^1.0.2: dependencies: lowercase-keys "^1.0.0" -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== - retimer@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/retimer/-/retimer-2.0.0.tgz#e8bd68c5e5a8ec2f49ccb5c636db84c04063bbca" @@ -8382,11 +5861,6 @@ retimer@^3.0.0: resolved "https://registry.yarnpkg.com/retimer/-/retimer-3.0.0.tgz#98b751b1feaf1af13eb0228f8ea68b8f9da530df" integrity sha512-WKE0j11Pa0ZJI5YIk0nflGI7SQsfl2ljihVy7ogh7DeQSeYAUi0ubZ/yEueGtDfUPk6GH5LRw1hBdLq4IwUBWA== -retry@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" - integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= - retry@^0.13.1: version "0.13.1" resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658" @@ -8397,13 +5871,6 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@^2.6.3: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" @@ -8433,22 +5900,15 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= - dependencies: - ret "~0.1.10" +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== "safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" @@ -8482,33 +5942,6 @@ scheduler@^0.20.2: loose-envify "^1.1.0" object-assign "^4.1.1" -schema-utils@2.7.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.0.tgz#17151f76d8eae67fbbf77960c33c676ad9f4efc7" - integrity sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A== - dependencies: - "@types/json-schema" "^7.0.4" - ajv "^6.12.2" - ajv-keywords "^3.4.1" - -schema-utils@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" - integrity sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g== - dependencies: - ajv "^6.1.0" - ajv-errors "^1.0.0" - ajv-keywords "^3.1.0" - -schema-utils@^3.0.0, schema-utils@^3.1.0, schema-utils@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281" - integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== - dependencies: - "@types/json-schema" "^7.0.8" - ajv "^6.12.5" - ajv-keywords "^3.5.2" - secp256k1@^4.0.0, secp256k1@^4.0.2, secp256k1@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.3.tgz#c4559ecd1b8d3c1827ed2d1b94190d69ce267303" @@ -8518,18 +5951,6 @@ secp256k1@^4.0.0, secp256k1@^4.0.2, secp256k1@^4.0.3: node-addon-api "^2.0.0" node-gyp-build "^4.2.0" -select-hose@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" - integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo= - -selfsigned@^1.10.8: - version "1.10.14" - resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.14.tgz#ee51d84d9dcecc61e07e4aba34f229ab525c1574" - integrity sha512-lkjaiAye+wBZDCBsu5BGi0XiLRxeUlsGod5ZP924CRSEoGuZAw/f7y9RKu28rwTfiHVhdavhB0qH0INV6P1lEA== - dependencies: - node-forge "^0.10.0" - semver-diff@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-3.1.1.tgz#05f77ce59f325e00e2706afd67bb506ddb1ca32b" @@ -8547,62 +5968,20 @@ semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: +semver@^7.2.1, semver@^7.3.4, semver@^7.3.5: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== dependencies: lru-cache "^6.0.0" -send@0.17.2: - version "0.17.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.17.2.tgz#926622f76601c41808012c8bf1688fe3906f7820" - integrity sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww== - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "1.8.1" - mime "1.6.0" - ms "2.1.3" - on-finished "~2.3.0" - range-parser "~1.2.1" - statuses "~1.5.0" - -serialize-javascript@6.0.0, serialize-javascript@^6.0.0: +serialize-javascript@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== dependencies: randombytes "^2.1.0" -serve-index@^1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" - integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= - dependencies: - accepts "~1.3.4" - batch "0.6.1" - debug "2.6.9" - escape-html "~1.0.3" - http-errors "~1.6.2" - mime-types "~2.1.17" - parseurl "~1.3.2" - -serve-static@1.14.2: - version "1.14.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.2.tgz#722d6294b1d62626d41b43a013ece4598d292bfa" - integrity sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.17.2" - set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -8613,26 +5992,6 @@ set-delayed-interval@^1.0.0: resolved "https://registry.yarnpkg.com/set-delayed-interval/-/set-delayed-interval-1.0.0.tgz#1f7c065780a365f10250f8a80e2be10175ea0388" integrity sha512-29fhAwuZlLcuBnW/EwxvLcg2D3ELX+VBDNhnavs3YYkab72qmrcSeQNVdzl8EcPPahGQXhBM6MKdPLCQGMDakw== -set-value@^2.0.0, set-value@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" - integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== - -setprototypeof@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" - integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== - sha.js@^2.4.0, sha.js@^2.4.8: version "2.4.11" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" @@ -8641,13 +6000,6 @@ sha.js@^2.4.0, sha.js@^2.4.8: inherits "^2.0.1" safe-buffer "^5.0.1" -shallow-clone@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" - integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== - dependencies: - kind-of "^6.0.2" - shallowequal@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" @@ -8710,87 +6062,11 @@ slice-ansi@^4.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^3.1.0" - -sockjs-client@^1.5.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.5.2.tgz#4bc48c2da9ce4769f19dc723396b50f5c12330a3" - integrity sha512-ZzRxPBISQE7RpzlH4tKJMQbHM9pabHluk0WBaxAQ+wm/UieeBVBou0p4wVnSQGN9QmpAZygQ0cDIypWuqOFmFQ== - dependencies: - debug "^3.2.6" - eventsource "^1.0.7" - faye-websocket "^0.11.3" - inherits "^2.0.4" - json3 "^3.3.3" - url-parse "^1.5.3" - -sockjs@^0.3.21: - version "0.3.24" - resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.24.tgz#c9bc8995f33a111bea0395ec30aa3206bdb5ccce" - integrity sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ== - dependencies: - faye-websocket "^0.11.3" - uuid "^8.3.2" - websocket-driver "^0.7.4" - -source-list-map@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" - integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== - -source-map-js@^1.0.1, source-map-js@^1.0.2: +source-map-js@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== -source-map-loader@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-3.0.1.tgz#9ae5edc7c2d42570934be4c95d1ccc6352eba52d" - integrity sha512-Vp1UsfyPvgujKQzi4pyDiTOnE3E4H+yHvkVRN3c/9PJmQS4CQJExvcDvaX/D+RV+xQben9HJ56jMJS3CgUeWyA== - dependencies: - abab "^2.0.5" - iconv-lite "^0.6.3" - source-map-js "^1.0.1" - -source-map-resolve@^0.5.0: - version "0.5.3" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" - integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== - dependencies: - atob "^2.1.2" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" @@ -8799,17 +6075,12 @@ source-map-support@~0.5.20: buffer-from "^1.0.0" source-map "^0.6.0" -source-map-url@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" - integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== - -source-map@^0.5.0, source-map@^0.5.6: +source-map@^0.5.0: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== @@ -8845,36 +6116,6 @@ spdx-license-ids@^3.0.0: resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz#50c0d8c40a14ec1bf449bae69a0ea4685a9d9f95" integrity sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g== -spdy-transport@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-3.0.0.tgz#00d4863a6400ad75df93361a1608605e5dcdcf31" - integrity sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw== - dependencies: - debug "^4.1.0" - detect-node "^2.0.4" - hpack.js "^2.1.6" - obuf "^1.1.2" - readable-stream "^3.0.6" - wbuf "^1.7.3" - -spdy@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/spdy/-/spdy-4.0.2.tgz#b74f466203a3eda452c02492b91fb9e84a27677b" - integrity sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA== - dependencies: - debug "^4.1.0" - handle-thing "^2.0.0" - http-deceiver "^1.2.7" - select-hose "^2.0.0" - spdy-transport "^3.0.0" - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - dependencies: - extend-shallow "^3.0.0" - split@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" @@ -8912,37 +6153,6 @@ stable@^0.1.8: resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -"statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2", statuses@~1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - -stream-browserify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f" - integrity sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA== - dependencies: - inherits "~2.0.4" - readable-stream "^3.5.0" - -stream-http@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-3.2.0.tgz#1872dfcf24cb15752677e40e5c3f9cc1926028b5" - integrity sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A== - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.4" - readable-stream "^3.6.0" - xtend "^4.0.2" - stream-to-it@^0.2.2: version "0.2.4" resolved "https://registry.yarnpkg.com/stream-to-it/-/stream-to-it-0.2.4.tgz#d2fd7bfbd4a899b4c0d6a7e6a533723af5749bd0" @@ -8973,20 +6183,6 @@ string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2 is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -string.prototype.matchall@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.6.tgz#5abb5dabc94c7b0ea2380f65ba610b3a544b15fa" - integrity sha512-6WgDX8HmQqvEd7J+G6VtAahhsQIssiZ8zl7zKh1VDMFyL3hRTJP4FTNA3RbIp2TOQ9AYNDcc7e3fH0Qbup+DBg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - get-intrinsic "^1.1.1" - has-symbols "^1.0.2" - internal-slot "^1.0.3" - regexp.prototype.flags "^1.3.1" - side-channel "^1.0.4" - string.prototype.padend@^3.0.0: version "3.1.3" resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.3.tgz#997a6de12c92c7cb34dc8a201a6c53d9bd88a5f1" @@ -9031,13 +6227,6 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" @@ -9077,11 +6266,6 @@ strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= -style-loader@^3.3.0: - version "3.3.1" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-3.3.1.tgz#057dfa6b3d4d7c7064462830f9113ed417d38575" - integrity sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ== - styled-components@^5.3.1: version "5.3.3" resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-5.3.3.tgz#312a3d9a549f4708f0fb0edc829eb34bde032743" @@ -9106,7 +6290,7 @@ stylehacks@^5.0.3: browserslist "^4.16.6" postcss-selector-parser "^6.0.4" -supports-color@8.1.1, supports-color@^8.0.0: +supports-color@8.1.1: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== @@ -9120,13 +6304,6 @@ supports-color@^5.3.0, supports-color@^5.5.0: dependencies: has-flag "^3.0.0" -supports-color@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" - integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== - dependencies: - has-flag "^3.0.0" - supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" @@ -9168,55 +6345,7 @@ table@^6.0.9: string-width "^4.2.3" strip-ansi "^6.0.1" -tailwindcss@^3.0.0: - version "3.0.23" - resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.0.23.tgz#c620521d53a289650872a66adfcb4129d2200d10" - integrity sha512-+OZOV9ubyQ6oI2BXEhzw4HrqvgcARY38xv3zKcjnWtMIZstEsXdI9xftd1iB7+RbOnj2HOEzkA0OyB5BaSxPQA== - dependencies: - arg "^5.0.1" - chalk "^4.1.2" - chokidar "^3.5.3" - color-name "^1.1.4" - cosmiconfig "^7.0.1" - detective "^5.2.0" - didyoumean "^1.2.2" - dlv "^1.1.3" - fast-glob "^3.2.11" - glob-parent "^6.0.2" - is-glob "^4.0.3" - normalize-path "^3.0.0" - object-hash "^2.2.0" - postcss "^8.4.6" - postcss-js "^4.0.0" - postcss-load-config "^3.1.0" - postcss-nested "5.0.6" - postcss-selector-parser "^6.0.9" - postcss-value-parser "^4.2.0" - quick-lru "^5.1.1" - resolve "^1.22.0" - -tapable@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" - integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== - -tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" - integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== - -terser-webpack-plugin@^5.1.3: - version "5.3.1" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.1.tgz#0320dcc270ad5372c1e8993fabbd927929773e54" - integrity sha512-GvlZdT6wPQKbDNW/GDQzZFg/j4vKU96yl2q6mcUkzKOgW4gwf1Z8cZToUCrz31XHlPWH8MVb1r2tFtdDtTGJ7g== - dependencies: - jest-worker "^27.4.5" - schema-utils "^3.1.1" - serialize-javascript "^6.0.0" - source-map "^0.6.1" - terser "^5.7.2" - -terser@^5.10.0, terser@^5.2.0, terser@^5.7.2: +terser@^5.2.0: version "5.11.0" resolved "https://registry.yarnpkg.com/terser/-/terser-5.11.0.tgz#2da5506c02e12cd8799947f30ce9c5b760be000f" integrity sha512-uCA9DLanzzWSsN1UirKwylhhRz3aKPInlfmpGfw8VN6jHsAtu8HJtIpeeHHK23rxnE/cDc+yvmq5wqkIC6Kn0A== @@ -9256,11 +6385,6 @@ through@2: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= -thunky@^1.0.2: - version "1.1.0" - resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" - integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== - time-cache@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/time-cache/-/time-cache-0.3.0.tgz#ed0dfcf0fda45cdc95fbd601fda830ebf1bd5d8b" @@ -9281,41 +6405,16 @@ timsort@^0.3.0: resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= -tiny-invariant@^1.0.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.2.0.tgz#a1141f86b672a9148c72e978a19a73b9b94a15a9" - integrity sha512-1Uhn/aqw5C6RI4KejVeTg6mIS7IqxnLJ8Mv2tV5rTc0qWobay7pDUz6Wi392Cnc8ak1H0F2cjoRzb2/AW4+Fvg== - -tiny-warning@^1.0.0, tiny-warning@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" - integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== - to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= - dependencies: - kind-of "^3.0.2" - to-readable-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -9323,21 +6422,6 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -toidentifier@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" - integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== - touch@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b" @@ -9369,11 +6453,6 @@ tr46@^2.1.0: dependencies: punycode "^2.1.1" -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= - truncate-utf8-bytes@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz#405923909592d56f78a5818434b0b78489ca5f2b" @@ -9381,16 +6460,6 @@ truncate-utf8-bytes@^1.0.0: dependencies: utf8-byte-length "^1.0.1" -ts-loader@^9.2.5: - version "9.2.6" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.2.6.tgz#9937c4dd0a1e3dbbb5e433f8102a6601c6615d74" - integrity sha512-QMTC4UFzHmu9wU2VHZEmWWE9cUajjfcdcws+Gh7FhiO+Dy0RnR1bNz0YCHqhI0yRowCE9arVnNxYHqELOy9Hjw== - dependencies: - chalk "^4.1.0" - enhanced-resolve "^5.0.0" - micromatch "^4.0.0" - semver "^7.3.4" - ts-node@^10.1.0, ts-node@^10.2.1: version "10.5.0" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.5.0.tgz#618bef5854c1fbbedf5e31465cbb224a1d524ef9" @@ -9453,11 +6522,6 @@ tslib@^1.8.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.3: - version "2.3.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" - integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== - tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -9501,14 +6565,6 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" @@ -9543,16 +6599,6 @@ undefsafe@^2.0.5: resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c" integrity sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA== -union-value@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" - integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^2.0.1" - unique-string@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d" @@ -9565,39 +6611,16 @@ universalify@^0.1.2: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== -universalify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" - integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== - unordered-array-remove@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unordered-array-remove/-/unordered-array-remove-1.0.2.tgz#c546e8f88e317a0cf2644c97ecb57dba66d250ef" integrity sha1-xUbo+I4xegzyZEyX7LV9umbSUO8= -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - untildify@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== -upath@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" - integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== - update-notifier@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-5.1.0.tgz#4ab0d7c7f36a231dd7316cf7729313f0214d9ad9" @@ -9625,11 +6648,6 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - url-parse-lax@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" @@ -9637,22 +6655,6 @@ url-parse-lax@^3.0.0: dependencies: prepend-http "^2.0.0" -url-parse@^1.4.3, url-parse@^1.5.3: - version "1.5.10" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" - integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== - dependencies: - querystringify "^2.1.1" - requires-port "^1.0.0" - -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= - dependencies: - punycode "1.3.2" - querystring "0.2.0" - ursa-optional@^0.10.1: version "0.10.2" resolved "https://registry.yarnpkg.com/ursa-optional/-/ursa-optional-0.10.2.tgz#bd74e7d60289c22ac2a69a3c8dea5eb2817f9681" @@ -9661,11 +6663,6 @@ ursa-optional@^0.10.1: bindings "^1.5.0" nan "^2.14.2" -use@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - utf8-byte-length@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz#f45f150c4c66eee968186505ab93fcbb8ad6bf61" @@ -9676,33 +6673,11 @@ util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= -util@^0.12.0: - version "0.12.4" - resolved "https://registry.yarnpkg.com/util/-/util-0.12.4.tgz#66121a31420df8f01ca0c464be15dfa1d1850253" - integrity sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw== - dependencies: - inherits "^2.0.3" - is-arguments "^1.0.4" - is-generator-function "^1.0.7" - is-typed-array "^1.1.3" - safe-buffer "^5.1.2" - which-typed-array "^1.1.2" - -utila@~0.4: - version "0.4.0" - resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" - integrity sha1-ihagXURWV6Oupe7MWxKk+lN5dyw= - utility-types@^3.10.0: version "3.10.0" resolved "https://registry.yarnpkg.com/utility-types/-/utility-types-3.10.0.tgz#ea4148f9a741015f05ed74fd615e1d20e6bed82b" integrity sha512-O11mqxmi7wMKCo6HKFt5AhO4BwY3VV68YU07tgxfz8zJTIxr4BpsezN49Ffwy9j3ZpwwJp4fkRwjRzq3uWE6Rg== -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= - uuid@^3.3.2: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" @@ -9731,11 +6706,6 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" -value-equal@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-1.0.1.tgz#1e0b794c734c5c0cade179c437d356d931a34d6c" - integrity sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw== - varint@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz#5b47f8a947eb668b848e034dcfa87d0ff8a7f7a4" @@ -9746,11 +6716,6 @@ varint@^6.0.0: resolved "https://registry.yarnpkg.com/varint/-/varint-6.0.0.tgz#9881eb0ce8feaea6512439d19ddf84bf551661d0" integrity sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg== -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= - verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" @@ -9774,31 +6739,11 @@ w3c-xmlserializer@^2.0.0: dependencies: xml-name-validator "^3.0.0" -watchpack@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.3.1.tgz#4200d9447b401156eeca7767ee610f8809bc9d25" - integrity sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA== - dependencies: - glob-to-regexp "^0.4.1" - graceful-fs "^4.1.2" - -wbuf@^1.1.0, wbuf@^1.7.3: - version "1.7.3" - resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" - integrity sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA== - dependencies: - minimalistic-assert "^1.0.0" - weak-lru-cache@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/weak-lru-cache/-/weak-lru-cache-1.2.2.tgz#fdbb6741f36bae9540d12f480ce8254060dccd19" integrity sha512-DEAoo25RfSYMuTGc9vPJzZcZullwIqRDSI9LOy+fkCJPi6hykCnfKaXTuPBDuXAUcqHXyOgFtHNp/kB2FjYHbw== -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= - webidl-conversions@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" @@ -9809,147 +6754,6 @@ webidl-conversions@^6.1.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== -webpack-cli@^4.7.2: - version "4.9.2" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.9.2.tgz#77c1adaea020c3f9e2db8aad8ea78d235c83659d" - integrity sha512-m3/AACnBBzK/kMTcxWHcZFPrw/eQuY4Df1TxvIWfWM2x7mRqBQCqKEd96oCUa9jkapLBaFfRce33eGDb4Pr7YQ== - dependencies: - "@discoveryjs/json-ext" "^0.5.0" - "@webpack-cli/configtest" "^1.1.1" - "@webpack-cli/info" "^1.4.1" - "@webpack-cli/serve" "^1.6.1" - colorette "^2.0.14" - commander "^7.0.0" - execa "^5.0.0" - fastest-levenshtein "^1.0.12" - import-local "^3.0.2" - interpret "^2.2.0" - rechoir "^0.7.0" - webpack-merge "^5.7.3" - -webpack-dev-middleware@^3.7.2: - version "3.7.3" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.3.tgz#0639372b143262e2b84ab95d3b91a7597061c2c5" - integrity sha512-djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ== - dependencies: - memory-fs "^0.4.1" - mime "^2.4.4" - mkdirp "^0.5.1" - range-parser "^1.2.1" - webpack-log "^2.0.0" - -webpack-dev-server@^3.11.2: - version "3.11.3" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.11.3.tgz#8c86b9d2812bf135d3c9bce6f07b718e30f7c3d3" - integrity sha512-3x31rjbEQWKMNzacUZRE6wXvUFuGpH7vr0lIEbYpMAG9BOxi0928QU1BBswOAP3kg3H1O4hiS+sq4YyAn6ANnA== - dependencies: - ansi-html-community "0.0.8" - bonjour "^3.5.0" - chokidar "^2.1.8" - compression "^1.7.4" - connect-history-api-fallback "^1.6.0" - debug "^4.1.1" - del "^4.1.1" - express "^4.17.1" - html-entities "^1.3.1" - http-proxy-middleware "0.19.1" - import-local "^2.0.0" - internal-ip "^4.3.0" - ip "^1.1.5" - is-absolute-url "^3.0.3" - killable "^1.0.1" - loglevel "^1.6.8" - opn "^5.5.0" - p-retry "^3.0.1" - portfinder "^1.0.26" - schema-utils "^1.0.0" - selfsigned "^1.10.8" - semver "^6.3.0" - serve-index "^1.9.1" - sockjs "^0.3.21" - sockjs-client "^1.5.0" - spdy "^4.0.2" - strip-ansi "^3.0.1" - supports-color "^6.1.0" - url "^0.11.0" - webpack-dev-middleware "^3.7.2" - webpack-log "^2.0.0" - ws "^6.2.1" - yargs "^13.3.2" - -webpack-log@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/webpack-log/-/webpack-log-2.0.0.tgz#5b7928e0637593f119d32f6227c1e0ac31e1b47f" - integrity sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg== - dependencies: - ansi-colors "^3.0.0" - uuid "^3.3.2" - -webpack-merge@^5.7.3: - version "5.8.0" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.8.0.tgz#2b39dbf22af87776ad744c390223731d30a68f61" - integrity sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q== - dependencies: - clone-deep "^4.0.1" - wildcard "^2.0.0" - -webpack-sources@^2.2.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-2.3.1.tgz#570de0af163949fe272233c2cefe1b56f74511fd" - integrity sha512-y9EI9AO42JjEcrTJFOYmVywVZdKVUfOvDUPsJea5GIr1JOEGFVqwlY2K098fFoIjOkDzHn2AjRvM8dsBZu+gCA== - dependencies: - source-list-map "^2.0.1" - source-map "^0.6.1" - -webpack-sources@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" - integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== - -webpack@^5.48.0: - version "5.69.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.69.1.tgz#8cfd92c192c6a52c99ab00529b5a0d33aa848dc5" - integrity sha512-+VyvOSJXZMT2V5vLzOnDuMz5GxEqLk7hKWQ56YxPW/PQRUuKimPqmEIJOx8jHYeyo65pKbapbW464mvsKbaj4A== - dependencies: - "@types/eslint-scope" "^3.7.3" - "@types/estree" "^0.0.51" - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/wasm-edit" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" - acorn "^8.4.1" - acorn-import-assertions "^1.7.6" - browserslist "^4.14.5" - chrome-trace-event "^1.0.2" - enhanced-resolve "^5.8.3" - es-module-lexer "^0.9.0" - eslint-scope "5.1.1" - events "^3.2.0" - glob-to-regexp "^0.4.1" - graceful-fs "^4.2.9" - json-parse-better-errors "^1.0.2" - loader-runner "^4.2.0" - mime-types "^2.1.27" - neo-async "^2.6.2" - schema-utils "^3.1.0" - tapable "^2.1.1" - terser-webpack-plugin "^5.1.3" - watchpack "^2.3.1" - webpack-sources "^3.2.3" - -websocket-driver@>=0.5.1, websocket-driver@^0.7.4: - version "0.7.4" - resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" - integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== - dependencies: - http-parser-js ">=0.5.1" - safe-buffer ">=5.1.0" - websocket-extensions ">=0.1.1" - -websocket-extensions@>=0.1.1: - version "0.1.4" - resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" - integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== - whatwg-encoding@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" @@ -9962,14 +6766,6 @@ whatwg-mimetype@^2.3.0: resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== -whatwg-url@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - whatwg-url@^8.0.0, whatwg-url@^8.5.0: version "8.7.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77" @@ -10002,18 +6798,6 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which-typed-array@^1.1.2: - version "1.1.7" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.7.tgz#2761799b9a22d4b8660b3c1b40abaa7739691793" - integrity sha512-vjxaB4nfDqwKI0ws7wZpxIlde1XrLX5uB0ZjpfshgmapJMD7jJWhZI+yToJTqaFByF0eNBcYxbjmCzoRP7CfEw== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - es-abstract "^1.18.5" - foreach "^2.0.5" - has-tostringtag "^1.0.0" - is-typed-array "^1.1.7" - which@2.0.2, which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" @@ -10035,11 +6819,6 @@ widest-line@^3.1.0: dependencies: string-width "^4.0.0" -wildcard@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" - integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== - word-wrap@^1.2.3, word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" @@ -10083,13 +6862,6 @@ write-file-atomic@^3.0.0: signal-exit "^3.0.2" typedarray-to-buffer "^3.1.5" -ws@^6.2.1: - version "6.2.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.2.tgz#dd5cdbd57a9979916097652d78f1cc5faea0c32e" - integrity sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw== - dependencies: - async-limiter "~1.0.0" - ws@^7.3.1, ws@^7.4.6: version "7.5.7" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.7.tgz#9e0ac77ee50af70d58326ecff7e85eb3fa375e67" @@ -10143,7 +6915,7 @@ xsalsa20@^1.1.0: resolved "https://registry.yarnpkg.com/xsalsa20/-/xsalsa20-1.2.0.tgz#e5a05cb26f8cef723f94a559102ed50c1b44c25c" integrity sha512-FIr/DEeoHfj7ftfylnoFt3rAIRoWXpx2AoDfrT2qD2wtp7Dp+COajvs/Icb7uHqRW9m60f5iXZwdsJJO3kvb7w== -xtend@^4.0.2, xtend@~4.0.1: +xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== @@ -10168,7 +6940,7 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@^1.10.0, yaml@^1.10.2, yaml@^1.7.2: +yaml@^1.10.0, yaml@^1.10.2: version "1.10.2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== @@ -10214,7 +6986,7 @@ yargs@16.2.0, yargs@^16.1.0: y18n "^5.0.5" yargs-parser "^20.2.2" -yargs@^13.0.0, yargs@^13.3.2: +yargs@^13.0.0: version "13.3.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==