Move RoomContext

This commit is contained in:
Bill 2022-03-04 00:31:13 -05:00
parent e2ba6c7e9b
commit ecc5633567
51 changed files with 95 additions and 95 deletions

View File

@ -12,6 +12,7 @@ export * from './FurnitureTrophyWidgetHandler';
export * from './FurnitureYoutubeDisplayWidgetHandler';
export * from './IRoomWidgetHandler';
export * from './IRoomWidgetHandlerManager';
export * from './PollWidgetHandler';
export * from './RoomWidgetAvatarInfoHandler';
export * from './RoomWidgetChatHandler';
export * from './RoomWidgetChatInputHandler';
@ -20,3 +21,4 @@ export * from './RoomWidgetHandlerManager';
export * from './RoomWidgetInfostandHandler';
export * from './RoomWidgetRoomToolsHandler';
export * from './UserChooserWidgetHandler';
export * from './WordQuizWidgetHandler';

View File

@ -1,7 +1,6 @@
import { BadgeImageReadyEvent, NitroSprite, TextureUtils } from '@nitrots/nitro-renderer';
import { CSSProperties, FC, useEffect, useMemo, useState } from 'react';
import { GetSessionDataManager, LocalizeBadgeDescription, LocalizeBadgeName, LocalizeText } from '../../api';
import { BadgeInformationView } from '../../views/shared/badge-image/badge-info/BadgeInformationView';
import { Base, BaseProps } from '../Base';
export interface LayoutBadgeImageViewProps extends BaseProps<HTMLDivElement>
@ -86,9 +85,22 @@ export const LayoutBadgeImageView: FC<LayoutBadgeImageViewProps> = props =>
return () => GetSessionDataManager().events.removeEventListener(BadgeImageReadyEvent.IMAGE_READY, onBadgeImageReadyEvent);
}, [ badgeCode, isGroup ]);
const BadgeInformationView = (props: { title: string, description: string }) =>
{
const { title = null, description = null } = props;
return (
<Base className="badge-information text-black py-1 px-2 small">
<div className="fw-bold mb-1">{ title }</div>
<div>{ description }</div>
</Base>
);
};
return (
<Base classNames={ getClassNames } style={ getStyle } { ...rest }>
{ showInfo && <BadgeInformationView title={ isGroup ? customTitle : LocalizeBadgeName(badgeCode) } description={ isGroup ? LocalizeText('group.badgepopup.body') : LocalizeBadgeDescription(badgeCode) } /> }
{ showInfo &&
<BadgeInformationView title={ isGroup ? customTitle : LocalizeBadgeName(badgeCode) } description={ isGroup ? LocalizeText('group.badgepopup.body') : LocalizeBadgeDescription(badgeCode) } /> }
{ children }
</Base>
);

View File

