From e794745e21374a448b4e9210b355bfc6c056cc1d Mon Sep 17 00:00:00 2001 From: Bill Date: Sun, 25 Jul 2021 01:33:30 -0400 Subject: [PATCH 01/66] Busted catalog page selector --- src/views/catalog/CatalogView.tsx | 12 ++++------- .../navigation/CatalogNavigationView.tsx | 16 +++----------- .../navigation/CatalogNavigationView.types.ts | 3 +++ .../item/CatalogNavigationItemView.tsx | 18 ++++++++++++---- .../item/CatalogNavigationItemView.types.ts | 2 ++ .../set/CatalogNavigationSetView.tsx | 21 ++++--------------- .../set/CatalogNavigationSetView.types.ts | 3 +++ 7 files changed, 33 insertions(+), 42 deletions(-) diff --git a/src/views/catalog/CatalogView.tsx b/src/views/catalog/CatalogView.tsx index 0162cffd..db3735f0 100644 --- a/src/views/catalog/CatalogView.tsx +++ b/src/views/catalog/CatalogView.tsx @@ -76,12 +76,7 @@ export const CatalogView: FC = props => case 'open': if(parts.length > 2) { - dispatchCatalogState({ - type: CatalogActions.SET_PENDING_PAGE_ID, - payload: { - pendingPageId: parseInt(parts[2]) - } - }); + setPendingPageId(parseInt(parts[2])); } else { @@ -89,7 +84,7 @@ export const CatalogView: FC = props => } return; } - }, [ dispatchCatalogState ]); + }, []); useEffect(() => { @@ -128,6 +123,7 @@ export const CatalogView: FC = props => setCurrentTab(tree.shift()); setPendingTree(tree); + setPendingPageId(-1); } } }, [ isVisible, pendingPageId, catalogState.root, buildCatalogPageTree, setCurrentTab ]); @@ -176,7 +172,7 @@ export const CatalogView: FC = props =>
{ (!pageParser || (pageParser && !pageParser.frontPageItems.length)) &&
- +
}
diff --git a/src/views/catalog/views/navigation/CatalogNavigationView.tsx b/src/views/catalog/views/navigation/CatalogNavigationView.tsx index a9fb07c9..a240a71f 100644 --- a/src/views/catalog/views/navigation/CatalogNavigationView.tsx +++ b/src/views/catalog/views/navigation/CatalogNavigationView.tsx @@ -1,28 +1,18 @@ -import { ICatalogPageData } from 'nitro-renderer'; -import { FC, useEffect } from 'react'; +import { FC } from 'react'; import { CatalogSearchView } from '../search/CatalogSearchView'; import { CatalogNavigationViewProps } from './CatalogNavigationView.types'; import { CatalogNavigationSetView } from './set/CatalogNavigationSetView'; -export let ACTIVE_PAGES: ICatalogPageData[] = []; - export const CatalogNavigationView: FC = props => { - const { page = null } = props; - - useEffect(() => - { - if(!page) return; - - ACTIVE_PAGES = [ page ]; - }, [ page ]); + const { page = null, pendingTree = null, setPendingTree = null } = props; return ( <>
- +
diff --git a/src/views/catalog/views/navigation/CatalogNavigationView.types.ts b/src/views/catalog/views/navigation/CatalogNavigationView.types.ts index 7a010993..6be8a843 100644 --- a/src/views/catalog/views/navigation/CatalogNavigationView.types.ts +++ b/src/views/catalog/views/navigation/CatalogNavigationView.types.ts @@ -1,6 +1,9 @@ import { ICatalogPageData } from 'nitro-renderer'; +import { Dispatch, SetStateAction } from 'react'; export interface CatalogNavigationViewProps { page: ICatalogPageData; + pendingTree: ICatalogPageData[]; + setPendingTree: Dispatch>; } diff --git a/src/views/catalog/views/navigation/item/CatalogNavigationItemView.tsx b/src/views/catalog/views/navigation/item/CatalogNavigationItemView.tsx index 85878246..941c1c00 100644 --- a/src/views/catalog/views/navigation/item/CatalogNavigationItemView.tsx +++ b/src/views/catalog/views/navigation/item/CatalogNavigationItemView.tsx @@ -9,9 +9,8 @@ import { CatalogNavigationItemViewProps } from './CatalogNavigationItemView.type export const CatalogNavigationItemView: FC = props => { - const { page = null, isActive = false, setActiveChild = null } = props; + const { page = null, isActive = false, pendingTree = null, setPendingTree = null, setActiveChild = null } = props; const [ isExpanded, setIsExpanded ] = useState(false); - const [ myTree, setMyTree ] = useState(null); const { dispatchCatalogState = null } = useCatalogContext(); const select = useCallback((selectPage: ICatalogPageData) => @@ -46,7 +45,18 @@ export const CatalogNavigationItemView: FC = pro SendMessageHook(new CatalogPageComposer(page.pageId, -1, CatalogMode.MODE_NORMAL)); }, [ isActive, page, select, dispatchCatalogState ]); - if(!page.visible) return null; + useEffect(() => + { + if(!page || !pendingTree || !pendingTree.length) return; + + const index = pendingTree.indexOf(page); + + if(index === -1) return; + + //if(!pendingTree.length) setPendingTree(null); + + select(page); + }, [ pendingTree, page, select, setPendingTree ]); return (
@@ -57,7 +67,7 @@ export const CatalogNavigationItemView: FC = pro
{ isActive && isExpanded && page.children && (page.children.length > 0) &&
- +
}
); diff --git a/src/views/catalog/views/navigation/item/CatalogNavigationItemView.types.ts b/src/views/catalog/views/navigation/item/CatalogNavigationItemView.types.ts index e1ec52cc..b28e5e20 100644 --- a/src/views/catalog/views/navigation/item/CatalogNavigationItemView.types.ts +++ b/src/views/catalog/views/navigation/item/CatalogNavigationItemView.types.ts @@ -5,5 +5,7 @@ export interface CatalogNavigationItemViewProps { page: ICatalogPageData; isActive: boolean; + pendingTree: ICatalogPageData[]; + setPendingTree: Dispatch>; setActiveChild: Dispatch>; } diff --git a/src/views/catalog/views/navigation/set/CatalogNavigationSetView.tsx b/src/views/catalog/views/navigation/set/CatalogNavigationSetView.tsx index 32a8ec30..a9e897ec 100644 --- a/src/views/catalog/views/navigation/set/CatalogNavigationSetView.tsx +++ b/src/views/catalog/views/navigation/set/CatalogNavigationSetView.tsx @@ -1,17 +1,16 @@ import { ICatalogPageData } from 'nitro-renderer'; import { FC, useEffect, useState } from 'react'; -import { ACTIVE_PAGES } from '../CatalogNavigationView'; import { CatalogNavigationItemView } from '../item/CatalogNavigationItemView'; import { CatalogNavigationSetViewProps } from './CatalogNavigationSetView.types'; export const CatalogNavigationSetView: FC = props => { - const { page = null, isFirstSet = false } = props; + const { page = null, isFirstSet = false, pendingTree = null, setPendingTree = null } = props; const [ activeChild, setActiveChild ] = useState(null); useEffect(() => { - if(!isFirstSet || !page || (page.pageId === -1)) return; + if(!isFirstSet || !page || (page.pageId === -1) || pendingTree) return; if(page && page.children.length) { @@ -19,19 +18,7 @@ export const CatalogNavigationSetView: FC = props setActiveChild(child); } - }, [ page, isFirstSet ]); - - useEffect(() => - { - if(!activeChild) return; - - const index = (ACTIVE_PAGES.push(activeChild) - 1); - - return () => - { - ACTIVE_PAGES.splice(index, (ACTIVE_PAGES.length - index)); - } - }, [ activeChild ]); + }, [ page, isFirstSet, pendingTree ]); return (
@@ -39,7 +26,7 @@ export const CatalogNavigationSetView: FC = props { if(!page.visible) return null; - return + return }) }
); diff --git a/src/views/catalog/views/navigation/set/CatalogNavigationSetView.types.ts b/src/views/catalog/views/navigation/set/CatalogNavigationSetView.types.ts index 4adcad62..3cf29501 100644 --- a/src/views/catalog/views/navigation/set/CatalogNavigationSetView.types.ts +++ b/src/views/catalog/views/navigation/set/CatalogNavigationSetView.types.ts @@ -1,7 +1,10 @@ import { ICatalogPageData } from 'nitro-renderer'; +import { Dispatch, SetStateAction } from 'react'; export interface CatalogNavigationSetViewProps { page: ICatalogPageData; isFirstSet?: boolean; + pendingTree: ICatalogPageData[]; + setPendingTree: Dispatch>; } From f9ed9dacac5a604f26cee6b81647486f3bdd1421 Mon Sep 17 00:00:00 2001 From: Bill Date: Sun, 25 Jul 2021 04:43:57 -0400 Subject: [PATCH 02/66] Card updates --- src/layout/card/content/NitroCardContentView.scss | 1 - src/layout/card/content/NitroCardContentView.tsx | 4 ++-- src/layout/card/content/NitroCardContextView.types.ts | 9 +++++---- src/views/catalog/CatalogView.scss | 1 + src/views/inventory/InventoryView.scss | 1 + src/views/navigator/NavigatorView.scss | 1 + 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/layout/card/content/NitroCardContentView.scss b/src/layout/card/content/NitroCardContentView.scss index 4f94a06a..c681fd34 100644 --- a/src/layout/card/content/NitroCardContentView.scss +++ b/src/layout/card/content/NitroCardContentView.scss @@ -1,7 +1,6 @@ .content-area { padding-top: $container-padding-x; padding-bottom: $container-padding-x; - resize: vertical; overflow: auto; &.simple { diff --git a/src/layout/card/content/NitroCardContentView.tsx b/src/layout/card/content/NitroCardContentView.tsx index a09e305f..969069b2 100644 --- a/src/layout/card/content/NitroCardContentView.tsx +++ b/src/layout/card/content/NitroCardContentView.tsx @@ -4,11 +4,11 @@ import { NitroCardContentViewProps } from './NitroCardContextView.types'; export const NitroCardContentView: FC = props => { - const { className = null, children = null } = props; + const { children = null, className = '', ...rest } = props; const { simple = false } = useNitroCardContext(); return ( -
+
{ children }
); diff --git a/src/layout/card/content/NitroCardContextView.types.ts b/src/layout/card/content/NitroCardContextView.types.ts index 78ff6979..120cd9d3 100644 --- a/src/layout/card/content/NitroCardContextView.types.ts +++ b/src/layout/card/content/NitroCardContextView.types.ts @@ -1,4 +1,5 @@ -export interface NitroCardContentViewProps -{ - className?: string; -} +import { DetailsHTMLAttributes } from 'react'; + + +export interface NitroCardContentViewProps extends DetailsHTMLAttributes +{} diff --git a/src/views/catalog/CatalogView.scss b/src/views/catalog/CatalogView.scss index 5f5618dd..4061767a 100644 --- a/src/views/catalog/CatalogView.scss +++ b/src/views/catalog/CatalogView.scss @@ -4,6 +4,7 @@ .content-area { min-height: 350px; height: 350px; + resize: vertical; } font[size="16"] { diff --git a/src/views/inventory/InventoryView.scss b/src/views/inventory/InventoryView.scss index db085c7a..2da93ac4 100644 --- a/src/views/inventory/InventoryView.scss +++ b/src/views/inventory/InventoryView.scss @@ -4,6 +4,7 @@ .content-area { min-height: 240px; height: 240px; + resize: vertical; } .empty-image { diff --git a/src/views/navigator/NavigatorView.scss b/src/views/navigator/NavigatorView.scss index 79f14558..e17312aa 100644 --- a/src/views/navigator/NavigatorView.scss +++ b/src/views/navigator/NavigatorView.scss @@ -4,6 +4,7 @@ .content-area { min-height: 400px; height: 400px; + resize: vertical; } } From 0dfcb86bb4d56cda3f3f45be836f03d5f5245a6a Mon Sep 17 00:00:00 2001 From: Bill Date: Sun, 25 Jul 2021 04:44:11 -0400 Subject: [PATCH 03/66] Trophy update --- src/views/room/widgets/furniture/trophy/FurnitureTrophyView.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/room/widgets/furniture/trophy/FurnitureTrophyView.scss b/src/views/room/widgets/furniture/trophy/FurnitureTrophyView.scss index b8095c3f..878a0565 100644 --- a/src/views/room/widgets/furniture/trophy/FurnitureTrophyView.scss +++ b/src/views/room/widgets/furniture/trophy/FurnitureTrophyView.scss @@ -37,6 +37,7 @@ height: 110px; margin-top: 3px; margin-left: 23px; + white-space: pre-wrap; } .trophy-footer { From d13c819be729b67d5ed7ffba93d689827be2dfd7 Mon Sep 17 00:00:00 2001 From: Bill Date: Sun, 25 Jul 2021 04:44:40 -0400 Subject: [PATCH 04/66] Badge display updates --- .../badge-display/CatalogLayoutBadgeDisplayView.tsx | 8 +++++--- .../catalog/views/page/purchase/CatalogPurchaseView.tsx | 4 ++-- .../views/page/purchase/CatalogPurchaseView.types.ts | 1 + .../purchase-button/CatalogPurchaseButtonView.tsx | 4 ++-- .../purchase-button/CatalogPurchaseButtonView.types.ts | 1 + 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/views/catalog/views/page/layout/badge-display/CatalogLayoutBadgeDisplayView.tsx b/src/views/catalog/views/page/layout/badge-display/CatalogLayoutBadgeDisplayView.tsx index 5e05b594..c67f9600 100644 --- a/src/views/catalog/views/page/layout/badge-display/CatalogLayoutBadgeDisplayView.tsx +++ b/src/views/catalog/views/page/layout/badge-display/CatalogLayoutBadgeDisplayView.tsx @@ -5,6 +5,7 @@ import { InventoryBadgesRequestEvent } from '../../../../../../events/inventory/ import { dispatchUiEvent, useUiEvent } from '../../../../../../hooks'; import { NitroCardGridItemView } from '../../../../../../layout/card/grid/item/NitroCardGridItemView'; import { NitroCardGridView } from '../../../../../../layout/card/grid/NitroCardGridView'; +import { LocalizeText } from '../../../../../../utils/LocalizeText'; import { BadgeImageView } from '../../../../../shared/badge-image/BadgeImageView'; import { GetOfferName } from '../../../../common/CatalogUtilities'; import { useCatalogContext } from '../../../../context/CatalogContext'; @@ -18,8 +19,8 @@ export const CatalogLayoutBadgeDisplayView: FC(null); const [ badges, setBadges ] = useState([]); + const [ currentBadge, setCurrentBadge ] = useState(null); const product = ((activeOffer && activeOffer.products[0]) || null); @@ -63,7 +64,8 @@ export const CatalogLayoutBadgeDisplayView: FC
-
+
+
{ LocalizeText('catalog_selectbadge') }
{ badgeElements } @@ -73,7 +75,7 @@ export const CatalogLayoutBadgeDisplayView: FC
{ GetOfferName(activeOffer) }
- +
}
); diff --git a/src/views/catalog/views/page/purchase/CatalogPurchaseView.tsx b/src/views/catalog/views/page/purchase/CatalogPurchaseView.tsx index e2275968..ba6b4dd6 100644 --- a/src/views/catalog/views/page/purchase/CatalogPurchaseView.tsx +++ b/src/views/catalog/views/page/purchase/CatalogPurchaseView.tsx @@ -7,7 +7,7 @@ import { CatalogPurchaseGiftButtonView } from './purchase-gift-button/CatalogPur export const CatalogPurchaseView: FC = props => { - const { offer = null, pageId = -1, extra = '' } = props; + const { offer = null, pageId = -1, extra = '', disabled = false } = props; const [ quantity, setQuantity ] = useState(1); useEffect(() => @@ -70,7 +70,7 @@ export const CatalogPurchaseView: FC = props =>
- + { offer.giftable && }
diff --git a/src/views/catalog/views/page/purchase/CatalogPurchaseView.types.ts b/src/views/catalog/views/page/purchase/CatalogPurchaseView.types.ts index 075b4f22..72be56a3 100644 --- a/src/views/catalog/views/page/purchase/CatalogPurchaseView.types.ts +++ b/src/views/catalog/views/page/purchase/CatalogPurchaseView.types.ts @@ -5,4 +5,5 @@ export interface CatalogPurchaseViewProps offer: CatalogPageOfferData; pageId: number; extra?: string; + disabled?: boolean; } diff --git a/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.tsx b/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.tsx index 2ae147b9..ed8d728a 100644 --- a/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.tsx +++ b/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.tsx @@ -10,7 +10,7 @@ import { CatalogPurchaseButtonViewProps, CatalogPurchaseState } from './CatalogP export const CatalogPurchaseButtonView: FC = props => { - const { className = '', offer = null, pageId = -1, extra = null, quantity = 1, isPurchaseAllowed = true, beforePurchase = null } = props; + const { className = '', offer = null, pageId = -1, extra = null, quantity = 1, isPurchaseAllowed = true, disabled = false, beforePurchase = null } = props; const [ purchaseState, setPurchaseState ] = useState(CatalogPurchaseState.NONE); const [ pendingApproval, setPendingApproval ] = useState(false); @@ -96,6 +96,6 @@ export const CatalogPurchaseButtonView: FC = pro return ; case CatalogPurchaseState.NONE: default: - return + return } } diff --git a/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.types.ts b/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.types.ts index 0abc0ef3..008d8d8e 100644 --- a/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.types.ts +++ b/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.types.ts @@ -8,6 +8,7 @@ export interface CatalogPurchaseButtonViewProps extra?: string; quantity?: number; isPurchaseAllowed?: boolean; + disabled?: boolean; beforePurchase?: () => void; } From de4e767ce5a5f9616e1fc914893a97efec22c336 Mon Sep 17 00:00:00 2001 From: Bill Date: Sun, 25 Jul 2021 04:44:56 -0400 Subject: [PATCH 05/66] Vip buy updates --- .../vip-buy/CatalogLayoutVipBuyView.scss | 4 +-- .../vip-buy/CatalogLayoutVipBuyView.tsx | 31 ++++++++++++++----- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/src/views/catalog/views/page/layout/vip-buy/CatalogLayoutVipBuyView.scss b/src/views/catalog/views/page/layout/vip-buy/CatalogLayoutVipBuyView.scss index fd44278a..5aee7e7f 100644 --- a/src/views/catalog/views/page/layout/vip-buy/CatalogLayoutVipBuyView.scss +++ b/src/views/catalog/views/page/layout/vip-buy/CatalogLayoutVipBuyView.scss @@ -3,8 +3,8 @@ .vip-buy-grid { .grid-item-container { - height: 70px !important; - max-height: 70px !important; + height: 80px !important; + max-height: 80px !important; } } } diff --git a/src/views/catalog/views/page/layout/vip-buy/CatalogLayoutVipBuyView.tsx b/src/views/catalog/views/page/layout/vip-buy/CatalogLayoutVipBuyView.tsx index 2fdd4a9e..9eaff28e 100644 --- a/src/views/catalog/views/page/layout/vip-buy/CatalogLayoutVipBuyView.tsx +++ b/src/views/catalog/views/page/layout/vip-buy/CatalogLayoutVipBuyView.tsx @@ -99,27 +99,44 @@ export const CatalogLayoutVipBuyView: FC = props = return ( { (pendingOffer === offer) && -
-
{ getPurchaseHeader() }
-
{ getPurchaseValidUntil() }
+ <> +
+
+ + { getPurchaseHeader() } +
+
{ getPurchaseValidUntil() }
+
+ { (offer.priceCredits > 0) && +
+ { offer.priceCredits } + +
} + { (offer.priceActivityPoints > 0) && +
+ { offer.priceActivityPoints } + +
} +
+
-
} + } { (pendingOffer !== offer) && <>
-
+
{ getOfferText(offer) }
{ (offer.priceCredits > 0) &&
- { offer.priceCredits } + { offer.priceCredits }
} { (offer.priceActivityPoints > 0) &&
- { offer.priceActivityPoints } + { offer.priceActivityPoints }
}
From 705569a5d1d34fa1600b3c95f6ade1af92f8cae2 Mon Sep 17 00:00:00 2001 From: Bill Date: Tue, 27 Jul 2021 03:28:26 -0400 Subject: [PATCH 06/66] Add trophy layout --- src/layout/Layout.scss | 1 + src/layout/index.ts | 1 + .../trophy/NitroLayoutTrophyView.scss} | 4 +-- src/layout/trophy/NitroLayoutTrophyView.tsx | 29 +++++++++++++++++++ .../trophy/NitroLayoutTrophyView.types.ts | 8 +++++ src/layout/trophy/index.ts | 2 ++ .../widgets/furniture/FurnitureWidgets.scss | 1 - .../furniture/trophy/FurnitureTrophyView.tsx | 23 ++------------- 8 files changed, 45 insertions(+), 24 deletions(-) rename src/{views/room/widgets/furniture/trophy/FurnitureTrophyView.scss => layout/trophy/NitroLayoutTrophyView.scss} (86%) create mode 100644 src/layout/trophy/NitroLayoutTrophyView.tsx create mode 100644 src/layout/trophy/NitroLayoutTrophyView.types.ts create mode 100644 src/layout/trophy/index.ts diff --git a/src/layout/Layout.scss b/src/layout/Layout.scss index a65b9d94..29d09c48 100644 --- a/src/layout/Layout.scss +++ b/src/layout/Layout.scss @@ -25,3 +25,4 @@ @import './card/NitroCardView'; @import './draggable-window/DraggableWindow'; @import './loading-spinner/LoadingSpinnerView'; +@import './trophy/NitroLayoutTrophyView'; diff --git a/src/layout/index.ts b/src/layout/index.ts index 2e0226d7..c9708368 100644 --- a/src/layout/index.ts +++ b/src/layout/index.ts @@ -2,3 +2,4 @@ export * from './card'; export * from './draggable-window'; export * from './loading-spinner'; export * from './transitions'; +export * from './trophy'; diff --git a/src/views/room/widgets/furniture/trophy/FurnitureTrophyView.scss b/src/layout/trophy/NitroLayoutTrophyView.scss similarity index 86% rename from src/views/room/widgets/furniture/trophy/FurnitureTrophyView.scss rename to src/layout/trophy/NitroLayoutTrophyView.scss index 878a0565..ded18038 100644 --- a/src/views/room/widgets/furniture/trophy/FurnitureTrophyView.scss +++ b/src/layout/trophy/NitroLayoutTrophyView.scss @@ -1,4 +1,4 @@ -.nitro-trophy { +.nitro-layout-trophy { position: relative; width: 340px; height: 173px; @@ -7,7 +7,7 @@ color: black; background-position: 0px 0px; - background-image: url('../../../../../assets/images/room-widgets/trophy-widget/trophy-spritesheet.png'); + background-image: url('../../assets/images/room-widgets/trophy-widget/trophy-spritesheet.png'); &.trophy-2 { background-position: 0px 173px; diff --git a/src/layout/trophy/NitroLayoutTrophyView.tsx b/src/layout/trophy/NitroLayoutTrophyView.tsx new file mode 100644 index 00000000..0d66ef49 --- /dev/null +++ b/src/layout/trophy/NitroLayoutTrophyView.tsx @@ -0,0 +1,29 @@ +import { FC } from 'react'; +import { LocalizeText } from '../../utils/LocalizeText'; +import { DraggableWindow } from '../draggable-window'; +import { NitroLayoutTrophyViewProps } from './NitroLayoutTrophyView.types'; + +export const NitroLayoutTrophyView: FC = props => +{ + const { color = '', message = '', date = '', senderName = '', onCloseClick = null } = props; + + return ( + +
+
+
+
+ { LocalizeText('widget.furni.trophy.title') } +
+
+
+ { message } +
+
+
{ date }
+
{ senderName }
+
+
+
+ ); +} diff --git a/src/layout/trophy/NitroLayoutTrophyView.types.ts b/src/layout/trophy/NitroLayoutTrophyView.types.ts new file mode 100644 index 00000000..fd196e94 --- /dev/null +++ b/src/layout/trophy/NitroLayoutTrophyView.types.ts @@ -0,0 +1,8 @@ +export interface NitroLayoutTrophyViewProps +{ + color: string; + message: string; + date: string; + senderName: string; + onCloseClick: () => void; +} diff --git a/src/layout/trophy/index.ts b/src/layout/trophy/index.ts new file mode 100644 index 00000000..5adbb8fe --- /dev/null +++ b/src/layout/trophy/index.ts @@ -0,0 +1,2 @@ +export * from './NitroLayoutTrophyView'; +export * from './NitroLayoutTrophyView.types'; diff --git a/src/views/room/widgets/furniture/FurnitureWidgets.scss b/src/views/room/widgets/furniture/FurnitureWidgets.scss index 1a56f4e1..9f5271ea 100644 --- a/src/views/room/widgets/furniture/FurnitureWidgets.scss +++ b/src/views/room/widgets/furniture/FurnitureWidgets.scss @@ -4,4 +4,3 @@ @import './manipulation-menu/FurnitureManipulationMenuView'; @import './mannequin/FurnitureMannequinView'; @import './stickie/FurnitureStickieView'; -@import './trophy/FurnitureTrophyView'; diff --git a/src/views/room/widgets/furniture/trophy/FurnitureTrophyView.tsx b/src/views/room/widgets/furniture/trophy/FurnitureTrophyView.tsx index 9a1e6b45..98b8c543 100644 --- a/src/views/room/widgets/furniture/trophy/FurnitureTrophyView.tsx +++ b/src/views/room/widgets/furniture/trophy/FurnitureTrophyView.tsx @@ -3,8 +3,7 @@ import { FC, useCallback, useState } from 'react'; import { GetRoomEngine } from '../../../../../api'; import { CreateEventDispatcherHook } from '../../../../../hooks/events/event-dispatcher.base'; import { useRoomEngineEvent } from '../../../../../hooks/events/nitro/room/room-engine-event'; -import { DraggableWindow } from '../../../../../layout/draggable-window/DraggableWindow'; -import { LocalizeText } from '../../../../../utils/LocalizeText'; +import { NitroLayoutTrophyView } from '../../../../../layout'; import { useRoomContext } from '../../../context/RoomContext'; import { RoomWidgetRoomObjectUpdateEvent } from '../../../events'; import { FurnitureTrophyData } from './FurnitureTrophyData'; @@ -70,23 +69,5 @@ export const FurnitureTrophyView: FC<{}> = props => if(!trophyData) return null; - return ( - -
-
-
processAction('close') }>
-
- { LocalizeText('widget.furni.trophy.title') } -
-
-
- { trophyData.message } -
-
-
{ trophyData.date }
-
{ trophyData.ownerName }
-
-
-
- ); + return processAction('close') } />; } From 571b17feb5650de25c139012063e919d5b87ee5e Mon Sep 17 00:00:00 2001 From: Bill Date: Tue, 27 Jul 2021 15:00:10 -0400 Subject: [PATCH 07/66] Its still busted --- src/views/catalog/CatalogView.tsx | 2 +- .../navigation/CatalogNavigationView.tsx | 17 ++++++- .../item/CatalogNavigationItemView.tsx | 47 +++++++++++++------ .../set/CatalogNavigationSetView.tsx | 9 +++- 4 files changed, 56 insertions(+), 19 deletions(-) diff --git a/src/views/catalog/CatalogView.tsx b/src/views/catalog/CatalogView.tsx index db3735f0..2199c0ca 100644 --- a/src/views/catalog/CatalogView.tsx +++ b/src/views/catalog/CatalogView.tsx @@ -122,8 +122,8 @@ export const CatalogView: FC = props => const tree = buildCatalogPageTree(catalogState.root, pendingPageId); setCurrentTab(tree.shift()); - setPendingTree(tree); setPendingPageId(-1); + setPendingTree(tree); } } }, [ isVisible, pendingPageId, catalogState.root, buildCatalogPageTree, setCurrentTab ]); diff --git a/src/views/catalog/views/navigation/CatalogNavigationView.tsx b/src/views/catalog/views/navigation/CatalogNavigationView.tsx index a240a71f..d185f223 100644 --- a/src/views/catalog/views/navigation/CatalogNavigationView.tsx +++ b/src/views/catalog/views/navigation/CatalogNavigationView.tsx @@ -1,11 +1,26 @@ -import { FC } from 'react'; +import { ICatalogPageData } from 'nitro-renderer'; +import { FC, useEffect } from 'react'; import { CatalogSearchView } from '../search/CatalogSearchView'; import { CatalogNavigationViewProps } from './CatalogNavigationView.types'; import { CatalogNavigationSetView } from './set/CatalogNavigationSetView'; +export const ACTIVE_PAGES: ICatalogPageData[] = []; + export const CatalogNavigationView: FC = props => { const { page = null, pendingTree = null, setPendingTree = null } = props; + + useEffect(() => + { + if(!page) return; + + const index = (ACTIVE_PAGES.push(page) - 1); + + return () => + { + ACTIVE_PAGES.splice(index, 1); + } + }, [ page ]); return ( <> diff --git a/src/views/catalog/views/navigation/item/CatalogNavigationItemView.tsx b/src/views/catalog/views/navigation/item/CatalogNavigationItemView.tsx index 941c1c00..1ec16de1 100644 --- a/src/views/catalog/views/navigation/item/CatalogNavigationItemView.tsx +++ b/src/views/catalog/views/navigation/item/CatalogNavigationItemView.tsx @@ -2,8 +2,8 @@ import { CatalogPageComposer, ICatalogPageData } from 'nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { SendMessageHook } from '../../../../../hooks/messages/message-event'; import { CatalogMode } from '../../../CatalogView.types'; -import { useCatalogContext } from '../../../context/CatalogContext'; import { CatalogIconView } from '../../catalog-icon/CatalogIconView'; +import { ACTIVE_PAGES } from '../CatalogNavigationView'; import { CatalogNavigationSetView } from '../set/CatalogNavigationSetView'; import { CatalogNavigationItemViewProps } from './CatalogNavigationItemView.types'; @@ -11,9 +11,8 @@ export const CatalogNavigationItemView: FC = pro { const { page = null, isActive = false, pendingTree = null, setPendingTree = null, setActiveChild = null } = props; const [ isExpanded, setIsExpanded ] = useState(false); - const { dispatchCatalogState = null } = useCatalogContext(); - const select = useCallback((selectPage: ICatalogPageData) => + const select = useCallback((selectPage: ICatalogPageData, expand: boolean = false) => { if(!selectPage) return; @@ -21,7 +20,7 @@ export const CatalogNavigationItemView: FC = pro { if(prevValue === selectPage) { - SendMessageHook(new CatalogPageComposer(selectPage.pageId, -1, CatalogMode.MODE_NORMAL)); + if(selectPage.pageId > -1) SendMessageHook(new CatalogPageComposer(selectPage.pageId, -1, CatalogMode.MODE_NORMAL)); } return selectPage; @@ -31,6 +30,8 @@ export const CatalogNavigationItemView: FC = pro { setIsExpanded(prevValue => { + if(expand) return true; + return !prevValue; }); } @@ -38,25 +39,41 @@ export const CatalogNavigationItemView: FC = pro useEffect(() => { - if(!isActive || !page) return; + if(!pendingTree || !pendingTree.length) return; - setIsExpanded(true); - - SendMessageHook(new CatalogPageComposer(page.pageId, -1, CatalogMode.MODE_NORMAL)); - }, [ isActive, page, select, dispatchCatalogState ]); + if(page !== pendingTree[0]) return; + + if(pendingTree.length > 1) + { + const newTree = [ ...pendingTree ]; + + newTree.shift(); + + setPendingTree(newTree); + } + else + { + setPendingTree(null); + } + + select(page, true); + }, [ page, pendingTree, setPendingTree, select ]); useEffect(() => { - if(!page || !pendingTree || !pendingTree.length) return; + if(!isActive || !page) return; - const index = pendingTree.indexOf(page); + setIsExpanded(true); - if(index === -1) return; + if(page.pageId > -1) SendMessageHook(new CatalogPageComposer(page.pageId, -1, CatalogMode.MODE_NORMAL)); - //if(!pendingTree.length) setPendingTree(null); + const index = (ACTIVE_PAGES.push(page) - 1); - select(page); - }, [ pendingTree, page, select, setPendingTree ]); + return () => + { + ACTIVE_PAGES.length = index; + } + }, [ isActive, page ]); return (
diff --git a/src/views/catalog/views/navigation/set/CatalogNavigationSetView.tsx b/src/views/catalog/views/navigation/set/CatalogNavigationSetView.tsx index a9e897ec..5d895528 100644 --- a/src/views/catalog/views/navigation/set/CatalogNavigationSetView.tsx +++ b/src/views/catalog/views/navigation/set/CatalogNavigationSetView.tsx @@ -7,7 +7,7 @@ export const CatalogNavigationSetView: FC = props { const { page = null, isFirstSet = false, pendingTree = null, setPendingTree = null } = props; const [ activeChild, setActiveChild ] = useState(null); - + useEffect(() => { if(!isFirstSet || !page || (page.pageId === -1) || pendingTree) return; @@ -16,9 +16,14 @@ export const CatalogNavigationSetView: FC = props { const child = page.children[0]; - setActiveChild(child); + //if(child) setActiveChild(child); } }, [ page, isFirstSet, pendingTree ]); + + useEffect(() => + { + console.log('activeChild', activeChild, page); + }, [ page, activeChild ]); return (
From 88233000bc6ec105c76dd4d16f914954214fe042 Mon Sep 17 00:00:00 2001 From: Bill Date: Tue, 27 Jul 2021 15:00:20 -0400 Subject: [PATCH 08/66] Update configuration --- public/configuration.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/configuration.json b/public/configuration.json index 9d03393d..5108b080 100644 --- a/public/configuration.json +++ b/public/configuration.json @@ -108,6 +108,8 @@ "avatareditor.show.clubitems.dimmed": true, "avatareditor.show.clubitems.first": true, "chat.history.max.items": 100, + "furni.rotation.bounce.steps": 20, + "furni.rotation.bounce.height": 0.0625, "animation.fps": 24, "limits.fps": false, "system.dispatcher.log": false, From 35ff72eb86ceb5d900136d0b97e06a552ee4455f Mon Sep 17 00:00:00 2001 From: Bill Date: Tue, 27 Jul 2021 15:00:35 -0400 Subject: [PATCH 09/66] Add badge description util --- src/utils/LocalizeBadgeDescription.ts | 6 ++++++ src/utils/index.ts | 5 +++++ 2 files changed, 11 insertions(+) create mode 100644 src/utils/LocalizeBadgeDescription.ts create mode 100644 src/utils/index.ts diff --git a/src/utils/LocalizeBadgeDescription.ts b/src/utils/LocalizeBadgeDescription.ts new file mode 100644 index 00000000..e5a046e0 --- /dev/null +++ b/src/utils/LocalizeBadgeDescription.ts @@ -0,0 +1,6 @@ +import { GetNitroInstance } from '../api'; + +export function LocalizeBadgeDescription(key: string): string +{ + return GetNitroInstance().localization.getBadgeDesc(key); +} diff --git a/src/utils/index.ts b/src/utils/index.ts new file mode 100644 index 00000000..eb8e19e2 --- /dev/null +++ b/src/utils/index.ts @@ -0,0 +1,5 @@ +export * from './ColorUtils'; +export * from './LocalizeBadgeDescription'; +export * from './LocalizeBageName'; +export * from './LocalizeShortNumber'; +export * from './LocalizeText'; From 98a169f4066f8e25ad0529c6af64bf1a8a66960a Mon Sep 17 00:00:00 2001 From: Bill Date: Tue, 27 Jul 2021 15:03:31 -0400 Subject: [PATCH 10/66] Remove useless state --- src/views/catalog/reducers/CatalogReducer.tsx | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/views/catalog/reducers/CatalogReducer.tsx b/src/views/catalog/reducers/CatalogReducer.tsx index 3ee02bdb..8e998cd3 100644 --- a/src/views/catalog/reducers/CatalogReducer.tsx +++ b/src/views/catalog/reducers/CatalogReducer.tsx @@ -10,7 +10,6 @@ export interface ICatalogState root: ICatalogPageData; offerRoot: ICatalogOffers; currentTab: ICatalogPageData; - currentPage: ICatalogPageData; pageParser: ICatalogPageParser; activeOffer: CatalogPageOfferData; searchResult: ICatalogSearchResult; @@ -19,7 +18,6 @@ export interface ICatalogState clubOffers: CatalogClubOfferData[]; subscriptionInfo: SubscriptionInfo; giftConfiguration: GiftWrappingConfiguration; - pendingPageId: number; } export interface ICatalogAction @@ -29,7 +27,6 @@ export interface ICatalogAction root?: ICatalogPageData; offerRoot?: ICatalogOffers; currentTab?: ICatalogPageData; - currentPage?: ICatalogPageData; pageParser?: ICatalogPageParser; activeOffer?: CatalogPageOfferData; searchResult?: ICatalogSearchResult; @@ -38,7 +35,6 @@ export interface ICatalogAction clubOffers?: CatalogClubOfferData[]; subscriptionInfo?: SubscriptionInfo; giftConfiguration?: CatalogGiftConfigurationParser; - pendingPageId?: number; } } @@ -47,7 +43,6 @@ export class CatalogActions public static RESET_STATE: string = 'CA_RESET_STATE'; public static SET_CATALOG_ROOT: string = 'CA_SET_CATALOG_ROOT'; public static SET_CATALOG_CURRENT_TAB: string = 'CA_SET_CATALOG_CURRENT_TAB'; - public static SET_CATALOG_CURRENT_PAGE: string = 'CA_SET_CATALOG_CURRENT_PAGE'; public static SET_CATALOG_PAGE_PARSER: string = 'CA_SET_CATALOG_PAGE'; public static SET_CATALOG_ACTIVE_OFFER: string = 'CA_SET_ACTIVE_OFFER'; public static SET_CLUB_OFFERS: string = 'CA_SET_CLUB_OFFERS'; @@ -56,14 +51,12 @@ export class CatalogActions public static SET_SEARCH_RESULT: string = 'CA_SET_SEARCH_RESULT'; public static SET_SUBSCRIPTION_INFO: string = 'CA_SET_SUBSCRIPTION_INFO'; public static SET_GIFT_CONFIGURATION: string = 'CA_SET_GIFT_CONFIGURATION'; - public static SET_PENDING_PAGE_ID: string = 'CA_SET_PENDING_PAGE_ID'; } export const initialCatalog: ICatalogState = { root: null, offerRoot: null, currentTab: null, - currentPage: null, pageParser: null, activeOffer: null, searchResult: null, @@ -71,8 +64,7 @@ export const initialCatalog: ICatalogState = { petPalettes: [], clubOffers: null, subscriptionInfo: new SubscriptionInfo(), - giftConfiguration: null, - pendingPageId: -1 + giftConfiguration: null } export const CatalogReducer: Reducer = (state, action) => @@ -95,11 +87,6 @@ export const CatalogReducer: Reducer = (state, ac return { ...state, currentTab, searchResult }; } - case CatalogActions.SET_CATALOG_CURRENT_PAGE: { - const currentPage = (action.payload.currentPage || state.currentPage || null); - - return { ...state, currentPage }; - } case CatalogActions.SET_CATALOG_PAGE_PARSER: { let pageParser = (Object.create(action.payload.pageParser) as ICatalogPageParser); let activeOffer = null; @@ -172,11 +159,6 @@ export const CatalogReducer: Reducer = (state, ac return { ...state, giftConfiguration }; } - case CatalogActions.SET_PENDING_PAGE_ID: { - const pendingPageId = (action.payload.pendingPageId || -1); - - return { ...state, pendingPageId }; - } default: return state; } From ddea5be9bc47a4c525151e1cc440211c26663992 Mon Sep 17 00:00:00 2001 From: Bill Date: Tue, 27 Jul 2021 20:01:37 -0400 Subject: [PATCH 11/66] FInally fix catalog --- src/views/catalog/CatalogView.tsx | 55 ++++++++++--------- src/views/catalog/common/CatalogUtilities.ts | 11 ++++ .../item/CatalogNavigationItemView.tsx | 14 ++--- .../set/CatalogNavigationSetView.tsx | 24 ++++---- 4 files changed, 55 insertions(+), 49 deletions(-) diff --git a/src/views/catalog/CatalogView.tsx b/src/views/catalog/CatalogView.tsx index 2199c0ca..12276185 100644 --- a/src/views/catalog/CatalogView.tsx +++ b/src/views/catalog/CatalogView.tsx @@ -8,9 +8,9 @@ import { NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, Nitro import { LocalizeText } from '../../utils/LocalizeText'; import { CatalogMessageHandler } from './CatalogMessageHandler'; import { CatalogMode, CatalogViewProps } from './CatalogView.types'; -import { GetCatalogPageTree } from './common/CatalogUtilities'; +import { BuildCatalogPageTree } from './common/CatalogUtilities'; import { CatalogContextProvider } from './context/CatalogContext'; -import { CatalogActions, CatalogReducer, initialCatalog } from './reducers/CatalogReducer'; +import { CatalogReducer, initialCatalog } from './reducers/CatalogReducer'; import { CatalogNavigationView } from './views/navigation/CatalogNavigationView'; import { CatalogPageView } from './views/page/CatalogPageView'; @@ -21,7 +21,8 @@ export const CatalogView: FC = props => const [ pendingPageId, setPendingPageId ] = useState(-1); const [ pendingTree, setPendingTree ] = useState(null); const [ catalogState, dispatchCatalogState ] = useReducer(CatalogReducer, initialCatalog); - const { root = null, currentTab = null, pageParser = null, activeOffer = null, searchResult = null} = catalogState; + const [ currentTab, setCurrentTab ] = useState(null); + const { root = null, pageParser = null, activeOffer = null, searchResult = null} = catalogState; const onCatalogEvent = useCallback((event: CatalogEvent) => { @@ -44,27 +45,6 @@ export const CatalogView: FC = props => useUiEvent(CatalogEvent.TOGGLE_CATALOG, onCatalogEvent); useUiEvent(CatalogEvent.CATALOG_RESET, onCatalogEvent); - const setCurrentTab = useCallback((page: ICatalogPageData) => - { - dispatchCatalogState({ - type: CatalogActions.SET_CATALOG_CURRENT_TAB, - payload: { - currentTab: page - } - }); - }, [ dispatchCatalogState ]); - - const buildCatalogPageTree = useCallback((page: ICatalogPageData, targetPageId: number) => - { - const pageTree: ICatalogPageData[] = []; - - GetCatalogPageTree(page, targetPageId, pageTree); - - if(pageTree.length) pageTree.reverse(); - - return pageTree; - }, []); - const linkReceived = useCallback((url: string) => { const parts = url.split('/'); @@ -106,6 +86,8 @@ export const CatalogView: FC = props => { SendMessageHook(new CatalogModeComposer(CatalogMode.MODE_NORMAL)); SendMessageHook(new CatalogRequestGiftConfigurationComposer()); + + return; } if(catalogState.root) @@ -119,14 +101,32 @@ export const CatalogView: FC = props => if(pendingPageId > -1) { - const tree = buildCatalogPageTree(catalogState.root, pendingPageId); + const tree = BuildCatalogPageTree(catalogState.root, pendingPageId); setCurrentTab(tree.shift()); setPendingPageId(-1); setPendingTree(tree); } + else + { + + setCurrentTab(prevValue => + { + if(catalogState.root.children.length) + { + if(prevValue) + { + if(catalogState.root.children.indexOf(prevValue) >= 0) return prevValue; + } + + return ((catalogState.root.children.length && catalogState.root.children[0]) || null); + } + + return null; + }); + } } - }, [ isVisible, pendingPageId, catalogState.root, buildCatalogPageTree, setCurrentTab ]); + }, [ isVisible, pendingPageId, catalogState.root, setCurrentTab ]); useEffect(() => { @@ -151,6 +151,7 @@ export const CatalogView: FC = props => }, []); const currentNavigationPage = ((searchResult && searchResult.page) || currentTab); + const navigationHidden = (pageParser && pageParser.frontPageItems.length); return ( @@ -170,7 +171,7 @@ export const CatalogView: FC = props =>
- { (!pageParser || (pageParser && !pageParser.frontPageItems.length)) && + { currentNavigationPage && !navigationHidden &&
} diff --git a/src/views/catalog/common/CatalogUtilities.ts b/src/views/catalog/common/CatalogUtilities.ts index d8cd2a3f..9b8c7a62 100644 --- a/src/views/catalog/common/CatalogUtilities.ts +++ b/src/views/catalog/common/CatalogUtilities.ts @@ -166,3 +166,14 @@ export function GetCatalogPageTree(page: ICatalogPageData, targetPageId: number, } } } + +export function BuildCatalogPageTree(page: ICatalogPageData, targetPageId: number) +{ + const pageTree: ICatalogPageData[] = []; + + GetCatalogPageTree(page, targetPageId, pageTree); + + if(pageTree.length) pageTree.reverse(); + + return pageTree; +} diff --git a/src/views/catalog/views/navigation/item/CatalogNavigationItemView.tsx b/src/views/catalog/views/navigation/item/CatalogNavigationItemView.tsx index 1ec16de1..89cc7eb8 100644 --- a/src/views/catalog/views/navigation/item/CatalogNavigationItemView.tsx +++ b/src/views/catalog/views/navigation/item/CatalogNavigationItemView.tsx @@ -43,18 +43,12 @@ export const CatalogNavigationItemView: FC = pro if(page !== pendingTree[0]) return; - if(pendingTree.length > 1) - { - const newTree = [ ...pendingTree ]; + const newTree = [ ...pendingTree ]; - newTree.shift(); + newTree.shift(); - setPendingTree(newTree); - } - else - { - setPendingTree(null); - } + if(newTree.length) setPendingTree(newTree); + else setPendingTree(null); select(page, true); }, [ page, pendingTree, setPendingTree, select ]); diff --git a/src/views/catalog/views/navigation/set/CatalogNavigationSetView.tsx b/src/views/catalog/views/navigation/set/CatalogNavigationSetView.tsx index 5d895528..4f263114 100644 --- a/src/views/catalog/views/navigation/set/CatalogNavigationSetView.tsx +++ b/src/views/catalog/views/navigation/set/CatalogNavigationSetView.tsx @@ -7,23 +7,23 @@ export const CatalogNavigationSetView: FC = props { const { page = null, isFirstSet = false, pendingTree = null, setPendingTree = null } = props; const [ activeChild, setActiveChild ] = useState(null); - + useEffect(() => { - if(!isFirstSet || !page || (page.pageId === -1) || pendingTree) return; + if(!page || (page.pageId === -1) || !isFirstSet || pendingTree) return; - if(page && page.children.length) + if(page.children.length) { - const child = page.children[0]; - - //if(child) setActiveChild(child); + if(activeChild) + { + if(page.children.indexOf(activeChild) === -1) setActiveChild(null); + + return; + } + + setActiveChild(page.children[0]); } - }, [ page, isFirstSet, pendingTree ]); - - useEffect(() => - { - console.log('activeChild', activeChild, page); - }, [ page, activeChild ]); + }, [ page, isFirstSet, activeChild, pendingTree ]); return (
From c572143268ec7f0663eee61acb236e1d4043a8d9 Mon Sep 17 00:00:00 2001 From: Bill Date: Tue, 27 Jul 2021 22:41:51 -0400 Subject: [PATCH 12/66] Clickable front page links --- src/views/catalog/CatalogView.tsx | 17 ++++---- src/views/catalog/common/CatalogUtilities.ts | 34 +++++++++++++--- .../CatalogLayoutFrontpage4View.tsx | 40 ++++++++----------- 3 files changed, 53 insertions(+), 38 deletions(-) diff --git a/src/views/catalog/CatalogView.tsx b/src/views/catalog/CatalogView.tsx index 12276185..0eb6346e 100644 --- a/src/views/catalog/CatalogView.tsx +++ b/src/views/catalog/CatalogView.tsx @@ -18,7 +18,7 @@ export const CatalogView: FC = props => { const [ isVisible, setIsVisible ] = useState(false); const [ roomPreviewer, setRoomPreviewer ] = useState(null); - const [ pendingPageId, setPendingPageId ] = useState(-1); + const [ pendingPageLookup, setPendingPageLookup ] = useState(null); const [ pendingTree, setPendingTree ] = useState(null); const [ catalogState, dispatchCatalogState ] = useReducer(CatalogReducer, initialCatalog); const [ currentTab, setCurrentTab ] = useState(null); @@ -56,7 +56,7 @@ export const CatalogView: FC = props => case 'open': if(parts.length > 2) { - setPendingPageId(parseInt(parts[2])); + setPendingPageLookup(parts[2]); } else { @@ -80,7 +80,7 @@ export const CatalogView: FC = props => useEffect(() => { - const loadCatalog = (((pendingPageId > -1) && !catalogState.root) || (isVisible && !catalogState.root)); + const loadCatalog = (((pendingPageLookup !== null) && !catalogState.root) || (isVisible && !catalogState.root)); if(loadCatalog) { @@ -92,24 +92,23 @@ export const CatalogView: FC = props => if(catalogState.root) { - if(!isVisible && (pendingPageId > -1)) + if(!isVisible && (pendingPageLookup !== null)) { setIsVisible(true); return; } - if(pendingPageId > -1) + if(pendingPageLookup !== null) { - const tree = BuildCatalogPageTree(catalogState.root, pendingPageId); + const tree = BuildCatalogPageTree(catalogState.root, pendingPageLookup); setCurrentTab(tree.shift()); - setPendingPageId(-1); + setPendingPageLookup(null); setPendingTree(tree); } else { - setCurrentTab(prevValue => { if(catalogState.root.children.length) @@ -126,7 +125,7 @@ export const CatalogView: FC = props => }); } } - }, [ isVisible, pendingPageId, catalogState.root, setCurrentTab ]); + }, [ isVisible, pendingPageLookup, catalogState.root, setCurrentTab ]); useEffect(() => { diff --git a/src/views/catalog/common/CatalogUtilities.ts b/src/views/catalog/common/CatalogUtilities.ts index 9b8c7a62..68a4beb8 100644 --- a/src/views/catalog/common/CatalogUtilities.ts +++ b/src/views/catalog/common/CatalogUtilities.ts @@ -150,13 +150,13 @@ export function GetPetAvailableColors(petIndex: number, palettes: SellablePetPal } } -export function GetCatalogPageTree(page: ICatalogPageData, targetPageId: number, tree: ICatalogPageData[]) +export function GetCatalogPageTreeByName(page: ICatalogPageData, lookup: string, tree: ICatalogPageData[]) { - if(page.pageId === targetPageId) return page; + if(page.pageName === lookup) return page; for(const pageData of page.children) { - const foundPageData = GetCatalogPageTree(pageData, targetPageId, tree); + const foundPageData = GetCatalogPageTreeByName(pageData, lookup, tree); if(foundPageData) { @@ -167,11 +167,35 @@ export function GetCatalogPageTree(page: ICatalogPageData, targetPageId: number, } } -export function BuildCatalogPageTree(page: ICatalogPageData, targetPageId: number) +export function GetCatalogPageTreeById(page: ICatalogPageData, lookup: number, tree: ICatalogPageData[]) +{ + if(page.pageId === lookup) return page; + + for(const pageData of page.children) + { + const foundPageData = GetCatalogPageTreeById(pageData, lookup, tree); + + if(foundPageData) + { + tree.push(pageData); + + return pageData; + } + } +} + +export function BuildCatalogPageTree(page: ICatalogPageData, lookup: string) { const pageTree: ICatalogPageData[] = []; - GetCatalogPageTree(page, targetPageId, pageTree); + if(isNaN((lookup as unknown) as number)) + { + GetCatalogPageTreeByName(page, lookup, pageTree); + } + else + { + GetCatalogPageTreeById(page, parseInt(lookup), pageTree); + } if(pageTree.length) pageTree.reverse(); diff --git a/src/views/catalog/views/page/layout/frontpage4/CatalogLayoutFrontpage4View.tsx b/src/views/catalog/views/page/layout/frontpage4/CatalogLayoutFrontpage4View.tsx index 996c2ab8..f08ad046 100644 --- a/src/views/catalog/views/page/layout/frontpage4/CatalogLayoutFrontpage4View.tsx +++ b/src/views/catalog/views/page/layout/frontpage4/CatalogLayoutFrontpage4View.tsx @@ -1,56 +1,48 @@ +import { CatalogFrontPageItem } from 'nitro-renderer'; import { FC, useCallback, useMemo } from 'react'; -import { GetConfiguration } from '../../../../../../api'; +import { CreateLinkEvent, GetConfiguration } from '../../../../../../api'; import { CatalogLayoutFrontpage4ViewProps } from './CatalogLayoutFrontpage4View.types'; export const CatalogLayoutFrontpage4View: FC = props => { const { pageParser = null } = props; - const getFrontPageItem = useCallback((position: number) => - { - for(const item of pageParser.frontPageItems) - { - if(item.position !== position) continue; - - return item; - } - }, [ pageParser ]); - - const getFrontPageItemImage = useCallback((position: number) => - { - const item = getFrontPageItem(position); - - if(!item) return null; - - return item.itemPromoImage; - }, [ getFrontPageItem ]); - const imageLibraryUrl = useMemo(() => { return GetConfiguration('image.library.url'); }, []); + const selectItem = useCallback((item: CatalogFrontPageItem) => + { + switch(item.type) + { + case CatalogFrontPageItem.ITEM_CATALOGUE_PAGE: + CreateLinkEvent(`catalog/open/${ item.catalogPageLocation }`); + return; + } + }, []); + if(!pageParser) return null; return (
{ pageParser.frontPageItems[0] && -
+
selectItem(pageParser.frontPageItems[0]) }>
{ pageParser.frontPageItems[0].itemName }
}
{ pageParser.frontPageItems[1] && -
+
selectItem(pageParser.frontPageItems[1]) }>
{ pageParser.frontPageItems[1].itemName }
} { pageParser.frontPageItems[2] && -
+
selectItem(pageParser.frontPageItems[2]) }>
{ pageParser.frontPageItems[2].itemName }
} { pageParser.frontPageItems[3] && -
+
selectItem(pageParser.frontPageItems[3]) }>
{ pageParser.frontPageItems[3].itemName }
}
From 8be14aebb0ecaa0d2264764686cf5f28fd301133 Mon Sep 17 00:00:00 2001 From: Bill Date: Wed, 28 Jul 2021 16:28:57 -0400 Subject: [PATCH 13/66] Add CreateLinkEvent --- src/api/nitro/CreateLinkEvent.ts | 6 ++++++ src/api/nitro/index.ts | 1 + 2 files changed, 7 insertions(+) create mode 100644 src/api/nitro/CreateLinkEvent.ts diff --git a/src/api/nitro/CreateLinkEvent.ts b/src/api/nitro/CreateLinkEvent.ts new file mode 100644 index 00000000..e9ff2859 --- /dev/null +++ b/src/api/nitro/CreateLinkEvent.ts @@ -0,0 +1,6 @@ +import { GetNitroInstance } from './GetNitroInstance'; + +export function CreateLinkEvent(link: string): void +{ + GetNitroInstance().createLinkEvent(link); +} diff --git a/src/api/nitro/index.ts b/src/api/nitro/index.ts index 3cc66155..e13e5adb 100644 --- a/src/api/nitro/index.ts +++ b/src/api/nitro/index.ts @@ -1,6 +1,7 @@ export * from './AddLinkEventTracker'; export * from './avatar'; export * from './camera'; +export * from './CreateLinkEvent'; export * from './GetCommunication'; export * from './GetConfiguration'; export * from './GetConnection'; From 241348e5f2b8bd3f85f45771afe01d769c1633f8 Mon Sep 17 00:00:00 2001 From: Bill Date: Wed, 28 Jul 2021 16:33:23 -0400 Subject: [PATCH 14/66] Remove old files --- .../catalog/views/page/CatalogPageView.scss | 1 - .../page/header/CatalogPageHeaderView.scss | 3 -- .../page/header/CatalogPageHeaderView.tsx | 28 ------------------- .../header/CatalogPageHeaderView.types.ts | 6 ---- 4 files changed, 38 deletions(-) delete mode 100644 src/views/catalog/views/page/header/CatalogPageHeaderView.scss delete mode 100644 src/views/catalog/views/page/header/CatalogPageHeaderView.tsx delete mode 100644 src/views/catalog/views/page/header/CatalogPageHeaderView.types.ts diff --git a/src/views/catalog/views/page/CatalogPageView.scss b/src/views/catalog/views/page/CatalogPageView.scss index 8707eda9..7a00d29e 100644 --- a/src/views/catalog/views/page/CatalogPageView.scss +++ b/src/views/catalog/views/page/CatalogPageView.scss @@ -1,4 +1,3 @@ -@import './header/CatalogPageHeaderView'; @import './layout/CatalogLayout'; @import './offer/CatalogPageOfferView'; @import './offers/CatalogPageOffersView'; diff --git a/src/views/catalog/views/page/header/CatalogPageHeaderView.scss b/src/views/catalog/views/page/header/CatalogPageHeaderView.scss deleted file mode 100644 index 715ece65..00000000 --- a/src/views/catalog/views/page/header/CatalogPageHeaderView.scss +++ /dev/null @@ -1,3 +0,0 @@ -.nitro-catalog-page-header { - padding-top: $container-padding-x; -} diff --git a/src/views/catalog/views/page/header/CatalogPageHeaderView.tsx b/src/views/catalog/views/page/header/CatalogPageHeaderView.tsx deleted file mode 100644 index 0afa99a1..00000000 --- a/src/views/catalog/views/page/header/CatalogPageHeaderView.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { FC } from 'react'; -import { useCatalogContext } from '../../../context/CatalogContext'; -import { CatalogIconView } from '../../catalog-icon/CatalogIconView'; -import { CatalogPageHeaderViewProps } from './CatalogPageHeaderView.types'; - -export const CatalogPageHeaderView: FC = props => -{ - const { catalogState = null } = useCatalogContext(); - const { currentPage = null, pageParser = null } = catalogState; - - return ( -
-
-
- -
-
-
- { currentPage.localization } -
- { pageParser &&
- { pageParser.localization.texts[0] } -
} -
-
-
- ); -} diff --git a/src/views/catalog/views/page/header/CatalogPageHeaderView.types.ts b/src/views/catalog/views/page/header/CatalogPageHeaderView.types.ts deleted file mode 100644 index d98531eb..00000000 --- a/src/views/catalog/views/page/header/CatalogPageHeaderView.types.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ICatalogPageParser } from 'nitro-renderer'; - -export interface CatalogPageHeaderViewProps -{ - pageParser: ICatalogPageParser; -} From 63cf84d8725893a4ce1ef223e9f77b81d8ef2f95 Mon Sep 17 00:00:00 2001 From: Bill Date: Wed, 28 Jul 2021 20:13:40 -0400 Subject: [PATCH 15/66] Add buy one button --- src/views/catalog/CatalogView.tsx | 18 ++++++++++--- src/views/catalog/common/CatalogUtilities.ts | 26 +++++++++++++++++-- .../views/furni/InfoStandWidgetFurniView.tsx | 13 +++++++--- 3 files changed, 48 insertions(+), 9 deletions(-) diff --git a/src/views/catalog/CatalogView.tsx b/src/views/catalog/CatalogView.tsx index 0eb6346e..06d5e17d 100644 --- a/src/views/catalog/CatalogView.tsx +++ b/src/views/catalog/CatalogView.tsx @@ -18,7 +18,7 @@ export const CatalogView: FC = props => { const [ isVisible, setIsVisible ] = useState(false); const [ roomPreviewer, setRoomPreviewer ] = useState(null); - const [ pendingPageLookup, setPendingPageLookup ] = useState(null); + const [ pendingPageLookup, setPendingPageLookup ] = useState<{ value: string, isOffer: boolean }>(null); const [ pendingTree, setPendingTree ] = useState(null); const [ catalogState, dispatchCatalogState ] = useReducer(CatalogReducer, initialCatalog); const [ currentTab, setCurrentTab ] = useState(null); @@ -56,12 +56,24 @@ export const CatalogView: FC = props => case 'open': if(parts.length > 2) { - setPendingPageLookup(parts[2]); + if(parts.length === 4) + { + switch(parts[2]) + { + case 'offerId': + setPendingPageLookup({ value: parts[3], isOffer: true }); + + return; + } + } + + setPendingPageLookup({ value: parts[2], isOffer: false }); } else { setIsVisible(true); } + return; } }, []); @@ -101,7 +113,7 @@ export const CatalogView: FC = props => if(pendingPageLookup !== null) { - const tree = BuildCatalogPageTree(catalogState.root, pendingPageLookup); + const tree = BuildCatalogPageTree(catalogState.root, pendingPageLookup.value, pendingPageLookup.isOffer); setCurrentTab(tree.shift()); setPendingPageLookup(null); diff --git a/src/views/catalog/common/CatalogUtilities.ts b/src/views/catalog/common/CatalogUtilities.ts index 68a4beb8..dd7532a5 100644 --- a/src/views/catalog/common/CatalogUtilities.ts +++ b/src/views/catalog/common/CatalogUtilities.ts @@ -184,11 +184,33 @@ export function GetCatalogPageTreeById(page: ICatalogPageData, lookup: number, t } } -export function BuildCatalogPageTree(page: ICatalogPageData, lookup: string) +export function GetCatalogPageTreeByOfferId(page: ICatalogPageData, lookup: number, tree: ICatalogPageData[]) +{ + if(page.offerIds.indexOf(lookup) >= 0) return page; + + for(const pageData of page.children) + { + const foundPageData = GetCatalogPageTreeByOfferId(pageData, lookup, tree); + + if(foundPageData) + { + tree.push(pageData); + + return pageData; + } + } +} + +export function BuildCatalogPageTree(page: ICatalogPageData, lookup: string, isOffer: boolean = false) { const pageTree: ICatalogPageData[] = []; - if(isNaN((lookup as unknown) as number)) + if(isOffer) + { + GetCatalogPageTreeByOfferId(page, parseInt(lookup), pageTree); + } + + else if(isNaN((lookup as unknown) as number)) { GetCatalogPageTreeByName(page, lookup, pageTree); } diff --git a/src/views/room/widgets/infostand/views/furni/InfoStandWidgetFurniView.tsx b/src/views/room/widgets/infostand/views/furni/InfoStandWidgetFurniView.tsx index 7ffb7e30..1f1ea49e 100644 --- a/src/views/room/widgets/infostand/views/furni/InfoStandWidgetFurniView.tsx +++ b/src/views/room/widgets/infostand/views/furni/InfoStandWidgetFurniView.tsx @@ -1,5 +1,6 @@ import { CrackableDataType, RoomControllerLevel, RoomWidgetEnumItemExtradataParameter, RoomWidgetFurniInfoUsagePolicyEnum, StringDataType } from 'nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; +import { CreateLinkEvent } from '../../../../../../api'; import { LocalizeText } from '../../../../../../utils/LocalizeText'; import { BadgeImageView } from '../../../../../shared/badge-image/BadgeImageView'; import { LimitedEditionCompactPlateView } from '../../../../../shared/limited-edition/compact-plate/LimitedEditionCompactPlateView'; @@ -150,6 +151,9 @@ export const InfoStandWidgetFurniView: FC = props switch(action) { + case 'buy_one': + CreateLinkEvent(`catalog/open/offerId/${ furniData.purchaseOfferId }`); + return; case 'move': messageType = RoomWidgetFurniActionMessage.MOVE; break; @@ -198,6 +202,7 @@ export const InfoStandWidgetFurniView: FC = props
{ LocalizeText('furni.owner', [ 'name' ], [ furniData.ownerName ]) }
+ { (furniData.purchaseOfferId > 0) && } { isCrackable && <>
@@ -230,19 +235,19 @@ export const InfoStandWidgetFurniView: FC = props
{ canMove && - } { canRotate && - } { canUse && - } { (pickupMode !== PICKUP_MODE_NONE) && - } { ((furniSettingsKeys.length > 0 && furniSettingsValues.length > 0) && (furniSettingsKeys.length === furniSettingsValues.length)) && From 2961ef64ce3dc054d859aba49f5e8ea06a213c66 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 29 Jul 2021 01:37:41 -0400 Subject: [PATCH 16/66] Room settings update --- .../navigator/common/RoomSettingsData.ts | 54 ++++++------ .../navigator/common/RoomSettingsUtils.ts | 11 +++ .../NavigatorRoomSettingsView.scss | 4 + .../NavigatorRoomSettingsView.tsx | 86 +++++++------------ .../NavigatorRoomSettingsBasicTabView.tsx | 49 ++++------- 5 files changed, 92 insertions(+), 112 deletions(-) create mode 100644 src/views/navigator/common/RoomSettingsUtils.ts diff --git a/src/views/navigator/common/RoomSettingsData.ts b/src/views/navigator/common/RoomSettingsData.ts index 95837d6a..1f5133bd 100644 --- a/src/views/navigator/common/RoomSettingsData.ts +++ b/src/views/navigator/common/RoomSettingsData.ts @@ -1,3 +1,5 @@ +import { RoomSettingsParser } from 'nitro-renderer'; + export default class RoomSettingsData { public roomId: number; @@ -35,40 +37,42 @@ export default class RoomSettingsData public bannedUsers: Map; public selectedUserToUnban: number; - constructor() + constructor(parser: RoomSettingsParser) { - this.roomId = 0; - this.roomName = null; - this.roomOriginalName = null; - this.roomDescription = null; - this.categoryId = 0; - this.userCount = 0; - this.tags = []; - this.tradeState = 0; - this.allowWalkthrough = false; + if(!parser) throw new Error('invalid_parser'); - this.lockState = 0; - this.originalLockState = 0; + this.roomId = parser.roomId; + this.roomName = parser.name; + this.roomOriginalName = parser.name; + this.roomDescription = parser.description; + this.categoryId = parser.categoryId; + this.userCount = parser.userCount; + this.tags = parser.tags; + this.tradeState = parser.tradeMode; + this.allowWalkthrough = parser.allowWalkthrough; + + this.lockState = parser.state; + this.originalLockState = parser.state; this.password = null; this.confirmPassword = null; - this.allowPets = false; - this.allowPetsEat = false; + this.allowPets = parser.allowPets; + this.allowPetsEat = parser.allowPetsEat; this.usersWithRights = new Map(); this.friendsWithoutRights = new Map(); - this.hideWalls = false; - this.wallThickness = 0; - this.floorThickness = 0; - this.chatBubbleMode = 0; - this.chatBubbleWeight = 0; - this.chatBubbleSpeed = 0; - this.chatFloodProtection = 0; - this.chatDistance = 0; + this.hideWalls = parser.hideWalls; + this.wallThickness = parser.thicknessWall; + this.floorThickness = parser.thicknessFloor; + this.chatBubbleMode = parser.chatSettings.mode; + this.chatBubbleWeight = parser.chatSettings.weight; + this.chatBubbleSpeed = parser.chatSettings.speed; + this.chatFloodProtection = parser.chatSettings.protection; + this.chatDistance = parser.chatSettings.distance; - this.muteState = 0; - this.kickState = 0; - this.banState = 0; + this.muteState = parser.moderationSettings.allowMute; + this.kickState = parser.moderationSettings.allowKick; + this.banState = parser.moderationSettings.allowBan; this.bannedUsers = new Map(); this.selectedUserToUnban = 0; } diff --git a/src/views/navigator/common/RoomSettingsUtils.ts b/src/views/navigator/common/RoomSettingsUtils.ts new file mode 100644 index 00000000..567c54fe --- /dev/null +++ b/src/views/navigator/common/RoomSettingsUtils.ts @@ -0,0 +1,11 @@ +export function GetMaxVisitorsList(): number[] +{ + const list: number[] = []; + + for(let i = 10; i <= 100; i = i + 10) + { + list.push(i); + } + + return list; +} diff --git a/src/views/navigator/views/room-settings/NavigatorRoomSettingsView.scss b/src/views/navigator/views/room-settings/NavigatorRoomSettingsView.scss index ac5adf97..44e545c0 100644 --- a/src/views/navigator/views/room-settings/NavigatorRoomSettingsView.scss +++ b/src/views/navigator/views/room-settings/NavigatorRoomSettingsView.scss @@ -1,3 +1,7 @@ .nitro-room-settings { width: 400px; + + .content-area { + height: 350px; + } } diff --git a/src/views/navigator/views/room-settings/NavigatorRoomSettingsView.tsx b/src/views/navigator/views/room-settings/NavigatorRoomSettingsView.tsx index c9fe09a0..01a87297 100644 --- a/src/views/navigator/views/room-settings/NavigatorRoomSettingsView.tsx +++ b/src/views/navigator/views/room-settings/NavigatorRoomSettingsView.tsx @@ -30,70 +30,42 @@ export const NavigatorRoomSettingsView: FC<{}> = props => { const parser = event.getParser(); - const roomSettingsData = new RoomSettingsData(); + if(!parser) return; - roomSettingsData.roomId = parser.roomId; - roomSettingsData.roomName = parser.name; - roomSettingsData.roomOriginalName = parser.name; - roomSettingsData.roomDescription = parser.description; - roomSettingsData.categoryId = parser.categoryId; - roomSettingsData.userCount = parser.userCount; - roomSettingsData.tradeState = parser.tradeMode; - roomSettingsData.allowWalkthrough = parser.allowWalkthrough; - - roomSettingsData.lockState = parser.state; - roomSettingsData.originalLockState = parser.state; - roomSettingsData.allowPets = parser.allowPets; - - roomSettingsData.hideWalls = parser.hideWalls; - roomSettingsData.wallThickness = parser.thicknessWall; - roomSettingsData.floorThickness = parser.thicknessFloor; - roomSettingsData.chatBubbleMode = parser.chatSettings.mode; - roomSettingsData.chatBubbleWeight = parser.chatSettings.weight; - roomSettingsData.chatBubbleSpeed = parser.chatSettings.speed; - roomSettingsData.chatFloodProtection = parser.chatSettings.protection; - roomSettingsData.chatDistance = parser.chatSettings.distance; - - roomSettingsData.muteState = parser.moderationSettings.allowMute; - roomSettingsData.kickState = parser.moderationSettings.allowKick; - roomSettingsData.banState = parser.moderationSettings.allowBan; - - setRoomSettingsData(roomSettingsData); + setRoomSettingsData(new RoomSettingsData(parser)); }, []); CreateMessageHook(RoomSettingsEvent, onRoomSettingsEvent); const save = useCallback(() => { - console.log('save', roomSettingsData) - const composer = new SaveRoomSettingsComposer( - roomSettingsData.roomId, - roomSettingsData.roomName, - roomSettingsData.roomDescription, - roomSettingsData.lockState, - roomSettingsData.password, - roomSettingsData.userCount, - roomSettingsData.categoryId, - roomSettingsData.tags.length, - roomSettingsData.tags, - roomSettingsData.tradeState, - roomSettingsData.allowPets, - roomSettingsData.allowPetsEat, - roomSettingsData.allowWalkthrough, - roomSettingsData.hideWalls, - roomSettingsData.wallThickness, - roomSettingsData.floorThickness, - roomSettingsData.muteState, - roomSettingsData.kickState, - roomSettingsData.banState, - roomSettingsData.chatBubbleMode, - roomSettingsData.chatBubbleWeight, - roomSettingsData.chatBubbleSpeed, - roomSettingsData.chatDistance, - roomSettingsData.chatFloodProtection - ); - - SendMessageHook(composer); + SendMessageHook( + new SaveRoomSettingsComposer( + roomSettingsData.roomId, + roomSettingsData.roomName, + roomSettingsData.roomDescription, + roomSettingsData.lockState, + roomSettingsData.password, + roomSettingsData.userCount, + roomSettingsData.categoryId, + roomSettingsData.tags.length, + roomSettingsData.tags, + roomSettingsData.tradeState, + roomSettingsData.allowPets, + roomSettingsData.allowPetsEat, + roomSettingsData.allowWalkthrough, + roomSettingsData.hideWalls, + roomSettingsData.wallThickness, + roomSettingsData.floorThickness, + roomSettingsData.muteState, + roomSettingsData.kickState, + roomSettingsData.banState, + roomSettingsData.chatBubbleMode, + roomSettingsData.chatBubbleWeight, + roomSettingsData.chatBubbleSpeed, + roomSettingsData.chatDistance, + roomSettingsData.chatFloodProtection + )); }, [ roomSettingsData ]); const processAction = useCallback((action: string) => diff --git a/src/views/navigator/views/room-settings/views/tab-basic/NavigatorRoomSettingsBasicTabView.tsx b/src/views/navigator/views/room-settings/views/tab-basic/NavigatorRoomSettingsBasicTabView.tsx index 1a362e82..e63d9b60 100644 --- a/src/views/navigator/views/room-settings/views/tab-basic/NavigatorRoomSettingsBasicTabView.tsx +++ b/src/views/navigator/views/room-settings/views/tab-basic/NavigatorRoomSettingsBasicTabView.tsx @@ -1,36 +1,20 @@ -import { FC, useCallback, useEffect, useState } from 'react'; +import { FC, useCallback, useState } from 'react'; import { LocalizeText } from '../../../../../../utils/LocalizeText'; -import RoomSettingsData from '../../../../common/RoomSettingsData'; +import { GetMaxVisitorsList } from '../../../../common/RoomSettingsUtils'; import { useNavigatorContext } from '../../../../context/NavigatorContext'; import { NavigatorRoomSettingsTabViewProps } from '../../NavigatorRoomSettingsView.types'; export const NavigatorRoomSettingsBasicTabView: FC = props => { const { roomSettingsData = null, setRoomSettingsData = null, onSave = null } = props; - + const [ maxVisitorsList, setMaxVisitorsList ] = useState(GetMaxVisitorsList()); const { navigatorState = null } = useNavigatorContext(); const { categories = null } = navigatorState; - const [ maxVisitorsList, setMaxVisitorsList ] = useState(null); - - useEffect(() => - { - if(!maxVisitorsList) - { - const list = []; - - for(let i = 10; i <= 100; i = i + 10) - { - list.push(i); - } - - setMaxVisitorsList(list); - } - }, [ maxVisitorsList ]); - const handleChange = useCallback((field: string, value: string | number | boolean) => { - const roomSettings = ({...roomSettingsData} as RoomSettingsData); + const roomSettings = Object.assign({}, roomSettingsData); + let save = true; switch(field) @@ -66,15 +50,15 @@ export const NavigatorRoomSettingsBasicTabView: FC
- handleChange('name', e.target.value) } onBlur={ onSave } /> + handleChange('name', event.target.value) } onBlur={ onSave } />
- handleChange('description', e.target.value) } onBlur={ () => onSave() } /> + handleChange('description', event.target.value) } onBlur={ onSave } />
- handleChange('category', event.target.value) }> { categories && categories.map(category => { return @@ -83,7 +67,7 @@ export const NavigatorRoomSettingsBasicTabView: FC
- handleChange('max_visitors', event.target.value) }> { maxVisitorsList && maxVisitorsList.map(value => { return @@ -92,16 +76,21 @@ export const NavigatorRoomSettingsBasicTabView: FC
- handleChange('trade_state', event.target.value) }> + + +
- handleChange('allow_walkthrough', e.target.checked) } /> + handleChange('allow_walkthrough', event.target.checked) } />
+
+ +
); }; From b200e939689d57417ccac19d4e532654192edf83 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 29 Jul 2021 02:03:30 -0400 Subject: [PATCH 17/66] Catalog remember last opened page --- src/views/catalog/CatalogView.tsx | 36 +++++++++++++++---- .../navigation/CatalogNavigationView.tsx | 6 ++-- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/src/views/catalog/CatalogView.tsx b/src/views/catalog/CatalogView.tsx index 06d5e17d..59dd05cb 100644 --- a/src/views/catalog/CatalogView.tsx +++ b/src/views/catalog/CatalogView.tsx @@ -11,7 +11,7 @@ import { CatalogMode, CatalogViewProps } from './CatalogView.types'; import { BuildCatalogPageTree } from './common/CatalogUtilities'; import { CatalogContextProvider } from './context/CatalogContext'; import { CatalogReducer, initialCatalog } from './reducers/CatalogReducer'; -import { CatalogNavigationView } from './views/navigation/CatalogNavigationView'; +import { ACTIVE_PAGES, CatalogNavigationView } from './views/navigation/CatalogNavigationView'; import { CatalogPageView } from './views/page/CatalogPageView'; export const CatalogView: FC = props => @@ -20,25 +20,37 @@ export const CatalogView: FC = props => const [ roomPreviewer, setRoomPreviewer ] = useState(null); const [ pendingPageLookup, setPendingPageLookup ] = useState<{ value: string, isOffer: boolean }>(null); const [ pendingTree, setPendingTree ] = useState(null); + const [ pendingOpenTree, setPendingOpenTree ] = useState(null); const [ catalogState, dispatchCatalogState ] = useReducer(CatalogReducer, initialCatalog); const [ currentTab, setCurrentTab ] = useState(null); const { root = null, pageParser = null, activeOffer = null, searchResult = null} = catalogState; + const saveActivePages = useCallback(() => + { + setPendingOpenTree(ACTIVE_PAGES.slice()); + }, []); + const onCatalogEvent = useCallback((event: CatalogEvent) => { + let save = false; + switch(event.type) { case CatalogEvent.SHOW_CATALOG: setIsVisible(true); return; case CatalogEvent.HIDE_CATALOG: + save = true; setIsVisible(false); return; case CatalogEvent.TOGGLE_CATALOG: + save = true; setIsVisible(value => !value); return; } - }, []); + + if(save) saveActivePages(); + }, [ saveActivePages ]); useUiEvent(CatalogEvent.SHOW_CATALOG, onCatalogEvent); useUiEvent(CatalogEvent.HIDE_CATALOG, onCatalogEvent); @@ -88,7 +100,7 @@ export const CatalogView: FC = props => AddEventLinkTracker(linkTracker); return () => RemoveLinkEventTracker(linkTracker); - }, [ linkReceived]); + }, [ linkReceived ]); useEffect(() => { @@ -111,11 +123,21 @@ export const CatalogView: FC = props => return; } - if(pendingPageLookup !== null) + if(pendingPageLookup !== null || pendingOpenTree) { - const tree = BuildCatalogPageTree(catalogState.root, pendingPageLookup.value, pendingPageLookup.isOffer); + let tree: ICatalogPageData[] = []; + + if(pendingPageLookup !== null) + { + tree = BuildCatalogPageTree(catalogState.root, pendingPageLookup.value, pendingPageLookup.isOffer); + } + else + { + tree = pendingOpenTree.slice(); + } setCurrentTab(tree.shift()); + setPendingOpenTree(null); setPendingPageLookup(null); setPendingTree(tree); } @@ -137,7 +159,7 @@ export const CatalogView: FC = props => }); } } - }, [ isVisible, pendingPageLookup, catalogState.root, setCurrentTab ]); + }, [ isVisible, pendingPageLookup, pendingOpenTree, catalogState.root, setCurrentTab ]); useEffect(() => { @@ -169,7 +191,7 @@ export const CatalogView: FC = props => { isVisible && - setIsVisible(false) } /> + { saveActivePages(); setIsVisible(false); } } /> { root && root.children.length && root.children.map((page, index) => { diff --git a/src/views/catalog/views/navigation/CatalogNavigationView.tsx b/src/views/catalog/views/navigation/CatalogNavigationView.tsx index d185f223..98c1bef3 100644 --- a/src/views/catalog/views/navigation/CatalogNavigationView.tsx +++ b/src/views/catalog/views/navigation/CatalogNavigationView.tsx @@ -4,7 +4,7 @@ import { CatalogSearchView } from '../search/CatalogSearchView'; import { CatalogNavigationViewProps } from './CatalogNavigationView.types'; import { CatalogNavigationSetView } from './set/CatalogNavigationSetView'; -export const ACTIVE_PAGES: ICatalogPageData[] = []; +export let ACTIVE_PAGES: ICatalogPageData[] = []; export const CatalogNavigationView: FC = props => { @@ -14,11 +14,11 @@ export const CatalogNavigationView: FC = props => { if(!page) return; - const index = (ACTIVE_PAGES.push(page) - 1); + ACTIVE_PAGES = [ page ]; return () => { - ACTIVE_PAGES.splice(index, 1); + ACTIVE_PAGES = []; } }, [ page ]); From 6e6735eefffc757ae260cd4647e198977dbcd60e Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 29 Jul 2021 03:38:27 -0400 Subject: [PATCH 18/66] Update catalog frontpage layout --- .../page/layout/frontpage4/CatalogLayoutFrontpage4View.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/views/catalog/views/page/layout/frontpage4/CatalogLayoutFrontpage4View.tsx b/src/views/catalog/views/page/layout/frontpage4/CatalogLayoutFrontpage4View.tsx index f08ad046..003073a2 100644 --- a/src/views/catalog/views/page/layout/frontpage4/CatalogLayoutFrontpage4View.tsx +++ b/src/views/catalog/views/page/layout/frontpage4/CatalogLayoutFrontpage4View.tsx @@ -19,6 +19,9 @@ export const CatalogLayoutFrontpage4View: FC = case CatalogFrontPageItem.ITEM_CATALOGUE_PAGE: CreateLinkEvent(`catalog/open/${ item.catalogPageLocation }`); return; + case CatalogFrontPageItem.ITEM_PRODUCT_OFFER: + CreateLinkEvent(`catalog/open/${ item.productOfferId }`); + return; } }, []); From b934b62e40e729340e34fc3ad74768746f6d286e Mon Sep 17 00:00:00 2001 From: Bill Date: Fri, 30 Jul 2021 15:13:14 -0400 Subject: [PATCH 19/66] Update config --- public/index.html | 2 +- public/renderer-config.json | 118 ++++++++++++++++++ public/{configuration.json => ui-config.json} | 116 ----------------- 3 files changed, 119 insertions(+), 117 deletions(-) create mode 100644 public/renderer-config.json rename public/{configuration.json => ui-config.json} (71%) diff --git a/public/index.html b/public/index.html index 7893ce58..f40b6252 100644 --- a/public/index.html +++ b/public/index.html @@ -18,7 +18,7 @@
diff --git a/public/renderer-config.json b/public/renderer-config.json new file mode 100644 index 00000000..526339e0 --- /dev/null +++ b/public/renderer-config.json @@ -0,0 +1,118 @@ +{ + "socket.url": "wss://ws.nitrots.co:2096", + "asset.url": "https://nitro.nitrots.co", + "image.library.url": "https://swf.nitrots.co/c_images/", + "hof.furni.url": "https://swf.nitrots.co/dcr/hof_furni", + "images.url": "${asset.url}/images", + "gamedata.url": "${asset.url}/gamedata", + "sounds.url": "${asset.url}/sounds", + "external.texts.url": "${gamedata.url}/json/ExternalTexts.json", + "external.samples.url": "${hof.furni.url}/mp3/sound_machine_sample_%sample%.mp3", + "furnidata.url": "${gamedata.url}/json/FurnitureData.json", + "productdata.url": "${gamedata.url}/json/ProductData.json", + "avatar.actions.url": "${gamedata.url}/json/HabboAvatarActions.json", + "avatar.figuredata.url": "${gamedata.url}/habbo/figuredata.xml", + "avatar.figuremap.url": "${gamedata.url}/json/FigureMap.json", + "avatar.effectmap.url": "${gamedata.url}/json/EffectMap.json", + "avatar.asset.url": "${asset.url}/bundled/figure/%libname%.nitro", + "avatar.asset.effect.url": "${asset.url}/bundled/effect/%libname%.nitro", + "furni.asset.url": "${asset.url}/bundled/furniture/%libname%.nitro", + "furni.asset.icon.url": "${hof.furni.url}/icons/%libname%%param%_icon.png", + "pet.asset.url": "${asset.url}/bundled/pet/%libname%.nitro", + "room.asset.url": "${asset.url}/room/%libname%/%libname%.json", + "badge.asset.url": "${image.library.url}album1584/%badgename%.gif", + "badge.asset.group.url": "${asset.url}/group-badge/%badgedata%", + "furni.rotation.bounce.steps": 20, + "furni.rotation.bounce.height": 0.0625, + "system.animation.fps": 24, + "system.limits.fps": false, + "system.dispatcher.log": false, + "system.packet.log": false, + "system.pong.manually": true, + "system.pong.interval.ms": 20000, + "avatar.mandatory.libraries": [ + "bd:1", + "li:0" + ], + "avatar.mandatory.effect.libraries": [ + "dance.1", + "dance.2", + "dance.3", + "dance.4" + ], + "avatar.default.figuredata": " DDDDDD FAFAFA EEEEEE FA3831 FD92A0 2AC7D2 35332C EFFF92 C6FF98 FF925A 9D597E B6F3FF 6DFF33 3378C9 FFB631 DFA1E9 F9FB32 CAAF8F C5C6C5 47623D 8A8361 FF8C33 54C627 1E6C99 984F88 77C8FF FFC08E 3C4B87 7C2C47 D7FFE3 8F3F1C FF6393 1F9B79 FDFF33 ", + "avatar.default.actions": { + "actions": [ + { + "id": "Default", + "state": "std", + "precedence": 1000, + "main": true, + "isDefault": true, + "geometryType": "vertical", + "activePartSet": "figure", + "assetPartDefinition": "std" + } + ] + }, + "pet.types": [ + "dog", + "cat", + "croco", + "terrier", + "bear", + "pig", + "lion", + "rhino", + "spider", + "turtle", + "chicken", + "frog", + "dragon", + "monster", + "monkey", + "horse", + "monsterplant", + "bunnyeaster", + "bunnyevil", + "bunnydepressed", + "bunnylove", + "pigeongood", + "pigeonevil", + "demonmonkey", + "bearbaby", + "terrierbaby", + "gnome", + "gnome", + "kittenbaby", + "puppybaby", + "pigletbaby", + "haloompa", + "fools", + "pterosaur", + "velociraptor", + "cow", + "LeetPen", + "bbwibb", + "elephants" + ], + "preload.assets.urls": [ + "${images.url}/additions/user_blowkiss.png", + "${images.url}/additions/user_idle_left_1.png", + "${images.url}/additions/user_idle_left_2.png", + "${images.url}/additions/user_idle_right_1.png", + "${images.url}/additions/user_idle_right_2.png", + "${images.url}/additions/user_muted.png", + "${images.url}/additions/user_muted_small.png", + "${images.url}/additions/user_typing.png", + "${images.url}/additions/number_1.png", + "${images.url}/additions/number_2.png", + "${images.url}/additions/number_3.png", + "${images.url}/additions/number_4.png", + "${images.url}/additions/number_5.png", + "${images.url}/additions/pet_experience_bubble.png", + "${images.url}/loading_icon.png", + "${images.url}/clear_icon.png", + "${images.url}/big_arrow.png" + ] +} diff --git a/public/configuration.json b/public/ui-config.json similarity index 71% rename from public/configuration.json rename to public/ui-config.json index 5108b080..38b42a25 100644 --- a/public/configuration.json +++ b/public/ui-config.json @@ -1,24 +1,7 @@ { - "socket.url": "wss://ws.nitrots.co:2096", - "asset.url": "https://nitro.nitrots.co", - "image.library.url": "https://swf.nitrots.co/c_images/", - "external.samples.url": "https://swf.nitrots.co/dcr/hof_furni/mp3/sound_machine_sample_%sample%.mp3", "image.library.notifications.url": "${image.library.url}notifications/%image%.png", "achievements.images.url": "${image.library.url}Quests/%image%.png", "thumbnails.url": "${image.library.url}camera/thumbnails/%thumbnail%.png", - "images.url": "${asset.url}/images", - "gamedata.url": "${asset.url}/gamedata", - "sounds.url": "${asset.url}/sounds", - "external.texts.url": "${gamedata.url}/json/ExternalTexts.json", - "furnidata.url": "https://nitro.nitrots.co/gamedata/json/FurnitureData.json", - "productdata.url": "https://nitro.nitrots.co/gamedata/json/ProductData.json", - "avatar.actions.url": "${gamedata.url}/json/HabboAvatarActions.json", - "avatar.figuredata.url": "${gamedata.url}/habbo/figuredata.xml", - "avatar.figuremap.url": "${gamedata.url}/json/FigureMap.json", - "avatar.effectmap.url": "${gamedata.url}/json/EffectMap.json", - "avatar.asset.url": "${asset.url}/bundled/figure/%libname%.nitro", - "avatar.asset.effect.url": "${asset.url}/bundled/effect/%libname%.nitro", - "furni.extras.url": "${asset.url}/images/furniextras/%image%.png", "url.prefix": "http://localhost:3000", "chat.viewer.height.percentage": 0.40, "auth.system.enabled": true, @@ -108,77 +91,12 @@ "avatareditor.show.clubitems.dimmed": true, "avatareditor.show.clubitems.first": true, "chat.history.max.items": 100, - "furni.rotation.bounce.steps": 20, - "furni.rotation.bounce.height": 0.0625, - "animation.fps": 24, - "limits.fps": false, - "system.dispatcher.log": false, "system.currency.types": [ -1, 0, 5, 101 ], - "communication.packet.log": false, - "communication.pong.manually": true, - "communication.pong.interval.ms": 20000, - "avatar.mandatory.libraries": [ - "bd:1", - "li:0" - ], - "avatar.mandatory.effect.libraries": [ - "dance.1", - "dance.2", - "dance.3", - "dance.4" - ], - "pet.asset.url": "${asset.url}/bundled/pet/%libname%.nitro", - "pet.types": [ - "dog", - "cat", - "croco", - "terrier", - "bear", - "pig", - "lion", - "rhino", - "spider", - "turtle", - "chicken", - "frog", - "dragon", - "monster", - "monkey", - "horse", - "monsterplant", - "bunnyeaster", - "bunnyevil", - "bunnydepressed", - "bunnylove", - "pigeongood", - "pigeonevil", - "demonmonkey", - "bearbaby", - "terrierbaby", - "gnome", - "gnome", - "kittenbaby", - "puppybaby", - "pigletbaby", - "haloompa", - "fools", - "pterosaur", - "velociraptor", - "cow", - "LeetPen", - "bbwibb", - "elephants" - ], - "furni.asset.url": "${asset.url}/bundled/furniture/%libname%.nitro", - "furni.asset.icon.url": "https://swf.nitrots.co/dcr/hof_furni/icons/%libname%%param%_icon.png", - "room.asset.url": "${asset.url}/room/%libname%/%libname%.json", - "badge.asset.url": "${image.library.url}album1584/%badgename%.gif", - "badge.asset.group.url": "${asset.url}/group-badge/%badgedata%", "currency.asset.icon.url": "${images.url}/wallet/%type%.png", "catalog.asset.url": "${image.library.url}catalogue", "catalog.asset.image.url": "${catalog.asset.url}/%name%.gif", @@ -1141,39 +1059,5 @@ "minLevel": 10, "enabled": true } - ], - "avatar.default.figuredata": " DDDDDD FAFAFA EEEEEE FA3831 FD92A0 2AC7D2 35332C EFFF92 C6FF98 FF925A 9D597E B6F3FF 6DFF33 3378C9 FFB631 DFA1E9 F9FB32 CAAF8F C5C6C5 47623D 8A8361 FF8C33 54C627 1E6C99 984F88 77C8FF FFC08E 3C4B87 7C2C47 D7FFE3 8F3F1C FF6393 1F9B79 FDFF33 ", - "avatar.default.actions": { - "actions": [ - { - "id": "Default", - "state": "std", - "precedence": 1000, - "main": true, - "isDefault": true, - "geometryType": "vertical", - "activePartSet": "figure", - "assetPartDefinition": "std" - } - ] - }, - "preload.assets.urls": [ - "${images.url}/additions/user_blowkiss.png", - "${images.url}/additions/user_idle_left_1.png", - "${images.url}/additions/user_idle_left_2.png", - "${images.url}/additions/user_idle_right_1.png", - "${images.url}/additions/user_idle_right_2.png", - "${images.url}/additions/user_muted.png", - "${images.url}/additions/user_muted_small.png", - "${images.url}/additions/user_typing.png", - "${images.url}/additions/number_1.png", - "${images.url}/additions/number_2.png", - "${images.url}/additions/number_3.png", - "${images.url}/additions/number_4.png", - "${images.url}/additions/number_5.png", - "${images.url}/additions/pet_experience_bubble.png", - "${images.url}/loading_icon.png", - "${images.url}/clear_icon.png", - "${images.url}/big_arrow.png" ] } From 4ac15950f531d366dae6d3199099021ad44da201 Mon Sep 17 00:00:00 2001 From: Bill Date: Fri, 30 Jul 2021 15:43:11 -0400 Subject: [PATCH 20/66] Add camera option --- .../widgets/camera/views/capture/CameraWidgetCaptureView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/room/widgets/camera/views/capture/CameraWidgetCaptureView.tsx b/src/views/room/widgets/camera/views/capture/CameraWidgetCaptureView.tsx index 733a1eb4..086081e1 100644 --- a/src/views/room/widgets/camera/views/capture/CameraWidgetCaptureView.tsx +++ b/src/views/room/widgets/camera/views/capture/CameraWidgetCaptureView.tsx @@ -30,7 +30,7 @@ export const CameraWidgetCaptureView: FC = props = const rectangle = new NitroRectangle(Math.floor(frameBounds.x), Math.floor(frameBounds.y), Math.floor(frameBounds.width), Math.floor(frameBounds.height)); - const image = GetRoomEngine().createRoomScreenshot(GetRoomSession().roomId, 1, rectangle); + const image = GetRoomEngine().createRoomScreenshot(GetRoomSession().roomId, 1, rectangle, true); if(cameraWidgetContext.cameraRoll.length + 1 === CAMERA_ROLL_LIMIT) { From cb448149367932ed0fbcfdf224589c133fe310fa Mon Sep 17 00:00:00 2001 From: Bill Date: Fri, 30 Jul 2021 20:10:34 -0400 Subject: [PATCH 21/66] Add room thumbnail --- public/ui-config.json | 2 +- .../views/camera/RoomThumbnailWidgetCameraView.tsx | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/public/ui-config.json b/public/ui-config.json index 38b42a25..5057190c 100644 --- a/public/ui-config.json +++ b/public/ui-config.json @@ -1,7 +1,7 @@ { "image.library.notifications.url": "${image.library.url}notifications/%image%.png", "achievements.images.url": "${image.library.url}Quests/%image%.png", - "thumbnails.url": "${image.library.url}camera/thumbnails/%thumbnail%.png", + "thumbnails.url": "https://nitro.nitrots.co/camera/thumbnail/%thumbnail%.png", "url.prefix": "http://localhost:3000", "chat.viewer.height.percentage": 0.40, "auth.system.enabled": true, diff --git a/src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.tsx b/src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.tsx index ffe7439d..05a9e156 100644 --- a/src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.tsx +++ b/src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.tsx @@ -19,9 +19,8 @@ export const RoomThumbnailWidgetCameraView: FC Date: Tue, 3 Aug 2021 16:35:47 -0400 Subject: [PATCH 22/66] Fix screenshot command --- src/views/room/handlers/RoomWidgetChatInputHandler.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/views/room/handlers/RoomWidgetChatInputHandler.ts b/src/views/room/handlers/RoomWidgetChatInputHandler.ts index 31b4e797..1b21ff2d 100644 --- a/src/views/room/handlers/RoomWidgetChatInputHandler.ts +++ b/src/views/room/handlers/RoomWidgetChatInputHandler.ts @@ -1,4 +1,4 @@ -import { AvatarExpressionEnum, HabboClubLevelEnum, NitroEvent, RoomControllerLevel, RoomSessionChatEvent, RoomSettingsComposer, RoomWidgetEnum, RoomZoomEvent } from 'nitro-renderer'; +import { AvatarExpressionEnum, HabboClubLevelEnum, NitroEvent, RoomControllerLevel, RoomSessionChatEvent, RoomSettingsComposer, RoomWidgetEnum, RoomZoomEvent, TextureUtils } from 'nitro-renderer'; import { GetRoomEngine, GetSessionDataManager } from '../../../api'; import { SendMessageHook } from '../../../hooks/messages'; import { RoomWidgetFloodControlEvent, RoomWidgetUpdateEvent } from '../events'; @@ -114,8 +114,11 @@ export class RoomWidgetChatInputHandler extends RoomWidgetHandler return null; case ':screenshot': - GetRoomEngine().createRoomScreenshot(this.container.roomSession.roomId, 1); - + const texture = GetRoomEngine().createTextureFromRoom(this.container.roomSession.roomId, 1); + + const newWindow = window.open(''); + + newWindow.document.write(TextureUtils.generateImageUrl(texture)); return null; case ':pickall': // this.container.notificationService.alertWithConfirm('${room.confirm.pick_all}', '${generic.alert.title}', () => From 4079d1d92df6b6c1444dab261914a735a8872765 Mon Sep 17 00:00:00 2001 From: Bill Date: Tue, 3 Aug 2021 16:41:44 -0400 Subject: [PATCH 23/66] Fix for now --- .../widgets/camera/views/capture/CameraWidgetCaptureView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/room/widgets/camera/views/capture/CameraWidgetCaptureView.tsx b/src/views/room/widgets/camera/views/capture/CameraWidgetCaptureView.tsx index 086081e1..659541ca 100644 --- a/src/views/room/widgets/camera/views/capture/CameraWidgetCaptureView.tsx +++ b/src/views/room/widgets/camera/views/capture/CameraWidgetCaptureView.tsx @@ -30,7 +30,7 @@ export const CameraWidgetCaptureView: FC = props = const rectangle = new NitroRectangle(Math.floor(frameBounds.x), Math.floor(frameBounds.y), Math.floor(frameBounds.width), Math.floor(frameBounds.height)); - const image = GetRoomEngine().createRoomScreenshot(GetRoomSession().roomId, 1, rectangle, true); + const texture = GetRoomEngine().createTextureFromRoom(GetRoomSession().roomId, 1, rectangle); if(cameraWidgetContext.cameraRoll.length + 1 === CAMERA_ROLL_LIMIT) { @@ -44,7 +44,7 @@ export const CameraWidgetCaptureView: FC = props = remainingRoll = remainingRoll.slice(0, CAMERA_ROLL_LIMIT - 1); } - cameraWidgetContext.setCameraRoll([ ...remainingRoll, image ]); + //cameraWidgetContext.setCameraRoll([ ...remainingRoll, image ]); }, [ cameraWidgetContext ]); const processAction = useCallback((type: string, value: string | number = null) => From 728d8c4f4b2e788634937a898957201c2ddf9c49 Mon Sep 17 00:00:00 2001 From: Bill Date: Tue, 3 Aug 2021 16:44:07 -0400 Subject: [PATCH 24/66] Another fix --- .../views/camera/RoomThumbnailWidgetCameraView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.tsx b/src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.tsx index 05a9e156..3aa7c760 100644 --- a/src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.tsx +++ b/src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.tsx @@ -19,7 +19,7 @@ export const RoomThumbnailWidgetCameraView: FC Date: Tue, 3 Aug 2021 17:01:59 -0400 Subject: [PATCH 25/66] Update renderer config for JSON figuredata --- .vscode/settings.json | 3 ++- public/renderer-config.json | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index b0a56f10..55370fd0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,7 +6,8 @@ "typescript.format.placeOpenBraceOnNewLineForFunctions": true, "editor.codeActionsOnSave": { "source.fixAll": true, - "source.organizeImports": true, + "source.fixAll.sortJSON": false, + "source.organizeImports": true }, "emmet.showExpandedAbbreviation": "never", "git.ignoreLimitWarning": true, diff --git a/public/renderer-config.json b/public/renderer-config.json index 526339e0..8ba7ec7e 100644 --- a/public/renderer-config.json +++ b/public/renderer-config.json @@ -11,7 +11,7 @@ "furnidata.url": "${gamedata.url}/json/FurnitureData.json", "productdata.url": "${gamedata.url}/json/ProductData.json", "avatar.actions.url": "${gamedata.url}/json/HabboAvatarActions.json", - "avatar.figuredata.url": "${gamedata.url}/habbo/figuredata.xml", + "avatar.figuredata.url": "${gamedata.url}/json/FigureData.json", "avatar.figuremap.url": "${gamedata.url}/json/FigureMap.json", "avatar.effectmap.url": "${gamedata.url}/json/EffectMap.json", "avatar.asset.url": "${asset.url}/bundled/figure/%libname%.nitro", @@ -40,7 +40,7 @@ "dance.3", "dance.4" ], - "avatar.default.figuredata": " DDDDDD FAFAFA EEEEEE FA3831 FD92A0 2AC7D2 35332C EFFF92 C6FF98 FF925A 9D597E B6F3FF 6DFF33 3378C9 FFB631 DFA1E9 F9FB32 CAAF8F C5C6C5 47623D 8A8361 FF8C33 54C627 1E6C99 984F88 77C8FF FFC08E 3C4B87 7C2C47 D7FFE3 8F3F1C FF6393 1F9B79 FDFF33 ", + "avatar.default.figuredata": {"palettes":[{"id":1,"colors":[{"id":99999,"index":1001,"club":0,"selectable":false,"hexCode":"DDDDDD"},{"id":99998,"index":1001,"club":0,"selectable":false,"hexCode":"FAFAFA"}]},{"id":3,"colors":[{"id":10001,"index":1001,"club":0,"selectable":false,"hexCode":"EEEEEE"},{"id":10002,"index":1002,"club":0,"selectable":false,"hexCode":"FA3831"},{"id":10003,"index":1003,"club":0,"selectable":false,"hexCode":"FD92A0"},{"id":10004,"index":1004,"club":0,"selectable":false,"hexCode":"2AC7D2"},{"id":10005,"index":1005,"club":0,"selectable":false,"hexCode":"35332C"},{"id":10006,"index":1006,"club":0,"selectable":false,"hexCode":"EFFF92"},{"id":10007,"index":1007,"club":0,"selectable":false,"hexCode":"C6FF98"},{"id":10008,"index":1008,"club":0,"selectable":false,"hexCode":"FF925A"},{"id":10009,"index":1009,"club":0,"selectable":false,"hexCode":"9D597E"},{"id":10010,"index":1010,"club":0,"selectable":false,"hexCode":"B6F3FF"},{"id":10011,"index":1011,"club":0,"selectable":false,"hexCode":"6DFF33"},{"id":10012,"index":1012,"club":0,"selectable":false,"hexCode":"3378C9"},{"id":10013,"index":1013,"club":0,"selectable":false,"hexCode":"FFB631"},{"id":10014,"index":1014,"club":0,"selectable":false,"hexCode":"DFA1E9"},{"id":10015,"index":1015,"club":0,"selectable":false,"hexCode":"F9FB32"},{"id":10016,"index":1016,"club":0,"selectable":false,"hexCode":"CAAF8F"},{"id":10017,"index":1017,"club":0,"selectable":false,"hexCode":"C5C6C5"},{"id":10018,"index":1018,"club":0,"selectable":false,"hexCode":"47623D"},{"id":10019,"index":1019,"club":0,"selectable":false,"hexCode":"8A8361"},{"id":10020,"index":1020,"club":0,"selectable":false,"hexCode":"FF8C33"},{"id":10021,"index":1021,"club":0,"selectable":false,"hexCode":"54C627"},{"id":10022,"index":1022,"club":0,"selectable":false,"hexCode":"1E6C99"},{"id":10023,"index":1023,"club":0,"selectable":false,"hexCode":"984F88"},{"id":10024,"index":1024,"club":0,"selectable":false,"hexCode":"77C8FF"},{"id":10025,"index":1025,"club":0,"selectable":false,"hexCode":"FFC08E"},{"id":10026,"index":1026,"club":0,"selectable":false,"hexCode":"3C4B87"},{"id":10027,"index":1027,"club":0,"selectable":false,"hexCode":"7C2C47"},{"id":10028,"index":1028,"club":0,"selectable":false,"hexCode":"D7FFE3"},{"id":10029,"index":1029,"club":0,"selectable":false,"hexCode":"8F3F1C"},{"id":10030,"index":1030,"club":0,"selectable":false,"hexCode":"FF6393"},{"id":10031,"index":1031,"club":0,"selectable":false,"hexCode":"1F9B79"},{"id":10032,"index":1032,"club":0,"selectable":false,"hexCode":"FDFF33"}]}],"setTypes":[{"type":"hd","paletteId":1,"mandatory_f_0":true,"mandatory_f_1":true,"mandatory_m_0":true,"mandatory_m_1":true,"sets":[{"id":99999,"gender":"U","club":0,"colorable":true,"selectable":false,"preselectable":false,"sellable":false,"parts":[{"id":1,"type":"bd","colorable":true,"index":0,"colorindex":1},{"id":1,"type":"hd","colorable":true,"index":0,"colorindex":1},{"id":1,"type":"lh","colorable":true,"index":0,"colorindex":1},{"id":1,"type":"rh","colorable":true,"index":0,"colorindex":1}]}]},{"type":"bds","paletteId":1,"mandatory_f_0":false,"mandatory_f_1":false,"mandatory_m_0":false,"mandatory_m_1":false,"sets":[{"id":10001,"gender":"U","club":0,"colorable":true,"selectable":false,"preselectable":false,"sellable":false,"parts":[{"id":10001,"type":"bds","colorable":true,"index":0,"colorindex":1},{"id":10001,"type":"lhs","colorable":true,"index":0,"colorindex":1},{"id":10001,"type":"rhs","colorable":true,"index":0,"colorindex":1}],"hiddenLayers":[{"partType":"bd"},{"partType":"rh"},{"partType":"lh"}]}]},{"type":"ss","paletteId":3,"mandatory_f_0":false,"mandatory_f_1":false,"mandatory_m_0":false,"mandatory_m_1":false,"sets":[{"id":10010,"gender":"F","club":0,"colorable":true,"selectable":false,"preselectable":false,"sellable":false,"parts":[{"id":10001,"type":"ss","colorable":true,"index":0,"colorindex":1}],"hiddenLayers":[{"partType":"ch"},{"partType":"lg"},{"partType":"ca"},{"partType":"wa"},{"partType":"sh"},{"partType":"ls"},{"partType":"rs"},{"partType":"lc"},{"partType":"rc"},{"partType":"cc"},{"partType":"cp"}]},{"id":10011,"gender":"M","club":0,"colorable":true,"selectable":false,"preselectable":false,"sellable":false,"parts":[{"id":10002,"type":"ss","colorable":true,"index":0,"colorindex":1}],"hiddenLayers":[{"partType":"ch"},{"partType":"lg"},{"partType":"ca"},{"partType":"wa"},{"partType":"sh"},{"partType":"ls"},{"partType":"rs"},{"partType":"lc"},{"partType":"rc"},{"partType":"cc"},{"partType":"cp"}]}]}]}, "avatar.default.actions": { "actions": [ { From 2b69f12c88748b8ce663ce03543a8a6a4e321766 Mon Sep 17 00:00:00 2001 From: Dank074 Date: Tue, 3 Aug 2021 18:30:16 -0500 Subject: [PATCH 26/66] started furni widget for external image --- src/views/room/RoomView.tsx | 2 + .../RoomWidgetUpdateExternalImageEvent.ts | 60 ++++++++++++++++ .../FurnitureExternalImageWidgetHandler.ts | 68 +++++++++++++++++++ .../furniture/FurnitureWidgetsView.tsx | 2 + .../FurnitureExternalImageView.tsx | 45 ++++++++++++ 5 files changed, 177 insertions(+) create mode 100644 src/views/room/events/RoomWidgetUpdateExternalImageEvent.ts create mode 100644 src/views/room/handlers/FurnitureExternalImageWidgetHandler.ts create mode 100644 src/views/room/widgets/furniture/external-image/FurnitureExternalImageView.tsx diff --git a/src/views/room/RoomView.tsx b/src/views/room/RoomView.tsx index babde88d..c103b05a 100644 --- a/src/views/room/RoomView.tsx +++ b/src/views/room/RoomView.tsx @@ -10,6 +10,7 @@ import { RoomWidgetUpdateRoomViewEvent } from './events/RoomWidgetUpdateRoomView import { IRoomWidgetHandlerManager, RoomWidgetAvatarInfoHandler, RoomWidgetChatHandler, RoomWidgetChatInputHandler, RoomWidgetHandlerManager, RoomWidgetInfostandHandler } from './handlers'; import { FurnitureContextMenuWidgetHandler } from './handlers/FurnitureContextMenuWidgetHandler'; import { FurnitureCustomStackHeightWidgetHandler } from './handlers/FurnitureCustomStackHeightWidgetHandler'; +import { FurnitureExternalImageWidgetHandler } from './handlers/FurnitureExternalImageWidgetHandler'; import { RoomWidgetRoomToolsHandler } from './handlers/RoomWidgetRoomToolsHandler'; import { RoomColorView } from './RoomColorView'; import { RoomViewProps } from './RoomView.types'; @@ -44,6 +45,7 @@ export const RoomView: FC = props => widgetHandlerManager.registerHandler(new RoomWidgetChatHandler()); widgetHandlerManager.registerHandler(new FurnitureContextMenuWidgetHandler()); widgetHandlerManager.registerHandler(new FurnitureCustomStackHeightWidgetHandler()); + widgetHandlerManager.registerHandler(new FurnitureExternalImageWidgetHandler()); setWidgetHandler(widgetHandlerManager); diff --git a/src/views/room/events/RoomWidgetUpdateExternalImageEvent.ts b/src/views/room/events/RoomWidgetUpdateExternalImageEvent.ts new file mode 100644 index 00000000..0b8f9425 --- /dev/null +++ b/src/views/room/events/RoomWidgetUpdateExternalImageEvent.ts @@ -0,0 +1,60 @@ +import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent'; + +export class RoomWidgetUpdateExternalImageEvent extends RoomWidgetUpdateEvent +{ + public static UPDATE_EXTERNAL_IMAGE: string = 'RWUCSHE_UPDATE_EXTERNAL_IMAGE'; + + private _objectId: number; + private _photoData: IPhotoData; + + constructor(objectId: number, photoData: IPhotoData = null) + { + super(RoomWidgetUpdateExternalImageEvent.UPDATE_EXTERNAL_IMAGE); + + this._objectId = objectId; + this._photoData = photoData; + } + + public get objectId(): number + { + return this._objectId; + } + + public get photoData(): IPhotoData + { + return this._photoData; + } +} + +export interface IPhotoData +{ + /** + * creator username + */ + n?: string; + + /** + * creator user id + */ + s?: number; + + /** + * photo unique id + */ + u?: number; + + /** + * creation timestamp + */ + t?: number; + + /** + * photo caption + */ + m?: string; + + /** + * photo image url + */ + w?: string; +} diff --git a/src/views/room/handlers/FurnitureExternalImageWidgetHandler.ts b/src/views/room/handlers/FurnitureExternalImageWidgetHandler.ts new file mode 100644 index 00000000..080d0044 --- /dev/null +++ b/src/views/room/handlers/FurnitureExternalImageWidgetHandler.ts @@ -0,0 +1,68 @@ +import { NitroEvent, RoomEngineTriggerWidgetEvent, RoomObjectVariable, RoomWidgetEnum } from 'nitro-renderer'; +import { GetRoomEngine } from '../../../api'; +import { RoomWidgetUpdateEvent } from '../events/RoomWidgetUpdateEvent'; +import { IPhotoData, RoomWidgetUpdateExternalImageEvent } from '../events/RoomWidgetUpdateExternalImageEvent'; +import { RoomWidgetMessage } from '../messages/RoomWidgetMessage'; +import { RoomWidgetHandler } from './RoomWidgetHandler'; + +export class FurnitureExternalImageWidgetHandler extends RoomWidgetHandler +{ + private _lastFurniId: number = -1; + + public processEvent(event: NitroEvent): void + { + switch(event.type) + { + case(RoomEngineTriggerWidgetEvent.OPEN_WIDGET): + { + const widgetEvent = (event as RoomEngineTriggerWidgetEvent); + + const roomObject = GetRoomEngine().getRoomObject(widgetEvent.roomId, widgetEvent.objectId, widgetEvent.category); + + if(!roomObject) return; + + this._lastFurniId = widgetEvent.objectId; + + const data = roomObject.model.getValue(RoomObjectVariable.FURNITURE_DATA); + + const dataObj: IPhotoData = JSON.parse(data); + + this.container.eventDispatcher.dispatchEvent(new RoomWidgetUpdateExternalImageEvent(this._lastFurniId, dataObj)); + return; + } + case RoomEngineTriggerWidgetEvent.CLOSE_WIDGET: + { + const widgetEvent = (event as RoomEngineTriggerWidgetEvent); + + if(widgetEvent.objectId !== this._lastFurniId) return; + + this.container.eventDispatcher.dispatchEvent(new RoomWidgetUpdateExternalImageEvent(-1)); + return; + } + } + } + + public processWidgetMessage(message: RoomWidgetMessage): RoomWidgetUpdateEvent + { + switch(message.type) + { + } + + return null; + } + + public get type(): string + { + return RoomWidgetEnum.EXTERNAL_IMAGE; + } + + public get eventTypes(): string[] + { + return []; + } + + public get messageTypes(): string[] + { + return []; + } +} diff --git a/src/views/room/widgets/furniture/FurnitureWidgetsView.tsx b/src/views/room/widgets/furniture/FurnitureWidgetsView.tsx index 56d879ba..02b060de 100644 --- a/src/views/room/widgets/furniture/FurnitureWidgetsView.tsx +++ b/src/views/room/widgets/furniture/FurnitureWidgetsView.tsx @@ -4,6 +4,7 @@ import { FurnitureContextMenuView } from './context-menu/FurnitureContextMenuVie import { FurnitureCustomStackHeightView } from './custom-stack-height/FurnitureCustomStackHeightView'; import { FurnitureDimmerView } from './dimmer/FurnitureDimmerView'; import { FurnitureExchangeCreditView } from './exchange-credit/FurnitureExchangeCreditView'; +import { FurnitureExternalImageView } from './external-image/FurnitureExternalImageView'; import { FurnitureFriendFurniView } from './friend-furni/FurnitureFriendFurniView'; import { FurnitureHighScoreView } from './high-score/FurnitureHighScoreView'; import { FurnitureManipulationMenuView } from './manipulation-menu/FurnitureManipulationMenuView'; @@ -28,6 +29,7 @@ export const FurnitureWidgetsView: FC<{}> = props => +
); } diff --git a/src/views/room/widgets/furniture/external-image/FurnitureExternalImageView.tsx b/src/views/room/widgets/furniture/external-image/FurnitureExternalImageView.tsx new file mode 100644 index 00000000..e38bab45 --- /dev/null +++ b/src/views/room/widgets/furniture/external-image/FurnitureExternalImageView.tsx @@ -0,0 +1,45 @@ +import { FC, useCallback, useState } from 'react'; +import { CreateEventDispatcherHook } from '../../../../../hooks'; +import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../../layout'; +import { useRoomContext } from '../../../context/RoomContext'; +import { IPhotoData, RoomWidgetUpdateExternalImageEvent } from '../../../events/RoomWidgetUpdateExternalImageEvent'; + +export const FurnitureExternalImageView: FC<{}> = props => +{ + const [ objectId, setObjectId ] = useState(-1); + const [photoData, setPhotoData ] = useState(null); + + const { roomSession = null, eventDispatcher = null } = useRoomContext(); + + const close = useCallback(() => + { + setObjectId(-1); + setPhotoData(null) + }, []); + + const onRoomWidgetUpdateExternalImageEvent = useCallback((event: RoomWidgetUpdateExternalImageEvent) => + { + switch(event.type) + { + case RoomWidgetUpdateExternalImageEvent.UPDATE_EXTERNAL_IMAGE: { + setObjectId(event.objectId); + setPhotoData(event.photoData); + } + } + }, []); + + CreateEventDispatcherHook(RoomWidgetUpdateExternalImageEvent.UPDATE_EXTERNAL_IMAGE, eventDispatcher, onRoomWidgetUpdateExternalImageEvent); + + if(objectId === -1 || !photoData) return null; + + return( + + + + + {photoData.m &&
{photoData.m}
} +
{`${photoData.n} - ${new Date(photoData.t * 1000).toLocaleDateString()}`}
+
+
+ ); +} From 4370b20af7045f3a39adf0aa654f1b8927b66488 Mon Sep 17 00:00:00 2001 From: Bill Date: Wed, 4 Aug 2021 02:57:00 -0400 Subject: [PATCH 27/66] Avatar randomizer --- src/utils/Randomizer.ts | 28 ++++ src/utils/index.ts | 1 + src/views/avatar-editor/AvatarEditorView.tsx | 14 +- .../common/AvatarEditorUtilities.ts | 4 +- src/views/avatar-editor/common/FigureData.ts | 24 ++-- .../avatar-editor/common/FigureGenerator.ts | 128 ++++++++++++++++++ 6 files changed, 184 insertions(+), 15 deletions(-) create mode 100644 src/utils/Randomizer.ts create mode 100644 src/views/avatar-editor/common/FigureGenerator.ts diff --git a/src/utils/Randomizer.ts b/src/utils/Randomizer.ts new file mode 100644 index 00000000..1f67a129 --- /dev/null +++ b/src/utils/Randomizer.ts @@ -0,0 +1,28 @@ +export class Randomizer +{ + public static getRandomNumber(count: number): number + { + return Math.floor(Math.random() * count); + } + + public static getRandomElement(elements: T[]): T + { + return elements[this.getRandomNumber(elements.length)]; + } + + public static getRandomElements(elements: T[], count: number): T[] + { + const result: T[] = new Array(count); + let len = elements.length; + const taken = new Array(len); + + while(count--) + { + var x = this.getRandomNumber(len); + result[count] = elements[x in taken ? taken[x] : x]; + taken[x] = --len in taken ? taken[len] : len; + } + + return result; + } +} diff --git a/src/utils/index.ts b/src/utils/index.ts index eb8e19e2..3125981d 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -3,3 +3,4 @@ export * from './LocalizeBadgeDescription'; export * from './LocalizeBageName'; export * from './LocalizeShortNumber'; export * from './LocalizeText'; +export * from './Randomizer'; diff --git a/src/views/avatar-editor/AvatarEditorView.tsx b/src/views/avatar-editor/AvatarEditorView.tsx index 35cadc42..df6c4fbb 100644 --- a/src/views/avatar-editor/AvatarEditorView.tsx +++ b/src/views/avatar-editor/AvatarEditorView.tsx @@ -1,6 +1,6 @@ import { AvatarDirectionAngle, AvatarEditorFigureCategory, FigureSetIdsMessageEvent, UserFigureComposer, UserWardrobePageComposer, UserWardrobePageEvent } from 'nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; -import { GetSessionDataManager } from '../../api'; +import { GetClubMemberLevel, GetSessionDataManager } from '../../api'; import { AvatarEditorEvent } from '../../events/avatar-editor'; import { CreateMessageHook, SendMessageHook } from '../../hooks'; import { useUiEvent } from '../../hooks/events/ui/ui-event'; @@ -10,6 +10,7 @@ import { AvatarEditorViewProps } from './AvatarEditorView.types'; import { AvatarEditorUtilities } from './common/AvatarEditorUtilities'; import { BodyModel } from './common/BodyModel'; import { FigureData } from './common/FigureData'; +import { generateRandomFigure } from './common/FigureGenerator'; import { HeadModel } from './common/HeadModel'; import { IAvatarEditorCategoryModel } from './common/IAvatarEditorCategoryModel'; import { LegModel } from './common/LegModel'; @@ -167,6 +168,14 @@ export const AvatarEditorView: FC = props => resetCategories(); }, [ lastFigure, lastGender, loadAvatarInEditor, resetCategories ]); + const randomizeFigure = useCallback(() => + { + const figure = generateRandomFigure(figureData, figureData.gender, GetClubMemberLevel(), figureSetIds, [ FigureData.FACE ]); + + loadAvatarInEditor(figure, figureData.gender, false); + resetCategories(); + }, [ figureData, figureSetIds, loadAvatarInEditor, resetCategories ]); + const rotateFigure = useCallback((direction: number) => { if(direction < AvatarDirectionAngle.MIN_DIRECTION) @@ -308,6 +317,9 @@ export const AvatarEditorView: FC = props => +
diff --git a/src/views/avatar-editor/common/AvatarEditorUtilities.ts b/src/views/avatar-editor/common/AvatarEditorUtilities.ts index 2977a315..a89e44c1 100644 --- a/src/views/avatar-editor/common/AvatarEditorUtilities.ts +++ b/src/views/avatar-editor/common/AvatarEditorUtilities.ts @@ -72,7 +72,7 @@ export class AvatarEditorUtilities const clubItemsDimmed = this.clubItemsDimmed; const clubMemberLevel = GetClubMemberLevel(); - for(const partColor of palette.colors.values()) + for(const partColor of palette.colors.getValues()) { if(partColor.isSelectable && (clubItemsDimmed || (clubMemberLevel >= partColor.clubLevel))) { @@ -255,7 +255,7 @@ export class AvatarEditorUtilities if(!palette) return -1; - for(const color of palette.colors.values()) + for(const color of palette.colors.getValues()) { if(!color.isSelectable || (GetClubMemberLevel() < color.clubLevel)) continue; diff --git a/src/views/avatar-editor/common/FigureData.ts b/src/views/avatar-editor/common/FigureData.ts index 51744a4e..cb28a5ec 100644 --- a/src/views/avatar-editor/common/FigureData.ts +++ b/src/views/avatar-editor/common/FigureData.ts @@ -23,7 +23,7 @@ export class FigureData public static TROUSERS: string = 'lg'; public static SHOES: string = 'sh'; public static TROUSER_ACCESSORIES: string = 'wa'; - public static PREVIEW_AVATAR_DIRECTION: number = 4; + public static SET_TYPES = [ FigureData.FACE, FigureData.HAIR, FigureData.HAT, FigureData.HEAD_ACCESSORIES, FigureData.EYE_ACCESSORIES, FigureData.FACE_ACCESSORIES, FigureData.JACKET, FigureData.SHIRT, FigureData.CHEST_ACCESSORIES, FigureData.CHEST_PRINTS, FigureData.TROUSERS, FigureData.SHOES, FigureData.TROUSERS ]; private _data: Map; private _colors: Map; @@ -76,9 +76,9 @@ export class FigureData } } - public getPartSetId(partSetId: string): number + public getPartSetId(setType: string): number { - const existing = this._data.get(partSetId); + const existing = this._data.get(setType); if(existing !== undefined) return existing; @@ -134,15 +134,15 @@ export class FigureData return figureString; } - public savePartData(k: string, _arg_2: number, _arg_3: number[], _arg_4: boolean = false): void + public savePartData(setType: string, partId: number, colorIds: number[], update: boolean = false): void { - this.savePartSetId(k, _arg_2, _arg_4); - this.savePartSetColourId(k, _arg_3, _arg_4); + this.savePartSetId(setType, partId, update); + this.savePartSetColourId(setType, colorIds, update); } - private savePartSetId(k: string, _arg_2: number, _arg_3: boolean = true): void + private savePartSetId(setType: string, partId: number, update: boolean = true): void { - switch(k) + switch(setType) { case FigureData.FACE: case FigureData.HAIR: @@ -157,18 +157,18 @@ export class FigureData case FigureData.TROUSERS: case FigureData.SHOES: case FigureData.TROUSER_ACCESSORIES: - if(_arg_2 >= 0) + if(partId >= 0) { - this._data.set(k, _arg_2); + this._data.set(setType, partId); } else { - this._data.delete(k); + this._data.delete(setType); } break; } - if(_arg_3) this.updateView(); + if(update) this.updateView(); } public savePartSetColourId(setType: string, colorIds: number[], update: boolean = true): void diff --git a/src/views/avatar-editor/common/FigureGenerator.ts b/src/views/avatar-editor/common/FigureGenerator.ts new file mode 100644 index 00000000..90f245ca --- /dev/null +++ b/src/views/avatar-editor/common/FigureGenerator.ts @@ -0,0 +1,128 @@ +import { AvatarFigureContainer, IFigurePartSet, IPalette, IPartColor, SetType } from 'nitro-renderer'; +import { GetAvatarRenderManager } from '../../../api'; +import { Randomizer } from '../../../utils'; +import { FigureData } from './FigureData'; + +const RANDOM_TRIES: number = 20; + +function getTotalColors(partSet: IFigurePartSet): number +{ + const parts = partSet.parts; + + let totalColors = 0; + + for(const part of parts) totalColors = Math.max(totalColors, part.colorLayerIndex); + + return totalColors; +} + +function getRandomSetTypes(requiredSets: string[], options: string[]): string[] +{ + options = options.filter(option => (requiredSets.indexOf(option) === -1)); + + return [ ...requiredSets, ...Randomizer.getRandomElements(options, (Randomizer.getRandomNumber(options.length) + 1)) ]; +} + +function getRandomPartSet(setType: SetType, gender: string, clubLevel: number = 0, figureSetIds: number[] = []): IFigurePartSet +{ + if(!setType) return null; + + const options = setType.partSets.getValues(); + + let selectedSet: IFigurePartSet = null; + let randomTries = RANDOM_TRIES; + + while(!selectedSet) + { + if(!randomTries) return setType.getDefaultPartSet(gender); + + const randomSet = Randomizer.getRandomElement(options); + + if(!randomSet.isSelectable || ((randomSet.gender !== 'U') && (randomSet.gender !== gender)) || (randomSet.clubLevel > clubLevel) || (randomSet.isSellable && (figureSetIds.indexOf(randomSet.id) === -1))) + { + randomTries--; + + continue; + } + + return randomSet; + } + + return null; +} + +function getRandomColor(options: IPartColor[], clubLevel: number = 0): IPartColor +{ + const randomColor = Randomizer.getRandomElement(options); + + if(!randomColor.isSelectable || (randomColor.clubLevel > clubLevel)) return null; + + return randomColor; +} + +function getRandomColors(palette: IPalette, partSet: IFigurePartSet, clubLevel: number = 0): number[] +{ + if(!palette) return []; + + const options = palette.colors.getValues(); + + let totalColors = getTotalColors(partSet); + let selectedColors: number[] = []; + let randomTries = RANDOM_TRIES; + + while(totalColors) + { + if(!randomTries) break; + + const randomColor = getRandomColor(options, clubLevel); + + if(!randomColor) + { + randomTries--; + + continue; + } + + selectedColors.push(randomColor.id); + + totalColors--; + } + + return selectedColors; +} + +export function generateRandomFigure(figureData: FigureData, gender: string, clubLevel: number = 0, figureSetIds: number[] = [], ignoredSets: string[] = []): string +{ + const structure = GetAvatarRenderManager().structure; + const figureContainer = new AvatarFigureContainer(''); + const requiredSets = getRandomSetTypes(structure.getMandatorySetTypeIds(gender, clubLevel), FigureData.SET_TYPES); + + for(const setType of ignoredSets) + { + const partSetId = figureData.getPartSetId(setType); + const colors = figureData.getColorIds(setType); + + figureContainer.updatePart(setType, partSetId, colors); + } + + for(const type of requiredSets) + { + if(figureContainer.hasPartType(type)) continue; + + const setType = (structure.figureData.getSetType(type) as SetType); + const selectedSet = getRandomPartSet(setType, gender, clubLevel, figureSetIds); + + if(!selectedSet) continue; + + let selectedColors: number[] = []; + + if(selectedSet.isColorable) + { + selectedColors = getRandomColors(structure.figureData.getPalette(setType.paletteID), selectedSet, clubLevel); + } + + figureContainer.updatePart(setType.type, selectedSet.id, selectedColors); + } + + return figureContainer.getFigureString(); +} From 351a4464839f5ac2102acb806e34833f629c7a02 Mon Sep 17 00:00:00 2001 From: Bill Date: Wed, 4 Aug 2021 23:09:16 -0400 Subject: [PATCH 28/66] Change options --- .../avatar-editor/common/FigureGenerator.ts | 66 ++++--------------- 1 file changed, 14 insertions(+), 52 deletions(-) diff --git a/src/views/avatar-editor/common/FigureGenerator.ts b/src/views/avatar-editor/common/FigureGenerator.ts index 90f245ca..c799b80c 100644 --- a/src/views/avatar-editor/common/FigureGenerator.ts +++ b/src/views/avatar-editor/common/FigureGenerator.ts @@ -3,8 +3,6 @@ import { GetAvatarRenderManager } from '../../../api'; import { Randomizer } from '../../../utils'; import { FigureData } from './FigureData'; -const RANDOM_TRIES: number = 20; - function getTotalColors(partSet: IFigurePartSet): number { const parts = partSet.parts; @@ -27,68 +25,32 @@ function getRandomPartSet(setType: SetType, gender: string, clubLevel: number = { if(!setType) return null; - const options = setType.partSets.getValues(); - - let selectedSet: IFigurePartSet = null; - let randomTries = RANDOM_TRIES; - - while(!selectedSet) - { - if(!randomTries) return setType.getDefaultPartSet(gender); - - const randomSet = Randomizer.getRandomElement(options); - - if(!randomSet.isSelectable || ((randomSet.gender !== 'U') && (randomSet.gender !== gender)) || (randomSet.clubLevel > clubLevel) || (randomSet.isSellable && (figureSetIds.indexOf(randomSet.id) === -1))) + const options = setType.partSets.getValues().filter(option => { - randomTries--; + if(!option.isSelectable || ((option.gender !== 'U') && (option.gender !== gender)) || (option.clubLevel > clubLevel) || (option.isSellable && (figureSetIds.indexOf(option.id) === -1))) return null; - continue; - } + return option; + }); - return randomSet; - } + if(!options || !options.length) return null; - return null; + return Randomizer.getRandomElement(options); } -function getRandomColor(options: IPartColor[], clubLevel: number = 0): IPartColor -{ - const randomColor = Randomizer.getRandomElement(options); - - if(!randomColor.isSelectable || (randomColor.clubLevel > clubLevel)) return null; - - return randomColor; -} - -function getRandomColors(palette: IPalette, partSet: IFigurePartSet, clubLevel: number = 0): number[] +function getRandomColors(palette: IPalette, partSet: IFigurePartSet, clubLevel: number = 0): IPartColor[] { if(!palette) return []; - const options = palette.colors.getValues(); - - let totalColors = getTotalColors(partSet); - let selectedColors: number[] = []; - let randomTries = RANDOM_TRIES; - - while(totalColors) - { - if(!randomTries) break; - - const randomColor = getRandomColor(options, clubLevel); - - if(!randomColor) + const options = palette.colors.getValues().filter(option => { - randomTries--; + if(!option.isSelectable || (option.clubLevel > clubLevel)) return null; - continue; - } + return option; + }); - selectedColors.push(randomColor.id); + if(!options || !options.length) return null; - totalColors--; - } - - return selectedColors; + return Randomizer.getRandomElements(options, getTotalColors(partSet)); } export function generateRandomFigure(figureData: FigureData, gender: string, clubLevel: number = 0, figureSetIds: number[] = [], ignoredSets: string[] = []): string @@ -118,7 +80,7 @@ export function generateRandomFigure(figureData: FigureData, gender: string, clu if(selectedSet.isColorable) { - selectedColors = getRandomColors(structure.figureData.getPalette(setType.paletteID), selectedSet, clubLevel); + selectedColors = getRandomColors(structure.figureData.getPalette(setType.paletteID), selectedSet, clubLevel).map(color => color.id); } figureContainer.updatePart(setType.type, selectedSet.id, selectedColors); From 28539e6923f709e3183f918bd16dfa23f7d966b8 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 5 Aug 2021 02:26:43 -0400 Subject: [PATCH 29/66] Camera updates --- .../images/room-widgets/camera-widget/btn.png | Bin 0 -> 830 bytes .../room-widgets/camera-widget/btn_down.png | Bin 0 -> 1000 bytes .../room-widgets/camera-widget/btn_hi.png | Bin 0 -> 935 bytes .../room-widgets/camera-widget/cam_bg.png | Bin 0 -> 2166 bytes .../camera-widget/camera-spritesheet.png | Bin 6286 -> 15640 bytes .../room-widgets/camera-widget/viewfinder.png | Bin 0 -> 959 bytes src/assets/styles/icons.scss | 4 +- .../room/widgets/camera/CameraWidgetView.scss | 69 ++++++---- .../room/widgets/camera/CameraWidgetView.tsx | 118 ++++++++---------- .../widgets/camera/common/CameraPicture.ts | 8 ++ .../context/CameraWidgetContext.types.ts | 5 +- .../views/capture/CameraWidgetCaptureView.tsx | 116 +++++++---------- .../capture/CameraWidgetCaptureView.types.ts | 5 +- .../checkout/CameraWidgetCheckoutView.tsx | 37 +++--- .../CameraWidgetCheckoutView.types.ts | 2 +- .../views/editor/CameraWidgetEditorView.tsx | 58 +++++---- .../editor/CameraWidgetEditorView.types.ts | 6 +- 17 files changed, 214 insertions(+), 214 deletions(-) create mode 100644 src/assets/images/room-widgets/camera-widget/btn.png create mode 100644 src/assets/images/room-widgets/camera-widget/btn_down.png create mode 100644 src/assets/images/room-widgets/camera-widget/btn_hi.png create mode 100644 src/assets/images/room-widgets/camera-widget/cam_bg.png create mode 100644 src/assets/images/room-widgets/camera-widget/viewfinder.png create mode 100644 src/views/room/widgets/camera/common/CameraPicture.ts diff --git a/src/assets/images/room-widgets/camera-widget/btn.png b/src/assets/images/room-widgets/camera-widget/btn.png new file mode 100644 index 0000000000000000000000000000000000000000..76b086b18d5e90dc805d8789eb016de98b676c07 GIT binary patch literal 830 zcmV-E1Ht@>P)bprI+)OmN6Qzx-f!oa}5z`(#* za=e%mqX+UUXVyd*0&Fg_FbrUmv46g46CsqryC8Q6V}$_9;JvY#Aw&$|8ocB3(d%&| z1Rw)fI=QYA0Po4mUn0t0dh!EsioQLu=aakMvR`JhewG-32mJj(-)?`C0A7W<-)U3w z*n|LP#y_IJ!T+NdP^!q(wY>7P>;NXmXQLkgB*>C5Y5_RHXQ5w$YrUGe3ZWE$1AI2R z88{&TFZeQaYw$t<9`NPpvw)ukFgboabSL;R(Hrnbz@N803OW~mVC(k>5fNR8uL*yB z0MXDn_ybyh-u9^I0(=d4(k~5%Ucw*L`n8srNm{>l+YMX4cH0eGPiy-^lVYN?%&gXS zYU?{LH)y+2>v2*Qo@86#>C4ROjqkkNV3{#mZU7H>zyn?x9w%0#6D-xS8P4M?Oovctq=GQ z)M@$NL#geo)`!EV+{;F>?e*42#IK{N70-(IHF%fz*zIgz(^xN-k>3E+BJoD#i`?|Z9? zsnHMkDaPh3F3>;mpF07*qo IM6N<$f^1`jw*UYD literal 0 HcmV?d00001 diff --git a/src/assets/images/room-widgets/camera-widget/btn_down.png b/src/assets/images/room-widgets/camera-widget/btn_down.png new file mode 100644 index 0000000000000000000000000000000000000000..76f25da1d9243426aa9bb4852f3121c80e910385 GIT binary patch literal 1000 zcmV>P)S_5?q5U31f=@VAwx@ z&;}@kWx*lHfH0N`Kn#w?W`+d6ei zB|ZuL`M|!uSo7_9{C<5U4OSS$0Nmks(LX=`4+3}(`Pa(}Y4pO72H*ytgnodZ(Hr1B z}I3P0g@ zgWnCk#83F0;CDqo|b)<;FJ;8P2zf>*abI(mVBS-#^ywq4r# z2Q+`W5ke=vHlKw|*sj3i@#Y4Xd`ZTfYK61-*bbL1(u8N$VSOZTGAUeQ(fgv*$V zmzEn#x#X*8Kf%4Clko*RC0t#6pYukA=)(QaC4kDb=n9>MA9$+@m*_40+X9=jxJIwx zs{)w39ntwQgxU-0e8;;1INE@#yx(DWKw}3mY0J6r;M@RilQ&sh4xAc*C8bW~b3BOrE#5CD7I5U#CrXFk}y)@n_++cqwPi^ERRmY zrXmBv-~^Bp9F5HkVYvWQ;K1>L`n}Wu!lH}8jZUr>0faK_E4j>M{VXwn5cn+gkB{G-06v8J`l9WU-%SX>6`zfM1Aj#C&C(Gvb(Rl)mK}gM zJ{tWAK!Pj@V-!F%d=z>U-0Etk6+$ln1%6m`H*i7#q4448-r$`8LgB;Fqkz8(0El1c ztKpMIOeS;%K6K=;+MWfSi;r$SsqN=m09nw5_>k6<+TKfkb#x9ss`c!)XGIs_t6DE@ zdrI^kKC<=Xwr3wPvs+(ncWQmL-M016F=P25q^LW|ggS0mV`jIuQ(G??H`Vqzt;dd; z9oo)3$&$v6dd%$Jc?BK0#8O+8u2myY};BvXxwLS_sAOMQd&60eF(gZ## zxFP^4{G9votAGmvi2Fv!s^~;~dw9tSc6IatzS*1IsyUwpy@Rhlv9|EV@Y&EC`05iY zblhY`KjE8ygpb|&9pN=&Ml){yypRpxsUOoOjTzV%6E>Lf)4rHct;e*T{XM8B_#Io% zY&&brKwF>iKTt2rciRwc*S0<#KIK_9h_;JcpAmnAj&8fS^_lP~=(h)GAlt5LeFl6A z`UxJ^c2(FL7>n-cV*G`dstAKl#m}%fOE`22zA6Cc<%k}SVX3vC9$)w{fItgyonQB|E1~ETFS1AhPqE77`9MV>D3=v|^%}NW)AiNCpF=o+3+cB0y{%U=ZlUzT z=zsO_k2UI-;TA<9^&es`PrZ1N5+?uv002ov JPDHLkV1g3Zz}Wx* literal 0 HcmV?d00001 diff --git a/src/assets/images/room-widgets/camera-widget/cam_bg.png b/src/assets/images/room-widgets/camera-widget/cam_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..d6cf994d063352f748ce25d259c4dd3e54645754 GIT binary patch literal 2166 zcmcguZAcVp9G|t_b$3bIyLH{t%uHBLiPW~K$PS!NQDN3*ZI-;~)q}AXqvJYzIgjHS zd%e5DPj~JLwP-BUKte5Ymm$Hmas)elsPRKqgm4uYT45O^;r*Xy+-GN$=u6#)XP)2x z|NH%4o@a*VnKN8NZI&a?K~YpzeO+}UMVWXQw{2GN{Bz)CCq>!5tgmMHBO~Lg66oL- zpA3wgE|4lO-7F|cWZiE%St8~YukYy@E&J)*x<3vIJ3ZmV(BO-lq0?7aZWgAlP4$;Q z`;(n{p|`caHOAZa6jTQ} zf1Q#cmd3mn1t#F;U5!45b~Ughe3`h97sfBXr8K6^2U}M6GtOmVmc126%qtG(zP^ez9-!k z;^yaq6E9K-27*4NXE%)^NsX2%lsN})}L)ee+P?=n%A8@AA! zTF%chWGEnnx4gxPhp(arwla}};2UDGAZ1ijsn; zFI*V`=o&Xd0JM05PZdY8ACylnl3T3lOc0_kr7r9kyGCh6fQsAY784OGUTLDxU@bLR zOAJ;nw&=6b0j(`{jX1VS+r+yzxzdb__=}~9Y$EjG{*kbc!fQst3?j5T)t{pSo+@sE zIMzThSvGl^GSkbYi406+Vj>$8lbMLPy$lf>4r3x|LJ^ZzOypsr1rxt%gas41nAi%t z;;!OMW_S=_g0BvHFo5?*F%~C02mnj-U|>+AM8<6YV_N+pK5g0El??5>|6o(cNbPX4 z_1ErDZ!{8q*TU7n5xS;a5(F;{F_fBg&Ce}wnfXhISD5+~Y^!82S?VgV0^Q38Mgn>2+qg(zwMC@c#)2Mf+Lq}@& z3CB;4?;J0^o0Ozf=T?ptj5w>T_K$tLH`Bt6;1CUA+xU+FN4m)D&o2=oPRe((w;|KS zrslqXbRBjPzsq?%aJ|33Y9|WA78-)o8{Au@y%-U^5W$|Ca}GJpxA3ECa@seq`8D$S z$~41c6{&JH@wPr&XgboVMrCh@6tMA4js-)NJoy@;7`@J8Izzx8`-NJ;XlaeCeBP2tm&3Jq&xQWU?St{WzLk zTi|GAJy$K4>um=oMT#?1@mHW`aC(*5>VC7V20LsjX*O9~*6S|s_*hUoit%jx6jOi` z)q3Zk#`py)Uj2%1Ic8_t4^dRlhm%tp`+PhzPDDNY)Ea9YN_{ShIiL_Jgv2qsS~Ry_ zype-?+JigbUP5A{^&7ta*^UxTZr8DG)QKeQK6K!pa5h@0(3~g+J)h-yCl5}@`^srA zMB6UtSQ5s^aD7m4!KI-%@7S&q8Fp>D%=fh>aq=p`Y57hR;X7y9X%U*IgnkJg6Jo9y z^6=XQL<8}N`c{5%40>DWyYJf&4P7@!!`ZSYq{rl>4be{`Px7cDBOfxKZe@3&ZzY@+ zG7K>nzFqtAMHHdpjg7_?7u$=6O?K;{@80e{=f#OK9RFf~XqYxwY7&;fpbMf;aG)3` z4hWvLLEIwR^l!NfNGrsAfW;5I?j^!5eXfO$9kdhxgrbmq_%}VTf-u1?g^JIv5cqH|s`2Rq~wYivjY&m6n z_JqX9Xo)2G4WDOGkV~J_qaz)W_@0#8X?lR=HVIyK7XjG<%?ncG8$*G=&{51coO^@G zY}x6$IVZ!Ak%X}9t4_SMi9q&=!#7;$eCO-YGMEDt6>psr@Z$;F$3y$sUEHN6PKMxr zob1~h&4FsweRjAonT?izI3<=LPTn6;`}J)UGxq6@*%Y?yQf)h6u)SeP3?0QdO3c5( z-%vbvOZ{=2xetmMVIfK0AMUi697SNVAHfOJJSAU6c8ezSSXg+=g<8^#znf_wQ5aD< zc5Z{XG>7;~PC|TEGCc}(<5uSj4$;>rc9%Z$lp`i#<~_;bc80*Ehn(Xg?8y5lQS#|T zE}TsEcHU&=5?)cV?Uk|Z>_`Magw{WyUe&g>*mt4tE^Ku7*-sQE%No&8+;i^cTipYH zBOkWi2TD&@tAj~l;IFKw7vxC44~Uh6(LZ>#Re)l?h0`!K0#J(hNA(zj!&2uA z4IecB$#*xYC>e)b`?5|5r6qGky!(A6pxFKGmwxas{n{<}{SnSQj4>6QDBy<) z!CRwl@-9hX-BOk!)g+UB&nRnT0PYau+6#GVKo|7 zqf4*+hK1F7{qx{L|7Dn0O+qY>@@UaK#r2YatS%6l`^%-tG&ZWIH0Zx^GRvPyaiSQB zS7$#RVaN4Zt~7w9m~3H38uEa~yc(327(5!|k@-8fUZepb=_emU z`s@)|B^!uht(|xu35=@ABx+9RQxx4Z!;sb7CwKQtOd{fB`$Z~ zN(&r5CJu0lqu%xAfpa)|?9`>mWs=!Dk*LRMU^eQ)jk;nOxd)PEm8LHAeHoj0Fj+F7 zkGZAoWgP4{TcpRu3|?>>ry+P)VnG@L(f2{YNv9J(ILOfY@0f1|OV|XKaH@3}e~XQZ zzFF2|8bv5*dAyAsnFrSQPzdgFlG za6q)gQ3#2pplIds_tkc79Pj}SNK3Ee!JM%HM-3h{`u71BD%7KxUXOR&VnZZ=NMC)U z)@<8P#+N7N z_48SO#(*uo-T@oVE7RY%G>lZbbe!G?6h!dQde?R!G7J22Stl-3TiY+t^yiQt|`5z$+fa29ic|8Z)0ZVlVYd^W67FNzO zw0uqR&Eg@L9f0Z%*~i%%Of3SbIVGuHLZa|GA$Y}?53g*{{MVQy`LFx90|*WwP)K3y z;QI{{0)T|M=ZH3N!HICPr18ED&E8#T>LQ@1yjdcojt5*N&)XQ=-%Pd2o#a3n$+NQ~ zQ3haie4_3+EztO2y%+M5gBMc<3Iq!MKZUYU``L@dCh&Hfzy#|MphfIxlW}0_c+34H!wI|( zZ>hU@NZnERK~PIy1QTK@%=Rh1p=%$8jUCAg=pzl%-ku7v>`BsfBcT`_2vtYmgMJ9U z@ayp7O`t@ZvIM6ML-2OnSSF5OcS&W#CVd4ozp9K@BV76x5eIJoU62iQA9KGZ%8v6B z4LtRcR=S0i)@=qhAn<8F%t9=GboNI+Kmwk7|7)MKu>aX-f}}s#+aX$97VAY;rhYAs zWM(K*7-qdYhmRp~aGE9V!*`v!Sf**#j=$LuG|sl$%wFfNphcQUS}jA02W zkNxF9G|A<3p!fnJ$;EGXt4Aj!KxelqielvU)OB4o13s92XaaS8igb!%7OnNJ3ukPn zZNGaZ<>l`U(6B*Dr5ec41u@w;?He@WdvE93(%nl@OqV-5-y4QldP$8gyae|DRaXhI z^C-vhDCW1TmDPST;rQ|d_h+{8t(OyK@ds%Whpu^peKi6PT+Z!$g$=PB&Y>3FgfCA% ztArnXfcZYf+g15+0*b}=wn>wBJPM{e1d#&lMrIbj_TSL^!Tt5sw}K}bzeN#)G+^q5 z>>T_ZP!@K6-O+Ul>C2XJg(H=4%l5Ini!DdKS1xC~;S&i_NPP~L(i5?*LfK0}N+nCm z^dd-&GEZCVPHcVj&xE^jL-C7JtYNh|!8+Krp?K|18a3YXC?6q?PYiG{#r+c|SF)rc zL7sJcs}q(}9JM##9+KvH@J1r9l4a_$Ui*J&~8cAg~hUf6lO z&niF?OFf#_^77mtrsNgHTUv`GAS&SJj{?@co3K>H#J-#7jz*78ZE2XE;&9o6kvlt* zyL1lRn1EG!xTKV+b+6&Sc$!xLp9{vkoQBUAQ-ud4uxiI|Hg109d8qgkH@I$zOJ^~- zKD}7i1mh6A^n=^o@i`4Gt+9mk{7Cp;9yQt0nlDUy4(w|FY|Tf52BPZQzAcHiN0S@X z#mSAY%li&dJymQ<(!f)=@icm1aOe2rFsr-yfUrEE+ty?kS6?P16q$ZMd7=nc8v3@z z+xq16X-Ja$63Y9;et&ETo;m5Xdn6m;1Ymh0H}jY;E|tTugbXo<+kz4(%5Xfdk%~x(QNAeGpXhTfPxvIlhzbJ%8ddY;+esZRhwn5n@@M`oy*X4zPLP z4GGpS@T_ymKL0pi3E~IZ{UKfl7=CmBpMC_k+~;_AYhvqB?;}sz!B|{xse|hf2I~;U znWjrnjgb#+|D+Zw2o5xCxktidh7AYBg)1qBjn)>9(}&zZ8FB++Wt6uBDJtvmI0XI) zwHw}Gpc~@3y8}zOOHZ@%0byz2_CpMa2AzqfN_RwAO5g0-9@-s+x7+-0*F&l?j$G^y{q?JG%yX_pPj3hY=J8(}rdDRIP6RH(a6DU>|j_ z>{xM9_CGk!48S#m{&+04F5NiM*odG6UQDTLYs@J*Zp5YcJ;16S-izloJswW4JqwRd zX$^(1L#K?mP2`ODdV=-gYyH3UQ!Xf`N>X^bVyz@-cSttGvK(arQaDErBoea8rF~%- zS!(rM6+?1+7aCZ3rZlJcg}KSM^9b99uBheFyAk&Itw5(DdtP_1jG$ zzb>mb$I;VMB~VbQ;-OM?7eL4lO>1R#j?_MLP@E6e4D5I)=-)cj>r&JJk}%8Vqk103 zcjrM_lrI~z)5BJjWTA{z)NoLJm}`tS;?v9u#`&>bJv9gU&s>VXl((WNDO$3GcYEvO zc=+UCvVv4XtHLj#=sIy=9*<&-H_!W%az%;XJVd?2dQNLK6lXuh5>EY>*RIH#qcO$bj&)P906bZ`qMyxn+lGp8{m_3J(R&D-J1} zncMc{1xFs&Pwyt-*bQzn4!!#mQXh6>G=2PYuEGs4nZD7FiAEFs);XPeJ{^U@bLsaO~jFlko9yXSf->!@0 zsD=#-Zr5|-*O*a`IfKWI5XSo}N|fG>CqQBpd!!I2V@taJdeQQtC@W ztKm)aEr{RoOI~3c?<=Wj>gula+l7LFvOGtEC95d?x2k9(aStzhRB1EE%f+A``Fs$| ze8Ij~ICK`w-QOn`jXCq=aL0bf%C$9<*3I|&$D^ngQj`8J&tHY4i8=aKB+>X zR)vGb{{2#lv^7)}jaUT#5s02mPN=i(}sgko0I^S42X$3qxt>$HqZ<;*9w zwGl=OCBT42o?@9Dbvq(3YTzG=9sKD>uQ9IBNg%GVHi2i1oZFs(`ScT%M{6xdAISU&hf9X{S(;kk&MH zn9V}n!75Zxhp7%6#@@&eAjyxf-k>399)xAKgH#7LBMamQ2!S74yFFnU`a7u{o={$5L*Gkt)WV4Xsj%@!gx?wzW#_?QNwhqG_{SM|0@jR4MO!!xM%wB zoY7A`!+@~5%_@vT2uKzd!bE++8gk|lmXmF5pR4&#I-#+ISV9grG7a)L!8<8`GRmGZ zd?H}`n2YD}EfA_?WI7=}IsNebHzU{O%LB@W6)sr03bbIe_-kn8^_>~|b6$yJW1?kG z?Ln(Z3;{49gbp2u$QjCdc1c9}BV|7AO(mZZj_#UzY)j}55XBY>8#ZcBUfWn_zC2Bm zG^=E=Tije0asu~*_O0Tw_M`i~^V?#-JU{o=t0B=+(U$)M=nCt+&xxY4Keb7aYF-l~ z=M=AnJ=R9b0sivb=S}=12|LQp#wGO8RxI=`vB+yxehqyZS5W0G6pnu#=>Gda%x-ZM z(6^oUZK5)^mDlcCDam%f+VQ;mw!eSYgrC7!x9_sPK$VmtS)TZQ&f1LMf^=B+_o=zs z$eSRK7YHL+N=}Y>-jkTNvDUNsX~TeRPwl8>BnAV~?#y{_sib5z?b%f)*I5G5`LqS_ zZru5@oQ~)LuzrUe_0y(=_h#^9OJ#}A9NSX$QQSKR?BXLH*1Pjap zA4rjN2c%*9VcYHgP^e;|%LmE}+< z=gFX~fiJTjMxh*~pxWihkLXZ-9zuwL^!V+$)uDd60z0?<*%^eE8lML{$Af{lnOFwH z&XS?#u=8Dqzoo-48!`QY4qIqF=Pe+?Z^7>Lzp~y-Kj1TC(OaNSL&uK*$e-F;mo2o3 z!%_+ONZakE&d~rK%tIOB`o1rzT=~-s#>qgl!tnED*dt>2 z60{os6y}hRX7C-e1eT6G>HNh5kr?09V)&3l^s;DZJqSxUr7|1b8E7^=Ib{x*Clz`M zmVM|w#`{8Fft^6I8VgM)p7)MuEYquR9|t>f8Wd|0KgP+9+$a6?32-mmCXp)k`Y33> z&vRF3vZZoNNCQJGTv%;a2~ci{$AWz9$d^3tbperQ*Rr8)dL23|c09lH?$CdLseHKC ztdxznQ()LMICv1I3;F?fck~{JgIK zZK9Z8I}b+m_Z&f?46OPuWO1Yv^*CB<69_~TWT2TI11;AVoSyt3-oVWVpdEw*B6k^n z08O1o9)&jcM9?Z*2u2C;Q^MW_(RhkKwFCU5f9wSP#lv!bwPiFLxJxJAt4ZqBLF%!UMvPc=x{r5cKii^djQa8z!fkU z2P&@h3$b(t05djwRRZ9jRvG|8x4+N+pJ4#>0Kg+}g`gqx2>?Iodc6cd=z}}3w~GOw z2mm?{yWU|#FyLrrn-IkA{m|RnAMVu(fGGfYr;Qx|B>?d3*f0PZ0pP=iQi%PE@R#CQ zRd;AcK`x_+e53|NBq+;VYLzVrKp6tBfKma}WfmZ~?$0KIAUHrG`m#H0Qv;{eNM9O& zQ^0pRXdBssw8>Bs9`)ygy*GpOpe+R!R0}ew?Yj$m=Rhd^mR}0y9}6eP)~j9vI~p~ zTtb0Waq`hhIavSi2Ryi!zz@a)wdn7D+wWR55!_%%$bKUaXz-y@z>-D;+=25P@BhCA ziq}OeQ5Z$6%4nwEJrtUuJs*w+#hOYSEboXU?9(WKB=wF zOKQCA$R*I0i73LeSK9o>e+ER4L3ZGkr2eR%10+_3ZX*Vu3=qgBG}bSd$dJE? zZ?io}+b(eTKBzl%c#ChMlH?pw8=Fu!>n_0m^Thn$ z5)f~K_U>fD6xB-u$5%&s2Lm>o;FxftQ2TaT*l2eJYaRxV48kSdhpi*{I#;Z9RU6mm>fvdMrQmPTK8wT!92NJ zn*eYW0RP9-h6BNY1jGD$>*GKOND&a#B1%p}w;y7sfQHsP@NcGI?i;=CY*4h&7sKo9qKr3Vjyflbld1ChFjF4=-343K z_O5kMbXNGb1Z*hHxzTyih%vOwK5=oizT<>w&4^7F9S#&?cTv-SH7UZ2mrI}?YZ;!; ziA}^Nx;HD&&gSih*mIdRk_c-=8nz5=O87?9FFBfB-I-hAXiRyzr`GBiFhO1Nbsk=^ zCiF$jHkIh$DC2vbBixi~G9dl&?c9lpb6&e!AI^WtuO1w^aju3#nr3{1bOD0V3BL0u z(azW*X1%VHw|edV*?q-O5e(lV8jE{RWhS-rZ}yHckHwyoUW*>wW537Pg?=5oaU9AD zJ;)g9N;-d`$+x&KhAG~N&^4&kNO*Y#BofNiUhIO@kVZ6JwQQ0(`_czle$sH-+@av9; zrum?IIhnYqbhqik#s^6YuTtJ1XPo5VRKm*S<`QXopd{%@Sh40>Qqj{&&Z5nd_^|^tRxEpEo{A{w4IoX}@1MbBGpobFtrzL`;<=2`sF) zPp&$3?OXY~cDd?mpL1QUG~EFW>moI4A}6k%80(Ot8T(^BVEzZ0svX+dkSVhAqUu=C z&uH81>fJBjB#maS``MLhtuH?DDY+rTVH!hJlPAe9#$kunmwSUv{#n1Y-d^kX?uYf! z-XB9dRy^Vvx;T1baKU)(5nvKl$vp<#yf;GsHq(PDbc?t^|AEt7K!1%+`j(;-%klMm zk4p3NTD5Z%9|N0^GmnPThLo{#d!}khEr+63RtHzwb0|H7YcpE47kuUK+O!z+w`r{D zw=!L*4s}|sOP8>qV_imeFmxVGuRHBR$ICf$4iums8J@fFUgCxsmn$2+O^npL=o~g} zEo~vCynDUC(@Dx3caU#EM2tdzs64%NNf-7QlgIzI+&Uf?x`CXG*<(6^cwx7L)Qn&C z=@-WFcfWj1*GHEY;MAm&;g{R(R>~q=u88#-CeaWbQB~_aadao8R%F7mym&2lNV#i7 zA&SW}d8P>>)_LR{Kcf-1xF#7WbG_~}l^3t^j43>1L7k*3Uy#=}#%Y38lSBvo)^Q$~LG*?2|-9k{LRy$1x zNhVWyQ-DNu{fdLVQv_sdmYw- zTF3oj6dcp4N(Y~=H4iDjl)B4o0m6EVbY0z@)Ry{7tpD zr|&xWNRR}2f^`6$7o9$>kPkX?OvsZtRpl&eEmVBm1HW_-zBQvvZW9pe)Qr{#x26-$ z6p|RrZVtom%Zw|L_v&gXvm!qe;SLis{TvE>zG+q|K6cVN_IU2}suVL#Y273&qtcsR zucDabBQLWMhb1Uzt4XCq4^6*NQLJcX-v4AczWzzyK#^io^f*l^ijVQxO@j$eSP?nL z$N17j{#bOrTC1gZEwz|_jK7sYb!1>^>0d;!az&>dl;VmK80l4HY!#_zz3Tlv=Xnbk zwZl{^#VBU~-K;?g$Q5%fu(UwBy5rb`9eaM7jyr*JvH4~akj#sGJAws z*!OWfzsF&xbG5zuYQ(29N%Cy%niX{Nn)wb$kxQyb*;*EAl#lNTKeuXFtNlPZSK6yh z#XYz16REGyVCZXvQy3TM4ps1Rt&vh!p%g7W;Ok5P#LTSzhf|Y{#Sum!^YXIH8M11X zt8Sz6Pu}ZBO5rs=3Q4~5MVIXd3moVkBFvpvT>84IZn4?|vIr?3^zuMK;8mhRsR#X9 zh4TDAhO22!#$92Tx3m$v7_`$p#WHTj6Dprgq5T@-B^e^I+(c2D|m#J%d(SjSr`{KH_5tn??--+wD1%`54rU>@O!r_pc>?DC_sAm_Cr* zCYEwagzl^0*4VWa%;VU)RJ7_%ZYZu-^|FA(whm2RcKRdo+uR4&rASG}TkFmz^_z1L}r*^`BiYc9>i(KAcLi3t@2 zH(z;?*-Oo9j)Ck-5i-%tgSC)=VaLXe!3korWDyoPHDh8KzHSHdwac4(bmmn8Y1XWZ@*T~7EnE2mj1CK$P-2Ae2-J49Gjl_DE`J`W`>$1hCX z!>MZ7+;n{0F2-YAsvJeFfjASR;YYE2Jb>#7Zg-x1Hj2Cc_}nfQ^n}itP<-VT8L^~v z)v2N9S7a(JAH5>P3SM_r`kOoKxPK7grMi0=c5JEWT5lr0yi&OxZZG*rJT*jrdNy@1 zGuiQOvLoY2oIsjf{%)!Rnj-J@Id!+uc<{`U47sYNQ4rcLsP`0BKfdZH&C^6~WQaJ< zyzD~%ek7rIEsA-xDOL}%i9E>FX7rPYE}uM_i>;`El9UGJ^)#ohv#qd=QRD>{rby^N z&qR;_<`mkV(kctyaIyDSqOe7e78J~u_P~BoR%2Q#KbcRS*4Dhb_R%krpjqzWZ)m&T zK-^*5%&JP+p*&g`QM);MfRf){;=a^RC`k9$Sizuc^_E*>LkZ4 zJ_fhud%d}jmn!yWUcTBIRhEOFE4TNn_2?_b9|cgtOTj2sU5n8{h&2$$TdvBbXeVOP zaeh(`z6y8w7+ZR^Xvc?-xLC5(=2+;3#^SdvSGTqt$Dsp06;yvJ^VCKQIoVYyW_@(9XVI7co z6Q__Ixr~ds<%O{t?VhQOi|y#gR#t&SSIrY zVaj8ugi>Fy{!W8j=CnnI9Fcx=JM@{rs*9fwB)&*F(+JK8(?YBjBO7 zh3jZiV^nfT8qM8+5wkEQt!to$LBA+=HSonHVmrRLB*reP(3i}!6+}ZtH(%J` zP0{82@1|29=j~nSBYn;I-#m$NQ3HSbvgL@bT!i01q=_sw9nxM$2EUJ@MGo;+uqjoj z(m60<;YfZ}oZhXEbZ7dS#EtUleYFJ>js%D!tY(X18g+mdnHOP@>SqtK3dASYxt1p)2o~iJWI4q zwH&zYJhzbjSc4)6**Z0FX={tOwQ&5vFZa$NaPpF&cU;tx7vBxlzkHD4pqg%(If)Q) zUAby>otpV^>m%;7D+|q9YiDHFFEEJ@EO#Cc`t?9$wL1x&-dXRs*ca6FeE7=f%7Zw~ zv><$t{&;YFYi{txfgp|EDxthZ(UQIjVB$K=YLMA+$b@8|T`H3T=o!D2m z6o)366)ld0e8m7#crtghKAK<+b8DBo{sk#`jZ8*dHdESV>g|RL!)j~1ixl^D~ z=fF)rnPiWJNf^8i6^G4=ILbvahr6SGKbq;5Ex{L(8M&&nzTA9+HU~#;5f40ep|(j; zDpq`Vx2a_t57ky!Y8G@yP4YOGcnjQEHN!Hys}T-}+UKzocy)Pkh`oZGyHE@hqMF~$ z{Xsv^@0rB zL}&F4m@%*8G>_dVaL{vDFEC*8EsvaW&)md_(Hx{Hr^fHPt$y0pk#n`J zWq4{?Bg**4@|<6MJ#+HQOmcna!lu^|gS%=@%UokGN@O6{iX><3UiVAQXhc;D9}Nte zu1Wv&Y3S##`KXn+J=CqTL z*SH{0TdwNLh-2x;M@cdts}>d2=bX;3{fZl$^|9$~_m+E-&?@-GZ~ewU^@BB)_Q(0w zv3=EFgXI&r2}I)qB2z^tpgISI@}ImLkMu};%77y>Hi=DG?<6}5;~Q5 z6(PLbl*W@?ozOon;hFcITAevR(ZQSz**x=HX%#hx3So= zl@=&Qsb9Zydm#C<@heC25Pz(n1kTEc88ce_f$kX^9K*^q6{ap($wd*!zE&BK`Ai~x zcp3I|p|xe~b^dL`7x8?QHkp|~$pn?vSPtf89g+sgTZ2+R8DaF52igq8$2D*3JH4w# zj#t_Tjs{EoOCq?@=VFw#iKL*OvPoNZI|fc6TfJAu&ae*1zOB z22U79@6~m<_%Uy+lJAYLn@yf^vL7P1ZPmEPr;&V0D*M)S(3K+oHr~XfI<5QWu?Ghg zQ?~w`#2zT3^DusxMX^B>%NnsYih1gVP!RoF_}zd5oRs!SFCEUBQ)(5`!^oNQYYH69 zi(Af8nljf&#QB`R$9E3DS+Te^?e44e`tQyWC%y({Qan@uA$8kB|86829*n3B{?KTw z*-~iWuP2?^u_|A=!~0e8nVo#koTLY%*K3S-e(hONYds>C%QgIZ-lfIi^y}|SwUn0Z zDq831a=GLNVk3eG9R<;YdRe@*K*V!}~{!SkjjYZEcwL;h)c}ug?6k zyuZDHYKA>WQC4f3kV~nb3|bv`Uhk18tk6i4UCEW4_Mf=sJ8kPUTx=*%Ja#k=Ig@bC zN#Y_ zaWNpNg)=qyns?`oDr!bsS-%Bg+IG6Aury;5NcN`S57t7ci}cs~Bjcbp@Eze+IO1oN)OchT5q2Fv#>mj>1&_JUsF9ls4ppx%kG5 zDM5HLaslx2Fw!{zPb^~LM#rAin=sXZ5{z}T8~zf3!B1v>`!05*FpMg#SxWg7=8pXw zufM=?+hK&d@doHW^W(R0dAElg=?|40boV!2CSc&=STPF!31*-F8Jizx-F|~c7Um30 zV(C0t^>Ca3z@;8A0lZ_OQj8P7|g{OQl|$)5D82Kj5$?c2%>U24e%Dyg=;>#1J8h8|9Lrf8Ge5DY8T|> zVX%$%nQOq}Rk)wDdhX&QP-qwym%^oAD=}>Q;dTQ&!z8!s zxQoNEV;8%N-!8wez@>|T*TtyETUqxOL}3(XaS%!X;0U~?RDkXPXvSPpSt{HQ*ihyF z=M=Hd3LU}eH~{zc4%6VeUU@1fOGKjPiSWbN1JzRjKLdtgf)sYF^h-3-0ySboBq1Hv t%8#)WKoBvoO95_guxy_7Z!~gE%Zd>!Am8OB3@@J9u)3x?h1zFs{x27+UiAO~ literal 6286 zcmaKRdpuO>|M-}j`(?-|!Wl_zM$Cjt$&5>y=qgh~N#it`NcX9zjB6s>M0|`ATP_u< z8MoSQXy{ZUN@R%I+LDYe8`@3yKIdq6Kl|C=>-UG(ndg1KJkR_6ydOtbF89^fG1tN2 zaQd7j-m7sq4LSIGs6_^l(adAT;G?}`32!$Jr)!Mn*X-{c=)V2q z>-IynpAP7k$O)5^Eo*%SjV`U`y(eDXeQM{qJv%S1iN=jk@L9oECqet_J@dNF*VQ@| zEMIX&b;9{^-gVpN@jJT>JO~GA-jAM5S)bAS%G&YB!Tlq{19!OA2S3&Yb36t=euNIS z_WXQdcPB~x>bOVt;3Y$kZ!4oIE#zdqP~+N@Wb-BDc(s+xF!r-WU&iP+vvE61a)k!% zx{uP+PRtP&)ak*-wM2PH+E~0(oTXCPKWE=lCy@peBIr(c} zug}gOym_L)0QnE8r5Y-N7@_;aepI-@hq9>?u_tERC^$3o(Oy^ZmaCbAi|QIrK= z>9Z2K>Mfh%J}e`bQv|3HanJ*{+I{7&miu)M#Gn~UR9FHlJGEnWX!#}XGp_-yN`o9! z3Rz6ol(pj0aOE>F#!T9S#p=jf16KdhDZtr2ZzR>of^@~9#f^_T>!vNAPFbKa2lY!! zQl7X@1LNXAU3raMHr=!${(>Hi&)MS&f2lbgM3VVWX!a6aEx4S#PDdaOz@+*kQ6;iK z%7a>z*m)-WDDC&HDVCeK^RiHz9>%M6N+vDv-;8>)T(aS?d4%%>Laa`0U3U&s;j9J! zuwr{i(fKb#RN*4{dh6Y`Vp+!p`Y(ev!14=o;bPgv0G=^CKKA~0+t<;zzT-B1*MIgB zB?;-D&K}YF{5r>(<(XOWp4Bf=DfWyki1z}GefsGL0*9$V+jfH%gD4sDFs zA`7mdj@*wNF`4x4OWWFwqeY@7XimC|^!`Pb-~`uEYZ?EY#xx)yPLGd@C=48SnJ3nR zq0Hj$r?ohyB+frqv@rpX0A0e)L;6}6k?@PlWO3vYWYO32bP4CFSdR!<=*U;!a68vd zlJDC%E_-CQU_9hv_uG-qgzUF%?%o0HcAd)x=i~gLgq+1k%Gw+*M!#yqRYldD$4gmc zhNOr+{3`!jf0rOYHB%gjb9mz(9qq`rld%2mS+27}Nd*`uIjQVjFI<7k)(EP(dsPgC zO-7c-M{*T53<4^q3D0{-vaXm$tu6c2(@>%f8wF@0sf%U=lVk+t(nZ!7QM#ULYsx?< znF%~LpDHhFO)Iq#9pUu}eK3X@NJfd=-ZPt#KA|#R-B5p60}++TOrT6|)7eW~C6;GG zZgj4p&QEVR%_T~SjJ=7e7j#pvBfc&0kxe1h(d!JiNC(9Nf zt0@F2WS5RtZOz#Xp~7;tiKrS64Rwm zJW{6y?9he9%}hPd~^6Qzw>?7!Pm` z#5Jz_k7n|>DOh$XoCHtNaUL`L#QDuxzt72!9jB(m`5R@DlhxD;o0g?J?Du!a)CK{k z*#00TG0OOYq89-{FP^*}{m>n0fs!^R(=95g=Y0+ix9d8gPQj8Smi;Z(xsUZHdc-J& zT~efBCH)E0t-f?dDC*`t+5-H5Rn_`u)gfUYdh@E&QA2inQ4=~TQNBqb+f%j?fxaM3 z`J^YiETS+i?TKaNsDQ|6sDiyv@GcApcD^`ITAWfwc}4P~-WJ&q}fgT#L)zPofjBIBLod*3LRJyKLxZZH%5OE?X3uK6^Nv z2wDh3$VUt)e)YDWGrp?*hD_KIaiA(P`qm?ljbf5tHk~SLF5NZz!HTavOIm`!Sz-IT z8Orx7tgLT4;IBXn^JA^nK8)}cb1gs_=0BbI8KpNOgv8iCE+MJj7+ON}{i8OKe=fGp%9O=KQQDHu{4xm`w0IQ$Ib1aG$~VwqCI9$CLzas!`((Mc6bP|krA19_z|GEl*E z@{?i&mbA1G#ab`5Rz>{;0a<=k7&#P>YFW$#Zm*t!%=Sok$;D{5utW{QviEDyP;J%X zwF?_gmdw4p`bmuOyqj78_710dKe)3>NEglW`wr2U3d`Cj7;rq5u)*Fx?5NqH#O03h zAiL&X*?WRMy))r8_JO*@U%di3%`H0|O#yZiQRT*HL1z2sS~FukMD@=zK{3lP_k81d zeAw)u82pZA3(O;!StuAI#P)9r2d&;jhBgeo3fnk6*iGj6K01)5+xZ~G1sTyn%l%x5 zRPiR^(FjgneQ0nM4{Ftx@Df?YrC!|BwOgLBih~h43u+CdMI^1&1j}A}D%9E*wW`hH zGWq;9pR6bklZu(~{si{$*P(vVKgzi%-B0ZRs9DE%3h}D*VpA~}C%t=>{`)>Y)kh+1 z>pjtgUq=o<<4b0w*&vl}aD@#OTmc}#Dxy>nNAHb4uA=CMa(DftiL~DsIO#)y&GqDG zo9}ViYFtHzt~;yx%}oZYd2TfuZvuSg(0#7xvs+};ZsYrc^+2wgz)0c<+gfbhV{y01RPdktg8KIF1 zV`sZ(IUM1=-8G^FO`xBKx=TLt-;JT4W+z;TJT8%EIi<1HpBORbX!`PSyeDg_@d8Fl zH#^%c9ZmIDR`%Sirei!Ze}3y^1hTte4L_|bo5lxSw=k0yY*68;0Bw>J=G9KFps>;o ztP~J1z$mRWRn=FJbU42;1(ib7ZK0LqMF4n6SFlTza$Z&;GO~!|tn(7zM;ma^_ zAih8H$lY-!`Appjea!+ARR(hw!V{0kIPO9TI{=jhzNWMHf5X_`XE+6?&+xi^{=);x@83- zw!hB*X);}_ld{$Ks-2cXh~wdXV=&X9r}kgb}sejC@3=GOTmYX%l4sEx3$GeB?g zhp8GloL9@?1LC$udrDPL!3ImFrh}qz70r(@F@IR#^nnGu2EWmwM^GtY-MKXPS@9sT zbxQAI5-rA1X6w&%ywH4WjR&QYnzMnz)O@!vc9K40gTCB}-@Nk1fy}`JZQEl1P&J=j zTJKo5teNwLIHJ^QV1f7`r<_AG-Pk*ErUcJFu?6aC3lQ8^E8Na-eICvXj-*e!0GL?mQt zPJh^&do8)9avQ}kt~7nER+U$aTWGZ#Y;b?bsdQ*XUnG)Bc|f8M^N$<1MDweeu)&fX zw*NU#E=e}ImjCEtT$cmrTEV7F&1p)g_y@?I9ch@|xxc7DG;%$#RxOvzH`+vIr0enK zD55o}`0}}eQuZ4taf-ru224uHBXv;1ujQb@gp@Ce9?^7HglVUw<2$UvIXR~On@d@5 zUL=?+oE^~#CwH>UJSR_MilVYJJ-LV~8CVgfnR(Bhe~th;r8AgzRBFlm7TYF$)qt}| z+@VtxDl$c;!Wp2T3eAHz8T;ibbxPzs+HNr?*IJGQq}sRfXPp9x_)nn}vd?Xd?vb8* zYQ6U9nfrnSW!!Y3KH|14tZMtDg)i5*n!pCLIDTH)zYV@Qv%kt4+}e30rsm1QDKy=D zZrQx_A$%D*ybc|QUg}Ba=h&8$c&~+OdhOO_;Y9(ex03l1+YLJMlfuYJwY%79H{XT{ zkg47of@FGs+|Uuj$-r_gqPT!L5qno`8CHiiwR za-d+MY?6{2r({plhSO-&G?k8IeyD9Zk=Lf{F7Tz3L3dcRSgfpDJ-7LdyvcbMJf*c` zR?76SY^SU|eJP>g?947b*o;k2R2`GdUqVlnH?gV-s*7MAbhUsDjMC0V&XEkTs@?c8 zIZZ@q!X1nrIz?q_Ci|?ao`M)a*LC>8IZZfeLjB*kL=1JLy>q1wZ+(u?f zmg!0fbr=~%vcXgqtX!O^WMeov670CaQcl^v>NW1l%=@mpTVL!uG_2YZn zdAmxNx!^ixQqPgdvgUh-NBiaE(Sv1VShNT8FkOfDLrC7r1t!b|*DyL8s6RSdW*U;d z(%!v%9bRhr46}L@^3{Ly%}*Cog8H1Zb)|V-7*rqfYXpg8vcVi~?j^W;CTvyYi7)LV zx^g_)G>eySK8MfN3ZkohOHA2zoB>)XXjS-i#PF(OFt$9FN{ak9SJ+f1@aS)$%t8ia zf9k%#S8Y(SOqqX+iIJ!z8%Pz20jVgOmUiksS3yr)R|f_qj=6?Bi}7b`l-dp@(GSlG z)~J}Qcn|sc=)oDzI&kTxY|uSyg$79bU9=-+{?!oeIJ;R~GqfLGi|_^g(2mo~=8`H} z+1CkWb5X+GH2X$$UJ~#11hT-KAL!IYD!1Ee@x|{MaY7aYdT@u1>-=TfCZ=`Wu940o z;_floZZA~WD;BkpPN|G}5`WdQU~kG(YN%!jJHiIFT30?#$z< zIe6(8T{wftoLEXY;KFLhflLrvZ5S^_ubxmQxX7YdI}}L-9N+;1y_o{6Ka^=J0W^UB zPoxxON8dOA2|#N9E!zT>jcNQ#!{6-xAN4@PKegZ3gj)Vjh2Ks6t`Ot+A63BKG+Sgg zPG!Hn&~5X^fG?w{Z@?>H;-O{0VPr(W=g*T!SFaU-J@j;hRraA)S06~#9_yC!#YFoIfVrTmX=phob{r3GHFp}tl z9KZH4{%6EQI}zKy)VN3uf>v`jQV-*bm$=kM50Axf<0QxwKY?h5eu_jKQQ0APW`7PUw$` z12{0&)G@=*W0H19?D+FLhNGWro@)Zlyz#DpZci$1fD~#W*#_RB0jMj69>uPXQ`zws zNV>smEef(AePD|cRI~Y-68A6^goWNLnLdbQPeT?Rn75dYQw5;WtBM_4HyhUYuP{x| z$$~H`9tfD_*lG*p*7cVJK?YGaEZHW`)&(_88}8+cK8u^C*511PZS0NXx!ccYvN8*u zLX9l+JWOTFkSIo`?KaJF{}!9u9^@;% bW7fZMJ?bj0li!1XFyJ^o%e^mohQ|LN)PY}4 diff --git a/src/assets/images/room-widgets/camera-widget/viewfinder.png b/src/assets/images/room-widgets/camera-widget/viewfinder.png new file mode 100644 index 0000000000000000000000000000000000000000..ab6a9b24f6bfbe61befeddf8e75e1690811a46e6 GIT binary patch literal 959 zcmeAS@N?(olHy`uVBq!ia0y~yV6+2a4mO~Oh((P70|RrLr;B4q#jUq@eNVk|5NNx& z#!UJQ)9Hza8z#Q{a=x0c<1l|vC_k6@`$C`=28P=!SFQefI(V!0x6YN)DH|(_58ARW zyJ38~A8NPV+=HY? zq2`7$*dAIE5Bx%7*T&CVmCkcne(CarvpQlvg;&y(WQq3Bv{hy!3{t>X-)^+da%@`v1?sM~#X{vlv{5lGnoFt1q~FISuQ zCG3B7&&`$BrBfOO>}#&F0woiCdj2S*N2pc`=9l%#X|um6hrgfX)-x)yALJser}% zJO7x?#Rw*xA$^9Yz$J~%LJ1zys1X2(A8whz{^{zke==dQj;cZj)~$N=Nn}H|%iEc$ zF2Il$uxsIO;eW{d(D{c0kPAxOH%uXkyOjkhh@@si`ZU3Zhv!AQA?X1|Do6b5>F)dA lJM~sne)@Lm9LU8E>-f1hoe(_ia##<<^>p=fS?83{1OQ0_I2!-} literal 0 HcmV?d00001 diff --git a/src/assets/styles/icons.scss b/src/assets/styles/icons.scss index 95ef7a2b..53cfa487 100644 --- a/src/assets/styles/icons.scss +++ b/src/assets/styles/icons.scss @@ -476,13 +476,13 @@ &.icon-camera-colormatrix { background: url('../images/icons/camera-colormatrix.png'); width: 32px; - height: 14px; + height: 21px; } &.icon-camera-composite { background: url('../images/icons/camera-composite.png'); width: 32px; - height: 14px; + height: 21px; } &.icon-user-profile { diff --git a/src/views/room/widgets/camera/CameraWidgetView.scss b/src/views/room/widgets/camera/CameraWidgetView.scss index f56fecd3..52844d70 100644 --- a/src/views/room/widgets/camera/CameraWidgetView.scss +++ b/src/views/room/widgets/camera/CameraWidgetView.scss @@ -1,30 +1,41 @@ .nitro-camera-capture { - .nitro-close { - top: 7px; - right: 9px; + position: relative; + + .header-close { + top: 8px; + right: 8px; + border-radius: $border-radius; + box-shadow: 0 0 0 1.5px $white; + border: 2px solid #921911; + background: repeating-linear-gradient(rgba(245,80,65,1), rgba(245,80,65,1) 50%, rgba(194,48,39,1) 50%, rgba(194,48,39,1) 100%); + cursor: pointer; + line-height: 1; + padding: 1px 3px; + + &:hover { + filter: brightness(1.2); + } + + &:active { + filter: brightness(0.8); + } + } + + .camera-area { + position: absolute; + top: 37px; + left: 10px; + width: 320px; + height: 320px; } .camera-canvas { + position: relative; width: 340px; height: 462px; - background-image: url('../../../../assets/images/room-widgets/camera-widget/camera-spritesheet.png'); - - .camera-frame { - position: absolute; - width: 320px; - height: 320px; - margin-top: 37px; - margin-left: 11.4px; - - &.bg { - background: black; - } - - .camera-frame-preview-actions { - background: rgba(0, 0, 0, .5); - } - } + background-position: -1px -1px; + z-index: 2; .camera-button { width: 94px; @@ -33,14 +44,26 @@ margin-top: 362px; background-image: url('../../../../assets/images/room-widgets/camera-widget/camera-spritesheet.png'); - background-position: -340px 0px; + background-position: -343px -321px; &:hover { - background-position: -340px -94px; + background-position: -535px -321px; } &:active { - background-position: -340px -188px; + background-position: -439px -321px; + } + } + + .camera-view-finder { + background-image: url('../../../../assets/images/room-widgets/camera-widget/camera-spritesheet.png'); + background-position: -343px -1px; + } + + .camera-frame { + + .camera-frame-preview-actions { + background: rgba(0, 0, 0, .5); } } } diff --git a/src/views/room/widgets/camera/CameraWidgetView.tsx b/src/views/room/widgets/camera/CameraWidgetView.tsx index 5b57cdcf..b9ca0a10 100644 --- a/src/views/room/widgets/camera/CameraWidgetView.tsx +++ b/src/views/room/widgets/camera/CameraWidgetView.tsx @@ -1,48 +1,50 @@ -import { RoomWidgetCameraConfigurationComposer, RoomWidgetCameraConfigurationEvent } from 'nitro-renderer'; +import { InitCameraMessageEvent, IRoomCameraWidgetEffect, RequestCameraConfigurationComposer } from 'nitro-renderer'; import { RoomCameraWidgetManagerEvent } from 'nitro-renderer/src/nitro/camera/events/RoomCameraWidgetManagerEvent'; import { IRoomCameraWidgetSelectedEffect } from 'nitro-renderer/src/nitro/camera/IRoomCameraWidgetSelectedEffect'; -import { FC, useCallback, useEffect, useMemo, useState } from 'react'; +import { FC, useCallback, useEffect, useState } from 'react'; import { GetRoomCameraWidgetManager } from '../../../../api'; import { RoomWidgetCameraEvent } from '../../../../events/room-widgets/camera/RoomWidgetCameraEvent'; import { useCameraEvent } from '../../../../hooks/events/nitro/camera/camera-event'; import { useUiEvent } from '../../../../hooks/events/ui/ui-event'; import { CreateMessageHook, SendMessageHook } from '../../../../hooks/messages/message-event'; +import { CameraPicture } from './common/CameraPicture'; import { CameraWidgetContextProvider } from './context/CameraWidgetContext'; import { CameraWidgetCaptureView } from './views/capture/CameraWidgetCaptureView'; import { CameraWidgetCheckoutView } from './views/checkout/CameraWidgetCheckoutView'; import { CameraWidgetEditorView } from './views/editor/CameraWidgetEditorView'; +const MODE_NONE: number = 0; +const MODE_CAPTURE: number = 1; +const MODE_EDITOR: number = 2; +const MODE_CHECKOUT: number = 3; + export const CameraWidgetView: FC<{}> = props => { - const [ effectsReady, setEffectsReady ] = useState(false); - - const [ isCaptureVisible, setIsCaptureVisible ] = useState(false); - const [ isEditorVisible, setIsEditorVisible ] = useState(false); - const [ isCheckoutVisible, setIsCheckoutVisible ] = useState(false); - - const [ myLevel, setMyLevel ] = useState(10); - const [ cameraRoll, setCameraRoll ] = useState([]); + const [ mode, setMode ] = useState(MODE_NONE); + const [ availableEffects, setAvailableEffects ] = useState([]); + const [ cameraRoll, setCameraRoll ] = useState([]); const [ selectedPictureIndex, setSelectedPictureIndex ] = useState(-1); - const [ selectedEffects, setSelectedEffects ] = useState([]); - const [ isZoomed, setIsZoomed ] = useState(false); - const [ price, setPrice ] = useState<{credits: Number, points: Number, pointsType: number}>(null); + const [ selectedEffects, setSelectedEffects ] = useState([]); + const [ isZoomed, setIsZoomed ] = useState(false); + const [ myLevel, setMyLevel ] = useState(10); + const [ price, setPrice ] = useState<{ credits: number, duckets: number, publishDucketPrice: number }>(null); const onNitroEvent = useCallback((event: RoomWidgetCameraEvent) => { switch(event.type) { case RoomWidgetCameraEvent.SHOW_CAMERA: - setIsCaptureVisible(true); + setMode(MODE_CAPTURE); return; case RoomWidgetCameraEvent.HIDE_CAMERA: - setIsCaptureVisible(false); - setIsEditorVisible(false); - setIsCheckoutVisible(false); + setMode(MODE_NONE); return; case RoomWidgetCameraEvent.TOGGLE_CAMERA: - setIsCaptureVisible(value => !value); - setIsEditorVisible(false); - setIsCheckoutVisible(false); + setMode(prevValue => + { + if(!prevValue) return MODE_CAPTURE; + else return MODE_NONE; + }); return; } }, []); @@ -51,78 +53,68 @@ export const CameraWidgetView: FC<{}> = props => useUiEvent(RoomWidgetCameraEvent.HIDE_CAMERA, onNitroEvent); useUiEvent(RoomWidgetCameraEvent.TOGGLE_CAMERA, onNitroEvent); - useEffect(() => - { - if(price) return; - - SendMessageHook(new RoomWidgetCameraConfigurationComposer()); - }, [ price ]); - - const onCameraConfigurationEvent = useCallback((event: RoomWidgetCameraConfigurationEvent) => - { - const parser = event.getParser(); - - setPrice({ credits: parser.credits, points: parser.points, pointsType: parser.pointsType }); - }, []); - - CreateMessageHook(RoomWidgetCameraConfigurationEvent, onCameraConfigurationEvent); - - const availableEffects = useMemo(() => - { - if(!effectsReady) return null; - - return Array.from(GetRoomCameraWidgetManager().effects.values()); - }, [ effectsReady ]); - const onRoomCameraWidgetManagerEvent = useCallback((event: RoomCameraWidgetManagerEvent) => { - setEffectsReady(true); + setAvailableEffects(Array.from(GetRoomCameraWidgetManager().effects.values())) }, []); useCameraEvent(RoomCameraWidgetManagerEvent.INITIALIZED, onRoomCameraWidgetManagerEvent); + const onCameraConfigurationEvent = useCallback((event: InitCameraMessageEvent) => + { + const parser = event.getParser(); + + setPrice({ credits: parser.creditPrice, duckets: parser.ducketPrice, publishDucketPrice: parser.publishDucketPrice }); + }, []); + + CreateMessageHook(InitCameraMessageEvent, onCameraConfigurationEvent); + useEffect(() => { if(!GetRoomCameraWidgetManager().isLoaded) { GetRoomCameraWidgetManager().init(); + SendMessageHook(new RequestCameraConfigurationComposer()); + return; } - - setEffectsReady(true); }, []); - const processAction = useCallback((type: string, value: any = null) => + const processAction = useCallback((type: string) => { switch(type) { case 'close': - setIsCaptureVisible(false); - setIsEditorVisible(false); - setIsCheckoutVisible(false); + setMode(MODE_NONE); return; - case 'capture_edit': - setIsCaptureVisible(false); - setIsEditorVisible(true); + case 'edit': + setMode(MODE_EDITOR); + return; + case 'delete': + setCameraRoll(prevValue => + { + const clone = [ ...prevValue ]; + + clone.splice(selectedPictureIndex, 1); + + return clone; + }); return; case 'editor_cancel': - setIsCaptureVisible(true); - setIsEditorVisible(false); - setIsCheckoutVisible(false); + setMode(MODE_CAPTURE); return; - case 'editor_checkout': - setIsEditorVisible(false); - setIsCheckoutVisible(true); + case 'checkout': + setMode(MODE_CHECKOUT); return; } - }, []); + }, [ selectedPictureIndex ]); return ( - { isCaptureVisible && processAction('close') } onEditClick={ () => processAction('capture_edit') } /> } - { isEditorVisible && processAction('close') } onCancelClick={ () => processAction('editor_cancel') } onCheckoutClick={ () => processAction('editor_checkout') } availableEffects={ availableEffects } /> } - { isCheckoutVisible && processAction('close') } onCancelClick={ () => processAction('editor_cancel') } price={ price }> } + { (mode === MODE_CAPTURE) && processAction('close') } onEdit={ () => processAction('edit') } onDelete={ () => processAction('delete') } /> } + { (mode === MODE_EDITOR) && processAction('close') } onCancel={ () => processAction('editor_cancel') } onCheckout={ () => processAction('checkout') } availableEffects={ availableEffects } /> } + { (mode === MODE_CHECKOUT) && processAction('close') } onCancelClick={ () => processAction('editor_cancel') } price={ price }> } ); } diff --git a/src/views/room/widgets/camera/common/CameraPicture.ts b/src/views/room/widgets/camera/common/CameraPicture.ts new file mode 100644 index 00000000..34019568 --- /dev/null +++ b/src/views/room/widgets/camera/common/CameraPicture.ts @@ -0,0 +1,8 @@ +import { NitroTexture } from 'nitro-renderer'; + +export class CameraPicture +{ + constructor( + public texture: NitroTexture, + public imageUrl: string) {} +} diff --git a/src/views/room/widgets/camera/context/CameraWidgetContext.types.ts b/src/views/room/widgets/camera/context/CameraWidgetContext.types.ts index 8a25cb92..f1c1125d 100644 --- a/src/views/room/widgets/camera/context/CameraWidgetContext.types.ts +++ b/src/views/room/widgets/camera/context/CameraWidgetContext.types.ts @@ -1,10 +1,11 @@ import { IRoomCameraWidgetSelectedEffect } from 'nitro-renderer/src/nitro/camera/IRoomCameraWidgetSelectedEffect'; import { ProviderProps } from 'react'; +import { CameraPicture } from '../common/CameraPicture'; export interface ICameraWidgetContext { - cameraRoll: HTMLImageElement[], - setCameraRoll: (cameraRoll: HTMLImageElement[]) => void, + cameraRoll: CameraPicture[], + setCameraRoll: (cameraRoll: CameraPicture[]) => void, selectedPictureIndex: number, setSelectedPictureIndex: (index: number) => void, selectedEffects: IRoomCameraWidgetSelectedEffect[], diff --git a/src/views/room/widgets/camera/views/capture/CameraWidgetCaptureView.tsx b/src/views/room/widgets/camera/views/capture/CameraWidgetCaptureView.tsx index 659541ca..a0c9171b 100644 --- a/src/views/room/widgets/camera/views/capture/CameraWidgetCaptureView.tsx +++ b/src/views/room/widgets/camera/views/capture/CameraWidgetCaptureView.tsx @@ -1,105 +1,83 @@ -import classNames from 'classnames'; -import { NitroRectangle } from 'nitro-renderer'; +import { NitroRectangle, TextureUtils } from 'nitro-renderer'; import { FC, useCallback, useRef } from 'react'; import { GetRoomEngine, GetRoomSession } from '../../../../../../api'; import { DraggableWindow } from '../../../../../../layout/draggable-window/DraggableWindow'; import { LocalizeText } from '../../../../../../utils/LocalizeText'; +import { CameraPicture } from '../../common/CameraPicture'; import { useCameraWidgetContext } from '../../context/CameraWidgetContext'; import { CameraWidgetCaptureViewProps } from './CameraWidgetCaptureView.types'; +const CAMERA_ROLL_LIMIT: number = 5; + export const CameraWidgetCaptureView: FC = props => { - const { onCloseClick = null, onEditClick = null } = props; + const { onClose = null, onEdit = null, onDelete = null } = props; + const { cameraRoll = null, setCameraRoll = null, selectedPictureIndex = -1, setSelectedPictureIndex = null } = useCameraWidgetContext(); + const elementRef = useRef(); - const CAMERA_ROLL_LIMIT: number = 5; - const cameraFrameRef = useRef(); + const selectedPicture = ((selectedPictureIndex > -1) ? cameraRoll[selectedPictureIndex] : null); - const cameraWidgetContext = useCameraWidgetContext(); + const getCameraBounds = useCallback(() => + { + if(!elementRef || !elementRef.current) return null; + + const frameBounds = elementRef.current.getBoundingClientRect(); + + return new NitroRectangle(Math.floor(frameBounds.x), Math.floor(frameBounds.y), Math.floor(frameBounds.width), Math.floor(frameBounds.height)); + }, []); const takePicture = useCallback(() => { - if(cameraWidgetContext.selectedPictureIndex > -1) + if(selectedPictureIndex > -1) { - cameraWidgetContext.setSelectedPictureIndex(-1); + setSelectedPictureIndex(-1); + return; } - - const frameBounds = cameraFrameRef.current.getBoundingClientRect(); - if(!frameBounds) return; + const texture = GetRoomEngine().createTextureFromRoom(GetRoomSession().roomId, 1, getCameraBounds()); - const rectangle = new NitroRectangle(Math.floor(frameBounds.x), Math.floor(frameBounds.y), Math.floor(frameBounds.width), Math.floor(frameBounds.height)); + const clone = [ ...cameraRoll ]; - const texture = GetRoomEngine().createTextureFromRoom(GetRoomSession().roomId, 1, rectangle); - - if(cameraWidgetContext.cameraRoll.length + 1 === CAMERA_ROLL_LIMIT) + if(clone.length >= CAMERA_ROLL_LIMIT) { alert(LocalizeText('camera.full.body')); + + clone.pop(); } - let remainingRoll = cameraWidgetContext.cameraRoll; + clone.push(new CameraPicture(texture, TextureUtils.generateImageUrl(texture))); - if(cameraWidgetContext.cameraRoll.length === CAMERA_ROLL_LIMIT) - { - remainingRoll = remainingRoll.slice(0, CAMERA_ROLL_LIMIT - 1); - } - - //cameraWidgetContext.setCameraRoll([ ...remainingRoll, image ]); - }, [ cameraWidgetContext ]); - - const processAction = useCallback((type: string, value: string | number = null) => - { - switch(type) - { - case 'take_picture': - takePicture(); - return; - case 'preview_picture': - cameraWidgetContext.setSelectedPictureIndex(Number(value)); - return; - case 'discard_picture': - cameraWidgetContext.setSelectedPictureIndex(-1); - - const clone = Array.from(cameraWidgetContext.cameraRoll); - clone.splice(cameraWidgetContext.selectedPictureIndex, 1); - - cameraWidgetContext.setCameraRoll(clone); - return; - case 'edit_picture': - onEditClick(); - return; - case 'close': - onCloseClick(); - return; - } - }, [ takePicture, cameraWidgetContext, onEditClick, onCloseClick ]); + setCameraRoll(clone); + }, [ cameraRoll, selectedPictureIndex, getCameraBounds, setCameraRoll, setSelectedPictureIndex ]); return ( - -
-
-
processAction('close') }> - + +
+ { selectedPicture && } +
+
+
-
-1}) }> - { cameraWidgetContext.selectedPictureIndex > -1 &&
- + { !selectedPicture &&
} + { selectedPicture && +
- - + +
} -
-
+
-
- { cameraWidgetContext.cameraRoll.length > 0 &&
- { cameraWidgetContext.cameraRoll.map((picture, index) => - { - return processAction('preview_picture', index) } />; - }) } -
} +
+ { (cameraRoll.length > 0) && +
+ { cameraRoll.map((picture, index) => + { + return setSelectedPictureIndex(index) } />; + }) } +
}
); diff --git a/src/views/room/widgets/camera/views/capture/CameraWidgetCaptureView.types.ts b/src/views/room/widgets/camera/views/capture/CameraWidgetCaptureView.types.ts index 84f6d560..413aed8f 100644 --- a/src/views/room/widgets/camera/views/capture/CameraWidgetCaptureView.types.ts +++ b/src/views/room/widgets/camera/views/capture/CameraWidgetCaptureView.types.ts @@ -1,5 +1,6 @@ export interface CameraWidgetCaptureViewProps { - onCloseClick: () => void; - onEditClick: () => void; + onClose: () => void; + onEdit: () => void; + onDelete: () => void; } diff --git a/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.tsx b/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.tsx index 21b4727c..88188463 100644 --- a/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.tsx +++ b/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.tsx @@ -1,5 +1,5 @@ /* eslint-disable jsx-a11y/anchor-is-valid */ -import { RoomWidgetCameraPublishComposer, RoomWidgetCameraPublishedEvent, RoomWidgetCameraPurchaseComposer, RoomWidgetCameraPurchaseSuccessfulEvent } from 'nitro-renderer'; +import { CameraPublishStatusMessageEvent, CameraPurchaseOKMessageEvent, PublishPhotoMessageComposer, PurchasePhotoMessageComposer } from 'nitro-renderer'; import { FC, useCallback, useState } from 'react'; import { GetRoomCameraWidgetManager } from '../../../../../../api/nitro/camera/GetRoomCameraWidgetManager'; import { CreateMessageHook, SendMessageHook } from '../../../../../../hooks/messages/message-event'; @@ -12,36 +12,35 @@ import { CameraWidgetCheckoutViewProps } from './CameraWidgetCheckoutView.types' export const CameraWidgetCheckoutView: FC = props => { const { onCloseClick = null, onCancelClick = null, price = null } = props; - - const cameraWidgetContext = useCameraWidgetContext(); + const [ picturesBought, setPicturesBought ] = useState(0); + const [ wasPicturePublished, setWasPicturePublished ] = useState(false); + const [ isWaiting, setIsWaiting ] = useState(false); + const [ publishCooldown, setPublishCooldown ] = useState(0); + const { cameraRoll = null, selectedPictureIndex = -1, selectedEffects = null, isZoomed = false } = useCameraWidgetContext(); - const [ picturesBought, setPicturesBought ] = useState(0); - const [ wasPicturePublished, setWasPicturePublished ] = useState(false); - const [ isWaiting, setIsWaiting ] = useState(false); - const [ publishCooldown, setPublishCooldown ] = useState(0); - - const onCameraPurchaseSuccessfulEvent = useCallback((event: RoomWidgetCameraPurchaseSuccessfulEvent) => + const onCameraPurchaseOKMessageEvent = useCallback((event: CameraPurchaseOKMessageEvent) => { setPicturesBought(value => value + 1); setIsWaiting(false); }, []); - const onRoomWidgetCameraPublishedEvent = useCallback((event: RoomWidgetCameraPublishedEvent) => + CreateMessageHook(CameraPurchaseOKMessageEvent, onCameraPurchaseOKMessageEvent); + + const onCameraPublishStatusMessageEvent = useCallback((event: CameraPublishStatusMessageEvent) => { const parser = event.getParser(); - setPublishCooldown(parser.cooldownSeconds); - setWasPicturePublished(parser.wasSuccessful); + setPublishCooldown(parser.secondsToWait); + setWasPicturePublished(parser.ok); setIsWaiting(false); }, []); - CreateMessageHook(RoomWidgetCameraPurchaseSuccessfulEvent, onCameraPurchaseSuccessfulEvent); - CreateMessageHook(RoomWidgetCameraPublishedEvent, onRoomWidgetCameraPublishedEvent); + CreateMessageHook(CameraPublishStatusMessageEvent, onCameraPublishStatusMessageEvent); const getCurrentPicture = useCallback(() => { - return GetRoomCameraWidgetManager().applyEffects(cameraWidgetContext.cameraRoll[cameraWidgetContext.selectedPictureIndex], cameraWidgetContext.selectedEffects, cameraWidgetContext.isZoomed); - }, [ cameraWidgetContext ]); + return GetRoomCameraWidgetManager().applyEffects(cameraRoll[selectedPictureIndex].texture, selectedEffects, isZoomed); + }, [ cameraRoll, selectedPictureIndex, selectedEffects, isZoomed ]); const processAction = useCallback((type: string, value: string | number = null) => { @@ -54,13 +53,13 @@ export const CameraWidgetCheckoutView: FC = props if(isWaiting) return; setIsWaiting(true); - SendMessageHook(new RoomWidgetCameraPurchaseComposer()); + SendMessageHook(new PurchasePhotoMessageComposer('1_1627697499')); return; case 'publish': if(isWaiting) return; setIsWaiting(true); - SendMessageHook(new RoomWidgetCameraPublishComposer()); + SendMessageHook(new PublishPhotoMessageComposer()); return; case 'cancel': onCancelClick(); @@ -88,7 +87,7 @@ export const CameraWidgetCheckoutView: FC = props
-
{ LocalizeText(wasPicturePublished ? 'camera.publish.successful' : 'camera.publish.explanation') }{ !wasPicturePublished && price.points > 0 && <>: { price.points } }
+
{ LocalizeText(wasPicturePublished ? 'camera.publish.successful' : 'camera.publish.explanation') }{ !wasPicturePublished && price.duckets > 0 && <>: { price.duckets } }
{ LocalizeText(wasPicturePublished ? 'camera.publish.success.short.info' : 'camera.publish.detailed.explanation') }
{ wasPicturePublished && { LocalizeText('camera.link.to.published') } }
diff --git a/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.types.ts b/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.types.ts index c73dc021..dbbac494 100644 --- a/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.types.ts +++ b/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.types.ts @@ -2,5 +2,5 @@ export interface CameraWidgetCheckoutViewProps { onCloseClick: () => void; onCancelClick: () => void; - price: {credits: Number, points: Number, pointsType: number}; + price: { credits: number, duckets: number, publishDucketPrice: number }; } diff --git a/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.tsx b/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.tsx index b079dd9f..5bd4d4c1 100644 --- a/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.tsx +++ b/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.tsx @@ -7,17 +7,15 @@ import { LocalizeText } from '../../../../../../utils/LocalizeText'; import { useCameraWidgetContext } from '../../context/CameraWidgetContext'; import { CameraWidgetEditorTabs, CameraWidgetEditorViewProps } from './CameraWidgetEditorView.types'; +const TABS: string[] = [ CameraWidgetEditorTabs.COLORMATRIX, CameraWidgetEditorTabs.COMPOSITE ]; + export const CameraWidgetEditorView: FC = props => { - const { availableEffects = null, myLevel = null, onCloseClick = null, onCancelClick = null, onCheckoutClick = null } = props; - - const TABS: string[] = [ CameraWidgetEditorTabs.COLORMATRIX, CameraWidgetEditorTabs.COMPOSITE ]; - - const cameraWidgetContext = useCameraWidgetContext(); - - const [ currentTab, setCurrentTab ] = useState(CameraWidgetEditorTabs.COLORMATRIX); + const { availableEffects = null, myLevel = 1, onClose = null, onCancel = null, onCheckout = null } = props; + const [ currentTab, setCurrentTab ] = useState(TABS[0]); const [ selectedEffectName, setSelectedEffectName ] = useState(null); const [ effectsThumbnails, setEffectsThumbnails ] = useState<{ name: string, image: HTMLImageElement }[]>([]); + const { cameraRoll = null, selectedPictureIndex = -1, selectedEffects = null, isZoomed = false, setSelectedEffects = null, setIsZoomed = null } = useCameraWidgetContext(); useEffect(() => { @@ -25,11 +23,11 @@ export const CameraWidgetEditorView: FC = props => for(const effect of availableEffects) { - thumbnails.push({name: effect.name, image: GetRoomCameraWidgetManager().applyEffects(cameraWidgetContext.cameraRoll[cameraWidgetContext.selectedPictureIndex], [ new RoomCameraWidgetSelectedEffect(effect, 1) ], false)}); + thumbnails.push({name: effect.name, image: GetRoomCameraWidgetManager().applyEffects(cameraRoll[selectedPictureIndex].texture, [ new RoomCameraWidgetSelectedEffect(effect, 1) ], false)}); } setEffectsThumbnails(thumbnails); - }, [ cameraWidgetContext, availableEffects ]); + }, [ cameraRoll, selectedPictureIndex, availableEffects ]); const getEffectThumbnail = useCallback((effectName: string) => { @@ -54,24 +52,24 @@ export const CameraWidgetEditorView: FC = props => const getCurrentPicture = useCallback(() => { - return GetRoomCameraWidgetManager().applyEffects(cameraWidgetContext.cameraRoll[cameraWidgetContext.selectedPictureIndex], cameraWidgetContext.selectedEffects, cameraWidgetContext.isZoomed); - }, [ cameraWidgetContext ]); + return GetRoomCameraWidgetManager().applyEffects(cameraRoll[selectedPictureIndex].texture, selectedEffects, isZoomed); + }, [ cameraRoll, selectedPictureIndex, selectedEffects, isZoomed ]); const getCurrentEffectAlpha = useCallback(() => { if(!selectedEffectName) return 0; - const selectedEffect = cameraWidgetContext.selectedEffects.find(effect => effect.effect.name === selectedEffectName); + const selectedEffect = selectedEffects.find(effect => effect.effect.name === selectedEffectName); if(!selectedEffect) return 0; return selectedEffect.alpha; - }, [ selectedEffectName, cameraWidgetContext.selectedEffects ]); + }, [ selectedEffectName, selectedEffects ]); const getEffectIndex = useCallback((effectName) => { - return cameraWidgetContext.selectedEffects.findIndex(effect => effect.effect.name === effectName); - }, [ cameraWidgetContext.selectedEffects ]) + return selectedEffects.findIndex(effect => effect.effect.name === effectName); + }, [ selectedEffects ]) const setSelectedEffectAlpha = useCallback((newAlpha: number) => { @@ -81,27 +79,27 @@ export const CameraWidgetEditorView: FC = props => if(selectedEffectIndex === -1) return; - const clone = Array.from(cameraWidgetContext.selectedEffects); + const clone = Array.from(selectedEffects); const selectedEffect = clone[selectedEffectIndex]; clone[selectedEffectIndex] = new RoomCameraWidgetSelectedEffect(selectedEffect.effect, newAlpha); - cameraWidgetContext.setSelectedEffects(clone); - }, [ selectedEffectName, getEffectIndex, cameraWidgetContext ]); + setSelectedEffects(clone); + }, [ selectedEffectName, getEffectIndex, selectedEffects, setSelectedEffects ]); const processAction = useCallback((type: string, value: string | number = null) => { switch(type) { case 'close': - onCloseClick(); + onClose(); return; case 'cancel': - onCancelClick(); + onCancel(); return; case 'checkout': - onCheckoutClick(); + onCheckout(); return; case 'change_tab': setCurrentTab(String(value)); @@ -110,7 +108,7 @@ export const CameraWidgetEditorView: FC = props => { let existingIndex = -1; - if(cameraWidgetContext.selectedEffects.length > 0) + if(selectedEffects.length > 0) { existingIndex = getEffectIndex(value); } @@ -123,7 +121,7 @@ export const CameraWidgetEditorView: FC = props => if(effect.minLevel > myLevel) return; - cameraWidgetContext.setSelectedEffects([...cameraWidgetContext.selectedEffects, new RoomCameraWidgetSelectedEffect(effect, 0.5)]); + setSelectedEffects([...selectedEffects, new RoomCameraWidgetSelectedEffect(effect, 0.5)]); } if(effect && effect.minLevel > myLevel) return; @@ -144,32 +142,32 @@ export const CameraWidgetEditorView: FC = props => if(existingIndex > -1) { - const effect = cameraWidgetContext.selectedEffects[existingIndex]; + const effect = selectedEffects[existingIndex]; if(effect.effect.name === selectedEffectName) { setSelectedEffectName(null); } - const clone = Array.from(cameraWidgetContext.selectedEffects); + const clone = Array.from(selectedEffects); clone.splice(existingIndex, 1); - cameraWidgetContext.setSelectedEffects(clone); + setSelectedEffects(clone); } } return; case 'clear_effects': setSelectedEffectName(null); - cameraWidgetContext.setSelectedEffects([]); + setSelectedEffects([]); return; case 'download': window.open(getCurrentPicture().src, '_blank'); return; case 'zoom': - cameraWidgetContext.setIsZoomed(!cameraWidgetContext.isZoomed); + setIsZoomed(!isZoomed); return; } - }, [onCloseClick, onCancelClick, onCheckoutClick, cameraWidgetContext, getCurrentPicture, myLevel, selectedEffectName, getEffectIndex, availableEffects]); + }, [ onClose, onCancel, onCheckout, getCurrentPicture, myLevel, selectedEffectName, getEffectIndex, availableEffects, isZoomed, setIsZoomed, selectedEffects, setSelectedEffects ]); return ( @@ -219,7 +217,7 @@ export const CameraWidgetEditorView: FC = props =>
- +
diff --git a/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.types.ts b/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.types.ts index b953f117..38c58155 100644 --- a/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.types.ts +++ b/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.types.ts @@ -4,9 +4,9 @@ export interface CameraWidgetEditorViewProps { availableEffects: IRoomCameraWidgetEffect[]; myLevel: number; - onCloseClick: () => void; - onCancelClick: () => void; - onCheckoutClick: () => void; + onClose: () => void; + onCancel: () => void; + onCheckout: () => void; } export class CameraWidgetEditorTabs From edea0a6d5421e2d4c85ae8df6438b5f54a49df13 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 5 Aug 2021 13:30:18 -0400 Subject: [PATCH 30/66] Fix commands --- src/views/room/handlers/RoomWidgetChatInputHandler.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/room/handlers/RoomWidgetChatInputHandler.ts b/src/views/room/handlers/RoomWidgetChatInputHandler.ts index 1b21ff2d..c0223f21 100644 --- a/src/views/room/handlers/RoomWidgetChatInputHandler.ts +++ b/src/views/room/handlers/RoomWidgetChatInputHandler.ts @@ -115,10 +115,13 @@ export class RoomWidgetChatInputHandler extends RoomWidgetHandler return null; case ':screenshot': const texture = GetRoomEngine().createTextureFromRoom(this.container.roomSession.roomId, 1); + + const image = new Image(); + + image.src = TextureUtils.generateImageUrl(texture); const newWindow = window.open(''); - - newWindow.document.write(TextureUtils.generateImageUrl(texture)); + newWindow.document.write(image.outerHTML); return null; case ':pickall': // this.container.notificationService.alertWithConfirm('${room.confirm.pick_all}', '${generic.alert.title}', () => From 4e56447adcccbf8521c788c301e5029cc7bdafcd Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 5 Aug 2021 13:32:09 -0400 Subject: [PATCH 31/66] Notification updates --- .../NotificationCenterAddNotificationEvent.ts | 2 +- .../navigator/views/room-info/NavigatorRoomInfoView.tsx | 9 ++++++++- .../NotificationCenterMessageHandler.tsx | 6 ++++-- src/views/notification-center/NotificationCenterView.tsx | 2 ++ .../{utils => common}/BroadcastMessageNotification.ts | 0 .../{utils => common}/DialogMessageNotification.ts | 0 .../{utils => common}/HotelWillShutdownNotification.ts | 0 .../{utils => common}/MOTDNotification.ts | 0 .../{utils => common}/ModeratorMessageNotification.ts | 0 .../{utils => common}/Notification.ts | 0 .../reducers/NotificationCenterReducer.tsx | 8 ++++---- .../views/alert-base/NotificationCenterAlertBase.tsx | 1 + .../hotel-will-shutdown/HotelWillShutdownView.types.ts | 2 +- .../moderator-message/ModeratorMessageView.types.ts | 2 +- .../views/notification-bubble/NotificationBubbleView.tsx | 7 +++++++ .../notification-bubble/NotificationBubbleView.types.ts | 4 ++++ 16 files changed, 33 insertions(+), 10 deletions(-) rename src/views/notification-center/{utils => common}/BroadcastMessageNotification.ts (100%) rename src/views/notification-center/{utils => common}/DialogMessageNotification.ts (100%) rename src/views/notification-center/{utils => common}/HotelWillShutdownNotification.ts (100%) rename src/views/notification-center/{utils => common}/MOTDNotification.ts (100%) rename src/views/notification-center/{utils => common}/ModeratorMessageNotification.ts (100%) rename src/views/notification-center/{utils => common}/Notification.ts (100%) create mode 100644 src/views/notification-center/views/notification-bubble/NotificationBubbleView.tsx create mode 100644 src/views/notification-center/views/notification-bubble/NotificationBubbleView.types.ts diff --git a/src/events/notification-center/NotificationCenterAddNotificationEvent.ts b/src/events/notification-center/NotificationCenterAddNotificationEvent.ts index 5ee1469c..200fda47 100644 --- a/src/events/notification-center/NotificationCenterAddNotificationEvent.ts +++ b/src/events/notification-center/NotificationCenterAddNotificationEvent.ts @@ -1,4 +1,4 @@ -import { NitroNotification } from '../../views/notification-center/utils/Notification'; +import { NitroNotification } from '../../views/notification-center/common/Notification'; import { NotificationCenterEvent } from './NotificationCenterEvent'; export class NotificationCenterAddNotificationEvent extends NotificationCenterEvent diff --git a/src/views/navigator/views/room-info/NavigatorRoomInfoView.tsx b/src/views/navigator/views/room-info/NavigatorRoomInfoView.tsx index d927791d..7282afbf 100644 --- a/src/views/navigator/views/room-info/NavigatorRoomInfoView.tsx +++ b/src/views/navigator/views/room-info/NavigatorRoomInfoView.tsx @@ -26,12 +26,19 @@ export const NavigatorRoomInfoView: FC = props => useEffect(() => { if(!roomInfoData || !roomInfoData.enteredGuestRoom) return; + + let thumbnailUrl: string = null; if(roomInfoData.enteredGuestRoom.officialRoomPicRef) { - setRoomThumbnail(GetConfiguration('image.library.url') + roomInfoData.enteredGuestRoom.officialRoomPicRef); + thumbnailUrl = (GetConfiguration('image.library.url') + roomInfoData.enteredGuestRoom.officialRoomPicRef); + } + else + { + thumbnailUrl = (GetConfiguration('thumbnails.url').replace('%thumbnail%', roomInfoData.enteredGuestRoom.roomId.toString())); } + setRoomThumbnail(thumbnailUrl); setIsRoomPicked(roomInfoData.enteredGuestRoom.roomPicker); setIsRoomMuted(roomInfoData.enteredGuestRoom.allInRoomMuted); }, [ roomInfoData ]); diff --git a/src/views/notification-center/NotificationCenterMessageHandler.tsx b/src/views/notification-center/NotificationCenterMessageHandler.tsx index b6a845c2..69e2cab7 100644 --- a/src/views/notification-center/NotificationCenterMessageHandler.tsx +++ b/src/views/notification-center/NotificationCenterMessageHandler.tsx @@ -3,11 +3,11 @@ import { FC, useCallback } from 'react'; import { NotificationCenterAlertEvent } from '../../events'; import { dispatchUiEvent } from '../../hooks/events'; import { CreateMessageHook } from '../../hooks/messages'; +import { DialogMessageNotification } from './common/DialogMessageNotification'; +import { HotelWillShutdownNotification } from './common/HotelWillShutdownNotification'; import { useNotificationCenterContext } from './context/NotificationCenterContext'; import { INotificationCenterMessageHandlerProps } from './NotificationCenterMessageHandler.types'; import { NotificationCenterActions } from './reducers/NotificationCenterReducer'; -import { DialogMessageNotification } from './utils/DialogMessageNotification'; -import { HotelWillShutdownNotification } from './utils/HotelWillShutdownNotification'; export const NotificationCenterMessageHandler: FC = props => { @@ -50,6 +50,8 @@ export const NotificationCenterMessageHandler: FC = props => { const [ alerts, setAlerts ] = useState([]); + + const onNotificationCenterAlertEvent = useCallback((event: NotificationCenterAlertEvent) => { setAlerts(prevValue => diff --git a/src/views/notification-center/utils/BroadcastMessageNotification.ts b/src/views/notification-center/common/BroadcastMessageNotification.ts similarity index 100% rename from src/views/notification-center/utils/BroadcastMessageNotification.ts rename to src/views/notification-center/common/BroadcastMessageNotification.ts diff --git a/src/views/notification-center/utils/DialogMessageNotification.ts b/src/views/notification-center/common/DialogMessageNotification.ts similarity index 100% rename from src/views/notification-center/utils/DialogMessageNotification.ts rename to src/views/notification-center/common/DialogMessageNotification.ts diff --git a/src/views/notification-center/utils/HotelWillShutdownNotification.ts b/src/views/notification-center/common/HotelWillShutdownNotification.ts similarity index 100% rename from src/views/notification-center/utils/HotelWillShutdownNotification.ts rename to src/views/notification-center/common/HotelWillShutdownNotification.ts diff --git a/src/views/notification-center/utils/MOTDNotification.ts b/src/views/notification-center/common/MOTDNotification.ts similarity index 100% rename from src/views/notification-center/utils/MOTDNotification.ts rename to src/views/notification-center/common/MOTDNotification.ts diff --git a/src/views/notification-center/utils/ModeratorMessageNotification.ts b/src/views/notification-center/common/ModeratorMessageNotification.ts similarity index 100% rename from src/views/notification-center/utils/ModeratorMessageNotification.ts rename to src/views/notification-center/common/ModeratorMessageNotification.ts diff --git a/src/views/notification-center/utils/Notification.ts b/src/views/notification-center/common/Notification.ts similarity index 100% rename from src/views/notification-center/utils/Notification.ts rename to src/views/notification-center/common/Notification.ts diff --git a/src/views/notification-center/reducers/NotificationCenterReducer.tsx b/src/views/notification-center/reducers/NotificationCenterReducer.tsx index 00c1e4fe..6962ccd5 100644 --- a/src/views/notification-center/reducers/NotificationCenterReducer.tsx +++ b/src/views/notification-center/reducers/NotificationCenterReducer.tsx @@ -1,5 +1,5 @@ import { Reducer } from 'react'; -import { NitroNotification } from '../utils/Notification'; +import { NitroNotification } from '../common/Notification'; export interface INotificationCenterState { @@ -23,7 +23,7 @@ export class NotificationCenterActions } export const initialNotificationCenter: INotificationCenterState = { - notifications: null + notifications: [] } export const NotificationCenterReducer: Reducer = (state, action) => @@ -35,9 +35,9 @@ export const NotificationCenterReducer: Reducer = props => { const { headerText = LocalizeText('mod.alert.title'), onClose = null, children = null } = props; diff --git a/src/views/notification-center/views/hotel-will-shutdown/HotelWillShutdownView.types.ts b/src/views/notification-center/views/hotel-will-shutdown/HotelWillShutdownView.types.ts index 44ef5415..89915153 100644 --- a/src/views/notification-center/views/hotel-will-shutdown/HotelWillShutdownView.types.ts +++ b/src/views/notification-center/views/hotel-will-shutdown/HotelWillShutdownView.types.ts @@ -1,5 +1,5 @@ +import { HotelWillShutdownNotification } from '../../common/HotelWillShutdownNotification'; import { NotificationViewProps } from '../../NotificationCenterView.types'; -import { HotelWillShutdownNotification } from './../../utils/HotelWillShutdownNotification'; export class HotelWillShutdownViewProps extends NotificationViewProps { diff --git a/src/views/notification-center/views/moderator-message/ModeratorMessageView.types.ts b/src/views/notification-center/views/moderator-message/ModeratorMessageView.types.ts index 94ee3789..2e7c63de 100644 --- a/src/views/notification-center/views/moderator-message/ModeratorMessageView.types.ts +++ b/src/views/notification-center/views/moderator-message/ModeratorMessageView.types.ts @@ -1,5 +1,5 @@ +import { ModeratorMessageNotification } from '../../common/ModeratorMessageNotification'; import { NotificationViewProps } from '../../NotificationCenterView.types'; -import { ModeratorMessageNotification } from './../../utils/ModeratorMessageNotification'; export class ModeratorMessageViewProps extends NotificationViewProps { diff --git a/src/views/notification-center/views/notification-bubble/NotificationBubbleView.tsx b/src/views/notification-center/views/notification-bubble/NotificationBubbleView.tsx new file mode 100644 index 00000000..1803bae9 --- /dev/null +++ b/src/views/notification-center/views/notification-bubble/NotificationBubbleView.tsx @@ -0,0 +1,7 @@ +import { FC } from 'react'; +import { NotificationBubbleViewProps } from './NotificationBubbleView.types'; + +export const NotificationBubbleView: FC = props => +{ + return null; +} diff --git a/src/views/notification-center/views/notification-bubble/NotificationBubbleView.types.ts b/src/views/notification-center/views/notification-bubble/NotificationBubbleView.types.ts new file mode 100644 index 00000000..f46fd92a --- /dev/null +++ b/src/views/notification-center/views/notification-bubble/NotificationBubbleView.types.ts @@ -0,0 +1,4 @@ +export interface NotificationBubbleViewProps +{ + +} From 6721efcec50153c2f2dfcc8983daf3e70300df06 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 5 Aug 2021 13:32:22 -0400 Subject: [PATCH 32/66] Messenger updates --- src/views/friend-list/FriendListView.tsx | 45 +++++++++---------- .../FriendListFriendsItemView.tsx | 13 ++++++ .../FriendListFriendsItemView.types.ts | 6 +++ .../views/friends/FriendListFriendsView.tsx | 45 +++++++++---------- .../friends/FriendListFriendsView.types.ts | 4 +- 5 files changed, 65 insertions(+), 48 deletions(-) create mode 100644 src/views/friend-list/views/friends-item/FriendListFriendsItemView.tsx create mode 100644 src/views/friend-list/views/friends-item/FriendListFriendsItemView.types.ts diff --git a/src/views/friend-list/FriendListView.tsx b/src/views/friend-list/FriendListView.tsx index 15c447d2..d2f66666 100644 --- a/src/views/friend-list/FriendListView.tsx +++ b/src/views/friend-list/FriendListView.tsx @@ -7,7 +7,7 @@ import { FriendListSendFriendRequestEvent } from '../../events/friend-list/Frien import { useRoomEngineEvent } from '../../hooks/events'; import { dispatchUiEvent, useUiEvent } from '../../hooks/events/ui/ui-event'; import { SendMessageHook } from '../../hooks/messages/message-event'; -import { NitroCardAccordionItemView, NitroCardAccordionView, NitroCardHeaderView, NitroCardView } from '../../layout'; +import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../layout'; import { LocalizeText } from '../../utils/LocalizeText'; import { FriendListContextProvider } from './context/FriendListContext'; import { FriendListMessageHandler } from './FriendListMessageHandler'; @@ -43,18 +43,6 @@ export const FriendListView: FC = props => useUiEvent(FriendListEvent.TOGGLE_FRIEND_LIST, onFriendListEvent); useUiEvent(FriendListSendFriendRequestEvent.SEND_FRIEND_REQUEST, onFriendListEvent); - useEffect(() => - { - if(!settings) return; - - setIsReady(true); - }, [ settings ]); - - useEffect(() => - { - SendMessageHook(new MessengerInitComposer()); - }, []); - const onRoomEngineObjectEvent = useCallback((event: RoomEngineObjectEvent) => { const roomSession = GetRoomSession(); @@ -79,6 +67,18 @@ export const FriendListView: FC = props => useRoomEngineEvent(RoomEngineObjectEvent.ADDED, onRoomEngineObjectEvent); + useEffect(() => + { + if(!settings) return; + + setIsReady(true); + }, [ settings ]); + + useEffect(() => + { + SendMessageHook(new MessengerInitComposer()); + }, []); + return ( @@ -86,17 +86,14 @@ export const FriendListView: FC = props => { isVisible && setIsVisible(false) } /> - - - - - - abc - - - abc - - + +
{ LocalizeText('friendlist.search.friendscaption') }
+ +
{ LocalizeText('friendlist.search.friendscaption') }
+ +
{ LocalizeText('friendlist.friends.offlinecaption') }
+ +
}
); diff --git a/src/views/friend-list/views/friends-item/FriendListFriendsItemView.tsx b/src/views/friend-list/views/friends-item/FriendListFriendsItemView.tsx new file mode 100644 index 00000000..01cc84fc --- /dev/null +++ b/src/views/friend-list/views/friends-item/FriendListFriendsItemView.tsx @@ -0,0 +1,13 @@ +import { FC } from 'react'; +import { FriendListFriendsItemViewProps } from './FriendListFriendsItemView.types'; + +export const FriendListFriendsItemView: FC = props => +{ + const { friend = null } = props; + + return ( +
+
{ friend.name }
+
+ ); +} diff --git a/src/views/friend-list/views/friends-item/FriendListFriendsItemView.types.ts b/src/views/friend-list/views/friends-item/FriendListFriendsItemView.types.ts new file mode 100644 index 00000000..a64cbd3b --- /dev/null +++ b/src/views/friend-list/views/friends-item/FriendListFriendsItemView.types.ts @@ -0,0 +1,6 @@ +import { MessengerFriend } from '../../common/MessengerFriend'; + +export interface FriendListFriendsItemViewProps +{ + friend: MessengerFriend; +} diff --git a/src/views/friend-list/views/friends/FriendListFriendsView.tsx b/src/views/friend-list/views/friends/FriendListFriendsView.tsx index 3f8f9dd2..dc85985c 100644 --- a/src/views/friend-list/views/friends/FriendListFriendsView.tsx +++ b/src/views/friend-list/views/friends/FriendListFriendsView.tsx @@ -1,36 +1,35 @@ -import { FC, useState } from 'react'; -import { NitroCardAccordionItemView } from '../../../../layout/card/accordion/item/NitroCardAccordionItemView'; -import { NitroCardAccordionView } from '../../../../layout/card/accordion/NitroCardAccordionView'; +import { FC, useMemo } from 'react'; import { useFriendListContext } from '../../context/FriendListContext'; +import { FriendListFriendsItemView } from '../friends-item/FriendListFriendsItemView'; import { FriendListFriendsViewProps } from './FriendListFriendsView.types'; export const FriendListFriendsView: FC = props => { + const { online = true } = props; const { friendListState = null } = useFriendListContext(); + const { friends = null } = friendListState; - const [ isOnlineFriendsExtended, setIsOnlineFriendsExtended ] = useState(false); - const [ isOfflineFriendsExtended, setIsOfflineFriendsExtended ] = useState(false); - - function toggleOnlineFriends(): void + const getFriendElements = useMemo(() => { - setIsOnlineFriendsExtended(value => !value); - } + if(!friends || !friends.length) return null; - function toggleOfflineFriends(): void - { - setIsOfflineFriendsExtended(value => !value); - } + const elements: JSX.Element[] = []; + + for(const friend of friends) + { + if(!friend || (friend.online !== online)) continue; + + elements.push() + } + + console.log(elements); + + return elements; + }, [ friends, online ]); return ( - <> - - - abc - - - abc - - - +
+ { getFriendElements } +
); } diff --git a/src/views/friend-list/views/friends/FriendListFriendsView.types.ts b/src/views/friend-list/views/friends/FriendListFriendsView.types.ts index d91e6e6d..8f71b6ad 100644 --- a/src/views/friend-list/views/friends/FriendListFriendsView.types.ts +++ b/src/views/friend-list/views/friends/FriendListFriendsView.types.ts @@ -1,2 +1,4 @@ export interface FriendListFriendsViewProps -{} +{ + online?: boolean; +} From 0e2e50bb779af04b9bd3ed6bc3b52340de362fd4 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 5 Aug 2021 13:32:36 -0400 Subject: [PATCH 33/66] Achievement updates --- .../AchievementsMessageHandler.tsx | 2 +- src/views/achievements/AchievementsView.scss | 15 ++-- src/views/achievements/AchievementsView.tsx | 10 +-- .../{utils => common}/AchievementCategory.ts | 0 .../reducers/AchievementsReducer.tsx | 2 +- .../AchievementCategoryListItemView.tsx | 65 +++++++++++++++++ .../AchievementCategoryListItemView.types.ts | 7 ++ .../category-list/AchievementsListView.tsx | 19 +++++ .../views/list/AchievementListView.types.ts | 2 - .../views/list/AchievementsListView.tsx | 70 ------------------- 10 files changed, 100 insertions(+), 92 deletions(-) rename src/views/achievements/{utils => common}/AchievementCategory.ts (100%) create mode 100644 src/views/achievements/views/category-list-item/AchievementCategoryListItemView.tsx create mode 100644 src/views/achievements/views/category-list-item/AchievementCategoryListItemView.types.ts create mode 100644 src/views/achievements/views/category-list/AchievementsListView.tsx delete mode 100644 src/views/achievements/views/list/AchievementListView.types.ts delete mode 100644 src/views/achievements/views/list/AchievementsListView.tsx diff --git a/src/views/achievements/AchievementsMessageHandler.tsx b/src/views/achievements/AchievementsMessageHandler.tsx index d29009f0..9bd075de 100644 --- a/src/views/achievements/AchievementsMessageHandler.tsx +++ b/src/views/achievements/AchievementsMessageHandler.tsx @@ -2,9 +2,9 @@ import { AchievementEvent, AchievementsEvent, AchievementsScoreEvent } from 'nit import { FC, useCallback } from 'react'; import { CreateMessageHook } from '../../hooks/messages'; import { IAchievementsMessageHandlerProps } from './AchievementsMessageHandler.types'; +import { AchievementCategory } from './common/AchievementCategory'; import { useAchievementsContext } from './context/AchievementsContext'; import { AchievementsActions } from './reducers/AchievementsReducer'; -import { AchievementCategory } from './utils/AchievementCategory'; export const AchievementsMessageHandler: FC = props => { diff --git a/src/views/achievements/AchievementsView.scss b/src/views/achievements/AchievementsView.scss index 902968b8..00014327 100644 --- a/src/views/achievements/AchievementsView.scss +++ b/src/views/achievements/AchievementsView.scss @@ -1,6 +1,10 @@ .nitro-achievements { width: 650px; - height: 376px; + + .content-area { + min-height: 376px; + height: 376px; + } .score { border-color: $grid-border-color !important; @@ -8,15 +12,6 @@ } .category { - border-color: $grid-border-color !important; - background-color: $grid-bg-color; - cursor: pointer; - - &.active { - border-color: $grid-active-border-color !important; - background-color: $grid-active-bg-color; - } - .category-score { margin-top: 43.5px; } diff --git a/src/views/achievements/AchievementsView.tsx b/src/views/achievements/AchievementsView.tsx index 88789d2b..892bca9d 100644 --- a/src/views/achievements/AchievementsView.tsx +++ b/src/views/achievements/AchievementsView.tsx @@ -1,4 +1,4 @@ -import { FC, useCallback, useEffect, useReducer, useState } from 'react'; +import { FC, useCallback, useReducer, useState } from 'react'; import { AchievementsUIEvent } from '../../events/achievements'; import { useUiEvent } from '../../hooks/events'; import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../layout'; @@ -7,8 +7,8 @@ import { AchievementsMessageHandler } from './AchievementsMessageHandler'; import { AchievementsViewProps } from './AchievementsView.types'; import { AchievementsContextProvider } from './context/AchievementsContext'; import { AchievementsReducer, initialAchievements } from './reducers/AchievementsReducer'; +import { AchievementsListView } from './views/category-list/AchievementsListView'; import { AchievementCategoryView } from './views/category/AchievementCategoryView'; -import { AchievementsListView } from './views/list/AchievementsListView'; export const AchievementsView: FC = props => { @@ -35,12 +35,6 @@ export const AchievementsView: FC = props => useUiEvent(AchievementsUIEvent.SHOW_ACHIEVEMENTS, onAchievementsEvent); useUiEvent(AchievementsUIEvent.HIDE_ACHIEVEMENTS, onAchievementsEvent); useUiEvent(AchievementsUIEvent.TOGGLE_ACHIEVEMENTS, onAchievementsEvent); - - useEffect(() => - { - if(!isVisible) return; - - }, [ isVisible ]); return ( diff --git a/src/views/achievements/utils/AchievementCategory.ts b/src/views/achievements/common/AchievementCategory.ts similarity index 100% rename from src/views/achievements/utils/AchievementCategory.ts rename to src/views/achievements/common/AchievementCategory.ts diff --git a/src/views/achievements/reducers/AchievementsReducer.tsx b/src/views/achievements/reducers/AchievementsReducer.tsx index 1224a86b..460d998a 100644 --- a/src/views/achievements/reducers/AchievementsReducer.tsx +++ b/src/views/achievements/reducers/AchievementsReducer.tsx @@ -1,5 +1,5 @@ import { Reducer } from 'react'; -import { AchievementCategory } from '../utils/AchievementCategory'; +import { AchievementCategory } from '../common/AchievementCategory'; export interface IAchievementsState { diff --git a/src/views/achievements/views/category-list-item/AchievementCategoryListItemView.tsx b/src/views/achievements/views/category-list-item/AchievementCategoryListItemView.tsx new file mode 100644 index 00000000..21ebb6a7 --- /dev/null +++ b/src/views/achievements/views/category-list-item/AchievementCategoryListItemView.tsx @@ -0,0 +1,65 @@ +import { FC, useCallback, useMemo } from 'react'; +import { GetConfiguration } from '../../../../api'; +import { NitroCardGridItemView } from '../../../../layout/card/grid/item/NitroCardGridItemView'; +import { useAchievementsContext } from '../../context/AchievementsContext'; +import { AchievementsActions } from '../../reducers/AchievementsReducer'; +import { AchievementCategoryListItemViewProps } from './AchievementCategoryListItemView.types'; + +export const AchievementCategoryListItemView: FC = props => +{ + const { category = null, isActive = false } = props; + const { dispatchAchievementsState = null } = useAchievementsContext(); + + const categoryLevel = useMemo(() => + { + let level = 0; + + for(const achievement of category.achievements) + { + level = (level + (achievement.finalLevel ? achievement.level : (achievement.level - 1))); + } + + return level; + }, [ category ]); + + const getCategoryImage = useMemo(() => + { + const level = categoryLevel; + const imageUrl = GetConfiguration('achievements.images.url'); + + return imageUrl.replace('%image%', `achcategory_${ category.name }_${ ((level > 0) ? 'active' : 'inactive') }`); + }, [ category, categoryLevel ]); + + const getCategoryProgress = useMemo(() => + { + let completed = 0; + let total = 0; + + for(const achievement of category.achievements) + { + if(!achievement) continue; + + if(achievement.firstLevelAchieved) completed = (completed + ((achievement.finalLevel) ? achievement.level : (achievement.level - 1))); + + total += achievement.scoreLimit; + } + + return (completed + ' / ' + total); + }, [ category ]); + + const selectCategory = useCallback((name: string) => + { + dispatchAchievementsState({ + type: AchievementsActions.SELECT_CATEGORY, + payload: { + selectedCategoryName: name + } + }); + }, [ dispatchAchievementsState ]); + + return ( + selectCategory(category.name) }> +
{ getCategoryProgress }
+
+ ); +} diff --git a/src/views/achievements/views/category-list-item/AchievementCategoryListItemView.types.ts b/src/views/achievements/views/category-list-item/AchievementCategoryListItemView.types.ts new file mode 100644 index 00000000..96e6b946 --- /dev/null +++ b/src/views/achievements/views/category-list-item/AchievementCategoryListItemView.types.ts @@ -0,0 +1,7 @@ +import { AchievementCategory } from '../../common/AchievementCategory'; + +export interface AchievementCategoryListItemViewProps +{ + category: AchievementCategory; + isActive?: boolean; +} diff --git a/src/views/achievements/views/category-list/AchievementsListView.tsx b/src/views/achievements/views/category-list/AchievementsListView.tsx new file mode 100644 index 00000000..216a3c3c --- /dev/null +++ b/src/views/achievements/views/category-list/AchievementsListView.tsx @@ -0,0 +1,19 @@ +import { FC } from 'react'; +import { NitroCardGridView } from '../../../../layout/card/grid/NitroCardGridView'; +import { useAchievementsContext } from '../../context/AchievementsContext'; +import { AchievementCategoryListItemView } from '../category-list-item/AchievementCategoryListItemView'; + +export const AchievementsListView: FC<{}> = props => +{ + const { achievementsState = null, dispatchAchievementsState = null } = useAchievementsContext();; + const { categories = null, selectedCategoryName = null } = achievementsState; + + return ( + + { categories && categories.map((category, index) => + { + return ; + }) } + + ); +}; diff --git a/src/views/achievements/views/list/AchievementListView.types.ts b/src/views/achievements/views/list/AchievementListView.types.ts deleted file mode 100644 index 047bd157..00000000 --- a/src/views/achievements/views/list/AchievementListView.types.ts +++ /dev/null @@ -1,2 +0,0 @@ -export class AchievementListViewProps -{} diff --git a/src/views/achievements/views/list/AchievementsListView.tsx b/src/views/achievements/views/list/AchievementsListView.tsx deleted file mode 100644 index a2615ab8..00000000 --- a/src/views/achievements/views/list/AchievementsListView.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import classNames from 'classnames'; -import { FC, useCallback } from 'react'; -import { GetConfiguration } from '../../../../api'; -import { useAchievementsContext } from '../../context/AchievementsContext'; -import { AchievementsActions } from '../../reducers/AchievementsReducer'; -import { AchievementCategory } from '../../utils/AchievementCategory'; -import { AchievementListViewProps } from './AchievementListView.types'; - -export const AchievementsListView: FC = props => -{ - const achievementsContext = useAchievementsContext(); - - const { achievementsState = null, dispatchAchievementsState = null } = achievementsContext; - const { categories = null, selectedCategoryName = null } = achievementsState; - - const getCategoryImage = useCallback((category: AchievementCategory) => - { - let level = 0; - - for(const achievement of category.achievements) - { - level = (level + ((achievement.finalLevel) ? achievement.level : (achievement.level - 1))); - } - - const isActive = ((level > 0) ? 'active' : 'inactive'); - - return GetConfiguration('achievements.images.url', GetConfiguration('achievements.images.url') + `quests/achcategory_${category.name}_${isActive}.png`).replace('%image%',`achcategory_${category.name}_${isActive}`); - }, []); - - const getCategoryProgress = useCallback((category: AchievementCategory) => - { - let completed = 0; - let total = 0; - - for(const achievement of category.achievements) - { - if(!achievement) continue; - - if(achievement.finalLevel) completed = completed + 1 + achievement.level; - - total = (total + achievement.scoreLimit); - } - - return (completed + ' / ' + total); - }, []); - - const selectCategory = useCallback((name: string) => - { - dispatchAchievementsState({ - type: AchievementsActions.SELECT_CATEGORY, - payload: { - selectedCategoryName: name - } - }); - }, [ dispatchAchievementsState ]); - - return ( -
- { categories && categories.map((category, index) => - { - return
-
selectCategory(category.name)}> - -
{ getCategoryProgress(category) }
-
-
- }) } -
- ); -}; From 6c23e3fadedc43320c2aff2826ca2e36a3ec47d7 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 5 Aug 2021 13:32:56 -0400 Subject: [PATCH 34/66] Updates --- src/assets/styles/scrollbars.scss | 1 + src/layout/draggable-window/DraggableWindow.types.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/assets/styles/scrollbars.scss b/src/assets/styles/scrollbars.scss index a011c8fa..f4120813 100644 --- a/src/assets/styles/scrollbars.scss +++ b/src/assets/styles/scrollbars.scss @@ -1,5 +1,6 @@ ::-webkit-scrollbar { width: 0.5rem; + height: 0.5rem; } ::-webkit-scrollbar-track { diff --git a/src/layout/draggable-window/DraggableWindow.types.tsx b/src/layout/draggable-window/DraggableWindow.types.tsx index d74ff113..9bba06fa 100644 --- a/src/layout/draggable-window/DraggableWindow.types.tsx +++ b/src/layout/draggable-window/DraggableWindow.types.tsx @@ -3,7 +3,7 @@ import { DraggableProps } from 'react-draggable'; export interface DraggableWindowProps { - handle: string; + handle?: string; draggableOptions?: Partial; disableDrag?: boolean; noCenter?: boolean; From f5b9bcc74c3a6bfc67d263cd971c354fa5d4fdec Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 5 Aug 2021 23:38:57 -0400 Subject: [PATCH 35/66] Update nitro-renderer to @nitrots/nitro-renderer --- package-lock.json | 3565 ++++++++--------- package.json | 2 +- src/App.tsx | 22 +- src/api/core/GetConfigurationManager.ts | 2 +- src/api/core/GetNitroCore.ts | 2 +- src/api/navigator/TryVisitRoom.ts | 2 +- src/api/nitro/AddLinkEventTracker.ts | 2 +- src/api/nitro/GetCommunication.ts | 2 +- src/api/nitro/GetConnection.ts | 2 +- src/api/nitro/GetNitroInstance.ts | 2 +- src/api/nitro/RemoveLinkEventTracker.ts | 2 +- src/api/nitro/avatar/GetAvatarPalette.ts | 2 +- .../nitro/avatar/GetAvatarRenderManager.ts | 2 +- src/api/nitro/avatar/GetAvatarSetType.ts | 2 +- .../camera/GetRoomCameraWidgetManager.ts | 2 +- src/api/nitro/room/DispatchMouseEvent.ts | 2 +- src/api/nitro/room/DispatchTouchEvent.ts | 2 +- src/api/nitro/room/GetOwnRoomObject.ts | 2 +- src/api/nitro/room/GetRoomEngine.ts | 2 +- src/api/nitro/room/GetRoomObjectBounds.ts | 2 +- .../room/IsFurnitureSelectionDisabled.ts | 2 +- .../nitro/session/CanManipulateFurniture.ts | 2 +- src/api/nitro/session/GetCanStandUp.ts | 2 +- src/api/nitro/session/GetCanUseExpression.ts | 2 +- .../GetFurnitureDataForProductOffer.ts | 2 +- .../session/GetFurnitureDataForRoomObject.ts | 2 +- src/api/nitro/session/GetOwnPosture.ts | 2 +- .../session/GetProductDataForLocalization.ts | 2 +- src/api/nitro/session/GetRoomSession.ts | 2 +- .../nitro/session/GetRoomSessionManager.ts | 2 +- .../nitro/session/GetSessionDataManager.ts | 2 +- src/api/nitro/session/HasHabboClub.ts | 2 +- src/api/nitro/session/HasHabboVip.ts | 2 +- src/api/nitro/session/IsOwnerOfFurniture.ts | 2 +- src/api/nitro/session/IsRidingHorse.ts | 2 +- src/api/nitro/session/StartRoomSession.ts | 2 +- .../achievements/AchievementsUIEvent.ts | 2 +- src/events/avatar-editor/AvatarEditorEvent.ts | 2 +- src/events/catalog/CatalogEvent.ts | 2 +- src/events/catalog/CatalogPurchasedEvent.ts | 2 +- src/events/friend-list/FriendListEvent.ts | 2 +- .../inventory/InventoryBadgesRequestEvent.ts | 2 +- .../inventory/InventoryBadgesUpdatedEvent.ts | 2 +- src/events/inventory/InventoryEvent.ts | 2 +- .../inventory/UnseenItemTrackerUpdateEvent.ts | 2 +- src/events/mod-tools/ModToolsEvent.ts | 2 +- src/events/navigator/NavigatorEvent.ts | 2 +- .../NotificationCenterAlertEvent.ts | 2 +- .../NotificationCenterEvent.ts | 2 +- src/events/wired/WiredEvent.ts | 2 +- .../communication/communication-event.tsx | 2 +- .../configuration/configuration-event.tsx | 2 +- src/hooks/events/event-dispatcher.base.tsx | 2 +- .../events/nitro/avatar/avatar-event.tsx | 2 +- .../events/nitro/camera/camera-event.tsx | 2 +- .../nitro/localization/localization-event.tsx | 2 +- src/hooks/events/nitro/main-event.tsx | 2 +- .../events/nitro/room/room-engine-event.tsx | 2 +- .../session/room-session-manager-event.tsx | 2 +- .../session/session-data-manager-event.tsx | 2 +- src/hooks/events/ui/ui-event.tsx | 2 +- src/hooks/messages/message-event.tsx | 2 +- src/views/Styles.scss | 1 - .../AchievementsMessageHandler.tsx | 2 +- .../common/AchievementCategory.ts | 2 +- .../category/AchievementCategoryView.tsx | 2 +- src/views/auth/AuthView.scss | 11 - src/views/auth/AuthView.tsx | 173 - src/views/auth/AuthView.types.ts | 14 - src/views/auth/views/form/AuthFormView.tsx | 30 - .../auth/views/form/AuthFormView.types.ts | 8 - src/views/avatar-editor/AvatarEditorView.tsx | 2 +- .../common/AvatarEditorGridColorItem.ts | 2 +- .../common/AvatarEditorGridPartItem.ts | 2 +- .../common/AvatarEditorUtilities.ts | 2 +- src/views/avatar-editor/common/BodyModel.ts | 2 +- .../avatar-editor/common/CategoryData.ts | 2 +- .../avatar-editor/common/FigureGenerator.ts | 2 +- src/views/avatar-editor/common/HeadModel.ts | 2 +- src/views/avatar-editor/common/LegModel.ts | 2 +- src/views/avatar-editor/common/TorsoModel.ts | 2 +- .../wardrobe/AvatarEditorWardrobeView.tsx | 2 +- src/views/catalog/CatalogMessageHandler.tsx | 2 +- src/views/catalog/CatalogView.tsx | 2 +- src/views/catalog/common/CatalogPetPalette.ts | 2 +- src/views/catalog/common/CatalogUtilities.ts | 2 +- .../common/GiftWrappingConfiguration.ts | 2 +- src/views/catalog/reducers/CatalogReducer.tsx | 2 +- .../CatalogRoomPreviewerView.tsx | 2 +- .../navigation/CatalogNavigationView.tsx | 2 +- .../navigation/CatalogNavigationView.types.ts | 2 +- .../item/CatalogNavigationItemView.tsx | 2 +- .../item/CatalogNavigationItemView.types.ts | 2 +- .../set/CatalogNavigationSetView.tsx | 2 +- .../set/CatalogNavigationSetView.types.ts | 2 +- .../catalog/views/page/CatalogPageView.tsx | 2 +- .../views/page/CatalogPageView.types.ts | 2 +- .../views/page/layout/CatalogLayout.types.ts | 2 +- .../views/page/layout/GetCatalogLayout.tsx | 2 +- .../CatalogLayoutBadgeDisplayView.tsx | 2 +- .../CatalogLayoutFrontpage4View.tsx | 2 +- .../CatalogLayoutGuildCustomFurniView.tsx | 2 +- .../CatalogLayoutGuildForumView.tsx | 2 +- .../page/layout/pets/CatalogLayoutPetView.tsx | 2 +- .../purchase/CatalogLayoutPetPurchaseView.tsx | 2 +- .../CatalogLayoutPetPurchaseView.types.ts | 2 +- .../spaces-new/CatalogLayoutSpacesView.tsx | 2 +- .../vip-buy/CatalogLayoutVipBuyView.tsx | 2 +- .../views/page/offer/CatalogPageOfferView.tsx | 2 +- .../page/offer/CatalogPageOfferView.types.ts | 2 +- .../offers/CatalogPageOffersView.types.ts | 2 +- .../views/page/product/CatalogProductView.tsx | 2 +- .../page/product/CatalogProductView.types.ts | 2 +- .../purchase/CatalogPurchaseView.types.ts | 2 +- .../CatalogPurchaseButtonView.tsx | 2 +- .../CatalogPurchaseButtonView.types.ts | 2 +- .../CatalogPurchaseGiftButtonView.types.ts | 2 +- .../CatalogLayoutSearchResultView.types.ts | 2 +- .../offer/CatalogSearchResultOfferView.tsx | 2 +- .../CatalogSearchResultOfferView.types.ts | 2 +- .../offers/CatalogSearchResultOffersView.tsx | 2 +- .../CatalogSearchResultOffersView.types.ts | 2 +- .../views/search/CatalogSearchView.tsx | 2 +- .../friend-list/FriendListMessageHandler.tsx | 2 +- src/views/friend-list/FriendListView.tsx | 2 +- .../friend-list/common/MessengerSettings.ts | 2 +- .../reducers/FriendListReducer.tsx | 2 +- .../friend-bar-item/FriendBarItemView.tsx | 2 +- src/views/hotel-view/HotelView.tsx | 2 +- .../inventory/InventoryMessageHandler.tsx | 2 +- src/views/inventory/InventoryView.tsx | 2 +- src/views/inventory/common/BotItem.ts | 2 +- src/views/inventory/common/BotUtilities.ts | 2 +- src/views/inventory/common/FurnitureItem.ts | 2 +- .../inventory/common/FurnitureUtilities.ts | 2 +- src/views/inventory/common/GroupItem.ts | 2 +- src/views/inventory/common/IFurnitureItem.ts | 2 +- src/views/inventory/common/PetItem.ts | 2 +- src/views/inventory/common/PetUtilities.ts | 2 +- src/views/inventory/common/TradeUserData.ts | 2 +- .../inventory/common/TradingUtilities.ts | 2 +- .../common/unseen/UnseenItemTracker.ts | 2 +- .../reducers/InventoryBadgeReducer.tsx | 2 +- .../reducers/InventoryBotReducer.tsx | 2 +- .../reducers/InventoryFurnitureReducer.tsx | 2 +- .../reducers/InventoryPetReducer.tsx | 2 +- .../views/badge/InventoryBadgeView.tsx | 2 +- .../badge/item/InventoryBadgeItemView.tsx | 2 +- .../inventory/views/bot/InventoryBotView.tsx | 2 +- .../views/bot/InventoryBotView.types.ts | 2 +- .../views/bot/item/InventoryBotItemView.tsx | 2 +- .../furniture/InventoryFurnitureView.tsx | 2 +- .../furniture/InventoryFurnitureView.types.ts | 2 +- .../item/InventoryFurnitureItemView.tsx | 2 +- .../inventory/views/pet/InventoryPetView.tsx | 2 +- .../views/pet/InventoryPetView.types.ts | 2 +- .../views/pet/item/InventoryPetItemView.tsx | 2 +- .../views/trade/InventoryTradeView.tsx | 2 +- src/views/main/MainView.tsx | 2 +- src/views/mod-tools/ModToolsView.tsx | 2 +- .../views/chatlog/ModToolsChatlogView.tsx | 2 +- .../mod-tools/views/room/ModToolsRoomView.tsx | 2 +- .../navigator/NavigatorMessageHandler.tsx | 2 +- src/views/navigator/NavigatorView.tsx | 2 +- src/views/navigator/NavigatorView.types.ts | 2 +- src/views/navigator/common/RoomInfoData.ts | 2 +- .../navigator/common/RoomSettingsData.ts | 2 +- .../navigator/reducers/NavigatorReducer.tsx | 2 +- .../creator/NavigatorRoomCreatorView.tsx | 2 +- .../creator/NavigatorRoomCreatorView.types.ts | 2 +- .../views/room-info/NavigatorRoomInfoView.tsx | 2 +- .../NavigatorRoomSettingsView.tsx | 2 +- .../NavigatorSearchResultItemView.tsx | 2 +- .../NavigatorSearchResultItemView.types.ts | 2 +- .../NavigatorSearchResultView.types.ts | 2 +- .../NotificationCenterMessageHandler.tsx | 2 +- src/views/purse/PurseMessageHandler.tsx | 2 +- src/views/purse/PurseView.tsx | 2 +- src/views/purse/common/Purse.ts | 2 +- src/views/room-host/RoomHostView.tsx | 2 +- src/views/room/RoomColorView.tsx | 2 +- src/views/room/RoomView.tsx | 2 +- src/views/room/RoomView.types.ts | 2 +- src/views/room/context/RoomContext.types.ts | 2 +- .../room/events/RoomWidgetUpdateEvent.ts | 2 +- .../RoomWidgetUpdateInfostandFurniEvent.ts | 2 +- .../events/RoomWidgetUpdateRoomViewEvent.ts | 2 +- .../FurnitureContextMenuWidgetHandler.ts | 2 +- ...FurnitureCustomStackHeightWidgetHandler.ts | 2 +- src/views/room/handlers/IRoomWidgetHandler.ts | 2 +- .../handlers/IRoomWidgetHandlerManager.ts | 2 +- .../handlers/RoomWidgetAvatarInfoHandler.ts | 2 +- .../room/handlers/RoomWidgetChatHandler.ts | 2 +- .../handlers/RoomWidgetChatInputHandler.ts | 2 +- src/views/room/handlers/RoomWidgetHandler.ts | 2 +- .../room/handlers/RoomWidgetHandlerManager.ts | 2 +- .../handlers/RoomWidgetInfostandHandler.ts | 2 +- .../handlers/RoomWidgetRoomToolsHandler.ts | 2 +- .../RoomWidgetAvatarExpressionMessage.ts | 2 +- src/views/room/widgets/RoomWidgetsView.tsx | 2 +- .../avatar-info/AvatarInfoWidgetView.tsx | 2 +- .../avatar/AvatarInfoWidgetAvatarView.tsx | 2 +- .../decorate/AvatarInfoWidgetDecorateView.tsx | 2 +- .../AvatarInfoWidgetOwnAvatarView.tsx | 2 +- .../own-pet/AvatarInfoWidgetOwnPetView.tsx | 2 +- .../views/pet/AvatarInfoWidgetPetView.tsx | 2 +- .../AvatarInfoWidgetRentableBotView.tsx | 2 +- .../AvatarInfoUseProductConfirmView.tsx | 2 +- .../use-product/AvatarInfoUseProductView.tsx | 2 +- .../room/widgets/camera/CameraWidgetView.tsx | 4 +- .../widgets/camera/common/CameraPicture.ts | 2 +- .../context/CameraWidgetContext.types.ts | 2 +- .../views/capture/CameraWidgetCaptureView.tsx | 2 +- .../checkout/CameraWidgetCheckoutView.tsx | 2 +- .../views/editor/CameraWidgetEditorView.tsx | 2 +- .../editor/CameraWidgetEditorView.types.ts | 2 +- .../room/widgets/chat/ChatWidgetView.tsx | 2 +- .../widgets/chat/utils/ChatBubbleMessage.ts | 2 +- .../widgets/chat/utils/ChatWidgetUtilities.ts | 2 +- .../widgets/context-menu/ContextMenuView.tsx | 2 +- .../FurnitureBackgroundColorView.tsx | 2 +- .../FurnitureBadgeDisplayView.tsx | 56 + .../context-menu/FurnitureContextMenuView.tsx | 2 +- .../MonsterPlantSeedConfirmView.tsx | 2 +- .../PurchasableClothingConfirmView.tsx | 2 +- .../FurnitureCustomStackHeightView.tsx | 2 +- .../FurnitureExchangeCreditView.tsx | 2 +- .../friend-furni/FurnitureFriendFurniView.tsx | 2 +- .../high-score/FurnitureHighScoreView.tsx | 2 +- .../FurnitureManipulationMenuView.tsx | 2 +- .../mannequin/FurnitureMannequinView.tsx | 2 +- .../present/FurniturePresentView.tsx | 2 +- .../stickie/FurnitureStickieView.tsx | 2 +- .../furniture/trophy/FurnitureTrophyView.tsx | 2 +- .../views/furni/InfoStandWidgetFurniView.tsx | 2 +- .../InfoStandWidgetRentableBotView.tsx | 2 +- .../views/user/InfoStandWidgetUserView.tsx | 2 +- .../camera/RoomThumbnailWidgetCameraView.tsx | 2 +- .../room-tools/RoomToolsWidgetView.tsx | 2 +- .../shared/avatar-image/AvatarImageView.tsx | 2 +- .../shared/furni-image/FurniImageView.tsx | 2 +- src/views/shared/pet-image/PetImageView.tsx | 2 +- .../shared/pet-image/PetImageView.types.ts | 2 +- .../room-previewer/RoomPreviewerView.tsx | 2 +- .../room-previewer/RoomPreviewerView.types.ts | 2 +- src/views/toolbar/ToolbarView.tsx | 2 +- src/views/toolbar/me/ToolbarMeView.tsx | 2 +- src/views/wired/WiredMessageHandler.tsx | 2 +- src/views/wired/WiredView.tsx | 2 +- src/views/wired/common/GetWiredLayout.tsx | 2 +- .../wired/common/WiredSelectionFilter.ts | 2 +- .../wired/common/WiredSelectionVisualizer.ts | 2 +- src/views/wired/context/WiredContext.types.ts | 2 +- .../actions/base/WiredActionBaseView.tsx | 2 +- ...iredTriggerExecutePeriodicallyLongView.tsx | 2 +- 255 files changed, 1993 insertions(+), 2381 deletions(-) delete mode 100644 src/views/auth/AuthView.scss delete mode 100644 src/views/auth/AuthView.tsx delete mode 100644 src/views/auth/AuthView.types.ts delete mode 100644 src/views/auth/views/form/AuthFormView.tsx delete mode 100644 src/views/auth/views/form/AuthFormView.types.ts create mode 100644 src/views/room/widgets/furniture/badge-display/FurnitureBadgeDisplayView.tsx diff --git a/package-lock.json b/package-lock.json index 84714f6c..5fdd9491 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1765,6 +1765,1692 @@ } } }, + "@nitrots/nitro-renderer": { + "version": "file:../nitro-renderer", + "requires": { + "@pixi/canvas-renderer": "^6.1.0", + "@pixi/extract": "^6.1.0", + "@pixi/filter-adjustment": "^4.1.3", + "pako": "^2.0.4", + "pixi.js": "^6.1.0", + "tslib": "^2.3.0" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", + "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==" + }, + "@babel/highlight": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", + "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "requires": { + "@babel/helper-validator-identifier": "^7.14.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + } + } + }, + "@eslint/eslintrc": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" + } + } + }, + "@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "requires": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", + "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==" + }, + "@nodelib/fs.scandir": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", + "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", + "requires": { + "@nodelib/fs.stat": "2.0.4", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", + "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==" + }, + "@nodelib/fs.walk": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", + "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", + "requires": { + "@nodelib/fs.scandir": "2.1.4", + "fastq": "^1.6.0" + } + }, + "@pixi/accessibility": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/accessibility/-/accessibility-6.1.0.tgz", + "integrity": "sha512-SDbu08F0eXTc5jqkJdLoX5G6yrSD68V5X7nU9+AfVL5mYdR+wkAuDXjcOINbGq2vxHPN6fgoBNZIDNPfRHeATw==" + }, + "@pixi/app": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/app/-/app-6.1.0.tgz", + "integrity": "sha512-QIMNyMpswWAIXo1RhTbnem7DEdNnrYCV8RLK9E9nZ3NlzP3587IuMEmNfwZp7PsvMJXehH2opY/hlYxVOmYxew==" + }, + "@pixi/canvas-renderer": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/canvas-renderer/-/canvas-renderer-6.1.0.tgz", + "integrity": "sha512-dukgaw9OQyFjTZZ/R2jvf+cyxVQA7P+wJVtGO4Ev/TlaLs85KKy1xtnRpgYbF/etPhORRgN232H6rys50B0YjQ==" + }, + "@pixi/compressed-textures": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/compressed-textures/-/compressed-textures-6.1.0.tgz", + "integrity": "sha512-3Go+GT43avgzyX4+fFYiTEfjR5pHrzafKpVlMvttC9xGRhMV1BZFDi1rKjHYuYk8SgNycuqRa2RulsoVq0bQUw==" + }, + "@pixi/constants": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/constants/-/constants-6.1.0.tgz", + "integrity": "sha512-4mIvvyiovu/tT1m32fQO/pYwGxO/ch9ZGOArAcsVKx0gWEk/Whi0fuJVxgCemu8gpSFkcIJreWnOiLUzZCVpdQ==" + }, + "@pixi/core": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/core/-/core-6.1.0.tgz", + "integrity": "sha512-u6pXk8K05ZLhFNQxg+mtlHA6IjV0+lr/IDrEbx55eDZo+ImJwI4ummkJ/uiXaNn04GG0tVAQt+y5+e3fJjVFEQ==" + }, + "@pixi/display": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/display/-/display-6.1.0.tgz", + "integrity": "sha512-Jb1V54kpJXiGjKFx1qe5NhZyl1u6Z1t3o6mWawIFbXKiOJs+nkouUqRyPX2877cu1zkufbAalEe5V8WXOkqixg==" + }, + "@pixi/extract": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/extract/-/extract-6.1.0.tgz", + "integrity": "sha512-QqOb9jZ473mt8NDuAnfD/oUuXefspGLOoVTfHD+NVRP0J3P4Mnzq98ljHHpOFII/XgM8Jam6YRuOlTGyT7H+vg==" + }, + "@pixi/filter-adjustment": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@pixi/filter-adjustment/-/filter-adjustment-4.1.3.tgz", + "integrity": "sha512-W+NhPiZRYKoRToa5+tkU95eOw8gnS5dfIp3ZP+pLv2mdER9RI+4xHxp1uLHMqUYZViTaMdZIIoVOuCgHFPYCbQ==" + }, + "@pixi/filter-alpha": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/filter-alpha/-/filter-alpha-6.1.0.tgz", + "integrity": "sha512-giNst0xR8h3Ulkk3u6JEN8L1TmZsE5JEPZ+brvdZ336k6wiRMxkqIZ2wt1w9cQLq3PY3MAiUO+SZkYr4Zr1GJg==" + }, + "@pixi/filter-blur": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/filter-blur/-/filter-blur-6.1.0.tgz", + "integrity": "sha512-EskO2DjKGyOwSMQIqVkONJgG8rdF7Ja9EtBBuWGL6V+lE7DUQ0I25+D13+12HD3OMUsEnXyZWmlYtGW9BD9P7g==" + }, + "@pixi/filter-color-matrix": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/filter-color-matrix/-/filter-color-matrix-6.1.0.tgz", + "integrity": "sha512-8OE8EDyV8KEUhcqwQxeNvW6r0YMBrQXS7IZLUlCvIVdM5rI24qBA1n9ec5w8ofe7A6jdMArmV4NwiNiSHCkYvw==" + }, + "@pixi/filter-displacement": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/filter-displacement/-/filter-displacement-6.1.0.tgz", + "integrity": "sha512-ZmsLEYhLQLxVbhP688ofv0bmfRXObYk2Xa3ORwKgivyJeX3UqizP+OUHa1mJ+4n6Q50BwtCra/Cg+TJ0q2R0wQ==" + }, + "@pixi/filter-fxaa": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/filter-fxaa/-/filter-fxaa-6.1.0.tgz", + "integrity": "sha512-htFHMvW7GId9UTw5c8Mdd4FU3RGTg9aSsQ04yQCJekm54pwQsTGzkbElGTVWHznurflOhjAJJRib6dtWW1CY8A==" + }, + "@pixi/filter-noise": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/filter-noise/-/filter-noise-6.1.0.tgz", + "integrity": "sha512-5qdW1UZOcN8pJsyp/L7qNzGvigGwKB0c+RvI9LKWn/DsWC4WfAhatMtKV7dTsYNSRE+MWaFbelBQZT6wYw05Jg==" + }, + "@pixi/graphics": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/graphics/-/graphics-6.1.0.tgz", + "integrity": "sha512-NfbVX/TIXYrzUDItrXCg6c9LKM6Td1O+xXFnM9uP6EQQ1cyH5uUHtkSR0xgnPpdcs8IEa/FgyOmABEJ+G17syA==" + }, + "@pixi/interaction": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/interaction/-/interaction-6.1.0.tgz", + "integrity": "sha512-0GijG3v7oWET96FaFC59ozNrXa5D/fROpZSh2ywwL0NRvftLcjHOSDMGxDXhrlfpsjPgLVqDQQUHAcpIKigleA==" + }, + "@pixi/loaders": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/loaders/-/loaders-6.1.0.tgz", + "integrity": "sha512-0RcJuWKJx+4r2lZoVWMfSdaMjC+gGTouDrnGFNX6NGRRXXE3vKQdyFlwwkaJzUefvsjbNe4cYxC7iws9lqL3oA==" + }, + "@pixi/math": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/math/-/math-6.1.0.tgz", + "integrity": "sha512-4INGyMqO7z02kTzHEp/7sl1TOrIhPmKLx3jNUDyQ/J7RPJJE3ZbgEktZcfmG0tofJoW3KbLqL4fd6k/FIi5Hsw==" + }, + "@pixi/mesh": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/mesh/-/mesh-6.1.0.tgz", + "integrity": "sha512-l3zFMs9ENGB8y5PIRMCf2/7nHXu40yfeBZq4bPYIJJeHztkzaNKDbEFtDOx/Y1+QrG8VX4LiDWQ+sE7Tk+qIRA==" + }, + "@pixi/mesh-extras": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/mesh-extras/-/mesh-extras-6.1.0.tgz", + "integrity": "sha512-/l/ohKrxDRkho85TcGPZrturJPQRUSGLoctIkWCqhNePMk9ATLVQ2ihg7GR1glaYqvxMOQXj5qqIfEC/T7eMlw==" + }, + "@pixi/mixin-cache-as-bitmap": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/mixin-cache-as-bitmap/-/mixin-cache-as-bitmap-6.1.0.tgz", + "integrity": "sha512-nwmXcfw7cFyhZwNDFHZLyE7dhJvLEZbm0BJ5cpiDb2HC1g4U5+BfGkjxQulUh2JfdOaqTp7EeU8K5okMVvcdnQ==" + }, + "@pixi/mixin-get-child-by-name": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/mixin-get-child-by-name/-/mixin-get-child-by-name-6.1.0.tgz", + "integrity": "sha512-F78olhSbF9ukDigA27hqcPFYrqw0Yj6Z+2NLYVxyWD8vys8Cfev8wtztDk50WYVnCRk8BRYiTiEAtBGYIPSbYA==" + }, + "@pixi/mixin-get-global-position": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/mixin-get-global-position/-/mixin-get-global-position-6.1.0.tgz", + "integrity": "sha512-c/mrnEv7ZuKnjjaME+8jyOiP/Mtk2cq/UXDEM+lwOX98zVdxiaBFf13BhnMPnVq7Vq1+HeDDRZ2/VIlrLkU9Ag==" + }, + "@pixi/particle-container": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/particle-container/-/particle-container-6.1.0.tgz", + "integrity": "sha512-Nu/UqG6n66b51UPdfQjuVfuGnM+D3caUqQCq2rLGVJIJmfrd38J0AooOaTtqePuadQWII2g3pFZ+dXv0oN1Blg==" + }, + "@pixi/polyfill": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/polyfill/-/polyfill-6.1.0.tgz", + "integrity": "sha512-gLz7eyfz5PAKxL7y9qI47O91WQyzuPFvuWm9sTxyncsgY7nchJxi6vUuxjLtFDd9vzl+/PXFDHyRGFyDe8tSkg==", + "requires": { + "object-assign": "^4.1.1", + "promise-polyfill": "^8.2.0" + } + }, + "@pixi/prepare": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/prepare/-/prepare-6.1.0.tgz", + "integrity": "sha512-IdQ0gefbDt4anT59MxZznaY3EZQwvGE9K2Jo3+6t+3ZOvRlsgOLHdMFbNy9N0/MzKp9TAvuvzEj5WW2NoHx5Yw==" + }, + "@pixi/runner": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/runner/-/runner-6.1.0.tgz", + "integrity": "sha512-Pf6WmyBZSQg9mf3wpB3UvnZNX9GeRDoC4gMcQEYxw0rZDe0Z0JwzrkV0EGGyGHCZSssdx4+K1+vUxUIyFWdymw==" + }, + "@pixi/settings": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/settings/-/settings-6.1.0.tgz", + "integrity": "sha512-dVVOGqnCwZIHNtuAyzhw9QXZPtaxq8daDXYyRfmxfKS5SWX86HMl65KJW7rmA9TIua53i/igSSQVWgAhzRkUeg==", + "requires": { + "ismobilejs": "^1.1.0" + } + }, + "@pixi/sprite": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/sprite/-/sprite-6.1.0.tgz", + "integrity": "sha512-BnaRNiXgiqNNTN2a9WaeMPZtLP+v/D8W/fymNkjg2wWrs4FwnpT0lPGAL0YHFoBO328LI8qTCy6BCBZg74V4aQ==" + }, + "@pixi/sprite-animated": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/sprite-animated/-/sprite-animated-6.1.0.tgz", + "integrity": "sha512-yL6Fe+xyXb9m/NkofUcigE3+NYUA3VrKajacf/ONXND897A7JLCihqXS9cHJHJGTNL3X+wsba1iZc9Rax5H0Sg==" + }, + "@pixi/sprite-tiling": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/sprite-tiling/-/sprite-tiling-6.1.0.tgz", + "integrity": "sha512-7a0NubCDrLG5pK7rrLAQJoju0EydL71kljm1TgqhcnoYV7n70Dbpoz+N4OuPyObOyEz9VvcnPMy5srp9FNllfw==" + }, + "@pixi/spritesheet": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/spritesheet/-/spritesheet-6.1.0.tgz", + "integrity": "sha512-7kh7OuYujRGOAw1Pe6EtwH2Yzov80Qss2MtDlHNplJ+loImd/SCthFhsmpRrOb/lSBtxVn3h+pUzV0bc7bxQXg==" + }, + "@pixi/text": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/text/-/text-6.1.0.tgz", + "integrity": "sha512-Yul5LqVYr/XW21uNAoMrkjn7p63RfD19c0S6EWCV18QOJaOjz6ZwzPMg6wpm6b+2i/Ob6F8ZFZdSwAM0hznRYg==" + }, + "@pixi/text-bitmap": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/text-bitmap/-/text-bitmap-6.1.0.tgz", + "integrity": "sha512-xcpRzXueq/XPqVJyd0FeJhdnmXcap8clZMrzLjND8blIWS9sJDJKXrpTmNco/JdOrU+vuOkWRau2OSJJKd882A==" + }, + "@pixi/ticker": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/ticker/-/ticker-6.1.0.tgz", + "integrity": "sha512-tCh1dhmriLKLMcxTJ9usm1UZEK2+M5nEwvyec9kouF4EMi/PiGup65+pwTHK4SvjXD+9vbtTDam39fWYXCpRxg==" + }, + "@pixi/utils": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pixi/utils/-/utils-6.1.0.tgz", + "integrity": "sha512-N7LaVjo2NiP0/4DMX6Hj6SsSoFFEA1Pc3U/I/kQJHj9OyLrNSpcl9PZEiPusnuhpMr+zlQKa+MMU+RyTj+06Hw==", + "requires": { + "@types/earcut": "^2.1.0", + "earcut": "^2.2.2", + "eventemitter3": "^3.1.0", + "url": "^0.11.0" + } + }, + "@types/earcut": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@types/earcut/-/earcut-2.1.1.tgz", + "integrity": "sha512-w8oigUCDjElRHRRrMvn/spybSMyX8MTkKA5Dv+tS1IE/TgmNZPqUYtvYBXGY8cieSE66gm+szeK+bnbxC2xHTQ==" + }, + "@types/json-schema": { + "version": "7.0.8", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.8.tgz", + "integrity": "sha512-YSBPTLTVm2e2OoQIDYx8HaeWJ5tTToLH67kXR7zYNGupXMEHa2++G8k+DczX2cFVgalypqtyZIcU19AFcmOpmg==" + }, + "@types/node": { + "version": "14.17.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.7.tgz", + "integrity": "sha512-SYTdMaW47se8499q8m0fYKZZRlmq0RaRv6oYmlVm6DUm31l0fhOl1D03X8hGxohCKTI2Bg6w7W0TiYB51aJzag==" + }, + "@types/pako": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@types/pako/-/pako-1.0.2.tgz", + "integrity": "sha512-8UJl2MjkqqS6ncpLZqRZ5LmGiFBkbYxocD4e4jmBqGvfRG1RS23gKsBQbdtV9O9GvRyjFTiRHRByjSlKCLlmZw==" + }, + "@typescript-eslint/eslint-plugin": { + "version": "4.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.0.tgz", + "integrity": "sha512-eiREtqWRZ8aVJcNru7cT/AMVnYd9a2UHsfZT8MR1dW3UUEg6jDv9EQ9Cq4CUPZesyQ58YUpoAADGv71jY8RwgA==", + "requires": { + "@typescript-eslint/experimental-utils": "4.29.0", + "@typescript-eslint/scope-manager": "4.29.0", + "debug": "^4.3.1", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^3.1.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/experimental-utils": { + "version": "4.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.29.0.tgz", + "integrity": "sha512-FpNVKykfeaIxlArLUP/yQfv/5/3rhl1ov6RWgud4OgbqWLkEq7lqgQU9iiavZRzpzCRQV4XddyFz3wFXdkiX9w==", + "requires": { + "@types/json-schema": "^7.0.7", + "@typescript-eslint/scope-manager": "4.29.0", + "@typescript-eslint/types": "4.29.0", + "@typescript-eslint/typescript-estree": "4.29.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + } + }, + "@typescript-eslint/parser": { + "version": "4.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.29.0.tgz", + "integrity": "sha512-+92YRNHFdXgq+GhWQPT2bmjX09X7EH36JfgN2/4wmhtwV/HPxozpCNst8jrWcngLtEVd/4zAwA6BKojAlf+YqA==", + "requires": { + "@typescript-eslint/scope-manager": "4.29.0", + "@typescript-eslint/types": "4.29.0", + "@typescript-eslint/typescript-estree": "4.29.0", + "debug": "^4.3.1" + } + }, + "@typescript-eslint/scope-manager": { + "version": "4.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.29.0.tgz", + "integrity": "sha512-HPq7XAaDMM3DpmuijxLV9Io8/6pQnliiXMQUcAdjpJJSR+fdmbD/zHCd7hMkjJn04UQtCQBtshgxClzg6NIS2w==", + "requires": { + "@typescript-eslint/types": "4.29.0", + "@typescript-eslint/visitor-keys": "4.29.0" + } + }, + "@typescript-eslint/types": { + "version": "4.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.29.0.tgz", + "integrity": "sha512-2YJM6XfWfi8pgU2HRhTp7WgRw78TCRO3dOmSpAvIQ8MOv4B46JD2chnhpNT7Jq8j0APlIbzO1Bach734xxUl4A==" + }, + "@typescript-eslint/typescript-estree": { + "version": "4.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.0.tgz", + "integrity": "sha512-8ZpNHDIOyqzzgZrQW9+xQ4k5hM62Xy2R4RPO3DQxMc5Rq5QkCdSpk/drka+DL9w6sXNzV5nrdlBmf8+x495QXQ==", + "requires": { + "@typescript-eslint/types": "4.29.0", + "@typescript-eslint/visitor-keys": "4.29.0", + "debug": "^4.3.1", + "globby": "^11.0.3", + "is-glob": "^4.0.1", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "4.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.0.tgz", + "integrity": "sha512-LoaofO1C/jAJYs0uEpYMXfHboGXzOJeV118X4OsZu9f7rG7Pr9B3+4HTU8+err81rADa4xfQmAxnRnPAI2jp+Q==", + "requires": { + "@typescript-eslint/types": "4.29.0", + "eslint-visitor-keys": "^2.0.0" + } + }, + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" + }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==" + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==" + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" + }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "create-ts-index": { + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/create-ts-index/-/create-ts-index-1.13.6.tgz", + "integrity": "sha512-vBcuficF62laj/wZv01D4YBz1TXTtEM8hsUq7J1k1uyPUHYq3YTWTVQlmlp+Y311KdM6HhPQeC2aHktvQR8u3w==", + "requires": { + "chalk": "^2.4.1", + "commander": "^2.19.0", + "dayjs": "^1.8.14", + "debug": "^4.1.1", + "deepmerge": "^4.2.2", + "fast-glob": "^3.2.2", + "glob": "^7.1.3", + "json5": "^2.1.3", + "merge": "^1.2.1", + "minimatch": "^3.0.4", + "my-easy-fp": "^0.5.1", + "tslib": "^1.10.0", + "yargs": "^15.3.1" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "dayjs": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.10.4.tgz", + "integrity": "sha512-RI/Hh4kqRc1UKLOAf/T5zdMMX5DQIlDxwUe3wSyMMnEbGunnpENCdbUgM+dW7kXidZqCttBrmw7BhN4TMddkCw==" + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + }, + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==" + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "requires": { + "path-type": "^4.0.0" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "requires": { + "esutils": "^2.0.2" + } + }, + "earcut": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.3.tgz", + "integrity": "sha512-iRDI1QeCQIhMCZk48DRDMVgQSSBDmbzzNhnxIo+pwx3swkfjMh6vh0nWLq1NdvGHLKH6wIrAM3vQWeTj6qeoug==" + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "requires": { + "ansi-colors": "^4.1.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "eslint": { + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", + "requires": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.1.2", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.9", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + }, + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "requires": { + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" + } + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" + } + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "requires": { + "eslint-visitor-keys": "^2.0.0" + } + }, + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==" + }, + "espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "requires": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" + } + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" + } + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + }, + "eventemitter3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-glob": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", + "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.0", + "merge2": "^1.3.0", + "micromatch": "^4.0.2", + "picomatch": "^2.2.1" + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + }, + "fastq": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", + "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", + "requires": { + "reusify": "^1.0.4" + } + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "requires": { + "flat-cache": "^3.0.4" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", + "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "requires": { + "is-glob": "^4.0.1" + } + }, + "globals": { + "version": "13.10.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.10.0.tgz", + "integrity": "sha512-piHC3blgLGFjvOuMmWZX60f+na1lXFDhQXBf1UYp2fXPXqvEUbOhNwi6BsQ0bQishwedgnjkwv1d9zKf+MWw3g==", + "requires": { + "type-fest": "^0.20.2" + } + }, + "globby": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==" + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "ismobilejs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ismobilejs/-/ismobilejs-1.1.1.tgz", + "integrity": "sha512-VaFW53yt8QO61k2WJui0dHf4SlL8lxBofUuUmwBo0ljPk0Drz2TiuDW4jo3wDcv41qy/SxrJ+VAzJ/qYqsmzRw==" + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" + }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "requires": { + "minimist": "^1.2.5" + } + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + }, + "lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=" + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "merge": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.1.tgz", + "integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==" + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "my-easy-fp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/my-easy-fp/-/my-easy-fp-0.5.1.tgz", + "integrity": "sha512-musRCJYBnEDDzod5ugUykOqHoZYudhtC90J536tFrMqXfjpBzb0PRzLkadM2chgNFsCebzm9GtC+qjQ7xKgpGg==", + "requires": { + "debug": "^4.1.1", + "tslib": "1.11.1" + }, + "dependencies": { + "tslib": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", + "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==" + } + } + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "pako": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.0.4.tgz", + "integrity": "sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg==" + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "requires": { + "callsites": "^3.0.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" + }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" + }, + "pixi.js": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-6.1.0.tgz", + "integrity": "sha512-uBcM3wivcLq7CPwLGkcyGscsvRST4TcXSlgXaH46P6mxNnJoDgVJtEYwYP+5H9g7b96ZBo5We6lddO+mmz7cXw==", + "requires": { + "@pixi/accessibility": "6.1.0", + "@pixi/app": "6.1.0", + "@pixi/compressed-textures": "6.1.0", + "@pixi/constants": "6.1.0", + "@pixi/core": "6.1.0", + "@pixi/display": "6.1.0", + "@pixi/extract": "6.1.0", + "@pixi/filter-alpha": "6.1.0", + "@pixi/filter-blur": "6.1.0", + "@pixi/filter-color-matrix": "6.1.0", + "@pixi/filter-displacement": "6.1.0", + "@pixi/filter-fxaa": "6.1.0", + "@pixi/filter-noise": "6.1.0", + "@pixi/graphics": "6.1.0", + "@pixi/interaction": "6.1.0", + "@pixi/loaders": "6.1.0", + "@pixi/math": "6.1.0", + "@pixi/mesh": "6.1.0", + "@pixi/mesh-extras": "6.1.0", + "@pixi/mixin-cache-as-bitmap": "6.1.0", + "@pixi/mixin-get-child-by-name": "6.1.0", + "@pixi/mixin-get-global-position": "6.1.0", + "@pixi/particle-container": "6.1.0", + "@pixi/polyfill": "6.1.0", + "@pixi/prepare": "6.1.0", + "@pixi/runner": "6.1.0", + "@pixi/settings": "6.1.0", + "@pixi/sprite": "6.1.0", + "@pixi/sprite-animated": "6.1.0", + "@pixi/sprite-tiling": "6.1.0", + "@pixi/spritesheet": "6.1.0", + "@pixi/text": "6.1.0", + "@pixi/text-bitmap": "6.1.0", + "@pixi/ticker": "6.1.0", + "@pixi/utils": "6.1.0" + } + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" + }, + "promise-polyfill": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-8.2.0.tgz", + "integrity": "sha512-k/TC0mIcPVF6yHhUvwAp7cvL6I2fFV7TzF1DuGPI8mBh4QQazf36xCKEHKTZKRysEoTQoQdKyP25J8MPJp7j5g==" + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + }, + "queue-microtask": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.2.tgz", + "integrity": "sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg==" + }, + "regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==" + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "requires": { + "glob": "^7.1.3" + } + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" + }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + } + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "table": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", + "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", + "requires": { + "ajv": "^8.0.1", + "lodash.clonedeep": "^4.5.0", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ajv": { + "version": "8.6.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.2.tgz", + "integrity": "sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + }, + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "requires": { + "tslib": "^1.8.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } + } + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" + }, + "typescript": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", + "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==" + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + } + } + }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, "@nodelib/fs.scandir": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", @@ -10708,1885 +12394,6 @@ "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, - "nitro-renderer": { - "version": "file:../nitro-renderer", - "requires": { - "@pixi/filter-adjustment": "^4.1.3", - "events": "^3.3.0", - "pako": "^2.0.3", - "pixi.js": "^6.0.4", - "tslib": "^2.3.0", - "xml2js": "^0.4.23" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==" - }, - "@babel/highlight": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", - "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", - "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - } - } - }, - "@eslint/eslintrc": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", - "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", - "requires": { - "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", - "requires": { - "type-fest": "^0.8.1" - } - }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" - } - } - }, - "@nodelib/fs.scandir": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", - "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", - "requires": { - "@nodelib/fs.stat": "2.0.4", - "run-parallel": "^1.1.9" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", - "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==" - }, - "@nodelib/fs.walk": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", - "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", - "requires": { - "@nodelib/fs.scandir": "2.1.4", - "fastq": "^1.6.0" - } - }, - "@pixi/accessibility": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/accessibility/-/accessibility-6.0.4.tgz", - "integrity": "sha512-S0Co6M+BIx+Yk3INCwGp5Xif0jIv/uj5JPMbctpMV7fSsE3x0nYvcOOAfBjkGhYcXG7fNOGrYLgs5XQOBIWGtA==", - "requires": { - "@pixi/canvas-renderer": "6.0.4", - "@pixi/core": "6.0.4", - "@pixi/display": "6.0.4", - "@pixi/utils": "6.0.4" - } - }, - "@pixi/app": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/app/-/app-6.0.4.tgz", - "integrity": "sha512-+BiuaQtnOBR5/Q8+nXnHE2tuZyuBnqy/cwbIR1ImPnKAs7UaCcRLf1R0RvnRFu4KMP4ozTd810p0k84TzIguTA==", - "requires": { - "@pixi/core": "6.0.4", - "@pixi/display": "6.0.4" - } - }, - "@pixi/canvas-renderer": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/canvas-renderer/-/canvas-renderer-6.0.4.tgz", - "integrity": "sha512-z2r1nzYsAp9+gipvlFCj0rd0yfjVq1hTQkyWuMbo5TrePdEo3NLRrCUGo1dHJNbeSERpgGNN05OAiGQbAI+AUg==", - "requires": { - "@pixi/constants": "6.0.4", - "@pixi/core": "6.0.4", - "@pixi/math": "6.0.4", - "@pixi/settings": "6.0.4", - "@pixi/utils": "6.0.4" - } - }, - "@pixi/compressed-textures": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/compressed-textures/-/compressed-textures-6.0.4.tgz", - "integrity": "sha512-AqQPuuXcNrR28YT69SZhRxRRwzqQcQ/QrlexAR9Fohpe+jfDnvlNaIvQQoXU7HxD7huRiQ/dm3nwsLiKPqVoTg==", - "requires": { - "@pixi/constants": "6.0.4", - "@pixi/core": "6.0.4", - "@pixi/loaders": "6.0.4", - "@pixi/utils": "6.0.4" - } - }, - "@pixi/constants": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/constants/-/constants-6.0.4.tgz", - "integrity": "sha512-khwRMfuHVdFk93L+bf0mmCwtSloYlfBfjdseIAbJL+VSpeMG1S2DzCYlMCPdp4mvDLU9LvkH2U2leZGEIx5j7g==" - }, - "@pixi/core": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/core/-/core-6.0.4.tgz", - "integrity": "sha512-r1ceyAz0z3usUs0uj4u2986vVT2tQixGNin2o9FNhPFDXbN5EaoKHLtrjGBt1iylK/EUH/nfL5zq0SGa/loW0A==", - "requires": { - "@pixi/constants": "6.0.4", - "@pixi/math": "6.0.4", - "@pixi/runner": "6.0.4", - "@pixi/settings": "6.0.4", - "@pixi/ticker": "6.0.4", - "@pixi/utils": "6.0.4" - } - }, - "@pixi/display": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/display/-/display-6.0.4.tgz", - "integrity": "sha512-v6hjx5Gm5aIlLQ7xrsZ2lstI1cv/MtbWXJOhU8LXckkrHHUvAuJgml3+0pcHw8YLuOlepZngUuiqy/XjceVk8A==", - "requires": { - "@pixi/math": "6.0.4", - "@pixi/settings": "6.0.4", - "@pixi/utils": "6.0.4" - } - }, - "@pixi/extract": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/extract/-/extract-6.0.4.tgz", - "integrity": "sha512-xf/pnc5od7YJ8zCVIrv1km7i+P+rxYcSrrBI/hqX+qoVsI5EySKInf2GhCKHz4UjOHdSL5aPDnNYvzssNdIpdQ==", - "requires": { - "@pixi/core": "6.0.4", - "@pixi/math": "6.0.4", - "@pixi/utils": "6.0.4" - } - }, - "@pixi/filter-adjustment": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/@pixi/filter-adjustment/-/filter-adjustment-4.1.3.tgz", - "integrity": "sha512-W+NhPiZRYKoRToa5+tkU95eOw8gnS5dfIp3ZP+pLv2mdER9RI+4xHxp1uLHMqUYZViTaMdZIIoVOuCgHFPYCbQ==" - }, - "@pixi/filter-alpha": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/filter-alpha/-/filter-alpha-6.0.4.tgz", - "integrity": "sha512-MZEfvNPfH2NfrwgqKhwwzurnbLujphx4KNQmS63MEZTvXuQJy16DEOs459APYF6PmeGAGuDPKd5Onk/VbLRUwQ==", - "requires": { - "@pixi/core": "6.0.4" - } - }, - "@pixi/filter-blur": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/filter-blur/-/filter-blur-6.0.4.tgz", - "integrity": "sha512-Hb14geh8ZKc8jZ4lfKyeWThLMqIvha6DdRUTfiSdKe3L7Q6qwqsb7LPtIrZHAPEQCyFLWbcOvRMy6ZFy0YkpLA==", - "requires": { - "@pixi/core": "6.0.4", - "@pixi/settings": "6.0.4" - } - }, - "@pixi/filter-color-matrix": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/filter-color-matrix/-/filter-color-matrix-6.0.4.tgz", - "integrity": "sha512-31Rf9VBo2gqoxiAbD/Z1i+mu1C7uehecoelYQqCIzLjsWisICDTZZjUkMB5GrGzjeSpSqLfB34tlutBSh/r1wg==", - "requires": { - "@pixi/core": "6.0.4" - } - }, - "@pixi/filter-displacement": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/filter-displacement/-/filter-displacement-6.0.4.tgz", - "integrity": "sha512-Oyk/WbzxlN46d/uB5NtPLfEW2G6ob5XRP+mPVd8yhK38m9Y9rKlcH4jJoWB2niQ+ewkdRfZhuIB+JRdhc9eevg==", - "requires": { - "@pixi/core": "6.0.4", - "@pixi/math": "6.0.4" - } - }, - "@pixi/filter-fxaa": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/filter-fxaa/-/filter-fxaa-6.0.4.tgz", - "integrity": "sha512-cO5XuEIq//Wsk4MjrCYuXff+1/Gfc4bkFkMTO5JKvUaDlZzHNykZd5CeAouD2fz7/6/1z0gdWKbBY9IoameBew==", - "requires": { - "@pixi/core": "6.0.4" - } - }, - "@pixi/filter-noise": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/filter-noise/-/filter-noise-6.0.4.tgz", - "integrity": "sha512-Fpex0tpKCwZIsN03zAmN7hAOCocFF/w4XVVIkuNgYR5A90OkK+omR6p/fDtlJtlAjWarsWq0y+c5wvvUMfqsmg==", - "requires": { - "@pixi/core": "6.0.4" - } - }, - "@pixi/graphics": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/graphics/-/graphics-6.0.4.tgz", - "integrity": "sha512-CybR+DBkGB5llypPeib2A0J13mnPQwlQDqLRhlhXKkYxXQKXlPk5MWA7ZEg+4wKeqUUlrC+k70e5ZFYLC3AgEQ==", - "requires": { - "@pixi/constants": "6.0.4", - "@pixi/core": "6.0.4", - "@pixi/display": "6.0.4", - "@pixi/math": "6.0.4", - "@pixi/sprite": "6.0.4", - "@pixi/utils": "6.0.4" - } - }, - "@pixi/interaction": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/interaction/-/interaction-6.0.4.tgz", - "integrity": "sha512-4+FOKDpiF/+F9r3+y81xTBElcLqI3OpeeI9bkIw9pPHA41riXRQv+m0HWz76bGQK7zDAimAV9K2xff7Wa5nSeg==", - "requires": { - "@pixi/core": "6.0.4", - "@pixi/display": "6.0.4", - "@pixi/math": "6.0.4", - "@pixi/ticker": "6.0.4", - "@pixi/utils": "6.0.4" - } - }, - "@pixi/loaders": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/loaders/-/loaders-6.0.4.tgz", - "integrity": "sha512-cw8QSkn8l8P06fINfwCZW+vUdhtOJ5G+T2qQm3HIDgI/J1tAsiRj3ufHop8xkHwYXrUeTf1LTqw+QdlZEVpJfg==", - "requires": { - "@pixi/constants": "6.0.4", - "@pixi/core": "6.0.4", - "@pixi/utils": "6.0.4", - "resource-loader": "^3.0.1" - } - }, - "@pixi/math": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/math/-/math-6.0.4.tgz", - "integrity": "sha512-UwZ72CeZ2KsS4IlcEXgNiuD88omPk42Dct74+1G+R2+yPI+XRZq+hGQRTle/BbFYjxh9ccdQVyX9ToGv1XTd6Q==" - }, - "@pixi/mesh": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/mesh/-/mesh-6.0.4.tgz", - "integrity": "sha512-uE1Qs4mXy0QVV3yjxlNeqthkXGS6Hkt5uR1fwrvdqxlQRkX69nRq+GZfInuRYDWqwAsl8eZWs7f+pLRDT+HFbA==", - "requires": { - "@pixi/constants": "6.0.4", - "@pixi/core": "6.0.4", - "@pixi/display": "6.0.4", - "@pixi/math": "6.0.4", - "@pixi/settings": "6.0.4", - "@pixi/utils": "6.0.4" - } - }, - "@pixi/mesh-extras": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/mesh-extras/-/mesh-extras-6.0.4.tgz", - "integrity": "sha512-2fGM8j2NBwPV71SSmMfke1N1oEQ34+J19rdaAb+p1fXex0FafqtXVO49Q8rPMvungKDplMKElzQoaC1G6JGKqA==", - "requires": { - "@pixi/constants": "6.0.4", - "@pixi/core": "6.0.4", - "@pixi/math": "6.0.4", - "@pixi/mesh": "6.0.4", - "@pixi/utils": "6.0.4" - } - }, - "@pixi/mixin-cache-as-bitmap": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/mixin-cache-as-bitmap/-/mixin-cache-as-bitmap-6.0.4.tgz", - "integrity": "sha512-b1G5AWsxnw3CxNyaxCWJ1cWPnRECknJQ9B4D8Dy7u/gI2gABVjqz17nNFYnVpcggLlgMTkjX8+/HWnD/vZQkTg==", - "requires": { - "@pixi/canvas-renderer": "6.0.4", - "@pixi/core": "6.0.4", - "@pixi/display": "6.0.4", - "@pixi/math": "6.0.4", - "@pixi/settings": "6.0.4", - "@pixi/sprite": "6.0.4", - "@pixi/utils": "6.0.4" - } - }, - "@pixi/mixin-get-child-by-name": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/mixin-get-child-by-name/-/mixin-get-child-by-name-6.0.4.tgz", - "integrity": "sha512-scUMBHlOmW0hpjltn4UCihJZvz3ysDYIW35ma9p9Lso2D9qKjsZpojQ6mc75FVWz53T0BjUmLW8LHA86Jic6MQ==", - "requires": { - "@pixi/display": "6.0.4" - } - }, - "@pixi/mixin-get-global-position": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/mixin-get-global-position/-/mixin-get-global-position-6.0.4.tgz", - "integrity": "sha512-HzaFTMZEZTr6+WYuT9crTjjBYl7/Y/VDB7pWmjnntEdQsa1m0+by7Mnl67L6OSUPsAgW3MMlWirb5tL2zGFC7g==", - "requires": { - "@pixi/display": "6.0.4", - "@pixi/math": "6.0.4" - } - }, - "@pixi/particles": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/particles/-/particles-6.0.4.tgz", - "integrity": "sha512-/57nd+icuPFMNc+SxeUqGoO8ZXEKu9u8h+UI856XF1Rc1jlXzGanGAbp43Llq2LphYqBI8YVftP0QXhewCVjjA==", - "requires": { - "@pixi/constants": "6.0.4", - "@pixi/core": "6.0.4", - "@pixi/display": "6.0.4", - "@pixi/math": "6.0.4", - "@pixi/utils": "6.0.4" - } - }, - "@pixi/polyfill": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/polyfill/-/polyfill-6.0.4.tgz", - "integrity": "sha512-HM27pSl8iduFqUC4Waa9mt/gRKHi8Pr679it84+U4CwXmJ2lw9DL5dZuyU+QzCp2nPEVGMqx8Ig8c7WLUMvnWA==", - "requires": { - "object-assign": "^4.1.1", - "promise-polyfill": "^8.2.0" - } - }, - "@pixi/prepare": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/prepare/-/prepare-6.0.4.tgz", - "integrity": "sha512-BrOeKC6eZ+sdiqpefUMGXIt/VDiYDqPDP7XUCRmaI8rGTFT6ZAg/XJQENb9TsVen/4dUp+9/1u7HCFO1TEhaWQ==", - "requires": { - "@pixi/core": "6.0.4", - "@pixi/display": "6.0.4", - "@pixi/graphics": "6.0.4", - "@pixi/settings": "6.0.4", - "@pixi/text": "6.0.4", - "@pixi/ticker": "6.0.4" - } - }, - "@pixi/runner": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/runner/-/runner-6.0.4.tgz", - "integrity": "sha512-ta6r36r2vC+fPB27URpSacPGQDtbJbdUoeGCJWAEwX+QI4vx4C9NYAcB0bIg8TLXiigCfA6by/RMnJ0dBiemFA==" - }, - "@pixi/settings": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/settings/-/settings-6.0.4.tgz", - "integrity": "sha512-djiIsmULDwcHWNmEiZKm4zyVopu1NL+fClnbBmtDkGZw7nm37y6dOcdpYawJcxvE4/KLm6pspBiRTnrzdlqW7Q==", - "requires": { - "ismobilejs": "^1.1.0" - } - }, - "@pixi/sprite": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/sprite/-/sprite-6.0.4.tgz", - "integrity": "sha512-6yMoHmfFhSRERLM1PUXceq9e6e1UH0YJkLoPVLv6gxMunfk6jPXeO8p9dDS2FQ8ZMSkO/16BKq27HIMKvF6Cvg==", - "requires": { - "@pixi/constants": "6.0.4", - "@pixi/core": "6.0.4", - "@pixi/display": "6.0.4", - "@pixi/math": "6.0.4", - "@pixi/settings": "6.0.4", - "@pixi/utils": "6.0.4" - } - }, - "@pixi/sprite-animated": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/sprite-animated/-/sprite-animated-6.0.4.tgz", - "integrity": "sha512-uzNeJiZqcnuRc7HH/HdWxrkU7S3/D57rEGK+AuoaWEE2e2HlBWILGkf78mtqmeIrEChxe2qkOVkf4y3BZkzJVw==", - "requires": { - "@pixi/core": "6.0.4", - "@pixi/sprite": "6.0.4", - "@pixi/ticker": "6.0.4" - } - }, - "@pixi/sprite-tiling": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/sprite-tiling/-/sprite-tiling-6.0.4.tgz", - "integrity": "sha512-4TBsKMeGhwmfsVELorSs+zWWBih37Kd0lPQu0uhcHVV1RKtZxZpkgNoyzKS4d+WInNek5F0E592bYsXkbE6Gag==", - "requires": { - "@pixi/constants": "6.0.4", - "@pixi/core": "6.0.4", - "@pixi/display": "6.0.4", - "@pixi/math": "6.0.4", - "@pixi/sprite": "6.0.4", - "@pixi/utils": "6.0.4" - } - }, - "@pixi/spritesheet": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/spritesheet/-/spritesheet-6.0.4.tgz", - "integrity": "sha512-WgOBoi9KvLkHtfSyKSEzjIq6BkLwC+Ckllh+vWgfjfFDhtm7NdOfxW5WVIoCLfyfv5/NSwEMEEffZrcw4zYA/A==", - "requires": { - "@pixi/core": "6.0.4", - "@pixi/loaders": "6.0.4", - "@pixi/math": "6.0.4", - "@pixi/utils": "6.0.4" - } - }, - "@pixi/text": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/text/-/text-6.0.4.tgz", - "integrity": "sha512-r9UJg8ivWvvS7nNyBaZBKX5zg5UCU37dIYbKXcHyiXnOvXO22tiQBfkPBrZCueeLXRouC9sHmDFya8rb5TE9HA==", - "requires": { - "@pixi/core": "6.0.4", - "@pixi/math": "6.0.4", - "@pixi/settings": "6.0.4", - "@pixi/sprite": "6.0.4", - "@pixi/utils": "6.0.4" - } - }, - "@pixi/text-bitmap": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/text-bitmap/-/text-bitmap-6.0.4.tgz", - "integrity": "sha512-Nh2PXixqF0LFJ0xwmTib2HVWdhgsHn+dSYMVIec8LndDFQMTBw+X2XP1iHjVm0xhqOVdZI+Qfb2Trc0j2lINrw==", - "requires": { - "@pixi/core": "6.0.4", - "@pixi/display": "6.0.4", - "@pixi/loaders": "6.0.4", - "@pixi/math": "6.0.4", - "@pixi/mesh": "6.0.4", - "@pixi/settings": "6.0.4", - "@pixi/text": "6.0.4", - "@pixi/utils": "6.0.4" - } - }, - "@pixi/ticker": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/ticker/-/ticker-6.0.4.tgz", - "integrity": "sha512-PkFfPP5vHlgnApLks0Ia0okmFu6KPqBdIyquDqHJAcBdgljedm32KS6K2EH37xelBOzYHScjZ2SQGiiebVfClw==", - "requires": { - "@pixi/settings": "6.0.4" - } - }, - "@pixi/utils": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@pixi/utils/-/utils-6.0.4.tgz", - "integrity": "sha512-35JTWsAJ8Va0vvtUSQvyOr3kGedGKVuJnHDO89B8C8tSFtMpJYrR44vp1b1p1vOjNak+ulGehZc8LzlCqymViQ==", - "requires": { - "@pixi/constants": "6.0.4", - "@pixi/settings": "6.0.4", - "@types/earcut": "^2.1.0", - "earcut": "^2.2.2", - "eventemitter3": "^3.1.0", - "url": "^0.11.0" - } - }, - "@types/earcut": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@types/earcut/-/earcut-2.1.1.tgz", - "integrity": "sha512-w8oigUCDjElRHRRrMvn/spybSMyX8MTkKA5Dv+tS1IE/TgmNZPqUYtvYBXGY8cieSE66gm+szeK+bnbxC2xHTQ==" - }, - "@types/json-schema": { - "version": "7.0.7", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", - "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==" - }, - "@types/node": { - "version": "14.14.35", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.35.tgz", - "integrity": "sha512-Lt+wj8NVPx0zUmUwumiVXapmaLUcAk3yPuHCFVXras9k5VT9TdhJqKqGVUQCD60OTMCl0qxJ57OiTL0Mic3Iag==" - }, - "@types/pako": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/pako/-/pako-1.0.1.tgz", - "integrity": "sha512-GdZbRSJ3Cv5fiwT6I0SQ3ckeN2PWNqxd26W9Z2fCK1tGrrasGy4puvNFtnddqH9UJFMQYXxEuuB7B8UK+LLwSg==" - }, - "@typescript-eslint/eslint-plugin": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.18.0.tgz", - "integrity": "sha512-Lzkc/2+7EoH7+NjIWLS2lVuKKqbEmJhtXe3rmfA8cyiKnZm3IfLf51irnBcmow8Q/AptVV0XBZmBJKuUJTe6cQ==", - "requires": { - "@typescript-eslint/experimental-utils": "4.18.0", - "@typescript-eslint/scope-manager": "4.18.0", - "debug": "^4.1.1", - "functional-red-black-tree": "^1.0.1", - "lodash": "^4.17.15", - "regexpp": "^3.0.0", - "semver": "^7.3.2", - "tsutils": "^3.17.1" - } - }, - "@typescript-eslint/experimental-utils": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.18.0.tgz", - "integrity": "sha512-92h723Kblt9JcT2RRY3QS2xefFKar4ZQFVs3GityOKWQYgtajxt/tuXIzL7sVCUlM1hgreiV5gkGYyBpdOwO6A==", - "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.18.0", - "@typescript-eslint/types": "4.18.0", - "@typescript-eslint/typescript-estree": "4.18.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" - } - }, - "@typescript-eslint/parser": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.18.0.tgz", - "integrity": "sha512-W3z5S0ZbecwX3PhJEAnq4mnjK5JJXvXUDBYIYGoweCyWyuvAKfGHvzmpUzgB5L4cRBb+cTu9U/ro66dx7dIimA==", - "requires": { - "@typescript-eslint/scope-manager": "4.18.0", - "@typescript-eslint/types": "4.18.0", - "@typescript-eslint/typescript-estree": "4.18.0", - "debug": "^4.1.1" - } - }, - "@typescript-eslint/scope-manager": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.18.0.tgz", - "integrity": "sha512-olX4yN6rvHR2eyFOcb6E4vmhDPsfdMyfQ3qR+oQNkAv8emKKlfxTWUXU5Mqxs2Fwe3Pf1BoPvrwZtwngxDzYzQ==", - "requires": { - "@typescript-eslint/types": "4.18.0", - "@typescript-eslint/visitor-keys": "4.18.0" - } - }, - "@typescript-eslint/types": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.18.0.tgz", - "integrity": "sha512-/BRociARpj5E+9yQ7cwCF/SNOWwXJ3qhjurMuK2hIFUbr9vTuDeu476Zpu+ptxY2kSxUHDGLLKy+qGq2sOg37A==" - }, - "@typescript-eslint/typescript-estree": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.18.0.tgz", - "integrity": "sha512-wt4xvF6vvJI7epz+rEqxmoNQ4ZADArGQO9gDU+cM0U5fdVv7N+IAuVoVAoZSOZxzGHBfvE3XQMLdy+scsqFfeg==", - "requires": { - "@typescript-eslint/types": "4.18.0", - "@typescript-eslint/visitor-keys": "4.18.0", - "debug": "^4.1.1", - "globby": "^11.0.1", - "is-glob": "^4.0.1", - "semver": "^7.3.2", - "tsutils": "^3.17.1" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.18.0.tgz", - "integrity": "sha512-Q9t90JCvfYaN0OfFUgaLqByOfz8yPeTAdotn/XYNm5q9eHax90gzdb+RJ6E9T5s97Kv/UHWKERTmqA0jTKAEHw==", - "requires": { - "@typescript-eslint/types": "4.18.0", - "eslint-visitor-keys": "^2.0.0" - } - }, - "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" - }, - "acorn-jsx": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", - "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==" - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==" - }, - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" - }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "requires": { - "fill-range": "^7.0.1" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "create-ts-index": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/create-ts-index/-/create-ts-index-1.13.6.tgz", - "integrity": "sha512-vBcuficF62laj/wZv01D4YBz1TXTtEM8hsUq7J1k1uyPUHYq3YTWTVQlmlp+Y311KdM6HhPQeC2aHktvQR8u3w==", - "requires": { - "chalk": "^2.4.1", - "commander": "^2.19.0", - "dayjs": "^1.8.14", - "debug": "^4.1.1", - "deepmerge": "^4.2.2", - "fast-glob": "^3.2.2", - "glob": "^7.1.3", - "json5": "^2.1.3", - "merge": "^1.2.1", - "minimatch": "^3.0.4", - "my-easy-fp": "^0.5.1", - "tslib": "^1.10.0", - "yargs": "^15.3.1" - }, - "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - } - } - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "dayjs": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.10.4.tgz", - "integrity": "sha512-RI/Hh4kqRc1UKLOAf/T5zdMMX5DQIlDxwUe3wSyMMnEbGunnpENCdbUgM+dW7kXidZqCttBrmw7BhN4TMddkCw==" - }, - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "requires": { - "ms": "2.1.2" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" - }, - "deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==" - }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "requires": { - "path-type": "^4.0.0" - } - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "requires": { - "esutils": "^2.0.2" - } - }, - "earcut": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.3.tgz", - "integrity": "sha512-iRDI1QeCQIhMCZk48DRDMVgQSSBDmbzzNhnxIo+pwx3swkfjMh6vh0nWLq1NdvGHLKH6wIrAM3vQWeTj6qeoug==" - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "requires": { - "ansi-colors": "^4.1.1" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "eslint": { - "version": "7.22.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.22.0.tgz", - "integrity": "sha512-3VawOtjSJUQiiqac8MQc+w457iGLfuNGLFn8JmF051tTKbh5/x/0vlcEj8OgDCaw7Ysa2Jn8paGshV7x2abKXg==", - "requires": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.0", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^13.6.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash": "^4.17.21", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^6.0.4", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "dependencies": { - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" - } - } - }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "requires": { - "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" - } - } - }, - "eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==" - }, - "espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", - "requires": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" - } - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" - }, - "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", - "requires": { - "estraverse": "^5.1.0" - }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" - } - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" - } - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" - }, - "eventemitter3": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", - "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" - }, - "events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "fast-glob": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", - "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.0", - "merge2": "^1.3.0", - "micromatch": "^4.0.2", - "picomatch": "^2.2.1" - } - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" - }, - "fastq": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", - "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", - "requires": { - "reusify": "^1.0.4" - } - }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "requires": { - "flat-cache": "^3.0.4" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", - "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==" - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "requires": { - "is-glob": "^4.0.1" - } - }, - "globals": { - "version": "13.6.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.6.0.tgz", - "integrity": "sha512-YFKCX0SiPg7l5oKYCJ2zZGxcXprVXHcSnVuvzrT3oSENQonVLqM5pf9fN5dLGZGyCjhw8TN8Btwe/jKnZ0pjvQ==", - "requires": { - "type-fest": "^0.20.2" - }, - "dependencies": { - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" - } - } - }, - "globby": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.2.tgz", - "integrity": "sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og==", - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", - "slash": "^3.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==" - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "ismobilejs": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ismobilejs/-/ismobilejs-1.1.1.tgz", - "integrity": "sha512-VaFW53yt8QO61k2WJui0dHf4SlL8lxBofUuUmwBo0ljPk0Drz2TiuDW4jo3wDcv41qy/SxrJ+VAzJ/qYqsmzRw==" - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" - }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "requires": { - "minimist": "^1.2.5" - } - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "requires": { - "p-locate": "^4.1.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "requires": { - "yallist": "^4.0.0" - } - }, - "merge": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.1.tgz", - "integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==" - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" - }, - "micromatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", - "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.0.5" - } - }, - "mini-signals": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mini-signals/-/mini-signals-1.2.0.tgz", - "integrity": "sha1-RbCAE8X65RokqhqTXNMXye1yHXQ=" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "my-easy-fp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/my-easy-fp/-/my-easy-fp-0.5.1.tgz", - "integrity": "sha512-musRCJYBnEDDzod5ugUykOqHoZYudhtC90J536tFrMqXfjpBzb0PRzLkadM2chgNFsCebzm9GtC+qjQ7xKgpGg==", - "requires": { - "debug": "^4.1.1", - "tslib": "1.11.1" - }, - "dependencies": { - "tslib": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", - "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==" - } - } - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "pako": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/pako/-/pako-2.0.3.tgz", - "integrity": "sha512-WjR1hOeg+kki3ZIOjaf4b5WVcay1jaliKSYiEaB1XzwhMQZJxRdQRv0V31EKBYlxb4T7SK3hjfc/jxyU64BoSw==" - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "requires": { - "callsites": "^3.0.0" - } - }, - "parse-uri": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/parse-uri/-/parse-uri-1.0.3.tgz", - "integrity": "sha512-upMnGxNcm+45So85HoguwZTVZI9u11i36DdxJfGF2HYWS2eh3TIx7+/tTi7qrEq15qzGkVhsKjesau+kCk48pA==" - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" - }, - "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" - }, - "pixi.js": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-6.0.4.tgz", - "integrity": "sha512-zAlwr5x9xytaflmZiZWl/ZhlSf+lZzeJG+Hexa7Buf7cvEhHPfSITy4NNk0+qnMXKooQidikBmypShDsj2jAdg==", - "requires": { - "@pixi/accessibility": "6.0.4", - "@pixi/app": "6.0.4", - "@pixi/compressed-textures": "6.0.4", - "@pixi/constants": "6.0.4", - "@pixi/core": "6.0.4", - "@pixi/display": "6.0.4", - "@pixi/extract": "6.0.4", - "@pixi/filter-alpha": "6.0.4", - "@pixi/filter-blur": "6.0.4", - "@pixi/filter-color-matrix": "6.0.4", - "@pixi/filter-displacement": "6.0.4", - "@pixi/filter-fxaa": "6.0.4", - "@pixi/filter-noise": "6.0.4", - "@pixi/graphics": "6.0.4", - "@pixi/interaction": "6.0.4", - "@pixi/loaders": "6.0.4", - "@pixi/math": "6.0.4", - "@pixi/mesh": "6.0.4", - "@pixi/mesh-extras": "6.0.4", - "@pixi/mixin-cache-as-bitmap": "6.0.4", - "@pixi/mixin-get-child-by-name": "6.0.4", - "@pixi/mixin-get-global-position": "6.0.4", - "@pixi/particles": "6.0.4", - "@pixi/polyfill": "6.0.4", - "@pixi/prepare": "6.0.4", - "@pixi/runner": "6.0.4", - "@pixi/settings": "6.0.4", - "@pixi/sprite": "6.0.4", - "@pixi/sprite-animated": "6.0.4", - "@pixi/sprite-tiling": "6.0.4", - "@pixi/spritesheet": "6.0.4", - "@pixi/text": "6.0.4", - "@pixi/text-bitmap": "6.0.4", - "@pixi/ticker": "6.0.4", - "@pixi/utils": "6.0.4" - } - }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" - }, - "promise-polyfill": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-8.2.0.tgz", - "integrity": "sha512-k/TC0mIcPVF6yHhUvwAp7cvL6I2fFV7TzF1DuGPI8mBh4QQazf36xCKEHKTZKRysEoTQoQdKyP25J8MPJp7j5g==" - }, - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" - }, - "queue-microtask": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.2.tgz", - "integrity": "sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg==" - }, - "regexpp": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==" - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" - }, - "resource-loader": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/resource-loader/-/resource-loader-3.0.1.tgz", - "integrity": "sha512-fBuCRbEHdLCI1eglzQhUv9Rrdcmqkydr1r6uHE2cYHvRBrcLXeSmbE/qI/urFt8rPr/IGxir3BUwM5kUK8XoyA==", - "requires": { - "mini-signals": "^1.2.0", - "parse-uri": "^1.0.0" - } - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "requires": { - "glob": "^7.1.3" - } - }, - "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "requires": { - "queue-microtask": "^1.2.2" - } - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" - }, - "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", - "requires": { - "lru-cache": "^6.0.0" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" - }, - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - } - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - }, - "table": { - "version": "6.0.7", - "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", - "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", - "requires": { - "ajv": "^7.0.2", - "lodash": "^4.17.20", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.0" - }, - "dependencies": { - "ajv": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.1.tgz", - "integrity": "sha512-+nu0HDv7kNSOua9apAVc979qd932rrZeb3WOvoiD31A/p1mIE5/9bN2027pE2rOPYEdS3UHzsvof4hY+lM9/WQ==", - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - } - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "requires": { - "is-number": "^7.0.0" - } - }, - "tslib": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", - "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" - }, - "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "requires": { - "tslib": "^1.8.1" - }, - "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - } - } - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "requires": { - "prelude-ls": "^1.2.1" - } - }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" - }, - "typescript": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz", - "integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==" - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "requires": { - "punycode": "^2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - } - } - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - } - }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" - }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - } - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "xml2js": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", - "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", - "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - } - }, - "xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" - }, - "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - } - }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, "no-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", diff --git a/package.json b/package.json index 6802c1e2..5398e1b2 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { + "@nitrots/nitro-renderer": "file:../nitro-renderer", "@testing-library/jest-dom": "^5.14.1", "@testing-library/react": "^11.2.7", "@testing-library/user-event": "^12.8.3", @@ -13,7 +14,6 @@ "animate.css": "^4.1.1", "classnames": "^2.3.1", "immutable": "^4.0.0-rc.14", - "nitro-renderer": "file:../nitro-renderer", "node-sass": "^5.0.0", "rc-slider": "^9.7.2", "react": "^17.0.2", diff --git a/src/App.tsx b/src/App.tsx index 9a1421c7..8a9c2f2c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,11 +1,10 @@ -import { ConfigurationEvent, LegacyExternalInterface, Nitro, NitroCommunicationDemoEvent, NitroEvent, NitroLocalizationEvent, RoomEngineEvent, WebGL } from 'nitro-renderer'; +import { ConfigurationEvent, LegacyExternalInterface, Nitro, NitroCommunicationDemoEvent, NitroEvent, NitroLocalizationEvent, RoomEngineEvent, WebGL } from '@nitrots/nitro-renderer'; import { FC, useCallback, useState } from 'react'; import { GetCommunication, GetConfiguration, GetNitroInstance } from './api'; import { useConfigurationEvent } from './hooks/events/core/configuration/configuration-event'; import { useLocalizationEvent } from './hooks/events/nitro/localization/localization-event'; import { dispatchMainEvent, useMainEvent } from './hooks/events/nitro/main-event'; import { useRoomEngineEvent } from './hooks/events/nitro/room/room-engine-event'; -import { AuthView } from './views/auth/AuthView'; import { LoadingView } from './views/loading/LoadingView'; import { MainView } from './views/main/MainView'; @@ -13,7 +12,6 @@ export const App: FC<{}> = props => { const [ isReady, setIsReady ] = useState(false); const [ isError, setIsError ] = useState(false); - const [ isAuth, setIsAuth ] = useState(false); const [ message, setMessage ] = useState('Getting Ready'); //@ts-ignore @@ -58,17 +56,8 @@ export const App: FC<{}> = props => case NitroCommunicationDemoEvent.CONNECTION_HANDSHAKING: return; case NitroCommunicationDemoEvent.CONNECTION_HANDSHAKE_FAILED: - const authEnabled = (GetConfiguration('auth.system.enabled') as boolean); - - if(authEnabled) - { - setIsAuth(true); - } - else - { - setIsError(true); - setMessage('Handshake Failed'); - } + setIsError(true); + setMessage('Handshake Failed'); return; case NitroCommunicationDemoEvent.CONNECTION_AUTHENTICATED: setMessage('Finishing Up'); @@ -132,9 +121,8 @@ export const App: FC<{}> = props => return (
- { (!isReady || isError) && !isAuth && } - { (isReady && !isError && !isAuth) && } - { isAuth && } + { (!isReady || isError) && } + { (isReady && !isError) && }
); } diff --git a/src/api/core/GetConfigurationManager.ts b/src/api/core/GetConfigurationManager.ts index f974b328..66ce153f 100644 --- a/src/api/core/GetConfigurationManager.ts +++ b/src/api/core/GetConfigurationManager.ts @@ -1,4 +1,4 @@ -import { IConfigurationManager } from 'nitro-renderer'; +import { IConfigurationManager } from '@nitrots/nitro-renderer'; import { GetNitroCore } from './GetNitroCore'; export function GetConfigurationManager(): IConfigurationManager diff --git a/src/api/core/GetNitroCore.ts b/src/api/core/GetNitroCore.ts index 4972ef2d..19c2e586 100644 --- a/src/api/core/GetNitroCore.ts +++ b/src/api/core/GetNitroCore.ts @@ -1,4 +1,4 @@ -import { INitroCore } from 'nitro-renderer'; +import { INitroCore } from '@nitrots/nitro-renderer'; import { GetNitroInstance } from '../nitro'; export function GetNitroCore(): INitroCore diff --git a/src/api/navigator/TryVisitRoom.ts b/src/api/navigator/TryVisitRoom.ts index 83b1aa8f..d8627477 100644 --- a/src/api/navigator/TryVisitRoom.ts +++ b/src/api/navigator/TryVisitRoom.ts @@ -1,4 +1,4 @@ -import { RoomInfoComposer } from 'nitro-renderer'; +import { RoomInfoComposer } from '@nitrots/nitro-renderer'; import { SendMessageHook } from '../../hooks/messages/message-event'; export function TryVisitRoom(roomId: number): void diff --git a/src/api/nitro/AddLinkEventTracker.ts b/src/api/nitro/AddLinkEventTracker.ts index df1667de..8b9f00f2 100644 --- a/src/api/nitro/AddLinkEventTracker.ts +++ b/src/api/nitro/AddLinkEventTracker.ts @@ -1,4 +1,4 @@ -import { ILinkEventTracker } from 'nitro-renderer'; +import { ILinkEventTracker } from '@nitrots/nitro-renderer'; import { GetNitroInstance } from './GetNitroInstance'; export function AddEventLinkTracker(tracker: ILinkEventTracker): void diff --git a/src/api/nitro/GetCommunication.ts b/src/api/nitro/GetCommunication.ts index 696104fa..96b4c67e 100644 --- a/src/api/nitro/GetCommunication.ts +++ b/src/api/nitro/GetCommunication.ts @@ -1,4 +1,4 @@ -import { INitroCommunicationManager } from 'nitro-renderer'; +import { INitroCommunicationManager } from '@nitrots/nitro-renderer'; import { GetNitroInstance } from './GetNitroInstance'; export function GetCommunication(): INitroCommunicationManager diff --git a/src/api/nitro/GetConnection.ts b/src/api/nitro/GetConnection.ts index bf924a26..fc27f045 100644 --- a/src/api/nitro/GetConnection.ts +++ b/src/api/nitro/GetConnection.ts @@ -1,4 +1,4 @@ -import { IConnection } from 'nitro-renderer'; +import { IConnection } from '@nitrots/nitro-renderer'; import { GetCommunication } from './GetCommunication'; export function GetConnection(): IConnection diff --git a/src/api/nitro/GetNitroInstance.ts b/src/api/nitro/GetNitroInstance.ts index 17735012..5e64a657 100644 --- a/src/api/nitro/GetNitroInstance.ts +++ b/src/api/nitro/GetNitroInstance.ts @@ -1,4 +1,4 @@ -import { INitro, Nitro } from 'nitro-renderer'; +import { INitro, Nitro } from '@nitrots/nitro-renderer'; export function GetNitroInstance(): INitro { diff --git a/src/api/nitro/RemoveLinkEventTracker.ts b/src/api/nitro/RemoveLinkEventTracker.ts index 8963dedc..d551c69f 100644 --- a/src/api/nitro/RemoveLinkEventTracker.ts +++ b/src/api/nitro/RemoveLinkEventTracker.ts @@ -1,4 +1,4 @@ -import { ILinkEventTracker } from 'nitro-renderer'; +import { ILinkEventTracker } from '@nitrots/nitro-renderer'; import { GetNitroInstance } from './GetNitroInstance'; export function RemoveLinkEventTracker(tracker: ILinkEventTracker): void diff --git a/src/api/nitro/avatar/GetAvatarPalette.ts b/src/api/nitro/avatar/GetAvatarPalette.ts index af3526c3..a46acb24 100644 --- a/src/api/nitro/avatar/GetAvatarPalette.ts +++ b/src/api/nitro/avatar/GetAvatarPalette.ts @@ -1,4 +1,4 @@ -import { IPalette } from 'nitro-renderer'; +import { IPalette } from '@nitrots/nitro-renderer'; import { GetAvatarRenderManager } from './GetAvatarRenderManager'; export function GetAvatarPalette(paletteId: number): IPalette diff --git a/src/api/nitro/avatar/GetAvatarRenderManager.ts b/src/api/nitro/avatar/GetAvatarRenderManager.ts index 9f7547ab..460f010f 100644 --- a/src/api/nitro/avatar/GetAvatarRenderManager.ts +++ b/src/api/nitro/avatar/GetAvatarRenderManager.ts @@ -1,4 +1,4 @@ -import { IAvatarRenderManager } from 'nitro-renderer'; +import { IAvatarRenderManager } from '@nitrots/nitro-renderer'; import { GetNitroInstance } from '../GetNitroInstance'; export function GetAvatarRenderManager(): IAvatarRenderManager diff --git a/src/api/nitro/avatar/GetAvatarSetType.ts b/src/api/nitro/avatar/GetAvatarSetType.ts index ba7c8edd..ad95f44f 100644 --- a/src/api/nitro/avatar/GetAvatarSetType.ts +++ b/src/api/nitro/avatar/GetAvatarSetType.ts @@ -1,4 +1,4 @@ -import { ISetType } from 'nitro-renderer'; +import { ISetType } from '@nitrots/nitro-renderer'; import { GetAvatarRenderManager } from './GetAvatarRenderManager'; export function GetAvatarSetType(setType: string): ISetType diff --git a/src/api/nitro/camera/GetRoomCameraWidgetManager.ts b/src/api/nitro/camera/GetRoomCameraWidgetManager.ts index 90bfc45c..392495d3 100644 --- a/src/api/nitro/camera/GetRoomCameraWidgetManager.ts +++ b/src/api/nitro/camera/GetRoomCameraWidgetManager.ts @@ -1,4 +1,4 @@ -import { IRoomCameraWidgetManager } from 'nitro-renderer/src/nitro/camera/IRoomCameraWidgetManager'; +import { IRoomCameraWidgetManager } from '@nitrots/nitro-renderer'; import { GetNitroInstance } from '../GetNitroInstance'; export function GetRoomCameraWidgetManager(): IRoomCameraWidgetManager diff --git a/src/api/nitro/room/DispatchMouseEvent.ts b/src/api/nitro/room/DispatchMouseEvent.ts index 90acea89..762e0dda 100644 --- a/src/api/nitro/room/DispatchMouseEvent.ts +++ b/src/api/nitro/room/DispatchMouseEvent.ts @@ -1,4 +1,4 @@ -import { MouseEventType } from 'nitro-renderer'; +import { MouseEventType } from '@nitrots/nitro-renderer'; import { GetRoomEngine } from './GetRoomEngine'; import { SetActiveRoomId } from './SetActiveRoomId'; diff --git a/src/api/nitro/room/DispatchTouchEvent.ts b/src/api/nitro/room/DispatchTouchEvent.ts index 8b6c7500..7053318e 100644 --- a/src/api/nitro/room/DispatchTouchEvent.ts +++ b/src/api/nitro/room/DispatchTouchEvent.ts @@ -1,4 +1,4 @@ -import { MouseEventType, TouchEventType } from 'nitro-renderer'; +import { MouseEventType, TouchEventType } from '@nitrots/nitro-renderer'; import { GetRoomEngine } from './GetRoomEngine'; let didMouseMove = false; diff --git a/src/api/nitro/room/GetOwnRoomObject.ts b/src/api/nitro/room/GetOwnRoomObject.ts index 81890c16..b8d03646 100644 --- a/src/api/nitro/room/GetOwnRoomObject.ts +++ b/src/api/nitro/room/GetOwnRoomObject.ts @@ -1,4 +1,4 @@ -import { IRoomObjectController, RoomObjectCategory } from 'nitro-renderer'; +import { IRoomObjectController, RoomObjectCategory } from '@nitrots/nitro-renderer'; import { GetRoomSession, GetSessionDataManager } from '../session'; import { GetRoomEngine } from './GetRoomEngine'; diff --git a/src/api/nitro/room/GetRoomEngine.ts b/src/api/nitro/room/GetRoomEngine.ts index 58ae4421..4d18ea71 100644 --- a/src/api/nitro/room/GetRoomEngine.ts +++ b/src/api/nitro/room/GetRoomEngine.ts @@ -1,4 +1,4 @@ -import { IRoomEngine } from 'nitro-renderer'; +import { IRoomEngine } from '@nitrots/nitro-renderer'; import { GetNitroInstance } from '../GetNitroInstance'; export function GetRoomEngine(): IRoomEngine diff --git a/src/api/nitro/room/GetRoomObjectBounds.ts b/src/api/nitro/room/GetRoomObjectBounds.ts index 5c55764d..1b149ce0 100644 --- a/src/api/nitro/room/GetRoomObjectBounds.ts +++ b/src/api/nitro/room/GetRoomObjectBounds.ts @@ -1,4 +1,4 @@ -import { NitroRectangle } from 'nitro-renderer'; +import { NitroRectangle } from '@nitrots/nitro-renderer'; import { GetRoomEngine } from './GetRoomEngine'; export function GetRoomObjectBounds(roomId: number, objectId: number, category: number, canvasId = 1): NitroRectangle diff --git a/src/api/nitro/room/IsFurnitureSelectionDisabled.ts b/src/api/nitro/room/IsFurnitureSelectionDisabled.ts index fc5f26ab..367f3895 100644 --- a/src/api/nitro/room/IsFurnitureSelectionDisabled.ts +++ b/src/api/nitro/room/IsFurnitureSelectionDisabled.ts @@ -1,4 +1,4 @@ -import { RoomEngineObjectEvent, RoomObjectVariable } from 'nitro-renderer'; +import { RoomEngineObjectEvent, RoomObjectVariable } from '@nitrots/nitro-renderer'; import { GetSessionDataManager } from '../..'; import { GetRoomEngine } from './GetRoomEngine'; diff --git a/src/api/nitro/session/CanManipulateFurniture.ts b/src/api/nitro/session/CanManipulateFurniture.ts index 390d2fbc..0141f23a 100644 --- a/src/api/nitro/session/CanManipulateFurniture.ts +++ b/src/api/nitro/session/CanManipulateFurniture.ts @@ -1,4 +1,4 @@ -import { IRoomSession, RoomControllerLevel } from 'nitro-renderer'; +import { IRoomSession, RoomControllerLevel } from '@nitrots/nitro-renderer'; import { GetSessionDataManager } from '../..'; import { GetRoomEngine } from '../room/GetRoomEngine'; import { IsOwnerOfFurniture } from './IsOwnerOfFurniture'; diff --git a/src/api/nitro/session/GetCanStandUp.ts b/src/api/nitro/session/GetCanStandUp.ts index ce114506..4915d183 100644 --- a/src/api/nitro/session/GetCanStandUp.ts +++ b/src/api/nitro/session/GetCanStandUp.ts @@ -1,4 +1,4 @@ -import { AvatarAction, RoomObjectVariable } from 'nitro-renderer'; +import { AvatarAction, RoomObjectVariable } from '@nitrots/nitro-renderer'; import { GetOwnRoomObject } from '../room'; export function GetCanStandUp(): string diff --git a/src/api/nitro/session/GetCanUseExpression.ts b/src/api/nitro/session/GetCanUseExpression.ts index 8ea83509..c7c73676 100644 --- a/src/api/nitro/session/GetCanUseExpression.ts +++ b/src/api/nitro/session/GetCanUseExpression.ts @@ -1,4 +1,4 @@ -import { RoomObjectVariable } from 'nitro-renderer'; +import { RoomObjectVariable } from '@nitrots/nitro-renderer'; import { GetOwnRoomObject } from '../room'; export function GetCanUseExpression(): boolean diff --git a/src/api/nitro/session/GetFurnitureDataForProductOffer.ts b/src/api/nitro/session/GetFurnitureDataForProductOffer.ts index 3c8ce1b0..eb243c8b 100644 --- a/src/api/nitro/session/GetFurnitureDataForProductOffer.ts +++ b/src/api/nitro/session/GetFurnitureDataForProductOffer.ts @@ -1,4 +1,4 @@ -import { CatalogProductOfferData, FurnitureType, IFurnitureData } from 'nitro-renderer'; +import { CatalogProductOfferData, FurnitureType, IFurnitureData } from '@nitrots/nitro-renderer'; import { GetSessionDataManager } from './GetSessionDataManager'; export function GetFurnitureDataForProductOffer(offer: CatalogProductOfferData): IFurnitureData diff --git a/src/api/nitro/session/GetFurnitureDataForRoomObject.ts b/src/api/nitro/session/GetFurnitureDataForRoomObject.ts index e1739f76..360f18d1 100644 --- a/src/api/nitro/session/GetFurnitureDataForRoomObject.ts +++ b/src/api/nitro/session/GetFurnitureDataForRoomObject.ts @@ -1,4 +1,4 @@ -import { IFurnitureData, RoomObjectCategory, RoomObjectVariable } from 'nitro-renderer'; +import { IFurnitureData, RoomObjectCategory, RoomObjectVariable } from '@nitrots/nitro-renderer'; import { GetRoomEngine } from '../room'; import { GetSessionDataManager } from './GetSessionDataManager'; diff --git a/src/api/nitro/session/GetOwnPosture.ts b/src/api/nitro/session/GetOwnPosture.ts index 7cc554d4..fe0c5f33 100644 --- a/src/api/nitro/session/GetOwnPosture.ts +++ b/src/api/nitro/session/GetOwnPosture.ts @@ -1,4 +1,4 @@ -import { AvatarAction, RoomObjectVariable } from 'nitro-renderer'; +import { AvatarAction, RoomObjectVariable } from '@nitrots/nitro-renderer'; import { GetOwnRoomObject } from '../room'; export function GetOwnPosture(): string diff --git a/src/api/nitro/session/GetProductDataForLocalization.ts b/src/api/nitro/session/GetProductDataForLocalization.ts index 155e3c80..692e0ecc 100644 --- a/src/api/nitro/session/GetProductDataForLocalization.ts +++ b/src/api/nitro/session/GetProductDataForLocalization.ts @@ -1,4 +1,4 @@ -import { IProductData } from 'nitro-renderer'; +import { IProductData } from '@nitrots/nitro-renderer'; import { GetSessionDataManager } from './GetSessionDataManager'; export function GetProductDataForLocalization(localizationId: string): IProductData diff --git a/src/api/nitro/session/GetRoomSession.ts b/src/api/nitro/session/GetRoomSession.ts index fec329c7..37a8b9f4 100644 --- a/src/api/nitro/session/GetRoomSession.ts +++ b/src/api/nitro/session/GetRoomSession.ts @@ -1,4 +1,4 @@ -import { IRoomSession } from 'nitro-renderer'; +import { IRoomSession } from '@nitrots/nitro-renderer'; import { GetRoomSessionManager } from './GetRoomSessionManager'; export function GetRoomSession(): IRoomSession diff --git a/src/api/nitro/session/GetRoomSessionManager.ts b/src/api/nitro/session/GetRoomSessionManager.ts index 830ba177..579342dc 100644 --- a/src/api/nitro/session/GetRoomSessionManager.ts +++ b/src/api/nitro/session/GetRoomSessionManager.ts @@ -1,4 +1,4 @@ -import { IRoomSessionManager } from 'nitro-renderer'; +import { IRoomSessionManager } from '@nitrots/nitro-renderer'; import { GetNitroInstance } from '../GetNitroInstance'; export function GetRoomSessionManager(): IRoomSessionManager diff --git a/src/api/nitro/session/GetSessionDataManager.ts b/src/api/nitro/session/GetSessionDataManager.ts index 6af8c5c7..1f3674e0 100644 --- a/src/api/nitro/session/GetSessionDataManager.ts +++ b/src/api/nitro/session/GetSessionDataManager.ts @@ -1,4 +1,4 @@ -import { ISessionDataManager } from 'nitro-renderer'; +import { ISessionDataManager } from '@nitrots/nitro-renderer'; import { GetNitroInstance } from '../GetNitroInstance'; export function GetSessionDataManager(): ISessionDataManager diff --git a/src/api/nitro/session/HasHabboClub.ts b/src/api/nitro/session/HasHabboClub.ts index 213d3daa..4077a0f3 100644 --- a/src/api/nitro/session/HasHabboClub.ts +++ b/src/api/nitro/session/HasHabboClub.ts @@ -1,4 +1,4 @@ -import { HabboClubLevelEnum } from 'nitro-renderer'; +import { HabboClubLevelEnum } from '@nitrots/nitro-renderer'; import { GetSessionDataManager } from './GetSessionDataManager'; export function HasHabboClub(): boolean diff --git a/src/api/nitro/session/HasHabboVip.ts b/src/api/nitro/session/HasHabboVip.ts index 5c84150a..87f11565 100644 --- a/src/api/nitro/session/HasHabboVip.ts +++ b/src/api/nitro/session/HasHabboVip.ts @@ -1,4 +1,4 @@ -import { HabboClubLevelEnum } from 'nitro-renderer'; +import { HabboClubLevelEnum } from '@nitrots/nitro-renderer'; import { GetSessionDataManager } from './GetSessionDataManager'; export function HasHabboVip(): boolean diff --git a/src/api/nitro/session/IsOwnerOfFurniture.ts b/src/api/nitro/session/IsOwnerOfFurniture.ts index 845e0c4d..20c70f3e 100644 --- a/src/api/nitro/session/IsOwnerOfFurniture.ts +++ b/src/api/nitro/session/IsOwnerOfFurniture.ts @@ -1,4 +1,4 @@ -import { IRoomObject, RoomObjectVariable } from 'nitro-renderer'; +import { IRoomObject, RoomObjectVariable } from '@nitrots/nitro-renderer'; import { GetSessionDataManager } from '../../../api'; export function IsOwnerOfFurniture(roomObject: IRoomObject): boolean diff --git a/src/api/nitro/session/IsRidingHorse.ts b/src/api/nitro/session/IsRidingHorse.ts index ff4c5d02..f946b69b 100644 --- a/src/api/nitro/session/IsRidingHorse.ts +++ b/src/api/nitro/session/IsRidingHorse.ts @@ -1,4 +1,4 @@ -import { RoomObjectVariable } from 'nitro-renderer'; +import { RoomObjectVariable } from '@nitrots/nitro-renderer'; import { GetOwnRoomObject } from '../room'; export function IsRidingHorse(): boolean diff --git a/src/api/nitro/session/StartRoomSession.ts b/src/api/nitro/session/StartRoomSession.ts index aac8673c..99d9d0be 100644 --- a/src/api/nitro/session/StartRoomSession.ts +++ b/src/api/nitro/session/StartRoomSession.ts @@ -1,4 +1,4 @@ -import { IRoomSession } from 'nitro-renderer'; +import { IRoomSession } from '@nitrots/nitro-renderer'; import { GetRoomSessionManager } from './GetRoomSessionManager'; export function StartRoomSession(session: IRoomSession): void diff --git a/src/events/achievements/AchievementsUIEvent.ts b/src/events/achievements/AchievementsUIEvent.ts index 55954b54..7854bf28 100644 --- a/src/events/achievements/AchievementsUIEvent.ts +++ b/src/events/achievements/AchievementsUIEvent.ts @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; export class AchievementsUIEvent extends NitroEvent { diff --git a/src/events/avatar-editor/AvatarEditorEvent.ts b/src/events/avatar-editor/AvatarEditorEvent.ts index cd123b52..fdde2f19 100644 --- a/src/events/avatar-editor/AvatarEditorEvent.ts +++ b/src/events/avatar-editor/AvatarEditorEvent.ts @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; export class AvatarEditorEvent extends NitroEvent { diff --git a/src/events/catalog/CatalogEvent.ts b/src/events/catalog/CatalogEvent.ts index b08ca399..f6d6bf72 100644 --- a/src/events/catalog/CatalogEvent.ts +++ b/src/events/catalog/CatalogEvent.ts @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; export class CatalogEvent extends NitroEvent { diff --git a/src/events/catalog/CatalogPurchasedEvent.ts b/src/events/catalog/CatalogPurchasedEvent.ts index cef77656..7e435e22 100644 --- a/src/events/catalog/CatalogPurchasedEvent.ts +++ b/src/events/catalog/CatalogPurchasedEvent.ts @@ -1,4 +1,4 @@ -import { CatalogPurchaseData } from 'nitro-renderer'; +import { CatalogPurchaseData } from '@nitrots/nitro-renderer'; import { CatalogEvent } from './CatalogEvent'; export class CatalogPurchasedEvent extends CatalogEvent diff --git a/src/events/friend-list/FriendListEvent.ts b/src/events/friend-list/FriendListEvent.ts index a321247c..0d86b29b 100644 --- a/src/events/friend-list/FriendListEvent.ts +++ b/src/events/friend-list/FriendListEvent.ts @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; export class FriendListEvent extends NitroEvent { diff --git a/src/events/inventory/InventoryBadgesRequestEvent.ts b/src/events/inventory/InventoryBadgesRequestEvent.ts index 18683834..21ae1002 100644 --- a/src/events/inventory/InventoryBadgesRequestEvent.ts +++ b/src/events/inventory/InventoryBadgesRequestEvent.ts @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; export class InventoryBadgesRequestEvent extends NitroEvent { diff --git a/src/events/inventory/InventoryBadgesUpdatedEvent.ts b/src/events/inventory/InventoryBadgesUpdatedEvent.ts index 0b5d2220..4fb8d6af 100644 --- a/src/events/inventory/InventoryBadgesUpdatedEvent.ts +++ b/src/events/inventory/InventoryBadgesUpdatedEvent.ts @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; export class InventoryBadgesUpdatedEvent extends NitroEvent { diff --git a/src/events/inventory/InventoryEvent.ts b/src/events/inventory/InventoryEvent.ts index 55ca046d..94d242dd 100644 --- a/src/events/inventory/InventoryEvent.ts +++ b/src/events/inventory/InventoryEvent.ts @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; export class InventoryEvent extends NitroEvent { diff --git a/src/events/inventory/UnseenItemTrackerUpdateEvent.ts b/src/events/inventory/UnseenItemTrackerUpdateEvent.ts index c1302e1b..0f100a5f 100644 --- a/src/events/inventory/UnseenItemTrackerUpdateEvent.ts +++ b/src/events/inventory/UnseenItemTrackerUpdateEvent.ts @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; export class UnseenItemTrackerUpdateEvent extends NitroEvent { diff --git a/src/events/mod-tools/ModToolsEvent.ts b/src/events/mod-tools/ModToolsEvent.ts index fca082ec..b6070a36 100644 --- a/src/events/mod-tools/ModToolsEvent.ts +++ b/src/events/mod-tools/ModToolsEvent.ts @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; export class ModToolsEvent extends NitroEvent { diff --git a/src/events/navigator/NavigatorEvent.ts b/src/events/navigator/NavigatorEvent.ts index 19f3a81c..2323940d 100644 --- a/src/events/navigator/NavigatorEvent.ts +++ b/src/events/navigator/NavigatorEvent.ts @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; export class NavigatorEvent extends NitroEvent { diff --git a/src/events/notification-center/NotificationCenterAlertEvent.ts b/src/events/notification-center/NotificationCenterAlertEvent.ts index 74266659..44a97b8c 100644 --- a/src/events/notification-center/NotificationCenterAlertEvent.ts +++ b/src/events/notification-center/NotificationCenterAlertEvent.ts @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; export class NotificationCenterAlertEvent extends NitroEvent { diff --git a/src/events/notification-center/NotificationCenterEvent.ts b/src/events/notification-center/NotificationCenterEvent.ts index 4889bcd5..ad01268f 100644 --- a/src/events/notification-center/NotificationCenterEvent.ts +++ b/src/events/notification-center/NotificationCenterEvent.ts @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; export class NotificationCenterEvent extends NitroEvent { diff --git a/src/events/wired/WiredEvent.ts b/src/events/wired/WiredEvent.ts index d5959215..6020680b 100644 --- a/src/events/wired/WiredEvent.ts +++ b/src/events/wired/WiredEvent.ts @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; export class WiredEvent extends NitroEvent { diff --git a/src/hooks/events/core/communication/communication-event.tsx b/src/hooks/events/core/communication/communication-event.tsx index c9bcdd65..e727ba5c 100644 --- a/src/hooks/events/core/communication/communication-event.tsx +++ b/src/hooks/events/core/communication/communication-event.tsx @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; import { GetCommunication } from '../../../../api'; import { CreateEventDispatcherHook } from '../../event-dispatcher.base'; diff --git a/src/hooks/events/core/configuration/configuration-event.tsx b/src/hooks/events/core/configuration/configuration-event.tsx index 6654fa23..68eee3d5 100644 --- a/src/hooks/events/core/configuration/configuration-event.tsx +++ b/src/hooks/events/core/configuration/configuration-event.tsx @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; import { GetConfigurationManager } from '../../../../api'; import { CreateEventDispatcherHook } from '../../event-dispatcher.base'; diff --git a/src/hooks/events/event-dispatcher.base.tsx b/src/hooks/events/event-dispatcher.base.tsx index 99214c16..61bcc7fd 100644 --- a/src/hooks/events/event-dispatcher.base.tsx +++ b/src/hooks/events/event-dispatcher.base.tsx @@ -1,4 +1,4 @@ -import { IEventDispatcher, NitroEvent } from 'nitro-renderer'; +import { IEventDispatcher, NitroEvent } from '@nitrots/nitro-renderer'; import { useEffect } from 'react'; export function CreateEventDispatcherHook(type: string, eventDispatcher: IEventDispatcher, handler: (event: NitroEvent) => void): void diff --git a/src/hooks/events/nitro/avatar/avatar-event.tsx b/src/hooks/events/nitro/avatar/avatar-event.tsx index c41f721b..cf57aee6 100644 --- a/src/hooks/events/nitro/avatar/avatar-event.tsx +++ b/src/hooks/events/nitro/avatar/avatar-event.tsx @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; import { GetAvatarRenderManager } from '../../../../api'; import { CreateEventDispatcherHook } from '../../event-dispatcher.base'; diff --git a/src/hooks/events/nitro/camera/camera-event.tsx b/src/hooks/events/nitro/camera/camera-event.tsx index 3a8e311f..3e90f741 100644 --- a/src/hooks/events/nitro/camera/camera-event.tsx +++ b/src/hooks/events/nitro/camera/camera-event.tsx @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; import { GetNitroInstance } from '../../../../api'; import { CreateEventDispatcherHook } from '../../event-dispatcher.base'; diff --git a/src/hooks/events/nitro/localization/localization-event.tsx b/src/hooks/events/nitro/localization/localization-event.tsx index 8fd273d8..8e3fbb87 100644 --- a/src/hooks/events/nitro/localization/localization-event.tsx +++ b/src/hooks/events/nitro/localization/localization-event.tsx @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; import { GetNitroInstance } from '../../../../api'; import { CreateEventDispatcherHook } from '../../event-dispatcher.base'; diff --git a/src/hooks/events/nitro/main-event.tsx b/src/hooks/events/nitro/main-event.tsx index 1266e3fd..92fa3146 100644 --- a/src/hooks/events/nitro/main-event.tsx +++ b/src/hooks/events/nitro/main-event.tsx @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; import { GetNitroInstance } from '../../../api'; import { CreateEventDispatcherHook, DispatchEventHook } from '../event-dispatcher.base'; diff --git a/src/hooks/events/nitro/room/room-engine-event.tsx b/src/hooks/events/nitro/room/room-engine-event.tsx index f4e4ce39..7be1ad21 100644 --- a/src/hooks/events/nitro/room/room-engine-event.tsx +++ b/src/hooks/events/nitro/room/room-engine-event.tsx @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; import { GetRoomEngine } from '../../../../api'; import { CreateEventDispatcherHook } from '../../event-dispatcher.base'; diff --git a/src/hooks/events/nitro/session/room-session-manager-event.tsx b/src/hooks/events/nitro/session/room-session-manager-event.tsx index 4335a72b..0ebcee31 100644 --- a/src/hooks/events/nitro/session/room-session-manager-event.tsx +++ b/src/hooks/events/nitro/session/room-session-manager-event.tsx @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; import { GetRoomSessionManager } from '../../../../api'; import { CreateEventDispatcherHook } from '../../event-dispatcher.base'; diff --git a/src/hooks/events/nitro/session/session-data-manager-event.tsx b/src/hooks/events/nitro/session/session-data-manager-event.tsx index 5b4b550d..176b29e1 100644 --- a/src/hooks/events/nitro/session/session-data-manager-event.tsx +++ b/src/hooks/events/nitro/session/session-data-manager-event.tsx @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; import { GetSessionDataManager } from '../../../../api'; import { CreateEventDispatcherHook } from '../../event-dispatcher.base'; diff --git a/src/hooks/events/ui/ui-event.tsx b/src/hooks/events/ui/ui-event.tsx index 582da392..0d9385ff 100644 --- a/src/hooks/events/ui/ui-event.tsx +++ b/src/hooks/events/ui/ui-event.tsx @@ -1,4 +1,4 @@ -import { EventDispatcher, IEventDispatcher, NitroEvent } from 'nitro-renderer'; +import { EventDispatcher, IEventDispatcher, NitroEvent } from '@nitrots/nitro-renderer'; import { CreateEventDispatcherHook, DispatchEventHook } from '../event-dispatcher.base'; const uiEventDispatcher: IEventDispatcher = new EventDispatcher(); diff --git a/src/hooks/messages/message-event.tsx b/src/hooks/messages/message-event.tsx index c530586c..bd855ec7 100644 --- a/src/hooks/messages/message-event.tsx +++ b/src/hooks/messages/message-event.tsx @@ -1,4 +1,4 @@ -import { IMessageComposer, IMessageEvent, MessageEvent } from 'nitro-renderer'; +import { IMessageComposer, IMessageEvent, MessageEvent } from '@nitrots/nitro-renderer'; import { useEffect } from 'react'; import { GetCommunication, GetConnection } from '../../api'; diff --git a/src/views/Styles.scss b/src/views/Styles.scss index db1592c7..7949875c 100644 --- a/src/views/Styles.scss +++ b/src/views/Styles.scss @@ -1,5 +1,4 @@ @import './shared/Shared'; -@import './auth/AuthView'; @import './avatar-editor/AvatarEditorView'; @import './catalog/CatalogView'; @import './friend-list/FriendListView'; diff --git a/src/views/achievements/AchievementsMessageHandler.tsx b/src/views/achievements/AchievementsMessageHandler.tsx index 9bd075de..d9e941a6 100644 --- a/src/views/achievements/AchievementsMessageHandler.tsx +++ b/src/views/achievements/AchievementsMessageHandler.tsx @@ -1,4 +1,4 @@ -import { AchievementEvent, AchievementsEvent, AchievementsScoreEvent } from 'nitro-renderer'; +import { AchievementEvent, AchievementsEvent, AchievementsScoreEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback } from 'react'; import { CreateMessageHook } from '../../hooks/messages'; import { IAchievementsMessageHandlerProps } from './AchievementsMessageHandler.types'; diff --git a/src/views/achievements/common/AchievementCategory.ts b/src/views/achievements/common/AchievementCategory.ts index bcf4f7f6..e40468d1 100644 --- a/src/views/achievements/common/AchievementCategory.ts +++ b/src/views/achievements/common/AchievementCategory.ts @@ -1,4 +1,4 @@ -import { AchievementData } from 'nitro-renderer'; +import { AchievementData } from '@nitrots/nitro-renderer'; export class AchievementCategory { diff --git a/src/views/achievements/views/category/AchievementCategoryView.tsx b/src/views/achievements/views/category/AchievementCategoryView.tsx index 91ba95e0..2a17d126 100644 --- a/src/views/achievements/views/category/AchievementCategoryView.tsx +++ b/src/views/achievements/views/category/AchievementCategoryView.tsx @@ -1,5 +1,5 @@ +import { AchievementData } from '@nitrots/nitro-renderer'; import classNames from 'classnames'; -import { AchievementData } from 'nitro-renderer'; import { FC, useCallback } from 'react'; import { LocalizeText } from '../../../../utils/LocalizeText'; import { BadgeImageView } from '../../../shared/badge-image/BadgeImageView'; diff --git a/src/views/auth/AuthView.scss b/src/views/auth/AuthView.scss deleted file mode 100644 index 0cc28282..00000000 --- a/src/views/auth/AuthView.scss +++ /dev/null @@ -1,11 +0,0 @@ -.nitro-auth { - width: 100%; - height: 100%; - position: absolute; - - .logo { - background: url('../../assets/images/nitro/nitro-light.svg') no-repeat center; - width: 45%; - height: 45%; - } -} diff --git a/src/views/auth/AuthView.tsx b/src/views/auth/AuthView.tsx deleted file mode 100644 index 90674a5d..00000000 --- a/src/views/auth/AuthView.tsx +++ /dev/null @@ -1,173 +0,0 @@ -import classNames from 'classnames'; -import { AuthenticationMessageComposer } from 'nitro-renderer'; -import { AuthenticationEvent } from 'nitro-renderer/src/nitro/communication/messages/incoming/handshake/AuthenticationEvent'; -import { FC, useCallback, useEffect, useState } from 'react'; -import ReCAPTCHA from "react-google-recaptcha"; -import { GetConfiguration } from '../../api'; -import { CreateMessageHook, SendMessageHook } from '../../hooks/messages'; -import { AuthField, AuthViewProps } from './AuthView.types'; -import { AuthFormView } from './views/form/AuthFormView'; - -export const AuthView: FC = props => -{ - const [ showLogin, setShowLogin ] = useState(true); - const [ registerEnabled, setRegisterEnabled ] = useState(false); - const [ isLoading, setIsLoading ] = useState(false); - const [ fields, setFields ] = useState(null); - const [ recaptchaPublicKey, setRecaptchaPublicKey ] = useState(null); - const [ recaptchaAnswer, setRecaptchaAnswer ] = useState(null); - - useEffect(() => - { - const configFields = GetConfiguration('auth.system.' + (showLogin ? 'login' : 'register') + '.fields'); - - if(configFields.length > 0) setFields(configFields); - - const recaptchaKey = GetConfiguration('auth.system.recaptcha.public_key'); - - if(recaptchaKey) setRecaptchaPublicKey(recaptchaKey); - - const registerEnabledConfig = GetConfiguration('auth.system.register.enabled'); - - if(registerEnabledConfig) setRegisterEnabled(true); - }, [ showLogin ]); - - const setFieldValue = useCallback((key: string, value: string) => - { - const fieldsClone = Array.from(fields); - - const field = fieldsClone.find(field => field.name === key); - - if(!field) return; - - field.value = value; - - setFields(fieldsClone); - }, [ fields ]); - - const handleAuthentication = useCallback((data: any) => - { - setIsLoading(false); - - if(!data) return; - - let ssoFieldName = 'sso'; - - if(GetConfiguration('auth.system.http.enabled')) ssoFieldName = GetConfiguration('auth.system.sso_field_name', 'sso'); - - if(!data[ssoFieldName]) return; - - window.location.href = window.location.origin + '/?sso=' + data[ssoFieldName]; - }, []); - - const sendHttpAuthentication = useCallback((body: string) => - { - const endpoint = (GetConfiguration('auth.system.http.endpoint.' + (showLogin ? 'login' : 'register')) as string); - - if(!endpoint) return; - - const requestOptions = { - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - body: body - }; - - fetch(endpoint, requestOptions) - .then(response => response.json(), error => - { - setIsLoading(false); - console.log('Login failed', error); - - return null; - }) - .then(data => handleAuthentication(data)); - }, [handleAuthentication, showLogin]); - - const sendPacketAuthentication = useCallback((keys: string[], values: string[]) => - { - SendMessageHook(new AuthenticationMessageComposer((showLogin ? 'login' : 'register'), keys, values)); - }, [ showLogin ]); - - CreateMessageHook(AuthenticationEvent, event => handleAuthentication(Object.entries(event.parser))); - - const sendAuthentication = useCallback(() => - { - const recaptchaFieldName = GetConfiguration('auth.system.recaptcha.field_name'); - - if(recaptchaPublicKey && (!recaptchaAnswer || !recaptchaFieldName)) return; - - let fieldsOk = true; - - const httpEnabled = GetConfiguration('auth.system.http.enabled'); - - const requestData = {}; - const requestKeys: string[] = []; - const requestValues: string[] = []; - - fields.map(field => - { - if(!field.value || field.value.length === 0) - { - fieldsOk = false; - return false; - } - - if(httpEnabled) - requestData[field.name] = field.value; - else - { - requestKeys.push(field.name); - requestValues.push(field.value.toString()); - } - return true; - }); - - - if(!fieldsOk) return; - - if(recaptchaPublicKey) requestData[recaptchaFieldName] = recaptchaAnswer; - - setIsLoading(true); - - if(httpEnabled) - { - sendHttpAuthentication(JSON.stringify(requestData)); - } - else - { - sendPacketAuthentication(requestKeys, requestValues); - } - }, [recaptchaPublicKey, recaptchaAnswer, fields, sendHttpAuthentication, sendPacketAuthentication]); - - const handleAction = useCallback((action: string, value?: string) => - { - if(!action) return; - - switch(action) - { - case 'toggle_login': - setShowLogin(value => !value); - return; - case 'recaptcha_load': - setRecaptchaAnswer(value); - return; - case 'send': - sendAuthentication(); - return; - } - }, [sendAuthentication]); - - if(!fields) return null; - - return ( -
-
- - { recaptchaPublicKey && handleAction('recaptcha_load', event) } /> } -
- - { registerEnabled && } -
-
- ); -} diff --git a/src/views/auth/AuthView.types.ts b/src/views/auth/AuthView.types.ts deleted file mode 100644 index 95c65d29..00000000 --- a/src/views/auth/AuthView.types.ts +++ /dev/null @@ -1,14 +0,0 @@ -export interface AuthViewProps -{} - -export class AuthField -{ - constructor( - public name: string, - public label: string, - public type: string, - public col: number, - public value: string = '' - ) - {} -} diff --git a/src/views/auth/views/form/AuthFormView.tsx b/src/views/auth/views/form/AuthFormView.tsx deleted file mode 100644 index 239a9887..00000000 --- a/src/views/auth/views/form/AuthFormView.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { FC, useCallback } from 'react'; -import { AuthFormViewProps } from './AuthFormView.types'; - -export const AuthFormView: FC = props => -{ - const { fields = null, setFieldValue = null, isLoading = null } = props; - - const getFieldValue = useCallback((key: string) => - { - const field = fields.find(field => field.name === key); - - if(!field) return; - - return field.value; - }, [ fields ]); - - if(!fields) return null; - - return (<> -
- { fields.map(field => - { - return
-
{ field.label }
- setFieldValue(field.name, event.target.value.toString())} /> -
; - }) } -
- ); -} diff --git a/src/views/auth/views/form/AuthFormView.types.ts b/src/views/auth/views/form/AuthFormView.types.ts deleted file mode 100644 index b35c7fe4..00000000 --- a/src/views/auth/views/form/AuthFormView.types.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { AuthField } from './../../AuthView.types'; - -export interface AuthFormViewProps -{ - fields: AuthField[]; - setFieldValue: (key: string, value: string | number) => void; - isLoading: boolean; -} diff --git a/src/views/avatar-editor/AvatarEditorView.tsx b/src/views/avatar-editor/AvatarEditorView.tsx index df6c4fbb..be5ea7df 100644 --- a/src/views/avatar-editor/AvatarEditorView.tsx +++ b/src/views/avatar-editor/AvatarEditorView.tsx @@ -1,4 +1,4 @@ -import { AvatarDirectionAngle, AvatarEditorFigureCategory, FigureSetIdsMessageEvent, UserFigureComposer, UserWardrobePageComposer, UserWardrobePageEvent } from 'nitro-renderer'; +import { AvatarDirectionAngle, AvatarEditorFigureCategory, FigureSetIdsMessageEvent, UserFigureComposer, UserWardrobePageComposer, UserWardrobePageEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { GetClubMemberLevel, GetSessionDataManager } from '../../api'; import { AvatarEditorEvent } from '../../events/avatar-editor'; diff --git a/src/views/avatar-editor/common/AvatarEditorGridColorItem.ts b/src/views/avatar-editor/common/AvatarEditorGridColorItem.ts index 9757b1fc..cd7a6557 100644 --- a/src/views/avatar-editor/common/AvatarEditorGridColorItem.ts +++ b/src/views/avatar-editor/common/AvatarEditorGridColorItem.ts @@ -1,4 +1,4 @@ -import { ColorConverter, IPartColor } from 'nitro-renderer'; +import { ColorConverter, IPartColor } from '@nitrots/nitro-renderer'; export class AvatarEditorGridColorItem { diff --git a/src/views/avatar-editor/common/AvatarEditorGridPartItem.ts b/src/views/avatar-editor/common/AvatarEditorGridPartItem.ts index 4ac82a7f..a0087fa1 100644 --- a/src/views/avatar-editor/common/AvatarEditorGridPartItem.ts +++ b/src/views/avatar-editor/common/AvatarEditorGridPartItem.ts @@ -1,4 +1,4 @@ -import { AvatarFigurePartType, IAvatarImageListener, IAvatarRenderManager, IFigurePart, IFigurePartSet, IGraphicAsset, IPartColor, NitroContainer, NitroSprite, TextureUtils } from 'nitro-renderer'; +import { AvatarFigurePartType, IAvatarImageListener, IAvatarRenderManager, IFigurePart, IFigurePartSet, IGraphicAsset, IPartColor, NitroContainer, NitroSprite, TextureUtils } from '@nitrots/nitro-renderer'; import { GetAvatarRenderManager } from '../../../api'; import { FigureData } from './FigureData'; diff --git a/src/views/avatar-editor/common/AvatarEditorUtilities.ts b/src/views/avatar-editor/common/AvatarEditorUtilities.ts index a89e44c1..5a7b9f52 100644 --- a/src/views/avatar-editor/common/AvatarEditorUtilities.ts +++ b/src/views/avatar-editor/common/AvatarEditorUtilities.ts @@ -1,4 +1,4 @@ -import { IPartColor } from 'nitro-renderer'; +import { IPartColor } from '@nitrots/nitro-renderer'; import { GetAvatarPalette, GetAvatarRenderManager, GetAvatarSetType, GetClubMemberLevel, GetConfiguration } from '../../../api'; import { AvatarEditorGridColorItem } from './AvatarEditorGridColorItem'; import { AvatarEditorGridPartItem } from './AvatarEditorGridPartItem'; diff --git a/src/views/avatar-editor/common/BodyModel.ts b/src/views/avatar-editor/common/BodyModel.ts index 02151180..437d44e6 100644 --- a/src/views/avatar-editor/common/BodyModel.ts +++ b/src/views/avatar-editor/common/BodyModel.ts @@ -1,4 +1,4 @@ -import { AvatarEditorFigureCategory, AvatarScaleType, AvatarSetType, IAvatarImageListener } from 'nitro-renderer'; +import { AvatarEditorFigureCategory, AvatarScaleType, AvatarSetType, IAvatarImageListener } from '@nitrots/nitro-renderer'; import { GetAvatarRenderManager } from '../../../api'; import { AvatarEditorUtilities } from './AvatarEditorUtilities'; import { CategoryBaseModel } from './CategoryBaseModel'; diff --git a/src/views/avatar-editor/common/CategoryData.ts b/src/views/avatar-editor/common/CategoryData.ts index 1b740037..9b2aeb83 100644 --- a/src/views/avatar-editor/common/CategoryData.ts +++ b/src/views/avatar-editor/common/CategoryData.ts @@ -1,4 +1,4 @@ -import { IPartColor } from 'nitro-renderer'; +import { IPartColor } from '@nitrots/nitro-renderer'; import { AvatarEditorGridColorItem } from './AvatarEditorGridColorItem'; import { AvatarEditorGridPartItem } from './AvatarEditorGridPartItem'; diff --git a/src/views/avatar-editor/common/FigureGenerator.ts b/src/views/avatar-editor/common/FigureGenerator.ts index c799b80c..72581717 100644 --- a/src/views/avatar-editor/common/FigureGenerator.ts +++ b/src/views/avatar-editor/common/FigureGenerator.ts @@ -1,4 +1,4 @@ -import { AvatarFigureContainer, IFigurePartSet, IPalette, IPartColor, SetType } from 'nitro-renderer'; +import { AvatarFigureContainer, IFigurePartSet, IPalette, IPartColor, SetType } from '@nitrots/nitro-renderer'; import { GetAvatarRenderManager } from '../../../api'; import { Randomizer } from '../../../utils'; import { FigureData } from './FigureData'; diff --git a/src/views/avatar-editor/common/HeadModel.ts b/src/views/avatar-editor/common/HeadModel.ts index bb6276e8..5dc30cdb 100644 --- a/src/views/avatar-editor/common/HeadModel.ts +++ b/src/views/avatar-editor/common/HeadModel.ts @@ -1,4 +1,4 @@ -import { AvatarEditorFigureCategory } from 'nitro-renderer'; +import { AvatarEditorFigureCategory } from '@nitrots/nitro-renderer'; import { CategoryBaseModel } from './CategoryBaseModel'; import { FigureData } from './FigureData'; diff --git a/src/views/avatar-editor/common/LegModel.ts b/src/views/avatar-editor/common/LegModel.ts index 02aec797..56339302 100644 --- a/src/views/avatar-editor/common/LegModel.ts +++ b/src/views/avatar-editor/common/LegModel.ts @@ -1,4 +1,4 @@ -import { AvatarEditorFigureCategory } from 'nitro-renderer'; +import { AvatarEditorFigureCategory } from '@nitrots/nitro-renderer'; import { CategoryBaseModel } from './CategoryBaseModel'; import { FigureData } from './FigureData'; diff --git a/src/views/avatar-editor/common/TorsoModel.ts b/src/views/avatar-editor/common/TorsoModel.ts index 2875ffa4..43e48cf7 100644 --- a/src/views/avatar-editor/common/TorsoModel.ts +++ b/src/views/avatar-editor/common/TorsoModel.ts @@ -1,4 +1,4 @@ -import { AvatarEditorFigureCategory } from 'nitro-renderer'; +import { AvatarEditorFigureCategory } from '@nitrots/nitro-renderer'; import { CategoryBaseModel } from './CategoryBaseModel'; import { FigureData } from './FigureData'; diff --git a/src/views/avatar-editor/views/wardrobe/AvatarEditorWardrobeView.tsx b/src/views/avatar-editor/views/wardrobe/AvatarEditorWardrobeView.tsx index d33a9d2e..bf8f42e0 100644 --- a/src/views/avatar-editor/views/wardrobe/AvatarEditorWardrobeView.tsx +++ b/src/views/avatar-editor/views/wardrobe/AvatarEditorWardrobeView.tsx @@ -1,4 +1,4 @@ -import { UserWardrobeSaveComposer } from 'nitro-renderer'; +import { UserWardrobeSaveComposer } from '@nitrots/nitro-renderer'; import { FC, useCallback, useMemo } from 'react'; import { Button } from 'react-bootstrap'; import { SendMessageHook } from '../../../../hooks'; diff --git a/src/views/catalog/CatalogMessageHandler.tsx b/src/views/catalog/CatalogMessageHandler.tsx index 70ddf952..919e2c0c 100644 --- a/src/views/catalog/CatalogMessageHandler.tsx +++ b/src/views/catalog/CatalogMessageHandler.tsx @@ -1,4 +1,4 @@ -import { CatalogApproveNameResultEvent, CatalogClubEvent, CatalogGiftConfigurationEvent, CatalogGroupsEvent, CatalogPageEvent, CatalogPagesEvent, CatalogPurchaseEvent, CatalogPurchaseFailedEvent, CatalogPurchaseUnavailableEvent, CatalogSearchEvent, CatalogSoldOutEvent, CatalogUpdatedEvent, SellablePetPalettesEvent, UserSubscriptionEvent } from 'nitro-renderer'; +import { CatalogApproveNameResultEvent, CatalogClubEvent, CatalogGiftConfigurationEvent, CatalogGroupsEvent, CatalogPageEvent, CatalogPagesEvent, CatalogPurchaseEvent, CatalogPurchaseFailedEvent, CatalogPurchaseUnavailableEvent, CatalogSearchEvent, CatalogSoldOutEvent, CatalogUpdatedEvent, SellablePetPalettesEvent, UserSubscriptionEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback } from 'react'; import { CatalogNameResultEvent, CatalogPurchaseFailureEvent } from '../../events'; import { CatalogPurchasedEvent } from '../../events/catalog/CatalogPurchasedEvent'; diff --git a/src/views/catalog/CatalogView.tsx b/src/views/catalog/CatalogView.tsx index 59dd05cb..008e0c06 100644 --- a/src/views/catalog/CatalogView.tsx +++ b/src/views/catalog/CatalogView.tsx @@ -1,4 +1,4 @@ -import { CatalogModeComposer, CatalogPageComposer, CatalogRequestGiftConfigurationComposer, ICatalogPageData, ILinkEventTracker, RoomPreviewer } from 'nitro-renderer'; +import { CatalogModeComposer, CatalogPageComposer, CatalogRequestGiftConfigurationComposer, ICatalogPageData, ILinkEventTracker, RoomPreviewer } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useReducer, useState } from 'react'; import { AddEventLinkTracker, GetRoomEngine, RemoveLinkEventTracker } from '../../api'; import { CatalogEvent } from '../../events'; diff --git a/src/views/catalog/common/CatalogPetPalette.ts b/src/views/catalog/common/CatalogPetPalette.ts index 23abc739..162e755c 100644 --- a/src/views/catalog/common/CatalogPetPalette.ts +++ b/src/views/catalog/common/CatalogPetPalette.ts @@ -1,4 +1,4 @@ -import { SellablePetPaletteData } from 'nitro-renderer'; +import { SellablePetPaletteData } from '@nitrots/nitro-renderer'; export class CatalogPetPalette { diff --git a/src/views/catalog/common/CatalogUtilities.ts b/src/views/catalog/common/CatalogUtilities.ts index dd7532a5..cd2e5d91 100644 --- a/src/views/catalog/common/CatalogUtilities.ts +++ b/src/views/catalog/common/CatalogUtilities.ts @@ -1,4 +1,4 @@ -import { CatalogPageOfferData, ICatalogPageData, ICatalogPageParser, IFurnitureData, SellablePetPaletteData } from 'nitro-renderer'; +import { CatalogPageOfferData, ICatalogPageData, ICatalogPageParser, IFurnitureData, SellablePetPaletteData } from '@nitrots/nitro-renderer'; import { GetConfiguration, GetProductDataForLocalization, GetRoomEngine } from '../../../api'; export interface ICatalogOffers diff --git a/src/views/catalog/common/GiftWrappingConfiguration.ts b/src/views/catalog/common/GiftWrappingConfiguration.ts index f54d6850..1b6d890c 100644 --- a/src/views/catalog/common/GiftWrappingConfiguration.ts +++ b/src/views/catalog/common/GiftWrappingConfiguration.ts @@ -1,4 +1,4 @@ -import { CatalogGiftConfigurationParser } from 'nitro-renderer'; +import { CatalogGiftConfigurationParser } from '@nitrots/nitro-renderer'; export class GiftWrappingConfiguration { diff --git a/src/views/catalog/reducers/CatalogReducer.tsx b/src/views/catalog/reducers/CatalogReducer.tsx index 8e998cd3..67352f0a 100644 --- a/src/views/catalog/reducers/CatalogReducer.tsx +++ b/src/views/catalog/reducers/CatalogReducer.tsx @@ -1,4 +1,4 @@ -import { CatalogClubOfferData, CatalogGiftConfigurationParser, CatalogGroupData, CatalogPageOfferData, ICatalogPageData, ICatalogPageParser } from 'nitro-renderer'; +import { CatalogClubOfferData, CatalogGiftConfigurationParser, CatalogGroupData, CatalogPageOfferData, ICatalogPageData, ICatalogPageParser } from '@nitrots/nitro-renderer'; import { Reducer } from 'react'; import { CatalogPetPalette } from '../common/CatalogPetPalette'; import { ICatalogOffers, ICatalogSearchResult, SetOffersToNodes } from '../common/CatalogUtilities'; diff --git a/src/views/catalog/views/catalog-room-previewer/CatalogRoomPreviewerView.tsx b/src/views/catalog/views/catalog-room-previewer/CatalogRoomPreviewerView.tsx index 94fc5ca8..ee43b2e9 100644 --- a/src/views/catalog/views/catalog-room-previewer/CatalogRoomPreviewerView.tsx +++ b/src/views/catalog/views/catalog-room-previewer/CatalogRoomPreviewerView.tsx @@ -1,4 +1,4 @@ -import { NitroToolbarAnimateIconEvent, TextureUtils, ToolbarIconEnum } from 'nitro-renderer'; +import { NitroToolbarAnimateIconEvent, TextureUtils, ToolbarIconEnum } from '@nitrots/nitro-renderer'; import { FC, useCallback, useRef } from 'react'; import { GetRoomEngine } from '../../../../api'; import { CatalogEvent } from '../../../../events'; diff --git a/src/views/catalog/views/navigation/CatalogNavigationView.tsx b/src/views/catalog/views/navigation/CatalogNavigationView.tsx index 98c1bef3..b5e0aadd 100644 --- a/src/views/catalog/views/navigation/CatalogNavigationView.tsx +++ b/src/views/catalog/views/navigation/CatalogNavigationView.tsx @@ -1,4 +1,4 @@ -import { ICatalogPageData } from 'nitro-renderer'; +import { ICatalogPageData } from '@nitrots/nitro-renderer'; import { FC, useEffect } from 'react'; import { CatalogSearchView } from '../search/CatalogSearchView'; import { CatalogNavigationViewProps } from './CatalogNavigationView.types'; diff --git a/src/views/catalog/views/navigation/CatalogNavigationView.types.ts b/src/views/catalog/views/navigation/CatalogNavigationView.types.ts index 6be8a843..05e3fade 100644 --- a/src/views/catalog/views/navigation/CatalogNavigationView.types.ts +++ b/src/views/catalog/views/navigation/CatalogNavigationView.types.ts @@ -1,4 +1,4 @@ -import { ICatalogPageData } from 'nitro-renderer'; +import { ICatalogPageData } from '@nitrots/nitro-renderer'; import { Dispatch, SetStateAction } from 'react'; export interface CatalogNavigationViewProps diff --git a/src/views/catalog/views/navigation/item/CatalogNavigationItemView.tsx b/src/views/catalog/views/navigation/item/CatalogNavigationItemView.tsx index 89cc7eb8..1570237e 100644 --- a/src/views/catalog/views/navigation/item/CatalogNavigationItemView.tsx +++ b/src/views/catalog/views/navigation/item/CatalogNavigationItemView.tsx @@ -1,4 +1,4 @@ -import { CatalogPageComposer, ICatalogPageData } from 'nitro-renderer'; +import { CatalogPageComposer, ICatalogPageData } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { SendMessageHook } from '../../../../../hooks/messages/message-event'; import { CatalogMode } from '../../../CatalogView.types'; diff --git a/src/views/catalog/views/navigation/item/CatalogNavigationItemView.types.ts b/src/views/catalog/views/navigation/item/CatalogNavigationItemView.types.ts index b28e5e20..8ef4598e 100644 --- a/src/views/catalog/views/navigation/item/CatalogNavigationItemView.types.ts +++ b/src/views/catalog/views/navigation/item/CatalogNavigationItemView.types.ts @@ -1,4 +1,4 @@ -import { ICatalogPageData } from 'nitro-renderer'; +import { ICatalogPageData } from '@nitrots/nitro-renderer'; import { Dispatch, SetStateAction } from 'react'; export interface CatalogNavigationItemViewProps diff --git a/src/views/catalog/views/navigation/set/CatalogNavigationSetView.tsx b/src/views/catalog/views/navigation/set/CatalogNavigationSetView.tsx index 4f263114..4c464e0c 100644 --- a/src/views/catalog/views/navigation/set/CatalogNavigationSetView.tsx +++ b/src/views/catalog/views/navigation/set/CatalogNavigationSetView.tsx @@ -1,4 +1,4 @@ -import { ICatalogPageData } from 'nitro-renderer'; +import { ICatalogPageData } from '@nitrots/nitro-renderer'; import { FC, useEffect, useState } from 'react'; import { CatalogNavigationItemView } from '../item/CatalogNavigationItemView'; import { CatalogNavigationSetViewProps } from './CatalogNavigationSetView.types'; diff --git a/src/views/catalog/views/navigation/set/CatalogNavigationSetView.types.ts b/src/views/catalog/views/navigation/set/CatalogNavigationSetView.types.ts index 3cf29501..99001cde 100644 --- a/src/views/catalog/views/navigation/set/CatalogNavigationSetView.types.ts +++ b/src/views/catalog/views/navigation/set/CatalogNavigationSetView.types.ts @@ -1,4 +1,4 @@ -import { ICatalogPageData } from 'nitro-renderer'; +import { ICatalogPageData } from '@nitrots/nitro-renderer'; import { Dispatch, SetStateAction } from 'react'; export interface CatalogNavigationSetViewProps diff --git a/src/views/catalog/views/page/CatalogPageView.tsx b/src/views/catalog/views/page/CatalogPageView.tsx index f87b48fa..6d95c293 100644 --- a/src/views/catalog/views/page/CatalogPageView.tsx +++ b/src/views/catalog/views/page/CatalogPageView.tsx @@ -1,4 +1,4 @@ -import { Vector3d } from 'nitro-renderer'; +import { Vector3d } from '@nitrots/nitro-renderer'; import { FC, useEffect } from 'react'; import { GetAvatarRenderManager, GetFurnitureDataForProductOffer, GetSessionDataManager } from '../../../../api'; import { FurniCategory } from '../../common/FurniCategory'; diff --git a/src/views/catalog/views/page/CatalogPageView.types.ts b/src/views/catalog/views/page/CatalogPageView.types.ts index 80a2554b..77b9e586 100644 --- a/src/views/catalog/views/page/CatalogPageView.types.ts +++ b/src/views/catalog/views/page/CatalogPageView.types.ts @@ -1,4 +1,4 @@ -import { RoomPreviewer } from 'nitro-renderer'; +import { RoomPreviewer } from '@nitrots/nitro-renderer'; export interface CatalogPageViewProps { diff --git a/src/views/catalog/views/page/layout/CatalogLayout.types.ts b/src/views/catalog/views/page/layout/CatalogLayout.types.ts index 4ebfe1b7..e727ce7a 100644 --- a/src/views/catalog/views/page/layout/CatalogLayout.types.ts +++ b/src/views/catalog/views/page/layout/CatalogLayout.types.ts @@ -1,4 +1,4 @@ -import { ICatalogPageParser, RoomPreviewer } from 'nitro-renderer'; +import { ICatalogPageParser, RoomPreviewer } from '@nitrots/nitro-renderer'; export interface CatalogLayoutProps { diff --git a/src/views/catalog/views/page/layout/GetCatalogLayout.tsx b/src/views/catalog/views/page/layout/GetCatalogLayout.tsx index 7e514a6d..e36c2b96 100644 --- a/src/views/catalog/views/page/layout/GetCatalogLayout.tsx +++ b/src/views/catalog/views/page/layout/GetCatalogLayout.tsx @@ -1,4 +1,4 @@ -import { ICatalogPageParser, RoomPreviewer } from 'nitro-renderer'; +import { ICatalogPageParser, RoomPreviewer } from '@nitrots/nitro-renderer'; import { CatalogLayoutBadgeDisplayView } from './badge-display/CatalogLayoutBadgeDisplayView'; import { CatalogLayoutDefaultView } from './default/CatalogLayoutDefaultView'; import { CatalogLayoutFrontpage4View } from './frontpage4/CatalogLayoutFrontpage4View'; diff --git a/src/views/catalog/views/page/layout/badge-display/CatalogLayoutBadgeDisplayView.tsx b/src/views/catalog/views/page/layout/badge-display/CatalogLayoutBadgeDisplayView.tsx index c67f9600..4edd7baa 100644 --- a/src/views/catalog/views/page/layout/badge-display/CatalogLayoutBadgeDisplayView.tsx +++ b/src/views/catalog/views/page/layout/badge-display/CatalogLayoutBadgeDisplayView.tsx @@ -1,4 +1,4 @@ -import { StringDataType } from 'nitro-renderer'; +import { StringDataType } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useMemo, useState } from 'react'; import { InventoryBadgesUpdatedEvent } from '../../../../../../events'; import { InventoryBadgesRequestEvent } from '../../../../../../events/inventory/InventoryBadgesRequestEvent'; diff --git a/src/views/catalog/views/page/layout/frontpage4/CatalogLayoutFrontpage4View.tsx b/src/views/catalog/views/page/layout/frontpage4/CatalogLayoutFrontpage4View.tsx index 003073a2..07044a4f 100644 --- a/src/views/catalog/views/page/layout/frontpage4/CatalogLayoutFrontpage4View.tsx +++ b/src/views/catalog/views/page/layout/frontpage4/CatalogLayoutFrontpage4View.tsx @@ -1,4 +1,4 @@ -import { CatalogFrontPageItem } from 'nitro-renderer'; +import { CatalogFrontPageItem } from '@nitrots/nitro-renderer'; import { FC, useCallback, useMemo } from 'react'; import { CreateLinkEvent, GetConfiguration } from '../../../../../../api'; import { CatalogLayoutFrontpage4ViewProps } from './CatalogLayoutFrontpage4View.types'; diff --git a/src/views/catalog/views/page/layout/guild-custom-furni/CatalogLayoutGuildCustomFurniView.tsx b/src/views/catalog/views/page/layout/guild-custom-furni/CatalogLayoutGuildCustomFurniView.tsx index 5cefaaf0..db645c84 100644 --- a/src/views/catalog/views/page/layout/guild-custom-furni/CatalogLayoutGuildCustomFurniView.tsx +++ b/src/views/catalog/views/page/layout/guild-custom-furni/CatalogLayoutGuildCustomFurniView.tsx @@ -1,4 +1,4 @@ -import { CatalogGroupsComposer } from 'nitro-renderer'; +import { CatalogGroupsComposer } from '@nitrots/nitro-renderer'; import { FC, useEffect } from 'react'; import { SendMessageHook } from '../../../../../../hooks/messages'; import { LocalizeText } from '../../../../../../utils/LocalizeText'; diff --git a/src/views/catalog/views/page/layout/guild-forum/CatalogLayoutGuildForumView.tsx b/src/views/catalog/views/page/layout/guild-forum/CatalogLayoutGuildForumView.tsx index c3cb9687..b1e9fcae 100644 --- a/src/views/catalog/views/page/layout/guild-forum/CatalogLayoutGuildForumView.tsx +++ b/src/views/catalog/views/page/layout/guild-forum/CatalogLayoutGuildForumView.tsx @@ -1,4 +1,4 @@ -import { CatalogGroupsComposer } from 'nitro-renderer'; +import { CatalogGroupsComposer } from '@nitrots/nitro-renderer'; import { FC, useEffect } from 'react'; import { SendMessageHook } from '../../../../../../hooks/messages'; import { LocalizeText } from '../../../../../../utils/LocalizeText'; diff --git a/src/views/catalog/views/page/layout/pets/CatalogLayoutPetView.tsx b/src/views/catalog/views/page/layout/pets/CatalogLayoutPetView.tsx index 38388178..a3de47aa 100644 --- a/src/views/catalog/views/page/layout/pets/CatalogLayoutPetView.tsx +++ b/src/views/catalog/views/page/layout/pets/CatalogLayoutPetView.tsx @@ -1,4 +1,4 @@ -import { CatalogRequestPetBreedsComposer, ColorConverter, SellablePetPaletteData } from 'nitro-renderer'; +import { CatalogRequestPetBreedsComposer, ColorConverter, SellablePetPaletteData } from '@nitrots/nitro-renderer'; import { FC, useEffect, useMemo, useState } from 'react'; import { GetProductDataForLocalization } from '../../../../../../api/nitro/session/GetProductDataForLocalization'; import { SendMessageHook } from '../../../../../../hooks/messages/message-event'; diff --git a/src/views/catalog/views/page/layout/pets/purchase/CatalogLayoutPetPurchaseView.tsx b/src/views/catalog/views/page/layout/pets/purchase/CatalogLayoutPetPurchaseView.tsx index e4282c68..c70e99ce 100644 --- a/src/views/catalog/views/page/layout/pets/purchase/CatalogLayoutPetPurchaseView.tsx +++ b/src/views/catalog/views/page/layout/pets/purchase/CatalogLayoutPetPurchaseView.tsx @@ -1,4 +1,4 @@ -import { ApproveNameMessageComposer } from 'nitro-renderer'; +import { ApproveNameMessageComposer } from '@nitrots/nitro-renderer'; import { FC, useCallback, useState } from 'react'; import { CatalogEvent } from '../../../../../../../events'; import { useUiEvent } from '../../../../../../../hooks/events/ui/ui-event'; diff --git a/src/views/catalog/views/page/layout/pets/purchase/CatalogLayoutPetPurchaseView.types.ts b/src/views/catalog/views/page/layout/pets/purchase/CatalogLayoutPetPurchaseView.types.ts index 748bd017..1f8d240f 100644 --- a/src/views/catalog/views/page/layout/pets/purchase/CatalogLayoutPetPurchaseView.types.ts +++ b/src/views/catalog/views/page/layout/pets/purchase/CatalogLayoutPetPurchaseView.types.ts @@ -1,4 +1,4 @@ -import { CatalogPageOfferData } from 'nitro-renderer'; +import { CatalogPageOfferData } from '@nitrots/nitro-renderer'; export interface CatalogLayoutPetPurchaseViewProps { diff --git a/src/views/catalog/views/page/layout/spaces-new/CatalogLayoutSpacesView.tsx b/src/views/catalog/views/page/layout/spaces-new/CatalogLayoutSpacesView.tsx index 148d3c85..e0f1b9f8 100644 --- a/src/views/catalog/views/page/layout/spaces-new/CatalogLayoutSpacesView.tsx +++ b/src/views/catalog/views/page/layout/spaces-new/CatalogLayoutSpacesView.tsx @@ -1,4 +1,4 @@ -import { CatalogPageOfferData, IFurnitureData } from 'nitro-renderer'; +import { CatalogPageOfferData, IFurnitureData } from '@nitrots/nitro-renderer'; import { FC, useEffect, useState } from 'react'; import { GetSessionDataManager } from '../../../../../../api'; import { LocalizeText } from '../../../../../../utils/LocalizeText'; diff --git a/src/views/catalog/views/page/layout/vip-buy/CatalogLayoutVipBuyView.tsx b/src/views/catalog/views/page/layout/vip-buy/CatalogLayoutVipBuyView.tsx index 9eaff28e..89332fef 100644 --- a/src/views/catalog/views/page/layout/vip-buy/CatalogLayoutVipBuyView.tsx +++ b/src/views/catalog/views/page/layout/vip-buy/CatalogLayoutVipBuyView.tsx @@ -1,4 +1,4 @@ -import { CatalogClubOfferData, CatalogPurchaseComposer, CatalogRequestVipOffersComposer } from 'nitro-renderer'; +import { CatalogClubOfferData, CatalogPurchaseComposer, CatalogRequestVipOffersComposer } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useMemo, useState } from 'react'; import { Button } from 'react-bootstrap'; import { SendMessageHook } from '../../../../../../hooks/messages/message-event'; diff --git a/src/views/catalog/views/page/offer/CatalogPageOfferView.tsx b/src/views/catalog/views/page/offer/CatalogPageOfferView.tsx index 209d6c2e..89f6b90f 100644 --- a/src/views/catalog/views/page/offer/CatalogPageOfferView.tsx +++ b/src/views/catalog/views/page/offer/CatalogPageOfferView.tsx @@ -1,4 +1,4 @@ -import { MouseEventType } from 'nitro-renderer'; +import { MouseEventType } from '@nitrots/nitro-renderer'; import { FC, MouseEvent, useCallback } from 'react'; import { useCatalogContext } from '../../../context/CatalogContext'; import { CatalogActions } from '../../../reducers/CatalogReducer'; diff --git a/src/views/catalog/views/page/offer/CatalogPageOfferView.types.ts b/src/views/catalog/views/page/offer/CatalogPageOfferView.types.ts index 7c027112..c2abfe17 100644 --- a/src/views/catalog/views/page/offer/CatalogPageOfferView.types.ts +++ b/src/views/catalog/views/page/offer/CatalogPageOfferView.types.ts @@ -1,4 +1,4 @@ -import { CatalogPageOfferData } from 'nitro-renderer'; +import { CatalogPageOfferData } from '@nitrots/nitro-renderer'; export interface CatalogPageOfferViewProps { diff --git a/src/views/catalog/views/page/offers/CatalogPageOffersView.types.ts b/src/views/catalog/views/page/offers/CatalogPageOffersView.types.ts index 09307878..2d720e24 100644 --- a/src/views/catalog/views/page/offers/CatalogPageOffersView.types.ts +++ b/src/views/catalog/views/page/offers/CatalogPageOffersView.types.ts @@ -1,4 +1,4 @@ -import { CatalogPageOfferData } from 'nitro-renderer'; +import { CatalogPageOfferData } from '@nitrots/nitro-renderer'; export interface CatalogPageOffersViewProps { diff --git a/src/views/catalog/views/page/product/CatalogProductView.tsx b/src/views/catalog/views/page/product/CatalogProductView.tsx index 81f36769..684488d0 100644 --- a/src/views/catalog/views/page/product/CatalogProductView.tsx +++ b/src/views/catalog/views/page/product/CatalogProductView.tsx @@ -1,4 +1,4 @@ -import { FurnitureType } from 'nitro-renderer'; +import { FurnitureType } from '@nitrots/nitro-renderer'; import { FC, useMemo } from 'react'; import { GetConfiguration, GetRoomEngine, GetSessionDataManager } from '../../../../../api'; import { AvatarImageView } from '../../../../shared/avatar-image/AvatarImageView'; diff --git a/src/views/catalog/views/page/product/CatalogProductView.types.ts b/src/views/catalog/views/page/product/CatalogProductView.types.ts index 68328ed9..b11dfc8a 100644 --- a/src/views/catalog/views/page/product/CatalogProductView.types.ts +++ b/src/views/catalog/views/page/product/CatalogProductView.types.ts @@ -1,4 +1,4 @@ -import { CatalogProductOfferData } from 'nitro-renderer'; +import { CatalogProductOfferData } from '@nitrots/nitro-renderer'; import { MouseEventHandler } from 'react'; export interface CatalogProductViewProps diff --git a/src/views/catalog/views/page/purchase/CatalogPurchaseView.types.ts b/src/views/catalog/views/page/purchase/CatalogPurchaseView.types.ts index 72be56a3..c4ccca6f 100644 --- a/src/views/catalog/views/page/purchase/CatalogPurchaseView.types.ts +++ b/src/views/catalog/views/page/purchase/CatalogPurchaseView.types.ts @@ -1,4 +1,4 @@ -import { CatalogPageOfferData } from 'nitro-renderer'; +import { CatalogPageOfferData } from '@nitrots/nitro-renderer'; export interface CatalogPurchaseViewProps { diff --git a/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.tsx b/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.tsx index ed8d728a..450088a3 100644 --- a/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.tsx +++ b/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.tsx @@ -1,4 +1,4 @@ -import { CatalogPurchaseComposer } from 'nitro-renderer'; +import { CatalogPurchaseComposer } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { CatalogEvent } from '../../../../../../events'; import { useUiEvent } from '../../../../../../hooks/events/ui/ui-event'; diff --git a/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.types.ts b/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.types.ts index 008d8d8e..674ac376 100644 --- a/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.types.ts +++ b/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.types.ts @@ -1,4 +1,4 @@ -import { CatalogPageOfferData } from 'nitro-renderer'; +import { CatalogPageOfferData } from '@nitrots/nitro-renderer'; export interface CatalogPurchaseButtonViewProps { diff --git a/src/views/catalog/views/page/purchase/purchase-gift-button/CatalogPurchaseGiftButtonView.types.ts b/src/views/catalog/views/page/purchase/purchase-gift-button/CatalogPurchaseGiftButtonView.types.ts index 8f04c0ac..a5ef65e7 100644 --- a/src/views/catalog/views/page/purchase/purchase-gift-button/CatalogPurchaseGiftButtonView.types.ts +++ b/src/views/catalog/views/page/purchase/purchase-gift-button/CatalogPurchaseGiftButtonView.types.ts @@ -1,4 +1,4 @@ -import { CatalogPageOfferData } from 'nitro-renderer'; +import { CatalogPageOfferData } from '@nitrots/nitro-renderer'; export interface CatalogPurchaseGiftButtonViewProps { diff --git a/src/views/catalog/views/page/search-result/CatalogLayoutSearchResultView.types.ts b/src/views/catalog/views/page/search-result/CatalogLayoutSearchResultView.types.ts index 2ba05ff8..8cd52f48 100644 --- a/src/views/catalog/views/page/search-result/CatalogLayoutSearchResultView.types.ts +++ b/src/views/catalog/views/page/search-result/CatalogLayoutSearchResultView.types.ts @@ -1,4 +1,4 @@ -import { IFurnitureData, RoomPreviewer } from 'nitro-renderer'; +import { IFurnitureData, RoomPreviewer } from '@nitrots/nitro-renderer'; export interface CatalogLayoutSearchResultViewProps { diff --git a/src/views/catalog/views/page/search-result/offer/CatalogSearchResultOfferView.tsx b/src/views/catalog/views/page/search-result/offer/CatalogSearchResultOfferView.tsx index 3500c696..29020561 100644 --- a/src/views/catalog/views/page/search-result/offer/CatalogSearchResultOfferView.tsx +++ b/src/views/catalog/views/page/search-result/offer/CatalogSearchResultOfferView.tsx @@ -1,4 +1,4 @@ -import { CatalogSearchComposer, FurnitureType, MouseEventType } from 'nitro-renderer'; +import { CatalogSearchComposer, FurnitureType, MouseEventType } from '@nitrots/nitro-renderer'; import { FC, MouseEvent, useCallback } from 'react'; import { GetConfiguration, GetRoomEngine, GetSessionDataManager } from '../../../../../../api'; import { SendMessageHook } from '../../../../../../hooks/messages/message-event'; diff --git a/src/views/catalog/views/page/search-result/offer/CatalogSearchResultOfferView.types.ts b/src/views/catalog/views/page/search-result/offer/CatalogSearchResultOfferView.types.ts index d56f834a..1d7056e7 100644 --- a/src/views/catalog/views/page/search-result/offer/CatalogSearchResultOfferView.types.ts +++ b/src/views/catalog/views/page/search-result/offer/CatalogSearchResultOfferView.types.ts @@ -1,4 +1,4 @@ -import { IFurnitureData } from 'nitro-renderer'; +import { IFurnitureData } from '@nitrots/nitro-renderer'; export interface CatalogSearchResultOfferViewProps { diff --git a/src/views/catalog/views/page/search-result/offers/CatalogSearchResultOffersView.tsx b/src/views/catalog/views/page/search-result/offers/CatalogSearchResultOffersView.tsx index 30f5a670..04bc09a2 100644 --- a/src/views/catalog/views/page/search-result/offers/CatalogSearchResultOffersView.tsx +++ b/src/views/catalog/views/page/search-result/offers/CatalogSearchResultOffersView.tsx @@ -1,4 +1,4 @@ -import { CatalogSearchComposer } from 'nitro-renderer'; +import { CatalogSearchComposer } from '@nitrots/nitro-renderer'; import { FC, useEffect } from 'react'; import { SendMessageHook } from '../../../../../../hooks/messages/message-event'; import { useCatalogContext } from '../../../../context/CatalogContext'; diff --git a/src/views/catalog/views/page/search-result/offers/CatalogSearchResultOffersView.types.ts b/src/views/catalog/views/page/search-result/offers/CatalogSearchResultOffersView.types.ts index 8e9b6b0d..875e277e 100644 --- a/src/views/catalog/views/page/search-result/offers/CatalogSearchResultOffersView.types.ts +++ b/src/views/catalog/views/page/search-result/offers/CatalogSearchResultOffersView.types.ts @@ -1,4 +1,4 @@ -import { IFurnitureData } from 'nitro-renderer'; +import { IFurnitureData } from '@nitrots/nitro-renderer'; export interface CatalogSearchResultOffersViewProps { diff --git a/src/views/catalog/views/search/CatalogSearchView.tsx b/src/views/catalog/views/search/CatalogSearchView.tsx index ff97d251..f4ff210c 100644 --- a/src/views/catalog/views/search/CatalogSearchView.tsx +++ b/src/views/catalog/views/search/CatalogSearchView.tsx @@ -1,4 +1,4 @@ -import { ICatalogPageData, IFurnitureData } from 'nitro-renderer'; +import { ICatalogPageData, IFurnitureData } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { GetSessionDataManager } from '../../../../api'; import { LocalizeText } from '../../../../utils/LocalizeText'; diff --git a/src/views/friend-list/FriendListMessageHandler.tsx b/src/views/friend-list/FriendListMessageHandler.tsx index 48360eb7..af96d6d4 100644 --- a/src/views/friend-list/FriendListMessageHandler.tsx +++ b/src/views/friend-list/FriendListMessageHandler.tsx @@ -1,4 +1,4 @@ -import { FriendListFragmentEvent, FriendListUpdateEvent, GetFriendRequestsComposer, MessengerInitEvent } from 'nitro-renderer'; +import { FriendListFragmentEvent, FriendListUpdateEvent, GetFriendRequestsComposer, MessengerInitEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback } from 'react'; import { CreateMessageHook, SendMessageHook } from '../../hooks/messages/message-event'; import { MessengerSettings } from './common/MessengerSettings'; diff --git a/src/views/friend-list/FriendListView.tsx b/src/views/friend-list/FriendListView.tsx index d2f66666..8430cc5f 100644 --- a/src/views/friend-list/FriendListView.tsx +++ b/src/views/friend-list/FriendListView.tsx @@ -1,4 +1,4 @@ -import { MessengerInitComposer, RoomEngineObjectEvent, RoomObjectCategory, RoomObjectUserType } from 'nitro-renderer'; +import { MessengerInitComposer, RoomEngineObjectEvent, RoomObjectCategory, RoomObjectUserType } from '@nitrots/nitro-renderer'; import React, { FC, useCallback, useEffect, useReducer, useState } from 'react'; import { createPortal } from 'react-dom'; import { GetRoomSession } from '../../api'; diff --git a/src/views/friend-list/common/MessengerSettings.ts b/src/views/friend-list/common/MessengerSettings.ts index 2d2ccad9..bc9b6f4e 100644 --- a/src/views/friend-list/common/MessengerSettings.ts +++ b/src/views/friend-list/common/MessengerSettings.ts @@ -1,4 +1,4 @@ -import { FriendCategoryData } from 'nitro-renderer'; +import { FriendCategoryData } from '@nitrots/nitro-renderer'; export class MessengerSettings { diff --git a/src/views/friend-list/reducers/FriendListReducer.tsx b/src/views/friend-list/reducers/FriendListReducer.tsx index 8052b06c..b4858f9f 100644 --- a/src/views/friend-list/reducers/FriendListReducer.tsx +++ b/src/views/friend-list/reducers/FriendListReducer.tsx @@ -1,4 +1,4 @@ -import { FriendListUpdateParser, FriendParser } from 'nitro-renderer'; +import { FriendListUpdateParser, FriendParser } from '@nitrots/nitro-renderer'; import { Reducer } from 'react'; import { MessengerFriend } from '../common/MessengerFriend'; import { MessengerSettings } from '../common/MessengerSettings'; diff --git a/src/views/friend-list/views/friend-bar-item/FriendBarItemView.tsx b/src/views/friend-list/views/friend-bar-item/FriendBarItemView.tsx index 45397a82..312cb6b0 100644 --- a/src/views/friend-list/views/friend-bar-item/FriendBarItemView.tsx +++ b/src/views/friend-list/views/friend-bar-item/FriendBarItemView.tsx @@ -1,4 +1,4 @@ -import { FollowFriendComposer, MouseEventType } from 'nitro-renderer'; +import { FollowFriendComposer, MouseEventType } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useRef, useState } from 'react'; import { SendMessageHook } from '../../../../hooks/messages'; import { LocalizeText } from '../../../../utils/LocalizeText'; diff --git a/src/views/hotel-view/HotelView.tsx b/src/views/hotel-view/HotelView.tsx index f1f1c3b5..53c371db 100644 --- a/src/views/hotel-view/HotelView.tsx +++ b/src/views/hotel-view/HotelView.tsx @@ -1,4 +1,4 @@ -import { RoomSessionEvent } from 'nitro-renderer'; +import { RoomSessionEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback, useState } from 'react'; import { GetConfiguration, GetNitroInstance } from '../../api'; import { useRoomSessionManagerEvent } from '../../hooks/events/nitro/session/room-session-manager-event'; diff --git a/src/views/inventory/InventoryMessageHandler.tsx b/src/views/inventory/InventoryMessageHandler.tsx index 0a00a79b..566d3eab 100644 --- a/src/views/inventory/InventoryMessageHandler.tsx +++ b/src/views/inventory/InventoryMessageHandler.tsx @@ -1,4 +1,4 @@ -import { AdvancedMap, BadgeReceivedEvent, BadgesEvent, BotAddedToInventoryEvent, BotInventoryMessageEvent, BotRemovedFromInventoryEvent, FurnitureListAddOrUpdateEvent, FurnitureListEvent, FurnitureListInvalidateEvent, FurnitureListItemParser, FurnitureListRemovedEvent, FurniturePostItPlacedEvent, PetAddedToInventoryEvent, PetData, PetInventoryEvent, PetRemovedFromInventory, RequestBadgesComposer, TradingAcceptEvent, TradingCloseEvent, TradingCompletedEvent, TradingConfirmationEvent, TradingListItemEvent, TradingNotOpenEvent, TradingOpenEvent, TradingOpenFailedEvent, TradingOtherNotAllowedEvent, TradingYouAreNotAllowedEvent, UnseenItemsEvent } from 'nitro-renderer'; +import { AdvancedMap, BadgeReceivedEvent, BadgesEvent, BotAddedToInventoryEvent, BotInventoryMessageEvent, BotRemovedFromInventoryEvent, FurnitureListAddOrUpdateEvent, FurnitureListEvent, FurnitureListInvalidateEvent, FurnitureListItemParser, FurnitureListRemovedEvent, FurniturePostItPlacedEvent, PetAddedToInventoryEvent, PetData, PetInventoryEvent, PetRemovedFromInventory, RequestBadgesComposer, TradingAcceptEvent, TradingCloseEvent, TradingCompletedEvent, TradingConfirmationEvent, TradingListItemEvent, TradingNotOpenEvent, TradingOpenEvent, TradingOpenFailedEvent, TradingOtherNotAllowedEvent, TradingYouAreNotAllowedEvent, UnseenItemsEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback } from 'react'; import { GetRoomSession, GetSessionDataManager } from '../../api'; import { InventoryBadgesUpdatedEvent } from '../../events'; diff --git a/src/views/inventory/InventoryView.tsx b/src/views/inventory/InventoryView.tsx index 3d8b2601..3a337c29 100644 --- a/src/views/inventory/InventoryView.tsx +++ b/src/views/inventory/InventoryView.tsx @@ -1,4 +1,4 @@ -import { IRoomSession, RoomEngineObjectEvent, RoomEngineObjectPlacedEvent, RoomPreviewer, RoomSessionEvent, TradingCancelComposer, TradingCloseComposer, TradingOpenComposer } from 'nitro-renderer'; +import { IRoomSession, RoomEngineObjectEvent, RoomEngineObjectPlacedEvent, RoomPreviewer, RoomSessionEvent, TradingCancelComposer, TradingCloseComposer, TradingOpenComposer } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useReducer, useState } from 'react'; import { GetRoomEngine } from '../../api'; import { InventoryBadgesUpdatedEvent, InventoryEvent, InventoryTradeRequestEvent } from '../../events'; diff --git a/src/views/inventory/common/BotItem.ts b/src/views/inventory/common/BotItem.ts index 912adc12..34a8ba58 100644 --- a/src/views/inventory/common/BotItem.ts +++ b/src/views/inventory/common/BotItem.ts @@ -1,4 +1,4 @@ -import { BotData } from 'nitro-renderer'; +import { BotData } from '@nitrots/nitro-renderer'; export class BotItem { diff --git a/src/views/inventory/common/BotUtilities.ts b/src/views/inventory/common/BotUtilities.ts index 144c8b33..6ee76558 100644 --- a/src/views/inventory/common/BotUtilities.ts +++ b/src/views/inventory/common/BotUtilities.ts @@ -1,4 +1,4 @@ -import { BotData, RoomObjectCategory, RoomObjectPlacementSource, RoomObjectType } from 'nitro-renderer'; +import { BotData, RoomObjectCategory, RoomObjectPlacementSource, RoomObjectType } from '@nitrots/nitro-renderer'; import { GetRoomEngine, GetRoomSessionManager } from '../../../api'; import { InventoryEvent } from '../../../events'; import { dispatchUiEvent } from '../../../hooks/events/ui/ui-event'; diff --git a/src/views/inventory/common/FurnitureItem.ts b/src/views/inventory/common/FurnitureItem.ts index d82b22e0..6b7fb7a9 100644 --- a/src/views/inventory/common/FurnitureItem.ts +++ b/src/views/inventory/common/FurnitureItem.ts @@ -1,4 +1,4 @@ -import { IFurnitureItemData, IObjectData } from 'nitro-renderer'; +import { IFurnitureItemData, IObjectData } from '@nitrots/nitro-renderer'; import { GetNitroInstance } from '../../../api'; import { IFurnitureItem } from './IFurnitureItem'; diff --git a/src/views/inventory/common/FurnitureUtilities.ts b/src/views/inventory/common/FurnitureUtilities.ts index 9a96d7c5..96dc07b3 100644 --- a/src/views/inventory/common/FurnitureUtilities.ts +++ b/src/views/inventory/common/FurnitureUtilities.ts @@ -1,4 +1,4 @@ -import { FurnitureListItemParser, FurniturePlacePaintComposer, IObjectData, RoomObjectCategory, RoomObjectPlacementSource } from 'nitro-renderer'; +import { FurnitureListItemParser, FurniturePlacePaintComposer, IObjectData, RoomObjectCategory, RoomObjectPlacementSource } from '@nitrots/nitro-renderer'; import { GetRoomEngine } from '../../../api'; import { InventoryEvent } from '../../../events'; import { dispatchUiEvent } from '../../../hooks/events/ui/ui-event'; diff --git a/src/views/inventory/common/GroupItem.ts b/src/views/inventory/common/GroupItem.ts index 8bb1f206..8aa06dba 100644 --- a/src/views/inventory/common/GroupItem.ts +++ b/src/views/inventory/common/GroupItem.ts @@ -1,4 +1,4 @@ -import { IObjectData, IRoomEngine } from 'nitro-renderer'; +import { IObjectData, IRoomEngine } from '@nitrots/nitro-renderer'; import { LocalizeText } from '../../../utils/LocalizeText'; import { FurniCategory } from './FurniCategory'; import { FurnitureItem } from './FurnitureItem'; diff --git a/src/views/inventory/common/IFurnitureItem.ts b/src/views/inventory/common/IFurnitureItem.ts index e9f3371b..ed024902 100644 --- a/src/views/inventory/common/IFurnitureItem.ts +++ b/src/views/inventory/common/IFurnitureItem.ts @@ -1,4 +1,4 @@ -import { IObjectData } from 'nitro-renderer'; +import { IObjectData } from '@nitrots/nitro-renderer'; export interface IFurnitureItem { diff --git a/src/views/inventory/common/PetItem.ts b/src/views/inventory/common/PetItem.ts index 25d5b95f..070b85b4 100644 --- a/src/views/inventory/common/PetItem.ts +++ b/src/views/inventory/common/PetItem.ts @@ -1,4 +1,4 @@ -import { PetData } from 'nitro-renderer'; +import { PetData } from '@nitrots/nitro-renderer'; export class PetItem { diff --git a/src/views/inventory/common/PetUtilities.ts b/src/views/inventory/common/PetUtilities.ts index c780bc5f..792963e8 100644 --- a/src/views/inventory/common/PetUtilities.ts +++ b/src/views/inventory/common/PetUtilities.ts @@ -1,4 +1,4 @@ -import { PetData, RoomObjectCategory, RoomObjectPlacementSource, RoomObjectType } from 'nitro-renderer'; +import { PetData, RoomObjectCategory, RoomObjectPlacementSource, RoomObjectType } from '@nitrots/nitro-renderer'; import { GetRoomEngine, GetRoomSessionManager } from '../../../api'; import { InventoryEvent } from '../../../events'; import { dispatchUiEvent } from '../../../hooks/events/ui/ui-event'; diff --git a/src/views/inventory/common/TradeUserData.ts b/src/views/inventory/common/TradeUserData.ts index 5df557fb..b0b337b3 100644 --- a/src/views/inventory/common/TradeUserData.ts +++ b/src/views/inventory/common/TradeUserData.ts @@ -1,4 +1,4 @@ -import { AdvancedMap } from 'nitro-renderer'; +import { AdvancedMap } from '@nitrots/nitro-renderer'; import { GroupItem } from './GroupItem'; export class TradeUserData diff --git a/src/views/inventory/common/TradingUtilities.ts b/src/views/inventory/common/TradingUtilities.ts index be7fc72d..9e6e9204 100644 --- a/src/views/inventory/common/TradingUtilities.ts +++ b/src/views/inventory/common/TradingUtilities.ts @@ -1,4 +1,4 @@ -import { AdvancedMap, IObjectData, ItemDataStructure, StringDataType } from 'nitro-renderer'; +import { AdvancedMap, IObjectData, ItemDataStructure, StringDataType } from '@nitrots/nitro-renderer'; import { GetSessionDataManager } from '../../../api'; import { FurniCategory } from './FurniCategory'; import { FurnitureItem } from './FurnitureItem'; diff --git a/src/views/inventory/common/unseen/UnseenItemTracker.ts b/src/views/inventory/common/unseen/UnseenItemTracker.ts index 104d6f75..a647f987 100644 --- a/src/views/inventory/common/unseen/UnseenItemTracker.ts +++ b/src/views/inventory/common/unseen/UnseenItemTracker.ts @@ -1,4 +1,4 @@ -import { UnseenResetCategoryComposer, UnseenResetItemsComposer } from 'nitro-renderer'; +import { UnseenResetCategoryComposer, UnseenResetItemsComposer } from '@nitrots/nitro-renderer'; import { UnseenItemTrackerUpdateEvent } from '../../../../events'; import { dispatchUiEvent, SendMessageHook } from '../../../../hooks'; import { IUnseenItemTracker } from './IUnseenItemTracker'; diff --git a/src/views/inventory/reducers/InventoryBadgeReducer.tsx b/src/views/inventory/reducers/InventoryBadgeReducer.tsx index 62b2c59d..feac6450 100644 --- a/src/views/inventory/reducers/InventoryBadgeReducer.tsx +++ b/src/views/inventory/reducers/InventoryBadgeReducer.tsx @@ -1,4 +1,4 @@ -import { SetActivatedBadgesComposer } from 'nitro-renderer'; +import { SetActivatedBadgesComposer } from '@nitrots/nitro-renderer'; import { Reducer } from 'react'; import { SendMessageHook } from '../../../hooks/messages/message-event'; diff --git a/src/views/inventory/reducers/InventoryBotReducer.tsx b/src/views/inventory/reducers/InventoryBotReducer.tsx index fadf0164..b94eea81 100644 --- a/src/views/inventory/reducers/InventoryBotReducer.tsx +++ b/src/views/inventory/reducers/InventoryBotReducer.tsx @@ -1,4 +1,4 @@ -import { BotData } from 'nitro-renderer'; +import { BotData } from '@nitrots/nitro-renderer'; import { Reducer } from 'react'; import { BotItem } from '../common/BotItem'; import { addSingleBotItem, processBotFragment, removeBotItemById } from '../common/BotUtilities'; diff --git a/src/views/inventory/reducers/InventoryFurnitureReducer.tsx b/src/views/inventory/reducers/InventoryFurnitureReducer.tsx index 1ea8e164..20d991f2 100644 --- a/src/views/inventory/reducers/InventoryFurnitureReducer.tsx +++ b/src/views/inventory/reducers/InventoryFurnitureReducer.tsx @@ -1,4 +1,4 @@ -import { AdvancedMap, FurnitureListItemParser, TradingListItemParser } from 'nitro-renderer'; +import { AdvancedMap, FurnitureListItemParser, TradingListItemParser } from '@nitrots/nitro-renderer'; import { Reducer } from 'react'; import { FurnitureItem } from '../common/FurnitureItem'; import { addFurnitureItem, processFurniFragment, removeFurniItemById } from '../common/FurnitureUtilities'; diff --git a/src/views/inventory/reducers/InventoryPetReducer.tsx b/src/views/inventory/reducers/InventoryPetReducer.tsx index 60d5cb28..14679510 100644 --- a/src/views/inventory/reducers/InventoryPetReducer.tsx +++ b/src/views/inventory/reducers/InventoryPetReducer.tsx @@ -1,4 +1,4 @@ -import { PetData } from 'nitro-renderer'; +import { PetData } from '@nitrots/nitro-renderer'; import { Reducer } from 'react'; import { PetItem } from '../common/PetItem'; import { addSinglePetItem, processPetFragment, removePetItemById } from '../common/PetUtilities'; diff --git a/src/views/inventory/views/badge/InventoryBadgeView.tsx b/src/views/inventory/views/badge/InventoryBadgeView.tsx index 7fd61f89..fa2567fb 100644 --- a/src/views/inventory/views/badge/InventoryBadgeView.tsx +++ b/src/views/inventory/views/badge/InventoryBadgeView.tsx @@ -1,4 +1,4 @@ -import { RequestBadgesComposer } from 'nitro-renderer'; +import { RequestBadgesComposer } from '@nitrots/nitro-renderer'; import { FC, useEffect } from 'react'; import { SendMessageHook } from '../../../../hooks/messages/message-event'; import { LocalizeBadgeName } from '../../../../utils/LocalizeBageName'; diff --git a/src/views/inventory/views/badge/item/InventoryBadgeItemView.tsx b/src/views/inventory/views/badge/item/InventoryBadgeItemView.tsx index 61b15095..c6ec89dc 100644 --- a/src/views/inventory/views/badge/item/InventoryBadgeItemView.tsx +++ b/src/views/inventory/views/badge/item/InventoryBadgeItemView.tsx @@ -1,4 +1,4 @@ -import { MouseEventType } from 'nitro-renderer'; +import { MouseEventType } from '@nitrots/nitro-renderer'; import { FC, MouseEvent, useCallback } from 'react'; import { NitroCardGridItemView } from '../../../../../layout/card/grid/item/NitroCardGridItemView'; import { BadgeImageView } from '../../../../shared/badge-image/BadgeImageView'; diff --git a/src/views/inventory/views/bot/InventoryBotView.tsx b/src/views/inventory/views/bot/InventoryBotView.tsx index f28e7458..70304e51 100644 --- a/src/views/inventory/views/bot/InventoryBotView.tsx +++ b/src/views/inventory/views/bot/InventoryBotView.tsx @@ -1,4 +1,4 @@ -import { GetBotInventoryComposer, RoomObjectVariable } from 'nitro-renderer'; +import { GetBotInventoryComposer, RoomObjectVariable } from '@nitrots/nitro-renderer'; import { FC, useEffect } from 'react'; import { GetRoomEngine } from '../../../../api'; import { SendMessageHook } from '../../../../hooks/messages/message-event'; diff --git a/src/views/inventory/views/bot/InventoryBotView.types.ts b/src/views/inventory/views/bot/InventoryBotView.types.ts index fc070c8d..f3616f45 100644 --- a/src/views/inventory/views/bot/InventoryBotView.types.ts +++ b/src/views/inventory/views/bot/InventoryBotView.types.ts @@ -1,4 +1,4 @@ -import { IRoomSession, RoomPreviewer } from 'nitro-renderer'; +import { IRoomSession, RoomPreviewer } from '@nitrots/nitro-renderer'; export interface InventoryBotViewProps { diff --git a/src/views/inventory/views/bot/item/InventoryBotItemView.tsx b/src/views/inventory/views/bot/item/InventoryBotItemView.tsx index 84ae0fa9..650921c3 100644 --- a/src/views/inventory/views/bot/item/InventoryBotItemView.tsx +++ b/src/views/inventory/views/bot/item/InventoryBotItemView.tsx @@ -1,4 +1,4 @@ -import { MouseEventType } from 'nitro-renderer'; +import { MouseEventType } from '@nitrots/nitro-renderer'; import { FC, MouseEvent, useCallback, useEffect, useState } from 'react'; import { NitroCardGridItemView } from '../../../../../layout/card/grid/item/NitroCardGridItemView'; import { AvatarImageView } from '../../../../shared/avatar-image/AvatarImageView'; diff --git a/src/views/inventory/views/furniture/InventoryFurnitureView.tsx b/src/views/inventory/views/furniture/InventoryFurnitureView.tsx index b298cbec..adfec6f5 100644 --- a/src/views/inventory/views/furniture/InventoryFurnitureView.tsx +++ b/src/views/inventory/views/furniture/InventoryFurnitureView.tsx @@ -1,4 +1,4 @@ -import { FurnitureListComposer, RoomObjectVariable, Vector3d } from 'nitro-renderer'; +import { FurnitureListComposer, RoomObjectVariable, Vector3d } from '@nitrots/nitro-renderer'; import { FC, useEffect, useState } from 'react'; import { GetRoomEngine, GetSessionDataManager } from '../../../../api'; import { SendMessageHook } from '../../../../hooks/messages'; diff --git a/src/views/inventory/views/furniture/InventoryFurnitureView.types.ts b/src/views/inventory/views/furniture/InventoryFurnitureView.types.ts index 12d8cfaf..08f01cb8 100644 --- a/src/views/inventory/views/furniture/InventoryFurnitureView.types.ts +++ b/src/views/inventory/views/furniture/InventoryFurnitureView.types.ts @@ -1,4 +1,4 @@ -import { IRoomSession, RoomPreviewer } from 'nitro-renderer'; +import { IRoomSession, RoomPreviewer } from '@nitrots/nitro-renderer'; export interface InventoryFurnitureViewProps { diff --git a/src/views/inventory/views/furniture/item/InventoryFurnitureItemView.tsx b/src/views/inventory/views/furniture/item/InventoryFurnitureItemView.tsx index 345fe287..4b49d6a3 100644 --- a/src/views/inventory/views/furniture/item/InventoryFurnitureItemView.tsx +++ b/src/views/inventory/views/furniture/item/InventoryFurnitureItemView.tsx @@ -1,4 +1,4 @@ -import { MouseEventType } from 'nitro-renderer'; +import { MouseEventType } from '@nitrots/nitro-renderer'; import { FC, MouseEvent, useCallback, useEffect, useState } from 'react'; import { NitroCardGridItemView } from '../../../../../layout/card/grid/item/NitroCardGridItemView'; import { attemptItemPlacement } from '../../../common/FurnitureUtilities'; diff --git a/src/views/inventory/views/pet/InventoryPetView.tsx b/src/views/inventory/views/pet/InventoryPetView.tsx index 5723c190..428e4356 100644 --- a/src/views/inventory/views/pet/InventoryPetView.tsx +++ b/src/views/inventory/views/pet/InventoryPetView.tsx @@ -1,4 +1,4 @@ -import { RequestPetsComposer, RoomObjectVariable } from 'nitro-renderer'; +import { RequestPetsComposer, RoomObjectVariable } from '@nitrots/nitro-renderer'; import { FC, useEffect } from 'react'; import { GetRoomEngine } from '../../../../api'; import { SendMessageHook } from '../../../../hooks/messages/message-event'; diff --git a/src/views/inventory/views/pet/InventoryPetView.types.ts b/src/views/inventory/views/pet/InventoryPetView.types.ts index 316b2850..b0515ed0 100644 --- a/src/views/inventory/views/pet/InventoryPetView.types.ts +++ b/src/views/inventory/views/pet/InventoryPetView.types.ts @@ -1,4 +1,4 @@ -import { IRoomSession, RoomPreviewer } from 'nitro-renderer'; +import { IRoomSession, RoomPreviewer } from '@nitrots/nitro-renderer'; export interface InventoryPetViewProps { diff --git a/src/views/inventory/views/pet/item/InventoryPetItemView.tsx b/src/views/inventory/views/pet/item/InventoryPetItemView.tsx index 165142f1..db8a09bb 100644 --- a/src/views/inventory/views/pet/item/InventoryPetItemView.tsx +++ b/src/views/inventory/views/pet/item/InventoryPetItemView.tsx @@ -1,4 +1,4 @@ -import { MouseEventType } from 'nitro-renderer'; +import { MouseEventType } from '@nitrots/nitro-renderer'; import { FC, MouseEvent, useCallback, useEffect, useState } from 'react'; import { NitroCardGridItemView } from '../../../../../layout/card/grid/item/NitroCardGridItemView'; import { PetImageView } from '../../../../shared/pet-image/PetImageView'; diff --git a/src/views/inventory/views/trade/InventoryTradeView.tsx b/src/views/inventory/views/trade/InventoryTradeView.tsx index 38d725ec..bf836566 100644 --- a/src/views/inventory/views/trade/InventoryTradeView.tsx +++ b/src/views/inventory/views/trade/InventoryTradeView.tsx @@ -1,4 +1,4 @@ -import { FurnitureListComposer, IObjectData, TradingAcceptComposer, TradingConfirmationComposer, TradingListAddItemComposer, TradingListAddItemsComposer, TradingListItemRemoveComposer, TradingUnacceptComposer } from 'nitro-renderer'; +import { FurnitureListComposer, IObjectData, TradingAcceptComposer, TradingConfirmationComposer, TradingListAddItemComposer, TradingListAddItemsComposer, TradingListItemRemoveComposer, TradingUnacceptComposer } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useMemo, useState } from 'react'; import { SendMessageHook } from '../../../../hooks/messages'; import { NitroCardGridItemView } from '../../../../layout/card/grid/item/NitroCardGridItemView'; diff --git a/src/views/main/MainView.tsx b/src/views/main/MainView.tsx index db7f79c4..eab47e1c 100644 --- a/src/views/main/MainView.tsx +++ b/src/views/main/MainView.tsx @@ -1,4 +1,4 @@ -import { RoomSessionEvent } from 'nitro-renderer'; +import { RoomSessionEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { GetCommunication } from '../../api'; import { useRoomSessionManagerEvent } from '../../hooks/events/nitro/session/room-session-manager-event'; diff --git a/src/views/mod-tools/ModToolsView.tsx b/src/views/mod-tools/ModToolsView.tsx index fca38aab..132f19f4 100644 --- a/src/views/mod-tools/ModToolsView.tsx +++ b/src/views/mod-tools/ModToolsView.tsx @@ -1,4 +1,4 @@ -import { RoomEngineEvent } from 'nitro-renderer'; +import { RoomEngineEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useReducer, useState } from 'react'; import { ModToolsEvent } from '../../events/mod-tools/ModToolsEvent'; import { ModToolsOpenRoomInfoEvent } from '../../events/mod-tools/ModToolsOpenRoomInfoEvent'; diff --git a/src/views/mod-tools/views/chatlog/ModToolsChatlogView.tsx b/src/views/mod-tools/views/chatlog/ModToolsChatlogView.tsx index 3eef566f..238cf10f 100644 --- a/src/views/mod-tools/views/chatlog/ModToolsChatlogView.tsx +++ b/src/views/mod-tools/views/chatlog/ModToolsChatlogView.tsx @@ -1,4 +1,4 @@ -import { ModtoolRequestRoomChatlogComposer, ModtoolRoomChatlogEvent, ModtoolRoomChatlogLine } from 'nitro-renderer'; +import { ModtoolRequestRoomChatlogComposer, ModtoolRoomChatlogEvent, ModtoolRoomChatlogLine } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { TryVisitRoom } from '../../../../api/navigator/TryVisitRoom'; import { CreateMessageHook, SendMessageHook } from '../../../../hooks/messages'; diff --git a/src/views/mod-tools/views/room/ModToolsRoomView.tsx b/src/views/mod-tools/views/room/ModToolsRoomView.tsx index dc385bbb..c236a9d2 100644 --- a/src/views/mod-tools/views/room/ModToolsRoomView.tsx +++ b/src/views/mod-tools/views/room/ModToolsRoomView.tsx @@ -1,4 +1,4 @@ -import { ModtoolRequestRoomInfoComposer, ModtoolRoomInfoEvent } from 'nitro-renderer'; +import { ModtoolRequestRoomInfoComposer, ModtoolRoomInfoEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { CreateMessageHook, SendMessageHook } from '../../../../hooks/messages'; import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../layout'; diff --git a/src/views/navigator/NavigatorMessageHandler.tsx b/src/views/navigator/NavigatorMessageHandler.tsx index f3a62300..964007e6 100644 --- a/src/views/navigator/NavigatorMessageHandler.tsx +++ b/src/views/navigator/NavigatorMessageHandler.tsx @@ -1,4 +1,4 @@ -import { GenericErrorEvent, NavigatorCategoriesComposer, NavigatorCategoriesEvent, NavigatorHomeRoomEvent, NavigatorMetadataEvent, NavigatorSearchEvent, NavigatorSettingsComposer, RoomCreatedEvent, RoomDataParser, RoomDoorbellAcceptedEvent, RoomDoorbellEvent, RoomForwardEvent, RoomInfoComposer, RoomInfoEvent, RoomInfoOwnerEvent, RoomSettingsUpdatedEvent, UserInfoEvent } from 'nitro-renderer'; +import { GenericErrorEvent, NavigatorCategoriesComposer, NavigatorCategoriesEvent, NavigatorHomeRoomEvent, NavigatorMetadataEvent, NavigatorSearchEvent, NavigatorSettingsComposer, RoomCreatedEvent, RoomDataParser, RoomDoorbellAcceptedEvent, RoomDoorbellEvent, RoomForwardEvent, RoomInfoComposer, RoomInfoEvent, RoomInfoOwnerEvent, RoomSettingsUpdatedEvent, UserInfoEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback } from 'react'; import { GetRoomSessionManager, GetSessionDataManager } from '../../api'; import { VisitRoom } from '../../api/navigator/VisitRoom'; diff --git a/src/views/navigator/NavigatorView.tsx b/src/views/navigator/NavigatorView.tsx index 9318e48e..a64bf81a 100644 --- a/src/views/navigator/NavigatorView.tsx +++ b/src/views/navigator/NavigatorView.tsx @@ -1,4 +1,4 @@ -import { ILinkEventTracker, NavigatorInitComposer, NavigatorSearchComposer, RoomSessionEvent } from 'nitro-renderer'; +import { ILinkEventTracker, NavigatorInitComposer, NavigatorSearchComposer, RoomSessionEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useReducer, useState } from 'react'; import { AddEventLinkTracker, RemoveLinkEventTracker } from '../../api'; import { TryVisitRoom } from '../../api/navigator/TryVisitRoom'; diff --git a/src/views/navigator/NavigatorView.types.ts b/src/views/navigator/NavigatorView.types.ts index 842a306f..415791c0 100644 --- a/src/views/navigator/NavigatorView.types.ts +++ b/src/views/navigator/NavigatorView.types.ts @@ -1,4 +1,4 @@ -import { RoomDataParser } from 'nitro-renderer'; +import { RoomDataParser } from '@nitrots/nitro-renderer'; export interface NavigatorViewProps {} diff --git a/src/views/navigator/common/RoomInfoData.ts b/src/views/navigator/common/RoomInfoData.ts index 3b251b1c..fc0a93bd 100644 --- a/src/views/navigator/common/RoomInfoData.ts +++ b/src/views/navigator/common/RoomInfoData.ts @@ -1,4 +1,4 @@ -import { RoomDataParser } from 'nitro-renderer'; +import { RoomDataParser } from '@nitrots/nitro-renderer'; export class RoomInfoData { diff --git a/src/views/navigator/common/RoomSettingsData.ts b/src/views/navigator/common/RoomSettingsData.ts index 1f5133bd..597c5892 100644 --- a/src/views/navigator/common/RoomSettingsData.ts +++ b/src/views/navigator/common/RoomSettingsData.ts @@ -1,4 +1,4 @@ -import { RoomSettingsParser } from 'nitro-renderer'; +import { RoomSettingsParser } from '@nitrots/nitro-renderer'; export default class RoomSettingsData { diff --git a/src/views/navigator/reducers/NavigatorReducer.tsx b/src/views/navigator/reducers/NavigatorReducer.tsx index 16cdce5d..df1f10c8 100644 --- a/src/views/navigator/reducers/NavigatorReducer.tsx +++ b/src/views/navigator/reducers/NavigatorReducer.tsx @@ -1,4 +1,4 @@ -import { NavigatorCategoryDataParser, NavigatorSearchResultSet, NavigatorTopLevelContext } from 'nitro-renderer'; +import { NavigatorCategoryDataParser, NavigatorSearchResultSet, NavigatorTopLevelContext } from '@nitrots/nitro-renderer'; import { Reducer } from 'react'; import { RoomInfoData } from '../common/RoomInfoData'; diff --git a/src/views/navigator/views/creator/NavigatorRoomCreatorView.tsx b/src/views/navigator/views/creator/NavigatorRoomCreatorView.tsx index 9698ccf1..512cb65a 100644 --- a/src/views/navigator/views/creator/NavigatorRoomCreatorView.tsx +++ b/src/views/navigator/views/creator/NavigatorRoomCreatorView.tsx @@ -1,6 +1,6 @@ /* eslint-disable no-template-curly-in-string */ +import { HabboClubLevelEnum, RoomCreateComposer } from '@nitrots/nitro-renderer'; import classNames from 'classnames'; -import { HabboClubLevelEnum, RoomCreateComposer } from 'nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { GetConfiguration, GetSessionDataManager } from '../../../../api'; import { SendMessageHook } from '../../../../hooks/messages'; diff --git a/src/views/navigator/views/creator/NavigatorRoomCreatorView.types.ts b/src/views/navigator/views/creator/NavigatorRoomCreatorView.types.ts index 99183177..19675098 100644 --- a/src/views/navigator/views/creator/NavigatorRoomCreatorView.types.ts +++ b/src/views/navigator/views/creator/NavigatorRoomCreatorView.types.ts @@ -1,4 +1,4 @@ -import { HabboClubLevelEnum } from 'nitro-renderer'; +import { HabboClubLevelEnum } from '@nitrots/nitro-renderer'; export interface NavigatorRoomCreatorViewProps { diff --git a/src/views/navigator/views/room-info/NavigatorRoomInfoView.tsx b/src/views/navigator/views/room-info/NavigatorRoomInfoView.tsx index 7282afbf..801ed5db 100644 --- a/src/views/navigator/views/room-info/NavigatorRoomInfoView.tsx +++ b/src/views/navigator/views/room-info/NavigatorRoomInfoView.tsx @@ -1,5 +1,5 @@ +import { RoomMuteComposer, RoomSettingsComposer, RoomStaffPickComposer, UserHomeRoomComposer } from '@nitrots/nitro-renderer'; import classNames from 'classnames'; -import { RoomMuteComposer, RoomSettingsComposer, RoomStaffPickComposer, UserHomeRoomComposer } from 'nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { GetConfiguration } from '../../../../api'; import { NavigatorEvent } from '../../../../events'; diff --git a/src/views/navigator/views/room-settings/NavigatorRoomSettingsView.tsx b/src/views/navigator/views/room-settings/NavigatorRoomSettingsView.tsx index 01a87297..a18b6c2f 100644 --- a/src/views/navigator/views/room-settings/NavigatorRoomSettingsView.tsx +++ b/src/views/navigator/views/room-settings/NavigatorRoomSettingsView.tsx @@ -1,4 +1,4 @@ -import { RoomSettingsEvent, SaveRoomSettingsComposer } from 'nitro-renderer'; +import { RoomSettingsEvent, SaveRoomSettingsComposer } from '@nitrots/nitro-renderer'; import { FC, useCallback, useState } from 'react'; import { CreateMessageHook, SendMessageHook } from '../../../../hooks/messages'; import { NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from '../../../../layout'; diff --git a/src/views/navigator/views/search-result-item/NavigatorSearchResultItemView.tsx b/src/views/navigator/views/search-result-item/NavigatorSearchResultItemView.tsx index f11cf1b2..e38eebb1 100644 --- a/src/views/navigator/views/search-result-item/NavigatorSearchResultItemView.tsx +++ b/src/views/navigator/views/search-result-item/NavigatorSearchResultItemView.tsx @@ -1,5 +1,5 @@ +import { RoomDataParser } from '@nitrots/nitro-renderer'; import classNames from 'classnames'; -import { RoomDataParser } from 'nitro-renderer'; import { FC, MouseEvent } from 'react'; import { TryVisitRoom } from '../../../../api/navigator/TryVisitRoom'; import { NavigatorSearchResultItemViewProps } from './NavigatorSearchResultItemView.types'; diff --git a/src/views/navigator/views/search-result-item/NavigatorSearchResultItemView.types.ts b/src/views/navigator/views/search-result-item/NavigatorSearchResultItemView.types.ts index 015824d8..0ff3100e 100644 --- a/src/views/navigator/views/search-result-item/NavigatorSearchResultItemView.types.ts +++ b/src/views/navigator/views/search-result-item/NavigatorSearchResultItemView.types.ts @@ -1,4 +1,4 @@ -import { RoomDataParser } from 'nitro-renderer'; +import { RoomDataParser } from '@nitrots/nitro-renderer'; export interface NavigatorSearchResultItemViewProps { diff --git a/src/views/navigator/views/search-result/NavigatorSearchResultView.types.ts b/src/views/navigator/views/search-result/NavigatorSearchResultView.types.ts index e9ce87d3..de83955e 100644 --- a/src/views/navigator/views/search-result/NavigatorSearchResultView.types.ts +++ b/src/views/navigator/views/search-result/NavigatorSearchResultView.types.ts @@ -1,4 +1,4 @@ -import { NavigatorSearchResultList } from 'nitro-renderer'; +import { NavigatorSearchResultList } from '@nitrots/nitro-renderer'; export interface NavigatorSearchResultViewProps { diff --git a/src/views/notification-center/NotificationCenterMessageHandler.tsx b/src/views/notification-center/NotificationCenterMessageHandler.tsx index 69e2cab7..c0e06986 100644 --- a/src/views/notification-center/NotificationCenterMessageHandler.tsx +++ b/src/views/notification-center/NotificationCenterMessageHandler.tsx @@ -1,4 +1,4 @@ -import { HabboBroadcastMessageEvent, HotelWillShutdownEvent, ModeratorMessageEvent, MOTDNotificationEvent, NotificationDialogMessageEvent } from 'nitro-renderer'; +import { HabboBroadcastMessageEvent, HotelWillShutdownEvent, ModeratorMessageEvent, MOTDNotificationEvent, NotificationDialogMessageEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback } from 'react'; import { NotificationCenterAlertEvent } from '../../events'; import { dispatchUiEvent } from '../../hooks/events'; diff --git a/src/views/purse/PurseMessageHandler.tsx b/src/views/purse/PurseMessageHandler.tsx index acab48c5..c993a821 100644 --- a/src/views/purse/PurseMessageHandler.tsx +++ b/src/views/purse/PurseMessageHandler.tsx @@ -1,4 +1,4 @@ -import { UserCreditsEvent, UserCurrencyEvent, UserCurrencyUpdateEvent, UserSubscriptionEvent, UserSubscriptionParser } from 'nitro-renderer'; +import { UserCreditsEvent, UserCurrencyEvent, UserCurrencyUpdateEvent, UserSubscriptionEvent, UserSubscriptionParser } from '@nitrots/nitro-renderer'; import { FC, useCallback } from 'react'; import { CreateMessageHook } from '../../hooks/messages/message-event'; import { usePurseContext } from './context/PurseContext'; diff --git a/src/views/purse/PurseView.tsx b/src/views/purse/PurseView.tsx index ac041dbc..8d7ae11c 100644 --- a/src/views/purse/PurseView.tsx +++ b/src/views/purse/PurseView.tsx @@ -1,4 +1,4 @@ -import { FriendlyTime, HabboClubLevelEnum, UserCurrencyComposer, UserSubscriptionComposer } from 'nitro-renderer'; +import { FriendlyTime, HabboClubLevelEnum, UserCurrencyComposer, UserSubscriptionComposer } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useMemo, useState } from 'react'; import { GetConfiguration } from '../../api'; import { SendMessageHook } from '../../hooks/messages/message-event'; diff --git a/src/views/purse/common/Purse.ts b/src/views/purse/common/Purse.ts index 63bb2111..f306332e 100644 --- a/src/views/purse/common/Purse.ts +++ b/src/views/purse/common/Purse.ts @@ -1,4 +1,4 @@ -import { HabboClubLevelEnum } from 'nitro-renderer'; +import { HabboClubLevelEnum } from '@nitrots/nitro-renderer'; import { GetNitroInstance } from '../../../api'; import { IPurse } from './IPurse'; diff --git a/src/views/room-host/RoomHostView.tsx b/src/views/room-host/RoomHostView.tsx index f1bb789d..c566ad88 100644 --- a/src/views/room-host/RoomHostView.tsx +++ b/src/views/room-host/RoomHostView.tsx @@ -1,4 +1,4 @@ -import { IRoomSession, RoomEngineEvent, RoomId, RoomSessionEvent } from 'nitro-renderer'; +import { IRoomSession, RoomEngineEvent, RoomId, RoomSessionEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback, useState } from 'react'; import { SetActiveRoomId } from '../../api/nitro/room/SetActiveRoomId'; import { GetRoomSession } from '../../api/nitro/session/GetRoomSession'; diff --git a/src/views/room/RoomColorView.tsx b/src/views/room/RoomColorView.tsx index 3ac8a8f0..8c9e6eed 100644 --- a/src/views/room/RoomColorView.tsx +++ b/src/views/room/RoomColorView.tsx @@ -1,4 +1,4 @@ -import { ColorConverter, NitroAdjustmentFilter, NitroContainer, NitroSprite, NitroTexture, RoomBackgroundColorEvent, RoomEngineEvent, RoomId, RoomObjectHSLColorEnabledEvent } from 'nitro-renderer'; +import { ColorConverter, NitroAdjustmentFilter, NitroContainer, NitroSprite, NitroTexture, RoomBackgroundColorEvent, RoomEngineEvent, RoomId, RoomObjectHSLColorEnabledEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback, useState } from 'react'; import { GetNitroInstance, GetRoomEngine } from '../../api'; import { UseMountEffect } from '../../hooks'; diff --git a/src/views/room/RoomView.tsx b/src/views/room/RoomView.tsx index babde88d..ed5f14aa 100644 --- a/src/views/room/RoomView.tsx +++ b/src/views/room/RoomView.tsx @@ -1,4 +1,4 @@ -import { EventDispatcher, NitroRectangle, RoomGeometry, RoomVariableEnum, Vector3d } from 'nitro-renderer'; +import { EventDispatcher, NitroRectangle, RoomGeometry, RoomVariableEnum, Vector3d } from '@nitrots/nitro-renderer'; import { FC, useEffect, useState } from 'react'; import { createPortal } from 'react-dom'; import { GetNitroInstance, InitializeRoomInstanceRenderingCanvas } from '../../api'; diff --git a/src/views/room/RoomView.types.ts b/src/views/room/RoomView.types.ts index 05b3d86f..b24c79b6 100644 --- a/src/views/room/RoomView.types.ts +++ b/src/views/room/RoomView.types.ts @@ -1,4 +1,4 @@ -import { IRoomSession } from 'nitro-renderer'; +import { IRoomSession } from '@nitrots/nitro-renderer'; export interface RoomViewProps { diff --git a/src/views/room/context/RoomContext.types.ts b/src/views/room/context/RoomContext.types.ts index 3a0f4f50..36ec0b92 100644 --- a/src/views/room/context/RoomContext.types.ts +++ b/src/views/room/context/RoomContext.types.ts @@ -1,4 +1,4 @@ -import { IEventDispatcher, IRoomSession } from 'nitro-renderer'; +import { IEventDispatcher, IRoomSession } from '@nitrots/nitro-renderer'; import { ProviderProps } from 'react'; import { IRoomWidgetHandlerManager } from '../handlers'; diff --git a/src/views/room/events/RoomWidgetUpdateEvent.ts b/src/views/room/events/RoomWidgetUpdateEvent.ts index a4a0540a..0ac8ff81 100644 --- a/src/views/room/events/RoomWidgetUpdateEvent.ts +++ b/src/views/room/events/RoomWidgetUpdateEvent.ts @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; export class RoomWidgetUpdateEvent extends NitroEvent {} diff --git a/src/views/room/events/RoomWidgetUpdateInfostandFurniEvent.ts b/src/views/room/events/RoomWidgetUpdateInfostandFurniEvent.ts index f1e2bacf..1df6fcdf 100644 --- a/src/views/room/events/RoomWidgetUpdateInfostandFurniEvent.ts +++ b/src/views/room/events/RoomWidgetUpdateInfostandFurniEvent.ts @@ -1,4 +1,4 @@ -import { IObjectData } from 'nitro-renderer'; +import { IObjectData } from '@nitrots/nitro-renderer'; import { RoomWidgetUpdateInfostandEvent } from './RoomWidgetUpdateInfostandEvent'; export class RoomWidgetUpdateInfostandFurniEvent extends RoomWidgetUpdateInfostandEvent diff --git a/src/views/room/events/RoomWidgetUpdateRoomViewEvent.ts b/src/views/room/events/RoomWidgetUpdateRoomViewEvent.ts index 5c1b0715..fce35aaf 100644 --- a/src/views/room/events/RoomWidgetUpdateRoomViewEvent.ts +++ b/src/views/room/events/RoomWidgetUpdateRoomViewEvent.ts @@ -1,4 +1,4 @@ -import { NitroRectangle } from 'nitro-renderer'; +import { NitroRectangle } from '@nitrots/nitro-renderer'; import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent'; export class RoomWidgetUpdateRoomViewEvent extends RoomWidgetUpdateEvent diff --git a/src/views/room/handlers/FurnitureContextMenuWidgetHandler.ts b/src/views/room/handlers/FurnitureContextMenuWidgetHandler.ts index b0e8192d..02f838e9 100644 --- a/src/views/room/handlers/FurnitureContextMenuWidgetHandler.ts +++ b/src/views/room/handlers/FurnitureContextMenuWidgetHandler.ts @@ -1,4 +1,4 @@ -import { NitroEvent, RoomEngineTriggerWidgetEvent, RoomWidgetEnum } from 'nitro-renderer'; +import { NitroEvent, RoomEngineTriggerWidgetEvent, RoomWidgetEnum } from '@nitrots/nitro-renderer'; import { RoomWidgetUpdateEvent } from '../events'; import { RoomWidgetMessage, RoomWidgetUseProductMessage } from '../messages'; import { RoomWidgetHandler } from './RoomWidgetHandler'; diff --git a/src/views/room/handlers/FurnitureCustomStackHeightWidgetHandler.ts b/src/views/room/handlers/FurnitureCustomStackHeightWidgetHandler.ts index 7ffb8231..ef158da9 100644 --- a/src/views/room/handlers/FurnitureCustomStackHeightWidgetHandler.ts +++ b/src/views/room/handlers/FurnitureCustomStackHeightWidgetHandler.ts @@ -1,4 +1,4 @@ -import { NitroEvent, RoomEngineTriggerWidgetEvent, RoomWidgetEnum } from 'nitro-renderer'; +import { NitroEvent, RoomEngineTriggerWidgetEvent, RoomWidgetEnum } from '@nitrots/nitro-renderer'; import { GetRoomEngine } from '../../../api'; import { RoomWidgetUpdateCustomStackHeightEvent, RoomWidgetUpdateEvent } from '../events'; import { RoomWidgetMessage } from '../messages'; diff --git a/src/views/room/handlers/IRoomWidgetHandler.ts b/src/views/room/handlers/IRoomWidgetHandler.ts index 0c7a7936..4043b096 100644 --- a/src/views/room/handlers/IRoomWidgetHandler.ts +++ b/src/views/room/handlers/IRoomWidgetHandler.ts @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; import { RoomWidgetUpdateEvent } from '../events'; import { RoomWidgetMessage } from '../messages'; import { IRoomWidgetHandlerManager } from './IRoomWidgetHandlerManager'; diff --git a/src/views/room/handlers/IRoomWidgetHandlerManager.ts b/src/views/room/handlers/IRoomWidgetHandlerManager.ts index 784a5b95..cb173f01 100644 --- a/src/views/room/handlers/IRoomWidgetHandlerManager.ts +++ b/src/views/room/handlers/IRoomWidgetHandlerManager.ts @@ -1,4 +1,4 @@ -import { IEventDispatcher, IRoomSession, NitroEvent } from 'nitro-renderer'; +import { IEventDispatcher, IRoomSession, NitroEvent } from '@nitrots/nitro-renderer'; import { RoomWidgetUpdateEvent } from '../events'; import { RoomWidgetMessage } from '../messages'; import { IRoomWidgetHandler } from './IRoomWidgetHandler'; diff --git a/src/views/room/handlers/RoomWidgetAvatarInfoHandler.ts b/src/views/room/handlers/RoomWidgetAvatarInfoHandler.ts index d75eac3f..c90cc343 100644 --- a/src/views/room/handlers/RoomWidgetAvatarInfoHandler.ts +++ b/src/views/room/handlers/RoomWidgetAvatarInfoHandler.ts @@ -1,4 +1,4 @@ -import { NitroEvent, RoomEngineUseProductEvent, RoomObjectCategory, RoomObjectType, RoomObjectVariable, RoomSessionDanceEvent, RoomSessionUserDataUpdateEvent, RoomWidgetEnum } from 'nitro-renderer'; +import { NitroEvent, RoomEngineUseProductEvent, RoomObjectCategory, RoomObjectType, RoomObjectVariable, RoomSessionDanceEvent, RoomSessionUserDataUpdateEvent, RoomWidgetEnum } from '@nitrots/nitro-renderer'; import { GetRoomEngine, GetRoomSession, GetSessionDataManager, IsOwnerOfFurniture } from '../../../api'; import { FurniCategory } from '../../inventory/common/FurniCategory'; import { RoomWidgetAvatarInfoEvent, RoomWidgetUpdateDanceStatusEvent, RoomWidgetUpdateEvent, RoomWidgetUpdateUserDataEvent, RoomWidgetUseProductBubbleEvent, UseProductItem } from '../events'; diff --git a/src/views/room/handlers/RoomWidgetChatHandler.ts b/src/views/room/handlers/RoomWidgetChatHandler.ts index 5532ae86..12fb44ad 100644 --- a/src/views/room/handlers/RoomWidgetChatHandler.ts +++ b/src/views/room/handlers/RoomWidgetChatHandler.ts @@ -1,4 +1,4 @@ -import { AvatarFigurePartType, AvatarScaleType, AvatarSetType, IAvatarImageListener, INitroPoint, IVector3D, NitroEvent, NitroPoint, PetFigureData, RoomObjectCategory, RoomObjectType, RoomObjectVariable, RoomSessionChatEvent, RoomWidgetEnum, SystemChatStyleEnum, TextureUtils, Vector3d } from 'nitro-renderer'; +import { AvatarFigurePartType, AvatarScaleType, AvatarSetType, IAvatarImageListener, INitroPoint, IVector3D, NitroEvent, NitroPoint, PetFigureData, RoomObjectCategory, RoomObjectType, RoomObjectVariable, RoomSessionChatEvent, RoomWidgetEnum, SystemChatStyleEnum, TextureUtils, Vector3d } from '@nitrots/nitro-renderer'; import { GetAvatarRenderManager, GetRoomEngine } from '../../../api'; import { LocalizeText } from '../../../utils/LocalizeText'; import { RoomWidgetUpdateChatEvent, RoomWidgetUpdateEvent } from '../events'; diff --git a/src/views/room/handlers/RoomWidgetChatInputHandler.ts b/src/views/room/handlers/RoomWidgetChatInputHandler.ts index c0223f21..c038d7f2 100644 --- a/src/views/room/handlers/RoomWidgetChatInputHandler.ts +++ b/src/views/room/handlers/RoomWidgetChatInputHandler.ts @@ -1,4 +1,4 @@ -import { AvatarExpressionEnum, HabboClubLevelEnum, NitroEvent, RoomControllerLevel, RoomSessionChatEvent, RoomSettingsComposer, RoomWidgetEnum, RoomZoomEvent, TextureUtils } from 'nitro-renderer'; +import { AvatarExpressionEnum, HabboClubLevelEnum, NitroEvent, RoomControllerLevel, RoomSessionChatEvent, RoomSettingsComposer, RoomWidgetEnum, RoomZoomEvent, TextureUtils } from '@nitrots/nitro-renderer'; import { GetRoomEngine, GetSessionDataManager } from '../../../api'; import { SendMessageHook } from '../../../hooks/messages'; import { RoomWidgetFloodControlEvent, RoomWidgetUpdateEvent } from '../events'; diff --git a/src/views/room/handlers/RoomWidgetHandler.ts b/src/views/room/handlers/RoomWidgetHandler.ts index 9edf0667..ef0c9d39 100644 --- a/src/views/room/handlers/RoomWidgetHandler.ts +++ b/src/views/room/handlers/RoomWidgetHandler.ts @@ -1,4 +1,4 @@ -import { NitroEvent } from 'nitro-renderer'; +import { NitroEvent } from '@nitrots/nitro-renderer'; import { RoomWidgetUpdateEvent } from '../events'; import { RoomWidgetMessage } from '../messages'; import { IRoomWidgetHandler } from './IRoomWidgetHandler'; diff --git a/src/views/room/handlers/RoomWidgetHandlerManager.ts b/src/views/room/handlers/RoomWidgetHandlerManager.ts index e22969b7..4bf56a99 100644 --- a/src/views/room/handlers/RoomWidgetHandlerManager.ts +++ b/src/views/room/handlers/RoomWidgetHandlerManager.ts @@ -1,4 +1,4 @@ -import { IEventDispatcher, IRoomSession, NitroEvent, RoomEngineTriggerWidgetEvent } from 'nitro-renderer'; +import { IEventDispatcher, IRoomSession, NitroEvent, RoomEngineTriggerWidgetEvent } from '@nitrots/nitro-renderer'; import { RoomWidgetUpdateEvent } from '../events'; import { RoomWidgetMessage } from '../messages'; import { IRoomWidgetHandler } from './IRoomWidgetHandler'; diff --git a/src/views/room/handlers/RoomWidgetInfostandHandler.ts b/src/views/room/handlers/RoomWidgetInfostandHandler.ts index a7b898aa..0a817e64 100644 --- a/src/views/room/handlers/RoomWidgetInfostandHandler.ts +++ b/src/views/room/handlers/RoomWidgetInfostandHandler.ts @@ -1,4 +1,4 @@ -import { IFurnitureData, NitroEvent, ObjectDataFactory, PetFigureData, PetRespectComposer, PetSupplementComposer, PetType, RoomAdsUpdateComposer, RoomControllerLevel, RoomModerationSettings, RoomObjectCategory, RoomObjectOperationType, RoomObjectType, RoomObjectVariable, RoomSessionPetInfoUpdateEvent, RoomSessionUserBadgesEvent, RoomTradingLevelEnum, RoomUnitDropHandItemComposer, RoomUnitGiveHandItemComposer, RoomUnitGiveHandItemPetComposer, RoomUserData, RoomWidgetEnum, RoomWidgetEnumItemExtradataParameter, SecurityLevel, Vector3d } from 'nitro-renderer'; +import { IFurnitureData, NitroEvent, ObjectDataFactory, PetFigureData, PetRespectComposer, PetSupplementComposer, PetType, RoomAdsUpdateComposer, RoomControllerLevel, RoomModerationSettings, RoomObjectCategory, RoomObjectOperationType, RoomObjectType, RoomObjectVariable, RoomSessionPetInfoUpdateEvent, RoomSessionUserBadgesEvent, RoomTradingLevelEnum, RoomUnitDropHandItemComposer, RoomUnitGiveHandItemComposer, RoomUnitGiveHandItemPetComposer, RoomUserData, RoomWidgetEnum, RoomWidgetEnumItemExtradataParameter, SecurityLevel, Vector3d } from '@nitrots/nitro-renderer'; import { GetNitroInstance, GetRoomEngine, GetSessionDataManager, IsOwnerOfFurniture } from '../../../api'; import { InventoryTradeRequestEvent, WiredSelectObjectEvent } from '../../../events'; import { FriendListSendFriendRequestEvent } from '../../../events/friend-list/FriendListSendFriendRequestEvent'; diff --git a/src/views/room/handlers/RoomWidgetRoomToolsHandler.ts b/src/views/room/handlers/RoomWidgetRoomToolsHandler.ts index 2a275b47..c9e21363 100644 --- a/src/views/room/handlers/RoomWidgetRoomToolsHandler.ts +++ b/src/views/room/handlers/RoomWidgetRoomToolsHandler.ts @@ -1,4 +1,4 @@ -import { NitroEvent, RoomWidgetEnum, RoomZoomEvent } from 'nitro-renderer'; +import { NitroEvent, RoomWidgetEnum, RoomZoomEvent } from '@nitrots/nitro-renderer'; import { GetRoomEngine } from '../../../api'; import { RoomWidgetUpdateEvent } from '../events'; import { RoomWidgetMessage, RoomWidgetZoomToggleMessage } from '../messages'; diff --git a/src/views/room/messages/RoomWidgetAvatarExpressionMessage.ts b/src/views/room/messages/RoomWidgetAvatarExpressionMessage.ts index 6e7631d2..76e9c9b3 100644 --- a/src/views/room/messages/RoomWidgetAvatarExpressionMessage.ts +++ b/src/views/room/messages/RoomWidgetAvatarExpressionMessage.ts @@ -1,4 +1,4 @@ -import { AvatarExpressionEnum } from 'nitro-renderer'; +import { AvatarExpressionEnum } from '@nitrots/nitro-renderer'; import { RoomWidgetMessage } from './RoomWidgetMessage'; export class RoomWidgetAvatarExpressionMessage extends RoomWidgetMessage diff --git a/src/views/room/widgets/RoomWidgetsView.tsx b/src/views/room/widgets/RoomWidgetsView.tsx index 502489a5..2ed8ba9d 100644 --- a/src/views/room/widgets/RoomWidgetsView.tsx +++ b/src/views/room/widgets/RoomWidgetsView.tsx @@ -1,4 +1,4 @@ -import { RoomEngineDimmerStateEvent, RoomEngineEvent, RoomEngineObjectEvent, RoomEngineTriggerWidgetEvent, RoomEngineUseProductEvent, RoomId, RoomObjectCategory, RoomObjectOperationType, RoomSessionChatEvent, RoomSessionDanceEvent, RoomSessionDimmerPresetsEvent, RoomSessionDoorbellEvent, RoomSessionErrorMessageEvent, RoomSessionEvent, RoomSessionFriendRequestEvent, RoomSessionPetInfoUpdateEvent, RoomSessionPresentEvent, RoomSessionUserBadgesEvent, RoomZoomEvent } from 'nitro-renderer'; +import { RoomEngineDimmerStateEvent, RoomEngineEvent, RoomEngineObjectEvent, RoomEngineTriggerWidgetEvent, RoomEngineUseProductEvent, RoomId, RoomObjectCategory, RoomObjectOperationType, RoomSessionChatEvent, RoomSessionDanceEvent, RoomSessionDimmerPresetsEvent, RoomSessionDoorbellEvent, RoomSessionErrorMessageEvent, RoomSessionEvent, RoomSessionFriendRequestEvent, RoomSessionPetInfoUpdateEvent, RoomSessionPresentEvent, RoomSessionUserBadgesEvent, RoomZoomEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback } from 'react'; import { CanManipulateFurniture, GetRoomEngine, IsFurnitureSelectionDisabled, ProcessRoomObjectOperation } from '../../../api'; import { useRoomEngineEvent, useRoomSessionManagerEvent } from '../../../hooks/events'; diff --git a/src/views/room/widgets/avatar-info/AvatarInfoWidgetView.tsx b/src/views/room/widgets/avatar-info/AvatarInfoWidgetView.tsx index 76af1582..4ee3a60d 100644 --- a/src/views/room/widgets/avatar-info/AvatarInfoWidgetView.tsx +++ b/src/views/room/widgets/avatar-info/AvatarInfoWidgetView.tsx @@ -1,4 +1,4 @@ -import { RoomEnterEffect, RoomObjectCategory } from 'nitro-renderer'; +import { RoomEnterEffect, RoomObjectCategory } from '@nitrots/nitro-renderer'; import { FC, useCallback, useMemo, useState } from 'react'; import { GetRoomSession, GetSessionDataManager } from '../../../../api'; import { FriendEnteredRoomEvent } from '../../../../events'; diff --git a/src/views/room/widgets/avatar-info/views/avatar/AvatarInfoWidgetAvatarView.tsx b/src/views/room/widgets/avatar-info/views/avatar/AvatarInfoWidgetAvatarView.tsx index a46ff0f4..9d1871ed 100644 --- a/src/views/room/widgets/avatar-info/views/avatar/AvatarInfoWidgetAvatarView.tsx +++ b/src/views/room/widgets/avatar-info/views/avatar/AvatarInfoWidgetAvatarView.tsx @@ -1,4 +1,4 @@ -import { RoomControllerLevel, RoomObjectCategory, RoomObjectVariable } from 'nitro-renderer'; +import { RoomControllerLevel, RoomObjectCategory, RoomObjectVariable } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useMemo, useState } from 'react'; import { GetOwnRoomObject } from '../../../../../../api'; import { LocalizeText } from '../../../../../../utils/LocalizeText'; diff --git a/src/views/room/widgets/avatar-info/views/decorate/AvatarInfoWidgetDecorateView.tsx b/src/views/room/widgets/avatar-info/views/decorate/AvatarInfoWidgetDecorateView.tsx index abbe4e68..0a4364f9 100644 --- a/src/views/room/widgets/avatar-info/views/decorate/AvatarInfoWidgetDecorateView.tsx +++ b/src/views/room/widgets/avatar-info/views/decorate/AvatarInfoWidgetDecorateView.tsx @@ -1,4 +1,4 @@ -import { RoomObjectCategory } from 'nitro-renderer'; +import { RoomObjectCategory } from '@nitrots/nitro-renderer'; import { FC } from 'react'; import { LocalizeText } from '../../../../../../utils/LocalizeText'; import { ContextMenuView } from '../../../context-menu/ContextMenuView'; diff --git a/src/views/room/widgets/avatar-info/views/own-avatar/AvatarInfoWidgetOwnAvatarView.tsx b/src/views/room/widgets/avatar-info/views/own-avatar/AvatarInfoWidgetOwnAvatarView.tsx index 93df5e2c..077f9e6c 100644 --- a/src/views/room/widgets/avatar-info/views/own-avatar/AvatarInfoWidgetOwnAvatarView.tsx +++ b/src/views/room/widgets/avatar-info/views/own-avatar/AvatarInfoWidgetOwnAvatarView.tsx @@ -1,4 +1,4 @@ -import { AvatarAction, AvatarExpressionEnum, RoomObjectCategory } from 'nitro-renderer'; +import { AvatarAction, AvatarExpressionEnum, RoomObjectCategory } from '@nitrots/nitro-renderer'; import { FC, useCallback, useState } from 'react'; import { GetCanStandUp, GetCanUseExpression, GetOwnPosture, HasHabboClub, HasHabboVip, IsRidingHorse } from '../../../../../../api'; import { AvatarEditorEvent } from '../../../../../../events'; diff --git a/src/views/room/widgets/avatar-info/views/own-pet/AvatarInfoWidgetOwnPetView.tsx b/src/views/room/widgets/avatar-info/views/own-pet/AvatarInfoWidgetOwnPetView.tsx index 03ebc74a..bfec7806 100644 --- a/src/views/room/widgets/avatar-info/views/own-pet/AvatarInfoWidgetOwnPetView.tsx +++ b/src/views/room/widgets/avatar-info/views/own-pet/AvatarInfoWidgetOwnPetView.tsx @@ -1,4 +1,4 @@ -import { PetType, RoomObjectCategory, RoomObjectType, RoomObjectVariable } from 'nitro-renderer'; +import { PetType, RoomObjectCategory, RoomObjectType, RoomObjectVariable } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useMemo, useState } from 'react'; import { GetOwnRoomObject } from '../../../../../../api'; import { LocalizeText } from '../../../../../../utils/LocalizeText'; diff --git a/src/views/room/widgets/avatar-info/views/pet/AvatarInfoWidgetPetView.tsx b/src/views/room/widgets/avatar-info/views/pet/AvatarInfoWidgetPetView.tsx index 84a4a0c4..82207e22 100644 --- a/src/views/room/widgets/avatar-info/views/pet/AvatarInfoWidgetPetView.tsx +++ b/src/views/room/widgets/avatar-info/views/pet/AvatarInfoWidgetPetView.tsx @@ -1,4 +1,4 @@ -import { PetType, RoomControllerLevel, RoomObjectCategory, RoomObjectType, RoomObjectVariable } from 'nitro-renderer'; +import { PetType, RoomControllerLevel, RoomObjectCategory, RoomObjectType, RoomObjectVariable } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useMemo, useState } from 'react'; import { GetOwnRoomObject, GetSessionDataManager } from '../../../../../../api'; import { LocalizeText } from '../../../../../../utils/LocalizeText'; diff --git a/src/views/room/widgets/avatar-info/views/rentable-bot/AvatarInfoWidgetRentableBotView.tsx b/src/views/room/widgets/avatar-info/views/rentable-bot/AvatarInfoWidgetRentableBotView.tsx index 16bb9a72..2384db0f 100644 --- a/src/views/room/widgets/avatar-info/views/rentable-bot/AvatarInfoWidgetRentableBotView.tsx +++ b/src/views/room/widgets/avatar-info/views/rentable-bot/AvatarInfoWidgetRentableBotView.tsx @@ -1,4 +1,4 @@ -import { BotCommandConfigurationEvent, BotRemoveComposer, BotSkillSaveComposer, RequestBotCommandConfigurationComposer, RoomObjectCategory, RoomObjectType } from 'nitro-renderer'; +import { BotCommandConfigurationEvent, BotRemoveComposer, BotSkillSaveComposer, RequestBotCommandConfigurationComposer, RoomObjectCategory, RoomObjectType } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { GetNitroInstance } from '../../../../../../api'; import { CreateMessageHook, SendMessageHook } from '../../../../../../hooks/messages'; diff --git a/src/views/room/widgets/avatar-info/views/use-product-confirm/AvatarInfoUseProductConfirmView.tsx b/src/views/room/widgets/avatar-info/views/use-product-confirm/AvatarInfoUseProductConfirmView.tsx index 4d781a25..b1b3f19d 100644 --- a/src/views/room/widgets/avatar-info/views/use-product-confirm/AvatarInfoUseProductConfirmView.tsx +++ b/src/views/room/widgets/avatar-info/views/use-product-confirm/AvatarInfoUseProductConfirmView.tsx @@ -1,4 +1,4 @@ -import { IFurnitureData, PetCustomPart, PetFigureData, RoomObjectCategory, RoomObjectVariable, RoomUserData } from 'nitro-renderer'; +import { IFurnitureData, PetCustomPart, PetFigureData, RoomObjectCategory, RoomObjectVariable, RoomUserData } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useMemo, useState } from 'react'; import { GetFurnitureDataForRoomObject, GetRoomEngine } from '../../../../../../api'; import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../../../layout'; diff --git a/src/views/room/widgets/avatar-info/views/use-product/AvatarInfoUseProductView.tsx b/src/views/room/widgets/avatar-info/views/use-product/AvatarInfoUseProductView.tsx index 1162b43e..2a3328c2 100644 --- a/src/views/room/widgets/avatar-info/views/use-product/AvatarInfoUseProductView.tsx +++ b/src/views/room/widgets/avatar-info/views/use-product/AvatarInfoUseProductView.tsx @@ -1,4 +1,4 @@ -import { RoomObjectCategory, RoomObjectType } from 'nitro-renderer'; +import { RoomObjectCategory, RoomObjectType } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { GetFurnitureDataForRoomObject } from '../../../../../../api'; import { LocalizeText } from '../../../../../../utils/LocalizeText'; diff --git a/src/views/room/widgets/camera/CameraWidgetView.tsx b/src/views/room/widgets/camera/CameraWidgetView.tsx index b9ca0a10..a8e2ef3e 100644 --- a/src/views/room/widgets/camera/CameraWidgetView.tsx +++ b/src/views/room/widgets/camera/CameraWidgetView.tsx @@ -1,6 +1,4 @@ -import { InitCameraMessageEvent, IRoomCameraWidgetEffect, RequestCameraConfigurationComposer } from 'nitro-renderer'; -import { RoomCameraWidgetManagerEvent } from 'nitro-renderer/src/nitro/camera/events/RoomCameraWidgetManagerEvent'; -import { IRoomCameraWidgetSelectedEffect } from 'nitro-renderer/src/nitro/camera/IRoomCameraWidgetSelectedEffect'; +import { InitCameraMessageEvent, IRoomCameraWidgetEffect, IRoomCameraWidgetSelectedEffect, RequestCameraConfigurationComposer, RoomCameraWidgetManagerEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { GetRoomCameraWidgetManager } from '../../../../api'; import { RoomWidgetCameraEvent } from '../../../../events/room-widgets/camera/RoomWidgetCameraEvent'; diff --git a/src/views/room/widgets/camera/common/CameraPicture.ts b/src/views/room/widgets/camera/common/CameraPicture.ts index 34019568..8d9401b6 100644 --- a/src/views/room/widgets/camera/common/CameraPicture.ts +++ b/src/views/room/widgets/camera/common/CameraPicture.ts @@ -1,4 +1,4 @@ -import { NitroTexture } from 'nitro-renderer'; +import { NitroTexture } from '@nitrots/nitro-renderer'; export class CameraPicture { diff --git a/src/views/room/widgets/camera/context/CameraWidgetContext.types.ts b/src/views/room/widgets/camera/context/CameraWidgetContext.types.ts index f1c1125d..8c6c4d82 100644 --- a/src/views/room/widgets/camera/context/CameraWidgetContext.types.ts +++ b/src/views/room/widgets/camera/context/CameraWidgetContext.types.ts @@ -1,4 +1,4 @@ -import { IRoomCameraWidgetSelectedEffect } from 'nitro-renderer/src/nitro/camera/IRoomCameraWidgetSelectedEffect'; +import { IRoomCameraWidgetSelectedEffect } from '@nitrots/nitro-renderer'; import { ProviderProps } from 'react'; import { CameraPicture } from '../common/CameraPicture'; diff --git a/src/views/room/widgets/camera/views/capture/CameraWidgetCaptureView.tsx b/src/views/room/widgets/camera/views/capture/CameraWidgetCaptureView.tsx index a0c9171b..9bef1dad 100644 --- a/src/views/room/widgets/camera/views/capture/CameraWidgetCaptureView.tsx +++ b/src/views/room/widgets/camera/views/capture/CameraWidgetCaptureView.tsx @@ -1,4 +1,4 @@ -import { NitroRectangle, TextureUtils } from 'nitro-renderer'; +import { NitroRectangle, TextureUtils } from '@nitrots/nitro-renderer'; import { FC, useCallback, useRef } from 'react'; import { GetRoomEngine, GetRoomSession } from '../../../../../../api'; import { DraggableWindow } from '../../../../../../layout/draggable-window/DraggableWindow'; diff --git a/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.tsx b/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.tsx index 88188463..64355107 100644 --- a/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.tsx +++ b/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.tsx @@ -1,5 +1,5 @@ /* eslint-disable jsx-a11y/anchor-is-valid */ -import { CameraPublishStatusMessageEvent, CameraPurchaseOKMessageEvent, PublishPhotoMessageComposer, PurchasePhotoMessageComposer } from 'nitro-renderer'; +import { CameraPublishStatusMessageEvent, CameraPurchaseOKMessageEvent, PublishPhotoMessageComposer, PurchasePhotoMessageComposer } from '@nitrots/nitro-renderer'; import { FC, useCallback, useState } from 'react'; import { GetRoomCameraWidgetManager } from '../../../../../../api/nitro/camera/GetRoomCameraWidgetManager'; import { CreateMessageHook, SendMessageHook } from '../../../../../../hooks/messages/message-event'; diff --git a/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.tsx b/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.tsx index 5bd4d4c1..cce2c55c 100644 --- a/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.tsx +++ b/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.tsx @@ -1,5 +1,5 @@ +import { RoomCameraWidgetSelectedEffect } from '@nitrots/nitro-renderer'; import classNames from 'classnames'; -import { RoomCameraWidgetSelectedEffect } from 'nitro-renderer/src/nitro/camera/RoomCameraWidgetSelectedEffect'; import { FC, useCallback, useEffect, useState } from 'react'; import { GetRoomCameraWidgetManager } from '../../../../../../api'; import { NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from '../../../../../../layout'; diff --git a/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.types.ts b/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.types.ts index 38c58155..6a58547a 100644 --- a/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.types.ts +++ b/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.types.ts @@ -1,4 +1,4 @@ -import { IRoomCameraWidgetEffect } from 'nitro-renderer/src/nitro/camera/IRoomCameraWidgetEffect'; +import { IRoomCameraWidgetEffect } from '@nitrots/nitro-renderer'; export interface CameraWidgetEditorViewProps { diff --git a/src/views/room/widgets/chat/ChatWidgetView.tsx b/src/views/room/widgets/chat/ChatWidgetView.tsx index d0408b4f..73130b12 100644 --- a/src/views/room/widgets/chat/ChatWidgetView.tsx +++ b/src/views/room/widgets/chat/ChatWidgetView.tsx @@ -1,4 +1,4 @@ -import { NitroPoint, RoomDragEvent } from 'nitro-renderer'; +import { NitroPoint, RoomDragEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useRef, useState } from 'react'; import { CreateEventDispatcherHook, useRoomEngineEvent } from '../../../../hooks/events'; import { useRoomContext } from '../../context/RoomContext'; diff --git a/src/views/room/widgets/chat/utils/ChatBubbleMessage.ts b/src/views/room/widgets/chat/utils/ChatBubbleMessage.ts index e05307f9..9299ceb1 100644 --- a/src/views/room/widgets/chat/utils/ChatBubbleMessage.ts +++ b/src/views/room/widgets/chat/utils/ChatBubbleMessage.ts @@ -1,4 +1,4 @@ -import { INitroPoint } from 'nitro-renderer'; +import { INitroPoint } from '@nitrots/nitro-renderer'; export class ChatBubbleMessage { diff --git a/src/views/room/widgets/chat/utils/ChatWidgetUtilities.ts b/src/views/room/widgets/chat/utils/ChatWidgetUtilities.ts index 61471c53..220b6bae 100644 --- a/src/views/room/widgets/chat/utils/ChatWidgetUtilities.ts +++ b/src/views/room/widgets/chat/utils/ChatWidgetUtilities.ts @@ -1,4 +1,4 @@ -import { INitroPoint, IVector3D, NitroPoint } from 'nitro-renderer'; +import { INitroPoint, IVector3D, NitroPoint } from '@nitrots/nitro-renderer'; import { GetRoomEngine } from '../../../../../api'; export function GetBubbleLocation(roomId: number, userLocation: IVector3D, canvasId = 1): INitroPoint diff --git a/src/views/room/widgets/context-menu/ContextMenuView.tsx b/src/views/room/widgets/context-menu/ContextMenuView.tsx index 5beb8eb9..ce3a4397 100644 --- a/src/views/room/widgets/context-menu/ContextMenuView.tsx +++ b/src/views/room/widgets/context-menu/ContextMenuView.tsx @@ -1,4 +1,4 @@ -import { FixedSizeStack, NitroPoint, NitroRectangle, RoomObjectType } from 'nitro-renderer'; +import { FixedSizeStack, NitroPoint, NitroRectangle, RoomObjectType } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useRef, useState } from 'react'; import { GetNitroInstance, GetRoomEngine, GetRoomObjectBounds, GetRoomSession, GetTicker } from '../../../../api'; import { ContextMenuViewProps } from './ContextMenuView.types'; diff --git a/src/views/room/widgets/furniture/background-color/FurnitureBackgroundColorView.tsx b/src/views/room/widgets/furniture/background-color/FurnitureBackgroundColorView.tsx index 7719bf0b..d9ea47cf 100644 --- a/src/views/room/widgets/furniture/background-color/FurnitureBackgroundColorView.tsx +++ b/src/views/room/widgets/furniture/background-color/FurnitureBackgroundColorView.tsx @@ -1,4 +1,4 @@ -import { ApplyTonerComposer, RoomControllerLevel, RoomEngineObjectEvent, RoomEngineTriggerWidgetEvent, RoomObjectVariable } from 'nitro-renderer'; +import { ApplyTonerComposer, RoomControllerLevel, RoomEngineObjectEvent, RoomEngineTriggerWidgetEvent, RoomObjectVariable } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import ReactSlider from 'react-slider'; import { GetRoomEngine, GetSessionDataManager } from '../../../../../api'; diff --git a/src/views/room/widgets/furniture/badge-display/FurnitureBadgeDisplayView.tsx b/src/views/room/widgets/furniture/badge-display/FurnitureBadgeDisplayView.tsx new file mode 100644 index 00000000..c4076440 --- /dev/null +++ b/src/views/room/widgets/furniture/badge-display/FurnitureBadgeDisplayView.tsx @@ -0,0 +1,56 @@ +import { NitroEvent, RoomEngineTriggerWidgetEvent, StringDataType } from '@nitrots/nitro-renderer'; +import { FC, useCallback } from 'react'; +import { GetRoomEngine } from '../../../../../api'; +import { useRoomEngineEvent } from '../../../../../hooks/events/nitro/room/room-engine-event'; +import { LocalizeBadgeDescription } from '../../../../../utils'; +import { LocalizeBadgeName } from '../../../../../utils/LocalizeBageName'; +import { useRoomContext } from '../../../context/RoomContext'; + +export const FurnitureBadgeDisplayView: FC<{}> = props => +{ + const { eventDispatcher = null, widgetHandler = null } = useRoomContext(); + + const onNitroEvent = useCallback((event: NitroEvent) => + { + switch(event.type) + { + case RoomEngineTriggerWidgetEvent.REQUEST_BADGE_DISPLAY_ENGRAVING: + case RoomEngineTriggerWidgetEvent.REQUEST_ACHIEVEMENT_RESOLUTION_ENGRAVING: { + const widgetEvent = (event as RoomEngineTriggerWidgetEvent); + + const roomObject = GetRoomEngine().getRoomObject(widgetEvent.roomId, widgetEvent.objectId, widgetEvent.category); + + if(!roomObject) return; + + const stringStuff = new StringDataType(); + + stringStuff.initializeFromRoomObjectModel(roomObject.model); + + const bagdeName = LocalizeBadgeName(stringStuff.getValue(1)); + const badgeDesc = LocalizeBadgeDescription(stringStuff.getValue(1)); + const date = stringStuff.getValue(2); + const senderName = stringStuff.getValue(3); + return; + } + } + }, []); + + useRoomEngineEvent(RoomEngineTriggerWidgetEvent.REQUEST_BADGE_DISPLAY_ENGRAVING, onNitroEvent); + useRoomEngineEvent(RoomEngineTriggerWidgetEvent.REQUEST_ACHIEVEMENT_RESOLUTION_ENGRAVING, onNitroEvent); + + const processAction = useCallback((type: string, value: string = null) => + { + switch(type) + { + case 'close': + //setTrophyData(null); + return; + } + }, []); + + return null; + + // if(!trophyData) return null; + + // return processAction('close') } />; +} diff --git a/src/views/room/widgets/furniture/context-menu/FurnitureContextMenuView.tsx b/src/views/room/widgets/furniture/context-menu/FurnitureContextMenuView.tsx index 275b5d52..4a273c44 100644 --- a/src/views/room/widgets/furniture/context-menu/FurnitureContextMenuView.tsx +++ b/src/views/room/widgets/furniture/context-menu/FurnitureContextMenuView.tsx @@ -1,4 +1,4 @@ -import { ContextMenuEnum, RoomEngineTriggerWidgetEvent, RoomObjectCategory } from 'nitro-renderer'; +import { ContextMenuEnum, RoomEngineTriggerWidgetEvent, RoomObjectCategory } from '@nitrots/nitro-renderer'; import { FC, useCallback, useState } from 'react'; import { GetRoomEngine, IsOwnerOfFurniture } from '../../../../../api'; import { useRoomEngineEvent } from '../../../../../hooks/events'; diff --git a/src/views/room/widgets/furniture/context-menu/views/monsterplant-seed/MonsterPlantSeedConfirmView.tsx b/src/views/room/widgets/furniture/context-menu/views/monsterplant-seed/MonsterPlantSeedConfirmView.tsx index acdeb4fa..f0bb84c5 100644 --- a/src/views/room/widgets/furniture/context-menu/views/monsterplant-seed/MonsterPlantSeedConfirmView.tsx +++ b/src/views/room/widgets/furniture/context-menu/views/monsterplant-seed/MonsterPlantSeedConfirmView.tsx @@ -1,4 +1,4 @@ -import { IFurnitureData, RoomObjectCategory } from 'nitro-renderer'; +import { IFurnitureData, RoomObjectCategory } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { GetFurnitureDataForRoomObject } from '../../../../../../../api'; import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../../../../layout'; diff --git a/src/views/room/widgets/furniture/context-menu/views/purchaseable-clothing/PurchasableClothingConfirmView.tsx b/src/views/room/widgets/furniture/context-menu/views/purchaseable-clothing/PurchasableClothingConfirmView.tsx index de3c10c4..3e1cf245 100644 --- a/src/views/room/widgets/furniture/context-menu/views/purchaseable-clothing/PurchasableClothingConfirmView.tsx +++ b/src/views/room/widgets/furniture/context-menu/views/purchaseable-clothing/PurchasableClothingConfirmView.tsx @@ -1,4 +1,4 @@ -import { RedeemItemClothingComposer, RoomObjectCategory, UserFigureComposer } from 'nitro-renderer'; +import { RedeemItemClothingComposer, RoomObjectCategory, UserFigureComposer } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { GetAvatarRenderManager, GetConnection, GetFurnitureDataForRoomObject, GetSessionDataManager } from '../../../../../../../api'; import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../../../../layout'; diff --git a/src/views/room/widgets/furniture/custom-stack-height/FurnitureCustomStackHeightView.tsx b/src/views/room/widgets/furniture/custom-stack-height/FurnitureCustomStackHeightView.tsx index 18debd32..1f5e00e3 100644 --- a/src/views/room/widgets/furniture/custom-stack-height/FurnitureCustomStackHeightView.tsx +++ b/src/views/room/widgets/furniture/custom-stack-height/FurnitureCustomStackHeightView.tsx @@ -1,4 +1,4 @@ -import { FurnitureStackHeightComposer, FurnitureStackHeightEvent } from 'nitro-renderer'; +import { FurnitureStackHeightComposer, FurnitureStackHeightEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import ReactSlider from 'react-slider'; import { CreateMessageHook, SendMessageHook } from '../../../../../hooks'; diff --git a/src/views/room/widgets/furniture/exchange-credit/FurnitureExchangeCreditView.tsx b/src/views/room/widgets/furniture/exchange-credit/FurnitureExchangeCreditView.tsx index 1743713f..aad37411 100644 --- a/src/views/room/widgets/furniture/exchange-credit/FurnitureExchangeCreditView.tsx +++ b/src/views/room/widgets/furniture/exchange-credit/FurnitureExchangeCreditView.tsx @@ -1,4 +1,4 @@ -import { FurnitureExchangeComposer, NitroEvent, RoomEngineTriggerWidgetEvent, RoomObjectVariable } from 'nitro-renderer'; +import { FurnitureExchangeComposer, NitroEvent, RoomEngineTriggerWidgetEvent, RoomObjectVariable } from '@nitrots/nitro-renderer'; import { FC, useCallback, useState } from 'react'; import { GetRoomEngine, GetRoomSession } from '../../../../../api'; import { CreateEventDispatcherHook } from '../../../../../hooks/events/event-dispatcher.base'; diff --git a/src/views/room/widgets/furniture/friend-furni/FurnitureFriendFurniView.tsx b/src/views/room/widgets/furniture/friend-furni/FurnitureFriendFurniView.tsx index f84abbfd..392967c0 100644 --- a/src/views/room/widgets/furniture/friend-furni/FurnitureFriendFurniView.tsx +++ b/src/views/room/widgets/furniture/friend-furni/FurnitureFriendFurniView.tsx @@ -1,4 +1,4 @@ -import { LoveLockFurniFinishedEvent, LoveLockFurniFriendConfirmedEvent, LoveLockFurniStartEvent, LoveLockStartConfirmComposer, NitroEvent, RoomEngineTriggerWidgetEvent, RoomObjectVariable } from 'nitro-renderer'; +import { LoveLockFurniFinishedEvent, LoveLockFurniFriendConfirmedEvent, LoveLockFurniStartEvent, LoveLockStartConfirmComposer, NitroEvent, RoomEngineTriggerWidgetEvent, RoomObjectVariable } from '@nitrots/nitro-renderer'; import { FC, useCallback, useState } from 'react'; import { GetRoomSession } from '../../../../../api'; import { GetRoomEngine } from '../../../../../api/nitro/room/GetRoomEngine'; diff --git a/src/views/room/widgets/furniture/high-score/FurnitureHighScoreView.tsx b/src/views/room/widgets/furniture/high-score/FurnitureHighScoreView.tsx index 2b02a2a1..0b4508ad 100644 --- a/src/views/room/widgets/furniture/high-score/FurnitureHighScoreView.tsx +++ b/src/views/room/widgets/furniture/high-score/FurnitureHighScoreView.tsx @@ -1,4 +1,4 @@ -import { NitroEvent, RoomEngineTriggerWidgetEvent } from 'nitro-renderer'; +import { NitroEvent, RoomEngineTriggerWidgetEvent } from '@nitrots/nitro-renderer'; import { FC } from 'react'; import { useRoomEngineEvent } from '../../../../../hooks/events/nitro/room/room-engine-event'; import { useRoomContext } from '../../../context/RoomContext'; diff --git a/src/views/room/widgets/furniture/manipulation-menu/FurnitureManipulationMenuView.tsx b/src/views/room/widgets/furniture/manipulation-menu/FurnitureManipulationMenuView.tsx index a4439b5b..c4a39321 100644 --- a/src/views/room/widgets/furniture/manipulation-menu/FurnitureManipulationMenuView.tsx +++ b/src/views/room/widgets/furniture/manipulation-menu/FurnitureManipulationMenuView.tsx @@ -1,4 +1,4 @@ -import { RoomObjectOperationType } from 'nitro-renderer'; +import { RoomObjectOperationType } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { ProcessRoomObjectOperation } from '../../../../../api'; import { CreateEventDispatcherHook } from '../../../../../hooks/events/event-dispatcher.base'; diff --git a/src/views/room/widgets/furniture/mannequin/FurnitureMannequinView.tsx b/src/views/room/widgets/furniture/mannequin/FurnitureMannequinView.tsx index 3c31b0a9..b052fefc 100644 --- a/src/views/room/widgets/furniture/mannequin/FurnitureMannequinView.tsx +++ b/src/views/room/widgets/furniture/mannequin/FurnitureMannequinView.tsx @@ -1,4 +1,4 @@ -import { AvatarFigurePartType, FurnitureMannequinSaveLookComposer, FurnitureMannequinSaveNameComposer, FurnitureMultiStateComposer, IAvatarFigureContainer, NitroEvent, RoomEngineTriggerWidgetEvent, RoomObjectVariable } from 'nitro-renderer'; +import { AvatarFigurePartType, FurnitureMannequinSaveLookComposer, FurnitureMannequinSaveNameComposer, FurnitureMultiStateComposer, IAvatarFigureContainer, NitroEvent, RoomEngineTriggerWidgetEvent, RoomObjectVariable } from '@nitrots/nitro-renderer'; import { FC, KeyboardEvent, useCallback, useEffect, useState } from 'react'; import { GetNitroInstance } from '../../../../../api'; import { GetRoomEngine } from '../../../../../api/nitro/room/GetRoomEngine'; diff --git a/src/views/room/widgets/furniture/present/FurniturePresentView.tsx b/src/views/room/widgets/furniture/present/FurniturePresentView.tsx index f3f11d51..3516185a 100644 --- a/src/views/room/widgets/furniture/present/FurniturePresentView.tsx +++ b/src/views/room/widgets/furniture/present/FurniturePresentView.tsx @@ -1,4 +1,4 @@ -import { NitroEvent, RoomEngineTriggerWidgetEvent } from 'nitro-renderer'; +import { NitroEvent, RoomEngineTriggerWidgetEvent } from '@nitrots/nitro-renderer'; import { FC } from 'react'; import { useRoomEngineEvent } from '../../../../../hooks/events/nitro/room/room-engine-event'; import { useRoomContext } from '../../../context/RoomContext'; diff --git a/src/views/room/widgets/furniture/stickie/FurnitureStickieView.tsx b/src/views/room/widgets/furniture/stickie/FurnitureStickieView.tsx index d6174681..e0bad98d 100644 --- a/src/views/room/widgets/furniture/stickie/FurnitureStickieView.tsx +++ b/src/views/room/widgets/furniture/stickie/FurnitureStickieView.tsx @@ -1,4 +1,4 @@ -import { NitroEvent, RoomEngineTriggerWidgetEvent, RoomObjectVariable } from 'nitro-renderer'; +import { NitroEvent, RoomEngineTriggerWidgetEvent, RoomObjectVariable } from '@nitrots/nitro-renderer'; import { FC, useCallback, useState } from 'react'; import { GetRoomEngine, GetRoomSession, GetSessionDataManager } from '../../../../../api'; import { CreateEventDispatcherHook } from '../../../../../hooks/events/event-dispatcher.base'; diff --git a/src/views/room/widgets/furniture/trophy/FurnitureTrophyView.tsx b/src/views/room/widgets/furniture/trophy/FurnitureTrophyView.tsx index 98b8c543..7ca92ae2 100644 --- a/src/views/room/widgets/furniture/trophy/FurnitureTrophyView.tsx +++ b/src/views/room/widgets/furniture/trophy/FurnitureTrophyView.tsx @@ -1,4 +1,4 @@ -import { NitroEvent, RoomEngineTriggerWidgetEvent, RoomObjectVariable } from 'nitro-renderer'; +import { NitroEvent, RoomEngineTriggerWidgetEvent, RoomObjectVariable } from '@nitrots/nitro-renderer'; import { FC, useCallback, useState } from 'react'; import { GetRoomEngine } from '../../../../../api'; import { CreateEventDispatcherHook } from '../../../../../hooks/events/event-dispatcher.base'; diff --git a/src/views/room/widgets/infostand/views/furni/InfoStandWidgetFurniView.tsx b/src/views/room/widgets/infostand/views/furni/InfoStandWidgetFurniView.tsx index 1f1ea49e..3fa4ef8b 100644 --- a/src/views/room/widgets/infostand/views/furni/InfoStandWidgetFurniView.tsx +++ b/src/views/room/widgets/infostand/views/furni/InfoStandWidgetFurniView.tsx @@ -1,4 +1,4 @@ -import { CrackableDataType, RoomControllerLevel, RoomWidgetEnumItemExtradataParameter, RoomWidgetFurniInfoUsagePolicyEnum, StringDataType } from 'nitro-renderer'; +import { CrackableDataType, RoomControllerLevel, RoomWidgetEnumItemExtradataParameter, RoomWidgetFurniInfoUsagePolicyEnum, StringDataType } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { CreateLinkEvent } from '../../../../../../api'; import { LocalizeText } from '../../../../../../utils/LocalizeText'; diff --git a/src/views/room/widgets/infostand/views/rentable-bot/InfoStandWidgetRentableBotView.tsx b/src/views/room/widgets/infostand/views/rentable-bot/InfoStandWidgetRentableBotView.tsx index ffa24a0a..202117fd 100644 --- a/src/views/room/widgets/infostand/views/rentable-bot/InfoStandWidgetRentableBotView.tsx +++ b/src/views/room/widgets/infostand/views/rentable-bot/InfoStandWidgetRentableBotView.tsx @@ -1,4 +1,4 @@ -import { BotRemoveComposer } from 'nitro-renderer'; +import { BotRemoveComposer } from '@nitrots/nitro-renderer'; import { FC, useCallback, useMemo } from 'react'; import { SendMessageHook } from '../../../../../../hooks/messages'; import { LocalizeText } from '../../../../../../utils/LocalizeText'; diff --git a/src/views/room/widgets/infostand/views/user/InfoStandWidgetUserView.tsx b/src/views/room/widgets/infostand/views/user/InfoStandWidgetUserView.tsx index 237b70ff..5d8b3cb5 100644 --- a/src/views/room/widgets/infostand/views/user/InfoStandWidgetUserView.tsx +++ b/src/views/room/widgets/infostand/views/user/InfoStandWidgetUserView.tsx @@ -1,4 +1,4 @@ -import { RoomSessionUserBadgesEvent } from 'nitro-renderer'; +import { RoomSessionUserBadgesEvent } from '@nitrots/nitro-renderer'; import { FC, FocusEvent, KeyboardEvent, useCallback, useEffect, useState } from 'react'; import { CreateEventDispatcherHook } from '../../../../../../hooks/events'; import { LocalizeText } from '../../../../../../utils/LocalizeText'; diff --git a/src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.tsx b/src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.tsx index 3aa7c760..9f5fe6b9 100644 --- a/src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.tsx +++ b/src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.tsx @@ -1,4 +1,4 @@ -import { NitroRectangle } from 'nitro-renderer'; +import { NitroRectangle } from '@nitrots/nitro-renderer'; import { FC, useCallback, useRef } from 'react'; import { GetRoomEngine, GetRoomSession } from '../../../../../../api'; import { DraggableWindow } from '../../../../../../layout'; diff --git a/src/views/room/widgets/room-tools/RoomToolsWidgetView.tsx b/src/views/room/widgets/room-tools/RoomToolsWidgetView.tsx index f76dbd04..70d510f1 100644 --- a/src/views/room/widgets/room-tools/RoomToolsWidgetView.tsx +++ b/src/views/room/widgets/room-tools/RoomToolsWidgetView.tsx @@ -1,5 +1,5 @@ +import { RoomLikeRoomComposer } from '@nitrots/nitro-renderer'; import classNames from 'classnames'; -import { RoomLikeRoomComposer } from 'nitro-renderer'; import { FC, useCallback, useState } from 'react'; import { NavigatorEvent } from '../../../../events'; import { dispatchUiEvent } from '../../../../hooks/events'; diff --git a/src/views/shared/avatar-image/AvatarImageView.tsx b/src/views/shared/avatar-image/AvatarImageView.tsx index 40377a63..a2a5ab56 100644 --- a/src/views/shared/avatar-image/AvatarImageView.tsx +++ b/src/views/shared/avatar-image/AvatarImageView.tsx @@ -1,4 +1,4 @@ -import { AvatarScaleType, AvatarSetType } from 'nitro-renderer'; +import { AvatarScaleType, AvatarSetType } from '@nitrots/nitro-renderer'; import { FC, useEffect, useState } from 'react'; import { GetAvatarRenderManager } from '../../../api'; import { AvatarImageViewProps } from './AvatarImageView.types'; diff --git a/src/views/shared/furni-image/FurniImageView.tsx b/src/views/shared/furni-image/FurniImageView.tsx index b8378954..e73bfa84 100644 --- a/src/views/shared/furni-image/FurniImageView.tsx +++ b/src/views/shared/furni-image/FurniImageView.tsx @@ -1,4 +1,4 @@ -import { IGetImageListener, ImageResult, TextureUtils, Vector3d } from 'nitro-renderer'; +import { IGetImageListener, ImageResult, TextureUtils, Vector3d } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { GetRoomEngine } from '../../../api'; import { ProductTypeEnum } from '../../catalog/common/ProductTypeEnum'; diff --git a/src/views/shared/pet-image/PetImageView.tsx b/src/views/shared/pet-image/PetImageView.tsx index 4f3f61bd..62956c15 100644 --- a/src/views/shared/pet-image/PetImageView.tsx +++ b/src/views/shared/pet-image/PetImageView.tsx @@ -1,4 +1,4 @@ -import { PetFigureData, TextureUtils, Vector3d } from 'nitro-renderer'; +import { PetFigureData, TextureUtils, Vector3d } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { GetRoomEngine } from '../../../api'; import { PetImageViewProps } from './PetImageView.types'; diff --git a/src/views/shared/pet-image/PetImageView.types.ts b/src/views/shared/pet-image/PetImageView.types.ts index 4acd4ac5..34fdfe0e 100644 --- a/src/views/shared/pet-image/PetImageView.types.ts +++ b/src/views/shared/pet-image/PetImageView.types.ts @@ -1,4 +1,4 @@ -import { PetCustomPart } from 'nitro-renderer'; +import { PetCustomPart } from '@nitrots/nitro-renderer'; export interface PetImageViewProps { diff --git a/src/views/shared/room-previewer/RoomPreviewerView.tsx b/src/views/shared/room-previewer/RoomPreviewerView.tsx index d7894d54..d30bdb54 100644 --- a/src/views/shared/room-previewer/RoomPreviewerView.tsx +++ b/src/views/shared/room-previewer/RoomPreviewerView.tsx @@ -1,4 +1,4 @@ -import { ColorConverter, IRoomRenderingCanvas, TextureUtils } from 'nitro-renderer'; +import { ColorConverter, IRoomRenderingCanvas, TextureUtils } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useRef, useState } from 'react'; import { GetNitroInstance } from '../../../api'; import { RoomPreviewerViewProps } from './RoomPreviewerView.types'; diff --git a/src/views/shared/room-previewer/RoomPreviewerView.types.ts b/src/views/shared/room-previewer/RoomPreviewerView.types.ts index 9a3bb643..85dfd5d5 100644 --- a/src/views/shared/room-previewer/RoomPreviewerView.types.ts +++ b/src/views/shared/room-previewer/RoomPreviewerView.types.ts @@ -1,4 +1,4 @@ -import { RoomPreviewer } from 'nitro-renderer'; +import { RoomPreviewer } from '@nitrots/nitro-renderer'; export interface RoomPreviewerViewProps { diff --git a/src/views/toolbar/ToolbarView.tsx b/src/views/toolbar/ToolbarView.tsx index 97e654eb..0fcd77a0 100644 --- a/src/views/toolbar/ToolbarView.tsx +++ b/src/views/toolbar/ToolbarView.tsx @@ -1,4 +1,4 @@ -import { DesktopViewComposer, Dispose, DropBounce, EaseOut, JumpBy, Motions, NitroToolbarAnimateIconEvent, Queue, UserFigureEvent, UserInfoDataParser, UserInfoEvent, Wait } from 'nitro-renderer'; +import { DesktopViewComposer, Dispose, DropBounce, EaseOut, JumpBy, Motions, NitroToolbarAnimateIconEvent, Queue, UserFigureEvent, UserInfoDataParser, UserInfoEvent, Wait } from '@nitrots/nitro-renderer'; import { FC, useCallback, useState } from 'react'; import { GetRoomSession, GetRoomSessionManager } from '../../api'; import { AvatarEditorEvent, CatalogEvent, FriendListEvent, InventoryEvent, NavigatorEvent, RoomWidgetCameraEvent } from '../../events'; diff --git a/src/views/toolbar/me/ToolbarMeView.tsx b/src/views/toolbar/me/ToolbarMeView.tsx index e77e7489..37228c04 100644 --- a/src/views/toolbar/me/ToolbarMeView.tsx +++ b/src/views/toolbar/me/ToolbarMeView.tsx @@ -1,4 +1,4 @@ -import { MouseEventType } from 'nitro-renderer'; +import { MouseEventType } from '@nitrots/nitro-renderer'; import { FC, useEffect, useRef } from 'react'; import { ToolbarViewItems } from '../ToolbarView.types'; import { ToolbarMeViewProps } from './ToolbarMeView.types'; diff --git a/src/views/wired/WiredMessageHandler.tsx b/src/views/wired/WiredMessageHandler.tsx index 601e81a6..c2887290 100644 --- a/src/views/wired/WiredMessageHandler.tsx +++ b/src/views/wired/WiredMessageHandler.tsx @@ -1,4 +1,4 @@ -import { WiredFurniActionEvent, WiredFurniConditionEvent, WiredFurniTriggerEvent, WiredOpenEvent, WiredRewardResultMessageEvent, WiredSaveSuccessEvent, WiredValidationErrorEvent } from 'nitro-renderer'; +import { WiredFurniActionEvent, WiredFurniConditionEvent, WiredFurniTriggerEvent, WiredOpenEvent, WiredRewardResultMessageEvent, WiredSaveSuccessEvent, WiredValidationErrorEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback } from 'react'; import { CreateMessageHook } from '../../hooks/messages'; import { useWiredContext } from './context/WiredContext'; diff --git a/src/views/wired/WiredView.tsx b/src/views/wired/WiredView.tsx index b9517011..245d26d3 100644 --- a/src/views/wired/WiredView.tsx +++ b/src/views/wired/WiredView.tsx @@ -1,4 +1,4 @@ -import { ConditionDefinition, Triggerable, TriggerDefinition, UpdateActionMessageComposer, UpdateConditionMessageComposer, UpdateTriggerMessageComposer, WiredActionDefinition } from 'nitro-renderer'; +import { ConditionDefinition, Triggerable, TriggerDefinition, UpdateActionMessageComposer, UpdateConditionMessageComposer, UpdateTriggerMessageComposer, WiredActionDefinition } from '@nitrots/nitro-renderer'; import { FC, useCallback, useMemo, useState } from 'react'; import { WiredEvent } from '../../events'; import { useUiEvent } from '../../hooks/events'; diff --git a/src/views/wired/common/GetWiredLayout.tsx b/src/views/wired/common/GetWiredLayout.tsx index 25d7fc34..f4730eb7 100644 --- a/src/views/wired/common/GetWiredLayout.tsx +++ b/src/views/wired/common/GetWiredLayout.tsx @@ -1,4 +1,4 @@ -import { ConditionDefinition, Triggerable, TriggerDefinition, WiredActionDefinition } from 'nitro-renderer'; +import { ConditionDefinition, Triggerable, TriggerDefinition, WiredActionDefinition } from '@nitrots/nitro-renderer'; import { GetWiredActionLayout } from './GetWiredActionLayout'; import { GetWiredConditionLayout } from './GetWiredConditionLayout'; import { GetWiredTriggerLayout } from './GetWiredTriggerLayout'; diff --git a/src/views/wired/common/WiredSelectionFilter.ts b/src/views/wired/common/WiredSelectionFilter.ts index 0ae889df..b0b5ae32 100644 --- a/src/views/wired/common/WiredSelectionFilter.ts +++ b/src/views/wired/common/WiredSelectionFilter.ts @@ -1,4 +1,4 @@ -import { ColorConverter, NitroFilter } from 'nitro-renderer'; +import { ColorConverter, NitroFilter } from '@nitrots/nitro-renderer'; const vertex = ` attribute vec2 aVertexPosition; diff --git a/src/views/wired/common/WiredSelectionVisualizer.ts b/src/views/wired/common/WiredSelectionVisualizer.ts index 283c089a..527a246c 100644 --- a/src/views/wired/common/WiredSelectionVisualizer.ts +++ b/src/views/wired/common/WiredSelectionVisualizer.ts @@ -1,4 +1,4 @@ -import { IRoomObject, IRoomObjectSpriteVisualization, NitroFilter, RoomObjectCategory } from 'nitro-renderer'; +import { IRoomObject, IRoomObjectSpriteVisualization, NitroFilter, RoomObjectCategory } from '@nitrots/nitro-renderer'; import { GetRoomEngine } from '../../../api'; import { WiredSelectionFilter } from './WiredSelectionFilter'; diff --git a/src/views/wired/context/WiredContext.types.ts b/src/views/wired/context/WiredContext.types.ts index 18e9c5ae..36d0f888 100644 --- a/src/views/wired/context/WiredContext.types.ts +++ b/src/views/wired/context/WiredContext.types.ts @@ -1,4 +1,4 @@ -import { Triggerable } from 'nitro-renderer'; +import { Triggerable } from '@nitrots/nitro-renderer'; import { Dispatch, ProviderProps, SetStateAction } from 'react'; export interface IWiredContext diff --git a/src/views/wired/views/actions/base/WiredActionBaseView.tsx b/src/views/wired/views/actions/base/WiredActionBaseView.tsx index c88c3b00..cecd0b5b 100644 --- a/src/views/wired/views/actions/base/WiredActionBaseView.tsx +++ b/src/views/wired/views/actions/base/WiredActionBaseView.tsx @@ -1,4 +1,4 @@ -import { WiredActionDefinition } from 'nitro-renderer'; +import { WiredActionDefinition } from '@nitrots/nitro-renderer'; import Slider from 'rc-slider'; import { FC, useCallback, useEffect, useState } from 'react'; import { LocalizeText } from '../../../../../utils/LocalizeText'; diff --git a/src/views/wired/views/triggers/execute-periodically-long/WiredTriggerExecutePeriodicallyLongView.tsx b/src/views/wired/views/triggers/execute-periodically-long/WiredTriggerExecutePeriodicallyLongView.tsx index 6cf75704..5a444837 100644 --- a/src/views/wired/views/triggers/execute-periodically-long/WiredTriggerExecutePeriodicallyLongView.tsx +++ b/src/views/wired/views/triggers/execute-periodically-long/WiredTriggerExecutePeriodicallyLongView.tsx @@ -1,4 +1,4 @@ -import { FriendlyTime } from 'nitro-renderer'; +import { FriendlyTime } from '@nitrots/nitro-renderer'; import Slider from 'rc-slider/lib/Slider'; import { FC, useCallback, useEffect, useState } from 'react'; import { LocalizeText } from '../../../../../utils/LocalizeText'; From 47c0ab6c443853e525c0263b3d5e05a4b66c9f12 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 5 Aug 2021 23:43:59 -0400 Subject: [PATCH 36/66] Update more dependencies --- package-lock.json | 157 ++++++++++++++++------------------------------ package.json | 18 +++--- 2 files changed, 60 insertions(+), 115 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5fdd9491..8c86d5d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3704,6 +3704,7 @@ "version": "7.31.2", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-7.31.2.tgz", "integrity": "sha512-3UqjCpey6HiTZT92vODYLPxTBWlM8ZOOjr3LX5F37/VRipW2M1kX6I/Cm4VXzteZqfGfagg8yXywpcOgQBlNsQ==", + "dev": true, "requires": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", @@ -3719,14 +3720,16 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "requires": { "color-convert": "^2.0.1" } }, "chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -3736,6 +3739,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "requires": { "color-name": "~1.1.4" } @@ -3743,17 +3747,20 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "requires": { "has-flag": "^4.0.0" } @@ -3764,6 +3771,7 @@ "version": "5.14.1", "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.14.1.tgz", "integrity": "sha512-dfB7HVIgTNCxH22M1+KU6viG5of2ldoA5ly8Ar8xkezKHKXjRvznCdbMbqjYGgO2xjRbwnR+rR8MLUIqF3kKbQ==", + "dev": true, "requires": { "@babel/runtime": "^7.9.2", "@types/testing-library__jest-dom": "^5.9.1", @@ -3780,6 +3788,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "requires": { "color-convert": "^2.0.1" } @@ -3788,6 +3797,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -3797,6 +3807,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "requires": { "color-name": "~1.1.4" } @@ -3804,12 +3815,14 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "css": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz", "integrity": "sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==", + "dev": true, "requires": { "inherits": "^2.0.4", "source-map": "^0.6.1", @@ -3819,17 +3832,20 @@ "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true }, "source-map-resolve": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz", "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==", + "dev": true, "requires": { "atob": "^2.1.2", "decode-uri-component": "^0.2.0" @@ -3839,6 +3855,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "requires": { "has-flag": "^4.0.0" } @@ -3849,6 +3866,7 @@ "version": "11.2.7", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.2.7.tgz", "integrity": "sha512-tzRNp7pzd5QmbtXNG/mhdcl7Awfu/Iz1RaVHY75zTdOkmHCuzMhRL83gWHSgOAcjS3CCbyfwUHMZgRJb4kAfpA==", + "dev": true, "requires": { "@babel/runtime": "^7.12.5", "@testing-library/dom": "^7.28.1" @@ -3858,6 +3876,7 @@ "version": "12.8.3", "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-12.8.3.tgz", "integrity": "sha512-IR0iWbFkgd56Bu5ZI/ej8yQwrkCv8Qydx6RzwbKz9faXazR/+5tvYKsZQgyXJiwgpcva127YO6JcWy7YlCfofQ==", + "dev": true, "requires": { "@babel/runtime": "^7.12.5" } @@ -3870,7 +3889,8 @@ "@types/aria-query": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.2.tgz", - "integrity": "sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig==" + "integrity": "sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig==", + "dev": true }, "@types/babel__core": { "version": "7.1.14", @@ -3940,15 +3960,6 @@ "@types/node": "*" } }, - "@types/hoist-non-react-statics": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", - "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", - "requires": { - "@types/react": "*", - "hoist-non-react-statics": "^3.3.0" - } - }, "@types/html-minifier-terser": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz", @@ -3984,6 +3995,7 @@ "version": "26.0.24", "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.24.tgz", "integrity": "sha512-E/X5Vib8BWqZNRlDxj9vYXhsDwPYbPINqKF9BsnSoon4RQ0D9moEuLD8txgyypFLH7J4+Lho9Nr/c8H0Fi+17w==", + "dev": true, "requires": { "jest-diff": "^26.0.0", "pretty-format": "^26.0.0" @@ -4005,9 +4017,9 @@ "integrity": "sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA==" }, "@types/node": { - "version": "12.20.16", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.16.tgz", - "integrity": "sha512-6CLxw83vQf6DKqXxMPwl8qpF8I7THFZuIwLt4TnNsumxkp1VsRZWT8txQxncT/Rl2UojTsFzWgDG4FRMwafrlA==" + "version": "12.20.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.19.tgz", + "integrity": "sha512-niAuZrwrjKck4+XhoCw6AAVQBENHftpXw9F4ryk66fTgYaKQ53R4FI7c9vUGGw5vQis1HKBHDR1gcYI/Bq1xvw==" }, "@types/normalize-package-data": { "version": "2.4.0", @@ -4035,9 +4047,9 @@ "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==" }, "@types/react": { - "version": "17.0.14", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.14.tgz", - "integrity": "sha512-0WwKHUbWuQWOce61UexYuWTGuGY/8JvtUe/dtQ6lR4sZ3UiylHotJeWpf3ArP9+DSGUoLY3wbU59VyMrJps5VQ==", + "version": "17.0.15", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.15.tgz", + "integrity": "sha512-uTKHDK9STXFHLaKv6IMnwp52fm0hwU+N89w/p9grdUqcFA6WuqDyPhaWopbNyE1k/VhgzmHl8pu1L4wITtmlLw==", "requires": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -4048,21 +4060,11 @@ "version": "17.0.9", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.9.tgz", "integrity": "sha512-wIvGxLfgpVDSAMH5utdL9Ngm5Owu0VsGmldro3ORLXV8CShrL8awVj06NuEXFQ5xyaYfdca7Sgbk/50Ri1GdPg==", + "dev": true, "requires": { "@types/react": "*" } }, - "@types/react-redux": { - "version": "7.1.18", - "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.18.tgz", - "integrity": "sha512-9iwAsPyJ9DLTRH+OFeIrm9cAbIj1i2ANL3sKQFATqnPWRbg+jEFXyZOKHiQK/N86pNRXbb4HRxAxo0SIX1XwzQ==", - "requires": { - "@types/hoist-non-react-statics": "^3.3.0", - "@types/react": "*", - "hoist-non-react-statics": "^3.3.0", - "redux": "^4.0.0" - } - }, "@types/react-slider": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/@types/react-slider/-/react-slider-1.3.1.tgz", @@ -4109,9 +4111,10 @@ "integrity": "sha512-0VBprVqfgFD7Ehb2vd8Lh9TG3jP98gvr8rgehQqzztZNI7o8zS8Ad4jyZneKELphpuE212D8J70LnSNQSyO6bQ==" }, "@types/testing-library__jest-dom": { - "version": "5.14.0", - "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.0.tgz", - "integrity": "sha512-l2P2GO+hFF4Liye+fAajT1qBqvZOiL79YMpEvgGs1xTK7hECxBI8Wz4J7ntACJNiJ9r0vXQqYovroXRLPDja6A==", + "version": "5.14.1", + "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.1.tgz", + "integrity": "sha512-Gk9vaXfbzc5zCXI9eYE9BI5BNHEp4D3FWjgqBE/ePGYElLAP+KvxBcsdkwfIVvezs605oiyd/VrpiHe3Oeg+Aw==", + "dev": true, "requires": { "@types/jest": "*" } @@ -6452,7 +6455,8 @@ "css.escape": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", - "integrity": "sha1-QuJ9T6BK4y+TGktNQZH6nN3ul8s=" + "integrity": "sha1-QuJ9T6BK4y+TGktNQZH6nN3ul8s=", + "dev": true }, "cssdb": { "version": "4.4.0", @@ -6960,9 +6964,10 @@ } }, "dom-accessibility-api": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.6.tgz", - "integrity": "sha512-DplGLZd8L1lN64jlT27N9TVSESFR5STaEJvX+thCby7fuCHonfPpAlodYc3vuUYbDuDec5w8AMP7oCM5TWFsqw==" + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.7.tgz", + "integrity": "sha512-ml3lJIq9YjUfM9TUnEPvEYWFSwivwIGBPKpewX7tii7fwCazA8yCioGdqQcNsItPpfFvSJ3VIdMQPj60LJhcQA==", + "dev": true }, "dom-align": { "version": "1.12.2", @@ -9102,14 +9107,6 @@ "minimalistic-crypto-utils": "^1.0.1" } }, - "hoist-non-react-statics": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", - "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", - "requires": { - "react-is": "^16.7.0" - } - }, "hoopy": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", @@ -9473,11 +9470,6 @@ "resolved": "https://registry.npmjs.org/immer/-/immer-8.0.1.tgz", "integrity": "sha512-aqXhGP7//Gui2+UrEtvxZxSquQVXTpZ7KDxfCcKAF3Vysvw0CViVaW9RZ1j1xlIYqaaaipBoqdqeibkc18PNvA==" }, - "immutable": { - "version": "4.0.0-rc.14", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0-rc.14.tgz", - "integrity": "sha512-pfkvmRKJSoW7JFx0QeYlAmT+kNYvn5j0u7bnpNq4N2RCvHSTlLT208G8jgaquNe+Q8kCPHKOSpxJkyvLDpYq0w==" - }, "import-cwd": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz", @@ -11836,7 +11828,8 @@ "lz-string": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", - "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=" + "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=", + "dev": true }, "magic-string": { "version": "0.25.7", @@ -12140,7 +12133,8 @@ "min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==" + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true }, "mini-css-extract-plugin": { "version": "0.11.3", @@ -14681,15 +14675,6 @@ "whatwg-fetch": "^3.4.1" } }, - "react-async-script": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/react-async-script/-/react-async-script-1.2.0.tgz", - "integrity": "sha512-bCpkbm9JiAuMGhkqoAiC0lLkb40DJ0HOEJIku+9JDjxX3Rcs+ztEOG13wbrOskt3n2DTrjshhaQ/iay+SnGg5Q==", - "requires": { - "hoist-non-react-statics": "^3.3.0", - "prop-types": "^15.5.0" - } - }, "react-bootstrap": { "version": "2.0.0-beta.2", "resolved": "https://registry.npmjs.org/react-bootstrap/-/react-bootstrap-2.0.0-beta.2.tgz", @@ -14863,23 +14848,6 @@ "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.9.tgz", "integrity": "sha512-nQTTcUu+ATDbrSD1BZHr5kgSD4oF8OFjxun8uAaL8RwPBacGBNPf/yAuVVdx17N8XNzRDMrZ9XcKZHCjPW+9ew==" }, - "react-google-recaptcha": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/react-google-recaptcha/-/react-google-recaptcha-2.1.0.tgz", - "integrity": "sha512-K9jr7e0CWFigi8KxC3WPvNqZZ47df2RrMAta6KmRoE4RUi7Ys6NmNjytpXpg4HI/svmQJLKR+PncEPaNJ98DqQ==", - "requires": { - "prop-types": "^15.5.0", - "react-async-script": "^1.1.1" - } - }, - "react-input-autosize": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/react-input-autosize/-/react-input-autosize-3.0.0.tgz", - "integrity": "sha512-nL9uS7jEs/zu8sqwFE5MAPx6pPkNAriACQ2rGLlqmKr2sPGtN7TXTyDdQt4lbNXVx7Uzadb40x8qotIuru6Rhg==", - "requires": { - "prop-types": "^15.5.8" - } - }, "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -14905,19 +14873,6 @@ "warning": "^4.0.3" } }, - "react-redux": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.4.tgz", - "integrity": "sha512-hOQ5eOSkEJEXdpIKbnRyl04LhaWabkDPV+Ix97wqQX3T3d2NQ8DUblNXXtNMavc7DpswyQM6xfaN4HQDKNY2JA==", - "requires": { - "@babel/runtime": "^7.12.1", - "@types/react-redux": "^7.1.16", - "hoist-non-react-statics": "^3.3.2", - "loose-envify": "^1.4.0", - "prop-types": "^15.7.2", - "react-is": "^16.13.1" - } - }, "react-refresh": { "version": "0.8.3", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.8.3.tgz", @@ -15115,19 +15070,12 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, "requires": { "indent-string": "^4.0.0", "strip-indent": "^3.0.0" } }, - "redux": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/redux/-/redux-4.1.0.tgz", - "integrity": "sha512-uI2dQN43zqLWCt6B/BMGRMY6db7TTY4qeHHfGeKb3EOhmOKjU3KdWvNLJyqaHRksv/ErdNH7cFZWg9jXtewy4g==", - "requires": { - "@babel/runtime": "^7.9.2" - } - }, "regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -16853,6 +16801,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, "requires": { "min-indent": "^1.0.0" } diff --git a/package.json b/package.json index 5398e1b2..8aa3854f 100644 --- a/package.json +++ b/package.json @@ -4,25 +4,14 @@ "private": true, "dependencies": { "@nitrots/nitro-renderer": "file:../nitro-renderer", - "@testing-library/jest-dom": "^5.14.1", - "@testing-library/react": "^11.2.7", - "@testing-library/user-event": "^12.8.3", - "@types/jest": "^26.0.24", - "@types/node": "^12.20.16", - "@types/react": "^17.0.14", - "@types/react-dom": "^17.0.9", "animate.css": "^4.1.1", "classnames": "^2.3.1", - "immutable": "^4.0.0-rc.14", "node-sass": "^5.0.0", "rc-slider": "^9.7.2", "react": "^17.0.2", "react-bootstrap": "^2.0.0-alpha.2", "react-dom": "^17.0.2", "react-draggable": "^4.4.3", - "react-google-recaptcha": "^2.1.0", - "react-input-autosize": "^3.0.0", - "react-redux": "^7.2.4", "react-scripts": "4.0.3", "react-slider": "^1.3.1", "react-transition-group": "^4.4.2", @@ -60,6 +49,13 @@ ] }, "devDependencies": { + "@testing-library/jest-dom": "^5.14.1", + "@testing-library/react": "^11.2.7", + "@testing-library/user-event": "^12.8.3", + "@types/jest": "^26.0.24", + "@types/node": "^12.20.19", + "@types/react": "^17.0.15", + "@types/react-dom": "^17.0.9", "@types/react-slider": "^1.3.1", "@types/react-transition-group": "^4.4.2" } From e85dd7cda87327d40e8db873ba034ea7e31f2e72 Mon Sep 17 00:00:00 2001 From: Dank074 Date: Sat, 7 Aug 2021 18:04:55 -0500 Subject: [PATCH 37/66] started room settings view --- .../user-settings/UserSettingsUIEvent.ts | 8 ++ src/views/main/MainView.tsx | 2 + src/views/purse/PurseView.tsx | 9 +- src/views/user-settings/UserSettingsView.tsx | 130 ++++++++++++++++++ 4 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 src/events/user-settings/UserSettingsUIEvent.ts create mode 100644 src/views/user-settings/UserSettingsView.tsx diff --git a/src/events/user-settings/UserSettingsUIEvent.ts b/src/events/user-settings/UserSettingsUIEvent.ts new file mode 100644 index 00000000..4ce30d88 --- /dev/null +++ b/src/events/user-settings/UserSettingsUIEvent.ts @@ -0,0 +1,8 @@ +import { NitroEvent } from '@nitrots/nitro-renderer'; + +export class UserSettingsUIEvent extends NitroEvent +{ + public static SHOW_USER_SETTINGS: string = 'NE_SHOW_USER_SETTINGS'; + public static HIDE_USER_SETTINGS: string = 'NE_HIDE_USER_SETTINGS'; + public static TOGGLE_USER_SETTINGS: string = 'NE_TOGGLE_USER_SETTINGS'; +} diff --git a/src/views/main/MainView.tsx b/src/views/main/MainView.tsx index eab47e1c..4b52836f 100644 --- a/src/views/main/MainView.tsx +++ b/src/views/main/MainView.tsx @@ -14,6 +14,7 @@ import { NotificationCenterView } from '../notification-center/NotificationCente import { RightSideView } from '../right-side/RightSideView'; import { RoomHostView } from '../room-host/RoomHostView'; import { ToolbarView } from '../toolbar/ToolbarView'; +import { UserSettingsView } from '../user-settings/UserSettingsView'; import { WiredView } from '../wired/WiredView'; import { MainViewProps } from './MainView.types'; @@ -60,6 +61,7 @@ export const MainView: FC = props => +
); } diff --git a/src/views/purse/PurseView.tsx b/src/views/purse/PurseView.tsx index 8d7ae11c..6737f28a 100644 --- a/src/views/purse/PurseView.tsx +++ b/src/views/purse/PurseView.tsx @@ -1,6 +1,8 @@ import { FriendlyTime, HabboClubLevelEnum, UserCurrencyComposer, UserSubscriptionComposer } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useMemo, useState } from 'react'; import { GetConfiguration } from '../../api'; +import { UserSettingsUIEvent } from '../../events/user-settings/UserSettingsUIEvent'; +import { dispatchUiEvent } from '../../hooks'; import { SendMessageHook } from '../../hooks/messages/message-event'; import { LocalizeText } from '../../utils/LocalizeText'; import { CurrencyIcon } from '../shared/currency-icon/CurrencyIcon'; @@ -18,6 +20,11 @@ export const PurseView: FC<{}> = props => const [ purse, setPurse ] = useState(new Purse()); const [ updateId, setUpdateId ] = useState(-1); + const handleUserSettingsClick = useCallback(() => + { + dispatchUiEvent(new UserSettingsUIEvent(UserSettingsUIEvent.TOGGLE_USER_SETTINGS)); + }, []); + const displayedCurrencies = useMemo(() => { return GetConfiguration('system.currency.types', []); @@ -130,7 +137,7 @@ export const PurseView: FC<{}> = props =>
-
+
diff --git a/src/views/user-settings/UserSettingsView.tsx b/src/views/user-settings/UserSettingsView.tsx new file mode 100644 index 00000000..61523f33 --- /dev/null +++ b/src/views/user-settings/UserSettingsView.tsx @@ -0,0 +1,130 @@ +import { NitroSettingsEvent, UserSettingsCameraFollowComposer, UserSettingsEvent, UserSettingsOldChatComposer, UserSettingsRoomInvitesComposer } from '@nitrots/nitro-renderer'; +import { FC, useCallback, useState } from 'react'; +import { UserSettingsUIEvent } from '../../events/user-settings/UserSettingsUIEvent'; +import { CreateMessageHook, dispatchMainEvent, SendMessageHook, useUiEvent } from '../../hooks'; +import { NitroCardContentView, NitroCardHeaderView } from '../../layout'; +import { NitroCardView } from '../../layout/card/NitroCardView'; +import { LocalizeText } from '../../utils'; + +export const UserSettingsView: FC<{}> = props => +{ + const [isVisible, setIsVisible] = useState(false); + const [useOldChat, setUseOldChat] = useState(false); + const [allowRoomInvites, setAllowRoomInvites] = useState(false); + const [cameraFollowDisabled, setCameraFollowDisabled] = useState(false); + const [systemVolume, setSystemVolume] = useState(0); + const [furniVolume, setFurniVolume] = useState(0); + const [traxVolume, setTraxVolume] = useState(0); + const [flags, setFlags] = useState(0); + const [chatType, setChatType] = useState(0); + + const onUserSettingsUIEvent = useCallback((event: UserSettingsUIEvent) => + { + switch (event.type) + { + case UserSettingsUIEvent.SHOW_USER_SETTINGS: + setIsVisible(true); + return; + case UserSettingsUIEvent.HIDE_USER_SETTINGS: + setIsVisible(false); + return; + case UserSettingsUIEvent.TOGGLE_USER_SETTINGS: + setIsVisible(value => !value); + return; + } + }, []); + + useUiEvent(UserSettingsUIEvent.SHOW_USER_SETTINGS, onUserSettingsUIEvent); + useUiEvent(UserSettingsUIEvent.HIDE_USER_SETTINGS, onUserSettingsUIEvent); + useUiEvent(UserSettingsUIEvent.TOGGLE_USER_SETTINGS, onUserSettingsUIEvent); + + const updateUserSettings = useCallback(() => + { + const event = new NitroSettingsEvent(NitroSettingsEvent.SETTINGS_UPDATED); + event.flags = flags; + event.oldChat = useOldChat; + event.roomInvites = allowRoomInvites; + event.volumeFurni = furniVolume; + event.volumeSystem = systemVolume; + event.volumeTrax = traxVolume; + event.oldChat = useOldChat; + event.chatType = chatType + event.cameraFollow = cameraFollowDisabled; + dispatchMainEvent(event); + }, [allowRoomInvites, cameraFollowDisabled, chatType, flags, furniVolume, systemVolume, traxVolume, useOldChat]); + + const onUserSettingsEvent = useCallback((event: UserSettingsEvent) => + { + const parser = event.getParser(); + + setAllowRoomInvites(parser.roomInvites); + setCameraFollowDisabled(parser.cameraFollow); + setFurniVolume(parser.volumeFurni); + setSystemVolume(parser.volumeSystem); + setTraxVolume(parser.volumeTrax); + setUseOldChat(parser.oldChat); + setChatType(parser.chatType); + setFlags(parser.flags); + + updateUserSettings(); + console.log(parser); + }, [updateUserSettings]); + + CreateMessageHook(UserSettingsEvent, onUserSettingsEvent); + + const processAction = useCallback((type: string, value?: string | number | boolean) => + { + switch (type) + { + case 'close_view': + setIsVisible(false); + return; + case 'oldchat': + setUseOldChat(Boolean(value)); + SendMessageHook(new UserSettingsOldChatComposer(useOldChat)); + updateUserSettings(); + return; + case 'room_invites': + setAllowRoomInvites(Boolean(value)); + SendMessageHook(new UserSettingsRoomInvitesComposer(allowRoomInvites)); + updateUserSettings(); + return; + case 'camera_follow': + setCameraFollowDisabled(value as boolean); + SendMessageHook(new UserSettingsCameraFollowComposer(cameraFollowDisabled)); + updateUserSettings(); + console.log(value as boolean); + console.log(cameraFollowDisabled); + return; + } + }, [allowRoomInvites, cameraFollowDisabled, updateUserSettings, useOldChat]); + + if (!isVisible) return null; + + return ( +
+ + processAction('close_view')} /> + +
+ processAction('oldchat', event.target.checked)} /> + +
+
+ processAction('room_invites', event.target.checked)} /> + +
+
+ processAction('camera_follow', event.target.checked)} /> + +
+
{LocalizeText('widget.memenu.settings.volume')}
+
+ +
+ +
+
+
+ ); +} From a3350b8b54afeaa9ebe72ae4faacef471d9ba85a Mon Sep 17 00:00:00 2001 From: Bill Date: Sat, 7 Aug 2021 19:05:31 -0400 Subject: [PATCH 38/66] More camera changes --- .../room/widgets/camera/CameraWidgetView.scss | 57 +++- .../room/widgets/camera/CameraWidgetView.tsx | 4 +- .../camera/common/CameraPictureThumbnail.ts | 6 + .../context/CameraWidgetContext.types.ts | 10 +- .../views/editor/CameraWidgetEditorView.tsx | 260 +++++++----------- .../editor/CameraWidgetEditorView.types.ts | 2 + .../CameraWidgetEffectListItemView.tsx | 29 ++ .../CameraWidgetEffectListItemView.types.ts | 11 + .../CameraWidgetEffectListView.tsx | 21 ++ .../CameraWidgetEffectListView.types.ts | 11 + tsconfig.json | 3 +- 11 files changed, 240 insertions(+), 174 deletions(-) create mode 100644 src/views/room/widgets/camera/common/CameraPictureThumbnail.ts create mode 100644 src/views/room/widgets/camera/views/editor/effect-list-item/CameraWidgetEffectListItemView.tsx create mode 100644 src/views/room/widgets/camera/views/editor/effect-list-item/CameraWidgetEffectListItemView.types.ts create mode 100644 src/views/room/widgets/camera/views/editor/effect-list/CameraWidgetEffectListView.tsx create mode 100644 src/views/room/widgets/camera/views/editor/effect-list/CameraWidgetEffectListView.types.ts diff --git a/src/views/room/widgets/camera/CameraWidgetView.scss b/src/views/room/widgets/camera/CameraWidgetView.scss index 52844d70..244d7be6 100644 --- a/src/views/room/widgets/camera/CameraWidgetView.scss +++ b/src/views/room/widgets/camera/CameraWidgetView.scss @@ -87,6 +87,53 @@ .nitro-camera-editor { width: 600px; + .content-area { + min-height: 350px; + height: 350px; + resize: vertical; + + .picture-preview { + width: 320px; + height: 320px; + + .slider { + background: linear-gradient(180deg, transparent, black); + text-shadow: 1px 1px rgba(0, 0, 0, .5); + } + } + } + + .effect-grid { + + .grid-item-container { + height: 60px !important; + max-height: 60px !important; + + .grid-item { + overflow: unset; + + .remove-effect { + position: absolute; + top: -1px; + right: -1px; + padding: 2px; + font-size: 11px; + line-height: 11px; + min-height: unset; + } + + .effect-thumbnail-image { + + img { + width: 40px; + height: 40px; + image-rendering: auto; + } + } + } + } + } + .effects { height: 363px; min-height: 363px; @@ -117,16 +164,6 @@ } } } - - .picture-preview { - width: 320px; - height: 320px; - - .slider { - background: linear-gradient(180deg, transparent, black); - text-shadow: 1px 1px rgba(0, 0, 0, .5); - } - } } .nitro-camera-checkout { diff --git a/src/views/room/widgets/camera/CameraWidgetView.tsx b/src/views/room/widgets/camera/CameraWidgetView.tsx index a8e2ef3e..85b535b9 100644 --- a/src/views/room/widgets/camera/CameraWidgetView.tsx +++ b/src/views/room/widgets/camera/CameraWidgetView.tsx @@ -24,7 +24,7 @@ export const CameraWidgetView: FC<{}> = props => const [ selectedPictureIndex, setSelectedPictureIndex ] = useState(-1); const [ selectedEffects, setSelectedEffects ] = useState([]); const [ isZoomed, setIsZoomed ] = useState(false); - const [ myLevel, setMyLevel ] = useState(10); + const [ myLevel, setMyLevel ] = useState(1); const [ price, setPrice ] = useState<{ credits: number, duckets: number, publishDucketPrice: number }>(null); const onNitroEvent = useCallback((event: RoomWidgetCameraEvent) => @@ -111,7 +111,7 @@ export const CameraWidgetView: FC<{}> = props => return ( { (mode === MODE_CAPTURE) && processAction('close') } onEdit={ () => processAction('edit') } onDelete={ () => processAction('delete') } /> } - { (mode === MODE_EDITOR) && processAction('close') } onCancel={ () => processAction('editor_cancel') } onCheckout={ () => processAction('checkout') } availableEffects={ availableEffects } /> } + { (mode === MODE_EDITOR) && processAction('close') } onCancel={ () => processAction('editor_cancel') } onCheckout={ () => processAction('checkout') } availableEffects={ availableEffects } /> } { (mode === MODE_CHECKOUT) && processAction('close') } onCancelClick={ () => processAction('editor_cancel') } price={ price }> } ); diff --git a/src/views/room/widgets/camera/common/CameraPictureThumbnail.ts b/src/views/room/widgets/camera/common/CameraPictureThumbnail.ts new file mode 100644 index 00000000..d88f9dcd --- /dev/null +++ b/src/views/room/widgets/camera/common/CameraPictureThumbnail.ts @@ -0,0 +1,6 @@ +export class CameraPictureThumbnail +{ + constructor( + public effectName: string, + public thumbnailUrl: string) {} +} diff --git a/src/views/room/widgets/camera/context/CameraWidgetContext.types.ts b/src/views/room/widgets/camera/context/CameraWidgetContext.types.ts index 8c6c4d82..b162cbb7 100644 --- a/src/views/room/widgets/camera/context/CameraWidgetContext.types.ts +++ b/src/views/room/widgets/camera/context/CameraWidgetContext.types.ts @@ -1,17 +1,17 @@ import { IRoomCameraWidgetSelectedEffect } from '@nitrots/nitro-renderer'; -import { ProviderProps } from 'react'; +import { Dispatch, ProviderProps, SetStateAction } from 'react'; import { CameraPicture } from '../common/CameraPicture'; export interface ICameraWidgetContext { cameraRoll: CameraPicture[], - setCameraRoll: (cameraRoll: CameraPicture[]) => void, + setCameraRoll: Dispatch>; selectedPictureIndex: number, - setSelectedPictureIndex: (index: number) => void, + setSelectedPictureIndex: Dispatch>; selectedEffects: IRoomCameraWidgetSelectedEffect[], - setSelectedEffects: (selectedEffects: IRoomCameraWidgetSelectedEffect[]) => void, + setSelectedEffects: Dispatch>; isZoomed: boolean, - setIsZoomed: (isZoomed: boolean) => void + setIsZoomed: Dispatch>; } export interface CameraWidgetContextProps extends ProviderProps diff --git a/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.tsx b/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.tsx index cce2c55c..8cb13259 100644 --- a/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.tsx +++ b/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.tsx @@ -1,94 +1,85 @@ -import { RoomCameraWidgetSelectedEffect } from '@nitrots/nitro-renderer'; -import classNames from 'classnames'; -import { FC, useCallback, useEffect, useState } from 'react'; +import { IRoomCameraWidgetSelectedEffect, RoomCameraWidgetSelectedEffect } from '@nitrots/nitro-renderer'; +import { FC, useCallback, useEffect, useMemo, useState } from 'react'; import { GetRoomCameraWidgetManager } from '../../../../../../api'; import { NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from '../../../../../../layout'; import { LocalizeText } from '../../../../../../utils/LocalizeText'; -import { useCameraWidgetContext } from '../../context/CameraWidgetContext'; +import { CameraPictureThumbnail } from '../../common/CameraPictureThumbnail'; import { CameraWidgetEditorTabs, CameraWidgetEditorViewProps } from './CameraWidgetEditorView.types'; +import { CameraWidgetEffectListView } from './effect-list/CameraWidgetEffectListView'; const TABS: string[] = [ CameraWidgetEditorTabs.COLORMATRIX, CameraWidgetEditorTabs.COMPOSITE ]; export const CameraWidgetEditorView: FC = props => { - const { availableEffects = null, myLevel = 1, onClose = null, onCancel = null, onCheckout = null } = props; + const { picture = null, availableEffects = null, myLevel = 1, onClose = null, onCancel = null, onCheckout = null } = props; const [ currentTab, setCurrentTab ] = useState(TABS[0]); - const [ selectedEffectName, setSelectedEffectName ] = useState(null); - const [ effectsThumbnails, setEffectsThumbnails ] = useState<{ name: string, image: HTMLImageElement }[]>([]); - const { cameraRoll = null, selectedPictureIndex = -1, selectedEffects = null, isZoomed = false, setSelectedEffects = null, setIsZoomed = null } = useCameraWidgetContext(); + const [ selectedEffectName, setSelectedEffectName ] = useState(null); + const [ selectedEffects, setSelectedEffects ] = useState([]); + const [ effectsThumbnails, setEffectsThumbnails ] = useState([]); + const [ isZoomed, setIsZoomed ] = useState(false); - useEffect(() => + const getColorMatrixEffects = useMemo(() => { - const thumbnails = []; + return availableEffects.filter(effect => effect.colorMatrix); + }, [ availableEffects ]); - for(const effect of availableEffects) - { - thumbnails.push({name: effect.name, image: GetRoomCameraWidgetManager().applyEffects(cameraRoll[selectedPictureIndex].texture, [ new RoomCameraWidgetSelectedEffect(effect, 1) ], false)}); - } - - setEffectsThumbnails(thumbnails); - }, [ cameraRoll, selectedPictureIndex, availableEffects ]); - - const getEffectThumbnail = useCallback((effectName: string) => + const getCompositeEffects = useMemo(() => { - const search = effectsThumbnails.find(thumbnail => thumbnail.name === effectName); - - if(search) return search.image.src; - - return null; - }, [ effectsThumbnails ]); + return availableEffects.filter(effect => effect.texture); + }, [ availableEffects ]); const getEffectList = useCallback(() => { if(currentTab === CameraWidgetEditorTabs.COLORMATRIX) { - return availableEffects.filter(effect => effect.colorMatrix); + return getColorMatrixEffects; } - else - { - return availableEffects.filter(effect => effect.texture); - } - }, [ currentTab, availableEffects ]); - const getCurrentPicture = useCallback(() => + return getCompositeEffects; + }, [ currentTab, getColorMatrixEffects, getCompositeEffects ]); + + const getSelectedEffectIndex = useCallback((name: string) => { - return GetRoomCameraWidgetManager().applyEffects(cameraRoll[selectedPictureIndex].texture, selectedEffects, isZoomed); - }, [ cameraRoll, selectedPictureIndex, selectedEffects, isZoomed ]); + if(!name || !name.length || !selectedEffects || !selectedEffects.length) return -1; - const getCurrentEffectAlpha = useCallback(() => - { - if(!selectedEffectName) return 0; - - const selectedEffect = selectedEffects.find(effect => effect.effect.name === selectedEffectName); - - if(!selectedEffect) return 0; - - return selectedEffect.alpha; - }, [ selectedEffectName, selectedEffects ]); - - const getEffectIndex = useCallback((effectName) => - { - return selectedEffects.findIndex(effect => effect.effect.name === effectName); + return selectedEffects.findIndex(effect => (effect.effect.name === name)); }, [ selectedEffects ]) - const setSelectedEffectAlpha = useCallback((newAlpha: number) => + const getCurrentEffectIndex = useMemo(() => { - if(!selectedEffectName) return; + return getSelectedEffectIndex(selectedEffectName) + }, [ selectedEffectName, getSelectedEffectIndex ]) - const selectedEffectIndex = getEffectIndex(selectedEffectName); + const getCurrentEffect = useMemo(() => + { + if(!selectedEffectName) return null; - if(selectedEffectIndex === -1) return; + return (selectedEffects[getCurrentEffectIndex] || null); + }, [ selectedEffectName, getCurrentEffectIndex, selectedEffects ]); - const clone = Array.from(selectedEffects); + const setCurrentEffectAlpha = useCallback((alpha: number) => + { + const index = getCurrentEffectIndex; - const selectedEffect = clone[selectedEffectIndex]; + if(index === -1) return; - clone[selectedEffectIndex] = new RoomCameraWidgetSelectedEffect(selectedEffect.effect, newAlpha); + setSelectedEffects(prevValue => + { + const clone = [ ...prevValue ]; + const currentEffect = clone[index]; - setSelectedEffects(clone); - }, [ selectedEffectName, getEffectIndex, selectedEffects, setSelectedEffects ]); + clone[getCurrentEffectIndex] = new RoomCameraWidgetSelectedEffect(currentEffect.effect, alpha); - const processAction = useCallback((type: string, value: string | number = null) => + return clone; + }); + }, [ getCurrentEffectIndex, setSelectedEffects ]); + + const getCurrentPictureUrl = useMemo(() => + { + return GetRoomCameraWidgetManager().applyEffects(picture.texture, selectedEffects, isZoomed).src; + }, [ picture, selectedEffects, isZoomed ]); + + const processAction = useCallback((type: string, effectName: string = null) => { switch(type) { @@ -102,131 +93,88 @@ export const CameraWidgetEditorView: FC = props => onCheckout(); return; case 'change_tab': - setCurrentTab(String(value)); + setCurrentTab(String(effectName)); return; - case 'select_effect': - { - let existingIndex = -1; + case 'select_effect': { + let existingIndex = getSelectedEffectIndex(effectName); - if(selectedEffects.length > 0) - { - existingIndex = getEffectIndex(value); - } - - let effect = null; + if(existingIndex >= 0) return; + + const effect = availableEffects.find(effect => (effect.name === effectName)); - if(existingIndex === -1) - { - effect = availableEffects.find(effect => effect.name === value); - - if(effect.minLevel > myLevel) return; - - setSelectedEffects([...selectedEffects, new RoomCameraWidgetSelectedEffect(effect, 0.5)]); - } - - if(effect && effect.minLevel > myLevel) return; + if(!effect) return; - if(selectedEffectName !== value) + setSelectedEffects(prevValue => { - setSelectedEffectName(value); - } - else - { - setSelectedEffectName(null); - } - } + return [ ...prevValue, new RoomCameraWidgetSelectedEffect(effect, 1) ]; + }); + + setSelectedEffectName(effect.name); return; - case 'remove_effect': - { - const existingIndex = getEffectIndex(value); + } + case 'remove_effect': { + let existingIndex = getSelectedEffectIndex(effectName); - if(existingIndex > -1) + if(existingIndex === -1) return; + + setSelectedEffects(prevValue => { - const effect = selectedEffects[existingIndex]; + const clone = [ ...prevValue ]; - if(effect.effect.name === selectedEffectName) - { - setSelectedEffectName(null); - } - - const clone = Array.from(selectedEffects); clone.splice(existingIndex, 1); - - setSelectedEffects(clone); - } - } + + return clone; + }); + + if(selectedEffectName === effectName) setSelectedEffectName(null); return; + } case 'clear_effects': setSelectedEffectName(null); setSelectedEffects([]); return; case 'download': - window.open(getCurrentPicture().src, '_blank'); + //window.open(getCurrentPicture().src, '_blank'); return; case 'zoom': setIsZoomed(!isZoomed); return; } - }, [ onClose, onCancel, onCheckout, getCurrentPicture, myLevel, selectedEffectName, getEffectIndex, availableEffects, isZoomed, setIsZoomed, selectedEffects, setSelectedEffects ]); + }, [ isZoomed, availableEffects, getSelectedEffectIndex, selectedEffectName, onCancel, onCheckout, onClose, setIsZoomed, setSelectedEffects ]); + + useEffect(() => + { + const thumbnails: CameraPictureThumbnail[] = []; + + for(const effect of availableEffects) + { + thumbnails.push(new CameraPictureThumbnail(effect.name, GetRoomCameraWidgetManager().applyEffects(picture.texture, [ new RoomCameraWidgetSelectedEffect(effect, 1) ], false).src)); + } + + setEffectsThumbnails(thumbnails); + }, [ picture, availableEffects ]); return ( processAction('close') } /> -
-
- - { TABS.map(tab => - { - return processAction('change_tab', tab) }> - }) } - - -
-
- { getEffectList().map(effect => - { - return ( -
- { getEffectIndex(effect.name) > -1 && } -
processAction('select_effect', effect.name) } className={"effect-thumbnail cursor-pointer position-relative border border-2 rounded d-flex flex-column justify-content-center align-items-center py-1" + classNames({' active': selectedEffectName === effect.name})}> - { effect.minLevel <= myLevel &&
- -
} - { effect.minLevel > myLevel &&
-
-
{ effect.minLevel }
-
} -
-
- ); - }) } -
+ + { TABS.map(tab => + { + return processAction('change_tab', tab) }> + }) } + + +
+
+ +
+
+
+
- +
-
- - -
- { selectedEffectName &&
-
{ LocalizeText('camera.effect.name.' + selectedEffectName) + ' - ' + getCurrentEffectAlpha() }
- setSelectedEffectAlpha(Number(event.target.value)) } className="form-range w-100" /> -
} -
-
-
- - - -
-
- - -
-
-
-
-
+
); } diff --git a/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.types.ts b/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.types.ts index 6a58547a..c33ba910 100644 --- a/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.types.ts +++ b/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.types.ts @@ -1,7 +1,9 @@ import { IRoomCameraWidgetEffect } from '@nitrots/nitro-renderer'; +import { CameraPicture } from '../../common/CameraPicture'; export interface CameraWidgetEditorViewProps { + picture: CameraPicture; availableEffects: IRoomCameraWidgetEffect[]; myLevel: number; onClose: () => void; diff --git a/src/views/room/widgets/camera/views/editor/effect-list-item/CameraWidgetEffectListItemView.tsx b/src/views/room/widgets/camera/views/editor/effect-list-item/CameraWidgetEffectListItemView.tsx new file mode 100644 index 00000000..ae84972f --- /dev/null +++ b/src/views/room/widgets/camera/views/editor/effect-list-item/CameraWidgetEffectListItemView.tsx @@ -0,0 +1,29 @@ +import { FC } from 'react'; +import { NitroCardGridItemView } from '../../../../../../../layout/card/grid/item/NitroCardGridItemView'; +import { LocalizeText } from '../../../../../../../utils'; +import { CameraWidgetEffectListItemViewProps } from './CameraWidgetEffectListItemView.types'; + +export const CameraWidgetEffectListItemView: FC = props => +{ + const { effect = null, thumbnailUrl = null, isActive = false, isLocked = false, selectEffect = null, removeEffect = null } = props; + + return ( + (!isActive && selectEffect()) }> + { isActive && + } + { !isLocked && (thumbnailUrl && thumbnailUrl.length > 0) && +
+ +
} + { isLocked && +
+
+ +
+
{ effect.minLevel }
+
} +
+ ); +} diff --git a/src/views/room/widgets/camera/views/editor/effect-list-item/CameraWidgetEffectListItemView.types.ts b/src/views/room/widgets/camera/views/editor/effect-list-item/CameraWidgetEffectListItemView.types.ts new file mode 100644 index 00000000..19028be3 --- /dev/null +++ b/src/views/room/widgets/camera/views/editor/effect-list-item/CameraWidgetEffectListItemView.types.ts @@ -0,0 +1,11 @@ +import { IRoomCameraWidgetEffect } from '@nitrots/nitro-renderer'; + +export interface CameraWidgetEffectListItemViewProps +{ + effect: IRoomCameraWidgetEffect; + thumbnailUrl: string; + isActive: boolean; + isLocked: boolean; + selectEffect: () => void; + removeEffect: () => void; +} diff --git a/src/views/room/widgets/camera/views/editor/effect-list/CameraWidgetEffectListView.tsx b/src/views/room/widgets/camera/views/editor/effect-list/CameraWidgetEffectListView.tsx new file mode 100644 index 00000000..5f36ce7c --- /dev/null +++ b/src/views/room/widgets/camera/views/editor/effect-list/CameraWidgetEffectListView.tsx @@ -0,0 +1,21 @@ +import { FC } from 'react'; +import { NitroCardGridView } from '../../../../../../../layout/card/grid/NitroCardGridView'; +import { CameraWidgetEffectListItemView } from '../effect-list-item/CameraWidgetEffectListItemView'; +import { CameraWidgetEffectListViewProps } from './CameraWidgetEffectListView.types'; + +export const CameraWidgetEffectListView: FC = props => +{ + const { myLevel = 0, selectedEffects = [], effects = [], thumbnails = [], processAction = null } = props; + + return ( + + { effects && (effects.length > 0) && effects.map((effect, index) => + { + const thumbnailUrl = (thumbnails.find(thumbnail => (thumbnail.effectName === effect.name))); + const isActive = (selectedEffects.findIndex(selectedEffect => (selectedEffect.effect.name === effect.name)) > -1); + + return myLevel) } selectEffect={ () => processAction('select_effect', effect.name) } removeEffect={ () => processAction('remove_effect', effect.name) } /> + }) } + + ); +} diff --git a/src/views/room/widgets/camera/views/editor/effect-list/CameraWidgetEffectListView.types.ts b/src/views/room/widgets/camera/views/editor/effect-list/CameraWidgetEffectListView.types.ts new file mode 100644 index 00000000..7bdfccf1 --- /dev/null +++ b/src/views/room/widgets/camera/views/editor/effect-list/CameraWidgetEffectListView.types.ts @@ -0,0 +1,11 @@ +import { IRoomCameraWidgetEffect, IRoomCameraWidgetSelectedEffect } from '@nitrots/nitro-renderer'; +import { CameraPictureThumbnail } from '../../../common/CameraPictureThumbnail'; + +export interface CameraWidgetEffectListViewProps +{ + myLevel: number; + selectedEffects: IRoomCameraWidgetSelectedEffect[]; + effects: IRoomCameraWidgetEffect[]; + thumbnails: CameraPictureThumbnail[]; + processAction: (type: string, name: string) => void; +} diff --git a/tsconfig.json b/tsconfig.json index d05ec3bd..ac2a9fd7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,6 +23,7 @@ "jsx": "react-jsx" }, "include": [ - "src" + "src", + "node_modules/@nitrots/nitro-renderer/src/**/*.ts", ] } From 8f7410b0a18c8f3d7a58f88943b1ef4e38c86375 Mon Sep 17 00:00:00 2001 From: Bill Date: Sat, 7 Aug 2021 20:44:17 -0400 Subject: [PATCH 39/66] Fix dumb stuff --- src/views/user-settings/UserSettingsView.tsx | 101 +++++++++---------- 1 file changed, 45 insertions(+), 56 deletions(-) diff --git a/src/views/user-settings/UserSettingsView.tsx b/src/views/user-settings/UserSettingsView.tsx index 61523f33..63457778 100644 --- a/src/views/user-settings/UserSettingsView.tsx +++ b/src/views/user-settings/UserSettingsView.tsx @@ -1,5 +1,5 @@ import { NitroSettingsEvent, UserSettingsCameraFollowComposer, UserSettingsEvent, UserSettingsOldChatComposer, UserSettingsRoomInvitesComposer } from '@nitrots/nitro-renderer'; -import { FC, useCallback, useState } from 'react'; +import { FC, useCallback, useEffect, useState } from 'react'; import { UserSettingsUIEvent } from '../../events/user-settings/UserSettingsUIEvent'; import { CreateMessageHook, dispatchMainEvent, SendMessageHook, useUiEvent } from '../../hooks'; import { NitroCardContentView, NitroCardHeaderView } from '../../layout'; @@ -8,15 +8,8 @@ import { LocalizeText } from '../../utils'; export const UserSettingsView: FC<{}> = props => { - const [isVisible, setIsVisible] = useState(false); - const [useOldChat, setUseOldChat] = useState(false); - const [allowRoomInvites, setAllowRoomInvites] = useState(false); - const [cameraFollowDisabled, setCameraFollowDisabled] = useState(false); - const [systemVolume, setSystemVolume] = useState(0); - const [furniVolume, setFurniVolume] = useState(0); - const [traxVolume, setTraxVolume] = useState(0); - const [flags, setFlags] = useState(0); - const [chatType, setChatType] = useState(0); + const [ isVisible, setIsVisible ] = useState(false); + const [ userSettings, setUserSettings ] = useState(null); const onUserSettingsUIEvent = useCallback((event: UserSettingsUIEvent) => { @@ -38,66 +31,62 @@ export const UserSettingsView: FC<{}> = props => useUiEvent(UserSettingsUIEvent.HIDE_USER_SETTINGS, onUserSettingsUIEvent); useUiEvent(UserSettingsUIEvent.TOGGLE_USER_SETTINGS, onUserSettingsUIEvent); - const updateUserSettings = useCallback(() => - { - const event = new NitroSettingsEvent(NitroSettingsEvent.SETTINGS_UPDATED); - event.flags = flags; - event.oldChat = useOldChat; - event.roomInvites = allowRoomInvites; - event.volumeFurni = furniVolume; - event.volumeSystem = systemVolume; - event.volumeTrax = traxVolume; - event.oldChat = useOldChat; - event.chatType = chatType - event.cameraFollow = cameraFollowDisabled; - dispatchMainEvent(event); - }, [allowRoomInvites, cameraFollowDisabled, chatType, flags, furniVolume, systemVolume, traxVolume, useOldChat]); - const onUserSettingsEvent = useCallback((event: UserSettingsEvent) => { const parser = event.getParser(); + const settingsEvent = new NitroSettingsEvent(); - setAllowRoomInvites(parser.roomInvites); - setCameraFollowDisabled(parser.cameraFollow); - setFurniVolume(parser.volumeFurni); - setSystemVolume(parser.volumeSystem); - setTraxVolume(parser.volumeTrax); - setUseOldChat(parser.oldChat); - setChatType(parser.chatType); - setFlags(parser.flags); + settingsEvent.volumeSystem = parser.volumeSystem; + settingsEvent.volumeFurni = parser.volumeFurni; + settingsEvent.volumeTrax = parser.volumeTrax; + settingsEvent.oldChat = parser.oldChat; + settingsEvent.roomInvites = parser.roomInvites; + settingsEvent.cameraFollow = parser.cameraFollow; + settingsEvent.flags = parser.flags; + settingsEvent.chatType = parser.chatType; - updateUserSettings(); - console.log(parser); - }, [updateUserSettings]); + setUserSettings(settingsEvent); + }, []); CreateMessageHook(UserSettingsEvent, onUserSettingsEvent); - const processAction = useCallback((type: string, value?: string | number | boolean) => + const processAction = useCallback((type: string, value: boolean = false) => { - switch (type) + let doUpdate = true; + + const clone = userSettings.clone(); + + switch(type) { case 'close_view': setIsVisible(false); return; case 'oldchat': - setUseOldChat(Boolean(value)); - SendMessageHook(new UserSettingsOldChatComposer(useOldChat)); - updateUserSettings(); - return; + clone.oldChat = value; + SendMessageHook(new UserSettingsOldChatComposer(value)); + break; case 'room_invites': - setAllowRoomInvites(Boolean(value)); - SendMessageHook(new UserSettingsRoomInvitesComposer(allowRoomInvites)); - updateUserSettings(); - return; + clone.roomInvites = value; + SendMessageHook(new UserSettingsRoomInvitesComposer(value)); + break; case 'camera_follow': - setCameraFollowDisabled(value as boolean); - SendMessageHook(new UserSettingsCameraFollowComposer(cameraFollowDisabled)); - updateUserSettings(); - console.log(value as boolean); - console.log(cameraFollowDisabled); - return; + console.log(value); + clone.cameraFollow = value; + SendMessageHook(new UserSettingsCameraFollowComposer(value)); + break; } - }, [allowRoomInvites, cameraFollowDisabled, updateUserSettings, useOldChat]); + + if(doUpdate) setUserSettings(clone); + }, [ userSettings ]); + + useEffect(() => + { + if(!userSettings) return; + + console.log(userSettings); + + dispatchMainEvent(userSettings); + }, [ userSettings ]); if (!isVisible) return null; @@ -107,15 +96,15 @@ export const UserSettingsView: FC<{}> = props => processAction('close_view')} />
- processAction('oldchat', event.target.checked)} /> + processAction('oldchat', event.target.checked)} />
- processAction('room_invites', event.target.checked)} /> + processAction('room_invites', event.target.checked)} />
- processAction('camera_follow', event.target.checked)} /> + processAction('camera_follow', event.target.checked)} />
{LocalizeText('widget.memenu.settings.volume')}
From 6ec2e0d93fa7499e82a5196e17eac8bf3342c942 Mon Sep 17 00:00:00 2001 From: Bill Date: Sat, 7 Aug 2021 20:44:57 -0400 Subject: [PATCH 40/66] Remove console log --- src/views/user-settings/UserSettingsView.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/views/user-settings/UserSettingsView.tsx b/src/views/user-settings/UserSettingsView.tsx index 63457778..816034c8 100644 --- a/src/views/user-settings/UserSettingsView.tsx +++ b/src/views/user-settings/UserSettingsView.tsx @@ -83,8 +83,6 @@ export const UserSettingsView: FC<{}> = props => { if(!userSettings) return; - console.log(userSettings); - dispatchMainEvent(userSettings); }, [ userSettings ]); From 29b62081ad7643f750050ea266e35920ab5838d8 Mon Sep 17 00:00:00 2001 From: Bill Date: Sat, 7 Aug 2021 22:04:19 -0400 Subject: [PATCH 41/66] More camera updates --- .../room/widgets/camera/CameraWidgetView.scss | 4 +-- .../room/widgets/camera/CameraWidgetView.tsx | 14 +++++--- .../checkout/CameraWidgetCheckoutView.tsx | 25 ++++++++----- .../CameraWidgetCheckoutView.types.ts | 1 + .../views/editor/CameraWidgetEditorView.tsx | 36 +++++++++++++++++-- .../editor/CameraWidgetEditorView.types.ts | 2 +- 6 files changed, 62 insertions(+), 20 deletions(-) diff --git a/src/views/room/widgets/camera/CameraWidgetView.scss b/src/views/room/widgets/camera/CameraWidgetView.scss index 244d7be6..7274426d 100644 --- a/src/views/room/widgets/camera/CameraWidgetView.scss +++ b/src/views/room/widgets/camera/CameraWidgetView.scss @@ -88,8 +88,8 @@ width: 600px; .content-area { - min-height: 350px; - height: 350px; + min-height: 441px; + height: 441px; resize: vertical; .picture-preview { diff --git a/src/views/room/widgets/camera/CameraWidgetView.tsx b/src/views/room/widgets/camera/CameraWidgetView.tsx index 85b535b9..1a15b828 100644 --- a/src/views/room/widgets/camera/CameraWidgetView.tsx +++ b/src/views/room/widgets/camera/CameraWidgetView.tsx @@ -25,6 +25,7 @@ export const CameraWidgetView: FC<{}> = props => const [ selectedEffects, setSelectedEffects ] = useState([]); const [ isZoomed, setIsZoomed ] = useState(false); const [ myLevel, setMyLevel ] = useState(1); + const [ savedPictureUrl, setSavedPictureUrl ] = useState(null); const [ price, setPrice ] = useState<{ credits: number, duckets: number, publishDucketPrice: number }>(null); const onNitroEvent = useCallback((event: RoomWidgetCameraEvent) => @@ -102,17 +103,20 @@ export const CameraWidgetView: FC<{}> = props => case 'editor_cancel': setMode(MODE_CAPTURE); return; - case 'checkout': - setMode(MODE_CHECKOUT); - return; } }, [ selectedPictureIndex ]); + const checkoutPictureUrl = useCallback((pictureUrl: string) => + { + setSavedPictureUrl(pictureUrl); + setMode(MODE_CHECKOUT); + }, []); + return ( { (mode === MODE_CAPTURE) && processAction('close') } onEdit={ () => processAction('edit') } onDelete={ () => processAction('delete') } /> } - { (mode === MODE_EDITOR) && processAction('close') } onCancel={ () => processAction('editor_cancel') } onCheckout={ () => processAction('checkout') } availableEffects={ availableEffects } /> } - { (mode === MODE_CHECKOUT) && processAction('close') } onCancelClick={ () => processAction('editor_cancel') } price={ price }> } + { (mode === MODE_EDITOR) && processAction('close') } onCancel={ () => processAction('editor_cancel') } onCheckout={ checkoutPictureUrl } availableEffects={ availableEffects } /> } + { (mode === MODE_CHECKOUT) && processAction('close') } onCancelClick={ () => processAction('editor_cancel') } price={ price }> } ); } diff --git a/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.tsx b/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.tsx index 64355107..a6400007 100644 --- a/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.tsx +++ b/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.tsx @@ -1,7 +1,7 @@ /* eslint-disable jsx-a11y/anchor-is-valid */ import { CameraPublishStatusMessageEvent, CameraPurchaseOKMessageEvent, PublishPhotoMessageComposer, PurchasePhotoMessageComposer } from '@nitrots/nitro-renderer'; -import { FC, useCallback, useState } from 'react'; -import { GetRoomCameraWidgetManager } from '../../../../../../api/nitro/camera/GetRoomCameraWidgetManager'; +import { FC, useCallback, useEffect, useState } from 'react'; +import { GetRoomEngine } from '../../../../../../api'; import { CreateMessageHook, SendMessageHook } from '../../../../../../hooks/messages/message-event'; import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../../../layout'; import { LocalizeText } from '../../../../../../utils/LocalizeText'; @@ -11,15 +11,25 @@ import { CameraWidgetCheckoutViewProps } from './CameraWidgetCheckoutView.types' export const CameraWidgetCheckoutView: FC = props => { - const { onCloseClick = null, onCancelClick = null, price = null } = props; + const { pictureUrl = null, onCloseClick = null, onCancelClick = null, price = null } = props; const [ picturesBought, setPicturesBought ] = useState(0); const [ wasPicturePublished, setWasPicturePublished ] = useState(false); const [ isWaiting, setIsWaiting ] = useState(false); const [ publishCooldown, setPublishCooldown ] = useState(0); const { cameraRoll = null, selectedPictureIndex = -1, selectedEffects = null, isZoomed = false } = useCameraWidgetContext(); + useEffect(() => + { + if(!pictureUrl) return; + + console.log(pictureUrl); + + GetRoomEngine().saveBase64AsScreenshot(pictureUrl); + }, [ pictureUrl ]); + const onCameraPurchaseOKMessageEvent = useCallback((event: CameraPurchaseOKMessageEvent) => { + console.log(event); setPicturesBought(value => value + 1); setIsWaiting(false); }, []); @@ -30,6 +40,8 @@ export const CameraWidgetCheckoutView: FC = props { const parser = event.getParser(); + console.log(parser); + setPublishCooldown(parser.secondsToWait); setWasPicturePublished(parser.ok); setIsWaiting(false); @@ -37,11 +49,6 @@ export const CameraWidgetCheckoutView: FC = props CreateMessageHook(CameraPublishStatusMessageEvent, onCameraPublishStatusMessageEvent); - const getCurrentPicture = useCallback(() => - { - return GetRoomCameraWidgetManager().applyEffects(cameraRoll[selectedPictureIndex].texture, selectedEffects, isZoomed); - }, [ cameraRoll, selectedPictureIndex, selectedEffects, isZoomed ]); - const processAction = useCallback((type: string, value: string | number = null) => { switch(type) @@ -73,7 +80,7 @@ export const CameraWidgetCheckoutView: FC = props processAction('close') } /> -
+
{ LocalizeText('camera.purchase.header') }{ price.credits > 0 && <>: { price.credits } }
diff --git a/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.types.ts b/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.types.ts index dbbac494..4698df7d 100644 --- a/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.types.ts +++ b/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.types.ts @@ -1,5 +1,6 @@ export interface CameraWidgetCheckoutViewProps { + pictureUrl: string; onCloseClick: () => void; onCancelClick: () => void; price: { credits: number, duckets: number, publishDucketPrice: number }; diff --git a/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.tsx b/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.tsx index 8cb13259..6ee965b9 100644 --- a/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.tsx +++ b/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.tsx @@ -1,5 +1,6 @@ import { IRoomCameraWidgetSelectedEffect, RoomCameraWidgetSelectedEffect } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useMemo, useState } from 'react'; +import ReactSlider from 'react-slider'; import { GetRoomCameraWidgetManager } from '../../../../../../api'; import { NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from '../../../../../../layout'; import { LocalizeText } from '../../../../../../utils/LocalizeText'; @@ -57,7 +58,7 @@ export const CameraWidgetEditorView: FC = props => return (selectedEffects[getCurrentEffectIndex] || null); }, [ selectedEffectName, getCurrentEffectIndex, selectedEffects ]); - const setCurrentEffectAlpha = useCallback((alpha: number) => + const setSelectedEffectAlpha = useCallback((alpha: number) => { const index = getCurrentEffectIndex; @@ -90,7 +91,7 @@ export const CameraWidgetEditorView: FC = props => onCancel(); return; case 'checkout': - onCheckout(); + onCheckout(getCurrentPictureUrl); return; case 'change_tab': setCurrentTab(String(effectName)); @@ -140,7 +141,7 @@ export const CameraWidgetEditorView: FC = props => setIsZoomed(!isZoomed); return; } - }, [ isZoomed, availableEffects, getSelectedEffectIndex, selectedEffectName, onCancel, onCheckout, onClose, setIsZoomed, setSelectedEffects ]); + }, [ isZoomed, availableEffects, selectedEffectName, getCurrentPictureUrl, getSelectedEffectIndex, onCancel, onCheckout, onClose, setIsZoomed, setSelectedEffects ]); useEffect(() => { @@ -172,6 +173,35 @@ export const CameraWidgetEditorView: FC = props =>
+ { selectedEffectName && +
+
{ LocalizeText('camera.effect.name.' + selectedEffectName) }
+ setSelectedEffectAlpha(event) } + renderThumb={ (props, state) =>
{ state.valueNow }
} /> +
} +
+
+ + + +
+
+ + +
+
diff --git a/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.types.ts b/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.types.ts index c33ba910..4bd58fbc 100644 --- a/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.types.ts +++ b/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.types.ts @@ -8,7 +8,7 @@ export interface CameraWidgetEditorViewProps myLevel: number; onClose: () => void; onCancel: () => void; - onCheckout: () => void; + onCheckout: (pictureUrl: string) => void; } export class CameraWidgetEditorTabs From 16773c05012fb4dde36238be0d55535e6dadc721 Mon Sep 17 00:00:00 2001 From: Bill Date: Sun, 8 Aug 2021 16:53:14 -0400 Subject: [PATCH 42/66] Add color vars --- src/assets/styles/bootstrap/_variables.scss | 2 ++ src/views/purse/PurseView.scss | 4 ++-- src/views/purse/views/seasonal/SeasonalView.scss | 4 ++-- src/views/room/widgets/camera/CameraWidgetView.scss | 5 ----- src/views/room/widgets/context-menu/ContextMenu.scss | 4 ++-- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/assets/styles/bootstrap/_variables.scss b/src/assets/styles/bootstrap/_variables.scss index b2592966..fe6cb582 100644 --- a/src/assets/styles/bootstrap/_variables.scss +++ b/src/assets/styles/bootstrap/_variables.scss @@ -82,6 +82,8 @@ $pale-sky: #677181 !default; $oslo-gray: #8F9297 !default; $ghost: #c8cad0 !default; $gray-chateau: #a3a7b1 !default; +$gable-green: #1C323F !default; +$william: #3d5f6e !default; $success: $green !default; $info: $cyan !default; $warning: $yellow !default; diff --git a/src/views/purse/PurseView.scss b/src/views/purse/PurseView.scss index 82ea9cc3..72ed8e27 100644 --- a/src/views/purse/PurseView.scss +++ b/src/views/purse/PurseView.scss @@ -1,6 +1,6 @@ .nitro-purse { padding: 2px; - background-color: #1c323f; + background-color: $gable-green; border: 2px solid rgba($white, 0.5); border-top: 0; font-size: $font-size-sm; @@ -17,7 +17,7 @@ } .nitro-purse-hc { - background-color: #3d5f6e; + background-color: $william; margin:0 2px; } diff --git a/src/views/purse/views/seasonal/SeasonalView.scss b/src/views/purse/views/seasonal/SeasonalView.scss index 9b5b8e25..e5f8894d 100644 --- a/src/views/purse/views/seasonal/SeasonalView.scss +++ b/src/views/purse/views/seasonal/SeasonalView.scss @@ -1,7 +1,7 @@ .nitro-seasonal-currency { pointer-events: all; padding: 2px; - background-color: #1c323f; + background-color: $gable-green; border: 2px solid rgba($white, 0.5); font-size: $font-size-sm; margin-bottom: 5px; @@ -11,6 +11,6 @@ } .nitro-seasonal-icon { - background-color: #3d5f6e + background-color: $william; } } diff --git a/src/views/room/widgets/camera/CameraWidgetView.scss b/src/views/room/widgets/camera/CameraWidgetView.scss index 7274426d..b100900d 100644 --- a/src/views/room/widgets/camera/CameraWidgetView.scss +++ b/src/views/room/widgets/camera/CameraWidgetView.scss @@ -172,10 +172,5 @@ .picture-preview { width: 320px; height: 320px; - - .slider { - background: linear-gradient(180deg, transparent, black); - text-shadow: 1px 1px rgba(0, 0, 0, .5); - } } } diff --git a/src/views/room/widgets/context-menu/ContextMenu.scss b/src/views/room/widgets/context-menu/ContextMenu.scss index 1f21f858..06d98dce 100644 --- a/src/views/room/widgets/context-menu/ContextMenu.scss +++ b/src/views/room/widgets/context-menu/ContextMenu.scss @@ -2,7 +2,7 @@ width: 125px; max-width: 125px; padding: 2px; - background-color: #1c323f; + background-color: $gable-green; border: 2px solid rgba($white, 0.5); border-radius: $border-radius; font-size: $font-size-sm; @@ -32,7 +32,7 @@ } .menu-header { - background-color: #3d5f6e; + background-color: $william; color: $white; height: 25px; max-height: 25px; From a34235f16daa98d264d2605249151d4e9d1689e2 Mon Sep 17 00:00:00 2001 From: Bill Date: Sun, 8 Aug 2021 22:21:40 -0400 Subject: [PATCH 43/66] Finish room camera --- .../room/widgets/camera/CameraWidgetView.scss | 2 +- .../room/widgets/camera/CameraWidgetView.tsx | 12 +-- .../camera/context/CameraWidgetContext.tsx | 6 +- .../context/CameraWidgetContext.types.ts | 5 - .../checkout/CameraWidgetCheckoutView.tsx | 99 +++++++++++++------ .../CameraWidgetCheckoutView.types.ts | 2 +- 6 files changed, 75 insertions(+), 51 deletions(-) diff --git a/src/views/room/widgets/camera/CameraWidgetView.scss b/src/views/room/widgets/camera/CameraWidgetView.scss index b100900d..22217552 100644 --- a/src/views/room/widgets/camera/CameraWidgetView.scss +++ b/src/views/room/widgets/camera/CameraWidgetView.scss @@ -167,7 +167,7 @@ } .nitro-camera-checkout { - width: 336px; + width: 388px; .picture-preview { width: 320px; diff --git a/src/views/room/widgets/camera/CameraWidgetView.tsx b/src/views/room/widgets/camera/CameraWidgetView.tsx index 1a15b828..0dcfe8aa 100644 --- a/src/views/room/widgets/camera/CameraWidgetView.tsx +++ b/src/views/room/widgets/camera/CameraWidgetView.tsx @@ -1,4 +1,4 @@ -import { InitCameraMessageEvent, IRoomCameraWidgetEffect, IRoomCameraWidgetSelectedEffect, RequestCameraConfigurationComposer, RoomCameraWidgetManagerEvent } from '@nitrots/nitro-renderer'; +import { InitCameraMessageEvent, IRoomCameraWidgetEffect, RequestCameraConfigurationComposer, RoomCameraWidgetManagerEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { GetRoomCameraWidgetManager } from '../../../../api'; import { RoomWidgetCameraEvent } from '../../../../events/room-widgets/camera/RoomWidgetCameraEvent'; @@ -22,10 +22,8 @@ export const CameraWidgetView: FC<{}> = props => const [ availableEffects, setAvailableEffects ] = useState([]); const [ cameraRoll, setCameraRoll ] = useState([]); const [ selectedPictureIndex, setSelectedPictureIndex ] = useState(-1); - const [ selectedEffects, setSelectedEffects ] = useState([]); - const [ isZoomed, setIsZoomed ] = useState(false); - const [ myLevel, setMyLevel ] = useState(1); - const [ savedPictureUrl, setSavedPictureUrl ] = useState(null); + const [ myLevel, setMyLevel ] = useState(10); + const [ base64Url, setSavedPictureUrl ] = useState(null); const [ price, setPrice ] = useState<{ credits: number, duckets: number, publishDucketPrice: number }>(null); const onNitroEvent = useCallback((event: RoomWidgetCameraEvent) => @@ -113,10 +111,10 @@ export const CameraWidgetView: FC<{}> = props => }, []); return ( - + { (mode === MODE_CAPTURE) && processAction('close') } onEdit={ () => processAction('edit') } onDelete={ () => processAction('delete') } /> } { (mode === MODE_EDITOR) && processAction('close') } onCancel={ () => processAction('editor_cancel') } onCheckout={ checkoutPictureUrl } availableEffects={ availableEffects } /> } - { (mode === MODE_CHECKOUT) && processAction('close') } onCancelClick={ () => processAction('editor_cancel') } price={ price }> } + { (mode === MODE_CHECKOUT) && processAction('close') } onCancelClick={ () => processAction('editor_cancel') } price={ price }> } ); } diff --git a/src/views/room/widgets/camera/context/CameraWidgetContext.tsx b/src/views/room/widgets/camera/context/CameraWidgetContext.tsx index 3fd936aa..16253f22 100644 --- a/src/views/room/widgets/camera/context/CameraWidgetContext.tsx +++ b/src/views/room/widgets/camera/context/CameraWidgetContext.tsx @@ -5,11 +5,7 @@ const CameraWidgetContext = createContext({ cameraRoll: null, setCameraRoll: null, selectedPictureIndex: null, - setSelectedPictureIndex: null, - selectedEffects: null, - setSelectedEffects: null, - isZoomed: null, - setIsZoomed: null + setSelectedPictureIndex: null }); export const CameraWidgetContextProvider: FC = props => diff --git a/src/views/room/widgets/camera/context/CameraWidgetContext.types.ts b/src/views/room/widgets/camera/context/CameraWidgetContext.types.ts index b162cbb7..00dba3f0 100644 --- a/src/views/room/widgets/camera/context/CameraWidgetContext.types.ts +++ b/src/views/room/widgets/camera/context/CameraWidgetContext.types.ts @@ -1,4 +1,3 @@ -import { IRoomCameraWidgetSelectedEffect } from '@nitrots/nitro-renderer'; import { Dispatch, ProviderProps, SetStateAction } from 'react'; import { CameraPicture } from '../common/CameraPicture'; @@ -8,10 +7,6 @@ export interface ICameraWidgetContext setCameraRoll: Dispatch>; selectedPictureIndex: number, setSelectedPictureIndex: Dispatch>; - selectedEffects: IRoomCameraWidgetSelectedEffect[], - setSelectedEffects: Dispatch>; - isZoomed: boolean, - setIsZoomed: Dispatch>; } export interface CameraWidgetContextProps extends ProviderProps diff --git a/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.tsx b/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.tsx index a6400007..66d5f7d4 100644 --- a/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.tsx +++ b/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.tsx @@ -1,36 +1,32 @@ -/* eslint-disable jsx-a11y/anchor-is-valid */ -import { CameraPublishStatusMessageEvent, CameraPurchaseOKMessageEvent, PublishPhotoMessageComposer, PurchasePhotoMessageComposer } from '@nitrots/nitro-renderer'; +import { CameraPublishStatusMessageEvent, CameraPurchaseOKMessageEvent, CameraStorageUrlMessageEvent, PublishPhotoMessageComposer, PurchasePhotoMessageComposer } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; -import { GetRoomEngine } from '../../../../../../api'; +import { GetConfiguration, GetRoomEngine } from '../../../../../../api'; import { CreateMessageHook, SendMessageHook } from '../../../../../../hooks/messages/message-event'; import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../../../layout'; import { LocalizeText } from '../../../../../../utils/LocalizeText'; import { CurrencyIcon } from '../../../../../shared/currency-icon/CurrencyIcon'; -import { useCameraWidgetContext } from '../../context/CameraWidgetContext'; import { CameraWidgetCheckoutViewProps } from './CameraWidgetCheckoutView.types'; export const CameraWidgetCheckoutView: FC = props => { - const { pictureUrl = null, onCloseClick = null, onCancelClick = null, price = null } = props; + const { base64Url = null, onCloseClick = null, onCancelClick = null, price = null } = props; + const [ pictureUrl, setPictureUrl ] = useState(null); + const [ publishUrl, setPublishUrl ] = useState(null); const [ picturesBought, setPicturesBought ] = useState(0); const [ wasPicturePublished, setWasPicturePublished ] = useState(false); const [ isWaiting, setIsWaiting ] = useState(false); const [ publishCooldown, setPublishCooldown ] = useState(0); - const { cameraRoll = null, selectedPictureIndex = -1, selectedEffects = null, isZoomed = false } = useCameraWidgetContext(); useEffect(() => { - if(!pictureUrl) return; + if(!base64Url) return; - console.log(pictureUrl); - - GetRoomEngine().saveBase64AsScreenshot(pictureUrl); - }, [ pictureUrl ]); + GetRoomEngine().saveBase64AsScreenshot(base64Url); + }, [ base64Url ]); const onCameraPurchaseOKMessageEvent = useCallback((event: CameraPurchaseOKMessageEvent) => { - console.log(event); - setPicturesBought(value => value + 1); + setPicturesBought(value => (value + 1)); setIsWaiting(false); }, []); @@ -40,8 +36,7 @@ export const CameraWidgetCheckoutView: FC = props { const parser = event.getParser(); - console.log(parser); - + setPublishUrl(parser.extraDataId); setPublishCooldown(parser.secondsToWait); setWasPicturePublished(parser.ok); setIsWaiting(false); @@ -49,6 +44,15 @@ export const CameraWidgetCheckoutView: FC = props CreateMessageHook(CameraPublishStatusMessageEvent, onCameraPublishStatusMessageEvent); + const onCameraStorageUrlMessageEvent = useCallback((event: CameraStorageUrlMessageEvent) => + { + const parser = event.getParser(); + + setPictureUrl(GetConfiguration('camera.url') + '/' + parser.url); + }, []); + + CreateMessageHook(CameraStorageUrlMessageEvent, onCameraStorageUrlMessageEvent); + const processAction = useCallback((type: string, value: string | number = null) => { switch(type) @@ -60,7 +64,7 @@ export const CameraWidgetCheckoutView: FC = props if(isWaiting) return; setIsWaiting(true); - SendMessageHook(new PurchasePhotoMessageComposer('1_1627697499')); + SendMessageHook(new PurchasePhotoMessageComposer('')); return; case 'publish': if(isWaiting) return; @@ -80,27 +84,58 @@ export const CameraWidgetCheckoutView: FC = props processAction('close') } /> -
-
-
-
{ LocalizeText('camera.purchase.header') }{ price.credits > 0 && <>: { price.credits } }
- { picturesBought > 0 &&
{ LocalizeText('camera.purchase.count.info') + ' ' + picturesBought }
} +
+ { !pictureUrl && +
+ { LocalizeText('camera.loading') } +
} +
+ { pictureUrl &&
{ LocalizeText('camera.confirm_phase.info') }
} +
+
+
{ LocalizeText('camera.purchase.header') }
+ { ((price.credits > 0) || (price.duckets > 0)) && +
+
{ LocalizeText('catalog.purchase.confirmation.dialog.cost') }
+ { (price.credits > 0) && +
+ { price.credits } +
} + { (price.duckets > 0) && +
+ { price.duckets } +
} +
} + { (picturesBought > 0) && +
+ { LocalizeText('camera.purchase.count.info') } { picturesBought } + { LocalizeText('camera.open.inventory') } +
}
-
- - { picturesBought > 0 && } +
+
-
-
-
-
{ LocalizeText(wasPicturePublished ? 'camera.publish.successful' : 'camera.publish.explanation') }{ !wasPicturePublished && price.duckets > 0 && <>: { price.duckets } }
-
{ LocalizeText(wasPicturePublished ? 'camera.publish.success.short.info' : 'camera.publish.detailed.explanation') }
- { wasPicturePublished && { LocalizeText('camera.link.to.published') } } +
+
+
{ LocalizeText(wasPicturePublished ? 'camera.publish.successful' : 'camera.publish.explanation') }
+
+ { LocalizeText(wasPicturePublished ? 'camera.publish.success.short.info' : 'camera.publish.detailed.explanation') }
- { !wasPicturePublished && } + { wasPicturePublished && { LocalizeText('camera.link.to.published') } } + { !wasPicturePublished && (price.publishDucketPrice > 0) && +
+
{ LocalizeText('catalog.purchase.confirmation.dialog.cost') }
+
+ { price.publishDucketPrice } +
+
} + { (publishCooldown > 0) &&
{ LocalizeText('camera.publish.wait', [ 'minutes' ], [ Math.ceil( publishCooldown / 60).toString() ]) }
}
- { publishCooldown > 0 &&
{ LocalizeText('camera.publish.wait', ['minutes'], [Math.ceil(publishCooldown/60).toString()]) }
} + { !wasPicturePublished && +
+ +
}
{ LocalizeText('camera.warning.disclaimer') }
diff --git a/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.types.ts b/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.types.ts index 4698df7d..a4fafb06 100644 --- a/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.types.ts +++ b/src/views/room/widgets/camera/views/checkout/CameraWidgetCheckoutView.types.ts @@ -1,6 +1,6 @@ export interface CameraWidgetCheckoutViewProps { - pictureUrl: string; + base64Url: string; onCloseClick: () => void; onCancelClick: () => void; price: { credits: number, duckets: number, publishDucketPrice: number }; From cbe7558b4b3b99efba665c3b2c613cf82e117f43 Mon Sep 17 00:00:00 2001 From: Bill Date: Sun, 8 Aug 2021 22:54:20 -0400 Subject: [PATCH 44/66] Add generic mini camera component --- src/layout/index.ts | 1 + .../mini-camera/NitroLayoutMiniCameraView.tsx | 38 +++++++++++++++++++ .../NitroLayoutMiniCameraView.types.ts | 8 ++++ src/layout/mini-camera/index.ts | 2 + 4 files changed, 49 insertions(+) create mode 100644 src/layout/mini-camera/NitroLayoutMiniCameraView.tsx create mode 100644 src/layout/mini-camera/NitroLayoutMiniCameraView.types.ts create mode 100644 src/layout/mini-camera/index.ts diff --git a/src/layout/index.ts b/src/layout/index.ts index c9708368..5fc0d19f 100644 --- a/src/layout/index.ts +++ b/src/layout/index.ts @@ -1,5 +1,6 @@ export * from './card'; export * from './draggable-window'; export * from './loading-spinner'; +export * from './mini-camera'; export * from './transitions'; export * from './trophy'; diff --git a/src/layout/mini-camera/NitroLayoutMiniCameraView.tsx b/src/layout/mini-camera/NitroLayoutMiniCameraView.tsx new file mode 100644 index 00000000..d209586d --- /dev/null +++ b/src/layout/mini-camera/NitroLayoutMiniCameraView.tsx @@ -0,0 +1,38 @@ +import { NitroRectangle } from '@nitrots/nitro-renderer'; +import { FC, useCallback, useRef } from 'react'; +import { GetRoomEngine } from '../../api'; +import { LocalizeText } from '../../utils'; +import { DraggableWindow } from '../draggable-window'; +import { NitroLayoutMiniCameraViewProps } from './NitroLayoutMiniCameraView.types'; + +export const NitroLayoutMiniCameraView: FC = props => +{ + const { roomId = -1, textureReceiver = null, onClose = null } = props; + const elementRef = useRef(); + + const getCameraBounds = useCallback(() => + { + if(!elementRef || !elementRef.current) return null; + + const frameBounds = elementRef.current.getBoundingClientRect(); + + return new NitroRectangle(Math.floor(frameBounds.x), Math.floor(frameBounds.y), Math.floor(frameBounds.width), Math.floor(frameBounds.height)); + }, []); + + const takePicture = useCallback(() => + { + textureReceiver(GetRoomEngine().createTextureFromRoom(roomId, 1, getCameraBounds())); + }, [ roomId, getCameraBounds, textureReceiver ]); + + return ( + +
+
+
+ + +
+
+ + ); +}; diff --git a/src/layout/mini-camera/NitroLayoutMiniCameraView.types.ts b/src/layout/mini-camera/NitroLayoutMiniCameraView.types.ts new file mode 100644 index 00000000..b1964563 --- /dev/null +++ b/src/layout/mini-camera/NitroLayoutMiniCameraView.types.ts @@ -0,0 +1,8 @@ +import { NitroRenderTexture } from '@nitrots/nitro-renderer'; + +export interface NitroLayoutMiniCameraViewProps +{ + roomId: number; + textureReceiver: (texture: NitroRenderTexture) => void; + onClose: () => void; +} diff --git a/src/layout/mini-camera/index.ts b/src/layout/mini-camera/index.ts new file mode 100644 index 00000000..4f572ea3 --- /dev/null +++ b/src/layout/mini-camera/index.ts @@ -0,0 +1,2 @@ +export * from './NitroLayoutMiniCameraView'; +export * from './NitroLayoutMiniCameraView.types'; From 1b646c734452128222cd4cb1f524d1096683244f Mon Sep 17 00:00:00 2001 From: Bill Date: Sun, 8 Aug 2021 22:54:49 -0400 Subject: [PATCH 45/66] Update room thumbnail widget --- src/views/room/widgets/RoomWidgets.scss | 1 - .../room-thumbnail/RoomThumbnailView.scss | 14 ----- .../RoomThumbnailWidgetView.tsx | 59 +++++------------ .../RoomThumbnailWidgetBuilderView.props.ts | 4 -- .../RoomThumbnailWidgetBuilderView.scss | 3 - .../RoomThumbnailWidgetBuilderView.tsx | 63 ------------------- .../camera/RoomThumbnailWidgetCameraView.scss | 13 ---- .../camera/RoomThumbnailWidgetCameraView.tsx | 38 ----------- .../RoomThumbnailWidgetCameraView.types.ts | 4 -- 9 files changed, 17 insertions(+), 182 deletions(-) delete mode 100644 src/views/room/widgets/room-thumbnail/RoomThumbnailView.scss delete mode 100644 src/views/room/widgets/room-thumbnail/views/builder/RoomThumbnailWidgetBuilderView.props.ts delete mode 100644 src/views/room/widgets/room-thumbnail/views/builder/RoomThumbnailWidgetBuilderView.scss delete mode 100644 src/views/room/widgets/room-thumbnail/views/builder/RoomThumbnailWidgetBuilderView.tsx delete mode 100644 src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.scss delete mode 100644 src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.tsx delete mode 100644 src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.types.ts diff --git a/src/views/room/widgets/RoomWidgets.scss b/src/views/room/widgets/RoomWidgets.scss index 10c9d521..ed284cd9 100644 --- a/src/views/room/widgets/RoomWidgets.scss +++ b/src/views/room/widgets/RoomWidgets.scss @@ -7,4 +7,3 @@ @import './infostand/InfoStandWidgetView'; @import './object-location/ObjectLocationView'; @import './room-tools/RoomToolsWidgetView'; -@import './room-thumbnail/RoomThumbnailView'; diff --git a/src/views/room/widgets/room-thumbnail/RoomThumbnailView.scss b/src/views/room/widgets/room-thumbnail/RoomThumbnailView.scss deleted file mode 100644 index 0e39af10..00000000 --- a/src/views/room/widgets/room-thumbnail/RoomThumbnailView.scss +++ /dev/null @@ -1,14 +0,0 @@ -.nitro-room-thumbnail { - width: 300px; - - .option { - font-size: 30px; - height: 50px; - display: flex; - align-items: center; - cursor: pointer; - } -} - -@import './views/builder/RoomThumbnailWidgetBuilderView'; -@import './views/camera/RoomThumbnailWidgetCameraView'; diff --git a/src/views/room/widgets/room-thumbnail/RoomThumbnailWidgetView.tsx b/src/views/room/widgets/room-thumbnail/RoomThumbnailWidgetView.tsx index d7d736d2..032b6978 100644 --- a/src/views/room/widgets/room-thumbnail/RoomThumbnailWidgetView.tsx +++ b/src/views/room/widgets/room-thumbnail/RoomThumbnailWidgetView.tsx @@ -1,33 +1,28 @@ +import { NitroRenderTexture } from '@nitrots/nitro-renderer'; import { FC, useCallback, useState } from 'react'; +import { GetRoomEngine } from '../../../../api'; import { RoomWidgetThumbnailEvent } from '../../../../events/room-widgets/thumbnail'; import { useUiEvent } from '../../../../hooks/events'; -import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../layout'; -import { LocalizeText } from '../../../../utils/LocalizeText'; -import { RoomThumbnailWidgetBuilderView } from './views/builder/RoomThumbnailWidgetBuilderView'; -import { RoomThumbnailWidgetCameraView } from './views/camera/RoomThumbnailWidgetCameraView'; +import { NitroLayoutMiniCameraView } from '../../../../layout'; +import { useRoomContext } from '../../context/RoomContext'; export const RoomThumbnailWidgetView: FC<{}> = props => { - const [ isSelectorVisible, setIsSelectorVisible ] = useState(false); - const [ isBuilderVisible, setIsBuilderVisible ] = useState(false); - const [ isCameraVisible, setIsCameraVisible ] = useState(false); + const [ isVisible, setIsVisible ] = useState(false); + const { roomSession = null } = useRoomContext(); const onNitroEvent = useCallback((event: RoomWidgetThumbnailEvent) => { switch(event.type) { case RoomWidgetThumbnailEvent.SHOW_THUMBNAIL: - setIsSelectorVisible(true); + setIsVisible(true); return; case RoomWidgetThumbnailEvent.HIDE_THUMBNAIL: - setIsSelectorVisible(false); - setIsBuilderVisible(false); - setIsCameraVisible(false); + setIsVisible(false); return; case RoomWidgetThumbnailEvent.TOGGLE_THUMBNAIL: - setIsSelectorVisible(value => !value); - setIsBuilderVisible(false); - setIsCameraVisible(false); + setIsVisible(value => !value); return; } }, []); @@ -36,34 +31,14 @@ export const RoomThumbnailWidgetView: FC<{}> = props => useUiEvent(RoomWidgetThumbnailEvent.HIDE_THUMBNAIL, onNitroEvent); useUiEvent(RoomWidgetThumbnailEvent.TOGGLE_THUMBNAIL, onNitroEvent); - const handleAction = useCallback((action: string) => + const receiveTexture = useCallback((texture: NitroRenderTexture) => { - switch(action) - { - case 'camera': - setIsSelectorVisible(false); - setIsCameraVisible(true); - return; - case 'builder': - setIsSelectorVisible(false); - setIsBuilderVisible(true); - return; - } - }, [ setIsSelectorVisible, setIsCameraVisible, setIsBuilderVisible ]); + GetRoomEngine().saveTextureAsScreenshot(texture, true); - return (<> - { isSelectorVisible && - setIsSelectorVisible(false) } /> - -
handleAction('camera') }> - -
-
handleAction('builder') }> - -
-
-
} - { isBuilderVisible && setIsBuilderVisible(false) } /> } - { isCameraVisible && setIsCameraVisible(false) } /> } - ); + setIsVisible(false); + }, []); + + if(!isVisible) return null; + + return setIsVisible(false) } /> }; diff --git a/src/views/room/widgets/room-thumbnail/views/builder/RoomThumbnailWidgetBuilderView.props.ts b/src/views/room/widgets/room-thumbnail/views/builder/RoomThumbnailWidgetBuilderView.props.ts deleted file mode 100644 index 77c8b94b..00000000 --- a/src/views/room/widgets/room-thumbnail/views/builder/RoomThumbnailWidgetBuilderView.props.ts +++ /dev/null @@ -1,4 +0,0 @@ -export class RoomThumbnailWidgetBuilderViewProps -{ - onCloseClick: () => void; -} diff --git a/src/views/room/widgets/room-thumbnail/views/builder/RoomThumbnailWidgetBuilderView.scss b/src/views/room/widgets/room-thumbnail/views/builder/RoomThumbnailWidgetBuilderView.scss deleted file mode 100644 index d011f674..00000000 --- a/src/views/room/widgets/room-thumbnail/views/builder/RoomThumbnailWidgetBuilderView.scss +++ /dev/null @@ -1,3 +0,0 @@ -.nitro-room-thumbnail-builder { - width: 600px; -} diff --git a/src/views/room/widgets/room-thumbnail/views/builder/RoomThumbnailWidgetBuilderView.tsx b/src/views/room/widgets/room-thumbnail/views/builder/RoomThumbnailWidgetBuilderView.tsx deleted file mode 100644 index f5061555..00000000 --- a/src/views/room/widgets/room-thumbnail/views/builder/RoomThumbnailWidgetBuilderView.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import { FC, useCallback, useState } from 'react'; -import { NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from '../../../../../../layout'; -import { LocalizeText } from '../../../../../../utils/LocalizeText'; -import { RoomThumbnailWidgetBuilderViewProps } from './RoomThumbnailWidgetBuilderView.props'; - -const TABS: string[] = [ - 'navigator.thumbeditor.bgtab', - 'navigator.thumbeditor.objtab', - 'navigator.thumbeditor.toptab', -]; - -export const RoomThumbnailWidgetBuilderView: FC = props => -{ - const { onCloseClick = null } = props; - - const [ currentTab, setCurrentTab ] = useState(TABS[0]); - - const processAction = useCallback((action: string, value?: string) => - { - switch(action) - { - case 'change_tab': - setCurrentTab(value); - return; - } - }, [ setCurrentTab ]); - - return ( - - -
-
- - { TABS.map(tab => - { - return processAction('change_tab', tab) }> - { LocalizeText(tab) } - - }) } - - -
-
- -
-
-
-
-
- - -
-
- - -
-
-
-
-
-
- ); -}; diff --git a/src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.scss b/src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.scss deleted file mode 100644 index b472dcda..00000000 --- a/src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.scss +++ /dev/null @@ -1,13 +0,0 @@ -.nitro-room-thumbnail-camera { - width: 132px; - height: 192px; - background-image: url('../../../../../../assets/images/room-widgets/thumbnail-widget/thumbnail-camera-spritesheet.png'); - - .camera-frame { - position: absolute; - width: 110px; - height: 110px; - margin-top: 38px; - margin-left: 3px; - } -} diff --git a/src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.tsx b/src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.tsx deleted file mode 100644 index 9f5fe6b9..00000000 --- a/src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { NitroRectangle } from '@nitrots/nitro-renderer'; -import { FC, useCallback, useRef } from 'react'; -import { GetRoomEngine, GetRoomSession } from '../../../../../../api'; -import { DraggableWindow } from '../../../../../../layout'; -import { LocalizeText } from '../../../../../../utils/LocalizeText'; -import { RoomThumbnailWidgetCameraViewProps } from './RoomThumbnailWidgetCameraView.types'; - -export const RoomThumbnailWidgetCameraView: FC = props => -{ - const { onCloseClick = null } = props; - - const cameraFrameRef = useRef(); - - const takePicture = useCallback(() => - { - const frameBounds = cameraFrameRef.current.getBoundingClientRect(); - - if(!frameBounds) return; - - const rectangle = new NitroRectangle(Math.floor(frameBounds.x), Math.floor(frameBounds.y), Math.floor(frameBounds.width), Math.floor(frameBounds.height)); - - const image = GetRoomEngine().createTextureFromRoom(GetRoomSession().roomId, 1, rectangle); - - onCloseClick(); - }, [ onCloseClick ]); - - return ( - -
-
-
- - -
-
-
- ); -}; diff --git a/src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.types.ts b/src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.types.ts deleted file mode 100644 index ec49ac02..00000000 --- a/src/views/room/widgets/room-thumbnail/views/camera/RoomThumbnailWidgetCameraView.types.ts +++ /dev/null @@ -1,4 +0,0 @@ -export class RoomThumbnailWidgetCameraViewProps -{ - onCloseClick: () => void; -} From 5b6c8d9ce9c8ea42866427bb45c7b869bbc44f19 Mon Sep 17 00:00:00 2001 From: Bill Date: Sun, 8 Aug 2021 22:57:29 -0400 Subject: [PATCH 46/66] Fix camera download button --- .../camera/views/editor/CameraWidgetEditorView.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.tsx b/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.tsx index 6ee965b9..ab826e1d 100644 --- a/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.tsx +++ b/src/views/room/widgets/camera/views/editor/CameraWidgetEditorView.tsx @@ -134,9 +134,15 @@ export const CameraWidgetEditorView: FC = props => setSelectedEffectName(null); setSelectedEffects([]); return; - case 'download': - //window.open(getCurrentPicture().src, '_blank'); + case 'download': { + const image = new Image(); + + image.src = getCurrentPictureUrl + + const newWindow = window.open(''); + newWindow.document.write(image.outerHTML); return; + } case 'zoom': setIsZoomed(!isZoomed); return; From 2417cfbd777956a09bf798ca37c5da78aa03ef84 Mon Sep 17 00:00:00 2001 From: Dank074 Date: Sun, 8 Aug 2021 22:01:13 -0500 Subject: [PATCH 47/66] add volume inputs --- src/views/Styles.scss | 1 + src/views/user-settings/UserSettingsView.scss | 15 +++ src/views/user-settings/UserSettingsView.tsx | 103 ++++++++++++++---- 3 files changed, 99 insertions(+), 20 deletions(-) create mode 100644 src/views/user-settings/UserSettingsView.scss diff --git a/src/views/Styles.scss b/src/views/Styles.scss index 7949875c..5a81e730 100644 --- a/src/views/Styles.scss +++ b/src/views/Styles.scss @@ -16,3 +16,4 @@ @import './wired/WiredView'; @import './mod-tools/ModToolsView'; @import './achievements/AchievementsView'; +@import './user-settings/UserSettingsView'; diff --git a/src/views/user-settings/UserSettingsView.scss b/src/views/user-settings/UserSettingsView.scss new file mode 100644 index 00000000..bd87fb17 --- /dev/null +++ b/src/views/user-settings/UserSettingsView.scss @@ -0,0 +1,15 @@ +.user-settings-window +{ + .content-area + { + color: black; + } + + .custom-range { + margin-top: 3px; + } + + .icon-container { + width: 50px; + } +} diff --git a/src/views/user-settings/UserSettingsView.tsx b/src/views/user-settings/UserSettingsView.tsx index 816034c8..f30a2c34 100644 --- a/src/views/user-settings/UserSettingsView.tsx +++ b/src/views/user-settings/UserSettingsView.tsx @@ -1,4 +1,4 @@ -import { NitroSettingsEvent, UserSettingsCameraFollowComposer, UserSettingsEvent, UserSettingsOldChatComposer, UserSettingsRoomInvitesComposer } from '@nitrots/nitro-renderer'; +import { NitroSettingsEvent, UserSettingsCameraFollowComposer, UserSettingsEvent, UserSettingsOldChatComposer, UserSettingsRoomInvitesComposer, UserSettingsSoundComposer } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { UserSettingsUIEvent } from '../../events/user-settings/UserSettingsUIEvent'; import { CreateMessageHook, dispatchMainEvent, SendMessageHook, useUiEvent } from '../../hooks'; @@ -8,8 +8,8 @@ import { LocalizeText } from '../../utils'; export const UserSettingsView: FC<{}> = props => { - const [ isVisible, setIsVisible ] = useState(false); - const [ userSettings, setUserSettings ] = useState(null); + const [isVisible, setIsVisible] = useState(false); + const [userSettings, setUserSettings] = useState(null); const onUserSettingsUIEvent = useCallback((event: UserSettingsUIEvent) => { @@ -50,41 +50,66 @@ export const UserSettingsView: FC<{}> = props => CreateMessageHook(UserSettingsEvent, onUserSettingsEvent); - const processAction = useCallback((type: string, value: boolean = false) => + const processAction = useCallback((type: string, value?: boolean | number | string) => { let doUpdate = true; const clone = userSettings.clone(); - switch(type) + switch (type) { case 'close_view': setIsVisible(false); + doUpdate = false; return; case 'oldchat': - clone.oldChat = value; - SendMessageHook(new UserSettingsOldChatComposer(value)); + clone.oldChat = value as boolean; + SendMessageHook(new UserSettingsOldChatComposer(clone.oldChat)); break; case 'room_invites': - clone.roomInvites = value; - SendMessageHook(new UserSettingsRoomInvitesComposer(value)); + clone.roomInvites = value as boolean; + SendMessageHook(new UserSettingsRoomInvitesComposer(clone.roomInvites)); break; case 'camera_follow': - console.log(value); - clone.cameraFollow = value; - SendMessageHook(new UserSettingsCameraFollowComposer(value)); + clone.cameraFollow = value as boolean; + SendMessageHook(new UserSettingsCameraFollowComposer(clone.cameraFollow)); + break; + case 'system_volume': + clone.volumeSystem = value as number; + clone.volumeSystem = Math.max(0, clone.volumeSystem); + clone.volumeSystem = Math.min(100, clone.volumeSystem); + break; + case 'furni_volume': + clone.volumeFurni = value as number; + clone.volumeFurni = Math.max(0, clone.volumeFurni); + clone.volumeFurni = Math.min(100, clone.volumeFurni); + break; + case 'trax_volume': + clone.volumeTrax = value as number; + clone.volumeTrax = Math.max(0, clone.volumeTrax); + clone.volumeTrax = Math.min(100, clone.volumeTrax); break; } - if(doUpdate) setUserSettings(clone); - }, [ userSettings ]); + if (doUpdate) setUserSettings(clone); + }, [userSettings]); + + const saveRangeSlider = useCallback((type: string) => + { + switch(type) + { + case 'volume': + SendMessageHook(new UserSettingsSoundComposer(Math.round(userSettings.volumeSystem), Math.round(userSettings.volumeFurni), Math.round(userSettings.volumeTrax))); + break; + } + }, [userSettings]); useEffect(() => { - if(!userSettings) return; + if (!userSettings) return; dispatchMainEvent(userSettings); - }, [ userSettings ]); + }, [userSettings]); if (!isVisible) return null; @@ -94,22 +119,60 @@ export const UserSettingsView: FC<{}> = props => processAction('close_view')} />
- processAction('oldchat', event.target.checked)} /> + processAction('oldchat', event.target.checked)} />
- processAction('room_invites', event.target.checked)} /> + processAction('room_invites', event.target.checked)} />
- processAction('camera_follow', event.target.checked)} /> + processAction('camera_follow', event.target.checked)} />
{LocalizeText('widget.memenu.settings.volume')}
+
+
= 50 ? 'text-muted' : '')}> + 0 ? 'fa-volume-down' : '')}> +
+
+ processAction("system_volume", event.target.value)} onMouseUp={ () => saveRangeSlider("volume")}/> +
+
+ +
+
+
+
+ +
+
= 50 ? 'text-muted' : '')}> + 0 ? 'fa-volume-down' : '')}> +
+
+ processAction("furni_volume", event.target.value)} onMouseUp={ () => saveRangeSlider("volume")}/> +
+
+ +
+
+
+
+ +
+
= 50 ? 'text-muted' : '')}> + 0 ? 'fa-volume-down' : '')}> +
+
+ processAction("trax_volume", event.target.value)} onMouseUp={ () => saveRangeSlider("volume")}/> +
+
+ +
+
-
From e8a5bca6c984dbcbdf2a0acde448d07f5344f064 Mon Sep 17 00:00:00 2001 From: Bill Date: Mon, 9 Aug 2021 12:14:37 -0400 Subject: [PATCH 48/66] Update draggable component --- src/layout/card/NitroCardView.tsx | 4 +- src/layout/card/NitroCardView.types.ts | 5 +- .../draggable-window/DraggableWindow.tsx | 185 ++++++++++++++---- .../DraggableWindow.types.tsx | 17 +- 4 files changed, 163 insertions(+), 48 deletions(-) diff --git a/src/layout/card/NitroCardView.tsx b/src/layout/card/NitroCardView.tsx index a00913cd..aaf4178a 100644 --- a/src/layout/card/NitroCardView.tsx +++ b/src/layout/card/NitroCardView.tsx @@ -5,12 +5,12 @@ import { NitroCardViewProps } from './NitroCardView.types'; export const NitroCardView: FC = props => { - const { className = '', disableDrag = false, simple = false, theme = 'primary', children = null } = props; + const { className = '', simple = false, theme = 'primary', children = null, ...rest } = props; return (
- +
{ children }
diff --git a/src/layout/card/NitroCardView.types.ts b/src/layout/card/NitroCardView.types.ts index fcdd2f9a..0e41ed2f 100644 --- a/src/layout/card/NitroCardView.types.ts +++ b/src/layout/card/NitroCardView.types.ts @@ -1,7 +1,8 @@ -export interface NitroCardViewProps +import { DraggableWindowProps } from '../draggable-window'; + +export interface NitroCardViewProps extends DraggableWindowProps { className?: string; - disableDrag?: boolean; simple?: boolean; theme?: string; } diff --git a/src/layout/draggable-window/DraggableWindow.tsx b/src/layout/draggable-window/DraggableWindow.tsx index e9fc0537..0a299d42 100644 --- a/src/layout/draggable-window/DraggableWindow.tsx +++ b/src/layout/draggable-window/DraggableWindow.tsx @@ -1,19 +1,27 @@ -import { FC, MouseEvent, useCallback, useEffect, useMemo, useRef } from 'react'; -import Draggable from 'react-draggable'; -import { DraggableWindowProps } from './DraggableWindow.types'; +import { MouseEventType } from '@nitrots/nitro-renderer'; +import { FC, Key, MouseEvent as ReactMouseEvent, useCallback, useEffect, useRef, useState } from 'react'; +import { DraggableWindowPosition, DraggableWindowProps } from './DraggableWindow.types'; -const currentWindows: HTMLDivElement[] = []; +const CURRENT_WINDOWS: HTMLElement[] = []; +const POS_MEMORY: Map = new Map(); +const BOUNDS_THRESHOLD_TOP: number = 0; +const BOUNDS_THRESHOLD_LEFT: number = 0; export const DraggableWindow: FC = props => { - const { disableDrag = false, noCenter = false, handle = '.drag-handler', draggableOptions = {}, children = null } = props; + const { uniqueKey = null, handleSelector = '.drag-handler', position = DraggableWindowPosition.CENTER, disableDrag = false, children = null } = props; + const [ delta, setDelta ] = useState<{ x: number, y: number }>(null); + const [ offset, setOffset ] = useState<{ x: number, y: number }>(null); + const [ start, setStart ] = useState<{ x: number, y: number }>({ x: 0, y: 0 }); + const [ isDragging, setIsDragging ] = useState(false); + const [ dragHandler, setDragHandler ] = useState(null); const elementRef = useRef(); const bringToTop = useCallback(() => { let zIndex = 400; - for(const existingWindow of currentWindows) + for(const existingWindow of CURRENT_WINDOWS) { zIndex += 1; @@ -21,69 +29,170 @@ export const DraggableWindow: FC = props => } }, []); - const onMouseDown = useCallback((event: MouseEvent) => + const onMouseDown = useCallback((event: ReactMouseEvent) => { - const index = currentWindows.indexOf(elementRef.current); + const index = CURRENT_WINDOWS.indexOf(elementRef.current); if(index === -1) { - currentWindows.push(elementRef.current); + CURRENT_WINDOWS.push(elementRef.current); } - else if(index === (currentWindows.length - 1)) return; + else if(index === (CURRENT_WINDOWS.length - 1)) return; else if(index >= 0) { - currentWindows.splice(index, 1); + CURRENT_WINDOWS.splice(index, 1); - currentWindows.push(elementRef.current); + CURRENT_WINDOWS.push(elementRef.current); } bringToTop(); }, [ bringToTop ]); + const onDragMouseDown = useCallback((event: MouseEvent) => + { + setStart({ x: event.clientX, y: event.clientY }); + setIsDragging(true); + }, []); + + const onDragMouseMove = useCallback((event: MouseEvent) => + { + setDelta({ x: (event.clientX - start.x), y: (event.clientY - start.y) }); + }, [ start ]); + + const onDragMouseUp = useCallback((event: MouseEvent) => + { + if(!elementRef.current || !dragHandler) return; + + let offsetX = (offset.x + delta.x); + let offsetY = (offset.y + delta.y); + + const left = elementRef.current.offsetLeft + offsetX; + const top = elementRef.current.offsetTop + offsetY; + + if(top < BOUNDS_THRESHOLD_TOP) + { + offsetY = -elementRef.current.offsetTop; + } + + else if((top + dragHandler.offsetHeight) >= (document.body.offsetHeight - BOUNDS_THRESHOLD_TOP)) + { + offsetY = (document.body.offsetHeight - elementRef.current.offsetHeight) - elementRef.current.offsetTop; + } + + if((left + elementRef.current.offsetWidth) < BOUNDS_THRESHOLD_LEFT) + { + offsetX = -elementRef.current.offsetLeft; + } + + else if(left >= (document.body.offsetWidth - BOUNDS_THRESHOLD_LEFT)) + { + offsetX = (document.body.offsetWidth - elementRef.current.offsetWidth) - elementRef.current.offsetLeft; + } + + setDelta({ x: 0, y: 0 }); + setOffset({ x: offsetX, y: offsetY }); + setIsDragging(false); + + if(uniqueKey !== null) POS_MEMORY.set(uniqueKey, { x: offsetX, y: offsetY }); + }, [ dragHandler, delta, offset, uniqueKey ]); + useEffect(() => { - if(!elementRef) return; - - const element = elementRef.current; + const element = (elementRef.current as HTMLElement); - currentWindows.push(element); + if(!element) return; + + CURRENT_WINDOWS.push(element); bringToTop(); - if(!noCenter) + if(!disableDrag) { - const left = ((document.body.clientWidth / 2) - (element.clientWidth / 2)); - const top = ((document.body.clientHeight / 2) - (element.clientHeight / 2)); + const handle = (element.querySelector(handleSelector) as HTMLElement); - element.style.left = `${ left }px`; - element.style.top = `${ top }px`; - } - else - { - element.style.left = `0px`; - element.style.top = `0px`; + if(handle) setDragHandler(handle); } - element.style.visibility = 'visible'; + let offsetX = 0; + let offsetY = 0; + + switch(position) + { + case DraggableWindowPosition.TOP_CENTER: + element.style.top = '50px'; + element.style.left = `calc(50vw - ${ (element.offsetWidth / 2) }px)`; + break; + case DraggableWindowPosition.CENTER: + element.style.top = `calc(50vh - ${ (element.offsetHeight / 2) }px)`; + element.style.left = `calc(50vw - ${ (element.offsetWidth / 2) }px)`; + break; + } + + if(uniqueKey !== null) + { + const memory = POS_MEMORY.get(uniqueKey); + + if(memory) + { + offsetX = memory.x; + offsetY = memory.y; + } + } + + setDelta({ x: 0, y: 0}); + setOffset({ x: offsetX, y: offsetY }); return () => { - const index = currentWindows.indexOf(element); + const index = CURRENT_WINDOWS.indexOf(element); - if(index >= 0) currentWindows.splice(index, 1); + if(index >= 0) CURRENT_WINDOWS.splice(index, 1); } - }, [ elementRef, noCenter, bringToTop ]); + }, [ handleSelector, position, uniqueKey, disableDrag, bringToTop ]); - const getWindowContent = useMemo(() => + useEffect(() => { - return ( -
- { children } -
- ); - }, [ children, onMouseDown ]); + if(!offset && !delta) return; + + const element = (elementRef.current as HTMLElement); - return disableDrag ? getWindowContent : { getWindowContent }; + if(!element) return; + + element.style.transform = `translate(${ offset.x + delta.x }px, ${ offset.y + delta.y }px)`; + element.style.visibility = 'visible'; + }, [ offset, delta ]); + + useEffect(() => + { + if(!dragHandler) return; + + dragHandler.addEventListener(MouseEventType.MOUSE_DOWN, onDragMouseDown); + + return () => + { + dragHandler.removeEventListener(MouseEventType.MOUSE_DOWN, onDragMouseDown); + } + }, [ dragHandler, onDragMouseDown ]); + + useEffect(() => + { + if(!isDragging) return; + + document.addEventListener(MouseEventType.MOUSE_UP, onDragMouseUp); + document.addEventListener(MouseEventType.MOUSE_MOVE, onDragMouseMove); + + return () => + { + document.removeEventListener(MouseEventType.MOUSE_UP, onDragMouseUp); + document.removeEventListener(MouseEventType.MOUSE_MOVE, onDragMouseMove); + } + }, [ isDragging, onDragMouseUp, onDragMouseMove ]); + + return ( +
+ { children } +
+ ); } diff --git a/src/layout/draggable-window/DraggableWindow.types.tsx b/src/layout/draggable-window/DraggableWindow.types.tsx index 9bba06fa..278e866a 100644 --- a/src/layout/draggable-window/DraggableWindow.types.tsx +++ b/src/layout/draggable-window/DraggableWindow.types.tsx @@ -1,11 +1,16 @@ -import { ReactNode } from 'react'; -import { DraggableProps } from 'react-draggable'; +import { Key } from 'react'; export interface DraggableWindowProps { - handle?: string; - draggableOptions?: Partial; + uniqueKey?: Key; + handleSelector?: string; + position?: string; disableDrag?: boolean; - noCenter?: boolean; - children?: ReactNode; +} + +export class DraggableWindowPosition +{ + public static CENTER: string = 'DWP_CENTER'; + public static TOP_CENTER: string = 'DWP_TOP_CENTER'; + public static NOTHING: string = 'DWP_NOTHING'; } From 812a0a80d62bed65bfb044cb5a694cdec848894b Mon Sep 17 00:00:00 2001 From: Bill Date: Mon, 9 Aug 2021 12:15:08 -0400 Subject: [PATCH 49/66] Add unique key for draggable --- src/views/achievements/AchievementsView.tsx | 2 +- src/views/avatar-editor/AvatarEditorView.tsx | 2 +- src/views/catalog/CatalogView.tsx | 2 +- src/views/friend-list/FriendListView.tsx | 2 +- src/views/inventory/InventoryView.tsx | 2 +- src/views/mod-tools/ModToolsView.tsx | 2 +- src/views/navigator/NavigatorView.tsx | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/views/achievements/AchievementsView.tsx b/src/views/achievements/AchievementsView.tsx index 892bca9d..a60d0638 100644 --- a/src/views/achievements/AchievementsView.tsx +++ b/src/views/achievements/AchievementsView.tsx @@ -40,7 +40,7 @@ export const AchievementsView: FC = props => { isVisible && - + setIsVisible(false) } />
diff --git a/src/views/avatar-editor/AvatarEditorView.tsx b/src/views/avatar-editor/AvatarEditorView.tsx index be5ea7df..e9f14a43 100644 --- a/src/views/avatar-editor/AvatarEditorView.tsx +++ b/src/views/avatar-editor/AvatarEditorView.tsx @@ -276,7 +276,7 @@ export const AvatarEditorView: FC = props => if(!isVisible || !figureData) return null; return ( - + setIsVisible(false) } /> { categories && (categories.size > 0) && Array.from(categories.keys()).map(category => diff --git a/src/views/catalog/CatalogView.tsx b/src/views/catalog/CatalogView.tsx index 008e0c06..736be0de 100644 --- a/src/views/catalog/CatalogView.tsx +++ b/src/views/catalog/CatalogView.tsx @@ -190,7 +190,7 @@ export const CatalogView: FC = props => { isVisible && - + { saveActivePages(); setIsVisible(false); } } /> { root && root.children.length && root.children.map((page, index) => diff --git a/src/views/friend-list/FriendListView.tsx b/src/views/friend-list/FriendListView.tsx index 8430cc5f..0163d7cd 100644 --- a/src/views/friend-list/FriendListView.tsx +++ b/src/views/friend-list/FriendListView.tsx @@ -84,7 +84,7 @@ export const FriendListView: FC = props => { isReady && createPortal(, document.getElementById('toolbar-friend-bar-container')) } { isVisible && - + setIsVisible(false) } />
{ LocalizeText('friendlist.search.friendscaption') }
diff --git a/src/views/inventory/InventoryView.tsx b/src/views/inventory/InventoryView.tsx index 3a337c29..91369e35 100644 --- a/src/views/inventory/InventoryView.tsx +++ b/src/views/inventory/InventoryView.tsx @@ -197,7 +197,7 @@ export const InventoryView: FC = props => { isVisible && - + { !furnitureState.tradeData && <> diff --git a/src/views/mod-tools/ModToolsView.tsx b/src/views/mod-tools/ModToolsView.tsx index 132f19f4..54f759d0 100644 --- a/src/views/mod-tools/ModToolsView.tsx +++ b/src/views/mod-tools/ModToolsView.tsx @@ -161,7 +161,7 @@ export const ModToolsView: FC = props => return ( { isVisible && - + setIsVisible(false) } /> diff --git a/src/views/navigator/NavigatorView.tsx b/src/views/navigator/NavigatorView.tsx index a64bf81a..62a60ab9 100644 --- a/src/views/navigator/NavigatorView.tsx +++ b/src/views/navigator/NavigatorView.tsx @@ -139,7 +139,7 @@ export const NavigatorView: FC = props => { isVisible && - + setIsVisible(false) } /> { topLevelContexts.map((context, index) => From fb740631c42deb3c1fe683a7faa666ada7cca8d1 Mon Sep 17 00:00:00 2001 From: Bill Date: Mon, 9 Aug 2021 12:23:20 -0400 Subject: [PATCH 50/66] Remove dependencies --- package-lock.json | 9 --------- package.json | 1 - 2 files changed, 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8c86d5d3..d2ba455a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14834,15 +14834,6 @@ "scheduler": "^0.20.2" } }, - "react-draggable": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/react-draggable/-/react-draggable-4.4.3.tgz", - "integrity": "sha512-jV4TE59MBuWm7gb6Ns3Q1mxX8Azffb7oTtDtBgFkxRvhDp38YAARmRplrj0+XGkhOJB5XziArX+4HUUABtyZ0w==", - "requires": { - "classnames": "^2.2.5", - "prop-types": "^15.6.0" - } - }, "react-error-overlay": { "version": "6.0.9", "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.9.tgz", diff --git a/package.json b/package.json index 8aa3854f..ddedcddc 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,6 @@ "react": "^17.0.2", "react-bootstrap": "^2.0.0-alpha.2", "react-dom": "^17.0.2", - "react-draggable": "^4.4.3", "react-scripts": "4.0.3", "react-slider": "^1.3.1", "react-transition-group": "^4.4.2", From 54ab6a5f616746b5f7f3db44cd864bb22755417d Mon Sep 17 00:00:00 2001 From: Bill Date: Mon, 9 Aug 2021 12:34:31 -0400 Subject: [PATCH 51/66] Update sliders --- .../views/actions/base/WiredActionBaseView.tsx | 7 ++++--- .../give-reward/WiredActionGiveRewardView.tsx | 17 ++++++++--------- ...WiredActionGiveScoreToPredefinedTeamView.tsx | 12 +++++++----- .../give-score/WiredActionGiveScoreView.tsx | 12 +++++++----- .../WiredActionMoveFurniToView.tsx | 7 ++++--- .../mute-user/WiredActionMuteUserView.tsx | 7 ++++--- .../WiredConditionTimeElapsedLessView.tsx | 7 ++++--- .../WiredConditionTimeElapsedMoreView.tsx | 7 ++++--- .../WiredConditionUserCountInRoomView.tsx | 12 +++++++----- .../WiredTriggerExecuteOnceView.tsx | 7 ++++--- .../WiredTriggerExecutePeriodicallyLongView.tsx | 7 ++++--- .../WiredTriggerExecutePeriodicallyView.tsx | 7 ++++--- .../WiredTriggerScoreAchievedView.tsx | 7 ++++--- 13 files changed, 65 insertions(+), 51 deletions(-) diff --git a/src/views/wired/views/actions/base/WiredActionBaseView.tsx b/src/views/wired/views/actions/base/WiredActionBaseView.tsx index cecd0b5b..0d7a4efa 100644 --- a/src/views/wired/views/actions/base/WiredActionBaseView.tsx +++ b/src/views/wired/views/actions/base/WiredActionBaseView.tsx @@ -1,6 +1,6 @@ import { WiredActionDefinition } from '@nitrots/nitro-renderer'; -import Slider from 'rc-slider'; import { FC, useCallback, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; import { LocalizeText } from '../../../../../utils/LocalizeText'; import { GetWiredTimeLocale } from '../../../common/GetWiredTimeLocale'; import { useWiredContext } from '../../../context/WiredContext'; @@ -34,10 +34,11 @@ export const WiredActionBaseView: FC = props => }
- setDelay(event) } />
diff --git a/src/views/wired/views/actions/give-reward/WiredActionGiveRewardView.tsx b/src/views/wired/views/actions/give-reward/WiredActionGiveRewardView.tsx index 0d857a67..039ddffa 100644 --- a/src/views/wired/views/actions/give-reward/WiredActionGiveRewardView.tsx +++ b/src/views/wired/views/actions/give-reward/WiredActionGiveRewardView.tsx @@ -1,5 +1,5 @@ -import Slider from 'rc-slider/lib/Slider'; import { FC, useCallback, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; import { LocalizeText } from '../../../../../utils/LocalizeText'; import { useWiredContext } from '../../../context/WiredContext'; import { WiredFurniType } from '../../../WiredView.types'; @@ -105,14 +105,13 @@ export const WiredActionGiveRewardView: FC<{}> = props => { !limitEnabled &&
Reward limit not set. Make sure rewards are badges or non-tradeable items.
} - { limitEnabled && setRewardsLimit(event) } - /> } + { limitEnabled && + setRewardsLimit(event) } /> }
How ofter can a user be rewarded?
diff --git a/src/views/wired/views/actions/give-score-to-predefined-team/WiredActionGiveScoreToPredefinedTeamView.tsx b/src/views/wired/views/actions/give-score-to-predefined-team/WiredActionGiveScoreToPredefinedTeamView.tsx index 3c5d444a..9e82c14d 100644 --- a/src/views/wired/views/actions/give-score-to-predefined-team/WiredActionGiveScoreToPredefinedTeamView.tsx +++ b/src/views/wired/views/actions/give-score-to-predefined-team/WiredActionGiveScoreToPredefinedTeamView.tsx @@ -1,5 +1,5 @@ -import Slider from 'rc-slider/lib/Slider'; import { FC, useCallback, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; import { LocalizeText } from '../../../../../utils/LocalizeText'; import { useWiredContext } from '../../../context/WiredContext'; import { WiredFurniType } from '../../../WiredView.types'; @@ -37,18 +37,20 @@ export const WiredActionGiveScoreToPredefinedTeamView: FC<{}> = props =>
- setPoints(event) } />
- setTime(event) } />
diff --git a/src/views/wired/views/actions/give-score/WiredActionGiveScoreView.tsx b/src/views/wired/views/actions/give-score/WiredActionGiveScoreView.tsx index 1360e889..3b909fbf 100644 --- a/src/views/wired/views/actions/give-score/WiredActionGiveScoreView.tsx +++ b/src/views/wired/views/actions/give-score/WiredActionGiveScoreView.tsx @@ -1,5 +1,5 @@ -import Slider from 'rc-slider/lib/Slider'; import { FC, useCallback, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; import { LocalizeText } from '../../../../../utils/LocalizeText'; import { useWiredContext } from '../../../context/WiredContext'; import { WiredFurniType } from '../../../WiredView.types'; @@ -34,18 +34,20 @@ export const WiredActionGiveScoreView: FC<{}> = props =>
- setPoints(event) } />
- setTime(event) } />
diff --git a/src/views/wired/views/actions/move-furni-to/WiredActionMoveFurniToView.tsx b/src/views/wired/views/actions/move-furni-to/WiredActionMoveFurniToView.tsx index 96bf209a..c36062f8 100644 --- a/src/views/wired/views/actions/move-furni-to/WiredActionMoveFurniToView.tsx +++ b/src/views/wired/views/actions/move-furni-to/WiredActionMoveFurniToView.tsx @@ -1,5 +1,5 @@ -import Slider from 'rc-slider/lib/Slider'; import { FC, useCallback, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; import { LocalizeText } from '../../../../../utils/LocalizeText'; import { useWiredContext } from '../../../context/WiredContext'; import { WiredFurniType } from '../../../WiredView.types'; @@ -53,10 +53,11 @@ export const WiredActionMoveFurniToView: FC<{}> = props =>
- setSpacing(event) } />
diff --git a/src/views/wired/views/actions/mute-user/WiredActionMuteUserView.tsx b/src/views/wired/views/actions/mute-user/WiredActionMuteUserView.tsx index 1c6f912f..5f4f8c44 100644 --- a/src/views/wired/views/actions/mute-user/WiredActionMuteUserView.tsx +++ b/src/views/wired/views/actions/mute-user/WiredActionMuteUserView.tsx @@ -1,5 +1,5 @@ -import Slider from 'rc-slider/lib/Slider'; import { FC, useCallback, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; import { LocalizeText } from '../../../../../utils/LocalizeText'; import { useWiredContext } from '../../../context/WiredContext'; import { WiredFurniType } from '../../../WiredView.types'; @@ -27,10 +27,11 @@ export const WiredActionMuteUserView: FC<{}> = props =>
- setTime(event) } />
diff --git a/src/views/wired/views/conditions/time-elapsed-less/WiredConditionTimeElapsedLessView.tsx b/src/views/wired/views/conditions/time-elapsed-less/WiredConditionTimeElapsedLessView.tsx index 72210acf..65e7252b 100644 --- a/src/views/wired/views/conditions/time-elapsed-less/WiredConditionTimeElapsedLessView.tsx +++ b/src/views/wired/views/conditions/time-elapsed-less/WiredConditionTimeElapsedLessView.tsx @@ -1,5 +1,5 @@ -import Slider from 'rc-slider/lib/Slider'; import { FC, useCallback, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; import { LocalizeText } from '../../../../../utils/LocalizeText'; import { GetWiredTimeLocale } from '../../../common/GetWiredTimeLocale'; import { useWiredContext } from '../../../context/WiredContext'; @@ -25,10 +25,11 @@ export const WiredConditionTimeElapsedLessView: FC<{}> = props =>
- setTime(event) } />
diff --git a/src/views/wired/views/conditions/time-elapsed-more/WiredConditionTimeElapsedMoreView.tsx b/src/views/wired/views/conditions/time-elapsed-more/WiredConditionTimeElapsedMoreView.tsx index a8210ccc..5b1fc350 100644 --- a/src/views/wired/views/conditions/time-elapsed-more/WiredConditionTimeElapsedMoreView.tsx +++ b/src/views/wired/views/conditions/time-elapsed-more/WiredConditionTimeElapsedMoreView.tsx @@ -1,5 +1,5 @@ -import Slider from 'rc-slider/lib/Slider'; import { FC, useCallback, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; import { LocalizeText } from '../../../../../utils/LocalizeText'; import { GetWiredTimeLocale } from '../../../common/GetWiredTimeLocale'; import { useWiredContext } from '../../../context/WiredContext'; @@ -25,10 +25,11 @@ export const WiredConditionTimeElapsedMoreView: FC<{}> = props =>
- setTime(event) } />
diff --git a/src/views/wired/views/conditions/user-count-in-room/WiredConditionUserCountInRoomView.tsx b/src/views/wired/views/conditions/user-count-in-room/WiredConditionUserCountInRoomView.tsx index aa07267b..92474103 100644 --- a/src/views/wired/views/conditions/user-count-in-room/WiredConditionUserCountInRoomView.tsx +++ b/src/views/wired/views/conditions/user-count-in-room/WiredConditionUserCountInRoomView.tsx @@ -1,5 +1,5 @@ -import Slider from 'rc-slider/lib/Slider'; import { FC, useCallback, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; import { LocalizeText } from '../../../../../utils/LocalizeText'; import { useWiredContext } from '../../../context/WiredContext'; import { WiredFurniType } from '../../../WiredView.types'; @@ -34,18 +34,20 @@ export const WiredConditionUserCountInRoomView: FC<{}> = props =>
- setMin(event) } />
- setMax(event) } />
diff --git a/src/views/wired/views/triggers/execute-once/WiredTriggerExecuteOnceView.tsx b/src/views/wired/views/triggers/execute-once/WiredTriggerExecuteOnceView.tsx index f9f7cb4c..647ddc9d 100644 --- a/src/views/wired/views/triggers/execute-once/WiredTriggerExecuteOnceView.tsx +++ b/src/views/wired/views/triggers/execute-once/WiredTriggerExecuteOnceView.tsx @@ -1,5 +1,5 @@ -import Slider from 'rc-slider/lib/Slider'; import { FC, useCallback, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; import { LocalizeText } from '../../../../../utils/LocalizeText'; import { GetWiredTimeLocale } from '../../../common/GetWiredTimeLocale'; import { useWiredContext } from '../../../context/WiredContext'; @@ -25,10 +25,11 @@ export const WiredTriggeExecuteOnceView: FC<{}> = props =>
- setTime(event) } />
diff --git a/src/views/wired/views/triggers/execute-periodically-long/WiredTriggerExecutePeriodicallyLongView.tsx b/src/views/wired/views/triggers/execute-periodically-long/WiredTriggerExecutePeriodicallyLongView.tsx index 5a444837..bb0b1d3d 100644 --- a/src/views/wired/views/triggers/execute-periodically-long/WiredTriggerExecutePeriodicallyLongView.tsx +++ b/src/views/wired/views/triggers/execute-periodically-long/WiredTriggerExecutePeriodicallyLongView.tsx @@ -1,6 +1,6 @@ import { FriendlyTime } from '@nitrots/nitro-renderer'; -import Slider from 'rc-slider/lib/Slider'; import { FC, useCallback, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; import { LocalizeText } from '../../../../../utils/LocalizeText'; import { useWiredContext } from '../../../context/WiredContext'; import { WiredFurniType } from '../../../WiredView.types'; @@ -25,10 +25,11 @@ export const WiredTriggeExecutePeriodicallyLongView: FC<{}> = props =>
- setTime(event) } />
diff --git a/src/views/wired/views/triggers/execute-periodically/WiredTriggerExecutePeriodicallyView.tsx b/src/views/wired/views/triggers/execute-periodically/WiredTriggerExecutePeriodicallyView.tsx index 98049d39..1570aa72 100644 --- a/src/views/wired/views/triggers/execute-periodically/WiredTriggerExecutePeriodicallyView.tsx +++ b/src/views/wired/views/triggers/execute-periodically/WiredTriggerExecutePeriodicallyView.tsx @@ -1,5 +1,5 @@ -import Slider from 'rc-slider/lib/Slider'; import { FC, useCallback, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; import { LocalizeText } from '../../../../../utils/LocalizeText'; import { GetWiredTimeLocale } from '../../../common/GetWiredTimeLocale'; import { useWiredContext } from '../../../context/WiredContext'; @@ -25,10 +25,11 @@ export const WiredTriggeExecutePeriodicallyView: FC<{}> = props =>
- setTime(event) } />
diff --git a/src/views/wired/views/triggers/score-achieved/WiredTriggerScoreAchievedView.tsx b/src/views/wired/views/triggers/score-achieved/WiredTriggerScoreAchievedView.tsx index a6c53191..b950f48d 100644 --- a/src/views/wired/views/triggers/score-achieved/WiredTriggerScoreAchievedView.tsx +++ b/src/views/wired/views/triggers/score-achieved/WiredTriggerScoreAchievedView.tsx @@ -1,5 +1,5 @@ -import Slider from 'rc-slider/lib/Slider'; import { FC, useCallback, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; import { LocalizeText } from '../../../../../utils/LocalizeText'; import { useWiredContext } from '../../../context/WiredContext'; import { WiredFurniType } from '../../../WiredView.types'; @@ -24,10 +24,11 @@ export const WiredTriggeScoreAchievedView: FC<{}> = props =>
- setPoints(event) } />
From 80fbb4b23f638fe3546bf3d6136a0fb946fe4fb1 Mon Sep 17 00:00:00 2001 From: Bill Date: Mon, 9 Aug 2021 12:34:45 -0400 Subject: [PATCH 52/66] Update dependencies --- package-lock.json | 85 ----------------------------------------------- package.json | 2 -- src/index.scss | 2 -- 3 files changed, 89 deletions(-) diff --git a/package-lock.json b/package-lock.json index d2ba455a..69072740 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4529,11 +4529,6 @@ "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" }, - "animate.css": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/animate.css/-/animate.css-4.1.1.tgz", - "integrity": "sha512-+mRmCTv6SbCmtYJCN4faJMNFVNN5EuCTTprDTAo7YzIGji2KADmakjVA3+8mVDkZ2Bf09vayB35lSQIex2+QaQ==" - }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -6969,11 +6964,6 @@ "integrity": "sha512-ml3lJIq9YjUfM9TUnEPvEYWFSwivwIGBPKpewX7tii7fwCazA8yCioGdqQcNsItPpfFvSJ3VIdMQPj60LJhcQA==", "dev": true }, - "dom-align": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/dom-align/-/dom-align-1.12.2.tgz", - "integrity": "sha512-pHuazgqrsTFrGU2WLDdXxCFabkdQDx72ddkraZNih1KsMcN5qsRSTR9O4VJRlwTPCPb5COYg3LOfiMHHcPInHg==" - }, "dom-converter": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", @@ -14588,71 +14578,6 @@ } } }, - "rc-align": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/rc-align/-/rc-align-4.0.9.tgz", - "integrity": "sha512-myAM2R4qoB6LqBul0leaqY8gFaiECDJ3MtQDmzDo9xM9NRT/04TvWOYd2YHU9zvGzqk9QXF6S9/MifzSKDZeMw==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "2.x", - "dom-align": "^1.7.0", - "rc-util": "^5.3.0", - "resize-observer-polyfill": "^1.5.1" - } - }, - "rc-motion": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/rc-motion/-/rc-motion-2.4.4.tgz", - "integrity": "sha512-ms7n1+/TZQBS0Ydd2Q5P4+wJTSOrhIrwNxLXCZpR7Fa3/oac7Yi803HDALc2hLAKaCTQtw9LmQeB58zcwOsqlQ==", - "requires": { - "@babel/runtime": "^7.11.1", - "classnames": "^2.2.1", - "rc-util": "^5.2.1" - } - }, - "rc-slider": { - "version": "9.7.2", - "resolved": "https://registry.npmjs.org/rc-slider/-/rc-slider-9.7.2.tgz", - "integrity": "sha512-mVaLRpDo6otasBs6yVnG02ykI3K6hIrLTNfT5eyaqduFv95UODI9PDS6fWuVVehVpdS4ENgOSwsTjrPVun+k9g==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.5", - "rc-tooltip": "^5.0.1", - "rc-util": "^5.0.0", - "shallowequal": "^1.1.0" - } - }, - "rc-tooltip": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/rc-tooltip/-/rc-tooltip-5.1.1.tgz", - "integrity": "sha512-alt8eGMJulio6+4/uDm7nvV+rJq9bsfxFDCI0ljPdbuoygUscbsMYb6EQgwib/uqsXQUvzk+S7A59uYHmEgmDA==", - "requires": { - "@babel/runtime": "^7.11.2", - "rc-trigger": "^5.0.0" - } - }, - "rc-trigger": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-5.2.9.tgz", - "integrity": "sha512-0Bxsh2Xe+etejMn73am+jZBcOpsueAZiEKLiGoDfA0fvm/JHLNOiiww3zJ0qgyPOTmbYxhsxFcGOZu+VcbaZhQ==", - "requires": { - "@babel/runtime": "^7.11.2", - "classnames": "^2.2.6", - "rc-align": "^4.0.0", - "rc-motion": "^2.0.0", - "rc-util": "^5.5.0" - } - }, - "rc-util": { - "version": "5.13.1", - "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.13.1.tgz", - "integrity": "sha512-Dws2tjXBBihfjVQFlG5JzZ/5O3Wutctm0W94Wb1+M7GD2roWJPrQdSa4AkWm2pn0Ms32zoVPPkWodFeAYZPLfA==", - "requires": { - "@babel/runtime": "^7.12.5", - "react-is": "^16.12.0", - "shallowequal": "^1.1.0" - } - }, "react": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", @@ -15301,11 +15226,6 @@ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" }, - "resize-observer-polyfill": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", - "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" - }, "resolve": { "version": "1.18.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz", @@ -16096,11 +16016,6 @@ "safe-buffer": "^5.0.1" } }, - "shallowequal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" - }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", diff --git a/package.json b/package.json index ddedcddc..116274d8 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,8 @@ "private": true, "dependencies": { "@nitrots/nitro-renderer": "file:../nitro-renderer", - "animate.css": "^4.1.1", "classnames": "^2.3.1", "node-sass": "^5.0.0", - "rc-slider": "^9.7.2", "react": "^17.0.2", "react-bootstrap": "^2.0.0-alpha.2", "react-dom": "^17.0.2", diff --git a/src/index.scss b/src/index.scss index 08696a5c..73ca3e87 100644 --- a/src/index.scss +++ b/src/index.scss @@ -1,6 +1,4 @@ @import url('https://fonts.googleapis.com/css2?family=Ubuntu+Condensed:wght@300;400;500&display=swap'); -@import '../node_modules/animate.css/animate.css'; -@import '../node_modules/rc-slider/assets/index.css'; @import './assets/styles'; html, From 5defa0fd0cdf764791feafa533d03a8a4913dfea Mon Sep 17 00:00:00 2001 From: Bill Date: Mon, 9 Aug 2021 12:35:17 -0400 Subject: [PATCH 53/66] More draggable updates --- src/layout/mini-camera/NitroLayoutMiniCameraView.tsx | 2 +- src/layout/trophy/NitroLayoutTrophyView.tsx | 2 +- .../views/rentable-bot-chat/AvatarInfoRentableBotChatView.tsx | 4 ++-- .../furniture/friend-furni/FurnitureFriendFurniView.tsx | 2 +- .../room/widgets/furniture/stickie/FurnitureStickieView.tsx | 3 ++- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/layout/mini-camera/NitroLayoutMiniCameraView.tsx b/src/layout/mini-camera/NitroLayoutMiniCameraView.tsx index d209586d..ea1b34f8 100644 --- a/src/layout/mini-camera/NitroLayoutMiniCameraView.tsx +++ b/src/layout/mini-camera/NitroLayoutMiniCameraView.tsx @@ -25,7 +25,7 @@ export const NitroLayoutMiniCameraView: FC = pro }, [ roomId, getCameraBounds, textureReceiver ]); return ( - +
diff --git a/src/layout/trophy/NitroLayoutTrophyView.tsx b/src/layout/trophy/NitroLayoutTrophyView.tsx index 0d66ef49..3f34e210 100644 --- a/src/layout/trophy/NitroLayoutTrophyView.tsx +++ b/src/layout/trophy/NitroLayoutTrophyView.tsx @@ -8,7 +8,7 @@ export const NitroLayoutTrophyView: FC = props => const { color = '', message = '', date = '', senderName = '', onCloseClick = null } = props; return ( - +
diff --git a/src/views/room/widgets/avatar-info/views/rentable-bot-chat/AvatarInfoRentableBotChatView.tsx b/src/views/room/widgets/avatar-info/views/rentable-bot-chat/AvatarInfoRentableBotChatView.tsx index ac51bf0f..f39f7f26 100644 --- a/src/views/room/widgets/avatar-info/views/rentable-bot-chat/AvatarInfoRentableBotChatView.tsx +++ b/src/views/room/widgets/avatar-info/views/rentable-bot-chat/AvatarInfoRentableBotChatView.tsx @@ -1,5 +1,5 @@ import { FC } from 'react'; -import { DraggableWindow } from '../../../../../../layout'; +import { DraggableWindow, DraggableWindowPosition } from '../../../../../../layout'; import { ObjectLocationView } from '../../../object-location/ObjectLocationView'; import { AvatarInfoRentableBotChatViewProps } from './AvatarInfoRentableBotChatView.types'; @@ -8,7 +8,7 @@ export const AvatarInfoRentableBotChatView: FC +
test!!!!!
diff --git a/src/views/room/widgets/furniture/friend-furni/FurnitureFriendFurniView.tsx b/src/views/room/widgets/furniture/friend-furni/FurnitureFriendFurniView.tsx index 392967c0..e67b9e5f 100644 --- a/src/views/room/widgets/furniture/friend-furni/FurnitureFriendFurniView.tsx +++ b/src/views/room/widgets/furniture/friend-furni/FurnitureFriendFurniView.tsx @@ -119,7 +119,7 @@ export const FurnitureFriendFurniView: FC<{}> = props =>
} - { engravingLockData && engravingLockData.usernames.length > 0 && + { engravingLockData && engravingLockData.usernames.length > 0 &&
processAction('close_view') }>
diff --git a/src/views/room/widgets/furniture/stickie/FurnitureStickieView.tsx b/src/views/room/widgets/furniture/stickie/FurnitureStickieView.tsx index e0bad98d..d839f214 100644 --- a/src/views/room/widgets/furniture/stickie/FurnitureStickieView.tsx +++ b/src/views/room/widgets/furniture/stickie/FurnitureStickieView.tsx @@ -3,6 +3,7 @@ import { FC, useCallback, useState } from 'react'; import { GetRoomEngine, GetRoomSession, GetSessionDataManager } from '../../../../../api'; import { CreateEventDispatcherHook } from '../../../../../hooks/events/event-dispatcher.base'; import { useRoomEngineEvent } from '../../../../../hooks/events/nitro/room/room-engine-event'; +import { DraggableWindowPosition } from '../../../../../layout'; import { DraggableWindow } from '../../../../../layout/draggable-window/DraggableWindow'; import { ColorUtils } from '../../../../../utils/ColorUtils'; import { useRoomContext } from '../../../context/RoomContext'; @@ -114,7 +115,7 @@ export const FurnitureStickieView: FC<{}> = props => if(!stickieData) return null; return ( - +
From 3b5974a67b6e25ca91cc5d8b59d8e4d96c16e902 Mon Sep 17 00:00:00 2001 From: Bill Date: Mon, 9 Aug 2021 12:35:22 -0400 Subject: [PATCH 54/66] Update config --- public/ui-config.json | 49 +------------------------------------------ 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/public/ui-config.json b/public/ui-config.json index 5057190c..2cd31c79 100644 --- a/public/ui-config.json +++ b/public/ui-config.json @@ -1,57 +1,10 @@ { "image.library.notifications.url": "${image.library.url}notifications/%image%.png", "achievements.images.url": "${image.library.url}Quests/%image%.png", + "camera.url": "https://nitro.nitrots.co/camera", "thumbnails.url": "https://nitro.nitrots.co/camera/thumbnail/%thumbnail%.png", "url.prefix": "http://localhost:3000", "chat.viewer.height.percentage": 0.40, - "auth.system.enabled": true, - "auth.system.http.enabled": true, - "auth.system.http.endpoint.login": "https://reqres.in/api/posts", - "auth.system.http.endpoint.register": "https://reqres.in/api/posts", - "auth.system.sso_field_name": "username", - "auth.system.recaptcha.public_key": "", - "auth.system.recaptcha.field_name": "recaptcha", - "auth.system.login.fields": [ - { - "name": "username", - "label": "Username", - "type": "text", - "col": 12 - }, - { - "name": "password", - "label": "Password", - "type": "password", - "col": 12 - } - ], - "auth.system.register.enabled": true, - "auth.system.register.fields": [ - { - "name": "username", - "label": "Username", - "type": "text", - "col": 12 - }, - { - "name": "email", - "label": "Email Address", - "type": "email", - "col": 12 - }, - { - "name": "password", - "label": "Password", - "type": "password", - "col": 6 - }, - { - "name": "confirm_password", - "label": "Confirm Password", - "type": "password", - "col": 6 - } - ], "navigator.slider.enabled": true, "navigator.slider.content": [ { From 63f41afe5894a6c16355087afc194b560d0e5f68 Mon Sep 17 00:00:00 2001 From: Bill Date: Tue, 10 Aug 2021 15:08:09 -0400 Subject: [PATCH 55/66] Update RoomView --- src/views/room/RoomView.tsx | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/views/room/RoomView.tsx b/src/views/room/RoomView.tsx index ed5f14aa..a82d4b9a 100644 --- a/src/views/room/RoomView.tsx +++ b/src/views/room/RoomView.tsx @@ -1,6 +1,5 @@ import { EventDispatcher, NitroRectangle, RoomGeometry, RoomVariableEnum, Vector3d } from '@nitrots/nitro-renderer'; -import { FC, useEffect, useState } from 'react'; -import { createPortal } from 'react-dom'; +import { FC, useEffect, useRef, useState } from 'react'; import { GetNitroInstance, InitializeRoomInstanceRenderingCanvas } from '../../api'; import { DispatchMouseEvent } from '../../api/nitro/room/DispatchMouseEvent'; import { DispatchTouchEvent } from '../../api/nitro/room/DispatchTouchEvent'; @@ -21,6 +20,7 @@ export const RoomView: FC = props => const [ roomCanvas, setRoomCanvas ] = useState(null); const [ canvasId, setCanvasId ] = useState(-1); const [ widgetHandler, setWidgetHandler ] = useState(null); + const elementRef = useRef(); useEffect(() => { @@ -111,6 +111,8 @@ export const RoomView: FC = props => GetNitroInstance().render(); } + if(elementRef && elementRef.current) elementRef.current.appendChild(canvas); + setRoomCanvas(canvas); setCanvasId(canvasId); }, [ roomSession ]); @@ -119,15 +121,12 @@ export const RoomView: FC = props => return ( -
-
- { roomCanvas && createPortal(null, document.getElementById('room-view').appendChild(roomCanvas)) } - { widgetHandler && - <> - - - } -
+
+ { widgetHandler && + <> + + + } ); } From 47061493427cafff3f042e6c0f71f607524ca68d Mon Sep 17 00:00:00 2001 From: Dank074 Date: Tue, 10 Aug 2021 19:47:16 -0500 Subject: [PATCH 56/66] created user and furni choosers --- package.json | 1 + .../room-widgets/choosers/RoomObjectItem.ts | 28 +++++ .../choosers/RoomWidgetChooserContentEvent.ts | 29 +++++ src/views/room/RoomView.tsx | 4 + .../handlers/FurniChooserWidgetHandler.ts | 108 ++++++++++++++++ .../room/handlers/UserChooserWidgetHandler.ts | 84 +++++++++++++ src/views/room/widgets/RoomWidgets.scss | 1 + src/views/room/widgets/RoomWidgetsView.tsx | 4 + .../widgets/choosers/ChooserWidgetView.scss | 9 ++ .../choosers/FurniChooserWidgetView.tsx | 118 ++++++++++++++++++ .../choosers/UserChooserWidgetView.tsx | 117 +++++++++++++++++ .../room/widgets/choosers/utils/sorting.ts | 18 +++ 12 files changed, 521 insertions(+) create mode 100644 src/events/room-widgets/choosers/RoomObjectItem.ts create mode 100644 src/events/room-widgets/choosers/RoomWidgetChooserContentEvent.ts create mode 100644 src/views/room/handlers/FurniChooserWidgetHandler.ts create mode 100644 src/views/room/handlers/UserChooserWidgetHandler.ts create mode 100644 src/views/room/widgets/choosers/ChooserWidgetView.scss create mode 100644 src/views/room/widgets/choosers/FurniChooserWidgetView.tsx create mode 100644 src/views/room/widgets/choosers/UserChooserWidgetView.tsx create mode 100644 src/views/room/widgets/choosers/utils/sorting.ts diff --git a/package.json b/package.json index 8aa3854f..6ec3672f 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "react-scripts": "4.0.3", "react-slider": "^1.3.1", "react-transition-group": "^4.4.2", + "react-virtualized": "^9.22.3", "typescript": "^4.3.5", "web-vitals": "^1.1.2" }, diff --git a/src/events/room-widgets/choosers/RoomObjectItem.ts b/src/events/room-widgets/choosers/RoomObjectItem.ts new file mode 100644 index 00000000..d11fc5a8 --- /dev/null +++ b/src/events/room-widgets/choosers/RoomObjectItem.ts @@ -0,0 +1,28 @@ +export class RoomObjectItem +{ + private readonly _id: number; + private readonly _category: number; + private readonly _name: string; + + constructor(id: number, category: number, name: string) + { + this._id = id; + this._category = category; + this._name = name; + } + + public get id(): number + { + return this._id; + } + + public get category(): number + { + return this._category; + } + + public get name(): string + { + return this._name; + } +} diff --git a/src/events/room-widgets/choosers/RoomWidgetChooserContentEvent.ts b/src/events/room-widgets/choosers/RoomWidgetChooserContentEvent.ts new file mode 100644 index 00000000..aabb254e --- /dev/null +++ b/src/events/room-widgets/choosers/RoomWidgetChooserContentEvent.ts @@ -0,0 +1,29 @@ +import { RoomWidgetUpdateEvent } from '../../../views/room/events'; +import { RoomObjectItem } from './RoomObjectItem'; + +export class RoomWidgetChooserContentEvent extends RoomWidgetUpdateEvent +{ + public static USER_CHOOSER_CONTENT: string = 'RWCCE_USER_CHOOSER_CONTENT'; + public static FURNI_CHOOSER_CONTENT: string = 'RWCCE_FURNI_CHOOSER_CONTENT'; + + private _items: RoomObjectItem[]; + private _isAnyRoomController: boolean; + + constructor(type: string, items: RoomObjectItem[], isAnyRoomController: boolean = false) + { + super(type); + + this._items = items.slice(); + this._isAnyRoomController = isAnyRoomController; + } + + public get items(): RoomObjectItem[] + { + return this._items; + } + + public get isAnyRoomController(): boolean + { + return this._isAnyRoomController; + } +} diff --git a/src/views/room/RoomView.tsx b/src/views/room/RoomView.tsx index ed5f14aa..0d7a0362 100644 --- a/src/views/room/RoomView.tsx +++ b/src/views/room/RoomView.tsx @@ -8,9 +8,11 @@ import { GetRoomEngine } from '../../api/nitro/room/GetRoomEngine'; import { RoomContextProvider } from './context/RoomContext'; import { RoomWidgetUpdateRoomViewEvent } from './events/RoomWidgetUpdateRoomViewEvent'; import { IRoomWidgetHandlerManager, RoomWidgetAvatarInfoHandler, RoomWidgetChatHandler, RoomWidgetChatInputHandler, RoomWidgetHandlerManager, RoomWidgetInfostandHandler } from './handlers'; +import { FurniChooserWidgetHandler } from './handlers/FurniChooserWidgetHandler'; import { FurnitureContextMenuWidgetHandler } from './handlers/FurnitureContextMenuWidgetHandler'; import { FurnitureCustomStackHeightWidgetHandler } from './handlers/FurnitureCustomStackHeightWidgetHandler'; import { RoomWidgetRoomToolsHandler } from './handlers/RoomWidgetRoomToolsHandler'; +import { UserChooserWidgetHandler } from './handlers/UserChooserWidgetHandler'; import { RoomColorView } from './RoomColorView'; import { RoomViewProps } from './RoomView.types'; import { RoomWidgetsView } from './widgets/RoomWidgetsView'; @@ -44,6 +46,8 @@ export const RoomView: FC = props => widgetHandlerManager.registerHandler(new RoomWidgetChatHandler()); widgetHandlerManager.registerHandler(new FurnitureContextMenuWidgetHandler()); widgetHandlerManager.registerHandler(new FurnitureCustomStackHeightWidgetHandler()); + widgetHandlerManager.registerHandler(new FurniChooserWidgetHandler()); + widgetHandlerManager.registerHandler(new UserChooserWidgetHandler()); setWidgetHandler(widgetHandlerManager); diff --git a/src/views/room/handlers/FurniChooserWidgetHandler.ts b/src/views/room/handlers/FurniChooserWidgetHandler.ts new file mode 100644 index 00000000..2e2c7630 --- /dev/null +++ b/src/views/room/handlers/FurniChooserWidgetHandler.ts @@ -0,0 +1,108 @@ +import { NitroEvent, RoomObjectCategory, RoomObjectVariable, RoomWidgetEnum } from '@nitrots/nitro-renderer'; +import { GetNitroInstance, GetRoomEngine, GetSessionDataManager } from '../../../api'; +import { RoomObjectItem } from '../../../events/room-widgets/choosers/RoomObjectItem'; +import { RoomWidgetChooserContentEvent } from '../../../events/room-widgets/choosers/RoomWidgetChooserContentEvent'; +import { dispatchUiEvent } from '../../../hooks'; +import { RoomWidgetUpdateEvent } from '../events'; +import { RoomWidgetMessage, RoomWidgetRequestWidgetMessage, RoomWidgetRoomObjectMessage } from '../messages'; +import { dynamicSort } from '../widgets/choosers/utils/sorting'; +import { RoomWidgetHandler } from './RoomWidgetHandler'; + +export class FurniChooserWidgetHandler extends RoomWidgetHandler +{ + public processEvent(event: NitroEvent): void + { + } + + public processWidgetMessage(message: RoomWidgetMessage): RoomWidgetUpdateEvent + { + if(!message) return null; + + switch(message.type) + { + case RoomWidgetRequestWidgetMessage.FURNI_CHOOSER: + this.processFurniChooser(); + break; + case RoomWidgetRoomObjectMessage.SELECT_OBJECT: + this.selectFurni(message); + break; + } + + return null; + } + + private selectFurni(message: RoomWidgetMessage): void + { + const event = message as RoomWidgetRoomObjectMessage; + + if(event == null) return; + + if(event.category === RoomObjectCategory.WALL || event.category === RoomObjectCategory.FLOOR) + { + GetRoomEngine().selectRoomObject(this.container.roomSession.roomId, event.id, event.category); + } + } + + private processFurniChooser(): void + { + + if(this.container == null || this.container.roomSession == null || GetRoomEngine() == null || this.container.roomSession.userDataManager == null) return; + + const roomId = this.container.roomSession.roomId; + const furniInRoom : RoomObjectItem[] = []; + + furniInRoom.push(...GetRoomEngine().getRoomObjects(roomId, RoomObjectCategory.WALL).map(roomObject => { + const type = roomObject.type; + let name = null; + if(type.startsWith('poster')) + { + const posterNumber = Number.parseInt(type.replace('poster', '')); + name = GetNitroInstance().localization.getValue('poster_' + posterNumber + '_name'); + } + else + { + const furniTypeId = Number.parseInt(roomObject.model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID)); + const wallItemData = GetSessionDataManager().getWallItemData(furniTypeId); + if(wallItemData != null && wallItemData.name.length > 0) + { + name = wallItemData.name; + } + else + { + name = type; + } + } + return new RoomObjectItem(roomObject.id, RoomObjectCategory.WALL, name) + })); + + furniInRoom.push(...GetRoomEngine().getRoomObjects(roomId, RoomObjectCategory.FLOOR).map(roomObject => { + const furniTypeId = Number.parseInt(roomObject.model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID)); + const floorItemData = GetSessionDataManager().getFloorItemData(furniTypeId); + const name = floorItemData != null ? floorItemData.name : roomObject.type; + + return new RoomObjectItem(roomObject.id, RoomObjectCategory.FLOOR, name); + })); + + furniInRoom.sort(dynamicSort('name')); + + dispatchUiEvent(new RoomWidgetChooserContentEvent(RoomWidgetChooserContentEvent.FURNI_CHOOSER_CONTENT, furniInRoom, false)); + } + + public get type(): string + { + return RoomWidgetEnum.FURNI_CHOOSER; + } + + public get eventTypes(): string[] + { + return []; + } + + public get messageTypes(): string[] + { + return [ + RoomWidgetRequestWidgetMessage.FURNI_CHOOSER, + RoomWidgetRoomObjectMessage.SELECT_OBJECT + ]; + } +} diff --git a/src/views/room/handlers/UserChooserWidgetHandler.ts b/src/views/room/handlers/UserChooserWidgetHandler.ts new file mode 100644 index 00000000..379b479d --- /dev/null +++ b/src/views/room/handlers/UserChooserWidgetHandler.ts @@ -0,0 +1,84 @@ +import { NitroEvent, RoomObjectCategory, RoomWidgetEnum } from '@nitrots/nitro-renderer'; +import { RoomWidgetHandler } from '.'; +import { GetRoomEngine } from '../../../api'; +import { RoomObjectItem } from '../../../events/room-widgets/choosers/RoomObjectItem'; +import { RoomWidgetChooserContentEvent } from '../../../events/room-widgets/choosers/RoomWidgetChooserContentEvent'; +import { dispatchUiEvent } from '../../../hooks'; +import { RoomWidgetUpdateEvent } from '../events'; +import { RoomWidgetMessage, RoomWidgetRequestWidgetMessage, RoomWidgetRoomObjectMessage } from '../messages'; +import { dynamicSort } from '../widgets/choosers/utils/sorting'; + +export class UserChooserWidgetHandler extends RoomWidgetHandler +{ + public processEvent(event: NitroEvent): void + { + } + + public processWidgetMessage(message: RoomWidgetMessage): RoomWidgetUpdateEvent + { + if(!message) return null; + + switch(message.type) + { + case RoomWidgetRequestWidgetMessage.USER_CHOOSER: + this.processUserChooser(); + break; + case RoomWidgetRoomObjectMessage.SELECT_OBJECT: + this.selectUnit(message); + break; + } + + return null; + } + + private processUserChooser(): void + { + + if(this.container == null || this.container.roomSession == null || GetRoomEngine() == null || this.container.roomSession.userDataManager == null) return; + + const roomId = this.container.roomSession.roomId; + const categoryId = RoomObjectCategory.UNIT; + const units = []; + + units.push(...GetRoomEngine().getRoomObjects(roomId, categoryId).map(roomObject => { + const unitData = this.container.roomSession.userDataManager.getUserDataByIndex(roomObject.id); + + if(!unitData) return null; + + return new RoomObjectItem(unitData.roomIndex, categoryId, unitData.name); + })); + + units.sort(dynamicSort('name')); + dispatchUiEvent(new RoomWidgetChooserContentEvent(RoomWidgetChooserContentEvent.USER_CHOOSER_CONTENT, units)); + } + + private selectUnit(k: RoomWidgetMessage): void + { + const event = k as RoomWidgetRoomObjectMessage; + + if(event == null) return; + + if(event.category === RoomObjectCategory.UNIT) + { + GetRoomEngine().selectRoomObject(this.container.roomSession.roomId, event.id, event.category); + } + } + + public get type(): string + { + return RoomWidgetEnum.USER_CHOOSER; + } + + public get eventTypes(): string[] + { + return []; + } + + public get messageTypes(): string[] + { + return [ + RoomWidgetRequestWidgetMessage.USER_CHOOSER, + RoomWidgetRoomObjectMessage.SELECT_OBJECT + ]; + } +} diff --git a/src/views/room/widgets/RoomWidgets.scss b/src/views/room/widgets/RoomWidgets.scss index ed284cd9..e7c33301 100644 --- a/src/views/room/widgets/RoomWidgets.scss +++ b/src/views/room/widgets/RoomWidgets.scss @@ -7,3 +7,4 @@ @import './infostand/InfoStandWidgetView'; @import './object-location/ObjectLocationView'; @import './room-tools/RoomToolsWidgetView'; +@import './choosers/ChooserWidgetView'; diff --git a/src/views/room/widgets/RoomWidgetsView.tsx b/src/views/room/widgets/RoomWidgetsView.tsx index 2ed8ba9d..66c85b43 100644 --- a/src/views/room/widgets/RoomWidgetsView.tsx +++ b/src/views/room/widgets/RoomWidgetsView.tsx @@ -9,6 +9,8 @@ import { AvatarInfoWidgetView } from './avatar-info/AvatarInfoWidgetView'; import { CameraWidgetView } from './camera/CameraWidgetView'; import { ChatInputView } from './chat-input/ChatInputView'; import { ChatWidgetView } from './chat/ChatWidgetView'; +import { FurniChooserWidgetView } from './choosers/FurniChooserWidgetView'; +import { UserChooserWidgetView } from './choosers/UserChooserWidgetView'; import { FurnitureWidgetsView } from './furniture/FurnitureWidgetsView'; import { InfoStandWidgetView } from './infostand/InfoStandWidgetView'; import { RoomThumbnailWidgetView } from './room-thumbnail/RoomThumbnailWidgetView'; @@ -246,6 +248,8 @@ export const RoomWidgetsView: FC = props => + + ); } diff --git a/src/views/room/widgets/choosers/ChooserWidgetView.scss b/src/views/room/widgets/choosers/ChooserWidgetView.scss new file mode 100644 index 00000000..bca2d777 --- /dev/null +++ b/src/views/room/widgets/choosers/ChooserWidgetView.scss @@ -0,0 +1,9 @@ +.chooser-widget { + .selected-item { + background-color: cadetblue; + } + .list-item { + color: black; + overflow: hidden; + } +} diff --git a/src/views/room/widgets/choosers/FurniChooserWidgetView.tsx b/src/views/room/widgets/choosers/FurniChooserWidgetView.tsx new file mode 100644 index 00000000..7bc25c54 --- /dev/null +++ b/src/views/room/widgets/choosers/FurniChooserWidgetView.tsx @@ -0,0 +1,118 @@ +import { FC, useCallback, useEffect, useState } from 'react'; +import List from 'react-virtualized/dist/commonjs/List'; +import { RoomObjectItem } from '../../../../events/room-widgets/choosers/RoomObjectItem'; +import { RoomWidgetChooserContentEvent } from '../../../../events/room-widgets/choosers/RoomWidgetChooserContentEvent'; +import { CreateEventDispatcherHook, useUiEvent } from '../../../../hooks'; +import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../layout'; +import { LocalizeText } from '../../../../utils'; +import { useRoomContext } from '../../context/RoomContext'; +import { RoomWidgetRoomObjectUpdateEvent } from '../../events'; +import { RoomWidgetRequestWidgetMessage, RoomWidgetRoomObjectMessage } from '../../messages'; + +export const FurniChooserWidgetView: FC = props => +{ + const [isVisible, setIsVisible] = useState(false); + const [items, setItems] = useState(null); + const [filteredItems, setFilteredItems] = useState(null); + const [selectedItem, setSelectedItem] = useState(null); + const [refreshTimeout, setRefreshTimeout] = useState>(null); + const [searchValue, setSearchValue] = useState(''); + const { eventDispatcher = null, widgetHandler = null } = useRoomContext(); + + const onFurniChooserContent = useCallback((event: RoomWidgetChooserContentEvent) => + { + setItems(event.items); + setIsVisible(true); + }, []); + + const onRoomWidgetRoomObjectUpdateEvent = useCallback((event: RoomWidgetRoomObjectUpdateEvent) => + { + if (!event || !isVisible) return; + + if (refreshTimeout) clearTimeout(refreshTimeout); + + setRefreshTimeout(setTimeout(() => + { + widgetHandler.processWidgetMessage(new RoomWidgetRequestWidgetMessage(RoomWidgetRequestWidgetMessage.FURNI_CHOOSER)); + }, 100)); + + }, [isVisible, refreshTimeout, widgetHandler]); + + useUiEvent(RoomWidgetChooserContentEvent.FURNI_CHOOSER_CONTENT, onFurniChooserContent); + CreateEventDispatcherHook(RoomWidgetRoomObjectUpdateEvent.FURNI_ADDED, eventDispatcher, onRoomWidgetRoomObjectUpdateEvent); + CreateEventDispatcherHook(RoomWidgetRoomObjectUpdateEvent.FURNI_REMOVED, eventDispatcher, onRoomWidgetRoomObjectUpdateEvent); + + useEffect(() => + { + if(!items) return; + + let filteredGroupItems = [ ...items ]; + + if(searchValue && searchValue.length) + { + const comparison = searchValue.toLocaleLowerCase(); + + filteredGroupItems = items.filter(item => + { + if(comparison && comparison.length) + { + if(item.name.toLocaleLowerCase().includes(comparison)) return item; + } + + return null; + }); + } + + setFilteredItems(filteredGroupItems); + }, [ items, searchValue, setFilteredItems ]); + + + const onClose = useCallback(() => + { + setIsVisible(false); + setItems(null); + }, []); + + const onClickItem = useCallback((item: RoomObjectItem) => + { + setSelectedItem(item); + widgetHandler.processWidgetMessage(new RoomWidgetRoomObjectMessage(RoomWidgetRoomObjectMessage.SELECT_OBJECT, item.id, item.category)); + }, [setSelectedItem, widgetHandler]); + + const rowRenderer = function ({ + key, // Unique key within array of rows + index, // Index of row within collection + isScrolling, // The List is currently being scrolled + isVisible, // This row is visible within the List (eg it is not an overscanned row) + style, // Style object to be applied to row (to position it) + }) + { + return ( +
onClickItem(filteredItems[index])} className={(selectedItem === filteredItems[index] ? 'selected-item ' : '') + 'list-item'}> + {filteredItems[index].name} - {filteredItems[index].id} +
+ ); + } + + if (!isVisible) return null; + + return ( +
+ + + +
+
+ setSearchValue(event.target.value)} /> +
+
+ +
+
+
+ ) +} diff --git a/src/views/room/widgets/choosers/UserChooserWidgetView.tsx b/src/views/room/widgets/choosers/UserChooserWidgetView.tsx new file mode 100644 index 00000000..86ebaafd --- /dev/null +++ b/src/views/room/widgets/choosers/UserChooserWidgetView.tsx @@ -0,0 +1,117 @@ +import { FC, useCallback, useEffect, useState } from 'react'; +import List from 'react-virtualized/dist/commonjs/List'; +import { RoomObjectItem } from '../../../../events/room-widgets/choosers/RoomObjectItem'; +import { RoomWidgetChooserContentEvent } from '../../../../events/room-widgets/choosers/RoomWidgetChooserContentEvent'; +import { CreateEventDispatcherHook, useUiEvent } from '../../../../hooks'; +import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../layout'; +import { LocalizeText } from '../../../../utils'; +import { useRoomContext } from '../../context/RoomContext'; +import { RoomWidgetRoomObjectUpdateEvent } from '../../events'; +import { RoomWidgetRequestWidgetMessage, RoomWidgetRoomObjectMessage } from '../../messages'; + +export const UserChooserWidgetView : FC = props => +{ + const [isVisible, setIsVisible] = useState(false); + const [items, setItems] = useState(null); + const [filteredItems, setFilteredItems] = useState(null); + const [selectedItem, setSelectedItem] = useState(null); + const [refreshTimeout, setRefreshTimeout] = useState>(null); + const [searchValue, setSearchValue] = useState(''); + const { eventDispatcher = null, widgetHandler = null } = useRoomContext(); + + const onUserChooserContent = useCallback((event: RoomWidgetChooserContentEvent) => + { + setItems(event.items); + setIsVisible(true); + }, []); + + const onRoomWidgetRoomObjectUpdateEvent = useCallback((event: RoomWidgetRoomObjectUpdateEvent) => + { + if (!event || !isVisible) return; + + if (refreshTimeout) clearTimeout(refreshTimeout); + + setRefreshTimeout(setTimeout(() => + { + widgetHandler.processWidgetMessage(new RoomWidgetRequestWidgetMessage(RoomWidgetRequestWidgetMessage.USER_CHOOSER)); + }, 100)); + + }, [isVisible, refreshTimeout, widgetHandler]); + + useUiEvent(RoomWidgetChooserContentEvent.USER_CHOOSER_CONTENT, onUserChooserContent); + CreateEventDispatcherHook(RoomWidgetRoomObjectUpdateEvent.USER_REMOVED, eventDispatcher, onRoomWidgetRoomObjectUpdateEvent); + CreateEventDispatcherHook(RoomWidgetRoomObjectUpdateEvent.USER_ADDED, eventDispatcher, onRoomWidgetRoomObjectUpdateEvent); + + useEffect(() => + { + if(!items) return; + + let filteredGroupItems = [ ...items ]; + + if(searchValue && searchValue.length) + { + const comparison = searchValue.toLocaleLowerCase(); + + filteredGroupItems = items.filter(item => + { + if(comparison && comparison.length) + { + if(item.name.toLocaleLowerCase().includes(comparison)) return item; + } + + return null; + }); + } + + setFilteredItems(filteredGroupItems); + }, [ items, searchValue, setFilteredItems ]); + + const onClose = useCallback(() => + { + setIsVisible(false); + setItems(null); + }, []); + + const onClickItem = useCallback((item: RoomObjectItem) => + { + setSelectedItem(item); + widgetHandler.processWidgetMessage(new RoomWidgetRoomObjectMessage(RoomWidgetRoomObjectMessage.SELECT_OBJECT, item.id, item.category)); + }, [setSelectedItem, widgetHandler]); + + const rowRenderer = function ({ + key, // Unique key within array of rows + index, // Index of row within collection + isScrolling, // The List is currently being scrolled + isVisible, // This row is visible within the List (eg it is not an overscanned row) + style, // Style object to be applied to row (to position it) + }) + { + return ( +
onClickItem(filteredItems[index])} className={(selectedItem === filteredItems[index] ? 'selected-item ' : '') + 'list-item'}> + {filteredItems[index].name} +
+ ); + } + + if(!isVisible) return null; + + return ( +
+ + + +
+
+ setSearchValue(event.target.value)} /> +
+
+ +
+
+
+ ); +} diff --git a/src/views/room/widgets/choosers/utils/sorting.ts b/src/views/room/widgets/choosers/utils/sorting.ts new file mode 100644 index 00000000..eee12529 --- /dev/null +++ b/src/views/room/widgets/choosers/utils/sorting.ts @@ -0,0 +1,18 @@ +export function dynamicSort(property) +{ + // Source: https://stackoverflow.com/questions/1129216/sort-array-of-objects-by-string-property-value + let sortOrder = 1; + if(property[0] === '-') + { + sortOrder = -1; + property = property.substr(1); + } + return function (a,b) + { + /* next line works with strings and numbers, + * and you may want to customize it to your needs + */ + const result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0; + return result * sortOrder; + }; +} From 05fa86d46440fdf7d297741e6e07766709ef1746 Mon Sep 17 00:00:00 2001 From: Dank074 Date: Wed, 11 Aug 2021 00:05:22 -0500 Subject: [PATCH 57/66] refactor choosers to use composition --- .../handlers/FurniChooserWidgetHandler.ts | 23 +++-- .../room/handlers/UserChooserWidgetHandler.ts | 14 ++- .../widgets/choosers/ChooserWidgetView.tsx | 87 ++++++++++++++++++ .../choosers/ChooserWidgetView.type.ts | 12 +++ .../choosers/FurniChooserWidgetView.tsx | 91 +------------------ .../choosers/UserChooserWidgetView.tsx | 91 +------------------ 6 files changed, 133 insertions(+), 185 deletions(-) create mode 100644 src/views/room/widgets/choosers/ChooserWidgetView.tsx create mode 100644 src/views/room/widgets/choosers/ChooserWidgetView.type.ts diff --git a/src/views/room/handlers/FurniChooserWidgetHandler.ts b/src/views/room/handlers/FurniChooserWidgetHandler.ts index 2e2c7630..9dc3f12e 100644 --- a/src/views/room/handlers/FurniChooserWidgetHandler.ts +++ b/src/views/room/handlers/FurniChooserWidgetHandler.ts @@ -51,8 +51,13 @@ export class FurniChooserWidgetHandler extends RoomWidgetHandler const roomId = this.container.roomSession.roomId; const furniInRoom : RoomObjectItem[] = []; - furniInRoom.push(...GetRoomEngine().getRoomObjects(roomId, RoomObjectCategory.WALL).map(roomObject => { - const type = roomObject.type; + const wallItems = GetRoomEngine().getRoomObjects(roomId, RoomObjectCategory.WALL); + const floorItems = GetRoomEngine().getRoomObjects(roomId, RoomObjectCategory.FLOOR); + + wallItems.forEach( wallItem => { + if(!wallItem) return; + + const type = wallItem.type; let name = null; if(type.startsWith('poster')) { @@ -61,7 +66,7 @@ export class FurniChooserWidgetHandler extends RoomWidgetHandler } else { - const furniTypeId = Number.parseInt(roomObject.model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID)); + const furniTypeId = Number.parseInt(wallItem.model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID)); const wallItemData = GetSessionDataManager().getWallItemData(furniTypeId); if(wallItemData != null && wallItemData.name.length > 0) { @@ -72,16 +77,18 @@ export class FurniChooserWidgetHandler extends RoomWidgetHandler name = type; } } - return new RoomObjectItem(roomObject.id, RoomObjectCategory.WALL, name) - })); + furniInRoom.push(new RoomObjectItem(wallItem.id, RoomObjectCategory.WALL, name)); + }); - furniInRoom.push(...GetRoomEngine().getRoomObjects(roomId, RoomObjectCategory.FLOOR).map(roomObject => { + floorItems.forEach(roomObject => { + if(!roomObject) return; + const furniTypeId = Number.parseInt(roomObject.model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID)); const floorItemData = GetSessionDataManager().getFloorItemData(furniTypeId); const name = floorItemData != null ? floorItemData.name : roomObject.type; - return new RoomObjectItem(roomObject.id, RoomObjectCategory.FLOOR, name); - })); + furniInRoom.push(new RoomObjectItem(roomObject.id, RoomObjectCategory.FLOOR, name)); + }); furniInRoom.sort(dynamicSort('name')); diff --git a/src/views/room/handlers/UserChooserWidgetHandler.ts b/src/views/room/handlers/UserChooserWidgetHandler.ts index 379b479d..ce889635 100644 --- a/src/views/room/handlers/UserChooserWidgetHandler.ts +++ b/src/views/room/handlers/UserChooserWidgetHandler.ts @@ -38,15 +38,19 @@ export class UserChooserWidgetHandler extends RoomWidgetHandler const roomId = this.container.roomSession.roomId; const categoryId = RoomObjectCategory.UNIT; - const units = []; + const units : RoomObjectItem[] = []; - units.push(...GetRoomEngine().getRoomObjects(roomId, categoryId).map(roomObject => { + const roomObjects = GetRoomEngine().getRoomObjects(roomId, categoryId); + + roomObjects.forEach(roomObject => { + if(!roomObject) return; + const unitData = this.container.roomSession.userDataManager.getUserDataByIndex(roomObject.id); - if(!unitData) return null; + if(!unitData) return; - return new RoomObjectItem(unitData.roomIndex, categoryId, unitData.name); - })); + units.push(new RoomObjectItem(unitData.roomIndex, categoryId, unitData.name)); + }); units.sort(dynamicSort('name')); dispatchUiEvent(new RoomWidgetChooserContentEvent(RoomWidgetChooserContentEvent.USER_CHOOSER_CONTENT, units)); diff --git a/src/views/room/widgets/choosers/ChooserWidgetView.tsx b/src/views/room/widgets/choosers/ChooserWidgetView.tsx new file mode 100644 index 00000000..05d3e7bf --- /dev/null +++ b/src/views/room/widgets/choosers/ChooserWidgetView.tsx @@ -0,0 +1,87 @@ +import { FC, useCallback, useEffect, useState } from 'react'; +import List from 'react-virtualized/dist/commonjs/List'; +import { RoomObjectItem } from '../../../../events/room-widgets/choosers/RoomObjectItem'; +import { CreateEventDispatcherHook } from '../../../../hooks'; +import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../layout'; +import { LocalizeText } from '../../../../utils'; +import { useRoomContext } from '../../context/RoomContext'; +import { RoomWidgetRoomObjectUpdateEvent } from '../../events'; +import { RoomWidgetRequestWidgetMessage, RoomWidgetRoomObjectMessage } from '../../messages'; +import { ChooserWidgetViewProps } from './ChooserWidgetView.type'; + +export const ChooserWidgetView: FC = props => +{ + const [filteredItems, setFilteredItems] = useState([]); + const [selectedItem, setSelectedItem] = useState(null); + const [refreshTimeout, setRefreshTimeout] = useState>(null); + const [searchValue, setSearchValue] = useState(''); + const { title = null, onCloseClick = null, displayItemId = false, items = null, messageType = null, roomWidgetRoomObjectUpdateEvents = null } = props; + const { eventDispatcher = null, widgetHandler = null } = useRoomContext(); + + useEffect(() => + { + if (!items) return; + + const filteredGroupItems = items.filter(item => + { + return item.name.toLocaleLowerCase().includes(searchValue.toLocaleLowerCase()); + }); + + setFilteredItems(filteredGroupItems); + }, [items, searchValue, setFilteredItems]); + + const onRoomWidgetRoomObjectUpdateEvent = useCallback((event: RoomWidgetRoomObjectUpdateEvent) => + { + if (!event) return; + + if (refreshTimeout) clearTimeout(refreshTimeout); + + setRefreshTimeout(setTimeout(() => + { + widgetHandler.processWidgetMessage(new RoomWidgetRequestWidgetMessage(messageType)); + }, 100)); + + }, [refreshTimeout, messageType, widgetHandler]); + + roomWidgetRoomObjectUpdateEvents.forEach(event => CreateEventDispatcherHook(event, eventDispatcher, onRoomWidgetRoomObjectUpdateEvent)); + + const onClickItem = useCallback((item: RoomObjectItem) => + { + setSelectedItem(item); + widgetHandler.processWidgetMessage(new RoomWidgetRoomObjectMessage(RoomWidgetRoomObjectMessage.SELECT_OBJECT, item.id, item.category)); + }, [setSelectedItem, widgetHandler]); + + const rowRenderer = function ({ + key, // Unique key within array of rows + index, // Index of row within collection + isScrolling, // The List is currently being scrolled + isVisible, // This row is visible within the List (eg it is not an overscanned row) + style, // Style object to be applied to row (to position it) + }) + { + return ( +
onClickItem(filteredItems[index])} className={(selectedItem === filteredItems[index] ? 'selected-item ' : '') + 'list-item'}> + {filteredItems[index].name} + {displayItemId && (' - ' + filteredItems[index].id)} +
+ ); + } + + return ( + + + +
+
+ setSearchValue(event.target.value)} /> +
+
+ +
+
+ ); +} diff --git a/src/views/room/widgets/choosers/ChooserWidgetView.type.ts b/src/views/room/widgets/choosers/ChooserWidgetView.type.ts new file mode 100644 index 00000000..87c9ef9f --- /dev/null +++ b/src/views/room/widgets/choosers/ChooserWidgetView.type.ts @@ -0,0 +1,12 @@ +import { MouseEvent } from 'react'; +import { RoomObjectItem } from '../../../../events/room-widgets/choosers/RoomObjectItem'; + +export interface ChooserWidgetViewProps +{ + title: string; + onCloseClick: (event: MouseEvent) => void; + displayItemId: boolean; + items: RoomObjectItem[]; + messageType: string; + roomWidgetRoomObjectUpdateEvents: string[]; +} diff --git a/src/views/room/widgets/choosers/FurniChooserWidgetView.tsx b/src/views/room/widgets/choosers/FurniChooserWidgetView.tsx index 7bc25c54..d3d1b617 100644 --- a/src/views/room/widgets/choosers/FurniChooserWidgetView.tsx +++ b/src/views/room/widgets/choosers/FurniChooserWidgetView.tsx @@ -1,23 +1,16 @@ -import { FC, useCallback, useEffect, useState } from 'react'; -import List from 'react-virtualized/dist/commonjs/List'; +import { FC, useCallback, useState } from 'react'; import { RoomObjectItem } from '../../../../events/room-widgets/choosers/RoomObjectItem'; import { RoomWidgetChooserContentEvent } from '../../../../events/room-widgets/choosers/RoomWidgetChooserContentEvent'; -import { CreateEventDispatcherHook, useUiEvent } from '../../../../hooks'; -import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../layout'; +import { useUiEvent } from '../../../../hooks'; import { LocalizeText } from '../../../../utils'; -import { useRoomContext } from '../../context/RoomContext'; import { RoomWidgetRoomObjectUpdateEvent } from '../../events'; -import { RoomWidgetRequestWidgetMessage, RoomWidgetRoomObjectMessage } from '../../messages'; +import { RoomWidgetRequestWidgetMessage } from '../../messages'; +import { ChooserWidgetView } from './ChooserWidgetView'; export const FurniChooserWidgetView: FC = props => { const [isVisible, setIsVisible] = useState(false); const [items, setItems] = useState(null); - const [filteredItems, setFilteredItems] = useState(null); - const [selectedItem, setSelectedItem] = useState(null); - const [refreshTimeout, setRefreshTimeout] = useState>(null); - const [searchValue, setSearchValue] = useState(''); - const { eventDispatcher = null, widgetHandler = null } = useRoomContext(); const onFurniChooserContent = useCallback((event: RoomWidgetChooserContentEvent) => { @@ -25,46 +18,7 @@ export const FurniChooserWidgetView: FC = props => setIsVisible(true); }, []); - const onRoomWidgetRoomObjectUpdateEvent = useCallback((event: RoomWidgetRoomObjectUpdateEvent) => - { - if (!event || !isVisible) return; - - if (refreshTimeout) clearTimeout(refreshTimeout); - - setRefreshTimeout(setTimeout(() => - { - widgetHandler.processWidgetMessage(new RoomWidgetRequestWidgetMessage(RoomWidgetRequestWidgetMessage.FURNI_CHOOSER)); - }, 100)); - - }, [isVisible, refreshTimeout, widgetHandler]); - useUiEvent(RoomWidgetChooserContentEvent.FURNI_CHOOSER_CONTENT, onFurniChooserContent); - CreateEventDispatcherHook(RoomWidgetRoomObjectUpdateEvent.FURNI_ADDED, eventDispatcher, onRoomWidgetRoomObjectUpdateEvent); - CreateEventDispatcherHook(RoomWidgetRoomObjectUpdateEvent.FURNI_REMOVED, eventDispatcher, onRoomWidgetRoomObjectUpdateEvent); - - useEffect(() => - { - if(!items) return; - - let filteredGroupItems = [ ...items ]; - - if(searchValue && searchValue.length) - { - const comparison = searchValue.toLocaleLowerCase(); - - filteredGroupItems = items.filter(item => - { - if(comparison && comparison.length) - { - if(item.name.toLocaleLowerCase().includes(comparison)) return item; - } - - return null; - }); - } - - setFilteredItems(filteredGroupItems); - }, [ items, searchValue, setFilteredItems ]); const onClose = useCallback(() => @@ -73,46 +27,11 @@ export const FurniChooserWidgetView: FC = props => setItems(null); }, []); - const onClickItem = useCallback((item: RoomObjectItem) => - { - setSelectedItem(item); - widgetHandler.processWidgetMessage(new RoomWidgetRoomObjectMessage(RoomWidgetRoomObjectMessage.SELECT_OBJECT, item.id, item.category)); - }, [setSelectedItem, widgetHandler]); - - const rowRenderer = function ({ - key, // Unique key within array of rows - index, // Index of row within collection - isScrolling, // The List is currently being scrolled - isVisible, // This row is visible within the List (eg it is not an overscanned row) - style, // Style object to be applied to row (to position it) - }) - { - return ( -
onClickItem(filteredItems[index])} className={(selectedItem === filteredItems[index] ? 'selected-item ' : '') + 'list-item'}> - {filteredItems[index].name} - {filteredItems[index].id} -
- ); - } - if (!isVisible) return null; return (
- - - -
-
- setSearchValue(event.target.value)} /> -
-
- -
-
+
) } diff --git a/src/views/room/widgets/choosers/UserChooserWidgetView.tsx b/src/views/room/widgets/choosers/UserChooserWidgetView.tsx index 86ebaafd..e7f1e3be 100644 --- a/src/views/room/widgets/choosers/UserChooserWidgetView.tsx +++ b/src/views/room/widgets/choosers/UserChooserWidgetView.tsx @@ -1,23 +1,16 @@ -import { FC, useCallback, useEffect, useState } from 'react'; -import List from 'react-virtualized/dist/commonjs/List'; +import { FC, useCallback, useState } from 'react'; import { RoomObjectItem } from '../../../../events/room-widgets/choosers/RoomObjectItem'; import { RoomWidgetChooserContentEvent } from '../../../../events/room-widgets/choosers/RoomWidgetChooserContentEvent'; -import { CreateEventDispatcherHook, useUiEvent } from '../../../../hooks'; -import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../layout'; +import { useUiEvent } from '../../../../hooks'; import { LocalizeText } from '../../../../utils'; -import { useRoomContext } from '../../context/RoomContext'; import { RoomWidgetRoomObjectUpdateEvent } from '../../events'; -import { RoomWidgetRequestWidgetMessage, RoomWidgetRoomObjectMessage } from '../../messages'; +import { RoomWidgetRequestWidgetMessage } from '../../messages'; +import { ChooserWidgetView } from './ChooserWidgetView'; export const UserChooserWidgetView : FC = props => { const [isVisible, setIsVisible] = useState(false); const [items, setItems] = useState(null); - const [filteredItems, setFilteredItems] = useState(null); - const [selectedItem, setSelectedItem] = useState(null); - const [refreshTimeout, setRefreshTimeout] = useState>(null); - const [searchValue, setSearchValue] = useState(''); - const { eventDispatcher = null, widgetHandler = null } = useRoomContext(); const onUserChooserContent = useCallback((event: RoomWidgetChooserContentEvent) => { @@ -25,93 +18,19 @@ export const UserChooserWidgetView : FC = props => setIsVisible(true); }, []); - const onRoomWidgetRoomObjectUpdateEvent = useCallback((event: RoomWidgetRoomObjectUpdateEvent) => - { - if (!event || !isVisible) return; - - if (refreshTimeout) clearTimeout(refreshTimeout); - - setRefreshTimeout(setTimeout(() => - { - widgetHandler.processWidgetMessage(new RoomWidgetRequestWidgetMessage(RoomWidgetRequestWidgetMessage.USER_CHOOSER)); - }, 100)); - - }, [isVisible, refreshTimeout, widgetHandler]); - useUiEvent(RoomWidgetChooserContentEvent.USER_CHOOSER_CONTENT, onUserChooserContent); - CreateEventDispatcherHook(RoomWidgetRoomObjectUpdateEvent.USER_REMOVED, eventDispatcher, onRoomWidgetRoomObjectUpdateEvent); - CreateEventDispatcherHook(RoomWidgetRoomObjectUpdateEvent.USER_ADDED, eventDispatcher, onRoomWidgetRoomObjectUpdateEvent); - useEffect(() => - { - if(!items) return; - - let filteredGroupItems = [ ...items ]; - - if(searchValue && searchValue.length) - { - const comparison = searchValue.toLocaleLowerCase(); - - filteredGroupItems = items.filter(item => - { - if(comparison && comparison.length) - { - if(item.name.toLocaleLowerCase().includes(comparison)) return item; - } - - return null; - }); - } - - setFilteredItems(filteredGroupItems); - }, [ items, searchValue, setFilteredItems ]); - const onClose = useCallback(() => { setIsVisible(false); setItems(null); }, []); - - const onClickItem = useCallback((item: RoomObjectItem) => - { - setSelectedItem(item); - widgetHandler.processWidgetMessage(new RoomWidgetRoomObjectMessage(RoomWidgetRoomObjectMessage.SELECT_OBJECT, item.id, item.category)); - }, [setSelectedItem, widgetHandler]); - - const rowRenderer = function ({ - key, // Unique key within array of rows - index, // Index of row within collection - isScrolling, // The List is currently being scrolled - isVisible, // This row is visible within the List (eg it is not an overscanned row) - style, // Style object to be applied to row (to position it) - }) - { - return ( -
onClickItem(filteredItems[index])} className={(selectedItem === filteredItems[index] ? 'selected-item ' : '') + 'list-item'}> - {filteredItems[index].name} -
- ); - } if(!isVisible) return null; return (
- - - -
-
- setSearchValue(event.target.value)} /> -
-
- -
-
+
); } From cf3a56206453f59e0b38fc4cd376377c2ece02ee Mon Sep 17 00:00:00 2001 From: Bill Date: Wed, 11 Aug 2021 20:49:51 -0400 Subject: [PATCH 58/66] Add friendly time component --- .../shared/friendly-time/FriendlyTimeView.tsx | 34 +++++++++++++++++++ .../friendly-time/FriendlyTimeView.types.ts | 7 ++++ 2 files changed, 41 insertions(+) create mode 100644 src/views/shared/friendly-time/FriendlyTimeView.tsx create mode 100644 src/views/shared/friendly-time/FriendlyTimeView.types.ts diff --git a/src/views/shared/friendly-time/FriendlyTimeView.tsx b/src/views/shared/friendly-time/FriendlyTimeView.tsx new file mode 100644 index 00000000..4df913e6 --- /dev/null +++ b/src/views/shared/friendly-time/FriendlyTimeView.tsx @@ -0,0 +1,34 @@ +import { FriendlyTime } from '@nitrots/nitro-renderer'; +import { FC, useCallback, useEffect, useMemo, useState } from 'react'; +import { FriendlyTimeViewProps } from './FriendlyTimeView.types'; + +export const FriendlyTimeView: FC = props => +{ + const { seconds = 0, isShort = false, ...rest } = props; + const [ updateId, setUpdateId ] = useState(-1); + + const getStartSeconds = useMemo(() => + { + return (Math.round(new Date().getSeconds()) - seconds); + }, [ seconds ]); + + const getFriendlyTime = useCallback(() => + { + const value = (Math.round(new Date().getSeconds()) - getStartSeconds); + + if(isShort) return FriendlyTime.format(value); + + return FriendlyTime.format(value); + }, [ getStartSeconds, isShort ]); + + useEffect(() => + { + const interval = setInterval(() => setUpdateId(prevValue => (prevValue + 1)), 10000); + + return () => clearInterval(interval); + }, []); + + return ( +
{ getFriendlyTime() }
+ ); +} diff --git a/src/views/shared/friendly-time/FriendlyTimeView.types.ts b/src/views/shared/friendly-time/FriendlyTimeView.types.ts new file mode 100644 index 00000000..7ce31f31 --- /dev/null +++ b/src/views/shared/friendly-time/FriendlyTimeView.types.ts @@ -0,0 +1,7 @@ +import { DetailsHTMLAttributes } from 'react'; + +export interface FriendlyTimeViewProps extends DetailsHTMLAttributes +{ + seconds: number; + isShort?: boolean; +} From 567064b716601d4d8450edf7fb3d41c60934f63b Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 12 Aug 2021 03:22:11 -0400 Subject: [PATCH 59/66] Fix math issue --- src/views/room/widgets/context-menu/ContextMenuView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/room/widgets/context-menu/ContextMenuView.tsx b/src/views/room/widgets/context-menu/ContextMenuView.tsx index ce3a4397..81a28b5a 100644 --- a/src/views/room/widgets/context-menu/ContextMenuView.tsx +++ b/src/views/room/widgets/context-menu/ContextMenuView.tsx @@ -80,8 +80,8 @@ export const ContextMenuView: FC = props => const deltaY = (location.y - maxStack); - let x = (location.x - (elementRef.current.offsetWidth / 2)); - let y = (deltaY + offset); + let x = Math.round(location.x - (elementRef.current.offsetWidth / 2)); + let y = Math.round(deltaY + offset); const maxLeft = ((GetNitroInstance().width - elementRef.current.offsetWidth) - SPACE_AROUND_EDGES); const maxTop = ((GetNitroInstance().height - elementRef.current.offsetHeight) - SPACE_AROUND_EDGES); From cfcea786fa6be12ab2b487d2acf7336b399cc7ad Mon Sep 17 00:00:00 2001 From: Bill Date: Fri, 13 Aug 2021 02:56:26 -0400 Subject: [PATCH 60/66] Update API --- src/App.tsx | 8 ++++++-- src/api/navigator/VisitRoom.ts | 6 ------ src/api/nitro/session/CreateRoomSession.ts | 6 ++++++ src/api/nitro/session/GoToDesktop.ts | 7 +++++++ src/api/nitro/session/index.ts | 2 ++ src/views/toolbar/ToolbarView.tsx | 10 +++++----- 6 files changed, 26 insertions(+), 13 deletions(-) delete mode 100644 src/api/navigator/VisitRoom.ts create mode 100644 src/api/nitro/session/CreateRoomSession.ts create mode 100644 src/api/nitro/session/GoToDesktop.ts diff --git a/src/App.tsx b/src/App.tsx index 8a9c2f2c..6b759d0e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,4 @@ -import { ConfigurationEvent, LegacyExternalInterface, Nitro, NitroCommunicationDemoEvent, NitroEvent, NitroLocalizationEvent, RoomEngineEvent, WebGL } from '@nitrots/nitro-renderer'; +import { ConfigurationEvent, LegacyExternalInterface, Nitro, NitroCommunicationDemoEvent, NitroEvent, NitroLocalizationEvent, NitroVersion, RoomEngineEvent, WebGL } from '@nitrots/nitro-renderer'; import { FC, useCallback, useState } from 'react'; import { GetCommunication, GetConfiguration, GetNitroInstance } from './api'; import { useConfigurationEvent } from './hooks/events/core/configuration/configuration-event'; @@ -17,7 +17,11 @@ export const App: FC<{}> = props => //@ts-ignore if(!NitroConfig) throw new Error('NitroConfig is not defined!'); - if(!GetNitroInstance()) Nitro.bootstrap(); + if(!GetNitroInstance()) + { + NitroVersion.UI_VERSION = '2.0.0'; + Nitro.bootstrap(); + } const getPreloadAssetUrls = useCallback(() => { diff --git a/src/api/navigator/VisitRoom.ts b/src/api/navigator/VisitRoom.ts deleted file mode 100644 index 9448f66d..00000000 --- a/src/api/navigator/VisitRoom.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { GetRoomSessionManager } from '../nitro'; - -export function VisitRoom(roomId: number, password: string = null): void -{ - GetRoomSessionManager().createSession(roomId, password); -} diff --git a/src/api/nitro/session/CreateRoomSession.ts b/src/api/nitro/session/CreateRoomSession.ts new file mode 100644 index 00000000..3be6a8ab --- /dev/null +++ b/src/api/nitro/session/CreateRoomSession.ts @@ -0,0 +1,6 @@ +import { GetRoomSessionManager } from './GetRoomSessionManager'; + +export function CreateRoomSession(roomId: number, password: string = null): void +{ + GetRoomSessionManager().createSession(roomId, password); +} diff --git a/src/api/nitro/session/GoToDesktop.ts b/src/api/nitro/session/GoToDesktop.ts new file mode 100644 index 00000000..4617043c --- /dev/null +++ b/src/api/nitro/session/GoToDesktop.ts @@ -0,0 +1,7 @@ +import { DesktopViewComposer } from '@nitrots/nitro-renderer'; +import { SendMessageHook } from '../../../hooks'; + +export function GoToDesktop(): void +{ + SendMessageHook(new DesktopViewComposer()); +} diff --git a/src/api/nitro/session/index.ts b/src/api/nitro/session/index.ts index 31861a96..5409266d 100644 --- a/src/api/nitro/session/index.ts +++ b/src/api/nitro/session/index.ts @@ -1,4 +1,5 @@ export * from './CanManipulateFurniture'; +export * from './CreateRoomSession'; export * from './GetCanStandUp'; export * from './GetCanUseExpression'; export * from './GetClubMemberLevel'; @@ -9,6 +10,7 @@ export * from './GetProductDataForLocalization'; export * from './GetRoomSession'; export * from './GetRoomSessionManager'; export * from './GetSessionDataManager'; +export * from './GoToDesktop'; export * from './HasHabboClub'; export * from './HasHabboVip'; export * from './IsOwnerOfFurniture'; diff --git a/src/views/toolbar/ToolbarView.tsx b/src/views/toolbar/ToolbarView.tsx index 0fcd77a0..7445958f 100644 --- a/src/views/toolbar/ToolbarView.tsx +++ b/src/views/toolbar/ToolbarView.tsx @@ -1,12 +1,12 @@ -import { DesktopViewComposer, Dispose, DropBounce, EaseOut, JumpBy, Motions, NitroToolbarAnimateIconEvent, Queue, UserFigureEvent, UserInfoDataParser, UserInfoEvent, Wait } from '@nitrots/nitro-renderer'; +import { Dispose, DropBounce, EaseOut, JumpBy, Motions, NitroToolbarAnimateIconEvent, Queue, UserFigureEvent, UserInfoDataParser, UserInfoEvent, Wait } from '@nitrots/nitro-renderer'; import { FC, useCallback, useState } from 'react'; -import { GetRoomSession, GetRoomSessionManager } from '../../api'; +import { GetRoomSession, GetRoomSessionManager, GoToDesktop } from '../../api'; import { AvatarEditorEvent, CatalogEvent, FriendListEvent, InventoryEvent, NavigatorEvent, RoomWidgetCameraEvent } from '../../events'; import { AchievementsUIEvent } from '../../events/achievements'; import { UnseenItemTrackerUpdateEvent } from '../../events/inventory/UnseenItemTrackerUpdateEvent'; import { ModToolsEvent } from '../../events/mod-tools/ModToolsEvent'; import { dispatchUiEvent, useRoomEngineEvent, useUiEvent } from '../../hooks'; -import { CreateMessageHook, SendMessageHook } from '../../hooks/messages/message-event'; +import { CreateMessageHook } from '../../hooks/messages/message-event'; import { TransitionAnimation } from '../../layout/transitions/TransitionAnimation'; import { TransitionAnimationTypes } from '../../layout/transitions/TransitionAnimation.types'; import { AvatarImageView } from '../shared/avatar-image/AvatarImageView'; @@ -128,8 +128,8 @@ export const ToolbarView: FC = props => const visitDesktop = useCallback(() => { if(!GetRoomSession()) return; - - SendMessageHook(new DesktopViewComposer()); + + GoToDesktop(); GetRoomSessionManager().removeSession(-1); }, []); From 51558c4f3ccda81bc52142ebab1a16eb6efa44ac Mon Sep 17 00:00:00 2001 From: Bill Date: Fri, 13 Aug 2021 02:56:39 -0400 Subject: [PATCH 61/66] Add doorbell / password --- src/events/navigator/UpdateDoorStateEvent.ts | 27 ++++++ src/events/navigator/index.ts | 1 + .../navigator/NavigatorMessageHandler.tsx | 54 +++++++----- src/views/navigator/NavigatorView.scss | 18 ++++ src/views/navigator/NavigatorView.tsx | 85 ++++++++++++++++++- .../NavigatorRoomDoorbellView.tsx | 43 ++++++++++ .../NavigatorRoomDoorbellView.types.ts | 8 ++ .../NavigatorRoomPasswordView.tsx | 45 ++++++++++ .../NavigatorRoomPasswordView.types.ts | 8 ++ .../NavigatorSearchResultItemView.tsx | 27 +++++- 10 files changed, 290 insertions(+), 26 deletions(-) create mode 100644 src/events/navigator/UpdateDoorStateEvent.ts create mode 100644 src/views/navigator/views/room-doorbell/NavigatorRoomDoorbellView.tsx create mode 100644 src/views/navigator/views/room-doorbell/NavigatorRoomDoorbellView.types.ts create mode 100644 src/views/navigator/views/room-password/NavigatorRoomPasswordView.tsx create mode 100644 src/views/navigator/views/room-password/NavigatorRoomPasswordView.types.ts diff --git a/src/events/navigator/UpdateDoorStateEvent.ts b/src/events/navigator/UpdateDoorStateEvent.ts new file mode 100644 index 00000000..0c4bdfca --- /dev/null +++ b/src/events/navigator/UpdateDoorStateEvent.ts @@ -0,0 +1,27 @@ +import { NitroEvent, RoomDataParser } from '@nitrots/nitro-renderer'; + +export class UpdateDoorStateEvent extends NitroEvent +{ + public static START_DOORBELL: string = 'UDSE_START_DOORBELL'; + public static START_PASSWORD: string = 'UDSE_START_PASSWORD'; + public static STATE_PENDING_SERVER: string = 'UDSE_STATE_PENDING_SERVER'; + public static UPDATE_STATE: string = 'UDSE_UPDATE_STATE'; + public static STATE_WAITING: string = 'UDSE_STATE_WAITING'; + public static STATE_NO_ANSWER: string = 'UDSE_STATE_NO_ANSWER'; + public static STATE_WRONG_PASSWORD: string = 'UDSE_STATE_WRONG_PASSWORD'; + public static STATE_ACCEPTED: string = 'UDSE_STATE_ACCEPTED'; + + private _roomData: RoomDataParser + + constructor(type: string, roomData: RoomDataParser = null) + { + super(type); + + this._roomData = roomData; + } + + public get roomData(): RoomDataParser + { + return this._roomData; + } +} diff --git a/src/events/navigator/index.ts b/src/events/navigator/index.ts index c2e7371c..892c758a 100644 --- a/src/events/navigator/index.ts +++ b/src/events/navigator/index.ts @@ -1 +1,2 @@ export * from './NavigatorEvent'; +export * from './UpdateDoorStateEvent'; diff --git a/src/views/navigator/NavigatorMessageHandler.tsx b/src/views/navigator/NavigatorMessageHandler.tsx index 964007e6..f2e4e019 100644 --- a/src/views/navigator/NavigatorMessageHandler.tsx +++ b/src/views/navigator/NavigatorMessageHandler.tsx @@ -1,7 +1,8 @@ -import { GenericErrorEvent, NavigatorCategoriesComposer, NavigatorCategoriesEvent, NavigatorHomeRoomEvent, NavigatorMetadataEvent, NavigatorSearchEvent, NavigatorSettingsComposer, RoomCreatedEvent, RoomDataParser, RoomDoorbellAcceptedEvent, RoomDoorbellEvent, RoomForwardEvent, RoomInfoComposer, RoomInfoEvent, RoomInfoOwnerEvent, RoomSettingsUpdatedEvent, UserInfoEvent } from '@nitrots/nitro-renderer'; +import { GenericErrorEvent, NavigatorCategoriesComposer, NavigatorCategoriesEvent, NavigatorHomeRoomEvent, NavigatorMetadataEvent, NavigatorSearchEvent, NavigatorSettingsComposer, RoomCreatedEvent, RoomDataParser, RoomDoorbellAcceptedEvent, RoomDoorbellEvent, RoomDoorbellRejectedEvent, RoomForwardEvent, RoomInfoComposer, RoomInfoEvent, RoomInfoOwnerEvent, RoomSettingsUpdatedEvent, UserInfoEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback } from 'react'; -import { GetRoomSessionManager, GetSessionDataManager } from '../../api'; -import { VisitRoom } from '../../api/navigator/VisitRoom'; +import { CreateRoomSession, GetSessionDataManager } from '../../api'; +import { UpdateDoorStateEvent } from '../../events'; +import { dispatchUiEvent } from '../../hooks'; import { CreateMessageHook, SendMessageHook } from '../../hooks/messages/message-event'; import { useNavigatorContext } from './context/NavigatorContext'; import { NavigatorMessageHandlerProps } from './NavigatorMessageHandler.types'; @@ -65,13 +66,15 @@ export const NavigatorMessageHandler: FC = props = switch(parser.data.doorMode) { case RoomDataParser.DOORBELL_STATE: + dispatchUiEvent(new UpdateDoorStateEvent(UpdateDoorStateEvent.START_DOORBELL, parser.data)); + return; case RoomDataParser.PASSWORD_STATE: - //showLock(); + dispatchUiEvent(new UpdateDoorStateEvent(UpdateDoorStateEvent.START_PASSWORD, parser.data)); return; } } - GetRoomSessionManager().createSession(parser.data.roomId); + CreateRoomSession(parser.data.roomId); } else { @@ -91,32 +94,42 @@ export const NavigatorMessageHandler: FC = props = { const parser = event.getParser(); - // if(!parser.userName || (parser.userName.length === 0)) - // { - // showLock(NavigatorLockViewStage.WAITING); - // } + if(!parser.userName || (parser.userName.length === 0)) + { + dispatchUiEvent(new UpdateDoorStateEvent(UpdateDoorStateEvent.STATE_WAITING)); + } }, []); const onRoomDoorbellAcceptedEvent = useCallback((event: RoomDoorbellAcceptedEvent) => { const parser = event.getParser(); - // if(!parser.userName || (parser.userName.length === 0)) - // { - // hideLock(); - // } + if(!parser.userName || (parser.userName.length === 0)) + { + dispatchUiEvent(new UpdateDoorStateEvent(UpdateDoorStateEvent.STATE_ACCEPTED)); + } + }, []); + + const onRoomDoorbellRejectedEvent = useCallback((event: RoomDoorbellRejectedEvent) => + { + const parser = event.getParser(); + + if(!parser.userName || (parser.userName.length === 0)) + { + dispatchUiEvent(new UpdateDoorStateEvent(UpdateDoorStateEvent.STATE_NO_ANSWER)); + } }, []); const onGenericErrorEvent = useCallback((event: GenericErrorEvent) => { const parser = event.getParser(); - // switch(parser.errorCode) - // { - // case -100002: - // showLock(NavigatorLockViewStage.FAILED); - // break; - // } + switch(parser.errorCode) + { + case -100002: + dispatchUiEvent(new UpdateDoorStateEvent(UpdateDoorStateEvent.STATE_WRONG_PASSWORD)); + break; + } }, []); const onNavigatorMetadataEvent = useCallback((event: NavigatorMetadataEvent) => @@ -159,7 +172,7 @@ export const NavigatorMessageHandler: FC = props = { const parser = event.getParser(); - VisitRoom(parser.roomId); + CreateRoomSession(parser.roomId); }, []); const onNavigatorHomeRoomEvent = useCallback((event: NavigatorHomeRoomEvent) => @@ -187,6 +200,7 @@ export const NavigatorMessageHandler: FC = props = CreateMessageHook(RoomInfoEvent, onRoomInfoEvent); CreateMessageHook(RoomDoorbellEvent, onRoomDoorbellEvent); CreateMessageHook(RoomDoorbellAcceptedEvent, onRoomDoorbellAcceptedEvent); + CreateMessageHook(RoomDoorbellRejectedEvent, onRoomDoorbellRejectedEvent); CreateMessageHook(GenericErrorEvent, onGenericErrorEvent); CreateMessageHook(NavigatorMetadataEvent, onNavigatorMetadataEvent); CreateMessageHook(NavigatorSearchEvent, onNavigatorSearchEvent); diff --git a/src/views/navigator/NavigatorView.scss b/src/views/navigator/NavigatorView.scss index e17312aa..d29e353b 100644 --- a/src/views/navigator/NavigatorView.scss +++ b/src/views/navigator/NavigatorView.scss @@ -8,4 +8,22 @@ } } +.nitro-navigator-doorbell { + width: 250px; + + .content-area { + min-height: 143px; + height: 143px; + } +} + +.nitro-navigator-password { + width: 250px; + + .content-area { + min-height: 218px; + height: 218px; + } +} + @import './views/NavigatorViews'; diff --git a/src/views/navigator/NavigatorView.tsx b/src/views/navigator/NavigatorView.tsx index 62a60ab9..320e1d11 100644 --- a/src/views/navigator/NavigatorView.tsx +++ b/src/views/navigator/NavigatorView.tsx @@ -1,8 +1,8 @@ -import { ILinkEventTracker, NavigatorInitComposer, NavigatorSearchComposer, RoomSessionEvent } from '@nitrots/nitro-renderer'; -import { FC, useCallback, useEffect, useReducer, useState } from 'react'; -import { AddEventLinkTracker, RemoveLinkEventTracker } from '../../api'; +import { ILinkEventTracker, NavigatorInitComposer, NavigatorSearchComposer, RoomDataParser, RoomSessionEvent } from '@nitrots/nitro-renderer'; +import { FC, useCallback, useEffect, useMemo, useReducer, useState } from 'react'; +import { AddEventLinkTracker, GoToDesktop, RemoveLinkEventTracker } from '../../api'; import { TryVisitRoom } from '../../api/navigator/TryVisitRoom'; -import { NavigatorEvent } from '../../events'; +import { NavigatorEvent, UpdateDoorStateEvent } from '../../events'; import { useRoomSessionManagerEvent } from '../../hooks/events/nitro/session/room-session-manager-event'; import { useUiEvent } from '../../hooks/events/ui/ui-event'; import { SendMessageHook } from '../../hooks/messages/message-event'; @@ -13,8 +13,10 @@ import { NavigatorMessageHandler } from './NavigatorMessageHandler'; import { NavigatorViewProps } from './NavigatorView.types'; import { initialNavigator, NavigatorActions, NavigatorReducer } from './reducers/NavigatorReducer'; import { NavigatorRoomCreatorView } from './views/creator/NavigatorRoomCreatorView'; +import { NavigatorRoomDoorbellView } from './views/room-doorbell/NavigatorRoomDoorbellView'; import { NavigatorRoomInfoView } from './views/room-info/NavigatorRoomInfoView'; import { NavigatorRoomLinkView } from './views/room-link/NavigatorRoomLinkView'; +import { NavigatorRoomPasswordView } from './views/room-password/NavigatorRoomPasswordView'; import { NavigatorRoomSettingsView } from './views/room-settings/NavigatorRoomSettingsView'; import { NavigatorSearchResultSetView } from './views/search-result-set/NavigatorSearchResultSetView'; import { NavigatorSearchView } from './views/search/NavigatorSearchView'; @@ -25,6 +27,7 @@ export const NavigatorView: FC = props => const [ isCreatorOpen, setCreatorOpen ] = useState(false); const [ isRoomInfoOpen, setRoomInfoOpen ] = useState(false); const [ isRoomLinkOpen, setRoomLinkOpen ] = useState(false); + const [ pendingDoorState, setPendingDoorState ] = useState<{ roomData: RoomDataParser, state: string }>(null); const [ navigatorState, dispatchNavigatorState ] = useReducer(NavigatorReducer, initialNavigator); const { needsNavigatorUpdate = false, topLevelContext = null, topLevelContexts = null } = navigatorState; @@ -56,6 +59,49 @@ export const NavigatorView: FC = props => useUiEvent(NavigatorEvent.TOGGLE_ROOM_INFO, onNavigatorEvent); useUiEvent(NavigatorEvent.TOGGLE_ROOM_LINK, onNavigatorEvent); + const onUpdateDoorStateEvent = useCallback((event: UpdateDoorStateEvent) => + { + switch(event.type) + { + case UpdateDoorStateEvent.START_DOORBELL: + setPendingDoorState({ roomData: event.roomData, state: event.type }); + return; + case UpdateDoorStateEvent.START_PASSWORD: + setPendingDoorState({ roomData: event.roomData, state: event.type }); + return; + case UpdateDoorStateEvent.STATE_WAITING: + setPendingDoorState(prevValue => + { + return { roomData: prevValue.roomData, state: event.type } + }); + return; + case UpdateDoorStateEvent.STATE_NO_ANSWER: + setPendingDoorState(prevValue => + { + if(prevValue.state === UpdateDoorStateEvent.STATE_WAITING) GoToDesktop(); + + return { roomData: prevValue.roomData, state: event.type } + }); + return; + case UpdateDoorStateEvent.STATE_WRONG_PASSWORD: + setPendingDoorState(prevValue => + { + return { roomData: prevValue.roomData, state: event.type } + }); + return; + case UpdateDoorStateEvent.STATE_ACCEPTED: + setPendingDoorState(null); + return; + } + }, []); + + useUiEvent(UpdateDoorStateEvent.START_DOORBELL, onUpdateDoorStateEvent); + useUiEvent(UpdateDoorStateEvent.START_PASSWORD, onUpdateDoorStateEvent); + useUiEvent(UpdateDoorStateEvent.STATE_WAITING, onUpdateDoorStateEvent); + useUiEvent(UpdateDoorStateEvent.STATE_NO_ANSWER, onUpdateDoorStateEvent); + useUiEvent(UpdateDoorStateEvent.STATE_WRONG_PASSWORD, onUpdateDoorStateEvent); + useUiEvent(UpdateDoorStateEvent.STATE_ACCEPTED, onUpdateDoorStateEvent); + const onRoomSessionEvent = useCallback((event: RoomSessionEvent) => { switch(event.type) @@ -102,6 +148,18 @@ export const NavigatorView: FC = props => } }, []); + const closePendingDoorState = useCallback((state: string) => + { + if(state !== null) + { + setPendingDoorState(prevValue => + { + return { roomData: prevValue.roomData, state }; + }); + } + else setPendingDoorState(null); + }, []); + useEffect(() => { const linkTracker: ILinkEventTracker = { @@ -135,9 +193,28 @@ export const NavigatorView: FC = props => sendSearch('', topLevelContexts[0].code); }, [ topLevelContexts, sendSearch ]); + const getRoomDoorState = useMemo(() => + { + if(!pendingDoorState) return null; + + switch(pendingDoorState.state) + { + case UpdateDoorStateEvent.START_DOORBELL: + case UpdateDoorStateEvent.STATE_WAITING: + case UpdateDoorStateEvent.STATE_NO_ANSWER: + return ; + case UpdateDoorStateEvent.START_PASSWORD: + case UpdateDoorStateEvent.STATE_WRONG_PASSWORD: + return ; + } + + return null; + }, [ pendingDoorState, closePendingDoorState ]); + return ( + { getRoomDoorState } { isVisible && setIsVisible(false) } /> diff --git a/src/views/navigator/views/room-doorbell/NavigatorRoomDoorbellView.tsx b/src/views/navigator/views/room-doorbell/NavigatorRoomDoorbellView.tsx new file mode 100644 index 00000000..7bb331b6 --- /dev/null +++ b/src/views/navigator/views/room-doorbell/NavigatorRoomDoorbellView.tsx @@ -0,0 +1,43 @@ +import { FC, useCallback } from 'react'; +import { CreateRoomSession, GoToDesktop } from '../../../../api'; +import { UpdateDoorStateEvent } from '../../../../events'; +import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../layout'; +import { LocalizeText } from '../../../../utils'; +import { NavigatorRoomDoorbellViewProps } from './NavigatorRoomDoorbellView.types'; + +export const NavigatorRoomDoorbellView: FC = props => +{ + const { roomData = null, state = null, onClose = null } = props; + + const close = useCallback(() => + { + if(state === UpdateDoorStateEvent.STATE_WAITING) GoToDesktop(); + + onClose(null); + }, [ state, onClose ]); + + const ring = useCallback(() => + { + if(!roomData) return; + + CreateRoomSession(roomData.roomId); + + onClose(UpdateDoorStateEvent.STATE_PENDING_SERVER); + }, [ roomData, onClose ]); + + return ( + + + + { roomData && { roomData.roomName } } + { (state === UpdateDoorStateEvent.START_DOORBELL) && { LocalizeText('navigator.doorbell.info') } } + { (state === UpdateDoorStateEvent.STATE_WAITING) && { LocalizeText('navigator.doorbell.waiting') } } + { (state === UpdateDoorStateEvent.STATE_NO_ANSWER) && { LocalizeText('navigator.doorbell.no.answer') } } +
+ { (state === UpdateDoorStateEvent.START_DOORBELL) && } + +
+
+
+ ); +} diff --git a/src/views/navigator/views/room-doorbell/NavigatorRoomDoorbellView.types.ts b/src/views/navigator/views/room-doorbell/NavigatorRoomDoorbellView.types.ts new file mode 100644 index 00000000..f471bd21 --- /dev/null +++ b/src/views/navigator/views/room-doorbell/NavigatorRoomDoorbellView.types.ts @@ -0,0 +1,8 @@ +import { RoomDataParser } from '@nitrots/nitro-renderer'; + +export interface NavigatorRoomDoorbellViewProps +{ + roomData: RoomDataParser; + state: string; + onClose: (state: string) => void; +} diff --git a/src/views/navigator/views/room-password/NavigatorRoomPasswordView.tsx b/src/views/navigator/views/room-password/NavigatorRoomPasswordView.tsx new file mode 100644 index 00000000..247d0f71 --- /dev/null +++ b/src/views/navigator/views/room-password/NavigatorRoomPasswordView.tsx @@ -0,0 +1,45 @@ +import { FC, useCallback, useState } from 'react'; +import { CreateRoomSession } from '../../../../api'; +import { UpdateDoorStateEvent } from '../../../../events'; +import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../layout'; +import { LocalizeText } from '../../../../utils'; +import { NavigatorRoomPasswordViewProps } from './NavigatorRoomPasswordView.types'; + +export const NavigatorRoomPasswordView: FC = props => +{ + const { roomData = null, state = null, onClose = null } = props; + const [ password, setPassword ] = useState(''); + + const close = useCallback(() => + { + onClose(null); + }, [ onClose ]); + + const tryEntering = useCallback(() => + { + if(!roomData) return; + + CreateRoomSession(roomData.roomId, password); + + onClose(UpdateDoorStateEvent.STATE_PENDING_SERVER); + }, [ roomData, password, onClose ]); + + return ( + + + + { roomData && { roomData.roomName } } + { (state === UpdateDoorStateEvent.START_PASSWORD) && { LocalizeText('navigator.password.info') } } + { (state === UpdateDoorStateEvent.STATE_WRONG_PASSWORD) && { LocalizeText('navigator.password.retryinfo') } } +
+ + setPassword(event.target.value) } /> +
+
+ + +
+
+
+ ); +} diff --git a/src/views/navigator/views/room-password/NavigatorRoomPasswordView.types.ts b/src/views/navigator/views/room-password/NavigatorRoomPasswordView.types.ts new file mode 100644 index 00000000..4d1ea7d2 --- /dev/null +++ b/src/views/navigator/views/room-password/NavigatorRoomPasswordView.types.ts @@ -0,0 +1,8 @@ +import { RoomDataParser } from '@nitrots/nitro-renderer'; + +export interface NavigatorRoomPasswordViewProps +{ + roomData: RoomDataParser; + state: string; + onClose: (state: string) => void; +} diff --git a/src/views/navigator/views/search-result-item/NavigatorSearchResultItemView.tsx b/src/views/navigator/views/search-result-item/NavigatorSearchResultItemView.tsx index e38eebb1..946b9ed8 100644 --- a/src/views/navigator/views/search-result-item/NavigatorSearchResultItemView.tsx +++ b/src/views/navigator/views/search-result-item/NavigatorSearchResultItemView.tsx @@ -1,7 +1,10 @@ import { RoomDataParser } from '@nitrots/nitro-renderer'; import classNames from 'classnames'; import { FC, MouseEvent } from 'react'; +import { CreateRoomSession, GetSessionDataManager } from '../../../../api'; import { TryVisitRoom } from '../../../../api/navigator/TryVisitRoom'; +import { UpdateDoorStateEvent } from '../../../../events'; +import { dispatchUiEvent } from '../../../../hooks'; import { NavigatorSearchResultItemViewProps } from './NavigatorSearchResultItemView.types'; export const NavigatorSearchResultItemView: FC = props => @@ -38,7 +41,27 @@ export const NavigatorSearchResultItemView: FC { roomData.habboGroupId > 0 && } { roomData.doorMode !== RoomDataParser.OPEN_STATE && - + }
From dc628d605b954c756b6ea54a74f69a55ad006116 Mon Sep 17 00:00:00 2001 From: Bill Date: Fri, 13 Aug 2021 04:05:46 -0400 Subject: [PATCH 62/66] Add doorbell room widget --- src/views/room/RoomView.tsx | 2 + .../room/events/RoomWidgetDoorbellEvent.ts | 22 +++++ src/views/room/events/index.ts | 1 + .../room/handlers/DoorbellWidgetHandler.ts | 60 +++++++++++++ .../messages/RoomWidgetLetUserInMessage.ts | 27 ++++++ src/views/room/messages/index.ts | 1 + src/views/room/widgets/RoomWidgets.scss | 1 + src/views/room/widgets/RoomWidgetsView.tsx | 2 + .../widgets/doorbell/DoorbellWidgetView.scss | 22 +++++ .../widgets/doorbell/DoorbellWidgetView.tsx | 88 +++++++++++++++++++ 10 files changed, 226 insertions(+) create mode 100644 src/views/room/events/RoomWidgetDoorbellEvent.ts create mode 100644 src/views/room/handlers/DoorbellWidgetHandler.ts create mode 100644 src/views/room/messages/RoomWidgetLetUserInMessage.ts create mode 100644 src/views/room/widgets/doorbell/DoorbellWidgetView.scss create mode 100644 src/views/room/widgets/doorbell/DoorbellWidgetView.tsx diff --git a/src/views/room/RoomView.tsx b/src/views/room/RoomView.tsx index a82d4b9a..1dc5e629 100644 --- a/src/views/room/RoomView.tsx +++ b/src/views/room/RoomView.tsx @@ -7,6 +7,7 @@ import { GetRoomEngine } from '../../api/nitro/room/GetRoomEngine'; import { RoomContextProvider } from './context/RoomContext'; import { RoomWidgetUpdateRoomViewEvent } from './events/RoomWidgetUpdateRoomViewEvent'; import { IRoomWidgetHandlerManager, RoomWidgetAvatarInfoHandler, RoomWidgetChatHandler, RoomWidgetChatInputHandler, RoomWidgetHandlerManager, RoomWidgetInfostandHandler } from './handlers'; +import { DoorbellWidgetHandler } from './handlers/DoorbellWidgetHandler'; import { FurnitureContextMenuWidgetHandler } from './handlers/FurnitureContextMenuWidgetHandler'; import { FurnitureCustomStackHeightWidgetHandler } from './handlers/FurnitureCustomStackHeightWidgetHandler'; import { RoomWidgetRoomToolsHandler } from './handlers/RoomWidgetRoomToolsHandler'; @@ -44,6 +45,7 @@ export const RoomView: FC = props => widgetHandlerManager.registerHandler(new RoomWidgetChatHandler()); widgetHandlerManager.registerHandler(new FurnitureContextMenuWidgetHandler()); widgetHandlerManager.registerHandler(new FurnitureCustomStackHeightWidgetHandler()); + widgetHandlerManager.registerHandler(new DoorbellWidgetHandler()); setWidgetHandler(widgetHandlerManager); diff --git a/src/views/room/events/RoomWidgetDoorbellEvent.ts b/src/views/room/events/RoomWidgetDoorbellEvent.ts new file mode 100644 index 00000000..9bad7fa4 --- /dev/null +++ b/src/views/room/events/RoomWidgetDoorbellEvent.ts @@ -0,0 +1,22 @@ +import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent'; + +export class RoomWidgetDoorbellEvent extends RoomWidgetUpdateEvent +{ + public static RINGING: string = 'RWDE_RINGING'; + public static REJECTED: string = 'RWDE_REJECTED'; + public static ACCEPTED: string = 'RWDE_ACCEPTED'; + + private _userName: string = ''; + + constructor(type: string, userName: string) + { + super(type); + + this._userName = userName; + } + + public get userName(): string + { + return this._userName; + } +} diff --git a/src/views/room/events/index.ts b/src/views/room/events/index.ts index 60f8d0c8..4440c0af 100644 --- a/src/views/room/events/index.ts +++ b/src/views/room/events/index.ts @@ -1,4 +1,5 @@ export * from './RoomWidgetAvatarInfoEvent'; +export * from './RoomWidgetDoorbellEvent'; export * from './RoomWidgetFloodControlEvent'; export * from './RoomWidgetObjectNameEvent'; export * from './RoomWidgetRoomEngineUpdateEvent'; diff --git a/src/views/room/handlers/DoorbellWidgetHandler.ts b/src/views/room/handlers/DoorbellWidgetHandler.ts new file mode 100644 index 00000000..b2b69ee9 --- /dev/null +++ b/src/views/room/handlers/DoorbellWidgetHandler.ts @@ -0,0 +1,60 @@ +import { NitroEvent, RoomSessionDoorbellEvent, RoomWidgetEnum } from '@nitrots/nitro-renderer'; +import { RoomWidgetDoorbellEvent, RoomWidgetUpdateEvent } from '../events'; +import { RoomWidgetLetUserInMessage, RoomWidgetMessage } from '../messages'; +import { RoomWidgetHandler } from './RoomWidgetHandler'; + +export class DoorbellWidgetHandler extends RoomWidgetHandler +{ + public processEvent(event: NitroEvent): void + { + const doorbellEvent = (event as RoomSessionDoorbellEvent); + + switch(event.type) + { + case RoomSessionDoorbellEvent.DOORBELL: + this.container.eventDispatcher.dispatchEvent(new RoomWidgetDoorbellEvent(RoomWidgetDoorbellEvent.RINGING, doorbellEvent.userName)); + return; + case RoomSessionDoorbellEvent.RSDE_REJECTED: + this.container.eventDispatcher.dispatchEvent(new RoomWidgetDoorbellEvent(RoomWidgetDoorbellEvent.REJECTED, doorbellEvent.userName)); + return; + case RoomSessionDoorbellEvent.RSDE_ACCEPTED: + this.container.eventDispatcher.dispatchEvent(new RoomWidgetDoorbellEvent(RoomWidgetDoorbellEvent.ACCEPTED, doorbellEvent.userName)); + return; + } + } + + public processWidgetMessage(message: RoomWidgetMessage): RoomWidgetUpdateEvent + { + switch(message.type) + { + case RoomWidgetLetUserInMessage.LET_USER_IN: + const letUserInMessage = (message as RoomWidgetLetUserInMessage); + + this.container.roomSession.sendDoorbellApprovalMessage(letUserInMessage.userName, letUserInMessage.canEnter); + break; + } + + return null; + } + + public get type(): string + { + return RoomWidgetEnum.DOORBELL; + } + + public get eventTypes(): string[] + { + return [ + RoomSessionDoorbellEvent.DOORBELL, + RoomSessionDoorbellEvent.RSDE_REJECTED, + RoomSessionDoorbellEvent.RSDE_ACCEPTED + ]; + } + + public get messageTypes(): string[] + { + return [ + RoomWidgetLetUserInMessage.LET_USER_IN + ]; + } +} diff --git a/src/views/room/messages/RoomWidgetLetUserInMessage.ts b/src/views/room/messages/RoomWidgetLetUserInMessage.ts new file mode 100644 index 00000000..9001fe2a --- /dev/null +++ b/src/views/room/messages/RoomWidgetLetUserInMessage.ts @@ -0,0 +1,27 @@ +import { RoomWidgetMessage } from './RoomWidgetMessage'; + +export class RoomWidgetLetUserInMessage extends RoomWidgetMessage +{ + public static LET_USER_IN: string = 'RWLUIM_LET_USER_IN'; + + private _userName: string; + private _canEnter: boolean; + + constructor(userName: string, canEnter: boolean) + { + super(RoomWidgetLetUserInMessage.LET_USER_IN); + + this._userName = userName; + this._canEnter = canEnter; + } + + public get userName(): string + { + return this._userName; + } + + public get canEnter(): boolean + { + return this._canEnter; + } +} diff --git a/src/views/room/messages/index.ts b/src/views/room/messages/index.ts index 873903a7..732e5665 100644 --- a/src/views/room/messages/index.ts +++ b/src/views/room/messages/index.ts @@ -7,6 +7,7 @@ export * from './RoomWidgetChatTypingMessage'; export * from './RoomWidgetDanceMessage'; export * from './RoomWidgetFurniActionMessage'; export * from './RoomWidgetFurniToWidgetMessage'; +export * from './RoomWidgetLetUserInMessage'; export * from './RoomWidgetMessage'; export * from './RoomWidgetRequestWidgetMessage'; export * from './RoomWidgetRoomObjectMessage'; diff --git a/src/views/room/widgets/RoomWidgets.scss b/src/views/room/widgets/RoomWidgets.scss index ed284cd9..3308120c 100644 --- a/src/views/room/widgets/RoomWidgets.scss +++ b/src/views/room/widgets/RoomWidgets.scss @@ -3,6 +3,7 @@ @import './chat/ChatWidgetView'; @import './chat-input/ChatInputView'; @import './context-menu/ContextMenu'; +@import './doorbell/DoorbellWidgetView'; @import './furniture/FurnitureWidgets'; @import './infostand/InfoStandWidgetView'; @import './object-location/ObjectLocationView'; diff --git a/src/views/room/widgets/RoomWidgetsView.tsx b/src/views/room/widgets/RoomWidgetsView.tsx index 2ed8ba9d..aa20bf27 100644 --- a/src/views/room/widgets/RoomWidgetsView.tsx +++ b/src/views/room/widgets/RoomWidgetsView.tsx @@ -9,6 +9,7 @@ import { AvatarInfoWidgetView } from './avatar-info/AvatarInfoWidgetView'; import { CameraWidgetView } from './camera/CameraWidgetView'; import { ChatInputView } from './chat-input/ChatInputView'; import { ChatWidgetView } from './chat/ChatWidgetView'; +import { DoorbellWidgetView } from './doorbell/DoorbellWidgetView'; import { FurnitureWidgetsView } from './furniture/FurnitureWidgetsView'; import { InfoStandWidgetView } from './infostand/InfoStandWidgetView'; import { RoomThumbnailWidgetView } from './room-thumbnail/RoomThumbnailWidgetView'; @@ -242,6 +243,7 @@ export const RoomWidgetsView: FC = props => + diff --git a/src/views/room/widgets/doorbell/DoorbellWidgetView.scss b/src/views/room/widgets/doorbell/DoorbellWidgetView.scss new file mode 100644 index 00000000..125a5e69 --- /dev/null +++ b/src/views/room/widgets/doorbell/DoorbellWidgetView.scss @@ -0,0 +1,22 @@ +.nitro-widget-doorbell { + width: 250px; + + .content-area { + min-height: 143px; + height: 143px; + } + + .doorbell-user-list { + + .list-item { + background: $grid-active-bg-color; + } + + .col:nth-child(even) { + + .list-item { + background: $white !important; + } + } + } +} diff --git a/src/views/room/widgets/doorbell/DoorbellWidgetView.tsx b/src/views/room/widgets/doorbell/DoorbellWidgetView.tsx new file mode 100644 index 00000000..7dad34dd --- /dev/null +++ b/src/views/room/widgets/doorbell/DoorbellWidgetView.tsx @@ -0,0 +1,88 @@ +import { FC, useCallback, useState } from 'react'; +import { CreateEventDispatcherHook } from '../../../../hooks'; +import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../layout'; +import { LocalizeText } from '../../../../utils'; +import { useRoomContext } from '../../context/RoomContext'; +import { RoomWidgetDoorbellEvent } from '../../events'; +import { RoomWidgetLetUserInMessage } from '../../messages'; + +export const DoorbellWidgetView: FC<{}> = props => +{ + const [ isVisible, setIsVisible ] = useState(false); + const [ users, setUsers ] = useState([]); + const { eventDispatcher = null, widgetHandler = null } = useRoomContext(); + + const addUser = useCallback((userName: string) => + { + if(users.indexOf(userName) >= 0) return; + + const newUsers = [ ...users, userName ]; + + setUsers(newUsers); + setIsVisible(true); + }, [ users ]); + + const removeUser = useCallback((userName: string) => + { + const index = users.indexOf(userName); + + if(index === -1) return; + + const newUsers = [ ...users ]; + + newUsers.splice(index, 1); + + setUsers(newUsers); + + if(!newUsers.length) setIsVisible(false); + }, [ users ]); + + const onRoomWidgetDoorbellEvent = useCallback((event: RoomWidgetDoorbellEvent) => + { + switch(event.type) + { + case RoomWidgetDoorbellEvent.RINGING: + addUser(event.userName); + return; + case RoomWidgetDoorbellEvent.REJECTED: + case RoomWidgetDoorbellEvent.ACCEPTED: + removeUser(event.userName); + return; + } + }, [ addUser, removeUser ]); + + CreateEventDispatcherHook(RoomWidgetDoorbellEvent.RINGING, eventDispatcher, onRoomWidgetDoorbellEvent); + CreateEventDispatcherHook(RoomWidgetDoorbellEvent.REJECTED, eventDispatcher, onRoomWidgetDoorbellEvent); + CreateEventDispatcherHook(RoomWidgetDoorbellEvent.ACCEPTED, eventDispatcher, onRoomWidgetDoorbellEvent); + + const answer = useCallback((userName: string, flag: boolean) => + { + widgetHandler.processWidgetMessage(new RoomWidgetLetUserInMessage(userName, flag)); + + removeUser(userName); + }, [ widgetHandler, removeUser ]); + + if(!users.length) return null; + + return ( + + setIsVisible(false) } /> + +
+ { (users.length > 0) && users.map(userName => + { + return ( +
+ { userName } +
+ + +
+
+ ); + }) } +
+
+
+ ); +} From 077c016212df9a05358e1627442f2605add3f881 Mon Sep 17 00:00:00 2001 From: Bill Date: Sun, 15 Aug 2021 00:54:17 -0400 Subject: [PATCH 63/66] Update choosers --- package-lock.json | 10 ++ package.json | 3 +- src/events/room-widgets/index.ts | 1 + .../room/events}/RoomObjectItem.ts | 6 +- .../events}/RoomWidgetChooserContentEvent.ts | 13 +-- src/views/room/events/index.ts | 2 + .../handlers/FurniChooserWidgetHandler.ts | 95 ++++++++----------- .../room/handlers/UserChooserWidgetHandler.ts | 52 ++++------ .../widgets/choosers/ChooserWidgetView.scss | 10 +- .../widgets/choosers/ChooserWidgetView.tsx | 85 +++++++---------- .../choosers/ChooserWidgetView.type.ts | 9 +- .../choosers/FurniChooserWidgetView.tsx | 54 ++++++++--- .../choosers/UserChooserWidgetView.tsx | 55 ++++++++--- .../room/widgets/choosers/utils/sorting.ts | 18 ---- 14 files changed, 203 insertions(+), 210 deletions(-) rename src/{events/room-widgets/choosers => views/room/events}/RoomObjectItem.ts (78%) rename src/{events/room-widgets/choosers => views/room/events}/RoomWidgetChooserContentEvent.ts (52%) delete mode 100644 src/views/room/widgets/choosers/utils/sorting.ts diff --git a/package-lock.json b/package-lock.json index 2b0533bd..8db31629 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4082,6 +4082,16 @@ "@types/react": "*" } }, + "@types/react-virtualized": { + "version": "9.21.13", + "resolved": "https://registry.npmjs.org/@types/react-virtualized/-/react-virtualized-9.21.13.tgz", + "integrity": "sha512-tCIQ5wDKj+QJ3sMzjPKSLY0AXsznt+ovAUcq+JCLjPBOcAHbPt4FraGT9HKYEFfmp9E6+ELuN49i5bWtuBmi3w==", + "dev": true, + "requires": { + "@types/prop-types": "*", + "@types/react": "*" + } + }, "@types/resolve": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", diff --git a/package.json b/package.json index ae0751c7..9a30909a 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "@types/react": "^17.0.15", "@types/react-dom": "^17.0.9", "@types/react-slider": "^1.3.1", - "@types/react-transition-group": "^4.4.2" + "@types/react-transition-group": "^4.4.2", + "@types/react-virtualized": "^9.21.13" } } diff --git a/src/events/room-widgets/index.ts b/src/events/room-widgets/index.ts index 5eeca25b..960db095 100644 --- a/src/events/room-widgets/index.ts +++ b/src/events/room-widgets/index.ts @@ -1 +1,2 @@ export * from './camera'; +export * from './thumbnail'; diff --git a/src/events/room-widgets/choosers/RoomObjectItem.ts b/src/views/room/events/RoomObjectItem.ts similarity index 78% rename from src/events/room-widgets/choosers/RoomObjectItem.ts rename to src/views/room/events/RoomObjectItem.ts index d11fc5a8..f4fb2d6f 100644 --- a/src/events/room-widgets/choosers/RoomObjectItem.ts +++ b/src/views/room/events/RoomObjectItem.ts @@ -1,8 +1,8 @@ export class RoomObjectItem { - private readonly _id: number; - private readonly _category: number; - private readonly _name: string; + private _id: number; + private _category: number; + private _name: string; constructor(id: number, category: number, name: string) { diff --git a/src/events/room-widgets/choosers/RoomWidgetChooserContentEvent.ts b/src/views/room/events/RoomWidgetChooserContentEvent.ts similarity index 52% rename from src/events/room-widgets/choosers/RoomWidgetChooserContentEvent.ts rename to src/views/room/events/RoomWidgetChooserContentEvent.ts index aabb254e..75ec5f8e 100644 --- a/src/events/room-widgets/choosers/RoomWidgetChooserContentEvent.ts +++ b/src/views/room/events/RoomWidgetChooserContentEvent.ts @@ -1,5 +1,5 @@ -import { RoomWidgetUpdateEvent } from '../../../views/room/events'; import { RoomObjectItem } from './RoomObjectItem'; +import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent'; export class RoomWidgetChooserContentEvent extends RoomWidgetUpdateEvent { @@ -7,23 +7,16 @@ export class RoomWidgetChooserContentEvent extends RoomWidgetUpdateEvent public static FURNI_CHOOSER_CONTENT: string = 'RWCCE_FURNI_CHOOSER_CONTENT'; private _items: RoomObjectItem[]; - private _isAnyRoomController: boolean; - constructor(type: string, items: RoomObjectItem[], isAnyRoomController: boolean = false) + constructor(type: string, items: RoomObjectItem[]) { super(type); - this._items = items.slice(); - this._isAnyRoomController = isAnyRoomController; + this._items = items; } public get items(): RoomObjectItem[] { return this._items; } - - public get isAnyRoomController(): boolean - { - return this._isAnyRoomController; - } } diff --git a/src/views/room/events/index.ts b/src/views/room/events/index.ts index 4440c0af..d584aa5a 100644 --- a/src/views/room/events/index.ts +++ b/src/views/room/events/index.ts @@ -1,4 +1,6 @@ +export * from './RoomObjectItem'; export * from './RoomWidgetAvatarInfoEvent'; +export * from './RoomWidgetChooserContentEvent'; export * from './RoomWidgetDoorbellEvent'; export * from './RoomWidgetFloodControlEvent'; export * from './RoomWidgetObjectNameEvent'; diff --git a/src/views/room/handlers/FurniChooserWidgetHandler.ts b/src/views/room/handlers/FurniChooserWidgetHandler.ts index 9dc3f12e..f1dc79d7 100644 --- a/src/views/room/handlers/FurniChooserWidgetHandler.ts +++ b/src/views/room/handlers/FurniChooserWidgetHandler.ts @@ -1,11 +1,8 @@ import { NitroEvent, RoomObjectCategory, RoomObjectVariable, RoomWidgetEnum } from '@nitrots/nitro-renderer'; -import { GetNitroInstance, GetRoomEngine, GetSessionDataManager } from '../../../api'; -import { RoomObjectItem } from '../../../events/room-widgets/choosers/RoomObjectItem'; -import { RoomWidgetChooserContentEvent } from '../../../events/room-widgets/choosers/RoomWidgetChooserContentEvent'; -import { dispatchUiEvent } from '../../../hooks'; -import { RoomWidgetUpdateEvent } from '../events'; +import { GetRoomEngine, GetSessionDataManager } from '../../../api'; +import { LocalizeText } from '../../../utils'; +import { RoomObjectItem, RoomWidgetChooserContentEvent, RoomWidgetUpdateEvent } from '../events'; import { RoomWidgetMessage, RoomWidgetRequestWidgetMessage, RoomWidgetRoomObjectMessage } from '../messages'; -import { dynamicSort } from '../widgets/choosers/utils/sorting'; import { RoomWidgetHandler } from './RoomWidgetHandler'; export class FurniChooserWidgetHandler extends RoomWidgetHandler @@ -21,78 +18,68 @@ export class FurniChooserWidgetHandler extends RoomWidgetHandler switch(message.type) { case RoomWidgetRequestWidgetMessage.FURNI_CHOOSER: - this.processFurniChooser(); + this.processChooser(); break; case RoomWidgetRoomObjectMessage.SELECT_OBJECT: - this.selectFurni(message); + this.selectRoomObject((message as RoomWidgetRoomObjectMessage)); break; } return null; } - private selectFurni(message: RoomWidgetMessage): void + private processChooser(): void { - const event = message as RoomWidgetRoomObjectMessage; - - if(event == null) return; - - if(event.category === RoomObjectCategory.WALL || event.category === RoomObjectCategory.FLOOR) - { - GetRoomEngine().selectRoomObject(this.container.roomSession.roomId, event.id, event.category); - } - } - - private processFurniChooser(): void - { - - if(this.container == null || this.container.roomSession == null || GetRoomEngine() == null || this.container.roomSession.userDataManager == null) return; - const roomId = this.container.roomSession.roomId; - const furniInRoom : RoomObjectItem[] = []; + const items: RoomObjectItem[] = []; const wallItems = GetRoomEngine().getRoomObjects(roomId, RoomObjectCategory.WALL); const floorItems = GetRoomEngine().getRoomObjects(roomId, RoomObjectCategory.FLOOR); - wallItems.forEach( wallItem => { - if(!wallItem) return; + wallItems.forEach(roomObject => + { + let name = roomObject.type; - const type = wallItem.type; - let name = null; - if(type.startsWith('poster')) - { - const posterNumber = Number.parseInt(type.replace('poster', '')); - name = GetNitroInstance().localization.getValue('poster_' + posterNumber + '_name'); - } - else - { - const furniTypeId = Number.parseInt(wallItem.model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID)); - const wallItemData = GetSessionDataManager().getWallItemData(furniTypeId); - if(wallItemData != null && wallItemData.name.length > 0) + if(name.startsWith('poster')) { - name = wallItemData.name; + name = LocalizeText(`poster_${ name.replace('poster', '') }_name`); } else { - name = type; + const typeId = roomObject.model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID); + const furniData = GetSessionDataManager().getWallItemData(typeId); + + if(furniData && furniData.name.length) name = furniData.name; } - } - furniInRoom.push(new RoomObjectItem(wallItem.id, RoomObjectCategory.WALL, name)); - }); - floorItems.forEach(roomObject => { - if(!roomObject) return; - - const furniTypeId = Number.parseInt(roomObject.model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID)); - const floorItemData = GetSessionDataManager().getFloorItemData(furniTypeId); - const name = floorItemData != null ? floorItemData.name : roomObject.type; + items.push(new RoomObjectItem(roomObject.id, RoomObjectCategory.WALL, name)); + }); - furniInRoom.push(new RoomObjectItem(roomObject.id, RoomObjectCategory.FLOOR, name)); - }); + floorItems.forEach(roomObject => + { + let name = roomObject.type; - furniInRoom.sort(dynamicSort('name')); + const typeId = roomObject.model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID); + const furniData = GetSessionDataManager().getFloorItemData(typeId); - dispatchUiEvent(new RoomWidgetChooserContentEvent(RoomWidgetChooserContentEvent.FURNI_CHOOSER_CONTENT, furniInRoom, false)); + if(furniData && furniData.name.length) name = furniData.name; + + items.push(new RoomObjectItem(roomObject.id, RoomObjectCategory.FLOOR, name)); + }); + + items.sort((a, b) => + { + return (a.name < b.name) ? -1 : 1; + }); + + this.container.eventDispatcher.dispatchEvent(new RoomWidgetChooserContentEvent(RoomWidgetChooserContentEvent.FURNI_CHOOSER_CONTENT, items)); + } + + private selectRoomObject(message: RoomWidgetRoomObjectMessage): void + { + if(message.category !== RoomObjectCategory.WALL || message.category !== RoomObjectCategory.FLOOR) return; + + GetRoomEngine().selectRoomObject(this.container.roomSession.roomId, message.id, message.category); } public get type(): string diff --git a/src/views/room/handlers/UserChooserWidgetHandler.ts b/src/views/room/handlers/UserChooserWidgetHandler.ts index ce889635..5ab8ecc6 100644 --- a/src/views/room/handlers/UserChooserWidgetHandler.ts +++ b/src/views/room/handlers/UserChooserWidgetHandler.ts @@ -1,12 +1,8 @@ import { NitroEvent, RoomObjectCategory, RoomWidgetEnum } from '@nitrots/nitro-renderer'; import { RoomWidgetHandler } from '.'; import { GetRoomEngine } from '../../../api'; -import { RoomObjectItem } from '../../../events/room-widgets/choosers/RoomObjectItem'; -import { RoomWidgetChooserContentEvent } from '../../../events/room-widgets/choosers/RoomWidgetChooserContentEvent'; -import { dispatchUiEvent } from '../../../hooks'; -import { RoomWidgetUpdateEvent } from '../events'; +import { RoomObjectItem, RoomWidgetChooserContentEvent, RoomWidgetUpdateEvent } from '../events'; import { RoomWidgetMessage, RoomWidgetRequestWidgetMessage, RoomWidgetRoomObjectMessage } from '../messages'; -import { dynamicSort } from '../widgets/choosers/utils/sorting'; export class UserChooserWidgetHandler extends RoomWidgetHandler { @@ -21,51 +17,45 @@ export class UserChooserWidgetHandler extends RoomWidgetHandler switch(message.type) { case RoomWidgetRequestWidgetMessage.USER_CHOOSER: - this.processUserChooser(); + this.processChooser(); break; case RoomWidgetRoomObjectMessage.SELECT_OBJECT: - this.selectUnit(message); + this.selectRoomObject((message as RoomWidgetRoomObjectMessage)); break; } return null; } - private processUserChooser(): void + private processChooser(): void { - - if(this.container == null || this.container.roomSession == null || GetRoomEngine() == null || this.container.roomSession.userDataManager == null) return; - const roomId = this.container.roomSession.roomId; - const categoryId = RoomObjectCategory.UNIT; - const units : RoomObjectItem[] = []; - - const roomObjects = GetRoomEngine().getRoomObjects(roomId, categoryId); + const items: RoomObjectItem[] = []; - roomObjects.forEach(roomObject => { - if(!roomObject) return; + const userItems = GetRoomEngine().getRoomObjects(roomId, RoomObjectCategory.UNIT); - const unitData = this.container.roomSession.userDataManager.getUserDataByIndex(roomObject.id); + userItems.forEach(roomObject => + { + const userData = this.container.roomSession.userDataManager.getUserDataByIndex(roomObject.id); - if(!unitData) return; + if(!userData) return; - units.push(new RoomObjectItem(unitData.roomIndex, categoryId, unitData.name)); + items.push(new RoomObjectItem(userData.roomIndex, RoomObjectCategory.UNIT, userData.name)); + }); + + items.sort((a, b) => + { + return (a.name < b.name) ? -1 : 1; }); - units.sort(dynamicSort('name')); - dispatchUiEvent(new RoomWidgetChooserContentEvent(RoomWidgetChooserContentEvent.USER_CHOOSER_CONTENT, units)); + this.container.eventDispatcher.dispatchEvent(new RoomWidgetChooserContentEvent(RoomWidgetChooserContentEvent.USER_CHOOSER_CONTENT, items)); } - private selectUnit(k: RoomWidgetMessage): void + private selectRoomObject(message: RoomWidgetRoomObjectMessage): void { - const event = k as RoomWidgetRoomObjectMessage; - - if(event == null) return; - - if(event.category === RoomObjectCategory.UNIT) - { - GetRoomEngine().selectRoomObject(this.container.roomSession.roomId, event.id, event.category); - } + if(message.category !== RoomObjectCategory.UNIT) return; + + GetRoomEngine().selectRoomObject(this.container.roomSession.roomId, message.id, message.category); } public get type(): string diff --git a/src/views/room/widgets/choosers/ChooserWidgetView.scss b/src/views/room/widgets/choosers/ChooserWidgetView.scss index bca2d777..9a461869 100644 --- a/src/views/room/widgets/choosers/ChooserWidgetView.scss +++ b/src/views/room/widgets/choosers/ChooserWidgetView.scss @@ -1,9 +1,11 @@ -.chooser-widget { - .selected-item { - background-color: cadetblue; - } +.nitro-chooser-widget { + .list-item { color: black; overflow: hidden; + + &.selected { + background-color: cadetblue; + } } } diff --git a/src/views/room/widgets/choosers/ChooserWidgetView.tsx b/src/views/room/widgets/choosers/ChooserWidgetView.tsx index 05d3e7bf..db2da704 100644 --- a/src/views/room/widgets/choosers/ChooserWidgetView.tsx +++ b/src/views/room/widgets/choosers/ChooserWidgetView.tsx @@ -1,86 +1,65 @@ -import { FC, useCallback, useEffect, useState } from 'react'; -import List from 'react-virtualized/dist/commonjs/List'; -import { RoomObjectItem } from '../../../../events/room-widgets/choosers/RoomObjectItem'; -import { CreateEventDispatcherHook } from '../../../../hooks'; +import { FC, useCallback, useMemo, useState } from 'react'; +import { List, ListRowProps, ListRowRenderer } from 'react-virtualized'; import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../layout'; import { LocalizeText } from '../../../../utils'; import { useRoomContext } from '../../context/RoomContext'; -import { RoomWidgetRoomObjectUpdateEvent } from '../../events'; -import { RoomWidgetRequestWidgetMessage, RoomWidgetRoomObjectMessage } from '../../messages'; +import { RoomObjectItem } from '../../events'; +import { RoomWidgetRoomObjectMessage } from '../../messages'; import { ChooserWidgetViewProps } from './ChooserWidgetView.type'; export const ChooserWidgetView: FC = props => { - const [filteredItems, setFilteredItems] = useState([]); - const [selectedItem, setSelectedItem] = useState(null); - const [refreshTimeout, setRefreshTimeout] = useState>(null); - const [searchValue, setSearchValue] = useState(''); - const { title = null, onCloseClick = null, displayItemId = false, items = null, messageType = null, roomWidgetRoomObjectUpdateEvents = null } = props; + const { title = null, items = null, displayItemId = false, onCloseClick = null } = props; + const [ selectedItem, setSelectedItem ] = useState(null); + const [ searchValue, setSearchValue ] = useState(''); const { eventDispatcher = null, widgetHandler = null } = useRoomContext(); - useEffect(() => + const filteredItems = useMemo(() => { - if (!items) return; + if(!items) return []; - const filteredGroupItems = items.filter(item => - { - return item.name.toLocaleLowerCase().includes(searchValue.toLocaleLowerCase()); - }); + if(!searchValue || !searchValue.length) return items; - setFilteredItems(filteredGroupItems); - }, [items, searchValue, setFilteredItems]); + const value = searchValue.toLocaleLowerCase(); - const onRoomWidgetRoomObjectUpdateEvent = useCallback((event: RoomWidgetRoomObjectUpdateEvent) => - { - if (!event) return; + return items.filter(item => + { + return item.name.toLocaleLowerCase().includes(value); + }); + }, [ items, searchValue ]); - if (refreshTimeout) clearTimeout(refreshTimeout); - - setRefreshTimeout(setTimeout(() => - { - widgetHandler.processWidgetMessage(new RoomWidgetRequestWidgetMessage(messageType)); - }, 100)); - - }, [refreshTimeout, messageType, widgetHandler]); - - roomWidgetRoomObjectUpdateEvents.forEach(event => CreateEventDispatcherHook(event, eventDispatcher, onRoomWidgetRoomObjectUpdateEvent)); - - const onClickItem = useCallback((item: RoomObjectItem) => + const onItemClick = useCallback((item: RoomObjectItem) => { setSelectedItem(item); widgetHandler.processWidgetMessage(new RoomWidgetRoomObjectMessage(RoomWidgetRoomObjectMessage.SELECT_OBJECT, item.id, item.category)); - }, [setSelectedItem, widgetHandler]); + }, [ widgetHandler, setSelectedItem]); - const rowRenderer = function ({ - key, // Unique key within array of rows - index, // Index of row within collection - isScrolling, // The List is currently being scrolled - isVisible, // This row is visible within the List (eg it is not an overscanned row) - style, // Style object to be applied to row (to position it) - }) + const rowRenderer: ListRowRenderer = (props: ListRowProps) => { + const item = filteredItems[props.index]; + return ( -
onClickItem(filteredItems[index])} className={(selectedItem === filteredItems[index] ? 'selected-item ' : '') + 'list-item'}> - {filteredItems[index].name} - {displayItemId && (' - ' + filteredItems[index].id)} +
onItemClick(item) }> + { item.name } { displayItemId && (' - ' + item.id) }
); } return ( - - + +
- setSearchValue(event.target.value)} /> + setSearchValue(event.target.value)} />
- +
); diff --git a/src/views/room/widgets/choosers/ChooserWidgetView.type.ts b/src/views/room/widgets/choosers/ChooserWidgetView.type.ts index 87c9ef9f..8266f8b9 100644 --- a/src/views/room/widgets/choosers/ChooserWidgetView.type.ts +++ b/src/views/room/widgets/choosers/ChooserWidgetView.type.ts @@ -1,12 +1,9 @@ -import { MouseEvent } from 'react'; -import { RoomObjectItem } from '../../../../events/room-widgets/choosers/RoomObjectItem'; +import { RoomObjectItem } from '../../events'; export interface ChooserWidgetViewProps { title: string; - onCloseClick: (event: MouseEvent) => void; - displayItemId: boolean; items: RoomObjectItem[]; - messageType: string; - roomWidgetRoomObjectUpdateEvents: string[]; + displayItemId: boolean; + onCloseClick: () => void; } diff --git a/src/views/room/widgets/choosers/FurniChooserWidgetView.tsx b/src/views/room/widgets/choosers/FurniChooserWidgetView.tsx index d3d1b617..0ac7ab55 100644 --- a/src/views/room/widgets/choosers/FurniChooserWidgetView.tsx +++ b/src/views/room/widgets/choosers/FurniChooserWidgetView.tsx @@ -1,27 +1,55 @@ import { FC, useCallback, useState } from 'react'; -import { RoomObjectItem } from '../../../../events/room-widgets/choosers/RoomObjectItem'; -import { RoomWidgetChooserContentEvent } from '../../../../events/room-widgets/choosers/RoomWidgetChooserContentEvent'; -import { useUiEvent } from '../../../../hooks'; +import { CreateEventDispatcherHook } from '../../../../hooks'; import { LocalizeText } from '../../../../utils'; -import { RoomWidgetRoomObjectUpdateEvent } from '../../events'; +import { useRoomContext } from '../../context/RoomContext'; +import { RoomObjectItem, RoomWidgetChooserContentEvent, RoomWidgetRoomObjectUpdateEvent } from '../../events'; import { RoomWidgetRequestWidgetMessage } from '../../messages'; import { ChooserWidgetView } from './ChooserWidgetView'; -export const FurniChooserWidgetView: FC = props => +export const FurniChooserWidgetView: FC<{}> = props => { - const [isVisible, setIsVisible] = useState(false); - const [items, setItems] = useState(null); + const [ isVisible, setIsVisible ] = useState(false); + const [ items, setItems ] = useState(null); + const [ refreshTimeout, setRefreshTimeout ] = useState>(null); + const { eventDispatcher = null, widgetHandler = null } = useRoomContext(); - const onFurniChooserContent = useCallback((event: RoomWidgetChooserContentEvent) => + const refreshChooser = useCallback(() => + { + if(!isVisible) return; + + setRefreshTimeout(prevValue => + { + if(prevValue) clearTimeout(prevValue); + + return setTimeout(() => widgetHandler.processWidgetMessage(new RoomWidgetRequestWidgetMessage(RoomWidgetRequestWidgetMessage.FURNI_CHOOSER)), 100); + }) + }, [ isVisible, widgetHandler ]); + + const onRoomWidgetChooserContentEvent = useCallback((event: RoomWidgetChooserContentEvent) => { setItems(event.items); setIsVisible(true); }, []); - useUiEvent(RoomWidgetChooserContentEvent.FURNI_CHOOSER_CONTENT, onFurniChooserContent); + CreateEventDispatcherHook(RoomWidgetChooserContentEvent.FURNI_CHOOSER_CONTENT, eventDispatcher, onRoomWidgetChooserContentEvent); + const onRoomWidgetRoomObjectUpdateEvent = useCallback((event: RoomWidgetRoomObjectUpdateEvent) => + { + if(!isVisible) return; - const onClose = useCallback(() => + switch(event.type) + { + case RoomWidgetRoomObjectUpdateEvent.FURNI_ADDED: + case RoomWidgetRoomObjectUpdateEvent.FURNI_REMOVED: + refreshChooser(); + return; + } + }, [ isVisible, refreshChooser ]); + + CreateEventDispatcherHook(RoomWidgetRoomObjectUpdateEvent.FURNI_ADDED, eventDispatcher, onRoomWidgetRoomObjectUpdateEvent); + CreateEventDispatcherHook(RoomWidgetRoomObjectUpdateEvent.FURNI_REMOVED, eventDispatcher, onRoomWidgetRoomObjectUpdateEvent); + + const close = useCallback(() => { setIsVisible(false); setItems(null); @@ -29,9 +57,5 @@ export const FurniChooserWidgetView: FC = props => if (!isVisible) return null; - return ( -
- -
- ) + return ; } diff --git a/src/views/room/widgets/choosers/UserChooserWidgetView.tsx b/src/views/room/widgets/choosers/UserChooserWidgetView.tsx index e7f1e3be..4c8056af 100644 --- a/src/views/room/widgets/choosers/UserChooserWidgetView.tsx +++ b/src/views/room/widgets/choosers/UserChooserWidgetView.tsx @@ -1,26 +1,55 @@ import { FC, useCallback, useState } from 'react'; -import { RoomObjectItem } from '../../../../events/room-widgets/choosers/RoomObjectItem'; -import { RoomWidgetChooserContentEvent } from '../../../../events/room-widgets/choosers/RoomWidgetChooserContentEvent'; -import { useUiEvent } from '../../../../hooks'; +import { CreateEventDispatcherHook } from '../../../../hooks'; import { LocalizeText } from '../../../../utils'; -import { RoomWidgetRoomObjectUpdateEvent } from '../../events'; +import { useRoomContext } from '../../context/RoomContext'; +import { RoomObjectItem, RoomWidgetChooserContentEvent, RoomWidgetRoomObjectUpdateEvent } from '../../events'; import { RoomWidgetRequestWidgetMessage } from '../../messages'; import { ChooserWidgetView } from './ChooserWidgetView'; -export const UserChooserWidgetView : FC = props => +export const UserChooserWidgetView: FC<{}> = props => { - const [isVisible, setIsVisible] = useState(false); - const [items, setItems] = useState(null); + const [ isVisible, setIsVisible ] = useState(false); + const [ items, setItems ] = useState(null); + const [ refreshTimeout, setRefreshTimeout ] = useState>(null); + const { eventDispatcher = null, widgetHandler = null } = useRoomContext(); - const onUserChooserContent = useCallback((event: RoomWidgetChooserContentEvent) => + const refreshChooser = useCallback(() => + { + if(!isVisible) return; + + setRefreshTimeout(prevValue => + { + if(prevValue) clearTimeout(prevValue); + + return setTimeout(() => widgetHandler.processWidgetMessage(new RoomWidgetRequestWidgetMessage(RoomWidgetRequestWidgetMessage.FURNI_CHOOSER)), 100); + }) + }, [ isVisible, widgetHandler ]); + + const onRoomWidgetChooserContentEvent = useCallback((event: RoomWidgetChooserContentEvent) => { setItems(event.items); setIsVisible(true); }, []); - useUiEvent(RoomWidgetChooserContentEvent.USER_CHOOSER_CONTENT, onUserChooserContent); + CreateEventDispatcherHook(RoomWidgetChooserContentEvent.USER_CHOOSER_CONTENT, eventDispatcher, onRoomWidgetChooserContentEvent); - const onClose = useCallback(() => + const onRoomWidgetRoomObjectUpdateEvent = useCallback((event: RoomWidgetRoomObjectUpdateEvent) => + { + if(!isVisible) return; + + switch(event.type) + { + case RoomWidgetRoomObjectUpdateEvent.USER_ADDED: + case RoomWidgetRoomObjectUpdateEvent.USER_REMOVED: + refreshChooser(); + return; + } + }, [ isVisible, refreshChooser ]); + + CreateEventDispatcherHook(RoomWidgetRoomObjectUpdateEvent.USER_ADDED, eventDispatcher, onRoomWidgetRoomObjectUpdateEvent); + CreateEventDispatcherHook(RoomWidgetRoomObjectUpdateEvent.USER_REMOVED, eventDispatcher, onRoomWidgetRoomObjectUpdateEvent); + + const close = useCallback(() => { setIsVisible(false); setItems(null); @@ -28,9 +57,5 @@ export const UserChooserWidgetView : FC = props => if(!isVisible) return null; - return ( -
- -
- ); + return ; } diff --git a/src/views/room/widgets/choosers/utils/sorting.ts b/src/views/room/widgets/choosers/utils/sorting.ts deleted file mode 100644 index eee12529..00000000 --- a/src/views/room/widgets/choosers/utils/sorting.ts +++ /dev/null @@ -1,18 +0,0 @@ -export function dynamicSort(property) -{ - // Source: https://stackoverflow.com/questions/1129216/sort-array-of-objects-by-string-property-value - let sortOrder = 1; - if(property[0] === '-') - { - sortOrder = -1; - property = property.substr(1); - } - return function (a,b) - { - /* next line works with strings and numbers, - * and you may want to customize it to your needs - */ - const result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0; - return result * sortOrder; - }; -} From 39d337e28798a1663d33a9a39dc4b5efe2d8dee5 Mon Sep 17 00:00:00 2001 From: Bill Date: Sun, 15 Aug 2021 00:55:12 -0400 Subject: [PATCH 64/66] Update doorbell --- .../widgets/doorbell/DoorbellWidgetView.tsx | 13 +++--------- .../doorbell-item/DoorbellWidgetItemView.tsx | 21 +++++++++++++++++++ .../DoorbellWidgetItemView.types.ts | 6 ++++++ 3 files changed, 30 insertions(+), 10 deletions(-) create mode 100644 src/views/room/widgets/doorbell/doorbell-item/DoorbellWidgetItemView.tsx create mode 100644 src/views/room/widgets/doorbell/doorbell-item/DoorbellWidgetItemView.types.ts diff --git a/src/views/room/widgets/doorbell/DoorbellWidgetView.tsx b/src/views/room/widgets/doorbell/DoorbellWidgetView.tsx index 7dad34dd..b4ac0512 100644 --- a/src/views/room/widgets/doorbell/DoorbellWidgetView.tsx +++ b/src/views/room/widgets/doorbell/DoorbellWidgetView.tsx @@ -5,6 +5,7 @@ import { LocalizeText } from '../../../../utils'; import { useRoomContext } from '../../context/RoomContext'; import { RoomWidgetDoorbellEvent } from '../../events'; import { RoomWidgetLetUserInMessage } from '../../messages'; +import { DoorbellWidgetItemView } from './doorbell-item/DoorbellWidgetItemView'; export const DoorbellWidgetView: FC<{}> = props => { @@ -62,7 +63,7 @@ export const DoorbellWidgetView: FC<{}> = props => removeUser(userName); }, [ widgetHandler, removeUser ]); - if(!users.length) return null; + if(!isVisible) return null; return ( @@ -71,15 +72,7 @@ export const DoorbellWidgetView: FC<{}> = props =>
{ (users.length > 0) && users.map(userName => { - return ( -
- { userName } -
- - -
-
- ); + return answer(userName, true) } deny={ () => answer(userName, false) } />; }) }
diff --git a/src/views/room/widgets/doorbell/doorbell-item/DoorbellWidgetItemView.tsx b/src/views/room/widgets/doorbell/doorbell-item/DoorbellWidgetItemView.tsx new file mode 100644 index 00000000..dcd90189 --- /dev/null +++ b/src/views/room/widgets/doorbell/doorbell-item/DoorbellWidgetItemView.tsx @@ -0,0 +1,21 @@ +import { FC } from 'react'; +import { DoorbellWidgetItemViewProps } from './DoorbellWidgetItemView.types'; + +export const DoorbellWidgetItemView: FC = props => +{ + const { userName = '', accept = null, deny = null } = props; + + return ( +
+ { userName } +
+ + +
+
+ ); +} diff --git a/src/views/room/widgets/doorbell/doorbell-item/DoorbellWidgetItemView.types.ts b/src/views/room/widgets/doorbell/doorbell-item/DoorbellWidgetItemView.types.ts new file mode 100644 index 00000000..a0ba4caa --- /dev/null +++ b/src/views/room/widgets/doorbell/doorbell-item/DoorbellWidgetItemView.types.ts @@ -0,0 +1,6 @@ +export interface DoorbellWidgetItemViewProps +{ + userName: string; + accept: () => void; + deny: () => void; +} From 092f6a831c96f64bda59271afe1202e55bf0d24f Mon Sep 17 00:00:00 2001 From: Bill Date: Sun, 15 Aug 2021 01:39:54 -0400 Subject: [PATCH 65/66] Update user settings --- src/views/user-settings/UserSettingsView.scss | 14 +-- src/views/user-settings/UserSettingsView.tsx | 102 +++++++----------- 2 files changed, 45 insertions(+), 71 deletions(-) diff --git a/src/views/user-settings/UserSettingsView.scss b/src/views/user-settings/UserSettingsView.scss index bd87fb17..5c439eaf 100644 --- a/src/views/user-settings/UserSettingsView.scss +++ b/src/views/user-settings/UserSettingsView.scss @@ -1,15 +1,9 @@ .user-settings-window { - .content-area - { - color: black; - } + .content-area { - .custom-range { - margin-top: 3px; - } - - .icon-container { - width: 50px; + .fas { + width: 20px; + } } } diff --git a/src/views/user-settings/UserSettingsView.tsx b/src/views/user-settings/UserSettingsView.tsx index f30a2c34..b473d33c 100644 --- a/src/views/user-settings/UserSettingsView.tsx +++ b/src/views/user-settings/UserSettingsView.tsx @@ -8,8 +8,8 @@ import { LocalizeText } from '../../utils'; export const UserSettingsView: FC<{}> = props => { - const [isVisible, setIsVisible] = useState(false); - const [userSettings, setUserSettings] = useState(null); + const [ isVisible, setIsVisible ] = useState(false); + const [ userSettings, setUserSettings ] = useState(null); const onUserSettingsUIEvent = useCallback((event: UserSettingsUIEvent) => { @@ -114,67 +114,47 @@ export const UserSettingsView: FC<{}> = props => if (!isVisible) return null; return ( -
- - processAction('close_view')} /> - -
- processAction('oldchat', event.target.checked)} /> - + + processAction('close_view')} /> + +
+ processAction('oldchat', event.target.checked) } /> + +
+
+ processAction('room_invites', event.target.checked) } /> + +
+
+ processAction('camera_follow', event.target.checked) } /> + +
+
{ LocalizeText('widget.memenu.settings.volume') }
+
+ +
+ 0) ? ' fa-volume-down' : '') + ((userSettings.volumeSystem >= 50) ? ' text-muted' : '') } /> + processAction("system_volume", event.target.value) } onMouseUp={ () => saveRangeSlider("volume") }/> +
-
- processAction('room_invites', event.target.checked)} /> - +
+
+ +
+ 0) ? ' fa-volume-down' : '') + ((userSettings.volumeFurni >= 50) ? ' text-muted' : '') } /> + processAction("furni_volume", event.target.value) } onMouseUp={ () => saveRangeSlider("volume") }/> +
-
- processAction('camera_follow', event.target.checked)} /> - +
+
+ +
+ 0) ? ' fa-volume-down' : '') + ((userSettings.volumeTrax >= 50) ? ' text-muted' : '') } /> + processAction("trax_volume", event.target.value) } onMouseUp={ () => saveRangeSlider("volume") }/> +
-
{LocalizeText('widget.memenu.settings.volume')}
-
- -
-
= 50 ? 'text-muted' : '')}> - 0 ? 'fa-volume-down' : '')}> -
-
- processAction("system_volume", event.target.value)} onMouseUp={ () => saveRangeSlider("volume")}/> -
-
- -
-
-
-
- -
-
= 50 ? 'text-muted' : '')}> - 0 ? 'fa-volume-down' : '')}> -
-
- processAction("furni_volume", event.target.value)} onMouseUp={ () => saveRangeSlider("volume")}/> -
-
- -
-
-
-
- -
-
= 50 ? 'text-muted' : '')}> - 0 ? 'fa-volume-down' : '')}> -
-
- processAction("trax_volume", event.target.value)} onMouseUp={ () => saveRangeSlider("volume")}/> -
-
- -
-
-
- - -
+
+ + ); } From 6d0e1d8010ffc2b7777f96cd93e95a87ca0ca1cd Mon Sep 17 00:00:00 2001 From: Bill Date: Sun, 15 Aug 2021 01:58:29 -0400 Subject: [PATCH 66/66] Update ExternalImageWidget --- src/views/room/events/IPhotoData.ts | 32 +++++++++++++++++ .../RoomWidgetUpdateExternalImageEvent.ts | 36 ++----------------- src/views/room/events/index.ts | 1 + .../FurnitureExternalImageWidgetHandler.ts | 16 ++++----- .../widgets/furniture/FurnitureWidgets.scss | 1 + .../FurnitureExternalImageView.scss | 7 ++++ .../FurnitureExternalImageView.tsx | 27 +++++++++----- 7 files changed, 68 insertions(+), 52 deletions(-) create mode 100644 src/views/room/events/IPhotoData.ts create mode 100644 src/views/room/widgets/furniture/external-image/FurnitureExternalImageView.scss diff --git a/src/views/room/events/IPhotoData.ts b/src/views/room/events/IPhotoData.ts new file mode 100644 index 00000000..05441767 --- /dev/null +++ b/src/views/room/events/IPhotoData.ts @@ -0,0 +1,32 @@ +export interface IPhotoData +{ + /** + * creator username + */ + n?: string; + + /** + * creator user id + */ + s?: number; + + /** + * photo unique id + */ + u?: number; + + /** + * creation timestamp + */ + t?: number; + + /** + * photo caption + */ + m?: string; + + /** + * photo image url + */ + w?: string; +} diff --git a/src/views/room/events/RoomWidgetUpdateExternalImageEvent.ts b/src/views/room/events/RoomWidgetUpdateExternalImageEvent.ts index 0b8f9425..781f2b44 100644 --- a/src/views/room/events/RoomWidgetUpdateExternalImageEvent.ts +++ b/src/views/room/events/RoomWidgetUpdateExternalImageEvent.ts @@ -1,8 +1,9 @@ +import { IPhotoData } from './IPhotoData'; import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent'; export class RoomWidgetUpdateExternalImageEvent extends RoomWidgetUpdateEvent { - public static UPDATE_EXTERNAL_IMAGE: string = 'RWUCSHE_UPDATE_EXTERNAL_IMAGE'; + public static UPDATE_EXTERNAL_IMAGE: string = 'RWUEIE_UPDATE_EXTERNAL_IMAGE'; private _objectId: number; private _photoData: IPhotoData; @@ -25,36 +26,3 @@ export class RoomWidgetUpdateExternalImageEvent extends RoomWidgetUpdateEvent return this._photoData; } } - -export interface IPhotoData -{ - /** - * creator username - */ - n?: string; - - /** - * creator user id - */ - s?: number; - - /** - * photo unique id - */ - u?: number; - - /** - * creation timestamp - */ - t?: number; - - /** - * photo caption - */ - m?: string; - - /** - * photo image url - */ - w?: string; -} diff --git a/src/views/room/events/index.ts b/src/views/room/events/index.ts index d584aa5a..b11465ce 100644 --- a/src/views/room/events/index.ts +++ b/src/views/room/events/index.ts @@ -1,3 +1,4 @@ +export * from './IPhotoData'; export * from './RoomObjectItem'; export * from './RoomWidgetAvatarInfoEvent'; export * from './RoomWidgetChooserContentEvent'; diff --git a/src/views/room/handlers/FurnitureExternalImageWidgetHandler.ts b/src/views/room/handlers/FurnitureExternalImageWidgetHandler.ts index 080d0044..0c45a2fc 100644 --- a/src/views/room/handlers/FurnitureExternalImageWidgetHandler.ts +++ b/src/views/room/handlers/FurnitureExternalImageWidgetHandler.ts @@ -1,7 +1,8 @@ -import { NitroEvent, RoomEngineTriggerWidgetEvent, RoomObjectVariable, RoomWidgetEnum } from 'nitro-renderer'; +import { NitroEvent, RoomEngineTriggerWidgetEvent, RoomObjectVariable, RoomWidgetEnum } from '@nitrots/nitro-renderer'; import { GetRoomEngine } from '../../../api'; +import { IPhotoData } from '../events'; import { RoomWidgetUpdateEvent } from '../events/RoomWidgetUpdateEvent'; -import { IPhotoData, RoomWidgetUpdateExternalImageEvent } from '../events/RoomWidgetUpdateExternalImageEvent'; +import { RoomWidgetUpdateExternalImageEvent } from '../events/RoomWidgetUpdateExternalImageEvent'; import { RoomWidgetMessage } from '../messages/RoomWidgetMessage'; import { RoomWidgetHandler } from './RoomWidgetHandler'; @@ -13,8 +14,7 @@ export class FurnitureExternalImageWidgetHandler extends RoomWidgetHandler { switch(event.type) { - case(RoomEngineTriggerWidgetEvent.OPEN_WIDGET): - { + case RoomEngineTriggerWidgetEvent.OPEN_WIDGET: { const widgetEvent = (event as RoomEngineTriggerWidgetEvent); const roomObject = GetRoomEngine().getRoomObject(widgetEvent.roomId, widgetEvent.objectId, widgetEvent.category); @@ -24,14 +24,12 @@ export class FurnitureExternalImageWidgetHandler extends RoomWidgetHandler this._lastFurniId = widgetEvent.objectId; const data = roomObject.model.getValue(RoomObjectVariable.FURNITURE_DATA); + const photoData = (JSON.parse(data) as IPhotoData); - const dataObj: IPhotoData = JSON.parse(data); - - this.container.eventDispatcher.dispatchEvent(new RoomWidgetUpdateExternalImageEvent(this._lastFurniId, dataObj)); + this.container.eventDispatcher.dispatchEvent(new RoomWidgetUpdateExternalImageEvent(roomObject.id, photoData)); return; } - case RoomEngineTriggerWidgetEvent.CLOSE_WIDGET: - { + case RoomEngineTriggerWidgetEvent.CLOSE_WIDGET: { const widgetEvent = (event as RoomEngineTriggerWidgetEvent); if(widgetEvent.objectId !== this._lastFurniId) return; diff --git a/src/views/room/widgets/furniture/FurnitureWidgets.scss b/src/views/room/widgets/furniture/FurnitureWidgets.scss index 9f5271ea..31176553 100644 --- a/src/views/room/widgets/furniture/FurnitureWidgets.scss +++ b/src/views/room/widgets/furniture/FurnitureWidgets.scss @@ -1,5 +1,6 @@ @import './dimmer/FurnitureDimmerView'; @import './exchange-credit/FurnitureExchangeCreditView'; +@import './external-image/FurnitureExternalImageView'; @import './friend-furni/FurnitureFriendFurniView'; @import './manipulation-menu/FurnitureManipulationMenuView'; @import './mannequin/FurnitureMannequinView'; diff --git a/src/views/room/widgets/furniture/external-image/FurnitureExternalImageView.scss b/src/views/room/widgets/furniture/external-image/FurnitureExternalImageView.scss new file mode 100644 index 00000000..4e39e9d0 --- /dev/null +++ b/src/views/room/widgets/furniture/external-image/FurnitureExternalImageView.scss @@ -0,0 +1,7 @@ +.nitro-external-image-widget { + + .picture-preview { + width: 320px; + height: 320px; + } +} diff --git a/src/views/room/widgets/furniture/external-image/FurnitureExternalImageView.tsx b/src/views/room/widgets/furniture/external-image/FurnitureExternalImageView.tsx index e38bab45..4a748685 100644 --- a/src/views/room/widgets/furniture/external-image/FurnitureExternalImageView.tsx +++ b/src/views/room/widgets/furniture/external-image/FurnitureExternalImageView.tsx @@ -1,15 +1,16 @@ import { FC, useCallback, useState } from 'react'; import { CreateEventDispatcherHook } from '../../../../../hooks'; import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../../layout'; +import { LocalizeText } from '../../../../../utils'; import { useRoomContext } from '../../../context/RoomContext'; -import { IPhotoData, RoomWidgetUpdateExternalImageEvent } from '../../../events/RoomWidgetUpdateExternalImageEvent'; +import { IPhotoData } from '../../../events'; +import { RoomWidgetUpdateExternalImageEvent } from '../../../events/RoomWidgetUpdateExternalImageEvent'; export const FurnitureExternalImageView: FC<{}> = props => { const [ objectId, setObjectId ] = useState(-1); - const [photoData, setPhotoData ] = useState(null); - - const { roomSession = null, eventDispatcher = null } = useRoomContext(); + const [ photoData, setPhotoData ] = useState(null); + const { eventDispatcher = null } = useRoomContext(); const close = useCallback(() => { @@ -30,15 +31,23 @@ export const FurnitureExternalImageView: FC<{}> = props => CreateEventDispatcherHook(RoomWidgetUpdateExternalImageEvent.UPDATE_EXTERNAL_IMAGE, eventDispatcher, onRoomWidgetUpdateExternalImageEvent); - if(objectId === -1 || !photoData) return null; + if((objectId === -1) || !photoData) return null; return( - + - - {photoData.m &&
{photoData.m}
} -
{`${photoData.n} - ${new Date(photoData.t * 1000).toLocaleDateString()}`}
+
+ { !photoData.w && +
+ { LocalizeText('camera.loading') } +
} +
+ { photoData.m &&
{ photoData.m }
}
+
+ { (photoData.n || '') } + { new Date(photoData.t * 1000).toLocaleDateString() } +
);