@ -2,7 +2,7 @@ import { ColorConverter, NitroAdjustmentFilter, NitroContainer, NitroSprite, Nit
import { FC, useCallback, useState } from 'react';
import { GetNitroInstance, GetRoomEngine, RoomWidgetUpdateBackgroundColorPreviewEvent, RoomWidgetUpdateRoomViewEvent } from '../../api';
import { UseEventDispatcherHook, UseMountEffect, UseRoomEngineEvent } from '../../hooks';
import { useRoomContext } from './context/RoomContext';
import { useRoomContext } from './RoomContext';
export const RoomColorView: FC<{}> = props =>
{

View File

@ -0,0 +1,25 @@
import { IEventDispatcher, IRoomSession } from '@nitrots/nitro-renderer';
import { createContext, FC, ProviderProps, useContext } from 'react';
import { IRoomWidgetHandlerManager } from '../../api';
interface IRoomContext
{
roomSession: IRoomSession;
canvasId: number;
eventDispatcher: IEventDispatcher;
widgetHandler: IRoomWidgetHandlerManager;
}
const RoomContext = createContext<IRoomContext>({
roomSession: null,
canvasId: -1,
eventDispatcher: null,
widgetHandler: null
});
export const RoomContextProvider: FC<ProviderProps<IRoomContext>> = props =>
{
return <RoomContext.Provider value={ props.value }>{ props.children }</RoomContext.Provider>
}
export const useRoomContext = () => useContext(RoomContext);

View File

@ -1,18 +1,19 @@
import { EventDispatcher, NitroRectangle, RoomGeometry, RoomVariableEnum, Vector3d } from '@nitrots/nitro-renderer';
import { EventDispatcher, IRoomSession, NitroRectangle, RoomGeometry, RoomVariableEnum, Vector3d } from '@nitrots/nitro-renderer';
import { FC, useEffect, useRef, useState } from 'react';
import { DispatchMouseEvent, DispatchTouchEvent, DoorbellWidgetHandler, FriendRequestHandler, FurniChooserWidgetHandler, FurnitureContextMenuWidgetHandler, FurnitureCreditWidgetHandler, FurnitureCustomStackHeightWidgetHandler, FurnitureDimmerWidgetHandler, FurnitureExternalImageWidgetHandler, FurnitureMannequinWidgetHandler, FurniturePresentWidgetHandler, GetNitroInstance, GetRoomEngine, InitializeRoomInstanceRenderingCanvas, IRoomWidgetHandlerManager, RoomWidgetAvatarInfoHandler, RoomWidgetChatHandler, RoomWidgetChatInputHandler, RoomWidgetHandlerManager, RoomWidgetInfostandHandler, RoomWidgetRoomToolsHandler, RoomWidgetUpdateRoomViewEvent, UserChooserWidgetHandler } from '../../api';
import { FurnitureYoutubeDisplayWidgetHandler } from '../../api/nitro/room/widgets/handlers/FurnitureYoutubeDisplayWidgetHandler';
import { PollWidgetHandler } from '../../api/nitro/room/widgets/handlers/PollWidgetHandler';
import { WordQuizWidgetHandler } from '../../api/nitro/room/widgets/handlers/WordQuizWidgetHandler';
import { RoomContextProvider } from './context/RoomContext';
import { DispatchMouseEvent, DispatchTouchEvent, DoorbellWidgetHandler, FriendRequestHandler, FurniChooserWidgetHandler, FurnitureContextMenuWidgetHandler, FurnitureCreditWidgetHandler, FurnitureCustomStackHeightWidgetHandler, FurnitureDimmerWidgetHandler, FurnitureExternalImageWidgetHandler, FurnitureMannequinWidgetHandler, FurniturePresentWidgetHandler, FurnitureYoutubeDisplayWidgetHandler, GetNitroInstance, GetRoomEngine, InitializeRoomInstanceRenderingCanvas, IRoomWidgetHandlerManager, PollWidgetHandler, RoomWidgetAvatarInfoHandler, RoomWidgetChatHandler, RoomWidgetChatInputHandler, RoomWidgetHandlerManager, RoomWidgetInfostandHandler, RoomWidgetRoomToolsHandler, RoomWidgetUpdateRoomViewEvent, UserChooserWidgetHandler, WordQuizWidgetHandler } from '../../api';
import { Base } from '../../common';
import { RoomColorView } from './RoomColorView';
import { RoomViewProps } from './RoomView.types';
import { RoomContextProvider } from './RoomContext';
import { RoomWidgetsView } from './widgets/RoomWidgetsView';
interface RoomViewProps
{
roomSession: IRoomSession;
}
export const RoomView: FC<RoomViewProps> = props =>
{
const { roomSession = null } = props;
const [ roomCanvas, setRoomCanvas ] = useState<HTMLCanvasElement>(null);
const [ canvasId, setCanvasId ] = useState(-1);
const [ widgetHandler, setWidgetHandler ] = useState<IRoomWidgetHandlerManager>(null);
const elementRef = useRef<HTMLDivElement>();
@ -23,7 +24,6 @@ export const RoomView: FC<RoomViewProps> = props =>
{
window.onresize = null;
setRoomCanvas(null);
setCanvasId(-1);
setWidgetHandler(null);
@ -121,7 +121,6 @@ export const RoomView: FC<RoomViewProps> = props =>
if(elementRef && elementRef.current) elementRef.current.appendChild(canvas);
setRoomCanvas(canvas);
setCanvasId(canvasId);
}, [ roomSession ]);
@ -129,7 +128,7 @@ export const RoomView: FC<RoomViewProps> = props =>
return (
<RoomContextProvider value={ { roomSession, canvasId, eventDispatcher: (widgetHandler && widgetHandler.eventDispatcher), widgetHandler } }>
<div ref={ elementRef } id="room-view" className="nitro-room-container" />
<Base innerRef={ elementRef } id="room-view" className="nitro-room-container" />
{ widgetHandler &&
<>
<RoomColorView />

View File

@ -1,6 +0,0 @@
import { IRoomSession } from '@nitrots/nitro-renderer';
export interface RoomViewProps
{
roomSession: IRoomSession;
}

View File

@ -1,16 +0,0 @@
import { createContext, FC, useContext } from 'react';
import { IRoomContext, RoomContextProps } from './RoomContext.types';
const RoomContext = createContext<IRoomContext>({
roomSession: null,
canvasId: -1,
eventDispatcher: null,
widgetHandler: null
});
export const RoomContextProvider: FC<RoomContextProps> = props =>
{
return <RoomContext.Provider value={ props.value }>{ props.children }</RoomContext.Provider>
}
export const useRoomContext = () => useContext(RoomContext);

View File

@ -1,16 +0,0 @@
import { IEventDispatcher, IRoomSession } from '@nitrots/nitro-renderer';
import { ProviderProps } from 'react';
import { IRoomWidgetHandlerManager } from '../../../api';
export interface IRoomContext
{
roomSession: IRoomSession;
canvasId: number;
eventDispatcher: IEventDispatcher;
widgetHandler: IRoomWidgetHandlerManager;
}
export interface RoomContextProps extends ProviderProps<IRoomContext>
{
}

View File

@ -5,7 +5,7 @@ import { FriendRequestEvent } from '../../../events';
import { UseRoomEngineEvent, UseRoomSessionManagerEvent, UseUiEvent } from '../../../hooks';
import { NotificationAlertType } from '../../notification-center/common/NotificationAlertType';
import { NotificationUtilities } from '../../notification-center/common/NotificationUtilities';
import { useRoomContext } from '../context/RoomContext';
import { useRoomContext } from '../RoomContext';
import { AvatarInfoWidgetView } from './avatar-info/AvatarInfoWidgetView';
import { ChatInputView } from './chat-input/ChatInputView';
import { ChatWidgetView } from './chat/ChatWidgetView';

View File

@ -4,7 +4,7 @@ import { GetFurnitureDataForRoomObject, GetRoomEngine, LocalizeText, RoomWidgetU
import { Base, Button, Column, Flex, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../common';
import { FurniCategory } from '../../../../components/inventory/common/FurniCategory';
import { PetImageView } from '../../../shared/pet-image/PetImageView';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
interface AvatarInfoUseProductConfirmViewProps
{

View File

@ -2,7 +2,7 @@ import { RoomObjectCategory, RoomObjectType } from '@nitrots/nitro-renderer';
import { FC, useCallback, useEffect, useState } from 'react';
import { GetFurnitureDataForRoomObject, LocalizeText, UseProductItem } from '../../../../api';
import { FurniCategory } from '../../../../components/inventory/common/FurniCategory';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
import { ContextMenuHeaderView } from '../context-menu/ContextMenuHeaderView';
import { ContextMenuListItemView } from '../context-menu/ContextMenuListItemView';
import { ContextMenuView } from '../context-menu/ContextMenuView';

View File

@ -3,7 +3,7 @@ import { RoomControllerLevel, RoomObjectCategory, RoomObjectVariable } from '@ni
import { FC, useEffect, useMemo, useState } from 'react';
import { GetOwnRoomObject, GetUserProfile, LocalizeText, RoomWidgetMessage, RoomWidgetUpdateInfostandUserEvent, RoomWidgetUserActionMessage } from '../../../../api';
import { BatchUpdates } from '../../../../hooks';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
import { ContextMenuHeaderView } from '../context-menu/ContextMenuHeaderView';
import { ContextMenuListItemView } from '../context-menu/ContextMenuListItemView';
import { ContextMenuView } from '../context-menu/ContextMenuView';

View File

@ -1,7 +1,7 @@
import { RoomObjectCategory } from '@nitrots/nitro-renderer';
import { FC } from 'react';
import { LocalizeText, RoomWidgetUpdateDecorateModeEvent } from '../../../../api';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
import { ContextMenuListItemView } from '../context-menu/ContextMenuListItemView';
import { ContextMenuListView } from '../context-menu/ContextMenuListView';
import { ContextMenuView } from '../context-menu/ContextMenuView';

View File

@ -5,7 +5,7 @@ import { CreateLinkEvent, GetCanStandUp, GetCanUseExpression, GetOwnPosture, Get
import { Flex, LayoutCurrencyIcon } from '../../../../common';
import { HelpNameChangeEvent } from '../../../../events';
import { DispatchUiEvent } from '../../../../hooks';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
import { ContextMenuHeaderView } from '../context-menu/ContextMenuHeaderView';
import { ContextMenuListItemView } from '../context-menu/ContextMenuListItemView';
import { ContextMenuView } from '../context-menu/ContextMenuView';

View File

@ -2,7 +2,7 @@ import { PetType, RoomObjectCategory, RoomObjectType, RoomObjectVariable } from
import { FC, useEffect, useMemo, useState } from 'react';
import { GetOwnRoomObject, LocalizeText, RoomWidgetMessage, RoomWidgetUpdateInfostandPetEvent, RoomWidgetUserActionMessage } from '../../../../api';
import { BatchUpdates } from '../../../../hooks';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
import { ContextMenuHeaderView } from '../context-menu/ContextMenuHeaderView';
import { ContextMenuListItemView } from '../context-menu/ContextMenuListItemView';
import { ContextMenuView } from '../context-menu/ContextMenuView';

View File

@ -2,7 +2,7 @@ import { PetType, RoomControllerLevel, RoomObjectCategory, RoomObjectType, RoomO
import { FC, useEffect, useMemo, useState } from 'react';
import { GetOwnRoomObject, GetSessionDataManager, LocalizeText, RoomWidgetMessage, RoomWidgetUpdateInfostandPetEvent, RoomWidgetUserActionMessage } from '../../../../api';
import { BatchUpdates } from '../../../../hooks';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
import { ContextMenuHeaderView } from '../context-menu/ContextMenuHeaderView';
import { ContextMenuListItemView } from '../context-menu/ContextMenuListItemView';
import { ContextMenuView } from '../context-menu/ContextMenuView';

View File

@ -3,7 +3,7 @@ import { FC, useCallback, useEffect, useState } from 'react';
import { GetNitroInstance, LocalizeText, RoomWidgetUpdateInfostandRentableBotEvent, RoomWidgetUpdateRentableBotChatEvent, SendMessageComposer } from '../../../../api';
import { Button, Column, Flex, Text } from '../../../../common';
import { UseMessageEventHook } from '../../../../hooks';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
import { ContextMenuHeaderView } from '../context-menu/ContextMenuHeaderView';
import { ContextMenuListItemView } from '../context-menu/ContextMenuListItemView';
import { ContextMenuView } from '../context-menu/ContextMenuView';

View File

@ -2,7 +2,7 @@ import { RoomEnterEffect, RoomObjectCategory } from '@nitrots/nitro-renderer';
import { FC, useCallback, useMemo, useState } from 'react';
import { GetRoomSession, GetSessionDataManager, RoomWidgetObjectNameEvent, RoomWidgetRoomObjectMessage, RoomWidgetUpdateDanceStatusEvent, RoomWidgetUpdateDecorateModeEvent, RoomWidgetUpdateInfostandEvent, RoomWidgetUpdateInfostandFurniEvent, RoomWidgetUpdateInfostandPetEvent, RoomWidgetUpdateInfostandRentableBotEvent, RoomWidgetUpdateInfostandUserEvent, RoomWidgetUpdateRentableBotChatEvent, RoomWidgetUpdateRoomEngineEvent, RoomWidgetUpdateRoomObjectEvent, RoomWidgetUseProductBubbleEvent, UseProductItem } from '../../../../api';
import { UseEventDispatcherHook } from '../../../../hooks';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
import { AvatarInfoRentableBotChatView } from './AvatarInfoRentableBotChatView';
import { AvatarInfoUseProductConfirmView } from './AvatarInfoUseProductConfirmView';
import { AvatarInfoUseProductView } from './AvatarInfoUseProductView';

View File

@ -3,7 +3,7 @@ import { FC, useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { createPortal } from 'react-dom';
import { GetConfiguration, GetSessionDataManager, LocalizeText, RoomWidgetChatMessage, RoomWidgetChatTypingMessage, RoomWidgetUpdateChatInputContentEvent, RoomWidgetUpdateInfostandUserEvent, RoomWidgetUpdateRoomObjectEvent } from '../../../../api';
import { UseEventDispatcherHook } from '../../../../hooks';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
import { ChatInputStyleSelectorView } from './ChatInputStyleSelectorView';
export const ChatInputView: FC<{}> = props =>

View File

@ -2,7 +2,7 @@ import { NitroPoint, RoomDragEvent } from '@nitrots/nitro-renderer';
import { FC, useCallback, useEffect, useRef, useState } from 'react';
import { RoomWidgetChatSelectAvatarMessage, RoomWidgetRoomObjectMessage, RoomWidgetUpdateChatEvent } from '../../../../api';
import { UseEventDispatcherHook, UseRoomEngineEvent } from '../../../../hooks';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
import { ChatWidgetMessageView } from './ChatWidgetMessageView';
import { ChatBubbleMessage } from './common/ChatBubbleMessage';

View File

@ -3,7 +3,7 @@ import { AutoSizer, List, ListRowProps, ListRowRenderer } from 'react-virtualize
import { RoomObjectItem, RoomWidgetRoomObjectMessage } from '../../../../api';
import { LocalizeText } from '../../../../api/utils';
import { Column, Flex, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../common';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
interface ChooserWidgetViewProps
{

View File

@ -1,7 +1,7 @@
import { FC, useCallback, useState } from 'react';
import { LocalizeText, RoomObjectItem, RoomWidgetChooserContentEvent, RoomWidgetRequestWidgetMessage, RoomWidgetUpdateRoomObjectEvent } from '../../../../api';
import { BatchUpdates, UseEventDispatcherHook } from '../../../../hooks';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
import { ChooserWidgetView } from './ChooserWidgetView';
export const FurniChooserWidgetView: FC<{}> = props =>

View File

@ -1,7 +1,7 @@
import { FC, useCallback, useState } from 'react';
import { LocalizeText, RoomObjectItem, RoomWidgetChooserContentEvent, RoomWidgetRequestWidgetMessage, RoomWidgetUpdateRoomObjectEvent } from '../../../../api';
import { BatchUpdates, UseEventDispatcherHook } from '../../../../hooks';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
import { ChooserWidgetView } from './ChooserWidgetView';
export const UserChooserWidgetView: FC<{}> = props =>

View File

@ -2,7 +2,7 @@ import { FC, useCallback, useState } from 'react';
import { LocalizeText, RoomWidgetDoorbellEvent, RoomWidgetLetUserInMessage } from '../../../../api';
import { Base, Button, Column, Flex, Grid, NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../common';
import { BatchUpdates, UseEventDispatcherHook } from '../../../../hooks';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
export const DoorbellWidgetView: FC<{}> = props =>
{

View File

@ -1,7 +1,7 @@
import { FC } from 'react';
import { LocalizeText, RoomWidgetFriendRequestMessage } from '../../../../api';
import { Base, Button, Column, Flex, Text } from '../../../../common';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
import { UserLocationView } from '../user-location/UserLocationView';
interface FriendRequestDialogViewProps

View File

@ -1,7 +1,7 @@
import { FC, useCallback, useState } from 'react';
import { RoomWidgetUpdateFriendRequestEvent } from '../../../../api';
import { UseEventDispatcherHook } from '../../../../hooks';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
import { FriendRequestDialogView } from './FriendRequestDialogView';
export const FriendRequestWidgetView: FC<{}> = props =>

View File

@ -4,7 +4,7 @@ import ReactSlider from 'react-slider';
import { GetRoomEngine, GetSessionDataManager, LocalizeText, RoomWidgetUpdateBackgroundColorPreviewEvent, RoomWidgetUpdateRoomObjectEvent, SendMessageComposer } from '../../../../../api';
import { Button, Column, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../../common';
import { BatchUpdates, UseEventDispatcherHook, UseRoomEngineEvent } from '../../../../../hooks';
import { useRoomContext } from '../../../context/RoomContext';
import { useRoomContext } from '../../../RoomContext';
export const FurnitureBackgroundColorView: FC<{}> = props =>
{

View File

@ -3,7 +3,7 @@ import { FC, useCallback, useState } from 'react';
import { GetRoomEngine, LocalizeBadgeDescription, LocalizeBadgeName, RoomWidgetUpdateRoomObjectEvent } from '../../../../../api';
import { LayoutTrophyView } from '../../../../../common';
import { UseEventDispatcherHook, UseRoomEngineEvent } from '../../../../../hooks';
import { useRoomContext } from '../../../context/RoomContext';
import { useRoomContext } from '../../../RoomContext';
import { FurnitureTrophyData } from '../trophy/FurnitureTrophyData';
export const FurnitureBadgeDisplayView: FC<{}> = props =>

View File

@ -1,7 +1,7 @@
import { FC } from 'react';
import { LocalizeText } from '../../../../../api';
import { Button, Column, Flex, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../../common';
import { useRoomContext } from '../../../context/RoomContext';
import { useRoomContext } from '../../../RoomContext';
interface EffectBoxConfirmViewProps
{

View File

@ -2,7 +2,7 @@ import { ContextMenuEnum, GroupFurniContextMenuInfoMessageEvent, GroupFurniConte
import { FC, useCallback, useState } from 'react';
import { GetGroupInformation, GetRoomEngine, IsOwnerOfFurniture, LocalizeText, RoomWidgetFurniActionMessage, TryJoinGroup, TryVisitRoom } from '../../../../../api';
import { BatchUpdates, UseMessageEventHook, UseRoomEngineEvent } from '../../../../../hooks';
import { useRoomContext } from '../../../context/RoomContext';
import { useRoomContext } from '../../../RoomContext';
import { ContextMenuHeaderView } from '../../context-menu/ContextMenuHeaderView';
import { ContextMenuListItemView } from '../../context-menu/ContextMenuListItemView';
import { ContextMenuView } from '../../context-menu/ContextMenuView';

View File

@ -3,7 +3,7 @@ import { FC, useEffect, useState } from 'react';
import { GetFurnitureDataForRoomObject, LocalizeText, RoomWidgetUseProductMessage } from '../../../../../api';
import { Base, Button, Column, Flex, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../../common';
import { FurniCategory } from '../../../../../components/inventory/common/FurniCategory';
import { useRoomContext } from '../../../context/RoomContext';
import { useRoomContext } from '../../../RoomContext';
interface MonsterPlantSeedConfirmViewProps
{

View File

@ -5,7 +5,7 @@ import { Base, Button, Column, Flex, NitroCardContentView, NitroCardHeaderView,
import { FigureData } from '../../../../../components/avatar-editor/common/FigureData';
import { FurniCategory } from '../../../../../components/inventory/common/FurniCategory';
import { AvatarImageView } from '../../../../shared/avatar-image/AvatarImageView';
import { useRoomContext } from '../../../context/RoomContext';
import { useRoomContext } from '../../../RoomContext';
interface PurchasableClothingConfirmViewProps
{

View File

@ -4,7 +4,7 @@ import ReactSlider from 'react-slider';
import { LocalizeText, RoomWidgetUpdateCustomStackHeightEvent, SendMessageComposer } from '../../../../../api';
import { Button, Column, Flex, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../../common';
import { BatchUpdates, UseEventDispatcherHook, UseMessageEventHook } from '../../../../../hooks';
import { useRoomContext } from '../../../context/RoomContext';
import { useRoomContext } from '../../../RoomContext';
const MAX_HEIGHT: number = 40;

View File

@ -5,7 +5,7 @@ import ReactSlider from 'react-slider';
import { ColorUtils, GetConfiguration, LocalizeText, RoomWidgetDimmerChangeStateMessage, RoomWidgetDimmerPreviewMessage, RoomWidgetDimmerSavePresetMessage, RoomWidgetUpdateDimmerEvent, RoomWidgetUpdateDimmerStateEvent } from '../../../../../api';
import { Base, Button, Column, Flex, Grid, NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView, Text } from '../../../../../common';
import { BatchUpdates, UseEventDispatcherHook } from '../../../../../hooks';
import { useRoomContext } from '../../../context/RoomContext';
import { useRoomContext } from '../../../RoomContext';
import { DimmerFurnitureWidgetPresetItem } from './DimmerFurnitureWidgetPresetItem';
const AVAILABLE_COLORS: number[] = [7665141, 21495, 15161822, 15353138, 15923281, 8581961, 0];

View File

@ -2,7 +2,7 @@ import { FC, useCallback, useState } from 'react';
import { LocalizeText, RoomWidgetCreditFurniRedeemMessage, RoomWidgetUpdateCreditFurniEvent } from '../../../../../api';
import { Base, Button, Column, Flex, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../../common';
import { BatchUpdates, UseEventDispatcherHook } from '../../../../../hooks';
import { useRoomContext } from '../../../context/RoomContext';
import { useRoomContext } from '../../../RoomContext';
export const FurnitureExchangeCreditView: FC<{}> = props =>
{

View File

@ -2,7 +2,7 @@ import { FC, useCallback, useState } from 'react';
import { IPhotoData, LocalizeText, RoomWidgetUpdateExternalImageEvent } from '../../../../../api';
import { Flex, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../../common';
import { BatchUpdates, UseEventDispatcherHook } from '../../../../../hooks';
import { useRoomContext } from '../../../context/RoomContext';
import { useRoomContext } from '../../../RoomContext';
export const FurnitureExternalImageView: FC<{}> = props =>
{

View File

@ -4,7 +4,7 @@ import { GetRoomEngine, GetRoomSession, LocalizeText, RoomWidgetUpdateRoomObject
import { DraggableWindow, NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../../common';
import { UseEventDispatcherHook, UseMessageEventHook, UseRoomEngineEvent } from '../../../../../hooks';
import { AvatarImageView } from '../../../../shared/avatar-image/AvatarImageView';
import { useRoomContext } from '../../../context/RoomContext';
import { useRoomContext } from '../../../RoomContext';
import { FurnitureEngravingLockData } from './FriendFurniLockData';
export const FurnitureFriendFurniView: FC<{}> = props =>

View File

@ -5,7 +5,7 @@ import { Button, Column, Flex, LayoutGiftTagView, NitroCardContentView, NitroCar
import { ProductTypeEnum } from '../../../../../components/catalog/common/ProductTypeEnum';
import { BatchUpdates } from '../../../../../hooks';
import { UseEventDispatcherHook } from '../../../../../hooks/events/UseEventDispatcherHook';
import { useRoomContext } from '../../../context/RoomContext';
import { useRoomContext } from '../../../RoomContext';
const FLOOR: string = 'floor';
const WALLPAPER: string = 'wallpaper';

View File

@ -3,7 +3,7 @@ import { FC, useCallback, useState } from 'react';
import { GetRoomEngine, LocalizeText } from '../../../../../api';
import { Column, Flex, Text } from '../../../../../common';
import { UseRoomEngineEvent } from '../../../../../hooks';
import { useRoomContext } from '../../../context/RoomContext';
import { useRoomContext } from '../../../RoomContext';
import { ContextMenuHeaderView } from '../../context-menu/ContextMenuHeaderView';
import { ContextMenuListView } from '../../context-menu/ContextMenuListView';
import { ObjectLocationView } from '../../object-location/ObjectLocationView';

View File

@ -3,7 +3,7 @@ import { RoomObjectOperationType } from '@nitrots/nitro-renderer';
import { FC, useCallback, useEffect, useState } from 'react';
import { ProcessRoomObjectOperation, RoomWidgetUpdateDecorateModeEvent, RoomWidgetUpdateRoomObjectEvent } from '../../../../../api';
import { BatchUpdates, UseEventDispatcherHook } from '../../../../../hooks';
import { useRoomContext } from '../../../context/RoomContext';
import { useRoomContext } from '../../../RoomContext';
import { ObjectLocationView } from '../../object-location/ObjectLocationView';
export const FurnitureManipulationMenuView: FC<{}> = props =>

View File

@ -4,7 +4,7 @@ import { GetAvatarRenderManager, GetSessionDataManager, LocalizeText, RoomWidget
import { Base, Button, Column, Flex, LayoutCurrencyIcon, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../../common';
import { BatchUpdates, UseEventDispatcherHook } from '../../../../../hooks';
import { AvatarImageView } from '../../../../shared/avatar-image/AvatarImageView';
import { useRoomContext } from '../../../context/RoomContext';
import { useRoomContext } from '../../../RoomContext';
const MODE_NONE: number = -1;
const MODE_CONTROLLER: number = 0;

View File

@ -3,7 +3,7 @@ import { FC, useCallback, useState } from 'react';
import { ColorUtils, GetRoomEngine, GetRoomSession, GetSessionDataManager, RoomWidgetUpdateRoomObjectEvent } from '../../../../../api';
import { DraggableWindow, DraggableWindowPosition } from '../../../../../common';
import { UseEventDispatcherHook, UseRoomEngineEvent } from '../../../../../hooks';
import { useRoomContext } from '../../../context/RoomContext';
import { useRoomContext } from '../../../RoomContext';
import { FurnitureStickieData } from './FurnitureStickieData';
import { getStickieColorName, STICKIE_COLORS } from './FurnitureStickieUtils';

View File

@ -3,7 +3,7 @@ import { FC, useCallback, useState } from 'react';
import { GetRoomEngine, RoomWidgetUpdateRoomObjectEvent } from '../../../../../api';
import { LayoutTrophyView } from '../../../../../common';
import { UseEventDispatcherHook, UseRoomEngineEvent } from '../../../../../hooks';
import { useRoomContext } from '../../../context/RoomContext';
import { useRoomContext } from '../../../RoomContext';
import { FurnitureTrophyData } from './FurnitureTrophyData';
export const FurnitureTrophyView: FC<{}> = props =>

View File

@ -4,7 +4,7 @@ import YouTube, { Options } from 'react-youtube';
import { FurnitureYoutubeDisplayWidgetHandler, LocalizeText, RoomWidgetUpdateYoutubeDisplayEvent, SendMessageComposer } from '../../../../../api';
import { Grid, LayoutGridItem, NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../../common';
import { BatchUpdates, UseEventDispatcherHook, UseMessageEventHook } from '../../../../../hooks';
import { useRoomContext } from '../../../context/RoomContext';
import { useRoomContext } from '../../../RoomContext';
import { YoutubeVideoPlaybackStateEnum } from './utils/YoutubeVideoPlaybackStateEnum';
export const FurnitureYoutubeDisplayView: FC<{}> = props =>

View File

@ -5,7 +5,7 @@ import { CreateLinkEvent, GetGroupInformation, GetRoomEngine, LocalizeText, Room
import { Button, Column, Flex, LayoutBadgeImageView, LayoutRarityLevelView, Text, UserProfileIconView } from '../../../../common';
import { BatchUpdates, UseMessageEventHook } from '../../../../hooks';
import { LimitedEditionCompactPlateView } from '../../../shared/limited-edition/LimitedEditionCompactPlateView';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
interface InfoStandWidgetFurniViewProps
{

View File

@ -5,7 +5,7 @@ import { GetConfiguration, GetGroupInformation, LocalizeText, RoomWidgetChangeMo
import { Base, Column, Flex, LayoutBadgeImageView, Text, UserProfileIconView } from '../../../../common';
import { BatchUpdates, UseEventDispatcherHook, UseMessageEventHook } from '../../../../hooks';
import { AvatarImageView } from '../../../shared/avatar-image/AvatarImageView';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
import { InfoStandWidgetUserRelationshipsView } from './InfoStandWidgetUserRelationshipsView';
interface InfoStandWidgetUserViewProps

View File

@ -2,7 +2,7 @@ import { FC, useCallback, useState } from 'react';
import { RoomWidgetRoomObjectMessage, RoomWidgetUpdateEvent, RoomWidgetUpdateInfostandEvent, RoomWidgetUpdateInfostandFurniEvent, RoomWidgetUpdateInfostandPetEvent, RoomWidgetUpdateInfostandRentableBotEvent, RoomWidgetUpdateInfostandUserEvent, RoomWidgetUpdateRoomObjectEvent } from '../../../../api';
import { Column } from '../../../../common';
import { UseEventDispatcherHook } from '../../../../hooks';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
import { InfoStandWidgetBotView } from './InfoStandWidgetBotView';
import { InfoStandWidgetFurniView } from './InfoStandWidgetFurniView';
import { InfoStandWidgetPetView } from './InfoStandWidgetPetView';

View File

@ -4,7 +4,7 @@ import { GetRoomEngine } from '../../../../api';
import { LayoutMiniCameraView } from '../../../../common';
import { RoomWidgetThumbnailEvent } from '../../../../events';
import { UseUiEvent } from '../../../../hooks';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
export const RoomThumbnailWidgetView: FC<{}> = props =>
{

View File

@ -5,7 +5,7 @@ import { CreateLinkEvent, LocalizeText, RoomWidgetZoomToggleMessage, SendMessage
import { Base, Column, Flex, Text, TransitionAnimation, TransitionAnimationTypes } from '../../../../common';
import { NavigatorEvent } from '../../../../events';
import { BatchUpdates, DispatchUiEvent, UseMessageEventHook } from '../../../../hooks';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
export const RoomToolsWidgetView: FC<{}> = props =>
{

View File

@ -1,7 +1,7 @@
import { RoomObjectCategory } from '@nitrots/nitro-renderer';
import { FC } from 'react';
import { BaseProps } from '../../../../common';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
import { ObjectLocationView } from '../object-location/ObjectLocationView';
interface UserLocationViewProps extends BaseProps<HTMLDivElement>

View File

@ -2,7 +2,7 @@ import { IQuestion } from '@nitrots/nitro-renderer';
import { FC, useCallback, useEffect, useState } from 'react';
import { RoomWidgetPollMessage, RoomWidgetWordQuizUpdateEvent } from '../../../../api';
import { BatchUpdates, UseEventDispatcherHook } from '../../../../hooks';
import { useRoomContext } from '../../context/RoomContext';
import { useRoomContext } from '../../RoomContext';
import { VALUE_KEY_DISLIKE, VALUE_KEY_LIKE, VoteValue } from './common/VoteValue';
import { WordQuizQuestionView } from './WordQuizQuestionView';
import { WordQuizVoteView } from './WordQuizVoteView';