diff --git a/Coolui v3 test/.browserslistrc b/Coolui v3 test/.browserslistrc new file mode 100644 index 0000000000..3e5809a308 --- /dev/null +++ b/Coolui v3 test/.browserslistrc @@ -0,0 +1,11 @@ +# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. +# For additional information regarding the format and rule options, please see: +# https://github.com/browserslist/browserslist#queries +# You can see what browsers were selected by your queries by running: +# npx browserslist + +last 1 Chrome version +last 1 Firefox version +last 1 Edge major versions +last 2 Safari major versions +last 2 iOS major versions diff --git a/Coolui v3 test/.editorconfig b/Coolui v3 test/.editorconfig new file mode 100644 index 0000000000..0792692308 --- /dev/null +++ b/Coolui v3 test/.editorconfig @@ -0,0 +1,16 @@ +# Editor configuration, see https://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 4 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.ts] +quote_type = single + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/Coolui v3 test/.gitignore b/Coolui v3 test/.gitignore new file mode 100644 index 0000000000..154341fb13 --- /dev/null +++ b/Coolui v3 test/.gitignore @@ -0,0 +1,31 @@ +/dist +/tmp +/out-tsc +/node_modules +/.idea +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history/* +/.sass-cache +/connect.lock +/coverage +*.log +.git +.DS_Store +Thumbs.db + +# Nitro +/build +*.zip +.env +public/renderer-config* +public/ui-config* diff --git a/Coolui v3 test/README.md b/Coolui v3 test/README.md new file mode 100644 index 0000000000..ebdb05ca6b --- /dev/null +++ b/Coolui v3 test/README.md @@ -0,0 +1,55 @@ +# v2.2.0 - Cool UI Beta !! Use at Own Risk as it is still in Beta !! + +## Prerequisites + +- [Git](https://git-scm.com/) +- [NodeJS](https://nodejs.org/) >= 18 + - If using NodeJS < 18 remove `--openssl-legacy-provider` from the package.json scripts +- [Yarn](https://yarnpkg.com/) `npm i yarn -g` + +## Installation + +- First you should open terminal and navigate to the folder where you want to clone Nitro and Nitro-Renderer +- Clone Nitro (Expl. C:\Github\) + - `git clone https://github.com/duckietm/Nitro-Cool-UI.git` <== For now switch to Dev-RendererV2 + - `git clone https://github.com/duckietm/Nitro-Cool-UI-Renderer.git` + - Install the dependencies for the renderer : cd C:\Github\Nitro-Cool-UI-Renderer + - `yarn install` + - Now we will create a Link for the CoolUI : `yarn link` This will give you a link address `yarn link "@nitrots/nitro-renderer"` + - Install the dependencies for Cool UI : cd C:\Github\Nitro-Cool-UI + - `yarn install` + - `yarn link "@nitrots/nitro-renderer` <== This will link the renderer in the project +- Rename a few files + - Rename `public/renderer-config.json.example` to `public/renderer-config.json` + - Rename `public/ui-config.json.example` to `public/ui-config.json` +- Set your links + - Open `public/renderer-config.json` + - Update `socket.url, asset.url, image.library.url, & hof.furni.url` + - Open `public/ui-config.json` + - Update `camera.url, thumbnails.url, url.prefix, habbopages.url` + - `yarn build` <== the final step to build the DIST folder this is where your browser needs to point / or upload this to your /client if you do the compile on a other machine (preferd) + - You can override any variable by passing it to `NitroConfig` in the index.html + +## Usage + +- To use Nitro you need `.nitro` assets generated, see [nitro-converter](https://git.krews.org/nitro/nitro-converter) for instructions +- See [Morningstar Websockets](https://git.krews.org/nitro/ms-websockets) for instructions on configuring websockets on your server + +### Development + +Run Nitro in development mode when you are editing the files, this way you can see the changes in your browser instantly + +``` +yarn start +``` + +### Production + +To build a production version of Nitro just run the following command + +``` +yarn build:prod +``` + +- A `dist` folder will be generated, these are the files that must be uploaded to your webserver +- Consult your CMS documentation for compatibility with Nitro and how to add the production files diff --git a/Coolui v3 test/css-utils/CSSColorUtils.js b/Coolui v3 test/css-utils/CSSColorUtils.js new file mode 100644 index 0000000000..77077fc1b4 --- /dev/null +++ b/Coolui v3 test/css-utils/CSSColorUtils.js @@ -0,0 +1,73 @@ +const lightenHexColor = (hex, percent) => +{ +// Remove the hash symbol if present + hex = hex.replace(/^#/, ''); + + // Convert hex to RGB + let r = parseInt(hex.substring(0, 2), 16); + let g = parseInt(hex.substring(2, 4), 16); + let b = parseInt(hex.substring(4, 6), 16); + + // Adjust RGB values + r = Math.round(Math.min(255, r + 255 * percent)); + g = Math.round(Math.min(255, g + 255 * percent)); + b = Math.round(Math.min(255, b + 255 * percent)); + + // Convert RGB back to hex + const result = ((r << 16) | (g << 8) | b).toString(16); + + // Make sure result has 6 digits + return '#' + result.padStart(6, '0'); +} + +const darkenHexColor = (hex, percent) => +{ + // Remove the hash symbol if present + hex = hex.replace(/^#/, ''); + + // Convert hex to RGB + let r = parseInt(hex.substring(0, 2), 16); + let g = parseInt(hex.substring(2, 4), 16); + let b = parseInt(hex.substring(4, 6), 16); + + // Calculate the darkened RGB values + r = Math.round(Math.max(0, r - 255 * percent)); + g = Math.round(Math.max(0, g - 255 * percent)); + b = Math.round(Math.max(0, b - 255 * percent)); + + // Convert RGB back to hex + const result = ((r << 16) | (g << 8) | b).toString(16); + + // Make sure result has 6 digits + return '#' + result.padStart(6, '0'); +}; + + +const generateShades = (colors) => +{ + for (let color in colors) + { + let hex = colors[color] + let extended = {} + const shades = [ 50, 100, 200, 300, 400, 500, 600, 700, 900, 950 ]; + + for (let i = 0; i < shades.length; i++) + { + let shade = shades[i]; + extended[shade] = lightenHexColor(hex, shades[(shades.length - 1 - i) ] / 950); + extended[-shade] = darkenHexColor(hex, shades[(shades.length - 1 - i) ] / 950) + } + + colors[color] = { + DEFAULT: hex, + ...extended + } + } + + return colors; +} + +module.exports = { + generateShades, + lightenHexColor +} diff --git a/Coolui v3 test/eslint.config.mjs b/Coolui v3 test/eslint.config.mjs new file mode 100644 index 0000000000..108a976b99 --- /dev/null +++ b/Coolui v3 test/eslint.config.mjs @@ -0,0 +1,138 @@ +import typescriptEslintPlugin from "@typescript-eslint/eslint-plugin"; +import typescriptEslintParser from "@typescript-eslint/parser"; +import reactPlugin from "eslint-plugin-react"; +import reactHooksPlugin from "eslint-plugin-react-hooks"; +import path from "path"; +import { fileURLToPath } from "url"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +export default [ + { + files: ["**/*.jsx", "**/*.js", "**/*.tsx", "**/*.ts"], + plugins: { + react: reactPlugin, + "react-hooks": reactHooksPlugin, + "@typescript-eslint": typescriptEslintPlugin, + }, + languageOptions: { + parser: typescriptEslintParser, + ecmaVersion: "latest", + parserOptions: { + sourceType: "module", + project: "./tsconfig.json", + tsconfigRootDir: __dirname, + ecmaFeatures: { + jsx: true, + }, + }, + }, + rules: { + ...reactPlugin.configs.recommended.rules, + ...reactHooksPlugin.configs.recommended.rules, + ...typescriptEslintPlugin.configs.recommended.rules, + ...typescriptEslintPlugin.configs[ + "recommended-requiring-type-checking" + ].rules, + 'indent': [ + 'error', + 4, + { + 'SwitchCase': 1 + } + ], + 'no-multi-spaces': [ + 'error' + ], + 'no-trailing-spaces': [ + 'error', + { + 'skipBlankLines': false, + 'ignoreComments': true + } + ], + 'linebreak-style': [ + 'off' + ], + 'quotes': [ + 'error', + 'single' + ], + 'semi': [ + 'error', + 'always' + ], + 'brace-style': [ + 'error', + 'allman' + ], + 'object-curly-spacing': [ + 'error', + 'always' + ], + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-floating-promises': 'off', + '@typescript-eslint/require-await': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/no-unsafe-return': 'off', + '@typescript-eslint/no-misused-promises': 'off', + '@typescript-eslint/explicit-module-boundary-types': [ + 'off', + { + 'allowedNames': [ + 'getMessageArray' + ] + } + ], + '@typescript-eslint/unbound-method': [ + 'off' + ], + '@typescript-eslint/ban-ts-comment': [ + 'off' + ], + '@typescript-eslint/no-empty-function': [ + 'error', + { + 'allow': [ + 'functions', + 'arrowFunctions', + 'generatorFunctions', + 'methods', + 'generatorMethods', + 'constructors' + ] + } + ], + '@typescript-eslint/no-unused-vars': [ + 'off' + ], + '@typescript-eslint/ban-types': [ + 'error', + { + 'types': + { + 'String': true, + 'Boolean': true, + 'Number': true, + 'Symbol': true, + '{}': false, + 'Object': false, + 'object': false, + 'Function': false + }, + 'extendDefaults': true + } + ], + 'react/react-in-jsx-scope': 'off' + }, + settings: { + react: { + version: "18.3.1", + }, + }, + }, +]; diff --git a/Coolui v3 test/index.html b/Coolui v3 test/index.html new file mode 100644 index 0000000000..e3f0ecf0df --- /dev/null +++ b/Coolui v3 test/index.html @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + Nitro + + + +
+ + + + diff --git a/Coolui v3 test/package.json b/Coolui v3 test/package.json new file mode 100644 index 0000000000..01d45906ac --- /dev/null +++ b/Coolui v3 test/package.json @@ -0,0 +1,49 @@ +{ + "name": "nitro-react", + "version": "2.2", + "homepage": ".", + "private": true, + "scripts": { + "start": "vite --host", + "build": "vite build", + "build:prod": "npx browserslist@latest --update-db && yarn build", + "eslint": "eslint ./src" + }, + "dependencies": { + "@babel/runtime": "^7.26.9", + "@tanstack/react-virtual": "3.2.0", + "@types/react-transition-group": "^4.4.10", + "dompurify": "^3.1.5", + "framer-motion": "^11.2.12", + "react": "^18.3.1", + "react-bootstrap": "^2.10.9", + "react-dom": "^18.3.1", + "react-icons": "^5.2.1", + "react-slider": "^2.0.6", + "react-tiny-popover": "^8.0.4", + "react-youtube": "^7.13.1", + "use-between": "^1.3.5" + }, + "devDependencies": { + "@tailwindcss/forms": "^0.5.7", + "@types/node": "^20.11.30", + "@types/react": "^18.3.3", + "@types/react-dom": "^18.3.0", + "@types/react-slider": "^1.3.6", + "@typescript-eslint/eslint-plugin": "^7.13.1", + "@typescript-eslint/parser": "^7.13.1", + "@vitejs/plugin-react": "^4.3.1", + "autoprefixer": "^10.4.19", + "eslint": "^9.5.0", + "eslint-plugin-react": "^7.34.2", + "eslint-plugin-react-hooks": "^5.1.0-rc-1434af3d22-20240618", + "postcss": "^8.4.38", + "postcss-nested": "^6.0.1", + "sass": "^1.77.4", + "tailwindcss": "^3.4.4", + "typescript": "^5.4.5", + "typescript-eslint": "^7.13.1", + "vite": "^5.2.13", + "vite-tsconfig-paths": "^4.3.2" + } +} diff --git a/Coolui v3 test/postcss.config.js b/Coolui v3 test/postcss.config.js new file mode 100644 index 0000000000..9855208474 --- /dev/null +++ b/Coolui v3 test/postcss.config.js @@ -0,0 +1,8 @@ +/** @type {import("postcss-load-config").Config} */ + +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +} diff --git a/Coolui v3 test/public/android-chrome-192x192.png b/Coolui v3 test/public/android-chrome-192x192.png new file mode 100644 index 0000000000..634eb063ec Binary files /dev/null and b/Coolui v3 test/public/android-chrome-192x192.png differ diff --git a/Coolui v3 test/public/android-chrome-512x512.png b/Coolui v3 test/public/android-chrome-512x512.png new file mode 100644 index 0000000000..33cf6c6ab1 Binary files /dev/null and b/Coolui v3 test/public/android-chrome-512x512.png differ diff --git a/Coolui v3 test/public/apple-touch-icon.png b/Coolui v3 test/public/apple-touch-icon.png new file mode 100644 index 0000000000..349b3dd3f5 Binary files /dev/null and b/Coolui v3 test/public/apple-touch-icon.png differ diff --git a/Coolui v3 test/public/browserconfig.xml b/Coolui v3 test/public/browserconfig.xml new file mode 100644 index 0000000000..b3930d0f04 --- /dev/null +++ b/Coolui v3 test/public/browserconfig.xml @@ -0,0 +1,9 @@ + + + + + + #da532c + + + diff --git a/Coolui v3 test/public/favicon-16x16.png b/Coolui v3 test/public/favicon-16x16.png new file mode 100644 index 0000000000..788a7f12b4 Binary files /dev/null and b/Coolui v3 test/public/favicon-16x16.png differ diff --git a/Coolui v3 test/public/favicon-32x32.png b/Coolui v3 test/public/favicon-32x32.png new file mode 100644 index 0000000000..ef4a6061d0 Binary files /dev/null and b/Coolui v3 test/public/favicon-32x32.png differ diff --git a/Coolui v3 test/public/favicon.ico b/Coolui v3 test/public/favicon.ico new file mode 100644 index 0000000000..34ba1b3d4a Binary files /dev/null and b/Coolui v3 test/public/favicon.ico differ diff --git a/Coolui v3 test/public/mstile-150x150.png b/Coolui v3 test/public/mstile-150x150.png new file mode 100644 index 0000000000..3a555aa561 Binary files /dev/null and b/Coolui v3 test/public/mstile-150x150.png differ diff --git a/Coolui v3 test/public/robots.txt b/Coolui v3 test/public/robots.txt new file mode 100644 index 0000000000..e9e57dc4d4 --- /dev/null +++ b/Coolui v3 test/public/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/Coolui v3 test/public/safari-pinned-tab.svg b/Coolui v3 test/public/safari-pinned-tab.svg new file mode 100644 index 0000000000..dc7ced35bb --- /dev/null +++ b/Coolui v3 test/public/safari-pinned-tab.svg @@ -0,0 +1,154 @@ + + + + +Created by potrace 1.14, written by Peter Selinger 2001-2017 + + + + + diff --git a/Coolui v3 test/public/site.webmanifest b/Coolui v3 test/public/site.webmanifest new file mode 100644 index 0000000000..6264b894b3 --- /dev/null +++ b/Coolui v3 test/public/site.webmanifest @@ -0,0 +1,20 @@ +{ + "start_url": "/", + "name": "Nitro", + "short_name": "Nitro", + "icons": [ + { + "src": "android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} diff --git a/Coolui v3 test/src/App.tsx b/Coolui v3 test/src/App.tsx new file mode 100644 index 0000000000..d3566cc5da --- /dev/null +++ b/Coolui v3 test/src/App.tsx @@ -0,0 +1,99 @@ +import { GetAssetManager, GetAvatarRenderManager, GetCommunication, GetConfiguration, GetLocalizationManager, GetRoomEngine, GetRoomSessionManager, GetSessionDataManager, GetSoundManager, GetStage, GetTexturePool, GetTicker, HabboWebTools, LegacyExternalInterface, LoadGameUrlEvent, NitroLogger, NitroVersion, PrepareRenderer } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { GetUIVersion } from './api'; +import { Base } from './common'; +import { LoadingView } from './components/loading/LoadingView'; +import { MainView } from './components/MainView'; +import { useMessageEvent } from './hooks'; + +NitroVersion.UI_VERSION = GetUIVersion(); + +export const App: FC<{}> = props => +{ + const [ isReady, setIsReady ] = useState(false); + + useMessageEvent(LoadGameUrlEvent, event => + { + const parser = event.getParser(); + + if(!parser) return; + + LegacyExternalInterface.callGame('showGame', parser.url); + }); + + useEffect(() => + { + const prepare = async (width: number, height: number) => + { + try + { + if(!window.NitroConfig) throw new Error('NitroConfig is not defined!'); + + const renderer = await PrepareRenderer({ + width: Math.floor(width), + height: Math.floor(height), + resolution: window.devicePixelRatio, + autoDensity: true, + backgroundAlpha: 0, + preference: 'webgl', + eventMode: 'none', + failIfMajorPerformanceCaveat: false, + roundPixels: true, + useBackBuffer: true // Enable back buffer for blend filters + }); + + await GetConfiguration().init(); + + GetTicker().maxFPS = GetConfiguration().getValue('system.fps.max', 24); + NitroLogger.LOG_DEBUG = GetConfiguration().getValue('system.log.debug', true); + NitroLogger.LOG_WARN = GetConfiguration().getValue('system.log.warn', false); + NitroLogger.LOG_ERROR = GetConfiguration().getValue('system.log.error', false); + NitroLogger.LOG_EVENTS = GetConfiguration().getValue('system.log.events', false); + NitroLogger.LOG_PACKETS = GetConfiguration().getValue('system.log.packets', false); + + const assetUrls = GetConfiguration().getValue('preload.assets.urls').map(url => GetConfiguration().interpolate(url)) ?? []; + + await Promise.all( + [ + GetAssetManager().downloadAssets(assetUrls), + GetLocalizationManager().init(), + GetAvatarRenderManager().init(), + GetSoundManager().init(), + GetSessionDataManager().init(), + GetRoomSessionManager().init() + ] + ); + + await GetRoomEngine().init(); + await GetCommunication().init(); + + if(LegacyExternalInterface.available) LegacyExternalInterface.call('legacyTrack', 'authentication', 'authok', []); + + HabboWebTools.sendHeartBeat(); + + setInterval(() => HabboWebTools.sendHeartBeat(), 10000); + + GetTicker().add(ticker => GetRoomEngine().update(ticker)); + GetTicker().add(ticker => renderer.render(GetStage())); + GetTicker().add(ticker => GetTexturePool().run()); + + setIsReady(true); + } + catch(err) + { + NitroLogger.error(err); + } + }; + + prepare(window.innerWidth, window.innerHeight); + }, []); + + return ( + + { !isReady && + } + { isReady && } + + + ); +}; \ No newline at end of file diff --git a/Coolui v3 test/src/api/GetRendererVersion.ts b/Coolui v3 test/src/api/GetRendererVersion.ts new file mode 100644 index 0000000000..bb9e461816 --- /dev/null +++ b/Coolui v3 test/src/api/GetRendererVersion.ts @@ -0,0 +1,3 @@ +import { NitroVersion } from '@nitrots/nitro-renderer'; + +export const GetRendererVersion = () => NitroVersion.RENDERER_VERSION; diff --git a/Coolui v3 test/src/api/GetUIVersion.ts b/Coolui v3 test/src/api/GetUIVersion.ts new file mode 100644 index 0000000000..bdbe922385 --- /dev/null +++ b/Coolui v3 test/src/api/GetUIVersion.ts @@ -0,0 +1 @@ +export const GetUIVersion = () => '2.2.0'; diff --git a/Coolui v3 test/src/api/achievements/AchievementCategory.ts b/Coolui v3 test/src/api/achievements/AchievementCategory.ts new file mode 100644 index 0000000000..906d8da4ba --- /dev/null +++ b/Coolui v3 test/src/api/achievements/AchievementCategory.ts @@ -0,0 +1,40 @@ +import { AchievementData } from '@nitrots/nitro-renderer'; +import { AchievementUtilities } from './AchievementUtilities'; +import { IAchievementCategory } from './IAchievementCategory'; + +export class AchievementCategory implements IAchievementCategory +{ + private _code: string; + private _achievements: AchievementData[]; + + constructor(code: string) + { + this._code = code; + this._achievements = []; + } + + public getProgress(): number + { + return AchievementUtilities.getAchievementCategoryProgress(this); + } + + public getMaxProgress(): number + { + return AchievementUtilities.getAchievementCategoryMaxProgress(this); + } + + public get code(): string + { + return this._code; + } + + public get achievements(): AchievementData[] + { + return this._achievements; + } + + public set achievements(achievements: AchievementData[]) + { + this._achievements = achievements; + } +} diff --git a/Coolui v3 test/src/api/achievements/AchievementUtilities.ts b/Coolui v3 test/src/api/achievements/AchievementUtilities.ts new file mode 100644 index 0000000000..30f14033d5 --- /dev/null +++ b/Coolui v3 test/src/api/achievements/AchievementUtilities.ts @@ -0,0 +1,97 @@ +import { AchievementData, GetLocalizationManager } from '@nitrots/nitro-renderer'; +import { GetConfigurationValue } from '../nitro'; +import { IAchievementCategory } from './IAchievementCategory'; + +export class AchievementUtilities +{ + public static getAchievementBadgeCode(achievement: AchievementData): string + { + if(!achievement) return null; + + let badgeId = achievement.badgeId; + + if(!achievement.finalLevel) badgeId = GetLocalizationManager().getPreviousLevelBadgeId(badgeId); + + return badgeId; + } + + public static getAchievementCategoryImageUrl(category: IAchievementCategory, progress: number = null, icon: boolean = false): string + { + const imageUrl = GetConfigurationValue('achievements.images.url'); + + let imageName = icon ? 'achicon_' : 'achcategory_'; + + imageName += category.code; + + if(progress !== null) imageName += `_${ ((progress > 0) ? 'active' : 'inactive') }`; + + return imageUrl.replace('%image%', imageName); + } + + public static getAchievementCategoryMaxProgress(category: IAchievementCategory): number + { + if(!category) return 0; + + let progress = 0; + + for(const achievement of category.achievements) + { + progress += achievement.levelCount; + } + + return progress; + } + + public static getAchievementCategoryProgress(category: IAchievementCategory): number + { + if(!category) return 0; + + let progress = 0; + + for(const achievement of category.achievements) progress += (achievement.finalLevel ? achievement.level : (achievement.level - 1)); + + return progress; + } + + public static getAchievementCategoryTotalUnseen(category: IAchievementCategory): number + { + if(!category) return 0; + + let unseen = 0; + + for(const achievement of category.achievements) ((achievement.unseen > 0) && unseen++); + + return unseen; + } + + public static getAchievementHasStarted(achievement: AchievementData): boolean + { + if(!achievement) return false; + + if(achievement.finalLevel || ((achievement.level - 1) > 0)) return true; + + return false; + } + + public static getAchievementIsIgnored(achievement: AchievementData): boolean + { + if(!achievement) return false; + + const ignored = GetConfigurationValue('achievements.unseen.ignored'); + const value = achievement.badgeId.replace(/[0-9]/g, ''); + const index = ignored.indexOf(value); + + if(index >= 0) return true; + + return false; + } + + public static getAchievementLevel(achievement: AchievementData): number + { + if(!achievement) return 0; + + if(achievement.finalLevel) return achievement.level; + + return (achievement.level - 1); + } +} diff --git a/Coolui v3 test/src/api/achievements/IAchievementCategory.ts b/Coolui v3 test/src/api/achievements/IAchievementCategory.ts new file mode 100644 index 0000000000..a049d464ae --- /dev/null +++ b/Coolui v3 test/src/api/achievements/IAchievementCategory.ts @@ -0,0 +1,7 @@ +import { AchievementData } from '@nitrots/nitro-renderer'; + +export interface IAchievementCategory +{ + code: string; + achievements: AchievementData[]; +} diff --git a/Coolui v3 test/src/api/achievements/index.ts b/Coolui v3 test/src/api/achievements/index.ts new file mode 100644 index 0000000000..a3d44b73fb --- /dev/null +++ b/Coolui v3 test/src/api/achievements/index.ts @@ -0,0 +1,3 @@ +export * from './AchievementCategory'; +export * from './AchievementUtilities'; +export * from './IAchievementCategory'; diff --git a/Coolui v3 test/src/api/avatar/AvatarEditorAction.ts b/Coolui v3 test/src/api/avatar/AvatarEditorAction.ts new file mode 100644 index 0000000000..064d6dffcb --- /dev/null +++ b/Coolui v3 test/src/api/avatar/AvatarEditorAction.ts @@ -0,0 +1,7 @@ +export class AvatarEditorAction +{ + public static ACTION_SAVE: string = 'AEA_ACTION_SAVE'; + public static ACTION_CLEAR: string = 'AEA_ACTION_CLEAR'; + public static ACTION_RESET: string = 'AEA_ACTION_RESET'; + public static ACTION_RANDOMIZE: string = 'AEA_ACTION_RANDOMIZE'; +} diff --git a/Coolui v3 test/src/api/avatar/AvatarEditorColorSorter.ts b/Coolui v3 test/src/api/avatar/AvatarEditorColorSorter.ts new file mode 100644 index 0000000000..7ae5960b4f --- /dev/null +++ b/Coolui v3 test/src/api/avatar/AvatarEditorColorSorter.ts @@ -0,0 +1,17 @@ +import { IPartColor } from '@nitrots/nitro-renderer'; + +export const AvatarEditorColorSorter = (a: IPartColor, b: IPartColor) => +{ + const clubLevelA = (!a ? -1 : a.clubLevel); + const clubLevelB = (!b ? -1 : b.clubLevel); + + if(clubLevelA < clubLevelB) return -1; + + if(clubLevelA > clubLevelB) return 1; + + if(a.index < b.index) return -1; + + if(a.index > b.index) return 1; + + return 0; +}; diff --git a/Coolui v3 test/src/api/avatar/AvatarEditorPartSorter.ts b/Coolui v3 test/src/api/avatar/AvatarEditorPartSorter.ts new file mode 100644 index 0000000000..41e98d85c6 --- /dev/null +++ b/Coolui v3 test/src/api/avatar/AvatarEditorPartSorter.ts @@ -0,0 +1,35 @@ +import { IFigurePartSet } from '@nitrots/nitro-renderer'; + +export const AvatarEditorPartSorter = (hcFirst: boolean) => +{ + return (a: { partSet: IFigurePartSet, usesColor: boolean, isClear?: boolean }, b: { partSet: IFigurePartSet, usesColor: boolean, isClear?: boolean }) => + { + const clubLevelA = (!a.partSet ? -1 : a.partSet.clubLevel); + const clubLevelB = (!b.partSet ? -1 : b.partSet.clubLevel); + const isSellableA = (!a.partSet ? false : a.partSet.isSellable); + const isSellableB = (!b.partSet ? false : b.partSet.isSellable); + + if(isSellableA && !isSellableB) return 1; + + if(isSellableB && !isSellableA) return -1; + + if(hcFirst) + { + if(clubLevelA > clubLevelB) return -1; + + if(clubLevelA < clubLevelB) return 1; + } + else + { + if(clubLevelA < clubLevelB) return -1; + + if(clubLevelA > clubLevelB) return 1; + } + + if(a.partSet.id < b.partSet.id) return -1; + + if(a.partSet.id > b.partSet.id) return 1; + + return 0; + }; +}; diff --git a/Coolui v3 test/src/api/avatar/AvatarEditorThumbnailsHelper.ts b/Coolui v3 test/src/api/avatar/AvatarEditorThumbnailsHelper.ts new file mode 100644 index 0000000000..88a7906314 --- /dev/null +++ b/Coolui v3 test/src/api/avatar/AvatarEditorThumbnailsHelper.ts @@ -0,0 +1,196 @@ +import { AvatarFigurePartType, AvatarScaleType, AvatarSetType, GetAssetManager, GetAvatarRenderManager, IFigurePart, IGraphicAsset, IPartColor, NitroAlphaFilter, NitroContainer, NitroRectangle, NitroSprite, TextureUtils } from '@nitrots/nitro-renderer'; +import { IAvatarEditorCategoryPartItem } from './IAvatarEditorCategoryPartItem'; + +export class AvatarEditorThumbnailsHelper +{ + private static THUMBNAIL_CACHE: Map = new Map(); + private static THUMB_DIRECTIONS: number[] = [ 2, 6, 0, 4, 3, 1 ]; + private static ALPHA_FILTER: NitroAlphaFilter = new NitroAlphaFilter({ alpha: 0.2 }); + private static DRAW_ORDER: string[] = [ + AvatarFigurePartType.LEFT_HAND_ITEM, + AvatarFigurePartType.LEFT_HAND, + AvatarFigurePartType.LEFT_SLEEVE, + AvatarFigurePartType.LEFT_COAT_SLEEVE, + AvatarFigurePartType.BODY, + AvatarFigurePartType.SHOES, + AvatarFigurePartType.LEGS, + AvatarFigurePartType.CHEST, + AvatarFigurePartType.CHEST_ACCESSORY, + AvatarFigurePartType.COAT_CHEST, + AvatarFigurePartType.CHEST_PRINT, + AvatarFigurePartType.WAIST_ACCESSORY, + AvatarFigurePartType.RIGHT_HAND, + AvatarFigurePartType.RIGHT_SLEEVE, + AvatarFigurePartType.RIGHT_COAT_SLEEVE, + AvatarFigurePartType.HEAD, + AvatarFigurePartType.FACE, + AvatarFigurePartType.EYES, + AvatarFigurePartType.HAIR, + AvatarFigurePartType.HAIR_BIG, + AvatarFigurePartType.FACE_ACCESSORY, + AvatarFigurePartType.EYE_ACCESSORY, + AvatarFigurePartType.HEAD_ACCESSORY, + AvatarFigurePartType.HEAD_ACCESSORY_EXTRA, + AvatarFigurePartType.RIGHT_HAND_ITEM, + ]; + + private static getThumbnailKey(setType: string, part: IAvatarEditorCategoryPartItem): string + { + return `${ setType }-${ part.partSet.id }`; + } + + public static clearCache(): void + { + this.THUMBNAIL_CACHE.clear(); + } + + public static async build(setType: string, part: IAvatarEditorCategoryPartItem, useColors: boolean, partColors: IPartColor[], isDisabled: boolean = false): Promise + { + if(!setType || !setType.length || !part || !part.partSet || !part.partSet.parts || !part.partSet.parts.length) return null; + + const thumbnailKey = this.getThumbnailKey(setType, part); + const cached = this.THUMBNAIL_CACHE.get(thumbnailKey); + + if(cached) return cached; + + const buildContainer = (part: IAvatarEditorCategoryPartItem, useColors: boolean, partColors: IPartColor[], isDisabled: boolean = false) => + { + const container = new NitroContainer(); + const parts = part.partSet.parts.concat().sort(this.sortByDrawOrder); + + for(const part of parts) + { + if(!part) continue; + + let asset: IGraphicAsset = null; + let direction = 0; + let hasAsset = false; + + while(!hasAsset && (direction < AvatarEditorThumbnailsHelper.THUMB_DIRECTIONS.length)) + { + const assetName = `${ AvatarFigurePartType.SCALE }_${ AvatarFigurePartType.STD }_${ part.type }_${ part.id }_${ AvatarEditorThumbnailsHelper.THUMB_DIRECTIONS[direction] }_${ AvatarFigurePartType.DEFAULT_FRAME }`; + + asset = GetAssetManager().getAsset(assetName); + + if(asset && asset.texture) + { + hasAsset = true; + } + else + { + direction++; + } + } + + if(!hasAsset) + { + console.log(`${ AvatarFigurePartType.SCALE }_${ AvatarFigurePartType.STD }_${ part.type }_${ part.id }`); + continue; + } + + const x = asset.offsetX; + const y = asset.offsetY; + + const sprite = new NitroSprite(asset.texture); + + sprite.position.set(x, y); + + if(useColors && (part.colorLayerIndex > 0) && partColors && partColors.length) + { + const color = partColors[(part.colorLayerIndex - 1)]; + + if(color) sprite.tint = color.rgb; + } + + if(isDisabled) container.filters = [ AvatarEditorThumbnailsHelper.ALPHA_FILTER ]; + + container.addChild(sprite); + } + + return container; + }; + + return new Promise(async (resolve, reject) => + { + const resetFigure = async (figure: string) => + { + const container = buildContainer(part, useColors, partColors, isDisabled); + const imageUrl = await TextureUtils.generateImageUrl(container); + + AvatarEditorThumbnailsHelper.THUMBNAIL_CACHE.set(thumbnailKey, imageUrl); + + resolve(imageUrl); + }; + + const figureContainer = GetAvatarRenderManager().createFigureContainer(`${ setType }-${ part.partSet.id }`); + + if(!GetAvatarRenderManager().isFigureContainerReady(figureContainer)) + { + GetAvatarRenderManager().downloadAvatarFigure(figureContainer, { + resetFigure, + dispose: null, + disposed: false + }); + } + else + { + resetFigure(null); + } + }); + } + + public static async buildForFace(figureString: string, isDisabled: boolean = false): Promise + { + if(!figureString || !figureString.length) return null; + + const thumbnailKey = figureString; + const cached = this.THUMBNAIL_CACHE.get(thumbnailKey); + + if(cached) return cached; + + return new Promise(async (resolve, reject) => + { + const resetFigure = async (figure: string) => + { + const avatarImage = GetAvatarRenderManager().createAvatarImage(figure, AvatarScaleType.LARGE, null, { resetFigure, dispose: null, disposed: false }); + + if(avatarImage.isPlaceholder()) return; + + const texture = avatarImage.processAsTexture(AvatarSetType.HEAD, false); + const sprite = new NitroSprite(texture); + + if(isDisabled) sprite.filters = [ AvatarEditorThumbnailsHelper.ALPHA_FILTER ]; + + const imageUrl = await TextureUtils.generateImageUrl({ + target: sprite, + frame: new NitroRectangle(0, 0, texture.width, texture.height) + }); + + sprite.destroy(); + avatarImage.dispose(); + + AvatarEditorThumbnailsHelper.THUMBNAIL_CACHE.set(thumbnailKey, imageUrl); + + resolve(imageUrl); + }; + + resetFigure(figureString); + }); + } + + private static sortByDrawOrder(a: IFigurePart, b: IFigurePart): number + { + const indexA = AvatarEditorThumbnailsHelper.DRAW_ORDER.indexOf(a.type); + const indexB = AvatarEditorThumbnailsHelper.DRAW_ORDER.indexOf(b.type); + + if(indexA < indexB) return -1; + + if(indexA > indexB) return 1; + + if(a.index < b.index) return -1; + + if(a.index > b.index) return 1; + + return 0; + } +} diff --git a/Coolui v3 test/src/api/avatar/IAvatarEditorCategory.ts b/Coolui v3 test/src/api/avatar/IAvatarEditorCategory.ts new file mode 100644 index 0000000000..a7cfd51163 --- /dev/null +++ b/Coolui v3 test/src/api/avatar/IAvatarEditorCategory.ts @@ -0,0 +1,9 @@ +import { IPartColor } from '@nitrots/nitro-renderer'; +import { IAvatarEditorCategoryPartItem } from './IAvatarEditorCategoryPartItem'; + +export interface IAvatarEditorCategory +{ + setType: string; + partItems: IAvatarEditorCategoryPartItem[]; + colorItems: IPartColor[][]; +} diff --git a/Coolui v3 test/src/api/avatar/IAvatarEditorCategoryPartItem.ts b/Coolui v3 test/src/api/avatar/IAvatarEditorCategoryPartItem.ts new file mode 100644 index 0000000000..d1cbc0dbac --- /dev/null +++ b/Coolui v3 test/src/api/avatar/IAvatarEditorCategoryPartItem.ts @@ -0,0 +1,10 @@ +import { IFigurePartSet } from '@nitrots/nitro-renderer'; + +export interface IAvatarEditorCategoryPartItem +{ + id?: number; + partSet?: IFigurePartSet; + usesColor?: boolean; + maxPaletteCount?: number; + isClear?: boolean; +} diff --git a/Coolui v3 test/src/api/avatar/index.ts b/Coolui v3 test/src/api/avatar/index.ts new file mode 100644 index 0000000000..415185e940 --- /dev/null +++ b/Coolui v3 test/src/api/avatar/index.ts @@ -0,0 +1,6 @@ +export * from './AvatarEditorAction'; +export * from './AvatarEditorColorSorter'; +export * from './AvatarEditorPartSorter'; +export * from './AvatarEditorThumbnailsHelper'; +export * from './IAvatarEditorCategory'; +export * from './IAvatarEditorCategoryPartItem'; diff --git a/Coolui v3 test/src/api/camera/CameraEditorTabs.ts b/Coolui v3 test/src/api/camera/CameraEditorTabs.ts new file mode 100644 index 0000000000..6e894e740c --- /dev/null +++ b/Coolui v3 test/src/api/camera/CameraEditorTabs.ts @@ -0,0 +1,5 @@ +export class CameraEditorTabs +{ + public static readonly COLORMATRIX: string = 'colormatrix'; + public static readonly COMPOSITE: string = 'composite'; +} diff --git a/Coolui v3 test/src/api/camera/CameraPicture.ts b/Coolui v3 test/src/api/camera/CameraPicture.ts new file mode 100644 index 0000000000..020e1ec563 --- /dev/null +++ b/Coolui v3 test/src/api/camera/CameraPicture.ts @@ -0,0 +1,9 @@ +import { NitroTexture } from '@nitrots/nitro-renderer'; + +export class CameraPicture +{ + constructor( + public texture: NitroTexture, + public imageUrl: string) + {} +} diff --git a/Coolui v3 test/src/api/camera/CameraPictureThumbnail.ts b/Coolui v3 test/src/api/camera/CameraPictureThumbnail.ts new file mode 100644 index 0000000000..3e3f78252f --- /dev/null +++ b/Coolui v3 test/src/api/camera/CameraPictureThumbnail.ts @@ -0,0 +1,7 @@ +export class CameraPictureThumbnail +{ + constructor( + public effectName: string, + public thumbnailUrl: string) + {} +} diff --git a/Coolui v3 test/src/api/camera/index.ts b/Coolui v3 test/src/api/camera/index.ts new file mode 100644 index 0000000000..93c6ccb9a1 --- /dev/null +++ b/Coolui v3 test/src/api/camera/index.ts @@ -0,0 +1,3 @@ +export * from './CameraEditorTabs'; +export * from './CameraPicture'; +export * from './CameraPictureThumbnail'; diff --git a/Coolui v3 test/src/api/campaign/CalendarItem.ts b/Coolui v3 test/src/api/campaign/CalendarItem.ts new file mode 100644 index 0000000000..d3634b3dd7 --- /dev/null +++ b/Coolui v3 test/src/api/campaign/CalendarItem.ts @@ -0,0 +1,30 @@ +import { ICalendarItem } from './ICalendarItem'; + +export class CalendarItem implements ICalendarItem +{ + private _productName: string; + private _customImage: string; + private _furnitureClassName: string; + + constructor(productName: string, customImage: string, furnitureClassName: string) + { + this._productName = productName; + this._customImage = customImage; + this._furnitureClassName = furnitureClassName; + } + + public get productName(): string + { + return this._productName; + } + + public get customImage(): string + { + return this._customImage; + } + + public get furnitureClassName(): string + { + return this._furnitureClassName; + } +} diff --git a/Coolui v3 test/src/api/campaign/CalendarItemState.ts b/Coolui v3 test/src/api/campaign/CalendarItemState.ts new file mode 100644 index 0000000000..1b91ca3ff7 --- /dev/null +++ b/Coolui v3 test/src/api/campaign/CalendarItemState.ts @@ -0,0 +1,7 @@ +export class CalendarItemState +{ + public static readonly STATE_UNLOCKED = 1; + public static readonly STATE_LOCKED_AVAILABLE = 2; + public static readonly STATE_LOCKED_EXPIRED = 3; + public static readonly STATE_LOCKED_FUTURE = 4; +} diff --git a/Coolui v3 test/src/api/campaign/ICalendarItem.ts b/Coolui v3 test/src/api/campaign/ICalendarItem.ts new file mode 100644 index 0000000000..87dfbd6dc6 --- /dev/null +++ b/Coolui v3 test/src/api/campaign/ICalendarItem.ts @@ -0,0 +1,6 @@ +export interface ICalendarItem +{ + readonly productName: string; + readonly customImage: string; + readonly furnitureClassName: string; +} diff --git a/Coolui v3 test/src/api/campaign/index.ts b/Coolui v3 test/src/api/campaign/index.ts new file mode 100644 index 0000000000..a86e40c424 --- /dev/null +++ b/Coolui v3 test/src/api/campaign/index.ts @@ -0,0 +1,3 @@ +export * from './CalendarItem'; +export * from './CalendarItemState'; +export * from './ICalendarItem'; diff --git a/Coolui v3 test/src/api/catalog/BuilderFurniPlaceableStatus.ts b/Coolui v3 test/src/api/catalog/BuilderFurniPlaceableStatus.ts new file mode 100644 index 0000000000..40eb6f65c5 --- /dev/null +++ b/Coolui v3 test/src/api/catalog/BuilderFurniPlaceableStatus.ts @@ -0,0 +1,10 @@ +export class BuilderFurniPlaceableStatus +{ + public static OKAY: number = 0; + public static MISSING_OFFER: number = 1; + public static FURNI_LIMIT_REACHED: number = 2; + public static NOT_IN_ROOM: number = 3; + public static NOT_ROOM_OWNER: number = 4; + public static GUILD_ROOM: number = 5; + public static VISITORS_IN_ROOM: number = 6; +} diff --git a/Coolui v3 test/src/api/catalog/CatalogNode.ts b/Coolui v3 test/src/api/catalog/CatalogNode.ts new file mode 100644 index 0000000000..5e7c2fc35f --- /dev/null +++ b/Coolui v3 test/src/api/catalog/CatalogNode.ts @@ -0,0 +1,124 @@ +import { NodeData } from '@nitrots/nitro-renderer'; +import { ICatalogNode } from './ICatalogNode'; + +export class CatalogNode implements ICatalogNode +{ + private _depth: number = 0; + private _localization: string = ''; + private _pageId: number = -1; + private _pageName: string = ''; + private _iconId: number = 0; + private _children: ICatalogNode[]; + private _offerIds: number[]; + private _parent: ICatalogNode; + private _isVisible: boolean; + private _isActive: boolean; + private _isOpen: boolean; + + constructor(node: NodeData, depth: number, parent: ICatalogNode) + { + this._depth = depth; + this._parent = parent; + this._localization = node.localization; + this._pageId = node.pageId; + this._pageName = node.pageName; + this._iconId = node.icon; + this._children = []; + this._offerIds = node.offerIds; + this._isVisible = node.visible; + this._isActive = false; + this._isOpen = false; + } + + public activate(): void + { + this._isActive = true; + } + + public deactivate(): void + { + this._isActive = false; + } + + public open(): void + { + this._isOpen = true; + } + + public close(): void + { + this._isOpen = false; + } + + public addChild(child: ICatalogNode):void + { + if(!child) return; + + this._children.push(child); + } + + public get depth(): number + { + return this._depth; + } + + public get isBranch(): boolean + { + return (this._children.length > 0); + } + + public get isLeaf(): boolean + { + return (this._children.length === 0); + } + + public get localization(): string + { + return this._localization; + } + + public get pageId(): number + { + return this._pageId; + } + + public get pageName(): string + { + return this._pageName; + } + + public get iconId(): number + { + return this._iconId; + } + + public get children(): ICatalogNode[] + { + return this._children; + } + + public get offerIds(): number[] + { + return this._offerIds; + } + + public get parent(): ICatalogNode + { + return this._parent; + } + + public get isVisible(): boolean + { + return this._isVisible; + } + + public get isActive(): boolean + { + return this._isActive; + } + + public get isOpen(): boolean + { + return this._isOpen; + } +} diff --git a/Coolui v3 test/src/api/catalog/CatalogPage.ts b/Coolui v3 test/src/api/catalog/CatalogPage.ts new file mode 100644 index 0000000000..1e806094b1 --- /dev/null +++ b/Coolui v3 test/src/api/catalog/CatalogPage.ts @@ -0,0 +1,59 @@ +import { ICatalogPage } from './ICatalogPage'; +import { IPageLocalization } from './IPageLocalization'; +import { IPurchasableOffer } from './IPurchasableOffer'; + +export class CatalogPage implements ICatalogPage +{ + public static MODE_NORMAL: number = 0; + + private _pageId: number; + private _layoutCode: string; + private _localization: IPageLocalization; + private _offers: IPurchasableOffer[]; + private _acceptSeasonCurrencyAsCredits: boolean; + private _mode: number; + + constructor(pageId: number, layoutCode: string, localization: IPageLocalization, offers: IPurchasableOffer[], acceptSeasonCurrencyAsCredits: boolean, mode: number = -1) + { + this._pageId = pageId; + this._layoutCode = layoutCode; + this._localization = localization; + this._offers = offers; + this._acceptSeasonCurrencyAsCredits = acceptSeasonCurrencyAsCredits; + + for(const offer of offers) (offer.page = this); + + if(mode === -1) this._mode = CatalogPage.MODE_NORMAL; + else this._mode = mode; + } + + public get pageId(): number + { + return this._pageId; + } + + public get layoutCode(): string + { + return this._layoutCode; + } + + public get localization(): IPageLocalization + { + return this._localization; + } + + public get offers(): IPurchasableOffer[] + { + return this._offers; + } + + public get acceptSeasonCurrencyAsCredits(): boolean + { + return this._acceptSeasonCurrencyAsCredits; + } + + public get mode(): number + { + return this._mode; + } +} diff --git a/Coolui v3 test/src/api/catalog/CatalogPageName.ts b/Coolui v3 test/src/api/catalog/CatalogPageName.ts new file mode 100644 index 0000000000..ed217d875d --- /dev/null +++ b/Coolui v3 test/src/api/catalog/CatalogPageName.ts @@ -0,0 +1,26 @@ +export class CatalogPageName +{ + public static DUCKET_INFO: string = 'ducket_info'; + public static CREDITS: string = 'credits'; + public static AVATAR_EFFECTS: string = 'avatar_effects'; + public static HC_MEMBERSHIP: string = 'hc_membership'; + public static CLUB_GIFTS: string = 'club_gifts'; + public static LIMITED_SOLD: string = 'limited_sold'; + public static PET_ACCESSORIES: string = 'pet_accessories'; + public static TRAX_SONGS: string = 'trax_songs'; + public static NEW_ADDITIONS: string = 'new_additions'; + public static QUEST_SHELL: string = 'quest_shell'; + public static QUEST_SNOWFLAKES: string = 'quest_snowflakes'; + public static VAL_QUESTS: string = 'val_quests'; + public static GUILD_CUSTOM_FURNI: string = 'guild_custom_furni'; + public static GIFT_SHOP: string = 'gift_shop'; + public static HORSE_STYLES: string = 'horse_styles'; + public static HORSE_SHOE: string = 'horse_shoe'; + public static SET_EASTER: string = 'set_easter'; + public static ECOTRON_TRANSFORM: string = 'ecotron_transform'; + public static LOYALTY_INFO: string = 'loyalty_info'; + public static ROOM_BUNDLES: string = 'room_bundles'; + public static ROOM_BUNDLES_MOBILE: string = 'room_bundles_mobile'; + public static HABBO_CLUB_DESKTOP: string = 'habbo_club_desktop'; + public static MOBILE_SUBSCRIPTIONS: string = 'mobile_subscriptions'; +} diff --git a/Coolui v3 test/src/api/catalog/CatalogPetPalette.ts b/Coolui v3 test/src/api/catalog/CatalogPetPalette.ts new file mode 100644 index 0000000000..3b3c13446e --- /dev/null +++ b/Coolui v3 test/src/api/catalog/CatalogPetPalette.ts @@ -0,0 +1,10 @@ +import { SellablePetPaletteData } from '@nitrots/nitro-renderer'; + +export class CatalogPetPalette +{ + constructor( + public readonly breed: string, + public readonly palettes: SellablePetPaletteData[] + ) + {} +} diff --git a/Coolui v3 test/src/api/catalog/CatalogPurchaseState.ts b/Coolui v3 test/src/api/catalog/CatalogPurchaseState.ts new file mode 100644 index 0000000000..b442f621cc --- /dev/null +++ b/Coolui v3 test/src/api/catalog/CatalogPurchaseState.ts @@ -0,0 +1,10 @@ +export class CatalogPurchaseState +{ + public static NONE = 0; + public static CONFIRM = 1; + public static PURCHASE = 2; + public static NO_CREDITS = 3; + public static NO_POINTS = 4; + public static SOLD_OUT = 5; + public static FAILED = 6; +} diff --git a/Coolui v3 test/src/api/catalog/CatalogType.ts b/Coolui v3 test/src/api/catalog/CatalogType.ts new file mode 100644 index 0000000000..670ad6f844 --- /dev/null +++ b/Coolui v3 test/src/api/catalog/CatalogType.ts @@ -0,0 +1,5 @@ +export class CatalogType +{ + public static NORMAL: string = 'NORMAL'; + public static BUILDER: string = 'BUILDERS_CLUB'; +} diff --git a/Coolui v3 test/src/api/catalog/CatalogUtilities.ts b/Coolui v3 test/src/api/catalog/CatalogUtilities.ts new file mode 100644 index 0000000000..c2e1d5eb79 --- /dev/null +++ b/Coolui v3 test/src/api/catalog/CatalogUtilities.ts @@ -0,0 +1,124 @@ +import { GetRoomEngine, SellablePetPaletteData } from '@nitrots/nitro-renderer'; +import { ICatalogNode } from './ICatalogNode'; + +export const GetPixelEffectIcon = (id: number) => +{ + return ''; +}; + +export const GetSubscriptionProductIcon = (id: number) => +{ + return ''; +}; + +export const GetOfferNodes = (offerNodes: Map, offerId: number) => +{ + const nodes = offerNodes.get(offerId); + const allowedNodes: ICatalogNode[] = []; + + if(nodes && nodes.length) + { + for(const node of nodes) + { + if(!node.isVisible) continue; + + allowedNodes.push(node); + } + } + + return allowedNodes; +}; + +export const FilterCatalogNode = (search: string, furniLines: string[], node: ICatalogNode, nodes: ICatalogNode[]) => +{ + if(node.isVisible && (node.pageId > 0)) + { + let nodeAdded = false; + + const hayStack = [ node.pageName, node.localization ].join(' ').toLowerCase().replace(/ /gi, ''); + + if(hayStack.indexOf(search) > -1) + { + nodes.push(node); + + nodeAdded = true; + } + + if(!nodeAdded) + { + for(const furniLine of furniLines) + { + if(hayStack.indexOf(furniLine) >= 0) + { + nodes.push(node); + + break; + } + } + } + } + + for(const child of node.children) FilterCatalogNode(search, furniLines, child, nodes); +}; + +export function GetPetIndexFromLocalization(localization: string) +{ + if(!localization.length) return 0; + + let index = (localization.length - 1); + + while(index >= 0) + { + if(isNaN(parseInt(localization.charAt(index)))) break; + + index--; + } + + if(index > 0) return parseInt(localization.substring(index + 1)); + + return -1; +} + +export function GetPetAvailableColors(petIndex: number, palettes: SellablePetPaletteData[]): number[][] +{ + switch(petIndex) + { + case 0: + return [ [ 16743226 ], [ 16750435 ], [ 16764339 ], [ 0xF59500 ], [ 16498012 ], [ 16704690 ], [ 0xEDD400 ], [ 16115545 ], [ 16513201 ], [ 8694111 ], [ 11585939 ], [ 14413767 ], [ 6664599 ], [ 9553845 ], [ 12971486 ], [ 8358322 ], [ 10002885 ], [ 13292268 ], [ 10780600 ], [ 12623573 ], [ 14403561 ], [ 12418717 ], [ 14327229 ], [ 15517403 ], [ 14515069 ], [ 15764368 ], [ 16366271 ], [ 0xABABAB ], [ 0xD4D4D4 ], [ 0xFFFFFF ], [ 14256481 ], [ 14656129 ], [ 15848130 ], [ 14005087 ], [ 14337152 ], [ 15918540 ], [ 15118118 ], [ 15531929 ], [ 9764857 ], [ 11258085 ] ]; + case 1: + return [ [ 16743226 ], [ 16750435 ], [ 16764339 ], [ 0xF59500 ], [ 16498012 ], [ 16704690 ], [ 0xEDD400 ], [ 16115545 ], [ 16513201 ], [ 8694111 ], [ 11585939 ], [ 14413767 ], [ 6664599 ], [ 9553845 ], [ 12971486 ], [ 8358322 ], [ 10002885 ], [ 13292268 ], [ 10780600 ], [ 12623573 ], [ 14403561 ], [ 12418717 ], [ 14327229 ], [ 15517403 ], [ 14515069 ], [ 15764368 ], [ 16366271 ], [ 0xABABAB ], [ 0xD4D4D4 ], [ 0xFFFFFF ], [ 14256481 ], [ 14656129 ], [ 15848130 ], [ 14005087 ], [ 14337152 ], [ 15918540 ], [ 15118118 ], [ 15531929 ], [ 9764857 ], [ 11258085 ] ]; + case 2: + return [ [ 16579283 ], [ 15378351 ], [ 8830016 ], [ 15257125 ], [ 9340985 ], [ 8949607 ], [ 6198292 ], [ 8703620 ], [ 9889626 ], [ 8972045 ], [ 12161285 ], [ 13162269 ], [ 8620113 ], [ 12616503 ], [ 8628101 ], [ 0xD2FF00 ], [ 9764857 ] ]; + case 3: + return [ [ 0xFFFFFF ], [ 0xEEEEEE ], [ 0xDDDDDD ] ]; + case 4: + return [ [ 0xFFFFFF ], [ 16053490 ], [ 15464440 ], [ 16248792 ], [ 15396319 ], [ 15007487 ] ]; + case 5: + return [ [ 0xFFFFFF ], [ 0xEEEEEE ], [ 0xDDDDDD ] ]; + case 6: + return [ [ 0xFFFFFF ], [ 0xEEEEEE ], [ 0xDDDDDD ], [ 16767177 ], [ 16770205 ], [ 16751331 ] ]; + case 7: + return [ [ 0xCCCCCC ], [ 0xAEAEAE ], [ 16751331 ], [ 10149119 ], [ 16763290 ], [ 16743786 ] ]; + default: { + const colors: number[][] = []; + + for(const palette of palettes) + { + const petColorResult = GetRoomEngine().getPetColorResult(petIndex, palette.paletteId); + + if(!petColorResult) continue; + + if(petColorResult.primaryColor === petColorResult.secondaryColor) + { + colors.push([ petColorResult.primaryColor ]); + } + else + { + colors.push([ petColorResult.primaryColor, petColorResult.secondaryColor ]); + } + } + + return colors; + } + } +} diff --git a/Coolui v3 test/src/api/catalog/FurnitureOffer.ts b/Coolui v3 test/src/api/catalog/FurnitureOffer.ts new file mode 100644 index 0000000000..367f24717a --- /dev/null +++ b/Coolui v3 test/src/api/catalog/FurnitureOffer.ts @@ -0,0 +1,120 @@ +import { GetProductOfferComposer, IFurnitureData } from '@nitrots/nitro-renderer'; +import { GetProductDataForLocalization, SendMessageComposer } from '../nitro'; +import { ICatalogPage } from './ICatalogPage'; +import { IProduct } from './IProduct'; +import { IPurchasableOffer } from './IPurchasableOffer'; +import { Offer } from './Offer'; +import { Product } from './Product'; + +export class FurnitureOffer implements IPurchasableOffer +{ + private _furniData:IFurnitureData; + private _page: ICatalogPage; + private _product: IProduct; + + constructor(furniData: IFurnitureData) + { + this._furniData = furniData; + this._product = (new Product(this._furniData.type, this._furniData.id, this._furniData.customParams, 1, GetProductDataForLocalization(this._furniData.className), this._furniData) as IProduct); + } + + public activate(): void + { + SendMessageComposer(new GetProductOfferComposer((this._furniData.rentOfferId > -1) ? this._furniData.rentOfferId : this._furniData.purchaseOfferId)); + } + + public get offerId(): number + { + return (this.isRentOffer) ? this._furniData.rentOfferId : this._furniData.purchaseOfferId; + } + + public get priceInActivityPoints(): number + { + return 0; + } + + public get activityPointType(): number + { + return 0; + } + + public get priceInCredits(): number + { + return 0; + } + + public get page(): ICatalogPage + { + return this._page; + } + + public set page(page: ICatalogPage) + { + this._page = page; + } + + public get priceType(): string + { + return ''; + } + + public get product(): IProduct + { + return this._product; + } + + public get products(): IProduct[] + { + return [ this._product ]; + } + + public get localizationId(): string + { + return 'roomItem.name.' + this._furniData.id; + } + + public get bundlePurchaseAllowed(): boolean + { + return false; + } + + public get isRentOffer(): boolean + { + return (this._furniData.rentOfferId > -1); + } + + public get giftable(): boolean + { + return false; + } + + public get pricingModel(): string + { + return Offer.PRICING_MODEL_FURNITURE; + } + + public get clubLevel(): number + { + return 0; + } + + public get badgeCode(): string + { + return ''; + } + + public get localizationName(): string + { + return this._furniData.name; + } + + public get localizationDescription(): string + { + return this._furniData.description; + } + + public get isLazy(): boolean + { + return true; + } +} diff --git a/Coolui v3 test/src/api/catalog/GetImageIconUrlForProduct.ts b/Coolui v3 test/src/api/catalog/GetImageIconUrlForProduct.ts new file mode 100644 index 0000000000..f0d195dac8 --- /dev/null +++ b/Coolui v3 test/src/api/catalog/GetImageIconUrlForProduct.ts @@ -0,0 +1,19 @@ +import { GetRoomEngine } from '@nitrots/nitro-renderer'; +import { ProductTypeEnum } from './ProductTypeEnum'; + +export const GetImageIconUrlForProduct = (productType: string, productClassId: number, extraData: string = null) => +{ + let imageUrl: string = null; + + switch(productType.toLocaleLowerCase()) + { + case ProductTypeEnum.FLOOR: + imageUrl = GetRoomEngine().getFurnitureFloorIconUrl(productClassId); + break; + case ProductTypeEnum.WALL: + imageUrl = GetRoomEngine().getFurnitureWallIconUrl(productClassId, extraData); + break; + } + + return imageUrl; +}; diff --git a/Coolui v3 test/src/api/catalog/GiftWrappingConfiguration.ts b/Coolui v3 test/src/api/catalog/GiftWrappingConfiguration.ts new file mode 100644 index 0000000000..9d29b8c8e7 --- /dev/null +++ b/Coolui v3 test/src/api/catalog/GiftWrappingConfiguration.ts @@ -0,0 +1,51 @@ +import { GiftWrappingConfigurationParser } from '@nitrots/nitro-renderer'; + +export class GiftWrappingConfiguration +{ + private _isEnabled: boolean = false; + private _price: number = null; + private _stuffTypes: number[] = null; + private _boxTypes: number[] = null; + private _ribbonTypes: number[] = null; + private _defaultStuffTypes: number[] = null; + + constructor(parser: GiftWrappingConfigurationParser) + { + this._isEnabled = parser.isEnabled; + this._price = parser.price; + this._boxTypes = parser.boxTypes; + this._ribbonTypes = parser.ribbonTypes; + this._stuffTypes = parser.giftWrappers; + this._defaultStuffTypes = parser.giftFurnis; + } + + public get isEnabled(): boolean + { + return this._isEnabled; + } + + public get price(): number + { + return this._price; + } + + public get stuffTypes(): number[] + { + return this._stuffTypes; + } + + public get boxTypes(): number[] + { + return this._boxTypes; + } + + public get ribbonTypes(): number[] + { + return this._ribbonTypes; + } + + public get defaultStuffTypes(): number[] + { + return this._defaultStuffTypes; + } +} diff --git a/Coolui v3 test/src/api/catalog/ICatalogNode.ts b/Coolui v3 test/src/api/catalog/ICatalogNode.ts new file mode 100644 index 0000000000..6253a7506e --- /dev/null +++ b/Coolui v3 test/src/api/catalog/ICatalogNode.ts @@ -0,0 +1,21 @@ +export interface ICatalogNode +{ + activate(): void; + deactivate(): void; + open(): void; + close(): void; + addChild(node: ICatalogNode): void; + readonly depth: number; + readonly isBranch: boolean; + readonly isLeaf: boolean; + readonly localization: string; + readonly pageId: number; + readonly pageName: string; + readonly iconId: number; + readonly children: ICatalogNode[]; + readonly offerIds: number[]; + readonly parent: ICatalogNode; + readonly isVisible: boolean; + readonly isActive: boolean; + readonly isOpen: boolean; +} diff --git a/Coolui v3 test/src/api/catalog/ICatalogOptions.ts b/Coolui v3 test/src/api/catalog/ICatalogOptions.ts new file mode 100644 index 0000000000..20356947d1 --- /dev/null +++ b/Coolui v3 test/src/api/catalog/ICatalogOptions.ts @@ -0,0 +1,13 @@ +import { ClubGiftInfoParser, ClubOfferData, HabboGroupEntryData, MarketplaceConfigurationMessageParser } from '@nitrots/nitro-renderer'; +import { CatalogPetPalette } from './CatalogPetPalette'; +import { GiftWrappingConfiguration } from './GiftWrappingConfiguration'; + +export interface ICatalogOptions +{ + groups?: HabboGroupEntryData[]; + petPalettes?: CatalogPetPalette[]; + clubOffers?: ClubOfferData[]; + clubGifts?: ClubGiftInfoParser; + giftConfiguration?: GiftWrappingConfiguration; + marketplaceConfiguration?: MarketplaceConfigurationMessageParser; +} diff --git a/Coolui v3 test/src/api/catalog/ICatalogPage.ts b/Coolui v3 test/src/api/catalog/ICatalogPage.ts new file mode 100644 index 0000000000..ed11ba0d18 --- /dev/null +++ b/Coolui v3 test/src/api/catalog/ICatalogPage.ts @@ -0,0 +1,12 @@ +import { IPageLocalization } from './IPageLocalization'; +import { IPurchasableOffer } from './IPurchasableOffer'; + +export interface ICatalogPage +{ + readonly pageId: number; + readonly layoutCode: string; + readonly localization: IPageLocalization; + readonly offers: IPurchasableOffer[]; + readonly acceptSeasonCurrencyAsCredits: boolean; + readonly mode: number; +} diff --git a/Coolui v3 test/src/api/catalog/IMarketplaceSearchOptions.ts b/Coolui v3 test/src/api/catalog/IMarketplaceSearchOptions.ts new file mode 100644 index 0000000000..9489ef0ffb --- /dev/null +++ b/Coolui v3 test/src/api/catalog/IMarketplaceSearchOptions.ts @@ -0,0 +1,7 @@ +export interface IMarketplaceSearchOptions +{ + query: string; + type: number; + minPrice: number; + maxPrice: number; +} diff --git a/Coolui v3 test/src/api/catalog/IPageLocalization.ts b/Coolui v3 test/src/api/catalog/IPageLocalization.ts new file mode 100644 index 0000000000..ad652e1a49 --- /dev/null +++ b/Coolui v3 test/src/api/catalog/IPageLocalization.ts @@ -0,0 +1,5 @@ +export interface IPageLocalization +{ + getText(index: number): string + getImage(index: number): string +} diff --git a/Coolui v3 test/src/api/catalog/IProduct.ts b/Coolui v3 test/src/api/catalog/IProduct.ts new file mode 100644 index 0000000000..4a1a392dec --- /dev/null +++ b/Coolui v3 test/src/api/catalog/IProduct.ts @@ -0,0 +1,16 @@ +import { IFurnitureData, IProductData } from '@nitrots/nitro-renderer'; +import { IPurchasableOffer } from './IPurchasableOffer'; + +export interface IProduct +{ + getIconUrl(offer?: IPurchasableOffer): string; + productType: string; + productClassId: number; + extraParam: string; + productCount: number; + productData: IProductData; + furnitureData: IFurnitureData; + isUniqueLimitedItem: boolean; + uniqueLimitedItemSeriesSize: number; + uniqueLimitedItemsLeft: number; +} diff --git a/Coolui v3 test/src/api/catalog/IPurchasableOffer.ts b/Coolui v3 test/src/api/catalog/IPurchasableOffer.ts new file mode 100644 index 0000000000..b18286517d --- /dev/null +++ b/Coolui v3 test/src/api/catalog/IPurchasableOffer.ts @@ -0,0 +1,25 @@ +import { ICatalogPage } from './ICatalogPage'; +import { IProduct } from './IProduct'; + +export interface IPurchasableOffer +{ + activate(): void; + clubLevel: number; + page: ICatalogPage; + offerId: number; + localizationId: string; + priceInCredits: number; + priceInActivityPoints: number; + activityPointType: number; + giftable: boolean; + product: IProduct; + pricingModel: string; + priceType: string; + bundlePurchaseAllowed: boolean; + isRentOffer: boolean; + badgeCode: string; + localizationName: string; + localizationDescription: string; + isLazy: boolean; + products: IProduct[]; +} diff --git a/Coolui v3 test/src/api/catalog/IPurchaseOptions.ts b/Coolui v3 test/src/api/catalog/IPurchaseOptions.ts new file mode 100644 index 0000000000..c9fab89271 --- /dev/null +++ b/Coolui v3 test/src/api/catalog/IPurchaseOptions.ts @@ -0,0 +1,9 @@ +import { IObjectData } from '@nitrots/nitro-renderer'; + +export interface IPurchaseOptions +{ + quantity?: number; + extraData?: string; + extraParamRequired?: boolean; + previewStuffData?: IObjectData; +} diff --git a/Coolui v3 test/src/api/catalog/MarketplaceOfferData.ts b/Coolui v3 test/src/api/catalog/MarketplaceOfferData.ts new file mode 100644 index 0000000000..ba1fa88bee --- /dev/null +++ b/Coolui v3 test/src/api/catalog/MarketplaceOfferData.ts @@ -0,0 +1,128 @@ +import { IObjectData } from '@nitrots/nitro-renderer'; + +export class MarketplaceOfferData +{ + public static readonly TYPE_FLOOR: number = 1; + public static readonly TYPE_WALL: number = 2; + + private _offerId: number; + private _furniId: number; + private _furniType: number; + private _extraData: string; + private _stuffData: IObjectData; + private _price: number; + private _averagePrice: number; + private _imageCallback: number; + private _status: number; + private _timeLeftMinutes: number = -1; + private _offerCount: number; + private _image: string; + + constructor(offerId: number, furniId: number, furniType: number, extraData: string, stuffData: IObjectData, price: number, status: number, averagePrice: number, offerCount: number = -1) + { + this._offerId = offerId; + this._furniId = furniId; + this._furniType = furniType; + this._extraData = extraData; + this._stuffData = stuffData; + this._price = price; + this._status = status; + this._averagePrice = averagePrice; + this._offerCount = offerCount; + } + + public get offerId(): number + { + return this._offerId; + } + + public set offerId(offerId: number) + { + this._offerId = offerId; + } + + public get furniId(): number + { + return this._furniId; + } + + public get furniType(): number + { + return this._furniType; + } + + public get extraData(): string + { + return this._extraData; + } + + public get stuffData(): IObjectData + { + return this._stuffData; + } + + public get price(): number + { + return this._price; + } + + public set price(price: number) + { + this._price = price; + } + + public get averagePrice(): number + { + return this._averagePrice; + } + + public get image(): string + { + return this._image; + } + + public set image(image: string) + { + this._image = image; + } + + public get imageCallback(): number + { + return this._imageCallback; + } + + public set imageCallback(callback: number) + { + this._imageCallback = callback; + } + + public get status(): number + { + return this._status; + } + + public get timeLeftMinutes(): number + { + return this._timeLeftMinutes; + } + + public set timeLeftMinutes(minutes: number) + { + this._timeLeftMinutes = minutes; + } + + public get offerCount(): number + { + return this._offerCount; + } + + public set offerCount(count: number) + { + this._offerCount = count; + } + + public get isUniqueLimitedItem(): boolean + { + return (this.stuffData && (this.stuffData.uniqueSeries > 0)); + } +} diff --git a/Coolui v3 test/src/api/catalog/MarketplaceOfferState.ts b/Coolui v3 test/src/api/catalog/MarketplaceOfferState.ts new file mode 100644 index 0000000000..6267a5f659 --- /dev/null +++ b/Coolui v3 test/src/api/catalog/MarketplaceOfferState.ts @@ -0,0 +1,7 @@ +export class MarketPlaceOfferState +{ + public static readonly ONGOING = 1; + public static readonly ONGOING_OWN = 1; + public static readonly SOLD = 2; + public static readonly EXPIRED = 3; +} diff --git a/Coolui v3 test/src/api/catalog/MarketplaceSearchType.ts b/Coolui v3 test/src/api/catalog/MarketplaceSearchType.ts new file mode 100644 index 0000000000..ac7a701994 --- /dev/null +++ b/Coolui v3 test/src/api/catalog/MarketplaceSearchType.ts @@ -0,0 +1,6 @@ +export class MarketplaceSearchType +{ + public static readonly BY_ACTIVITY = 1; + public static readonly BY_VALUE = 2; + public static readonly ADVANCED = 3; +} diff --git a/Coolui v3 test/src/api/catalog/Offer.ts b/Coolui v3 test/src/api/catalog/Offer.ts new file mode 100644 index 0000000000..9182c03e7d --- /dev/null +++ b/Coolui v3 test/src/api/catalog/Offer.ts @@ -0,0 +1,245 @@ +import { GetFurnitureData, GetProductDataForLocalization, LocalizeText, ProductTypeEnum } from '..'; +import { ICatalogPage } from './ICatalogPage'; +import { IProduct } from './IProduct'; +import { IPurchasableOffer } from './IPurchasableOffer'; +import { Product } from './Product'; + +export class Offer implements IPurchasableOffer +{ + public static PRICING_MODEL_UNKNOWN: string = 'pricing_model_unknown'; + public static PRICING_MODEL_SINGLE: string = 'pricing_model_single'; + public static PRICING_MODEL_MULTI: string = 'pricing_model_multi'; + public static PRICING_MODEL_BUNDLE: string = 'pricing_model_bundle'; + public static PRICING_MODEL_FURNITURE: string = 'pricing_model_furniture'; + public static PRICE_TYPE_NONE: string = 'price_type_none'; + public static PRICE_TYPE_CREDITS: string = 'price_type_credits'; + public static PRICE_TYPE_ACTIVITYPOINTS: string = 'price_type_activitypoints'; + public static PRICE_TYPE_CREDITS_ACTIVITYPOINTS: string = 'price_type_credits_and_activitypoints'; + + private _pricingModel: string; + private _priceType: string; + private _offerId: number; + private _localizationId: string; + private _priceInCredits: number; + private _priceInActivityPoints: number; + private _activityPointType: number; + private _giftable: boolean; + private _isRentOffer: boolean; + private _page: ICatalogPage; + private _clubLevel: number = 0; + private _products: IProduct[]; + private _badgeCode: string; + private _bundlePurchaseAllowed: boolean = false; + + constructor(offerId: number, localizationId: string, isRentOffer: boolean, priceInCredits: number, priceInActivityPoints: number, activityPointType: number, giftable: boolean, clubLevel: number, products: IProduct[], bundlePurchaseAllowed: boolean) + { + this._offerId = offerId; + this._localizationId = localizationId; + this._isRentOffer = isRentOffer; + this._priceInCredits = priceInCredits; + this._priceInActivityPoints = priceInActivityPoints; + this._activityPointType = activityPointType; + this._giftable = giftable; + this._clubLevel = clubLevel; + this._products = products; + this._bundlePurchaseAllowed = bundlePurchaseAllowed; + + this.setPricingModelForProducts(); + this.setPricingType(); + + for(const product of products) + { + if(product.productType === ProductTypeEnum.BADGE) + { + this._badgeCode = product.extraParam; + + break; + } + } + } + + public activate(): void + { + + } + + public get clubLevel(): number + { + return this._clubLevel; + } + + public get page(): ICatalogPage + { + return this._page; + } + + public set page(k: ICatalogPage) + { + this._page = k; + } + + public get offerId(): number + { + return this._offerId; + } + + public get localizationId(): string + { + return this._localizationId; + } + + public get priceInCredits(): number + { + return this._priceInCredits; + } + + public get priceInActivityPoints(): number + { + return this._priceInActivityPoints; + } + + public get activityPointType(): number + { + return this._activityPointType; + } + + public get giftable(): boolean + { + return this._giftable; + } + + public get product(): IProduct + { + if(!this._products || !this._products.length) return null; + + if(this._products.length === 1) return this._products[0]; + + const products = Product.stripAddonProducts(this._products); + + if(products.length) return products[0]; + + return null; + } + + public get pricingModel(): string + { + return this._pricingModel; + } + + public get priceType(): string + { + return this._priceType; + } + + public get bundlePurchaseAllowed(): boolean + { + return this._bundlePurchaseAllowed; + } + + public get isRentOffer(): boolean + { + return this._isRentOffer; + } + + public get badgeCode(): string + { + return this._badgeCode; + } + + public get localizationName(): string + { + const productData = GetProductDataForLocalization(this._localizationId); + + if(productData) return productData.name; + + return LocalizeText(this._localizationId); + } + + public get localizationDescription(): string + { + const productData = GetProductDataForLocalization(this._localizationId); + + if(productData) return productData.description; + + return LocalizeText(this._localizationId); + } + + public get isLazy(): boolean + { + return false; + } + + public get products(): IProduct[] + { + return this._products; + } + + private setPricingModelForProducts(): void + { + const products = Product.stripAddonProducts(this._products); + + if(products.length === 1) + { + if(products[0].productCount === 1) + { + this._pricingModel = Offer.PRICING_MODEL_SINGLE; + } + else + { + this._pricingModel = Offer.PRICING_MODEL_MULTI; + } + } + + else if(products.length > 1) + { + this._pricingModel = Offer.PRICING_MODEL_BUNDLE; + } + + else + { + this._pricingModel = Offer.PRICING_MODEL_UNKNOWN; + } + } + + private setPricingType(): void + { + if((this._priceInCredits > 0) && (this._priceInActivityPoints > 0)) + { + this._priceType = Offer.PRICE_TYPE_CREDITS_ACTIVITYPOINTS; + } + + else if(this._priceInCredits > 0) + { + this._priceType = Offer.PRICE_TYPE_CREDITS; + } + + else if(this._priceInActivityPoints > 0) + { + this._priceType = Offer.PRICE_TYPE_ACTIVITYPOINTS; + } + + else + { + this._priceType = Offer.PRICE_TYPE_NONE; + } + } + + public clone(): IPurchasableOffer + { + const products: IProduct[] = []; + const productData = GetProductDataForLocalization(this.localizationId); + + for(const product of this._products) + { + const furnitureData = GetFurnitureData(product.productClassId, product.productType); + + products.push(new Product(product.productType, product.productClassId, product.extraParam, product.productCount, productData, furnitureData)); + } + + const offer = new Offer(this.offerId, this.localizationId, this.isRentOffer, this.priceInCredits, this.priceInActivityPoints, this.activityPointType, this.giftable, this.clubLevel, products, this.bundlePurchaseAllowed); + + offer.page = this.page; + + return offer; + } +} diff --git a/Coolui v3 test/src/api/catalog/PageLocalization.ts b/Coolui v3 test/src/api/catalog/PageLocalization.ts new file mode 100644 index 0000000000..f24ae87288 --- /dev/null +++ b/Coolui v3 test/src/api/catalog/PageLocalization.ts @@ -0,0 +1,36 @@ +import { GetConfigurationValue } from '../nitro'; +import { IPageLocalization } from './IPageLocalization'; + +export class PageLocalization implements IPageLocalization +{ + private _images: string[]; + private _texts: string[]; + + constructor(images: string[], texts: string[]) + { + this._images = images; + this._texts = texts; + } + + public getText(index: number): string + { + let message = (this._texts[index] || ''); + + if(message && message.length) message = message.replace(/\r\n|\r|\n/g, '
'); + + return message; + } + + public getImage(index: number): string + { + const imageName = (this._images[index] || ''); + + if(!imageName || !imageName.length) return null; + + let assetUrl = GetConfigurationValue('catalog.asset.image.url'); + + assetUrl = assetUrl.replace('%name%', imageName); + + return assetUrl; + } +} diff --git a/Coolui v3 test/src/api/catalog/PlacedObjectPurchaseData.ts b/Coolui v3 test/src/api/catalog/PlacedObjectPurchaseData.ts new file mode 100644 index 0000000000..43d23e3cd0 --- /dev/null +++ b/Coolui v3 test/src/api/catalog/PlacedObjectPurchaseData.ts @@ -0,0 +1,41 @@ +import { IFurnitureData, IProductData } from '@nitrots/nitro-renderer'; +import { IPurchasableOffer } from './IPurchasableOffer'; + +export class PlacedObjectPurchaseData +{ + constructor( + public readonly roomId: number, + public readonly objectId: number, + public readonly category: number, + public readonly wallLocation: string, + public readonly x: number, + public readonly y: number, + public readonly direction: number, + public readonly offer: IPurchasableOffer) + {} + + public get offerId(): number + { + return this.offer.offerId; + } + + public get productClassId(): number + { + return this.offer.product.productClassId; + } + + public get productData(): IProductData + { + return this.offer.product.productData; + } + + public get furniData(): IFurnitureData + { + return this.offer.product.furnitureData; + } + + public get extraParam(): string + { + return this.offer.product.extraParam; + } +} diff --git a/Coolui v3 test/src/api/catalog/Product.ts b/Coolui v3 test/src/api/catalog/Product.ts new file mode 100644 index 0000000000..17d9340f16 --- /dev/null +++ b/Coolui v3 test/src/api/catalog/Product.ts @@ -0,0 +1,143 @@ +import { GetRoomEngine, GetSessionDataManager, IFurnitureData, IObjectData, IProductData } from '@nitrots/nitro-renderer'; +import { GetConfigurationValue } from '../nitro'; +import { GetPixelEffectIcon, GetSubscriptionProductIcon } from './CatalogUtilities'; +import { IProduct } from './IProduct'; +import { IPurchasableOffer } from './IPurchasableOffer'; +import { ProductTypeEnum } from './ProductTypeEnum'; + +export class Product implements IProduct +{ + public static EFFECT_CLASSID_NINJA_DISAPPEAR: number = 108; + + private _productType: string; + private _productClassId: number; + private _extraParam: string; + private _productCount: number; + private _productData: IProductData; + private _furnitureData: IFurnitureData; + private _isUniqueLimitedItem: boolean; + private _uniqueLimitedItemSeriesSize: number; + private _uniqueLimitedItemsLeft: number; + + constructor(productType: string, productClassId: number, extraParam: string, productCount: number, productData: IProductData, furnitureData: IFurnitureData, isUniqueLimitedItem: boolean = false, uniqueLimitedItemSeriesSize: number = 0, uniqueLimitedItemsLeft: number = 0) + { + this._productType = productType.toLowerCase(); + this._productClassId = productClassId; + this._extraParam = extraParam; + this._productCount = productCount; + this._productData = productData; + this._furnitureData = furnitureData; + this._isUniqueLimitedItem = isUniqueLimitedItem; + this._uniqueLimitedItemSeriesSize = uniqueLimitedItemSeriesSize; + this._uniqueLimitedItemsLeft = uniqueLimitedItemsLeft; + } + + public static stripAddonProducts(products: IProduct[]): IProduct[] + { + if(products.length === 1) return products; + + return products.filter(product => ((product.productType !== ProductTypeEnum.BADGE) && (product.productType !== ProductTypeEnum.EFFECT) && (product.productClassId !== Product.EFFECT_CLASSID_NINJA_DISAPPEAR))); + } + + public getIconUrl(offer: IPurchasableOffer = null, stuffData: IObjectData = null): string + { + switch(this._productType) + { + case ProductTypeEnum.FLOOR: + return GetRoomEngine().getFurnitureFloorIconUrl(this.productClassId); + case ProductTypeEnum.WALL: { + if(offer && this._furnitureData) + { + let iconName = ''; + + switch(this._furnitureData.className) + { + case 'floor': + iconName = [ 'th', this._furnitureData.className, offer.product.extraParam ].join('_'); + break; + case 'wallpaper': + iconName = [ 'th', 'wall', offer.product.extraParam ].join('_'); + break; + case 'landscape': + iconName = [ 'th', this._furnitureData.className, (offer.product.extraParam || '').replace('.', '_'), '001' ].join('_'); + break; + } + + if(iconName !== '') + { + const assetUrl = GetConfigurationValue('catalog.asset.url'); + + return `${ assetUrl }/${ iconName }.png`; + } + } + + return GetRoomEngine().getFurnitureWallIconUrl(this.productClassId, this._extraParam); + } + case ProductTypeEnum.EFFECT: + return GetPixelEffectIcon(this.productClassId); + case ProductTypeEnum.HABBO_CLUB: + return GetSubscriptionProductIcon(this.productClassId); + case ProductTypeEnum.BADGE: + return GetSessionDataManager().getBadgeUrl(this._extraParam); + case ProductTypeEnum.ROBOT: + return null; + } + + return null; + } + + public get productType(): string + { + return this._productType; + } + + public get productClassId(): number + { + return this._productClassId; + } + + public get extraParam(): string + { + return this._extraParam; + } + + public set extraParam(extraParam: string) + { + this._extraParam = extraParam; + } + + public get productCount(): number + { + return this._productCount; + } + + public get productData(): IProductData + { + return this._productData; + } + + public get furnitureData(): IFurnitureData + { + return this._furnitureData; + } + + public get isUniqueLimitedItem(): boolean + { + return this._isUniqueLimitedItem; + } + + public get uniqueLimitedItemSeriesSize(): number + { + return this._uniqueLimitedItemSeriesSize; + } + + public get uniqueLimitedItemsLeft(): number + { + return this._uniqueLimitedItemsLeft; + } + + public set uniqueLimitedItemsLeft(uniqueLimitedItemsLeft: number) + { + this._uniqueLimitedItemsLeft = uniqueLimitedItemsLeft; + } +} diff --git a/Coolui v3 test/src/api/catalog/ProductTypeEnum.ts b/Coolui v3 test/src/api/catalog/ProductTypeEnum.ts new file mode 100644 index 0000000000..f24908163c --- /dev/null +++ b/Coolui v3 test/src/api/catalog/ProductTypeEnum.ts @@ -0,0 +1,11 @@ +export class ProductTypeEnum +{ + public static WALL: string = 'i'; + public static FLOOR: string = 's'; + public static EFFECT: string = 'e'; + public static HABBO_CLUB: string = 'h'; + public static BADGE: string = 'b'; + public static GAME_TOKEN: string = 'GAME_TOKEN'; + public static PET: string = 'p'; + public static ROBOT: string = 'r'; +} diff --git a/Coolui v3 test/src/api/catalog/RequestedPage.ts b/Coolui v3 test/src/api/catalog/RequestedPage.ts new file mode 100644 index 0000000000..205cc3e207 --- /dev/null +++ b/Coolui v3 test/src/api/catalog/RequestedPage.ts @@ -0,0 +1,63 @@ +export class RequestedPage +{ + public static REQUEST_TYPE_NONE: number = 0; + public static REQUEST_TYPE_ID: number = 1; + public static REQUEST_TYPE_OFFER: number = 2; + public static REQUEST_TYPE_NAME: number = 3; + + private _requestType: number; + private _requestById: number; + private _requestedByOfferId: number; + private _requestByName: string; + + constructor() + { + this._requestType = RequestedPage.REQUEST_TYPE_NONE; + } + + public resetRequest():void + { + this._requestType = RequestedPage.REQUEST_TYPE_NONE; + this._requestById = -1; + this._requestedByOfferId = -1; + this._requestByName = null; + } + + public get requestType(): number + { + return this._requestType; + } + + public get requestById(): number + { + return this._requestById; + } + + public set requestById(id: number) + { + this._requestType = RequestedPage.REQUEST_TYPE_ID; + this._requestById = id; + } + + public get requestedByOfferId(): number + { + return this._requestedByOfferId; + } + + public set requestedByOfferId(offerId: number) + { + this._requestType = RequestedPage.REQUEST_TYPE_OFFER; + this._requestedByOfferId = offerId; + } + + public get requestByName(): string + { + return this._requestByName; + } + + public set requestByName(name: string) + { + this._requestType = RequestedPage.REQUEST_TYPE_NAME; + this._requestByName = name; + } +} diff --git a/Coolui v3 test/src/api/catalog/SearchResult.ts b/Coolui v3 test/src/api/catalog/SearchResult.ts new file mode 100644 index 0000000000..120aed4b3f --- /dev/null +++ b/Coolui v3 test/src/api/catalog/SearchResult.ts @@ -0,0 +1,11 @@ +import { ICatalogNode } from './ICatalogNode'; +import { IPurchasableOffer } from './IPurchasableOffer'; + +export class SearchResult +{ + constructor( + public readonly searchValue: string, + public readonly offers: IPurchasableOffer[], + public readonly filteredNodes: ICatalogNode[]) + {} +} diff --git a/Coolui v3 test/src/api/catalog/index.ts b/Coolui v3 test/src/api/catalog/index.ts new file mode 100644 index 0000000000..6c5b9e2ea9 --- /dev/null +++ b/Coolui v3 test/src/api/catalog/index.ts @@ -0,0 +1,29 @@ +export * from './BuilderFurniPlaceableStatus'; +export * from './CatalogNode'; +export * from './CatalogPage'; +export * from './CatalogPageName'; +export * from './CatalogPetPalette'; +export * from './CatalogPurchaseState'; +export * from './CatalogType'; +export * from './CatalogUtilities'; +export * from './FurnitureOffer'; +export * from './GetImageIconUrlForProduct'; +export * from './GiftWrappingConfiguration'; +export * from './ICatalogNode'; +export * from './ICatalogOptions'; +export * from './ICatalogPage'; +export * from './IMarketplaceSearchOptions'; +export * from './IPageLocalization'; +export * from './IProduct'; +export * from './IPurchasableOffer'; +export * from './IPurchaseOptions'; +export * from './MarketplaceOfferData'; +export * from './MarketplaceOfferState'; +export * from './MarketplaceSearchType'; +export * from './Offer'; +export * from './PageLocalization'; +export * from './PlacedObjectPurchaseData'; +export * from './Product'; +export * from './ProductTypeEnum'; +export * from './RequestedPage'; +export * from './SearchResult'; diff --git a/Coolui v3 test/src/api/chat-history/ChatEntryType.ts b/Coolui v3 test/src/api/chat-history/ChatEntryType.ts new file mode 100644 index 0000000000..045f00ce94 --- /dev/null +++ b/Coolui v3 test/src/api/chat-history/ChatEntryType.ts @@ -0,0 +1,6 @@ +export class ChatEntryType +{ + public static TYPE_CHAT = 1; + public static TYPE_ROOM_INFO = 2; + public static TYPE_IM = 3; +} diff --git a/Coolui v3 test/src/api/chat-history/ChatHistoryCurrentDate.ts b/Coolui v3 test/src/api/chat-history/ChatHistoryCurrentDate.ts new file mode 100644 index 0000000000..35d6143fda --- /dev/null +++ b/Coolui v3 test/src/api/chat-history/ChatHistoryCurrentDate.ts @@ -0,0 +1,6 @@ +export const ChatHistoryCurrentDate = () => +{ + const currentTime = new Date(); + + return `${ currentTime.getHours().toString().padStart(2, '0') }:${ currentTime.getMinutes().toString().padStart(2, '0') }`; +}; diff --git a/Coolui v3 test/src/api/chat-history/IChatEntry.ts b/Coolui v3 test/src/api/chat-history/IChatEntry.ts new file mode 100644 index 0000000000..1bf7a52068 --- /dev/null +++ b/Coolui v3 test/src/api/chat-history/IChatEntry.ts @@ -0,0 +1,17 @@ +export interface IChatEntry +{ + id: number; + webId: number; + entityId: number; + name: string; + look?: string; + message?: string; + entityType?: number; + style?: number; + chatType?: number; + imageUrl?: string; + color?: string; + roomId: number; + timestamp: string; + type: number; +} diff --git a/Coolui v3 test/src/api/chat-history/IRoomHistoryEntry.ts b/Coolui v3 test/src/api/chat-history/IRoomHistoryEntry.ts new file mode 100644 index 0000000000..4986154a12 --- /dev/null +++ b/Coolui v3 test/src/api/chat-history/IRoomHistoryEntry.ts @@ -0,0 +1,5 @@ +export interface IRoomHistoryEntry +{ + id: number; + name: string; +} diff --git a/Coolui v3 test/src/api/chat-history/MessengerHistoryCurrentDate.ts b/Coolui v3 test/src/api/chat-history/MessengerHistoryCurrentDate.ts new file mode 100644 index 0000000000..b5f7972513 --- /dev/null +++ b/Coolui v3 test/src/api/chat-history/MessengerHistoryCurrentDate.ts @@ -0,0 +1,6 @@ +export const MessengerHistoryCurrentDate = (secondsSinceNow: number = 0) => +{ + const currentTime = secondsSinceNow ? new Date(Date.now() - secondsSinceNow * 1000) : new Date(); + + return `${ currentTime.getHours().toString().padStart(2, '0') }:${ currentTime.getMinutes().toString().padStart(2, '0') }`; +}; diff --git a/Coolui v3 test/src/api/chat-history/index.ts b/Coolui v3 test/src/api/chat-history/index.ts new file mode 100644 index 0000000000..a9893744bb --- /dev/null +++ b/Coolui v3 test/src/api/chat-history/index.ts @@ -0,0 +1,5 @@ +export * from './ChatEntryType'; +export * from './ChatHistoryCurrentDate'; +export * from './IChatEntry'; +export * from './IRoomHistoryEntry'; +export * from './MessengerHistoryCurrentDate'; diff --git a/Coolui v3 test/src/api/events/DispatchEvent.ts b/Coolui v3 test/src/api/events/DispatchEvent.ts new file mode 100644 index 0000000000..79e2f5ce31 --- /dev/null +++ b/Coolui v3 test/src/api/events/DispatchEvent.ts @@ -0,0 +1,3 @@ +import { IEventDispatcher, NitroEvent } from '@nitrots/nitro-renderer'; + +export const DispatchEvent = (eventDispatcher: IEventDispatcher, event: NitroEvent) => eventDispatcher.dispatchEvent(event); diff --git a/Coolui v3 test/src/api/events/DispatchMainEvent.ts b/Coolui v3 test/src/api/events/DispatchMainEvent.ts new file mode 100644 index 0000000000..e316b30971 --- /dev/null +++ b/Coolui v3 test/src/api/events/DispatchMainEvent.ts @@ -0,0 +1,4 @@ +import { GetEventDispatcher, NitroEvent } from '@nitrots/nitro-renderer'; +import { DispatchEvent } from './DispatchEvent'; + +export const DispatchMainEvent = (event: NitroEvent) => DispatchEvent(GetEventDispatcher(), event); diff --git a/Coolui v3 test/src/api/events/DispatchUiEvent.ts b/Coolui v3 test/src/api/events/DispatchUiEvent.ts new file mode 100644 index 0000000000..5200bb4ff8 --- /dev/null +++ b/Coolui v3 test/src/api/events/DispatchUiEvent.ts @@ -0,0 +1,5 @@ +import { NitroEvent } from '@nitrots/nitro-renderer'; +import { DispatchEvent } from './DispatchEvent'; +import { UI_EVENT_DISPATCHER } from './UI_EVENT_DISPATCHER'; + +export const DispatchUiEvent = (event: NitroEvent) => DispatchEvent(UI_EVENT_DISPATCHER, event); diff --git a/Coolui v3 test/src/api/events/UI_EVENT_DISPATCHER.ts b/Coolui v3 test/src/api/events/UI_EVENT_DISPATCHER.ts new file mode 100644 index 0000000000..cb573117d0 --- /dev/null +++ b/Coolui v3 test/src/api/events/UI_EVENT_DISPATCHER.ts @@ -0,0 +1,3 @@ +import { EventDispatcher, IEventDispatcher } from '@nitrots/nitro-renderer'; + +export const UI_EVENT_DISPATCHER: IEventDispatcher = new EventDispatcher(); diff --git a/Coolui v3 test/src/api/events/index.ts b/Coolui v3 test/src/api/events/index.ts new file mode 100644 index 0000000000..b7c22ee5aa --- /dev/null +++ b/Coolui v3 test/src/api/events/index.ts @@ -0,0 +1,4 @@ +export * from './DispatchEvent'; +export * from './DispatchMainEvent'; +export * from './DispatchUiEvent'; +export * from './UI_EVENT_DISPATCHER'; diff --git a/Coolui v3 test/src/api/friends/GetGroupChatData.ts b/Coolui v3 test/src/api/friends/GetGroupChatData.ts new file mode 100644 index 0000000000..d1a2c7b978 --- /dev/null +++ b/Coolui v3 test/src/api/friends/GetGroupChatData.ts @@ -0,0 +1,13 @@ +import { IGroupChatData } from './IGroupChatData'; + +export const GetGroupChatData = (extraData: string) => +{ + if(!extraData || !extraData.length) return null; + + const splitData = extraData.split('/'); + const username = splitData[0]; + const figure = splitData[1]; + const userId = parseInt(splitData[2]); + + return ({ username: username, figure: figure, userId: userId } as IGroupChatData); +}; diff --git a/Coolui v3 test/src/api/friends/IGroupChatData.ts b/Coolui v3 test/src/api/friends/IGroupChatData.ts new file mode 100644 index 0000000000..24a3f9cf4b --- /dev/null +++ b/Coolui v3 test/src/api/friends/IGroupChatData.ts @@ -0,0 +1,6 @@ +export interface IGroupChatData +{ + username: string; + figure: string; + userId: number; +} diff --git a/Coolui v3 test/src/api/friends/MessengerFriend.ts b/Coolui v3 test/src/api/friends/MessengerFriend.ts new file mode 100644 index 0000000000..b5cfc88736 --- /dev/null +++ b/Coolui v3 test/src/api/friends/MessengerFriend.ts @@ -0,0 +1,43 @@ +import { FriendParser } from '@nitrots/nitro-renderer'; + +export class MessengerFriend +{ + public static RELATIONSHIP_NONE: number = 0; + public static RELATIONSHIP_HEART: number = 1; + public static RELATIONSHIP_SMILE: number = 2; + public static RELATIONSHIP_BOBBA: number = 3; + + public id: number = -1; + public name: string = null; + public gender: number = 0; + public online: boolean = false; + public followingAllowed: boolean = false; + public figure: string = null; + public categoryId: number = 0; + public motto: string = null; + public realName: string = null; + public lastAccess: string = null; + public persistedMessageUser: boolean = false; + public vipMember: boolean = false; + public pocketHabboUser: boolean = false; + public relationshipStatus: number = -1; + public unread: number = 0; + + public populate(parser: FriendParser): void + { + this.id = parser.id; + this.name = parser.name; + this.gender = parser.gender; + this.online = parser.online; + this.followingAllowed = parser.followingAllowed; + this.figure = parser.figure; + this.categoryId = parser.categoryId; + this.motto = parser.motto; + this.realName = parser.realName; + this.lastAccess = parser.lastAccess; + this.persistedMessageUser = parser.persistedMessageUser; + this.vipMember = parser.vipMember; + this.pocketHabboUser = parser.pocketHabboUser; + this.relationshipStatus = parser.relationshipStatus; + } +} diff --git a/Coolui v3 test/src/api/friends/MessengerGroupType.ts b/Coolui v3 test/src/api/friends/MessengerGroupType.ts new file mode 100644 index 0000000000..d46a1b6300 --- /dev/null +++ b/Coolui v3 test/src/api/friends/MessengerGroupType.ts @@ -0,0 +1,5 @@ +export class MessengerGroupType +{ + public static readonly GROUP_CHAT = 0; + public static readonly PRIVATE_CHAT = 1; +} diff --git a/Coolui v3 test/src/api/friends/MessengerIconState.ts b/Coolui v3 test/src/api/friends/MessengerIconState.ts new file mode 100644 index 0000000000..63f8c133c5 --- /dev/null +++ b/Coolui v3 test/src/api/friends/MessengerIconState.ts @@ -0,0 +1,6 @@ +export class MessengerIconState +{ + public static HIDDEN: number = 0; + public static SHOW: number = 1; + public static UNREAD: number = 2; +} diff --git a/Coolui v3 test/src/api/friends/MessengerRequest.ts b/Coolui v3 test/src/api/friends/MessengerRequest.ts new file mode 100644 index 0000000000..89ceec5be4 --- /dev/null +++ b/Coolui v3 test/src/api/friends/MessengerRequest.ts @@ -0,0 +1,41 @@ +import { FriendRequestData } from '@nitrots/nitro-renderer'; + +export class MessengerRequest +{ + private _id: number; + private _name: string; + private _requesterUserId: number; + private _figureString: string; + + public populate(data: FriendRequestData): boolean + { + if(!data) return false; + + this._id = data.requestId; + this._name = data.requesterName; + this._figureString = data.figureString; + this._requesterUserId = data.requesterUserId; + + return true; + } + + public get id(): number + { + return this._id; + } + + public get name(): string + { + return this._name; + } + + public get requesterUserId(): number + { + return this._requesterUserId; + } + + public get figureString(): string + { + return this._figureString; + } +} diff --git a/Coolui v3 test/src/api/friends/MessengerSettings.ts b/Coolui v3 test/src/api/friends/MessengerSettings.ts new file mode 100644 index 0000000000..e890fcc027 --- /dev/null +++ b/Coolui v3 test/src/api/friends/MessengerSettings.ts @@ -0,0 +1,11 @@ +import { FriendCategoryData } from '@nitrots/nitro-renderer'; + +export class MessengerSettings +{ + constructor( + public userFriendLimit: number = 0, + public normalFriendLimit: number = 0, + public extendedFriendLimit: number = 0, + public categories: FriendCategoryData[] = []) + {} +} diff --git a/Coolui v3 test/src/api/friends/MessengerThread.ts b/Coolui v3 test/src/api/friends/MessengerThread.ts new file mode 100644 index 0000000000..30e931c4b3 --- /dev/null +++ b/Coolui v3 test/src/api/friends/MessengerThread.ts @@ -0,0 +1,96 @@ +import { GetGroupChatData } from './GetGroupChatData'; +import { MessengerFriend } from './MessengerFriend'; +import { MessengerGroupType } from './MessengerGroupType'; +import { MessengerThreadChat } from './MessengerThreadChat'; +import { MessengerThreadChatGroup } from './MessengerThreadChatGroup'; + +export class MessengerThread +{ + public static MESSAGE_RECEIVED: string = 'MT_MESSAGE_RECEIVED'; + public static THREAD_ID: number = 0; + + private _threadId: number; + private _participant: MessengerFriend; + private _groups: MessengerThreadChatGroup[]; + private _lastUpdated: Date; + private _unreadCount: number; + + constructor(participant: MessengerFriend) + { + this._threadId = ++MessengerThread.THREAD_ID; + this._participant = participant; + this._groups = []; + this._lastUpdated = new Date(); + this._unreadCount = 0; + } + + public addMessage(senderId: number, message: string, secondsSinceSent: number = 0, extraData: string = null, type: number = 0): MessengerThreadChat + { + const isGroupChat = (senderId < 0 && extraData); + const userId = isGroupChat ? GetGroupChatData(extraData).userId : senderId; + + const group = this.getLastGroup(userId); + + if(!group) return; + + if(isGroupChat) group.type = MessengerGroupType.GROUP_CHAT; + + const chat = new MessengerThreadChat(senderId, message, secondsSinceSent, extraData, type); + + group.addChat(chat); + + this._lastUpdated = new Date(); + + this._unreadCount++; + + return chat; + } + + private getLastGroup(userId: number): MessengerThreadChatGroup + { + let group = this._groups[(this._groups.length - 1)]; + + if(group && (group.userId === userId)) return group; + + group = new MessengerThreadChatGroup(userId); + + this._groups.push(group); + + return group; + } + + public setRead(): void + { + this._unreadCount = 0; + } + + public get threadId(): number + { + return this._threadId; + } + + public get participant(): MessengerFriend + { + return this._participant; + } + + public get groups(): MessengerThreadChatGroup[] + { + return this._groups; + } + + public get lastUpdated(): Date + { + return this._lastUpdated; + } + + public get unreadCount(): number + { + return this._unreadCount; + } + + public get unread(): boolean + { + return (this._unreadCount > 0); + } +} diff --git a/Coolui v3 test/src/api/friends/MessengerThreadChat.ts b/Coolui v3 test/src/api/friends/MessengerThreadChat.ts new file mode 100644 index 0000000000..2927feccbd --- /dev/null +++ b/Coolui v3 test/src/api/friends/MessengerThreadChat.ts @@ -0,0 +1,54 @@ +export class MessengerThreadChat +{ + public static CHAT: number = 0; + public static ROOM_INVITE: number = 1; + public static STATUS_NOTIFICATION: number = 2; + public static SECURITY_NOTIFICATION: number = 3; + + private _type: number; + private _senderId: number; + private _message: string; + private _secondsSinceSent: number; + private _extraData: string; + private _date: Date; + + constructor(senderId: number, message: string, secondsSinceSent: number = 0, extraData: string = null, type: number = 0) + { + this._type = type; + this._senderId = senderId; + this._message = message; + this._secondsSinceSent = secondsSinceSent; + this._extraData = extraData; + this._date = new Date(); + } + + public get type(): number + { + return this._type; + } + + public get senderId(): number + { + return this._senderId; + } + + public get message(): string + { + return this._message; + } + + public get secondsSinceSent(): number + { + return this._secondsSinceSent; + } + + public get extraData(): string + { + return this._extraData; + } + + public get date(): Date + { + return this._date; + } +} diff --git a/Coolui v3 test/src/api/friends/MessengerThreadChatGroup.ts b/Coolui v3 test/src/api/friends/MessengerThreadChatGroup.ts new file mode 100644 index 0000000000..1668aedce8 --- /dev/null +++ b/Coolui v3 test/src/api/friends/MessengerThreadChatGroup.ts @@ -0,0 +1,41 @@ +import { MessengerGroupType } from './MessengerGroupType'; +import { MessengerThreadChat } from './MessengerThreadChat'; + +export class MessengerThreadChatGroup +{ + private _userId: number; + private _chats: MessengerThreadChat[]; + private _type: number; + + constructor(userId: number, type = MessengerGroupType.PRIVATE_CHAT) + { + this._userId = userId; + this._chats = []; + this._type = type; + } + + public addChat(message: MessengerThreadChat): void + { + this._chats.push(message); + } + + public get userId(): number + { + return this._userId; + } + + public get chats(): MessengerThreadChat[] + { + return this._chats; + } + + public get type(): number + { + return this._type; + } + + public set type(type: number) + { + this._type = type; + } +} diff --git a/Coolui v3 test/src/api/friends/OpenMessengerChat.ts b/Coolui v3 test/src/api/friends/OpenMessengerChat.ts new file mode 100644 index 0000000000..6050f2f1ff --- /dev/null +++ b/Coolui v3 test/src/api/friends/OpenMessengerChat.ts @@ -0,0 +1,7 @@ +import { CreateLinkEvent } from '@nitrots/nitro-renderer'; + +export function OpenMessengerChat(friendId: number = 0): void +{ + if(friendId === 0) CreateLinkEvent('friends-messenger/toggle'); + else CreateLinkEvent(`friends-messenger/${ friendId }`); +} diff --git a/Coolui v3 test/src/api/friends/index.ts b/Coolui v3 test/src/api/friends/index.ts new file mode 100644 index 0000000000..ce1ed60a0a --- /dev/null +++ b/Coolui v3 test/src/api/friends/index.ts @@ -0,0 +1,11 @@ +export * from './GetGroupChatData'; +export * from './IGroupChatData'; +export * from './MessengerFriend'; +export * from './MessengerGroupType'; +export * from './MessengerIconState'; +export * from './MessengerRequest'; +export * from './MessengerSettings'; +export * from './MessengerThread'; +export * from './MessengerThreadChat'; +export * from './MessengerThreadChatGroup'; +export * from './OpenMessengerChat'; diff --git a/Coolui v3 test/src/api/groups/GetGroupInformation.ts b/Coolui v3 test/src/api/groups/GetGroupInformation.ts new file mode 100644 index 0000000000..14fe326757 --- /dev/null +++ b/Coolui v3 test/src/api/groups/GetGroupInformation.ts @@ -0,0 +1,7 @@ +import { GroupInformationComposer } from '@nitrots/nitro-renderer'; +import { SendMessageComposer } from '../nitro'; + +export function GetGroupInformation(groupId: number): void +{ + SendMessageComposer(new GroupInformationComposer(groupId, true)); +} diff --git a/Coolui v3 test/src/api/groups/GetGroupManager.ts b/Coolui v3 test/src/api/groups/GetGroupManager.ts new file mode 100644 index 0000000000..2044a45a9f --- /dev/null +++ b/Coolui v3 test/src/api/groups/GetGroupManager.ts @@ -0,0 +1,6 @@ +import { CreateLinkEvent } from '@nitrots/nitro-renderer'; + +export function GetGroupManager(groupId: number): void +{ + CreateLinkEvent(`groups/manage/${ groupId }`); +} diff --git a/Coolui v3 test/src/api/groups/GetGroupMembers.ts b/Coolui v3 test/src/api/groups/GetGroupMembers.ts new file mode 100644 index 0000000000..9e10b0101b --- /dev/null +++ b/Coolui v3 test/src/api/groups/GetGroupMembers.ts @@ -0,0 +1,7 @@ +import { CreateLinkEvent } from '@nitrots/nitro-renderer'; + +export function GetGroupMembers(groupId: number, levelId?: number): void +{ + if(!levelId) CreateLinkEvent(`group-members/${ groupId }`); + else CreateLinkEvent(`group-members/${ groupId }/${ levelId }`); +} diff --git a/Coolui v3 test/src/api/groups/GroupBadgePart.ts b/Coolui v3 test/src/api/groups/GroupBadgePart.ts new file mode 100644 index 0000000000..bb6f5e70a9 --- /dev/null +++ b/Coolui v3 test/src/api/groups/GroupBadgePart.ts @@ -0,0 +1,30 @@ +export class GroupBadgePart +{ + public static BASE: string = 'b'; + public static SYMBOL: string = 's'; + + public type: string; + public key: number; + public color: number; + public position: number; + + constructor(type: string, key?: number, color?: number, position?: number) + { + this.type = type; + this.key = key ? key : 0; + this.color = color ? color : 0; + this.position = position ? position : 4; + } + + public get code(): string + { + if((this.key === 0) && (this.type !== GroupBadgePart.BASE)) return null; + + return GroupBadgePart.getCode(this.type, this.key, this.color, this.position); + } + + public static getCode(type: string, key: number, color: number, position: number): string + { + return type + (key < 10 ? '0' : '') + key + (color < 10 ? '0' : '') + color + position; + } +} diff --git a/Coolui v3 test/src/api/groups/GroupMembershipType.ts b/Coolui v3 test/src/api/groups/GroupMembershipType.ts new file mode 100644 index 0000000000..532c836411 --- /dev/null +++ b/Coolui v3 test/src/api/groups/GroupMembershipType.ts @@ -0,0 +1,6 @@ +export class GroupMembershipType +{ + public static NOT_MEMBER: number = 0; + public static MEMBER: number = 1; + public static REQUEST_PENDING: number = 2; +} diff --git a/Coolui v3 test/src/api/groups/GroupType.ts b/Coolui v3 test/src/api/groups/GroupType.ts new file mode 100644 index 0000000000..744c6c6dae --- /dev/null +++ b/Coolui v3 test/src/api/groups/GroupType.ts @@ -0,0 +1,6 @@ +export class GroupType +{ + public static REGULAR: number = 0; + public static EXCLUSIVE: number = 1; + public static PRIVATE: number = 2; +} diff --git a/Coolui v3 test/src/api/groups/IGroupCustomize.ts b/Coolui v3 test/src/api/groups/IGroupCustomize.ts new file mode 100644 index 0000000000..44fc4ff3e9 --- /dev/null +++ b/Coolui v3 test/src/api/groups/IGroupCustomize.ts @@ -0,0 +1,8 @@ +export interface IGroupCustomize +{ + badgeBases: { id: number, images: string[] }[]; + badgeSymbols: { id: number, images: string[] }[]; + badgePartColors: { id: number, color: string }[]; + groupColorsA: { id: number, color: string }[]; + groupColorsB: { id: number, color: string }[]; +} diff --git a/Coolui v3 test/src/api/groups/IGroupData.ts b/Coolui v3 test/src/api/groups/IGroupData.ts new file mode 100644 index 0000000000..bb65b4912a --- /dev/null +++ b/Coolui v3 test/src/api/groups/IGroupData.ts @@ -0,0 +1,13 @@ +import { GroupBadgePart } from './GroupBadgePart'; + +export interface IGroupData +{ + groupId: number; + groupName: string; + groupDescription: string; + groupHomeroomId: number; + groupState: number; + groupCanMembersDecorate: boolean; + groupColors: number[]; + groupBadgeParts: GroupBadgePart[]; +} diff --git a/Coolui v3 test/src/api/groups/ToggleFavoriteGroup.ts b/Coolui v3 test/src/api/groups/ToggleFavoriteGroup.ts new file mode 100644 index 0000000000..82385d4fcb --- /dev/null +++ b/Coolui v3 test/src/api/groups/ToggleFavoriteGroup.ts @@ -0,0 +1,7 @@ +import { GroupFavoriteComposer, GroupUnfavoriteComposer, HabboGroupEntryData } from '@nitrots/nitro-renderer'; +import { SendMessageComposer } from '../nitro'; + +export const ToggleFavoriteGroup = (group: HabboGroupEntryData) => +{ + SendMessageComposer(group.favourite ? new GroupUnfavoriteComposer(group.groupId) : new GroupFavoriteComposer(group.groupId)); +}; diff --git a/Coolui v3 test/src/api/groups/TryJoinGroup.ts b/Coolui v3 test/src/api/groups/TryJoinGroup.ts new file mode 100644 index 0000000000..63959bf4e2 --- /dev/null +++ b/Coolui v3 test/src/api/groups/TryJoinGroup.ts @@ -0,0 +1,4 @@ +import { GroupJoinComposer } from '@nitrots/nitro-renderer'; +import { SendMessageComposer } from '../nitro'; + +export const TryJoinGroup = (groupId: number) => SendMessageComposer(new GroupJoinComposer(groupId)); diff --git a/Coolui v3 test/src/api/groups/index.ts b/Coolui v3 test/src/api/groups/index.ts new file mode 100644 index 0000000000..4842948b34 --- /dev/null +++ b/Coolui v3 test/src/api/groups/index.ts @@ -0,0 +1,10 @@ +export * from './GetGroupInformation'; +export * from './GetGroupManager'; +export * from './GetGroupMembers'; +export * from './GroupBadgePart'; +export * from './GroupMembershipType'; +export * from './GroupType'; +export * from './IGroupCustomize'; +export * from './IGroupData'; +export * from './ToggleFavoriteGroup'; +export * from './TryJoinGroup'; diff --git a/Coolui v3 test/src/api/guide-tool/GuideSessionState.ts b/Coolui v3 test/src/api/guide-tool/GuideSessionState.ts new file mode 100644 index 0000000000..c5e24f3753 --- /dev/null +++ b/Coolui v3 test/src/api/guide-tool/GuideSessionState.ts @@ -0,0 +1,23 @@ +export class GuideSessionState +{ + public static readonly NONE: string = 'NONE'; + public static readonly ERROR: string = 'ERROR'; + public static readonly REJECTED: string = 'REJECTED'; + public static readonly USER_CREATE: string = 'USER_CREATE'; + public static readonly USER_PENDING: string = 'USER_PENDING'; + public static readonly USER_ONGOING: string = 'USER_ONGOING'; + public static readonly USER_FEEDBACK: string = 'USER_FEEDBACK'; + public static readonly USER_NO_HELPERS: string = 'USER_NO_HELPERS'; + public static readonly USER_SOMETHING_WRONG: string = 'USER_SOMETHING_WRONG'; + public static readonly USER_THANKS: string = 'USER_THANKS'; + public static readonly USER_GUIDE_DISCONNECTED: string = 'USER_GUIDE_DISCONNECTED'; + public static readonly GUIDE_TOOL_MENU: string = 'GUIDE_TOOL_MENU'; + public static readonly GUIDE_ACCEPT: string = 'GUIDE_ACCEPT'; + public static readonly GUIDE_ONGOING: string = 'GUIDE_ONGOING'; + public static readonly GUIDE_CLOSED: string = 'GUIDE_CLOSED'; + public static readonly GUARDIAN_CHAT_REVIEW_ACCEPT: string = 'GUARDIAN_CHAT_REVIEW_ACCEPT'; + public static readonly GUARDIAN_CHAT_REVIEW_WAIT_FOR_VOTERS: string = 'GUARDIAN_CHAT_REVIEW_WAIT_FOR_VOTERS'; + public static readonly GUARDIAN_CHAT_REVIEW_VOTE: string = 'GUARDIAN_CHAT_REVIEW_VOTE'; + public static readonly GUARDIAN_CHAT_REVIEW_WAIT_FOR_RESULTS: string = 'GUARDIAN_CHAT_REVIEW_WAIT_FOR_RESULTS'; + public static readonly GUARDIAN_CHAT_REVIEW_RESULTS: string = 'GUARDIAN_CHAT_REVIEW_RESULTS'; +} diff --git a/Coolui v3 test/src/api/guide-tool/GuideToolMessage.ts b/Coolui v3 test/src/api/guide-tool/GuideToolMessage.ts new file mode 100644 index 0000000000..3ed87be5de --- /dev/null +++ b/Coolui v3 test/src/api/guide-tool/GuideToolMessage.ts @@ -0,0 +1,21 @@ +export class GuideToolMessage +{ + private _message: string; + private _roomId: number; + + constructor(message: string, roomId?: number) + { + this._message = message; + this._roomId = roomId; + } + + public get message(): string + { + return this._message; + } + + public get roomId(): number + { + return this._roomId; + } +} diff --git a/Coolui v3 test/src/api/guide-tool/GuideToolMessageGroup.ts b/Coolui v3 test/src/api/guide-tool/GuideToolMessageGroup.ts new file mode 100644 index 0000000000..bf03c9b9ea --- /dev/null +++ b/Coolui v3 test/src/api/guide-tool/GuideToolMessageGroup.ts @@ -0,0 +1,28 @@ +import { GuideToolMessage } from './GuideToolMessage'; + +export class GuideToolMessageGroup +{ + private _userId: number; + private _messages: GuideToolMessage[]; + + constructor(userId: number) + { + this._userId = userId; + this._messages = []; + } + + public addChat(message: GuideToolMessage): void + { + this._messages.push(message); + } + + public get userId(): number + { + return this._userId; + } + + public get messages(): GuideToolMessage[] + { + return this._messages; + } +} diff --git a/Coolui v3 test/src/api/guide-tool/index.ts b/Coolui v3 test/src/api/guide-tool/index.ts new file mode 100644 index 0000000000..1400adc9bd --- /dev/null +++ b/Coolui v3 test/src/api/guide-tool/index.ts @@ -0,0 +1,3 @@ +export * from './GuideSessionState'; +export * from './GuideToolMessage'; +export * from './GuideToolMessageGroup'; diff --git a/Coolui v3 test/src/api/hc-center/ClubStatus.ts b/Coolui v3 test/src/api/hc-center/ClubStatus.ts new file mode 100644 index 0000000000..e3cba00097 --- /dev/null +++ b/Coolui v3 test/src/api/hc-center/ClubStatus.ts @@ -0,0 +1,6 @@ +export class ClubStatus +{ + public static ACTIVE: string = 'active'; + public static NONE: string = 'none'; + public static EXPIRED: string = 'expired'; +} diff --git a/Coolui v3 test/src/api/hc-center/GetClubBadge.ts b/Coolui v3 test/src/api/hc-center/GetClubBadge.ts new file mode 100644 index 0000000000..79cf9790d0 --- /dev/null +++ b/Coolui v3 test/src/api/hc-center/GetClubBadge.ts @@ -0,0 +1,11 @@ +const DEFAULT_BADGE: string = 'HC1'; +const BADGES: string[] = [ 'ACH_VipHC1', 'ACH_VipHC2', 'ACH_VipHC3', 'ACH_VipHC4', 'ACH_VipHC5', 'HC1', 'HC2', 'HC3', 'HC4', 'HC5' ]; + +export const GetClubBadge = (badgeCodes: string[]) => +{ + let badgeCode: string = null; + + BADGES.forEach(badge => ((badgeCodes.indexOf(badge) > -1) && (badgeCode = badge))); + + return (badgeCode || DEFAULT_BADGE); +}; diff --git a/Coolui v3 test/src/api/hc-center/index.ts b/Coolui v3 test/src/api/hc-center/index.ts new file mode 100644 index 0000000000..cee8f692d8 --- /dev/null +++ b/Coolui v3 test/src/api/hc-center/index.ts @@ -0,0 +1,2 @@ +export * from './ClubStatus'; +export * from './GetClubBadge'; diff --git a/Coolui v3 test/src/api/help/CallForHelpResult.ts b/Coolui v3 test/src/api/help/CallForHelpResult.ts new file mode 100644 index 0000000000..37e7ea1b78 --- /dev/null +++ b/Coolui v3 test/src/api/help/CallForHelpResult.ts @@ -0,0 +1,5 @@ +export class CallForHelpResult +{ + public static readonly TOO_MANY_PENDING_CALLS_CODE = 1; + public static readonly HAS_ABUSIVE_CALL_CODE = 2; +} diff --git a/Coolui v3 test/src/api/help/GetCloseReasonKey.ts b/Coolui v3 test/src/api/help/GetCloseReasonKey.ts new file mode 100644 index 0000000000..8658492f7a --- /dev/null +++ b/Coolui v3 test/src/api/help/GetCloseReasonKey.ts @@ -0,0 +1,8 @@ +export const GetCloseReasonKey = (code: number) => +{ + if(code === 1) return 'useless'; + + if(code === 2) return 'abusive'; + + return 'resolved'; +}; diff --git a/Coolui v3 test/src/api/help/IHelpReport.ts b/Coolui v3 test/src/api/help/IHelpReport.ts new file mode 100644 index 0000000000..861170728e --- /dev/null +++ b/Coolui v3 test/src/api/help/IHelpReport.ts @@ -0,0 +1,19 @@ +import { IChatEntry } from '../chat-history'; + +export interface IHelpReport +{ + reportType: number; + reportedUserId: number; + reportedChats: IChatEntry[]; + cfhCategory: number; + cfhTopic: number; + roomId: number; + roomName: string; + groupId: number; + threadId: number; + messageId: number; + extraData: string; + roomObjectId: number; + message: string; + currentStep: number; +} diff --git a/Coolui v3 test/src/api/help/IReportedUser.ts b/Coolui v3 test/src/api/help/IReportedUser.ts new file mode 100644 index 0000000000..90a3887eb6 --- /dev/null +++ b/Coolui v3 test/src/api/help/IReportedUser.ts @@ -0,0 +1,5 @@ +export interface IReportedUser +{ + id: number; + username: string; +} diff --git a/Coolui v3 test/src/api/help/ReportState.ts b/Coolui v3 test/src/api/help/ReportState.ts new file mode 100644 index 0000000000..ae3a3bd3b6 --- /dev/null +++ b/Coolui v3 test/src/api/help/ReportState.ts @@ -0,0 +1,8 @@ +export class ReportState +{ + public static readonly SELECT_USER = 0; + public static readonly SELECT_CHATS = 1; + public static readonly SELECT_TOPICS = 2; + public static readonly INPUT_REPORT_MESSAGE = 3; + public static readonly REPORT_SUMMARY = 4; +} diff --git a/Coolui v3 test/src/api/help/ReportType.ts b/Coolui v3 test/src/api/help/ReportType.ts new file mode 100644 index 0000000000..24eb7aecf3 --- /dev/null +++ b/Coolui v3 test/src/api/help/ReportType.ts @@ -0,0 +1,11 @@ +export class ReportType +{ + public static readonly EMERGENCY = 1; + public static readonly GUIDE = 2; + public static readonly IM = 3; + public static readonly ROOM = 4; + public static readonly BULLY = 6; + public static readonly THREAD = 7; + public static readonly MESSAGE = 8; + public static readonly PHOTO = 9; +} diff --git a/Coolui v3 test/src/api/help/index.ts b/Coolui v3 test/src/api/help/index.ts new file mode 100644 index 0000000000..6fa2045502 --- /dev/null +++ b/Coolui v3 test/src/api/help/index.ts @@ -0,0 +1,6 @@ +export * from './CallForHelpResult'; +export * from './GetCloseReasonKey'; +export * from './IHelpReport'; +export * from './IReportedUser'; +export * from './ReportState'; +export * from './ReportType'; diff --git a/Coolui v3 test/src/api/index.ts b/Coolui v3 test/src/api/index.ts new file mode 100644 index 0000000000..7089277d4f --- /dev/null +++ b/Coolui v3 test/src/api/index.ts @@ -0,0 +1,28 @@ +export * from './GetRendererVersion'; +export * from './GetUIVersion'; +export * from './achievements'; +export * from './avatar'; +export * from './camera'; +export * from './campaign'; +export * from './catalog'; +export * from './chat-history'; +export * from './events'; +export * from './friends'; +export * from './groups'; +export * from './guide-tool'; +export * from './hc-center'; +export * from './help'; +export * from './inventory'; +export * from './mod-tools'; +export * from './navigator'; +export * from './nitro'; +export * from './nitro/room'; +export * from './nitro/session'; +export * from './notification'; +export * from './purse'; +export * from './room'; +export * from './room/events'; +export * from './room/widgets'; +export * from './user'; +export * from './utils'; +export * from './wired'; diff --git a/Coolui v3 test/src/api/inventory/FurniCategory.ts b/Coolui v3 test/src/api/inventory/FurniCategory.ts new file mode 100644 index 0000000000..65289472c6 --- /dev/null +++ b/Coolui v3 test/src/api/inventory/FurniCategory.ts @@ -0,0 +1,26 @@ +export class FurniCategory +{ + public static DEFAULT: number = 1; + public static WALL_PAPER: number = 2; + public static FLOOR: number = 3; + public static LANDSCAPE: number = 4; + public static POST_IT: number = 5; + public static POSTER: number = 6; + public static SOUND_SET: number = 7; + public static TRAX_SONG: number = 8; + public static PRESENT: number = 9; + public static ECOTRON_BOX: number = 10; + public static TROPHY: number = 11; + public static CREDIT_FURNI: number = 12; + public static PET_SHAMPOO: number = 13; + public static PET_CUSTOM_PART: number = 14; + public static PET_CUSTOM_PART_SHAMPOO: number = 15; + public static PET_SADDLE: number = 16; + public static GUILD_FURNI: number = 17; + public static GAME_FURNI: number = 18; + public static MONSTERPLANT_SEED: number = 19; + public static MONSTERPLANT_REVIVAL: number = 20; + public static MONSTERPLANT_REBREED: number = 21; + public static MONSTERPLANT_FERTILIZE: number = 22; + public static FIGURE_PURCHASABLE_SET: number = 23; +} diff --git a/Coolui v3 test/src/api/inventory/FurnitureItem.ts b/Coolui v3 test/src/api/inventory/FurnitureItem.ts new file mode 100644 index 0000000000..655d1d372f --- /dev/null +++ b/Coolui v3 test/src/api/inventory/FurnitureItem.ts @@ -0,0 +1,245 @@ +import { GetTickerTime, IFurnitureItemData, IObjectData } from '@nitrots/nitro-renderer'; +import { IFurnitureItem } from './IFurnitureItem'; + +export class FurnitureItem implements IFurnitureItem +{ + private _expirationTimeStamp: number; + private _isWallItem: boolean; + private _songId: number; + private _locked: boolean; + private _id: number; + private _ref: number; + private _category: number; + private _type: number; + private _stuffData: IObjectData; + private _extra: number; + private _recyclable: boolean; + private _tradeable: boolean; + private _groupable: boolean; + private _sellable: boolean; + private _secondsToExpiration: number; + private _hasRentPeriodStarted: boolean; + private _creationDay: number; + private _creationMonth: number; + private _creationYear: number; + private _slotId: string; + private _isRented: boolean; + private _flatId: number; + + constructor(parser: IFurnitureItemData) + { + if(!parser) return; + + this._locked = false; + this._id = parser.itemId; + this._type = parser.spriteId; + this._ref = parser.ref; + this._category = parser.category; + this._groupable = ((parser.isGroupable) && (!(parser.rentable))); + this._tradeable = parser.tradable; + this._recyclable = parser.isRecycleable; + this._sellable = parser.sellable; + this._stuffData = parser.stuffData; + this._extra = parser.extra; + this._secondsToExpiration = parser.secondsToExpiration; + this._expirationTimeStamp = parser.expirationTimeStamp; + this._hasRentPeriodStarted = parser.hasRentPeriodStarted; + this._creationDay = parser.creationDay; + this._creationMonth = parser.creationMonth; + this._creationYear = parser.creationYear; + this._slotId = parser.slotId; + this._songId = parser.songId; + this._flatId = parser.flatId; + this._isRented = parser.rentable; + this._isWallItem = parser.isWallItem; + } + + public get rentable(): boolean + { + return this._isRented; + } + + public get id(): number + { + return this._id; + } + + public get ref(): number + { + return this._ref; + } + + public get category(): number + { + return this._category; + } + + public get type(): number + { + return this._type; + } + + public get stuffData(): IObjectData + { + return this._stuffData; + } + + public set stuffData(k: IObjectData) + { + this._stuffData = k; + } + + public get extra(): number + { + return this._extra; + } + + public get recyclable(): boolean + { + return this._recyclable; + } + + public get isTradable(): boolean + { + return this._tradeable; + } + + public get isGroupable(): boolean + { + return this._groupable; + } + + public get sellable(): boolean + { + return this._sellable; + } + + public get secondsToExpiration(): number + { + if(this._secondsToExpiration === -1) return -1; + + let time = -1; + + if(this._hasRentPeriodStarted) + { + time = (this._secondsToExpiration - ((GetTickerTime() - this._expirationTimeStamp) / 1000)); + + if(time < 0) time = 0; + } + else + { + time = this._secondsToExpiration; + } + + return time; + } + + public get creationDay(): number + { + return this._creationDay; + } + + public get creationMonth(): number + { + return this._creationMonth; + } + + public get creationYear(): number + { + return this._creationYear; + } + + public get slotId(): string + { + return this._slotId; + } + + public get songId(): number + { + return this._songId; + } + + public get locked(): boolean + { + return this._locked; + } + + public set locked(k: boolean) + { + this._locked = k; + } + + public get flatId(): number + { + return this._flatId; + } + + public get isWallItem(): boolean + { + return this._isWallItem; + } + + public get hasRentPeriodStarted(): boolean + { + return this._hasRentPeriodStarted; + } + + public get expirationTimeStamp(): number + { + return this._expirationTimeStamp; + } + + public update(parser: IFurnitureItemData): void + { + this._type = parser.spriteId; + this._ref = parser.ref; + this._category = parser.category; + this._groupable = (parser.isGroupable && !parser.rentable); + this._tradeable = parser.tradable; + this._recyclable = parser.isRecycleable; + this._sellable = parser.sellable; + this._stuffData = parser.stuffData; + this._extra = parser.extra; + this._secondsToExpiration = parser.secondsToExpiration; + this._expirationTimeStamp = parser.expirationTimeStamp; + this._hasRentPeriodStarted = parser.hasRentPeriodStarted; + this._creationDay = parser.creationDay; + this._creationMonth = parser.creationMonth; + this._creationYear = parser.creationYear; + this._slotId = parser.slotId; + this._songId = parser.songId; + this._flatId = parser.flatId; + this._isRented = parser.rentable; + this._isWallItem = parser.isWallItem; + } + + public clone(): FurnitureItem + { + const item = new FurnitureItem(null); + + item._expirationTimeStamp = this._expirationTimeStamp; + item._isWallItem = this._isWallItem; + item._songId = this._songId; + item._locked = this._locked; + item._id = this._id; + item._ref = this._ref; + item._category = this._category; + item._type = this._type; + item._stuffData = this._stuffData; + item._extra = this._extra; + item._recyclable = this._recyclable; + item._tradeable = this._tradeable; + item._groupable = this._groupable; + item._sellable = this._sellable; + item._secondsToExpiration = this._secondsToExpiration; + item._hasRentPeriodStarted = this._hasRentPeriodStarted; + item._creationDay = this._creationDay; + item._creationMonth = this._creationMonth; + item._creationYear = this._creationYear; + item._slotId = this._slotId; + item._isRented = this._isRented; + item._flatId = this._flatId; + + return item; + } +} diff --git a/Coolui v3 test/src/api/inventory/FurnitureUtilities.ts b/Coolui v3 test/src/api/inventory/FurnitureUtilities.ts new file mode 100644 index 0000000000..93b9765e8d --- /dev/null +++ b/Coolui v3 test/src/api/inventory/FurnitureUtilities.ts @@ -0,0 +1,171 @@ +import { FurnitureListItemParser, GetRoomEngine, IObjectData } from '@nitrots/nitro-renderer'; +import { FurniCategory } from './FurniCategory'; +import { FurnitureItem } from './FurnitureItem'; +import { GroupItem } from './GroupItem'; + +export const createGroupItem = (type: number, category: number, stuffData: IObjectData, extra: number = NaN) => new GroupItem(type, category, GetRoomEngine(), stuffData, extra); + +const addSingleFurnitureItem = (set: GroupItem[], item: FurnitureItem, unseen: boolean) => +{ + const groupItems: GroupItem[] = []; + + for(const groupItem of set) + { + if(groupItem.type === item.type) groupItems.push(groupItem); + } + + for(const groupItem of groupItems) + { + if(groupItem.getItemById(item.id)) return groupItem; + } + + const groupItem = createGroupItem(item.type, item.category, item.stuffData, item.extra); + + groupItem.push(item); + + if(unseen) + { + groupItem.hasUnseenItems = true; + + set.unshift(groupItem); + } + else + { + set.push(groupItem); + } + + return groupItem; +}; + +const addGroupableFurnitureItem = (set: GroupItem[], item: FurnitureItem, unseen: boolean) => +{ + let existingGroup: GroupItem = null; + + for(const groupItem of set) + { + if((groupItem.type === item.type) && (groupItem.isWallItem === item.isWallItem) && groupItem.isGroupable) + { + if(item.category === FurniCategory.POSTER) + { + if(groupItem.stuffData.getLegacyString() === item.stuffData.getLegacyString()) + { + existingGroup = groupItem; + + break; + } + } + + else if(item.category === FurniCategory.GUILD_FURNI) + { + if(item.stuffData.compare(groupItem.stuffData)) + { + existingGroup = groupItem; + + break; + } + } + + else + { + existingGroup = groupItem; + + break; + } + } + } + + if(existingGroup) + { + existingGroup.push(item); + + if(unseen) + { + existingGroup.hasUnseenItems = true; + + const index = set.indexOf(existingGroup); + + if(index >= 0) set.splice(index, 1); + + set.unshift(existingGroup); + } + + return existingGroup; + } + + existingGroup = createGroupItem(item.type, item.category, item.stuffData, item.extra); + + existingGroup.push(item); + + if(unseen) + { + existingGroup.hasUnseenItems = true; + + set.unshift(existingGroup); + } + else + { + set.push(existingGroup); + } + + return existingGroup; +}; + +export const addFurnitureItem = (set: GroupItem[], item: FurnitureItem, unseen: boolean) => +{ + if(!item.isGroupable) + { + addSingleFurnitureItem(set, item, unseen); + } + else + { + addGroupableFurnitureItem(set, item, unseen); + } +}; + +export const mergeFurniFragments = (fragment: Map, totalFragments: number, fragmentNumber: number, fragments: Map[]) => +{ + if(totalFragments === 1) return fragment; + + fragments[fragmentNumber] = fragment; + + for(const frag of fragments) + { + if(!frag) return null; + } + + const merged: Map = new Map(); + + for(const frag of fragments) + { + for(const [ key, value ] of frag) merged.set(key, value); + + frag.clear(); + } + + fragments = null; + + return merged; +}; + +export const getAllItemIds = (groupItems: GroupItem[]) => +{ + const itemIds: number[] = []; + + for(const groupItem of groupItems) + { + let totalCount = groupItem.getTotalCount(); + + if(groupItem.category === FurniCategory.POST_IT) totalCount = 1; + + let i = 0; + + while(i < totalCount) + { + itemIds.push(groupItem.getItemByIndex(i).id); + + i++; + } + } + + return itemIds; +}; diff --git a/Coolui v3 test/src/api/inventory/GroupItem.ts b/Coolui v3 test/src/api/inventory/GroupItem.ts new file mode 100644 index 0000000000..8569321eb1 --- /dev/null +++ b/Coolui v3 test/src/api/inventory/GroupItem.ts @@ -0,0 +1,461 @@ +import { IObjectData, IRoomEngine } from '@nitrots/nitro-renderer'; +import { LocalizeText } from '../utils'; +import { FurniCategory } from './FurniCategory'; +import { FurnitureItem } from './FurnitureItem'; +import { IFurnitureItem } from './IFurnitureItem'; + +export class GroupItem +{ + private _type: number; + private _category: number; + private _roomEngine: IRoomEngine; + private _stuffData: IObjectData; + private _extra: number; + private _isWallItem: boolean; + private _iconUrl: string; + private _name: string; + private _description: string; + private _locked: boolean; + private _selected: boolean; + private _hasUnseenItems: boolean; + private _items: FurnitureItem[]; + + constructor(type: number = -1, category: number = -1, roomEngine: IRoomEngine = null, stuffData: IObjectData = null, extra: number = -1) + { + this._type = type; + this._category = category; + this._roomEngine = roomEngine; + this._stuffData = stuffData; + this._extra = extra; + this._isWallItem = false; + this._iconUrl = null; + this._name = null; + this._description = null; + this._locked = false; + this._selected = false; + this._hasUnseenItems = false; + this._items = []; + } + + public clone(): GroupItem + { + const groupItem = new GroupItem(); + + groupItem._type = this._type; + groupItem._category = this._category; + groupItem._roomEngine = this._roomEngine; + groupItem._stuffData = this._stuffData; + groupItem._extra = this._extra; + groupItem._isWallItem = this._isWallItem; + groupItem._iconUrl = this._iconUrl; + groupItem._name = this._name; + groupItem._description = this._description; + groupItem._locked = this._locked; + groupItem._selected = this._selected; + groupItem._hasUnseenItems = this._hasUnseenItems; + groupItem._items = this._items; + + return groupItem; + } + + public prepareGroup(): void + { + this.setIcon(); + this.setName(); + this.setDescription(); + } + + public dispose(): void + { + + } + + public getItemByIndex(index: number): FurnitureItem + { + return this._items[index]; + } + + public getItemById(id: number): FurnitureItem + { + for(const item of this._items) + { + if(item.id !== id) continue; + + return item; + } + + return null; + } + + public getTradeItems(count: number): IFurnitureItem[] + { + const items: IFurnitureItem[] = []; + + const furnitureItem = this.getLastItem(); + + if(!furnitureItem) return items; + + let found = 0; + let i = 0; + + while(i < this._items.length) + { + if(found >= count) break; + + const item = this.getItemByIndex(i); + + if(!item.locked && item.isTradable && (item.type === furnitureItem.type)) + { + items.push(item); + + found++; + } + + i++; + } + + return items; + } + + public push(item: FurnitureItem): void + { + const items = [ ...this._items ]; + + let index = 0; + + while(index < items.length) + { + let existingItem = items[index]; + + if(existingItem.id === item.id) + { + existingItem = existingItem.clone(); + + existingItem.locked = false; + + items.splice(index, 1); + + items.push(existingItem); + + this._items = items; + + return; + } + + index++; + } + + items.push(item); + + this._items = items; + + if(this._items.length === 1) this.prepareGroup(); + } + + public pop(): FurnitureItem + { + const items = [ ...this._items ]; + + let item: FurnitureItem = null; + + if(items.length > 0) + { + const index = (items.length - 1); + + item = items[index]; + + items.splice(index, 1); + } + + this._items = items; + + return item; + } + + public remove(k: number): FurnitureItem + { + const items = [ ...this._items ]; + + let index = 0; + + while(index < items.length) + { + let existingItem = items[index]; + + if(existingItem.id === k) + { + items.splice(index, 1); + + this._items = items; + + return existingItem; + } + + index++; + } + + return null; + } + + public getTotalCount(): number + { + if(this._category === FurniCategory.POST_IT) + { + let count = 0; + let index = 0; + + while(index < this._items.length) + { + const item = this.getItemByIndex(index); + + count = (count + parseInt(item.stuffData.getLegacyString())); + + index++; + } + + return count; + } + + return this._items.length; + } + + public getUnlockedCount(): number + { + if(this.category === FurniCategory.POST_IT) return this.getTotalCount(); + + let count = 0; + let index = 0; + + while(index < this._items.length) + { + const item = this.getItemByIndex(index); + + if(!item.locked) count++; + + index++; + } + + return count; + } + + public getLastItem(): FurnitureItem + { + if(!this._items.length) return null; + + const item = this.getItemByIndex((this._items.length - 1)); + + return item; + } + + public unlockAllItems(): void + { + const items = [ ...this._items ]; + + let index = 0; + + while(index < items.length) + { + const item = items[index]; + + if(item.locked) + { + const newItem = item.clone(); + + newItem.locked = false; + + items[index] = newItem; + } + + index++; + } + + this._items = items; + } + + public lockItemIds(itemIds: number[]): boolean + { + const items = [ ...this._items ]; + + let index = 0; + let updated = false; + + while(index < items.length) + { + const item = items[index]; + const locked = (itemIds.indexOf(item.ref) >= 0); + + if(item.locked !== locked) + { + updated = true; + + const newItem = item.clone(); + + newItem.locked = locked; + + items[index] = newItem; + } + + index++; + } + + this._items = items; + + return updated; + } + + private setName(): void + { + const k = this.getLastItem(); + + if(!k) + { + this._name = ''; + + return; + } + + let key = ''; + + switch(this._category) + { + case FurniCategory.POSTER: + key = (('poster_' + k.stuffData.getLegacyString()) + '_name'); + break; + case FurniCategory.TRAX_SONG: + this._name = 'SONG_NAME'; + return; + default: + if(this.isWallItem) + { + key = ('wallItem.name.' + k.type); + } + else + { + key = ('roomItem.name.' + k.type); + } + } + + this._name = LocalizeText(key); + } + + private setDescription(): void + { + this._description = ''; + } + + private setIcon(): void + { + if(this._iconUrl) return; + + let url = null; + + if(this.isWallItem) + { + url = this._roomEngine.getFurnitureWallIconUrl(this._type, this._stuffData.getLegacyString()); + } + else + { + url = this._roomEngine.getFurnitureFloorIconUrl(this._type); + } + + if(!url) return; + + this._iconUrl = url; + } + + public get type(): number + { + return this._type; + } + + public get category(): number + { + return this._category; + } + + public get stuffData(): IObjectData + { + return this._stuffData; + } + + public get extra(): number + { + return this._extra; + } + + public get iconUrl(): string + { + return this._iconUrl; + } + + public get name(): string + { + return this._name; + } + + public get description(): string + { + return this._description; + } + + public get hasUnseenItems(): boolean + { + return this._hasUnseenItems; + } + + public set hasUnseenItems(flag: boolean) + { + this._hasUnseenItems = flag; + } + + public get locked(): boolean + { + return this._locked; + } + + public set locked(flag: boolean) + { + this._locked = flag; + } + + public get selected(): boolean + { + return this._selected; + } + + public set selected(flag: boolean) + { + this._selected = flag; + } + + public get isWallItem(): boolean + { + const item = this.getItemByIndex(0); + + return (item ? item.isWallItem : false); + } + + public get isGroupable(): boolean + { + const item = this.getItemByIndex(0); + + return (item ? item.isGroupable : false); + } + + public get isSellable(): boolean + { + const item = this.getItemByIndex(0); + + return (item ? item.sellable : false); + } + + public get items(): FurnitureItem[] + { + return this._items; + } + + public set items(items: FurnitureItem[]) + { + this._items = items; + } +} diff --git a/Coolui v3 test/src/api/inventory/IBotItem.ts b/Coolui v3 test/src/api/inventory/IBotItem.ts new file mode 100644 index 0000000000..0a370ba6c4 --- /dev/null +++ b/Coolui v3 test/src/api/inventory/IBotItem.ts @@ -0,0 +1,6 @@ +import { BotData } from '@nitrots/nitro-renderer'; + +export interface IBotItem +{ + botData: BotData; +} diff --git a/Coolui v3 test/src/api/inventory/IFurnitureItem.ts b/Coolui v3 test/src/api/inventory/IFurnitureItem.ts new file mode 100644 index 0000000000..435597d257 --- /dev/null +++ b/Coolui v3 test/src/api/inventory/IFurnitureItem.ts @@ -0,0 +1,17 @@ +import { IObjectData } from '@nitrots/nitro-renderer'; + +export interface IFurnitureItem +{ + id: number; + ref: number; + type: number; + stuffData: IObjectData; + extra: number; + category: number; + recyclable: boolean; + isTradable: boolean; + isGroupable: boolean; + sellable: boolean; + locked: boolean; + isWallItem: boolean; +} diff --git a/Coolui v3 test/src/api/inventory/IPetItem.ts b/Coolui v3 test/src/api/inventory/IPetItem.ts new file mode 100644 index 0000000000..910d5dffeb --- /dev/null +++ b/Coolui v3 test/src/api/inventory/IPetItem.ts @@ -0,0 +1,6 @@ +import { PetData } from '@nitrots/nitro-renderer'; + +export interface IPetItem +{ + petData: PetData; +} diff --git a/Coolui v3 test/src/api/inventory/IUnseenItemTracker.ts b/Coolui v3 test/src/api/inventory/IUnseenItemTracker.ts new file mode 100644 index 0000000000..8a70a16638 --- /dev/null +++ b/Coolui v3 test/src/api/inventory/IUnseenItemTracker.ts @@ -0,0 +1,12 @@ +export interface IUnseenItemTracker +{ + dispose(): void; + resetCategory(category: number): boolean; + resetItems(category: number, itemIds: number[]): boolean; + isUnseen(category: number, itemId: number): boolean; + removeUnseen(category: number, itemId: number): boolean; + getIds(category: number): number[]; + getCount(category: number): number; + getFullCount(): number; + addItems(category: number, itemIds: number[]): void; +} diff --git a/Coolui v3 test/src/api/inventory/InventoryUtilities.ts b/Coolui v3 test/src/api/inventory/InventoryUtilities.ts new file mode 100644 index 0000000000..ac28cbdbfd --- /dev/null +++ b/Coolui v3 test/src/api/inventory/InventoryUtilities.ts @@ -0,0 +1,117 @@ +import { CreateLinkEvent, FurniturePlacePaintComposer, GetRoomEngine, GetRoomSessionManager, RoomObjectCategory, RoomObjectPlacementSource, RoomObjectType } from '@nitrots/nitro-renderer'; +import { SendMessageComposer } from '../nitro'; +import { FurniCategory } from './FurniCategory'; +import { GroupItem } from './GroupItem'; +import { IBotItem } from './IBotItem'; +import { IPetItem } from './IPetItem'; + +let objectMoverRequested = false; +let itemIdInPlacing = -1; + +export const isObjectMoverRequested = () => objectMoverRequested; + +export const setObjectMoverRequested = (flag: boolean) => objectMoverRequested = flag; + +export const getPlacingItemId = () => itemIdInPlacing; + +export const setPlacingItemId = (id: number) => (itemIdInPlacing = id); + +export const cancelRoomObjectPlacement = () => +{ + if(getPlacingItemId() === -1) return; + + GetRoomEngine().cancelRoomObjectPlacement(); + + setPlacingItemId(-1); + setObjectMoverRequested(false); +}; + +export const attemptPetPlacement = (petItem: IPetItem, flag: boolean = false) => +{ + const petData = petItem.petData; + + if(!petData) return false; + + const session = GetRoomSessionManager().getSession(1); + + if(!session) return false; + + if(!session.isRoomOwner && !session.allowPets) return false; + + CreateLinkEvent('inventory/hide'); + + if(GetRoomEngine().processRoomObjectPlacement(RoomObjectPlacementSource.INVENTORY, -(petData.id), RoomObjectCategory.UNIT, RoomObjectType.PET, petData.figureData.figuredata)) + { + setPlacingItemId(petData.id); + setObjectMoverRequested(true); + } + + return true; +}; + +export const attemptItemPlacement = (groupItem: GroupItem, flag: boolean = false) => +{ + if(!groupItem || !groupItem.getUnlockedCount()) return false; + + const item = groupItem.getLastItem(); + + if(!item) return false; + + if((item.category === FurniCategory.FLOOR) || (item.category === FurniCategory.WALL_PAPER) || (item.category === FurniCategory.LANDSCAPE)) + { + if(flag) return false; + + SendMessageComposer(new FurniturePlacePaintComposer(item.id)); + + return false; + } + else + { + CreateLinkEvent('inventory/hide'); + + let category = 0; + let isMoving = false; + + if(item.isWallItem) category = RoomObjectCategory.WALL; + else category = RoomObjectCategory.FLOOR; + + if((item.category === FurniCategory.POSTER)) // or external image from furnidata + { + isMoving = GetRoomEngine().processRoomObjectPlacement(RoomObjectPlacementSource.INVENTORY, item.id, category, item.type, item.stuffData.getLegacyString()); + } + else + { + isMoving = GetRoomEngine().processRoomObjectPlacement(RoomObjectPlacementSource.INVENTORY, item.id, category, item.type, item.extra.toString(), item.stuffData); + } + + if(isMoving) + { + setPlacingItemId(item.ref); + setObjectMoverRequested(true); + } + } + + return true; +}; + + +export const attemptBotPlacement = (botItem: IBotItem, flag: boolean = false) => +{ + const botData = botItem.botData; + + if(!botData) return false; + + const session = GetRoomSessionManager().getSession(1); + + if(!session || !session.isRoomOwner) return false; + + CreateLinkEvent('inventory/hide'); + + if(GetRoomEngine().processRoomObjectPlacement(RoomObjectPlacementSource.INVENTORY, -(botData.id), RoomObjectCategory.UNIT, RoomObjectType.RENTABLE_BOT, botData.figure)) + { + setPlacingItemId(botData.id); + setObjectMoverRequested(true); + } + + return true; +}; diff --git a/Coolui v3 test/src/api/inventory/PetUtilities.ts b/Coolui v3 test/src/api/inventory/PetUtilities.ts new file mode 100644 index 0000000000..c53ada2cef --- /dev/null +++ b/Coolui v3 test/src/api/inventory/PetUtilities.ts @@ -0,0 +1,103 @@ +import { CreateLinkEvent, PetData } from '@nitrots/nitro-renderer'; +import { IPetItem } from './IPetItem'; +import { cancelRoomObjectPlacement, getPlacingItemId } from './InventoryUtilities'; +import { UnseenItemCategory } from './UnseenItemCategory'; + +export const getAllPetIds = (petItems: IPetItem[]) => petItems.map(item => item.petData.id); + +export const addSinglePetItem = (petData: PetData, set: IPetItem[], unseen: boolean = true) => +{ + const petItem = { petData }; + + if(unseen) + { + //petItem.isUnseen = true; + + set.unshift(petItem); + } + else + { + set.push(petItem); + } + + return petItem; +}; + +export const removePetItemById = (id: number, set: IPetItem[]) => +{ + let index = 0; + + while(index < set.length) + { + const petItem = set[index]; + + if(petItem && (petItem.petData.id === id)) + { + if(getPlacingItemId() === petItem.petData.id) + { + cancelRoomObjectPlacement(); + + CreateLinkEvent('inventory/open'); + } + + set.splice(index, 1); + + return petItem; + } + + index++; + } + + return null; +}; + +export const processPetFragment = (set: IPetItem[], fragment: Map, isUnseen: (category: number, itemId: number) => boolean) => +{ + const existingIds = getAllPetIds(set); + const addedIds: number[] = []; + const removedIds: number[] = []; + + for(const key of fragment.keys()) (existingIds.indexOf(key) === -1) && addedIds.push(key); + + for(const itemId of existingIds) (!fragment.get(itemId)) && removedIds.push(itemId); + + const emptyExistingSet = (existingIds.length === 0); + + for(const id of removedIds) removePetItemById(id, set); + + for(const id of addedIds) + { + const parser = fragment.get(id); + + if(!parser) continue; + + addSinglePetItem(parser, set, isUnseen(UnseenItemCategory.PET, parser.id)); + } + + return set; +}; + +export const mergePetFragments = (fragment: Map, totalFragments: number, fragmentNumber: number, fragments: Map[]) => +{ + if(totalFragments === 1) return fragment; + + fragments[fragmentNumber] = fragment; + + for(const frag of fragments) + { + if(!frag) return null; + } + + const merged: Map = new Map(); + + for(const frag of fragments) + { + for(const [ key, value ] of frag) merged.set(key, value); + + frag.clear(); + } + + fragments = null; + + return merged; +}; diff --git a/Coolui v3 test/src/api/inventory/TradeState.ts b/Coolui v3 test/src/api/inventory/TradeState.ts new file mode 100644 index 0000000000..3df418ba95 --- /dev/null +++ b/Coolui v3 test/src/api/inventory/TradeState.ts @@ -0,0 +1,10 @@ +export class TradeState +{ + public static TRADING_STATE_READY: number = 0; + public static TRADING_STATE_RUNNING: number = 1; + public static TRADING_STATE_COUNTDOWN: number = 2; + public static TRADING_STATE_CONFIRMING: number = 3; + public static TRADING_STATE_CONFIRMED: number = 4; + public static TRADING_STATE_COMPLETED: number = 5; + public static TRADING_STATE_CANCELLED: number = 6; +} diff --git a/Coolui v3 test/src/api/inventory/TradeUserData.ts b/Coolui v3 test/src/api/inventory/TradeUserData.ts new file mode 100644 index 0000000000..ba3d66bc0b --- /dev/null +++ b/Coolui v3 test/src/api/inventory/TradeUserData.ts @@ -0,0 +1,15 @@ +import { AdvancedMap } from '@nitrots/nitro-renderer'; +import { GroupItem } from './GroupItem'; + +export class TradeUserData +{ + constructor( + public userId: number = -1, + public userName: string = '', + public userItems: AdvancedMap = new AdvancedMap(), + public itemCount: number = 0, + public creditsCount: number = 0, + public accepts: boolean = false, + public canTrade: boolean = false) + {} +} diff --git a/Coolui v3 test/src/api/inventory/TradingNotificationType.ts b/Coolui v3 test/src/api/inventory/TradingNotificationType.ts new file mode 100644 index 0000000000..4aed49059d --- /dev/null +++ b/Coolui v3 test/src/api/inventory/TradingNotificationType.ts @@ -0,0 +1,12 @@ +export class TradingNotificationType +{ + public static ALERT_SCAM: number = 0; + public static HOTEL_TRADING_DISABLED = 1; + public static YOU_NOT_ALLOWED: number = 2; + public static THEY_NOT_ALLOWED: number = 4; + public static ROOM_DISABLED: number = 6; + public static YOU_OPEN: number = 7; + public static THEY_OPEN: number = 8; + public static ERROR_WHILE_COMMIT: number = 9; + public static THEY_CANCELLED: number = 10; +} diff --git a/Coolui v3 test/src/api/inventory/TradingUtilities.ts b/Coolui v3 test/src/api/inventory/TradingUtilities.ts new file mode 100644 index 0000000000..8cdfb96bed --- /dev/null +++ b/Coolui v3 test/src/api/inventory/TradingUtilities.ts @@ -0,0 +1,70 @@ +import { AdvancedMap, GetSessionDataManager, IObjectData, ItemDataStructure, StringDataType } from '@nitrots/nitro-renderer'; +import { FurniCategory } from './FurniCategory'; +import { FurnitureItem } from './FurnitureItem'; +import { createGroupItem } from './FurnitureUtilities'; +import { GroupItem } from './GroupItem'; + +const isExternalImage = (spriteId: number) => GetSessionDataManager().getWallItemData(spriteId)?.isExternalImage || false; + +export const parseTradeItems = (items: ItemDataStructure[]) => +{ + const existingItems = new AdvancedMap(); + const totalItems = items.length; + + if(totalItems) + { + for(const item of items) + { + const spriteId = item.spriteId; + const category = item.category; + + let name = (item.furniType + spriteId); + + if(!item.isGroupable || isExternalImage(spriteId)) + { + name = ('itemid' + item.itemId); + } + + if(item.category === FurniCategory.POSTER) + { + name = (item.itemId + 'poster' + item.stuffData.getLegacyString()); + } + + else if(item.category === FurniCategory.GUILD_FURNI) + { + name = ''; + } + + let groupItem = ((item.isGroupable && !isExternalImage(item.spriteId)) ? existingItems.getValue(name) : null); + + if(!groupItem) + { + groupItem = createGroupItem(spriteId, category, item.stuffData); + + existingItems.add(name, groupItem); + } + + groupItem.push(new FurnitureItem(item)); + } + } + + return existingItems; +}; + +export const getGuildFurniType = (spriteId: number, stuffData: IObjectData) => +{ + let type = spriteId.toString(); + + if(!(stuffData instanceof StringDataType)) return type; + + let i = 1; + + while(i < 5) + { + type = (type + (',' + stuffData.getValue(i))); + + i++; + } + + return type; +}; diff --git a/Coolui v3 test/src/api/inventory/UnseenItemCategory.ts b/Coolui v3 test/src/api/inventory/UnseenItemCategory.ts new file mode 100644 index 0000000000..cbd7e9b78c --- /dev/null +++ b/Coolui v3 test/src/api/inventory/UnseenItemCategory.ts @@ -0,0 +1,9 @@ +export class UnseenItemCategory +{ + public static FURNI: number = 1; + public static RENTABLE: number = 2; + public static PET: number = 3; + public static BADGE: number = 4; + public static BOT: number = 5; + public static GAMES: number = 6; +} diff --git a/Coolui v3 test/src/api/inventory/index.ts b/Coolui v3 test/src/api/inventory/index.ts new file mode 100644 index 0000000000..6a245d7635 --- /dev/null +++ b/Coolui v3 test/src/api/inventory/index.ts @@ -0,0 +1,15 @@ +export * from './FurniCategory'; +export * from './FurnitureItem'; +export * from './FurnitureUtilities'; +export * from './GroupItem'; +export * from './IBotItem'; +export * from './IFurnitureItem'; +export * from './IPetItem'; +export * from './IUnseenItemTracker'; +export * from './InventoryUtilities'; +export * from './PetUtilities'; +export * from './TradeState'; +export * from './TradeUserData'; +export * from './TradingNotificationType'; +export * from './TradingUtilities'; +export * from './UnseenItemCategory'; diff --git a/Coolui v3 test/src/api/mod-tools/GetIssueCategoryName.ts b/Coolui v3 test/src/api/mod-tools/GetIssueCategoryName.ts new file mode 100644 index 0000000000..ce2b902b33 --- /dev/null +++ b/Coolui v3 test/src/api/mod-tools/GetIssueCategoryName.ts @@ -0,0 +1,35 @@ +export const GetIssueCategoryName = (categoryId: number) => +{ + switch(categoryId) + { + case 1: + case 2: + return 'Normal'; + case 3: + return 'Automatic'; + case 4: + return 'Automatic IM'; + case 5: + return 'Guide System'; + case 6: + return 'IM'; + case 7: + return 'Room'; + case 8: + return 'Panic'; + case 9: + return 'Guardian'; + case 10: + return 'Automatic Helper'; + case 11: + return 'Discussion'; + case 12: + return 'Selfie'; + case 14: + return 'Photo'; + case 15: + return 'Ambassador'; + } + + return 'Unknown'; +}; diff --git a/Coolui v3 test/src/api/mod-tools/ISelectedUser.ts b/Coolui v3 test/src/api/mod-tools/ISelectedUser.ts new file mode 100644 index 0000000000..4f6e76b8db --- /dev/null +++ b/Coolui v3 test/src/api/mod-tools/ISelectedUser.ts @@ -0,0 +1,5 @@ +export interface ISelectedUser +{ + userId: number; + username: string; +} diff --git a/Coolui v3 test/src/api/mod-tools/IUserInfo.ts b/Coolui v3 test/src/api/mod-tools/IUserInfo.ts new file mode 100644 index 0000000000..8d49aa743c --- /dev/null +++ b/Coolui v3 test/src/api/mod-tools/IUserInfo.ts @@ -0,0 +1,6 @@ +export interface IUserInfo +{ + nameKey: string; + nameKeyFallback: string; + value: string; +} diff --git a/Coolui v3 test/src/api/mod-tools/ModActionDefinition.ts b/Coolui v3 test/src/api/mod-tools/ModActionDefinition.ts new file mode 100644 index 0000000000..b28aa9cecc --- /dev/null +++ b/Coolui v3 test/src/api/mod-tools/ModActionDefinition.ts @@ -0,0 +1,49 @@ +export class ModActionDefinition +{ + public static ALERT: number = 1; + public static MUTE: number = 2; + public static BAN: number = 3; + public static KICK: number = 4; + public static TRADE_LOCK: number = 5; + public static MESSAGE: number = 6; + + private readonly _actionId: number; + private readonly _name: string; + private readonly _actionType: number; + private readonly _sanctionTypeId: number; + private readonly _actionLengthHours: number; + + constructor(actionId: number, actionName: string, actionType: number, sanctionTypeId: number, actionLengthHours:number) + { + this._actionId = actionId; + this._name = actionName; + this._actionType = actionType; + this._sanctionTypeId = sanctionTypeId; + this._actionLengthHours = actionLengthHours; + } + + public get actionId(): number + { + return this._actionId; + } + + public get name(): string + { + return this._name; + } + + public get actionType(): number + { + return this._actionType; + } + + public get sanctionTypeId(): number + { + return this._sanctionTypeId; + } + + public get actionLengthHours(): number + { + return this._actionLengthHours; + } +} diff --git a/Coolui v3 test/src/api/mod-tools/index.ts b/Coolui v3 test/src/api/mod-tools/index.ts new file mode 100644 index 0000000000..004bbaa329 --- /dev/null +++ b/Coolui v3 test/src/api/mod-tools/index.ts @@ -0,0 +1,4 @@ +export * from './GetIssueCategoryName'; +export * from './ISelectedUser'; +export * from './IUserInfo'; +export * from './ModActionDefinition'; diff --git a/Coolui v3 test/src/api/navigator/DoorStateType.ts b/Coolui v3 test/src/api/navigator/DoorStateType.ts new file mode 100644 index 0000000000..1f8a8efe44 --- /dev/null +++ b/Coolui v3 test/src/api/navigator/DoorStateType.ts @@ -0,0 +1,12 @@ +export class DoorStateType +{ + public static NONE: number = 0; + public static START_DOORBELL: number = 1; + public static START_PASSWORD: number = 2; + public static STATE_PENDING_SERVER: number = 3; + public static UPDATE_STATE: number = 4; + public static STATE_WAITING: number = 5; + public static STATE_NO_ANSWER: number = 6; + public static STATE_WRONG_PASSWORD: number = 7; + public static STATE_ACCEPTED: number = 8; +} diff --git a/Coolui v3 test/src/api/navigator/INavigatorData.ts b/Coolui v3 test/src/api/navigator/INavigatorData.ts new file mode 100644 index 0000000000..e50b6fe50d --- /dev/null +++ b/Coolui v3 test/src/api/navigator/INavigatorData.ts @@ -0,0 +1,17 @@ +import { RoomDataParser } from '@nitrots/nitro-renderer'; + +export interface INavigatorData +{ + homeRoomId: number; + settingsReceived: boolean; + enteredGuestRoom: RoomDataParser; + currentRoomOwner: boolean; + currentRoomId: number; + currentRoomIsStaffPick: boolean; + createdFlatId: number; + avatarId: number; + roomPicker: boolean; + eventMod: boolean; + currentRoomRating: number; + canRate: boolean; +} diff --git a/Coolui v3 test/src/api/navigator/INavigatorSearchFilter.ts b/Coolui v3 test/src/api/navigator/INavigatorSearchFilter.ts new file mode 100644 index 0000000000..179d5d5b8f --- /dev/null +++ b/Coolui v3 test/src/api/navigator/INavigatorSearchFilter.ts @@ -0,0 +1,5 @@ +export interface INavigatorSearchFilter +{ + name: string; + query: string; +} diff --git a/Coolui v3 test/src/api/navigator/IRoomChatSettings.ts b/Coolui v3 test/src/api/navigator/IRoomChatSettings.ts new file mode 100644 index 0000000000..aee426cb16 --- /dev/null +++ b/Coolui v3 test/src/api/navigator/IRoomChatSettings.ts @@ -0,0 +1,8 @@ +export interface IRoomChatSettings +{ + mode: number; + weight: number; + speed: number; + distance: number; + protection: number; +} diff --git a/Coolui v3 test/src/api/navigator/IRoomData.ts b/Coolui v3 test/src/api/navigator/IRoomData.ts new file mode 100644 index 0000000000..9146314762 --- /dev/null +++ b/Coolui v3 test/src/api/navigator/IRoomData.ts @@ -0,0 +1,23 @@ +import { IRoomChatSettings } from './IRoomChatSettings'; +import { IRoomModerationSettings } from './IRoomModerationSettings'; + +export interface IRoomData +{ + roomId: number; + roomName: string; + roomDescription: string; + categoryId: number; + userCount: number; + tags: string[]; + tradeState: number; + allowWalkthrough: boolean; + lockState: number; + password: string; + allowPets: boolean; + allowPetsEat: boolean; + hideWalls: boolean; + wallThickness: number; + floorThickness: number; + chatSettings: IRoomChatSettings; + moderationSettings: IRoomModerationSettings; +} diff --git a/Coolui v3 test/src/api/navigator/IRoomModel.ts b/Coolui v3 test/src/api/navigator/IRoomModel.ts new file mode 100644 index 0000000000..73dfe2788c --- /dev/null +++ b/Coolui v3 test/src/api/navigator/IRoomModel.ts @@ -0,0 +1,6 @@ +export interface IRoomModel +{ + clubLevel: number; + tileSize: number; + name: string; +} diff --git a/Coolui v3 test/src/api/navigator/IRoomModerationSettings.ts b/Coolui v3 test/src/api/navigator/IRoomModerationSettings.ts new file mode 100644 index 0000000000..266fe478f5 --- /dev/null +++ b/Coolui v3 test/src/api/navigator/IRoomModerationSettings.ts @@ -0,0 +1,6 @@ +export interface IRoomModerationSettings +{ + allowMute: number; + allowKick: number; + allowBan: number; +} diff --git a/Coolui v3 test/src/api/navigator/NavigatorSearchResultViewDisplayMode.ts b/Coolui v3 test/src/api/navigator/NavigatorSearchResultViewDisplayMode.ts new file mode 100644 index 0000000000..b532d1af21 --- /dev/null +++ b/Coolui v3 test/src/api/navigator/NavigatorSearchResultViewDisplayMode.ts @@ -0,0 +1,6 @@ +export class NavigatorSearchResultViewDisplayMode +{ + public static readonly LIST: number = 0; + public static readonly THUMBNAILS: number = 1; + public static readonly FORCED_THUMBNAILS: number = 2; +} diff --git a/Coolui v3 test/src/api/navigator/RoomInfoData.ts b/Coolui v3 test/src/api/navigator/RoomInfoData.ts new file mode 100644 index 0000000000..fc0a93bd8f --- /dev/null +++ b/Coolui v3 test/src/api/navigator/RoomInfoData.ts @@ -0,0 +1,60 @@ +import { RoomDataParser } from '@nitrots/nitro-renderer'; + +export class RoomInfoData +{ + private _enteredGuestRoom: RoomDataParser = null; + private _createdRoomId: number = 0; + private _currentRoomId: number = 0; + private _currentRoomOwner: boolean = false; + private _canRate: boolean = false; + + public get enteredGuestRoom(): RoomDataParser + { + return this._enteredGuestRoom; + } + + public set enteredGuestRoom(data: RoomDataParser) + { + this._enteredGuestRoom = data; + } + + public get createdRoomId(): number + { + return this._createdRoomId; + } + + public set createdRoomId(id: number) + { + this._createdRoomId = id; + } + + public get currentRoomId(): number + { + return this._currentRoomId; + } + + public set currentRoomId(id: number) + { + this._currentRoomId = id; + } + + public get currentRoomOwner(): boolean + { + return this._currentRoomOwner; + } + + public set currentRoomOwner(flag: boolean) + { + this._currentRoomOwner = flag; + } + + public get canRate(): boolean + { + return this._canRate; + } + + public set canRate(flag: boolean) + { + this._canRate = flag; + } +} diff --git a/Coolui v3 test/src/api/navigator/RoomSettingsUtils.ts b/Coolui v3 test/src/api/navigator/RoomSettingsUtils.ts new file mode 100644 index 0000000000..36f636f24f --- /dev/null +++ b/Coolui v3 test/src/api/navigator/RoomSettingsUtils.ts @@ -0,0 +1,10 @@ +const BuildMaxVisitorsList = () => +{ + const list: number[] = []; + + for(let i = 10; i <= 100; i = i + 10) list.push(i); + + return list; +}; + +export const GetMaxVisitorsList = BuildMaxVisitorsList(); diff --git a/Coolui v3 test/src/api/navigator/SearchFilterOptions.ts b/Coolui v3 test/src/api/navigator/SearchFilterOptions.ts new file mode 100644 index 0000000000..aaf1290260 --- /dev/null +++ b/Coolui v3 test/src/api/navigator/SearchFilterOptions.ts @@ -0,0 +1,24 @@ +import { INavigatorSearchFilter } from './INavigatorSearchFilter'; + +export const SearchFilterOptions: INavigatorSearchFilter[] = [ + { + name: 'anything', + query: null + }, + { + name: 'room.name', + query: 'roomname' + }, + { + name: 'owner', + query: 'owner' + }, + { + name: 'tag', + query: 'tag' + }, + { + name: 'group', + query: 'group' + } +]; diff --git a/Coolui v3 test/src/api/navigator/TryVisitRoom.ts b/Coolui v3 test/src/api/navigator/TryVisitRoom.ts new file mode 100644 index 0000000000..81138d6c29 --- /dev/null +++ b/Coolui v3 test/src/api/navigator/TryVisitRoom.ts @@ -0,0 +1,7 @@ +import { GetGuestRoomMessageComposer } from '@nitrots/nitro-renderer'; +import { SendMessageComposer } from '../nitro'; + +export function TryVisitRoom(roomId: number): void +{ + SendMessageComposer(new GetGuestRoomMessageComposer(roomId, false, true)); +} diff --git a/Coolui v3 test/src/api/navigator/index.ts b/Coolui v3 test/src/api/navigator/index.ts new file mode 100644 index 0000000000..bceb33e4ef --- /dev/null +++ b/Coolui v3 test/src/api/navigator/index.ts @@ -0,0 +1,12 @@ +export * from './DoorStateType'; +export * from './INavigatorData'; +export * from './INavigatorSearchFilter'; +export * from './IRoomChatSettings'; +export * from './IRoomData'; +export * from './IRoomModel'; +export * from './IRoomModerationSettings'; +export * from './NavigatorSearchResultViewDisplayMode'; +export * from './RoomInfoData'; +export * from './RoomSettingsUtils'; +export * from './SearchFilterOptions'; +export * from './TryVisitRoom'; diff --git a/Coolui v3 test/src/api/nitro/GetConfigurationValue.ts b/Coolui v3 test/src/api/nitro/GetConfigurationValue.ts new file mode 100644 index 0000000000..755ca1d0ba --- /dev/null +++ b/Coolui v3 test/src/api/nitro/GetConfigurationValue.ts @@ -0,0 +1,6 @@ +import { GetConfiguration } from '@nitrots/nitro-renderer'; + +export function GetConfigurationValue(key: string, value: T = null): T +{ + return GetConfiguration().getValue(key, value); +} diff --git a/Coolui v3 test/src/api/nitro/OpenUrl.ts b/Coolui v3 test/src/api/nitro/OpenUrl.ts new file mode 100644 index 0000000000..44992e8a3e --- /dev/null +++ b/Coolui v3 test/src/api/nitro/OpenUrl.ts @@ -0,0 +1,15 @@ +import { CreateLinkEvent, HabboWebTools } from '@nitrots/nitro-renderer'; + +export const OpenUrl = (url: string) => +{ + if(!url || !url.length) return; + + if(url.startsWith('http')) + { + HabboWebTools.openWebPage(url); + } + else + { + CreateLinkEvent(url); + } +}; diff --git a/Coolui v3 test/src/api/nitro/SendMessageComposer.ts b/Coolui v3 test/src/api/nitro/SendMessageComposer.ts new file mode 100644 index 0000000000..4229c28c77 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/SendMessageComposer.ts @@ -0,0 +1,3 @@ +import { GetCommunication, IMessageComposer } from '@nitrots/nitro-renderer'; + +export const SendMessageComposer = (event: IMessageComposer) => GetCommunication().connection.send(event); diff --git a/Coolui v3 test/src/api/nitro/index.ts b/Coolui v3 test/src/api/nitro/index.ts new file mode 100644 index 0000000000..11b9d02c91 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/index.ts @@ -0,0 +1,5 @@ +export * from './GetConfigurationValue'; +export * from './OpenUrl'; +export * from './SendMessageComposer'; +export * from './room'; +export * from './session'; diff --git a/Coolui v3 test/src/api/nitro/room/DispatchMouseEvent.ts b/Coolui v3 test/src/api/nitro/room/DispatchMouseEvent.ts new file mode 100644 index 0000000000..ccbe0bcd08 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/room/DispatchMouseEvent.ts @@ -0,0 +1,54 @@ +import { GetRoomEngine, MouseEventType } from '@nitrots/nitro-renderer'; + +let didMouseMove = false; +let lastClick = 0; +let clickCount = 0; + +export const DispatchMouseEvent = (event: MouseEvent, canvasId: number = 1) => +{ + const x = event.clientX; + const y = event.clientY; + + let eventType = event.type; + + if(eventType === MouseEventType.MOUSE_CLICK) + { + if(lastClick) + { + clickCount = 1; + + if(lastClick >= Date.now() - 300) clickCount++; + } + + lastClick = Date.now(); + + if(clickCount === 2) + { + if(!didMouseMove) eventType = MouseEventType.DOUBLE_CLICK; + + clickCount = 0; + lastClick = null; + } + } + + switch(eventType) + { + case MouseEventType.MOUSE_CLICK: + break; + case MouseEventType.DOUBLE_CLICK: + break; + case MouseEventType.MOUSE_MOVE: + didMouseMove = true; + break; + case MouseEventType.MOUSE_DOWN: + didMouseMove = false; + break; + case MouseEventType.MOUSE_UP: + break; + case MouseEventType.RIGHT_CLICK: + break; + default: return; + } + + GetRoomEngine().dispatchMouseEvent(canvasId, x, y, eventType, event.altKey, (event.ctrlKey || event.metaKey), event.shiftKey, false); +}; diff --git a/Coolui v3 test/src/api/nitro/room/DispatchTouchEvent.ts b/Coolui v3 test/src/api/nitro/room/DispatchTouchEvent.ts new file mode 100644 index 0000000000..7a90997259 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/room/DispatchTouchEvent.ts @@ -0,0 +1,81 @@ +import { GetRoomEngine, MouseEventType, TouchEventType } from '@nitrots/nitro-renderer'; + +let didMouseMove = false; +let lastClick = 0; +let clickCount = 0; + +export const DispatchTouchEvent = (event: TouchEvent, canvasId: number = 1, longTouch: boolean = false, altKey: boolean = false, ctrlKey: boolean = false, shiftKey: boolean = false) => +{ + let x = 0; + let y = 0; + + if(event.touches[0]) + { + x = event.touches[0].clientX; + y = event.touches[0].clientY; + } + + else if(event.changedTouches[0]) + { + x = event.changedTouches[0].clientX; + y = event.changedTouches[0].clientY; + } + + let eventType = event.type; + + if(longTouch) eventType = TouchEventType.TOUCH_LONG; + + if(eventType === MouseEventType.MOUSE_CLICK || eventType === TouchEventType.TOUCH_END) + { + eventType = MouseEventType.MOUSE_CLICK; + + if(lastClick) + { + clickCount = 1; + + if(lastClick >= (Date.now() - 300)) clickCount++; + } + + lastClick = Date.now(); + + if(clickCount === 2) + { + if(!didMouseMove) eventType = MouseEventType.DOUBLE_CLICK; + + clickCount = 0; + lastClick = null; + } + } + + switch(eventType) + { + case MouseEventType.MOUSE_CLICK: + break; + case MouseEventType.DOUBLE_CLICK: + break; + case TouchEventType.TOUCH_START: + eventType = MouseEventType.MOUSE_DOWN; + + didMouseMove = false; + break; + case TouchEventType.TOUCH_MOVE: + eventType = MouseEventType.MOUSE_MOVE; + + didMouseMove = true; + break; + case TouchEventType.TOUCH_END: + eventType = MouseEventType.MOUSE_UP; + break; + case TouchEventType.TOUCH_LONG: + eventType = MouseEventType.MOUSE_DOWN_LONG; + break; + default: return; + } + + if(eventType === TouchEventType.TOUCH_START) + { + GetRoomEngine().dispatchMouseEvent(canvasId, x, y, eventType, altKey, ctrlKey, shiftKey, false); + } + + GetRoomEngine().dispatchMouseEvent(canvasId, x, y, eventType, altKey, ctrlKey, shiftKey, false); +}; diff --git a/Coolui v3 test/src/api/nitro/room/GetOwnRoomObject.ts b/Coolui v3 test/src/api/nitro/room/GetOwnRoomObject.ts new file mode 100644 index 0000000000..aae0b77d0a --- /dev/null +++ b/Coolui v3 test/src/api/nitro/room/GetOwnRoomObject.ts @@ -0,0 +1,31 @@ +import { GetRoomEngine, GetSessionDataManager, IRoomObjectController, RoomObjectCategory } from '@nitrots/nitro-renderer'; +import { GetRoomSession } from '../session'; + +export function GetOwnRoomObject(): IRoomObjectController +{ + const userId = GetSessionDataManager().userId; + const roomId = GetRoomEngine().activeRoomId; + const category = RoomObjectCategory.UNIT; + const totalObjects = GetRoomEngine().getTotalObjectsForManager(roomId, category); + + let i = 0; + + while(i < totalObjects) + { + const roomObject = GetRoomEngine().getRoomObjectByIndex(roomId, i, category); + + if(roomObject) + { + const userData = GetRoomSession().userDataManager.getUserDataByIndex(roomObject.id); + + if(userData) + { + if(userData.webID === userId) return roomObject; + } + } + + i++; + } + + return null; +} diff --git a/Coolui v3 test/src/api/nitro/room/GetRoomObjectBounds.ts b/Coolui v3 test/src/api/nitro/room/GetRoomObjectBounds.ts new file mode 100644 index 0000000000..dca0338f22 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/room/GetRoomObjectBounds.ts @@ -0,0 +1,13 @@ +import { GetRoomEngine } from '@nitrots/nitro-renderer'; + +export const GetRoomObjectBounds = (roomId: number, objectId: number, category: number, canvasId = 1) => +{ + const rectangle = GetRoomEngine().getRoomObjectBoundingRectangle(roomId, objectId, category, canvasId); + + if(!rectangle) return null; + + rectangle.x = Math.round(rectangle.x); + rectangle.y = Math.round(rectangle.y); + + return rectangle; +}; diff --git a/Coolui v3 test/src/api/nitro/room/GetRoomObjectScreenLocation.ts b/Coolui v3 test/src/api/nitro/room/GetRoomObjectScreenLocation.ts new file mode 100644 index 0000000000..4152609413 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/room/GetRoomObjectScreenLocation.ts @@ -0,0 +1,13 @@ +import { GetRoomEngine } from '@nitrots/nitro-renderer'; + +export const GetRoomObjectScreenLocation = (roomId: number, objectId: number, category: number, canvasId = 1) => +{ + const point = GetRoomEngine().getRoomObjectScreenLocation(roomId, objectId, category, canvasId); + + if(!point) return null; + + point.x = Math.round(point.x); + point.y = Math.round(point.y); + + return point; +}; diff --git a/Coolui v3 test/src/api/nitro/room/InitializeRoomInstanceRenderingCanvas.ts b/Coolui v3 test/src/api/nitro/room/InitializeRoomInstanceRenderingCanvas.ts new file mode 100644 index 0000000000..1289b5effa --- /dev/null +++ b/Coolui v3 test/src/api/nitro/room/InitializeRoomInstanceRenderingCanvas.ts @@ -0,0 +1,9 @@ +import { GetRoomEngine } from '@nitrots/nitro-renderer'; + +export const InitializeRoomInstanceRenderingCanvas = (width: number, height: number, canvasId: number = 1) => +{ + const roomEngine = GetRoomEngine(); + const roomId = roomEngine.activeRoomId; + + roomEngine.initializeRoomInstanceRenderingCanvas(roomId, canvasId, width, height); +}; diff --git a/Coolui v3 test/src/api/nitro/room/IsFurnitureSelectionDisabled.ts b/Coolui v3 test/src/api/nitro/room/IsFurnitureSelectionDisabled.ts new file mode 100644 index 0000000000..e86f9a311a --- /dev/null +++ b/Coolui v3 test/src/api/nitro/room/IsFurnitureSelectionDisabled.ts @@ -0,0 +1,22 @@ +import { GetRoomEngine, GetSessionDataManager, RoomEngineObjectEvent, RoomObjectVariable } from '@nitrots/nitro-renderer'; + +export function IsFurnitureSelectionDisabled(event: RoomEngineObjectEvent): boolean +{ + let result = false; + + const roomObject = GetRoomEngine().getRoomObject(event.roomId, event.objectId, event.category); + + if(roomObject) + { + const selectionDisabled = (roomObject.model.getValue(RoomObjectVariable.FURNITURE_SELECTION_DISABLED) === 1); + + if(selectionDisabled) + { + result = true; + + if(GetSessionDataManager().isModerator) result = false; + } + } + + return result; +} diff --git a/Coolui v3 test/src/api/nitro/room/ProcessRoomObjectOperation.ts b/Coolui v3 test/src/api/nitro/room/ProcessRoomObjectOperation.ts new file mode 100644 index 0000000000..5a1c997472 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/room/ProcessRoomObjectOperation.ts @@ -0,0 +1,6 @@ +import { GetRoomEngine } from '@nitrots/nitro-renderer'; + +export function ProcessRoomObjectOperation(objectId: number, category: number, operation: string): void +{ + GetRoomEngine().processRoomObjectOperation(objectId, category, operation); +} diff --git a/Coolui v3 test/src/api/nitro/room/SetActiveRoomId.ts b/Coolui v3 test/src/api/nitro/room/SetActiveRoomId.ts new file mode 100644 index 0000000000..9446537e5c --- /dev/null +++ b/Coolui v3 test/src/api/nitro/room/SetActiveRoomId.ts @@ -0,0 +1,6 @@ +import { GetRoomEngine } from '@nitrots/nitro-renderer'; + +export function SetActiveRoomId(roomId: number): void +{ + GetRoomEngine().setActiveRoomId(roomId); +} diff --git a/Coolui v3 test/src/api/nitro/room/index.ts b/Coolui v3 test/src/api/nitro/room/index.ts new file mode 100644 index 0000000000..2af9c28594 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/room/index.ts @@ -0,0 +1,9 @@ +export * from './DispatchMouseEvent'; +export * from './DispatchTouchEvent'; +export * from './GetOwnRoomObject'; +export * from './GetRoomObjectBounds'; +export * from './GetRoomObjectScreenLocation'; +export * from './InitializeRoomInstanceRenderingCanvas'; +export * from './IsFurnitureSelectionDisabled'; +export * from './ProcessRoomObjectOperation'; +export * from './SetActiveRoomId'; diff --git a/Coolui v3 test/src/api/nitro/session/CanManipulateFurniture.ts b/Coolui v3 test/src/api/nitro/session/CanManipulateFurniture.ts new file mode 100644 index 0000000000..ba89efd5ae --- /dev/null +++ b/Coolui v3 test/src/api/nitro/session/CanManipulateFurniture.ts @@ -0,0 +1,9 @@ +import { GetRoomEngine, GetSessionDataManager, IRoomSession, RoomControllerLevel } from '@nitrots/nitro-renderer'; +import { IsOwnerOfFurniture } from './IsOwnerOfFurniture'; + +export function CanManipulateFurniture(roomSession: IRoomSession, objectId: number, category: number): boolean +{ + if(!roomSession) return false; + + return (roomSession.isRoomOwner || (roomSession.controllerLevel >= RoomControllerLevel.GUEST) || GetSessionDataManager().isModerator || IsOwnerOfFurniture(GetRoomEngine().getRoomObject(roomSession.roomId, objectId, category))); +} diff --git a/Coolui v3 test/src/api/nitro/session/CreateRoomSession.ts b/Coolui v3 test/src/api/nitro/session/CreateRoomSession.ts new file mode 100644 index 0000000000..3f12bb4f16 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/session/CreateRoomSession.ts @@ -0,0 +1,6 @@ +import { GetRoomSessionManager } from '@nitrots/nitro-renderer'; + +export function CreateRoomSession(roomId: number, password: string = null): void +{ + GetRoomSessionManager().createSession(roomId, password); +} diff --git a/Coolui v3 test/src/api/nitro/session/GetCanStandUp.ts b/Coolui v3 test/src/api/nitro/session/GetCanStandUp.ts new file mode 100644 index 0000000000..841ada94bb --- /dev/null +++ b/Coolui v3 test/src/api/nitro/session/GetCanStandUp.ts @@ -0,0 +1,13 @@ +import { AvatarAction, RoomObjectVariable } from '@nitrots/nitro-renderer'; +import { GetOwnRoomObject } from '../room'; + +export function GetCanStandUp(): string +{ + const roomObject = GetOwnRoomObject(); + + if(!roomObject) return AvatarAction.POSTURE_STAND; + + const model = roomObject.model; + + return model.getValue(RoomObjectVariable.FIGURE_CAN_STAND_UP); +} diff --git a/Coolui v3 test/src/api/nitro/session/GetCanUseExpression.ts b/Coolui v3 test/src/api/nitro/session/GetCanUseExpression.ts new file mode 100644 index 0000000000..da27f6a8f2 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/session/GetCanUseExpression.ts @@ -0,0 +1,14 @@ +import { RoomObjectVariable } from '@nitrots/nitro-renderer'; +import { GetOwnRoomObject } from '../room'; + +export function GetCanUseExpression(): boolean +{ + const roomObject = GetOwnRoomObject(); + + if(!roomObject) return false; + + const model = roomObject.model; + const effectId = model.getValue(RoomObjectVariable.FIGURE_EFFECT); + + return !((effectId === 29) || (effectId === 30) || (effectId === 185)); +} diff --git a/Coolui v3 test/src/api/nitro/session/GetClubMemberLevel.ts b/Coolui v3 test/src/api/nitro/session/GetClubMemberLevel.ts new file mode 100644 index 0000000000..d3cdc37947 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/session/GetClubMemberLevel.ts @@ -0,0 +1,9 @@ +import { GetSessionDataManager, HabboClubLevelEnum } from '@nitrots/nitro-renderer'; +import { GetConfigurationValue } from '../GetConfigurationValue'; + +export function GetClubMemberLevel(): number +{ + if(GetConfigurationValue('hc.disabled', false)) return HabboClubLevelEnum.VIP; + + return GetSessionDataManager().clubLevel; +} diff --git a/Coolui v3 test/src/api/nitro/session/GetFurnitureData.ts b/Coolui v3 test/src/api/nitro/session/GetFurnitureData.ts new file mode 100644 index 0000000000..b7646df25d --- /dev/null +++ b/Coolui v3 test/src/api/nitro/session/GetFurnitureData.ts @@ -0,0 +1,19 @@ +import { GetSessionDataManager, IFurnitureData } from '@nitrots/nitro-renderer'; +import { ProductTypeEnum } from '../../catalog'; + +export function GetFurnitureData(furniClassId: number, productType: string): IFurnitureData +{ + let furniData: IFurnitureData = null; + + switch(productType.toLowerCase()) + { + case ProductTypeEnum.FLOOR: + furniData = GetSessionDataManager().getFloorItemData(furniClassId); + break; + case ProductTypeEnum.WALL: + furniData = GetSessionDataManager().getWallItemData(furniClassId); + break; + } + + return furniData; +} diff --git a/Coolui v3 test/src/api/nitro/session/GetFurnitureDataForProductOffer.ts b/Coolui v3 test/src/api/nitro/session/GetFurnitureDataForProductOffer.ts new file mode 100644 index 0000000000..b0377651d9 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/session/GetFurnitureDataForProductOffer.ts @@ -0,0 +1,20 @@ +import { CatalogPageMessageProductData, FurnitureType, GetSessionDataManager, IFurnitureData } from '@nitrots/nitro-renderer'; + +export function GetFurnitureDataForProductOffer(offer: CatalogPageMessageProductData): IFurnitureData +{ + if (!offer) return null; + + let furniData: IFurnitureData = null; + + switch ((offer.productType) as FurnitureType) + { + case FurnitureType.FLOOR: + furniData = GetSessionDataManager().getFloorItemData(offer.furniClassId); + break; + case FurnitureType.WALL: + furniData = GetSessionDataManager().getWallItemData(offer.furniClassId); + break; + } + + return furniData; +} diff --git a/Coolui v3 test/src/api/nitro/session/GetFurnitureDataForRoomObject.ts b/Coolui v3 test/src/api/nitro/session/GetFurnitureDataForRoomObject.ts new file mode 100644 index 0000000000..fb76b9ebcf --- /dev/null +++ b/Coolui v3 test/src/api/nitro/session/GetFurnitureDataForRoomObject.ts @@ -0,0 +1,20 @@ +import { GetRoomEngine, GetSessionDataManager, IFurnitureData, RoomObjectCategory, RoomObjectVariable } from '@nitrots/nitro-renderer'; + +export function GetFurnitureDataForRoomObject(roomId: number, objectId: number, category: number): IFurnitureData +{ + const roomObject = GetRoomEngine().getRoomObject(roomId, objectId, category); + + if(!roomObject) return; + + const typeId = roomObject.model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID); + + switch(category) + { + case RoomObjectCategory.FLOOR: + return GetSessionDataManager().getFloorItemData(typeId); + case RoomObjectCategory.WALL: + return GetSessionDataManager().getWallItemData(typeId); + } + + return null; +} diff --git a/Coolui v3 test/src/api/nitro/session/GetOwnPosture.ts b/Coolui v3 test/src/api/nitro/session/GetOwnPosture.ts new file mode 100644 index 0000000000..ed2a698c40 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/session/GetOwnPosture.ts @@ -0,0 +1,13 @@ +import { AvatarAction, RoomObjectVariable } from '@nitrots/nitro-renderer'; +import { GetOwnRoomObject } from '../room'; + +export function GetOwnPosture(): string +{ + const roomObject = GetOwnRoomObject(); + + if(!roomObject) return AvatarAction.POSTURE_STAND; + + const model = roomObject.model; + + return model.getValue(RoomObjectVariable.FIGURE_POSTURE); +} diff --git a/Coolui v3 test/src/api/nitro/session/GetProductDataForLocalization.ts b/Coolui v3 test/src/api/nitro/session/GetProductDataForLocalization.ts new file mode 100644 index 0000000000..ac89803989 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/session/GetProductDataForLocalization.ts @@ -0,0 +1,8 @@ +import { GetSessionDataManager, IProductData } from '@nitrots/nitro-renderer'; + +export function GetProductDataForLocalization(localizationId: string): IProductData +{ + if(!localizationId) return null; + + return GetSessionDataManager().getProductData(localizationId); +} diff --git a/Coolui v3 test/src/api/nitro/session/GetRoomSession.ts b/Coolui v3 test/src/api/nitro/session/GetRoomSession.ts new file mode 100644 index 0000000000..da2af41564 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/session/GetRoomSession.ts @@ -0,0 +1,3 @@ +import { GetRoomSessionManager } from '@nitrots/nitro-renderer'; + +export const GetRoomSession = () => GetRoomSessionManager().getSession(-1); diff --git a/Coolui v3 test/src/api/nitro/session/GoToDesktop.ts b/Coolui v3 test/src/api/nitro/session/GoToDesktop.ts new file mode 100644 index 0000000000..34f2031f14 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/session/GoToDesktop.ts @@ -0,0 +1,7 @@ +import { DesktopViewComposer } from '@nitrots/nitro-renderer'; +import { SendMessageComposer } from '../SendMessageComposer'; + +export function GoToDesktop(): void +{ + SendMessageComposer(new DesktopViewComposer()); +} diff --git a/Coolui v3 test/src/api/nitro/session/HasHabboClub.ts b/Coolui v3 test/src/api/nitro/session/HasHabboClub.ts new file mode 100644 index 0000000000..9cee03f06d --- /dev/null +++ b/Coolui v3 test/src/api/nitro/session/HasHabboClub.ts @@ -0,0 +1,6 @@ +import { GetSessionDataManager, HabboClubLevelEnum } from '@nitrots/nitro-renderer'; + +export function HasHabboClub(): boolean +{ + return (GetSessionDataManager().clubLevel >= HabboClubLevelEnum.CLUB); +} diff --git a/Coolui v3 test/src/api/nitro/session/HasHabboVip.ts b/Coolui v3 test/src/api/nitro/session/HasHabboVip.ts new file mode 100644 index 0000000000..f5a3e21164 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/session/HasHabboVip.ts @@ -0,0 +1,6 @@ +import { GetSessionDataManager, HabboClubLevelEnum } from '@nitrots/nitro-renderer'; + +export function HasHabboVip(): boolean +{ + return (GetSessionDataManager().clubLevel >= HabboClubLevelEnum.VIP); +} diff --git a/Coolui v3 test/src/api/nitro/session/IsOwnerOfFloorFurniture.ts b/Coolui v3 test/src/api/nitro/session/IsOwnerOfFloorFurniture.ts new file mode 100644 index 0000000000..5675db94d1 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/session/IsOwnerOfFloorFurniture.ts @@ -0,0 +1,14 @@ +import { GetRoomEngine, GetSessionDataManager, RoomObjectCategory, RoomObjectVariable } from '@nitrots/nitro-renderer'; +import { GetRoomSession } from './GetRoomSession'; + +export function IsOwnerOfFloorFurniture(id: number): boolean +{ + const roomObject = GetRoomEngine().getRoomObject(GetRoomSession().roomId, id, RoomObjectCategory.FLOOR); + + if(!roomObject || !roomObject.model) return false; + + const userId = GetSessionDataManager().userId; + const objectOwnerId = roomObject.model.getValue(RoomObjectVariable.FURNITURE_OWNER_ID); + + return (userId === objectOwnerId); +} diff --git a/Coolui v3 test/src/api/nitro/session/IsOwnerOfFurniture.ts b/Coolui v3 test/src/api/nitro/session/IsOwnerOfFurniture.ts new file mode 100644 index 0000000000..49ce166da8 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/session/IsOwnerOfFurniture.ts @@ -0,0 +1,11 @@ +import { GetSessionDataManager, IRoomObject, RoomObjectVariable } from '@nitrots/nitro-renderer'; + +export function IsOwnerOfFurniture(roomObject: IRoomObject): boolean +{ + if(!roomObject || !roomObject.model) return false; + + const userId = GetSessionDataManager().userId; + const objectOwnerId = roomObject.model.getValue(RoomObjectVariable.FURNITURE_OWNER_ID); + + return (userId === objectOwnerId); +} diff --git a/Coolui v3 test/src/api/nitro/session/IsRidingHorse.ts b/Coolui v3 test/src/api/nitro/session/IsRidingHorse.ts new file mode 100644 index 0000000000..9c70b5dd70 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/session/IsRidingHorse.ts @@ -0,0 +1,14 @@ +import { RoomObjectVariable } from '@nitrots/nitro-renderer'; +import { GetOwnRoomObject } from '../room'; + +export function IsRidingHorse(): boolean +{ + const roomObject = GetOwnRoomObject(); + + if(!roomObject) return false; + + const model = roomObject.model; + const effectId = model.getValue(RoomObjectVariable.FIGURE_EFFECT); + + return (effectId === 77); +} diff --git a/Coolui v3 test/src/api/nitro/session/StartRoomSession.ts b/Coolui v3 test/src/api/nitro/session/StartRoomSession.ts new file mode 100644 index 0000000000..c203a77f23 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/session/StartRoomSession.ts @@ -0,0 +1,6 @@ +import { GetRoomSessionManager, IRoomSession } from '@nitrots/nitro-renderer'; + +export function StartRoomSession(session: IRoomSession): void +{ + GetRoomSessionManager().startSession(session); +} diff --git a/Coolui v3 test/src/api/nitro/session/VisitDesktop.ts b/Coolui v3 test/src/api/nitro/session/VisitDesktop.ts new file mode 100644 index 0000000000..2309f010a7 --- /dev/null +++ b/Coolui v3 test/src/api/nitro/session/VisitDesktop.ts @@ -0,0 +1,11 @@ +import { GetRoomSessionManager } from '@nitrots/nitro-renderer'; +import { GetRoomSession } from './GetRoomSession'; +import { GoToDesktop } from './GoToDesktop'; + +export const VisitDesktop = () => +{ + if(!GetRoomSession()) return; + + GoToDesktop(); + GetRoomSessionManager().removeSession(-1); +}; diff --git a/Coolui v3 test/src/api/nitro/session/index.ts b/Coolui v3 test/src/api/nitro/session/index.ts new file mode 100644 index 0000000000..4c0491d51a --- /dev/null +++ b/Coolui v3 test/src/api/nitro/session/index.ts @@ -0,0 +1,19 @@ +export * from './CanManipulateFurniture'; +export * from './CreateRoomSession'; +export * from './GetCanStandUp'; +export * from './GetCanUseExpression'; +export * from './GetClubMemberLevel'; +export * from './GetFurnitureData'; +export * from './GetFurnitureDataForProductOffer'; +export * from './GetFurnitureDataForRoomObject'; +export * from './GetOwnPosture'; +export * from './GetProductDataForLocalization'; +export * from './GetRoomSession'; +export * from './GoToDesktop'; +export * from './HasHabboClub'; +export * from './HasHabboVip'; +export * from './IsOwnerOfFloorFurniture'; +export * from './IsOwnerOfFurniture'; +export * from './IsRidingHorse'; +export * from './StartRoomSession'; +export * from './VisitDesktop'; diff --git a/Coolui v3 test/src/api/notification/NotificationAlertItem.ts b/Coolui v3 test/src/api/notification/NotificationAlertItem.ts new file mode 100644 index 0000000000..2d7702c7b9 --- /dev/null +++ b/Coolui v3 test/src/api/notification/NotificationAlertItem.ts @@ -0,0 +1,67 @@ +import { NotificationAlertType } from './NotificationAlertType'; + +export class NotificationAlertItem +{ + private static ITEM_ID: number = -1; + + private _id: number; + private _messages: string[]; + private _alertType: string; + private _clickUrl: string; + private _clickUrlText: string; + private _title: string; + private _imageUrl: string; + + constructor(messages: string[], alertType: string = NotificationAlertType.DEFAULT, clickUrl: string = null, clickUrlText: string = null, title: string = null, imageUrl: string = null) + { + NotificationAlertItem.ITEM_ID += 1; + + this._id = NotificationAlertItem.ITEM_ID; + this._messages = messages; + this._alertType = alertType; + this._clickUrl = clickUrl; + this._clickUrlText = clickUrlText; + this._title = title; + this._imageUrl = imageUrl; + } + + public get id(): number + { + return this._id; + } + + public get messages(): string[] + { + return this._messages; + } + + public set alertType(alertType: string) + { + this._alertType = alertType; + } + + public get alertType(): string + { + return this._alertType; + } + + public get clickUrl(): string + { + return this._clickUrl; + } + + public get clickUrlText(): string + { + return this._clickUrlText; + } + + public get title(): string + { + return this._title; + } + + public get imageUrl(): string + { + return this._imageUrl; + } +} diff --git a/Coolui v3 test/src/api/notification/NotificationAlertType.ts b/Coolui v3 test/src/api/notification/NotificationAlertType.ts new file mode 100644 index 0000000000..ad804e806c --- /dev/null +++ b/Coolui v3 test/src/api/notification/NotificationAlertType.ts @@ -0,0 +1,10 @@ +export class NotificationAlertType +{ + public static DEFAULT: string = 'default'; + public static MOTD: string = 'motd'; + public static MODERATION: string = 'moderation'; + public static EVENT: string = 'event'; + public static NITRO: string = 'nitro'; + public static SEARCH: string = 'search'; + public static ALERT: string = 'alert'; +} diff --git a/Coolui v3 test/src/api/notification/NotificationBubbleItem.ts b/Coolui v3 test/src/api/notification/NotificationBubbleItem.ts new file mode 100644 index 0000000000..fe90dab700 --- /dev/null +++ b/Coolui v3 test/src/api/notification/NotificationBubbleItem.ts @@ -0,0 +1,48 @@ +import { NotificationBubbleType } from './NotificationBubbleType'; + +export class NotificationBubbleItem +{ + private static ITEM_ID: number = -1; + + private _id: number; + private _message: string; + private _notificationType: string; + private _iconUrl: string; + private _linkUrl: string; + + constructor(message: string, notificationType: string = NotificationBubbleType.INFO, iconUrl: string = null, linkUrl: string = null) + { + NotificationBubbleItem.ITEM_ID += 1; + + this._id = NotificationBubbleItem.ITEM_ID; + this._message = message; + this._notificationType = notificationType; + this._iconUrl = iconUrl; + this._linkUrl = linkUrl; + } + + public get id(): number + { + return this._id; + } + + public get message(): string + { + return this._message; + } + + public get notificationType(): string + { + return this._notificationType; + } + + public get iconUrl(): string + { + return this._iconUrl; + } + + public get linkUrl(): string + { + return this._linkUrl; + } +} diff --git a/Coolui v3 test/src/api/notification/NotificationBubbleType.ts b/Coolui v3 test/src/api/notification/NotificationBubbleType.ts new file mode 100644 index 0000000000..858573b503 --- /dev/null +++ b/Coolui v3 test/src/api/notification/NotificationBubbleType.ts @@ -0,0 +1,19 @@ +export class NotificationBubbleType +{ + public static FRIENDOFFLINE: string = 'friendoffline'; + public static FRIENDONLINE: string = 'friendonline'; + public static THIRDPARTYFRIENDOFFLINE: string = 'thirdpartyfriendoffline'; + public static THIRDPARTYFRIENDONLINE: string = 'thirdpartyfriendonline'; + public static ACHIEVEMENT: string = 'achievement'; + public static BADGE_RECEIVED: string = 'badge_received'; + public static INFO: string = 'info'; + public static RECYCLEROK: string = 'recyclerok'; + public static RESPECT: string = 'respect'; + public static CLUB: string = 'club'; + public static SOUNDMACHINE: string = 'soundmachine'; + public static PETLEVEL: string = 'petlevel'; + public static CLUBGIFT: string = 'clubgift'; + public static BUYFURNI: string = 'buyfurni'; + public static VIP: string = 'vip'; + public static ROOMMESSAGESPOSTED: string = 'roommessagesposted'; +} diff --git a/Coolui v3 test/src/api/notification/NotificationConfirmItem.ts b/Coolui v3 test/src/api/notification/NotificationConfirmItem.ts new file mode 100644 index 0000000000..045566264b --- /dev/null +++ b/Coolui v3 test/src/api/notification/NotificationConfirmItem.ts @@ -0,0 +1,67 @@ +export class NotificationConfirmItem +{ + private static ITEM_ID: number = -1; + + private _id: number; + private _confirmType: string; + private _message: string; + private _onConfirm: Function; + private _onCancel: Function; + private _confirmText: string; + private _cancelText: string; + private _title: string; + + constructor(confirmType: string, message: string, onConfirm: Function, onCancel: Function, confirmText: string, cancelText: string, title: string) + { + NotificationConfirmItem.ITEM_ID += 1; + + this._id = NotificationConfirmItem.ITEM_ID; + this._confirmType = confirmType; + this._message = message; + this._onConfirm = onConfirm; + this._onCancel = onCancel; + this._confirmText = confirmText; + this._cancelText = cancelText; + this._title = title; + } + + public get id(): number + { + return this._id; + } + + public get confirmType(): string + { + return this._confirmType; + } + + public get message(): string + { + return this._message; + } + + public get onConfirm(): Function + { + return this._onConfirm; + } + + public get onCancel(): Function + { + return this._onCancel; + } + + public get confirmText(): string + { + return this._confirmText; + } + + public get cancelText(): string + { + return this._cancelText; + } + + public get title(): string + { + return this._title; + } +} diff --git a/Coolui v3 test/src/api/notification/NotificationConfirmType.ts b/Coolui v3 test/src/api/notification/NotificationConfirmType.ts new file mode 100644 index 0000000000..533ca053fd --- /dev/null +++ b/Coolui v3 test/src/api/notification/NotificationConfirmType.ts @@ -0,0 +1,4 @@ +export class NotificationConfirmType +{ + public static DEFAULT: string = 'default'; +} diff --git a/Coolui v3 test/src/api/notification/index.ts b/Coolui v3 test/src/api/notification/index.ts new file mode 100644 index 0000000000..23476d358a --- /dev/null +++ b/Coolui v3 test/src/api/notification/index.ts @@ -0,0 +1,6 @@ +export * from './NotificationAlertItem'; +export * from './NotificationAlertType'; +export * from './NotificationBubbleItem'; +export * from './NotificationBubbleType'; +export * from './NotificationConfirmItem'; +export * from './NotificationConfirmType'; diff --git a/Coolui v3 test/src/api/purse/IPurse.ts b/Coolui v3 test/src/api/purse/IPurse.ts new file mode 100644 index 0000000000..9fffb188ee --- /dev/null +++ b/Coolui v3 test/src/api/purse/IPurse.ts @@ -0,0 +1,15 @@ +export interface IPurse +{ + credits: number; + activityPoints: Map; + clubDays: number; + clubPeriods: number; + hasClubLeft: boolean; + isVip: boolean; + pastClubDays: number; + pastVipDays: number; + isExpiring: boolean; + minutesUntilExpiration: number; + minutesSinceLastModified: number; + clubLevel: number; +} diff --git a/Coolui v3 test/src/api/purse/Purse.ts b/Coolui v3 test/src/api/purse/Purse.ts new file mode 100644 index 0000000000..6970e59c53 --- /dev/null +++ b/Coolui v3 test/src/api/purse/Purse.ts @@ -0,0 +1,165 @@ +import { GetTickerTime, HabboClubLevelEnum } from '@nitrots/nitro-renderer'; +import { IPurse } from './IPurse'; + +export class Purse implements IPurse +{ + private _credits: number = 0; + private _activityPoints: Map = new Map(); + private _clubDays: number = 0; + private _clubPeriods: number = 0; + private _isVIP: boolean = false; + private _pastClubDays: number = 0; + private _pastVipDays: number = 0; + private _isExpiring: boolean = false; + private _minutesUntilExpiration: number = 0; + private _minutesSinceLastModified: number = 0; + private _lastUpdated: number = 0; + + public static from(purse: Purse): Purse + { + const newPurse = new Purse(); + + newPurse._credits = purse._credits; + newPurse._activityPoints = purse._activityPoints; + newPurse._clubDays = purse._clubDays; + newPurse._clubPeriods = purse._clubPeriods; + newPurse._isVIP = purse._isVIP; + newPurse._pastClubDays = purse._pastClubDays; + newPurse._pastVipDays = purse._pastVipDays; + newPurse._isExpiring = purse._isExpiring; + newPurse._minutesUntilExpiration = purse._minutesUntilExpiration; + newPurse._minutesSinceLastModified = purse._minutesSinceLastModified; + newPurse._lastUpdated = purse._lastUpdated; + + return newPurse; + } + + public get credits(): number + { + return this._credits; + } + + public set credits(credits: number) + { + this._lastUpdated = GetTickerTime(); + this._credits = credits; + } + + public get activityPoints(): Map + { + return this._activityPoints; + } + + public set activityPoints(k: Map) + { + this._lastUpdated = GetTickerTime(); + this._activityPoints = k; + } + + public get clubDays(): number + { + return this._clubDays; + } + + public set clubDays(k: number) + { + this._lastUpdated = GetTickerTime(); + this._clubDays = k; + } + + public get clubPeriods(): number + { + return this._clubPeriods; + } + + public set clubPeriods(k: number) + { + this._lastUpdated = GetTickerTime(); + this._clubPeriods = k; + } + + public get hasClubLeft(): boolean + { + return (this._clubDays > 0) || (this._clubPeriods > 0); + } + + public get isVip(): boolean + { + return this._isVIP; + } + + public set isVip(k: boolean) + { + this._isVIP = k; + } + + public get pastClubDays(): number + { + return this._pastClubDays; + } + + public set pastClubDays(k: number) + { + this._lastUpdated = GetTickerTime(); + this._pastClubDays = k; + } + + public get pastVipDays(): number + { + return this._pastVipDays; + } + + public set pastVipDays(k: number) + { + this._lastUpdated = GetTickerTime(); + this._pastVipDays = k; + } + + public get isExpiring(): boolean + { + return this._isExpiring; + } + + public set isExpiring(k: boolean) + { + this._isExpiring = k; + } + + public get minutesUntilExpiration(): number + { + var k: number = ((GetTickerTime() - this._lastUpdated) / (1000 * 60)); + var _local_2: number = (this._minutesUntilExpiration - k); + return (_local_2 > 0) ? _local_2 : 0; + } + + public set minutesUntilExpiration(k: number) + { + this._lastUpdated = GetTickerTime(); + this._minutesUntilExpiration = k; + } + + public get minutesSinceLastModified(): number + { + return this._minutesSinceLastModified; + } + + public set minutesSinceLastModified(k: number) + { + this._lastUpdated = GetTickerTime(); + this._minutesSinceLastModified = k; + } + + public get lastUpdated(): number + { + return this._lastUpdated; + } + + public get clubLevel(): number + { + if(((this.clubDays === 0) && (this.clubPeriods === 0))) return HabboClubLevelEnum.NO_CLUB; + + if(this.isVip) return HabboClubLevelEnum.VIP; + + return HabboClubLevelEnum.CLUB; + } +} diff --git a/Coolui v3 test/src/api/purse/index.ts b/Coolui v3 test/src/api/purse/index.ts new file mode 100644 index 0000000000..ed34480480 --- /dev/null +++ b/Coolui v3 test/src/api/purse/index.ts @@ -0,0 +1,2 @@ +export * from './IPurse'; +export * from './Purse'; diff --git a/Coolui v3 test/src/api/room/events/RoomWidgetPollUpdateEvent.ts b/Coolui v3 test/src/api/room/events/RoomWidgetPollUpdateEvent.ts new file mode 100644 index 0000000000..edfb8fd0d2 --- /dev/null +++ b/Coolui v3 test/src/api/room/events/RoomWidgetPollUpdateEvent.ts @@ -0,0 +1,110 @@ +import { IPollQuestion } from '@nitrots/nitro-renderer'; +import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent'; + +export class RoomWidgetPollUpdateEvent extends RoomWidgetUpdateEvent +{ + public static readonly OFFER = 'RWPUW_OFFER'; + public static readonly ERROR = 'RWPUW_ERROR'; + public static readonly CONTENT = 'RWPUW_CONTENT'; + + private _id = -1; + private _summary: string; + private _headline: string; + private _numQuestions = 0; + private _startMessage = ''; + private _endMessage = ''; + private _questionArray: IPollQuestion[] = null; + private _pollType = ''; + private _npsPoll = false; + + constructor(type: string, id: number) + { + super(type); + this._id = id; + } + + public get id(): number + { + return this._id; + } + + public get summary(): string + { + return this._summary; + } + + public set summary(k: string) + { + this._summary = k; + } + + public get headline(): string + { + return this._headline; + } + + public set headline(k: string) + { + this._headline = k; + } + + public get numQuestions(): number + { + return this._numQuestions; + } + + public set numQuestions(k: number) + { + this._numQuestions = k; + } + + public get startMessage(): string + { + return this._startMessage; + } + + public set startMessage(k: string) + { + this._startMessage = k; + } + + public get endMessage(): string + { + return this._endMessage; + } + + public set endMessage(k: string) + { + this._endMessage = k; + } + + public get questionArray(): IPollQuestion[] + { + return this._questionArray; + } + + public set questionArray(k: IPollQuestion[]) + { + this._questionArray = k; + } + + public get pollType(): string + { + return this._pollType; + } + + public set pollType(k: string) + { + this._pollType = k; + } + + public get npsPoll(): boolean + { + return this._npsPoll; + } + + public set npsPoll(k: boolean) + { + this._npsPoll = k; + } +} diff --git a/Coolui v3 test/src/api/room/events/RoomWidgetUpdateBackgroundColorPreviewEvent.ts b/Coolui v3 test/src/api/room/events/RoomWidgetUpdateBackgroundColorPreviewEvent.ts new file mode 100644 index 0000000000..30135a3b4e --- /dev/null +++ b/Coolui v3 test/src/api/room/events/RoomWidgetUpdateBackgroundColorPreviewEvent.ts @@ -0,0 +1,35 @@ +import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent'; + +export class RoomWidgetUpdateBackgroundColorPreviewEvent extends RoomWidgetUpdateEvent +{ + public static PREVIEW = 'RWUBCPE_PREVIEW'; + public static CLEAR_PREVIEW = 'RWUBCPE_CLEAR_PREVIEW'; + + private _hue: number; + private _saturation: number; + private _lightness: number; + + constructor(type: string, hue: number = 0, saturation: number = 0, lightness: number = 0) + { + super(type); + + this._hue = hue; + this._saturation = saturation; + this._lightness = lightness; + } + + public get hue(): number + { + return this._hue; + } + + public get saturation(): number + { + return this._saturation; + } + + public get lightness(): number + { + return this._lightness; + } +} diff --git a/Coolui v3 test/src/api/room/events/RoomWidgetUpdateChatInputContentEvent.ts b/Coolui v3 test/src/api/room/events/RoomWidgetUpdateChatInputContentEvent.ts new file mode 100644 index 0000000000..9352372fac --- /dev/null +++ b/Coolui v3 test/src/api/room/events/RoomWidgetUpdateChatInputContentEvent.ts @@ -0,0 +1,29 @@ +import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent'; + +export class RoomWidgetUpdateChatInputContentEvent extends RoomWidgetUpdateEvent +{ + public static CHAT_INPUT_CONTENT: string = 'RWUCICE_CHAT_INPUT_CONTENT'; + public static WHISPER: string = 'whisper'; + public static SHOUT: string = 'shout'; + + private _chatMode: string = ''; + private _userName: string = ''; + + constructor(chatMode: string, userName: string) + { + super(RoomWidgetUpdateChatInputContentEvent.CHAT_INPUT_CONTENT); + + this._chatMode = chatMode; + this._userName = userName; + } + + public get chatMode(): string + { + return this._chatMode; + } + + public get userName(): string + { + return this._userName; + } +} diff --git a/Coolui v3 test/src/api/room/events/RoomWidgetUpdateEvent.ts b/Coolui v3 test/src/api/room/events/RoomWidgetUpdateEvent.ts new file mode 100644 index 0000000000..0ac8ff816c --- /dev/null +++ b/Coolui v3 test/src/api/room/events/RoomWidgetUpdateEvent.ts @@ -0,0 +1,4 @@ +import { NitroEvent } from '@nitrots/nitro-renderer'; + +export class RoomWidgetUpdateEvent extends NitroEvent +{} diff --git a/Coolui v3 test/src/api/room/events/RoomWidgetUpdateRentableBotChatEvent.ts b/Coolui v3 test/src/api/room/events/RoomWidgetUpdateRentableBotChatEvent.ts new file mode 100644 index 0000000000..6191e1b995 --- /dev/null +++ b/Coolui v3 test/src/api/room/events/RoomWidgetUpdateRentableBotChatEvent.ts @@ -0,0 +1,62 @@ +import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent'; + +export class RoomWidgetUpdateRentableBotChatEvent extends RoomWidgetUpdateEvent +{ + public static UPDATE_CHAT: string = 'RWURBCE_UPDATE_CHAT'; + + private _objectId: number; + private _category: number; + private _botId: number; + private _chat: string; + private _automaticChat: boolean; + private _chatDelay: number; + private _mixSentences: boolean; + + constructor(objectId: number, category: number, botId: number, chat: string, automaticChat: boolean, chatDelay: number, mixSentences: boolean) + { + super(RoomWidgetUpdateRentableBotChatEvent.UPDATE_CHAT); + + this._objectId = objectId; + this._category = category; + this._botId = botId; + this._chat = chat; + this._automaticChat = automaticChat; + this._chatDelay = chatDelay; + this._mixSentences = mixSentences; + } + + public get objectId(): number + { + return this._objectId; + } + + public get category(): number + { + return this._category; + } + + public get botId(): number + { + return this._botId; + } + + public get chat(): string + { + return this._chat; + } + + public get automaticChat(): boolean + { + return this._automaticChat; + } + + public get chatDelay(): number + { + return this._chatDelay; + } + + public get mixSentences(): boolean + { + return this._mixSentences; + } +} diff --git a/Coolui v3 test/src/api/room/events/RoomWidgetUpdateRoomObjectEvent.ts b/Coolui v3 test/src/api/room/events/RoomWidgetUpdateRoomObjectEvent.ts new file mode 100644 index 0000000000..0660276c06 --- /dev/null +++ b/Coolui v3 test/src/api/room/events/RoomWidgetUpdateRoomObjectEvent.ts @@ -0,0 +1,43 @@ +import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent'; + +export class RoomWidgetUpdateRoomObjectEvent extends RoomWidgetUpdateEvent +{ + public static OBJECT_SELECTED: string = 'RWUROE_OBJECT_SELECTED'; + public static OBJECT_DESELECTED: string = 'RWUROE_OBJECT_DESELECTED'; + public static USER_REMOVED: string = 'RWUROE_USER_REMOVED'; + public static FURNI_REMOVED: string = 'RWUROE_FURNI_REMOVED'; + public static FURNI_ADDED: string = 'RWUROE_FURNI_ADDED'; + public static USER_ADDED: string = 'RWUROE_USER_ADDED'; + public static OBJECT_ROLL_OVER: string = 'RWUROE_OBJECT_ROLL_OVER'; + public static OBJECT_ROLL_OUT: string = 'RWUROE_OBJECT_ROLL_OUT'; + public static OBJECT_REQUEST_MANIPULATION: string = 'RWUROE_OBJECT_REQUEST_MANIPULATION'; + public static OBJECT_DOUBLE_CLICKED: string = 'RWUROE_OBJECT_DOUBLE_CLICKED'; + + private _id: number; + private _category: number; + private _roomId: number; + + constructor(type: string, id: number, category: number, roomId: number) + { + super(type); + + this._id = id; + this._category = category; + this._roomId = roomId; + } + + public get id(): number + { + return this._id; + } + + public get category(): number + { + return this._category; + } + + public get roomId(): number + { + return this._roomId; + } +} diff --git a/Coolui v3 test/src/api/room/events/index.ts b/Coolui v3 test/src/api/room/events/index.ts new file mode 100644 index 0000000000..e5ed0d8c6b --- /dev/null +++ b/Coolui v3 test/src/api/room/events/index.ts @@ -0,0 +1,6 @@ +export * from './RoomWidgetPollUpdateEvent'; +export * from './RoomWidgetUpdateBackgroundColorPreviewEvent'; +export * from './RoomWidgetUpdateChatInputContentEvent'; +export * from './RoomWidgetUpdateEvent'; +export * from './RoomWidgetUpdateRentableBotChatEvent'; +export * from './RoomWidgetUpdateRoomObjectEvent'; diff --git a/Coolui v3 test/src/api/room/index.ts b/Coolui v3 test/src/api/room/index.ts new file mode 100644 index 0000000000..56aea79e46 --- /dev/null +++ b/Coolui v3 test/src/api/room/index.ts @@ -0,0 +1,2 @@ +export * from './events'; +export * from './widgets'; diff --git a/Coolui v3 test/src/api/room/widgets/AvatarInfoFurni.ts b/Coolui v3 test/src/api/room/widgets/AvatarInfoFurni.ts new file mode 100644 index 0000000000..47743e9712 --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/AvatarInfoFurni.ts @@ -0,0 +1,37 @@ +import { IObjectData } from '@nitrots/nitro-renderer'; +import { IAvatarInfo } from './IAvatarInfo'; + +export class AvatarInfoFurni implements IAvatarInfo +{ + public static FURNI: string = 'IFI_FURNI'; + + public id: number = 0; + public category: number = 0; + public name: string = ''; + public description: string = ''; + public isWallItem: boolean = false; + public isStickie: boolean = false; + public isRoomOwner: boolean = false; + public roomControllerLevel: number = 0; + public isAnyRoomController: boolean = false; + public expiration: number = -1; + public purchaseCatalogPageId: number = -1; + public purchaseOfferId: number = -1; + public extraParam: string = ''; + public isOwner: boolean = false; + public stuffData: IObjectData = null; + public groupId: number = 0; + public ownerId: number = 0; + public ownerName: string = ''; + public usagePolicy: number = 0; + public rentCatalogPageId: number = -1; + public rentOfferId: number = -1; + public purchaseCouldBeUsedForBuyout: boolean = false; + public rentCouldBeUsedForBuyout: boolean = false; + public availableForBuildersClub: boolean = false; + public tileSizeX: number = 1; + public tileSizeY: number = 1; + + constructor(public readonly type: string) + {} +} diff --git a/Coolui v3 test/src/api/room/widgets/AvatarInfoName.ts b/Coolui v3 test/src/api/room/widgets/AvatarInfoName.ts new file mode 100644 index 0000000000..66a6a7e3d6 --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/AvatarInfoName.ts @@ -0,0 +1,11 @@ +export class AvatarInfoName +{ + constructor( + public readonly roomIndex: number, + public readonly category: number, + public readonly id: number, + public readonly name: string, + public readonly userType: number, + public readonly isFriend: boolean = false) + {} +} diff --git a/Coolui v3 test/src/api/room/widgets/AvatarInfoPet.ts b/Coolui v3 test/src/api/room/widgets/AvatarInfoPet.ts new file mode 100644 index 0000000000..0c0435a934 --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/AvatarInfoPet.ts @@ -0,0 +1,46 @@ +import { IAvatarInfo } from './IAvatarInfo'; + +export class AvatarInfoPet implements IAvatarInfo +{ + public static PET_INFO: string = 'IPI_PET_INFO'; + + public level: number = 0; + public maximumLevel: number = 0; + public experience: number = 0; + public levelExperienceGoal: number = 0; + public energy: number = 0; + public maximumEnergy: number = 0; + public happyness: number = 0; + public maximumHappyness: number = 0; + public respectsPetLeft: number = 0; + public respect: number = 0; + public age: number = 0; + public name: string = ''; + public id: number = -1; + public image: HTMLImageElement = null; + public petType: number = 0; + public petBreed: number = 0; + public petFigure: string = ''; + public posture: string = 'std'; + public isOwner: boolean = false; + public ownerId: number = -1; + public ownerName: string = ''; + public canRemovePet: boolean = false; + public roomIndex: number = 0; + public unknownRarityLevel: number = 0; + public saddle: boolean = false; + public rider: boolean = false; + public breedable: boolean = false; + public skillTresholds: number[] = []; + public publiclyRideable: number = 0; + public fullyGrown: boolean = false; + public dead: boolean = false; + public rarityLevel: number = 0; + public maximumTimeToLive: number = 0; + public remainingTimeToLive: number = 0; + public remainingGrowTime: number = 0; + public publiclyBreedable: boolean = false; + + constructor(public readonly type: string) + {} +} diff --git a/Coolui v3 test/src/api/room/widgets/AvatarInfoRentableBot.ts b/Coolui v3 test/src/api/room/widgets/AvatarInfoRentableBot.ts new file mode 100644 index 0000000000..77fb10ca5b --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/AvatarInfoRentableBot.ts @@ -0,0 +1,23 @@ +import { IAvatarInfo } from './IAvatarInfo'; + +export class AvatarInfoRentableBot implements IAvatarInfo +{ + public static RENTABLE_BOT: string = 'IRBI_RENTABLE_BOT'; + + public name: string = ''; + public motto: string = ''; + public webID: number = 0; + public figure: string = ''; + public badges: string[] = []; + public carryItem: number = 0; + public roomIndex: number = 0; + public amIOwner: boolean = false; + public amIAnyRoomController: boolean = false; + public roomControllerLevel: number = 0; + public ownerId: number = -1; + public ownerName: string = ''; + public botSkills: number[] = []; + + constructor(public readonly type: string) + {} +} diff --git a/Coolui v3 test/src/api/room/widgets/AvatarInfoUser.ts b/Coolui v3 test/src/api/room/widgets/AvatarInfoUser.ts new file mode 100644 index 0000000000..fa3fc1ab04 --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/AvatarInfoUser.ts @@ -0,0 +1,52 @@ +import { IAvatarInfo } from './IAvatarInfo'; + +export class AvatarInfoUser implements IAvatarInfo +{ + public static OWN_USER: string = 'IUI_OWN_USER'; + public static PEER: string = 'IUI_PEER'; + public static BOT: string = 'IUI_BOT'; + public static TRADE_REASON_OK: number = 0; + public static TRADE_REASON_SHUTDOWN: number = 2; + public static TRADE_REASON_NO_TRADING: number = 3; + public static DEFAULT_BOT_BADGE_ID: string = 'BOT'; + + public name: string = ''; + public motto: string = ''; + public achievementScore: number = 0; + public backgroundId: number = 0; + public standId: number = 0; + public overlayId: number = 0; + public webID: number = 0; + public xp: number = 0; + public userType: number = -1; + public figure: string = ''; + public badges: string[] = []; + public groupId: number = 0; + public groupName: string = ''; + public groupBadgeId: string = ''; + public carryItem: number = 0; + public roomIndex: number = 0; + public isSpectatorMode: boolean = false; + public allowNameChange: boolean = false; + public amIOwner: boolean = false; + public amIAnyRoomController: boolean = false; + public roomControllerLevel: number = 0; + public canBeKicked: boolean = false; + public canBeBanned: boolean = false; + public canBeMuted: boolean = false; + public respectLeft: number = 0; + public isIgnored: boolean = false; + public isGuildRoom: boolean = false; + public canTrade: boolean = false; + public canTradeReason: number = 0; + public targetRoomControllerLevel: number = 0; + public isAmbassador: boolean = false; + + constructor(public readonly type: string) + {} + + public get isOwnUser(): boolean + { + return (this.type === AvatarInfoUser.OWN_USER); + } +} diff --git a/Coolui v3 test/src/api/room/widgets/AvatarInfoUtilities.ts b/Coolui v3 test/src/api/room/widgets/AvatarInfoUtilities.ts new file mode 100644 index 0000000000..b8154ee6b4 --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/AvatarInfoUtilities.ts @@ -0,0 +1,442 @@ +import { GetRoomEngine, GetSessionDataManager, GetTickerTime, IFurnitureData, IRoomModerationSettings, IRoomPetData, IRoomUserData, ObjectDataFactory, PetFigureData, PetType, RoomControllerLevel, RoomModerationSettings, RoomObjectCategory, RoomObjectType, RoomObjectVariable, RoomTradingLevelEnum, RoomWidgetEnumItemExtradataParameter } from '@nitrots/nitro-renderer'; +import { GetRoomSession, IsOwnerOfFurniture } from '../../nitro'; +import { LocalizeText } from '../../utils'; +import { AvatarInfoFurni } from './AvatarInfoFurni'; +import { AvatarInfoName } from './AvatarInfoName'; +import { AvatarInfoPet } from './AvatarInfoPet'; +import { AvatarInfoRentableBot } from './AvatarInfoRentableBot'; +import { AvatarInfoUser } from './AvatarInfoUser'; + +export class AvatarInfoUtilities +{ + public static getObjectName(objectId: number, category: number): AvatarInfoName + { + const roomSession = GetRoomSession(); + + let id = -1; + let name: string = null; + let userType = 0; + + switch(category) + { + case RoomObjectCategory.FLOOR: + case RoomObjectCategory.WALL: { + const roomObject = GetRoomEngine().getRoomObject(roomSession.roomId, objectId, category); + + if(!roomObject) break; + + if(roomObject.type.indexOf('poster') === 0) + { + name = LocalizeText('${poster_' + parseInt(roomObject.type.replace('poster', '')) + '_name}'); + } + else + { + let furniData: IFurnitureData = null; + + const typeId = roomObject.model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID); + + if(category === RoomObjectCategory.FLOOR) + { + furniData = GetSessionDataManager().getFloorItemData(typeId); + } + + else if(category === RoomObjectCategory.WALL) + { + furniData = GetSessionDataManager().getWallItemData(typeId); + } + + if(!furniData) break; + + id = furniData.id; + name = furniData.name; + } + break; + } + case RoomObjectCategory.UNIT: { + const userData = roomSession.userDataManager.getUserDataByIndex(objectId); + + if(!userData) break; + + id = userData.webID; + name = userData.name; + userType = userData.type; + break; + } + } + + if(!name || !name.length) return null; + + return new AvatarInfoName(objectId, category, id, name, userType); + } + + public static getFurniInfo(objectId: number, category: number): AvatarInfoFurni + { + const roomSession = GetRoomSession(); + const roomObject = GetRoomEngine().getRoomObject(roomSession.roomId, objectId, category); + + if(!roomObject) return null; + + const furniInfo = new AvatarInfoFurni(AvatarInfoFurni.FURNI); + + furniInfo.id = objectId; + furniInfo.category = category; + + const model = roomObject.model; + + if(model.getValue(RoomWidgetEnumItemExtradataParameter.INFOSTAND_EXTRA_PARAM)) furniInfo.extraParam = model.getValue(RoomWidgetEnumItemExtradataParameter.INFOSTAND_EXTRA_PARAM); + + const objectData = ObjectDataFactory.getData(model.getValue(RoomObjectVariable.FURNITURE_DATA_FORMAT)); + + objectData.initializeFromRoomObjectModel(model); + + furniInfo.stuffData = objectData; + + const objectType = roomObject.type; + + if(objectType.indexOf('poster') === 0) + { + const posterId = parseInt(objectType.replace('poster', '')); + + furniInfo.name = LocalizeText(('${poster_' + posterId) + '_name}'); + furniInfo.description = LocalizeText(('${poster_' + posterId) + '_desc}'); + } + else + { + const typeId = model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID); + + let furnitureData: IFurnitureData = null; + + if(category === RoomObjectCategory.FLOOR) + { + furnitureData = GetSessionDataManager().getFloorItemData(typeId); + } + + else if(category === RoomObjectCategory.WALL) + { + furnitureData = GetSessionDataManager().getWallItemData(typeId); + } + + if(furnitureData) + { + furniInfo.name = furnitureData.name; + furniInfo.description = furnitureData.description; + furniInfo.purchaseOfferId = furnitureData.purchaseOfferId; + furniInfo.purchaseCouldBeUsedForBuyout = furnitureData.purchaseCouldBeUsedForBuyout; + furniInfo.rentOfferId = furnitureData.rentOfferId; + furniInfo.rentCouldBeUsedForBuyout = furnitureData.rentCouldBeUsedForBuyout; + furniInfo.availableForBuildersClub = furnitureData.availableForBuildersClub; + furniInfo.tileSizeX = furnitureData.tileSizeX; + furniInfo.tileSizeY = furnitureData.tileSizeY; + } + } + + if(objectType.indexOf('post_it') > -1) furniInfo.isStickie = true; + + const expiryTime = model.getValue(RoomObjectVariable.FURNITURE_EXPIRY_TIME); + const expiryTimestamp = model.getValue(RoomObjectVariable.FURNITURE_EXPIRTY_TIMESTAMP); + + furniInfo.expiration = ((expiryTime < 0) ? expiryTime : Math.max(0, (expiryTime - ((GetTickerTime() - expiryTimestamp) / 1000)))); + + /* let roomObjectImage = GetRoomEngine().getRoomObjectImage(roomSession.roomId, objectId, category, new Vector3d(180), 64, null); + + if(!roomObjectImage.data || (roomObjectImage.data.width > 140) || (roomObjectImage.data.height > 200)) + { + roomObjectImage = GetRoomEngine().getRoomObjectImage(roomSession.roomId, objectId, category, new Vector3d(180), 1, null); + } + + furniInfo.image = roomObjectImage.getImage(); */ + furniInfo.isWallItem = (category === RoomObjectCategory.WALL); + furniInfo.isRoomOwner = roomSession.isRoomOwner; + furniInfo.roomControllerLevel = roomSession.controllerLevel; + furniInfo.isAnyRoomController = GetSessionDataManager().isModerator; + furniInfo.ownerId = model.getValue(RoomObjectVariable.FURNITURE_OWNER_ID); + furniInfo.ownerName = model.getValue(RoomObjectVariable.FURNITURE_OWNER_NAME); + furniInfo.usagePolicy = model.getValue(RoomObjectVariable.FURNITURE_USAGE_POLICY); + + const guildId = model.getValue(RoomObjectVariable.FURNITURE_GUILD_CUSTOMIZED_GUILD_ID); + + if(guildId !== 0) furniInfo.groupId = guildId; + + if(IsOwnerOfFurniture(roomObject)) furniInfo.isOwner = true; + + return furniInfo; + } + + public static getUserInfo(category: number, userData: IRoomUserData): AvatarInfoUser + { + const roomSession = GetRoomSession(); + + const userInfo = new AvatarInfoUser((userData.webID === GetSessionDataManager().userId) ? AvatarInfoUser.OWN_USER : AvatarInfoUser.PEER); + + userInfo.isSpectatorMode = roomSession.isSpectator; + userInfo.name = userData.name; + userInfo.motto = userData.custom; + userInfo.backgroundId = userData.background; + userInfo.standId = userData.stand; + userInfo.overlayId = userData.overlay; + userInfo.achievementScore = userData.activityPoints; + userInfo.webID = userData.webID; + userInfo.roomIndex = userData.roomIndex; + userInfo.userType = RoomObjectType.USER; + + const roomObject = GetRoomEngine().getRoomObject(roomSession.roomId, userData.roomIndex, category); + + if(roomObject) userInfo.carryItem = (roomObject.model.getValue(RoomObjectVariable.FIGURE_CARRY_OBJECT) || 0); + + if(userInfo.type === AvatarInfoUser.OWN_USER) userInfo.allowNameChange = GetSessionDataManager().canChangeName; + + userInfo.amIOwner = roomSession.isRoomOwner; + userInfo.isGuildRoom = roomSession.isGuildRoom; + userInfo.roomControllerLevel = roomSession.controllerLevel; + userInfo.amIAnyRoomController = GetSessionDataManager().isModerator; + userInfo.isAmbassador = GetSessionDataManager().isAmbassador; + + if(userInfo.type === AvatarInfoUser.PEER) + { + if(roomObject) + { + userInfo.targetRoomControllerLevel = roomObject.model.getValue(RoomObjectVariable.FIGURE_FLAT_CONTROL); + userInfo.canBeMuted = this.canBeMuted(userInfo); + userInfo.canBeKicked = this.canBeKicked(userInfo); + userInfo.canBeBanned = this.canBeBanned(userInfo); + } + + userInfo.isIgnored = GetSessionDataManager().isUserIgnored(userData.name); + userInfo.respectLeft = GetSessionDataManager().respectsLeft; + + const isShuttingDown = GetSessionDataManager().isSystemShutdown; + const tradeMode = roomSession.tradeMode; + + if(isShuttingDown) + { + userInfo.canTrade = false; + } + else + { + switch(tradeMode) + { + case RoomTradingLevelEnum.ROOM_CONTROLLER_REQUIRED: { + const roomController = ((userInfo.roomControllerLevel !== RoomControllerLevel.NONE) && (userInfo.roomControllerLevel !== RoomControllerLevel.GUILD_MEMBER)); + const targetController = ((userInfo.targetRoomControllerLevel !== RoomControllerLevel.NONE) && (userInfo.targetRoomControllerLevel !== RoomControllerLevel.GUILD_MEMBER)); + + userInfo.canTrade = (roomController || targetController); + break; + } + case RoomTradingLevelEnum.FREE_TRADING: + userInfo.canTrade = true; + break; + default: + userInfo.canTrade = false; + break; + } + } + + userInfo.canTradeReason = AvatarInfoUser.TRADE_REASON_OK; + + if(isShuttingDown) userInfo.canTradeReason = AvatarInfoUser.TRADE_REASON_SHUTDOWN; + + if(tradeMode !== RoomTradingLevelEnum.FREE_TRADING) userInfo.canTradeReason = AvatarInfoUser.TRADE_REASON_NO_TRADING; + + // const _local_12 = GetSessionDataManager().userId; + // _local_13 = GetSessionDataManager().getUserTags(_local_12); + // this._Str_16287(_local_12, _local_13); + } + + userInfo.groupId = userData.groupId; + userInfo.groupBadgeId = GetSessionDataManager().getGroupBadge(userInfo.groupId); + userInfo.groupName = userData.groupName; + userInfo.badges = roomSession.userDataManager.getUserBadges(userData.webID); + userInfo.figure = userData.figure; + //var _local_8:Array = GetSessionDataManager().getUserTags(userData.webID); + //this._Str_16287(userData.webId, _local_8); + //this._container.habboGroupsManager.updateVisibleExtendedProfile(userData.webID); + //this._container.connection.send(new GetRelationshipStatusInfoMessageComposer(userData.webId)); + + return userInfo; + } + + public static getBotInfo(category: number, userData: IRoomUserData): AvatarInfoUser + { + const roomSession = GetRoomSession(); + const userInfo = new AvatarInfoUser(AvatarInfoUser.BOT); + + userInfo.name = userData.name; + userInfo.motto = userData.custom; + userInfo.webID = userData.webID; + userInfo.roomIndex = userData.roomIndex; + userInfo.userType = userData.type; + + const roomObject = GetRoomEngine().getRoomObject(roomSession.roomId, userData.roomIndex, category); + + if(roomObject) userInfo.carryItem = (roomObject.model.getValue(RoomObjectVariable.FIGURE_CARRY_OBJECT) || 0); + + userInfo.amIOwner = roomSession.isRoomOwner; + userInfo.isGuildRoom = roomSession.isGuildRoom; + userInfo.roomControllerLevel = roomSession.controllerLevel; + userInfo.amIAnyRoomController = GetSessionDataManager().isModerator; + userInfo.isAmbassador = GetSessionDataManager().isAmbassador; + userInfo.badges = [ AvatarInfoUser.DEFAULT_BOT_BADGE_ID ]; + userInfo.figure = userData.figure; + + return userInfo; + } + + public static getRentableBotInfo(category: number, userData: IRoomUserData): AvatarInfoRentableBot + { + const roomSession = GetRoomSession(); + const botInfo = new AvatarInfoRentableBot(AvatarInfoRentableBot.RENTABLE_BOT); + + botInfo.name = userData.name; + botInfo.motto = userData.custom; + botInfo.webID = userData.webID; + botInfo.roomIndex = userData.roomIndex; + botInfo.ownerId = userData.ownerId; + botInfo.ownerName = userData.ownerName; + botInfo.botSkills = userData.botSkills; + + const roomObject = GetRoomEngine().getRoomObject(roomSession.roomId, userData.roomIndex, category); + + if(roomObject) botInfo.carryItem = (roomObject.model.getValue(RoomObjectVariable.FIGURE_CARRY_OBJECT) || 0); + + botInfo.amIOwner = roomSession.isRoomOwner; + botInfo.roomControllerLevel = roomSession.controllerLevel; + botInfo.amIAnyRoomController = GetSessionDataManager().isModerator; + botInfo.badges = [ AvatarInfoUser.DEFAULT_BOT_BADGE_ID ]; + botInfo.figure = userData.figure; + + return botInfo; + } + + public static getPetInfo(petData: IRoomPetData): AvatarInfoPet + { + const roomSession = GetRoomSession(); + const userData = roomSession.userDataManager.getPetData(petData.id); + + if(!userData) return; + + const figure = new PetFigureData(userData.figure); + + let posture: string = null; + + if(figure.typeId === PetType.MONSTERPLANT) + { + if(petData.level >= petData.adultLevel) posture = 'std'; + else posture = ('grw' + petData.level); + } + + const isOwner = (petData.ownerId === GetSessionDataManager().userId); + const petInfo = new AvatarInfoPet(AvatarInfoPet.PET_INFO); + + petInfo.name = userData.name; + petInfo.id = petData.id; + petInfo.ownerId = petData.ownerId; + petInfo.ownerName = petData.ownerName; + petInfo.rarityLevel = petData.rarityLevel; + petInfo.petType = figure.typeId; + petInfo.petBreed = figure.paletteId; + petInfo.petFigure = userData.figure; + petInfo.posture = posture; + petInfo.isOwner = isOwner; + petInfo.roomIndex = userData.roomIndex; + petInfo.level = petData.level; + petInfo.maximumLevel = petData.maximumLevel; + petInfo.experience = petData.experience; + petInfo.levelExperienceGoal = petData.levelExperienceGoal; + petInfo.energy = petData.energy; + petInfo.maximumEnergy = petData.maximumEnergy; + petInfo.happyness = petData.happyness; + petInfo.maximumHappyness = petData.maximumHappyness; + petInfo.respect = petData.respect; + petInfo.respectsPetLeft = GetSessionDataManager().respectsPetLeft; + petInfo.age = petData.age; + petInfo.saddle = petData.saddle; + petInfo.rider = petData.rider; + petInfo.breedable = petData.breedable; + petInfo.fullyGrown = petData.fullyGrown; + petInfo.dead = petData.dead; + petInfo.rarityLevel = petData.rarityLevel; + petInfo.skillTresholds = petData.skillTresholds; + petInfo.canRemovePet = false; + petInfo.publiclyRideable = petData.publiclyRideable; + petInfo.maximumTimeToLive = petData.maximumTimeToLive; + petInfo.remainingTimeToLive = petData.remainingTimeToLive; + petInfo.remainingGrowTime = petData.remainingGrowTime; + petInfo.publiclyBreedable = petData.publiclyBreedable; + + if(isOwner || roomSession.isRoomOwner || GetSessionDataManager().isModerator || (roomSession.controllerLevel >= RoomControllerLevel.GUEST)) petInfo.canRemovePet = true; + + return petInfo; + } + + private static checkGuildSetting(userInfo: AvatarInfoUser): boolean + { + if(userInfo.isGuildRoom) return (userInfo.roomControllerLevel >= RoomControllerLevel.GUILD_ADMIN); + + return (userInfo.roomControllerLevel >= RoomControllerLevel.GUEST); + } + + private static isValidSetting(userInfo: AvatarInfoUser, checkSetting: (userInfo: AvatarInfoUser, moderation: IRoomModerationSettings) => boolean): boolean + { + const roomSession = GetRoomSession(); + + if(!roomSession.isPrivateRoom) return false; + + const moderation = roomSession.moderationSettings; + + let flag = false; + + if(moderation) flag = checkSetting(userInfo, moderation); + + return (flag && (userInfo.targetRoomControllerLevel < RoomControllerLevel.ROOM_OWNER)); + } + + private static canBeMuted(userInfo: AvatarInfoUser): boolean + { + const checkSetting = (userInfo: AvatarInfoUser, moderation: IRoomModerationSettings) => + { + switch(moderation.allowMute) + { + case RoomModerationSettings.MODERATION_LEVEL_USER_WITH_RIGHTS: + return this.checkGuildSetting(userInfo); + default: + return (userInfo.roomControllerLevel >= RoomControllerLevel.ROOM_OWNER); + } + }; + + return this.isValidSetting(userInfo, checkSetting); + } + + private static canBeKicked(userInfo: AvatarInfoUser): boolean + { + const checkSetting = (userInfo: AvatarInfoUser, moderation: IRoomModerationSettings) => + { + switch(moderation.allowKick) + { + case RoomModerationSettings.MODERATION_LEVEL_ALL: + return true; + case RoomModerationSettings.MODERATION_LEVEL_USER_WITH_RIGHTS: + return this.checkGuildSetting(userInfo); + default: + return (userInfo.roomControllerLevel >= RoomControllerLevel.ROOM_OWNER); + } + }; + + return this.isValidSetting(userInfo, checkSetting); + } + + private static canBeBanned(userInfo: AvatarInfoUser): boolean + { + const checkSetting = (userInfo: AvatarInfoUser, moderation: IRoomModerationSettings) => + { + switch(moderation.allowBan) + { + case RoomModerationSettings.MODERATION_LEVEL_USER_WITH_RIGHTS: + return this.checkGuildSetting(userInfo); + default: + return (userInfo.roomControllerLevel >= RoomControllerLevel.ROOM_OWNER); + } + }; + + return this.isValidSetting(userInfo, checkSetting); + } +} diff --git a/Coolui v3 test/src/api/room/widgets/BotSkillsEnum.ts b/Coolui v3 test/src/api/room/widgets/BotSkillsEnum.ts new file mode 100644 index 0000000000..b879cdc99b --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/BotSkillsEnum.ts @@ -0,0 +1,18 @@ +export class BotSkillsEnum +{ + public static GENERIC_SKILL: number = 0; + public static DRESS_UP: number = 1; + public static SETUP_CHAT: number = 2; + public static RANDOM_WALK: number = 3; + public static DANCE: number = 4; + public static CHANGE_BOT_NAME: number = 5; + public static SERVE_BEVERAGE: number = 6; + public static INCLIENT_LINK: number = 7; + public static NUX_PROCEED: number = 8; + public static CHANGE_BOT_MOTTO: number = 9; + public static NUX_TAKE_TOUR: number = 10; + public static NO_PICK_UP: number = 12; + public static NAVIGATOR_SEARCH: number = 14; + public static DONATE_TO_USER: number = 24; + public static DONATE_TO_ALL: number = 25; +} diff --git a/Coolui v3 test/src/api/room/widgets/ChatBubbleMessage.ts b/Coolui v3 test/src/api/room/widgets/ChatBubbleMessage.ts new file mode 100644 index 0000000000..3e31e389d8 --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/ChatBubbleMessage.ts @@ -0,0 +1,54 @@ +export class ChatBubbleMessage +{ + public static BUBBLE_COUNTER: number = 0; + + public id: number = -1; + public width: number = 0; + public height: number = 0; + public elementRef: HTMLDivElement = null; + public skipMovement: boolean = false; + + private _top: number = 0; + private _left: number = 0; + + constructor( + public senderId: number = -1, + public senderCategory: number = -1, + public roomId: number = -1, + public text: string = '', + public formattedText: string = '', + public username: string = '', + public location: { x: number, y: number } = null, + public type: number = 0, + public styleId: number = 0, + public imageUrl: string = null, + public color: string = null + ) + { + this.id = ++ChatBubbleMessage.BUBBLE_COUNTER; + } + + public get top(): number + { + return this._top; + } + + public set top(value: number) + { + this._top = value; + + if(this.elementRef) this.elementRef.style.top = (this._top + 'px'); + } + + public get left(): number + { + return this._left; + } + + public set left(value: number) + { + this._left = value; + + if(this.elementRef) this.elementRef.style.left = (this._left + 'px'); + } +} diff --git a/Coolui v3 test/src/api/room/widgets/ChatBubbleUtilities.ts b/Coolui v3 test/src/api/room/widgets/ChatBubbleUtilities.ts new file mode 100644 index 0000000000..fff0a14c4b --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/ChatBubbleUtilities.ts @@ -0,0 +1,69 @@ +import { AvatarFigurePartType, AvatarScaleType, AvatarSetType, GetAvatarRenderManager, GetRoomEngine, PetFigureData, TextureUtils, Vector3d } from '@nitrots/nitro-renderer'; + +export class ChatBubbleUtilities +{ + public static AVATAR_COLOR_CACHE: Map = new Map(); + public static AVATAR_IMAGE_CACHE: Map = new Map(); + public static PET_IMAGE_CACHE: Map = new Map(); + + private static placeHolderImageUrl: string = ''; + + public static async setFigureImage(figure: string): Promise + { + const avatarImage = GetAvatarRenderManager().createAvatarImage(figure, AvatarScaleType.LARGE, null, { + resetFigure: figure => this.setFigureImage(figure), + dispose: () => + {}, + disposed: false + }); + + if(!avatarImage) return null; + + const isPlaceholder = avatarImage.isPlaceholder(); + + if(isPlaceholder && this.placeHolderImageUrl?.length) return this.placeHolderImageUrl; + + figure = avatarImage.getFigure().getFigureString(); + + const imageUrl = avatarImage.processAsImageUrl(AvatarSetType.HEAD); + const color = avatarImage.getPartColor(AvatarFigurePartType.CHEST); + + if(isPlaceholder) this.placeHolderImageUrl = imageUrl; + + this.AVATAR_COLOR_CACHE.set(figure, ((color && color.rgb) || 16777215)); + this.AVATAR_IMAGE_CACHE.set(figure, imageUrl); + + avatarImage.dispose(); + + return imageUrl; + } + + public static async getUserImage(figure: string): Promise + { + let existing = this.AVATAR_IMAGE_CACHE.get(figure); + + if(!existing) existing = await this.setFigureImage(figure); + + return existing; + } + + public static async getPetImage(figure: string, direction: number, _arg_3: boolean, scale: number = 64, posture: string = null) + { + let existing = this.PET_IMAGE_CACHE.get((figure + posture)); + + if(existing) return existing; + + const figureData = new PetFigureData(figure); + const typeId = figureData.typeId; + const image = GetRoomEngine().getRoomObjectPetImage(typeId, figureData.paletteId, figureData.color, new Vector3d((direction * 45)), scale, null, false, 0, figureData.customParts, posture); + + if(image) + { + existing = await TextureUtils.generateImageUrl(image.data); + + this.PET_IMAGE_CACHE.set((figure + posture), existing); + } + + return existing; + } +} diff --git a/Coolui v3 test/src/api/room/widgets/ChatMessageTypeEnum.ts b/Coolui v3 test/src/api/room/widgets/ChatMessageTypeEnum.ts new file mode 100644 index 0000000000..1a5296b1d7 --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/ChatMessageTypeEnum.ts @@ -0,0 +1,6 @@ +export class ChatMessageTypeEnum +{ + public static CHAT_DEFAULT: number = 0; + public static CHAT_WHISPER: number = 1; + public static CHAT_SHOUT: number = 2; +} diff --git a/Coolui v3 test/src/api/room/widgets/DimmerFurnitureWidgetPresetItem.ts b/Coolui v3 test/src/api/room/widgets/DimmerFurnitureWidgetPresetItem.ts new file mode 100644 index 0000000000..009e530a1b --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/DimmerFurnitureWidgetPresetItem.ts @@ -0,0 +1,9 @@ +export class DimmerFurnitureWidgetPresetItem +{ + constructor( + public id: number = 0, + public type: number = 0, + public color: number = 0, + public light: number = 0) + {} +} diff --git a/Coolui v3 test/src/api/room/widgets/DoChatsOverlap.ts b/Coolui v3 test/src/api/room/widgets/DoChatsOverlap.ts new file mode 100644 index 0000000000..74f0d7fe1a --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/DoChatsOverlap.ts @@ -0,0 +1,6 @@ +import { ChatBubbleMessage } from './ChatBubbleMessage'; + +export const DoChatsOverlap = (a: ChatBubbleMessage, b: ChatBubbleMessage, additionalBTop: number, padding: number = 0) => +{ + return !((((a.left + padding) + a.width) < (b.left + padding)) || ((a.left + padding) > ((b.left + padding) + b.width)) || ((a.top + a.height) < (b.top + additionalBTop)) || (a.top > ((b.top + additionalBTop) + b.height))); +}; diff --git a/Coolui v3 test/src/api/room/widgets/FurnitureDimmerUtilities.ts b/Coolui v3 test/src/api/room/widgets/FurnitureDimmerUtilities.ts new file mode 100644 index 0000000000..f55fc871c1 --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/FurnitureDimmerUtilities.ts @@ -0,0 +1,30 @@ +import { GetRoomEngine } from '@nitrots/nitro-renderer'; +import { GetRoomSession } from '../../nitro'; + +export class FurnitureDimmerUtilities +{ + public static AVAILABLE_COLORS: number[] = [ 7665141, 21495, 15161822, 15353138, 15923281, 8581961, 0 ]; + public static HTML_COLORS: string[] = [ '#74F5F5', '#0053F7', '#E759DE', '#EA4532', '#F2F851', '#82F349', '#000000' ]; + public static MIN_BRIGHTNESS: number = 76; + public static MAX_BRIGHTNESS: number = 255; + + public static savePreset(presetNumber: number, effectTypeId: number, color: number, brightness: number, apply: boolean): void + { + GetRoomSession().updateMoodlightData(presetNumber, effectTypeId, color, brightness, apply); + } + + public static changeState(): void + { + GetRoomSession().toggleMoodlightState(); + } + + public static previewDimmer(color: number, brightness: number, bgOnly: boolean): void + { + GetRoomEngine().updateObjectRoomColor(GetRoomSession().roomId, color, brightness, bgOnly); + } + + public static scaleBrightness(value: number): number + { + return ~~((((value - this.MIN_BRIGHTNESS) * (100 - 0)) / (this.MAX_BRIGHTNESS - this.MIN_BRIGHTNESS)) + 0); + } +} diff --git a/Coolui v3 test/src/api/room/widgets/GetDiskColor.ts b/Coolui v3 test/src/api/room/widgets/GetDiskColor.ts new file mode 100644 index 0000000000..97cd24d700 --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/GetDiskColor.ts @@ -0,0 +1,37 @@ +const DISK_COLOR_RED_MIN: number = 130; +const DISK_COLOR_RED_RANGE: number = 100; +const DISK_COLOR_GREEN_MIN: number = 130; +const DISK_COLOR_GREEN_RANGE: number = 100; +const DISK_COLOR_BLUE_MIN: number = 130; +const DISK_COLOR_BLUE_RANGE: number = 100; + +export const GetDiskColor = (name: string) => +{ + let r: number = 0; + let g: number = 0; + let b: number = 0; + let index: number = 0; + + while(index < name.length) + { + switch((index % 3)) + { + case 0: + r = (r + ( name.charCodeAt(index) * 37) ); + break; + case 1: + g = (g + ( name.charCodeAt(index) * 37) ); + break; + case 2: + b = (b + ( name.charCodeAt(index) * 37) ); + break; + } + index++; + } + + r = ((r % DISK_COLOR_RED_RANGE) + DISK_COLOR_RED_MIN); + g = ((g % DISK_COLOR_GREEN_RANGE) + DISK_COLOR_GREEN_MIN); + b = ((b % DISK_COLOR_BLUE_RANGE) + DISK_COLOR_BLUE_MIN); + + return `rgb(${ r },${ g },${ b })`; +}; diff --git a/Coolui v3 test/src/api/room/widgets/IAvatarInfo.ts b/Coolui v3 test/src/api/room/widgets/IAvatarInfo.ts new file mode 100644 index 0000000000..23fb47ba54 --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/IAvatarInfo.ts @@ -0,0 +1,4 @@ +export interface IAvatarInfo +{ + type: string; +} diff --git a/Coolui v3 test/src/api/room/widgets/ICraftingIngredient.ts b/Coolui v3 test/src/api/room/widgets/ICraftingIngredient.ts new file mode 100644 index 0000000000..cb2b031158 --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/ICraftingIngredient.ts @@ -0,0 +1,6 @@ +export interface ICraftingIngredient +{ + name: string; + iconUrl: string; + count: number; +} diff --git a/Coolui v3 test/src/api/room/widgets/ICraftingRecipe.ts b/Coolui v3 test/src/api/room/widgets/ICraftingRecipe.ts new file mode 100644 index 0000000000..dd99291fdf --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/ICraftingRecipe.ts @@ -0,0 +1,6 @@ +export interface ICraftingRecipe +{ + name: string; + localizedName: string; + iconUrl: string; +} diff --git a/Coolui v3 test/src/api/room/widgets/IPhotoData.ts b/Coolui v3 test/src/api/room/widgets/IPhotoData.ts new file mode 100644 index 0000000000..9a7b846ce1 --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/IPhotoData.ts @@ -0,0 +1,42 @@ +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; + + /** + * owner id + */ + oi?: number; + + /** + * owner name + */ + o?: string; +} \ No newline at end of file diff --git a/Coolui v3 test/src/api/room/widgets/MannequinUtilities.ts b/Coolui v3 test/src/api/room/widgets/MannequinUtilities.ts new file mode 100644 index 0000000000..74d45f9163 --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/MannequinUtilities.ts @@ -0,0 +1,38 @@ +import { AvatarFigurePartType, GetAvatarRenderManager, IAvatarFigureContainer } from '@nitrots/nitro-renderer'; + +export class MannequinUtilities +{ + public static MANNEQUIN_FIGURE = [ 'hd', 99999, [ 99998 ] ]; + public static MANNEQUIN_CLOTHING_PART_TYPES = [ + AvatarFigurePartType.CHEST_ACCESSORY, + AvatarFigurePartType.COAT_CHEST, + AvatarFigurePartType.CHEST, + AvatarFigurePartType.LEGS, + AvatarFigurePartType.SHOES, + AvatarFigurePartType.WAIST_ACCESSORY + ]; + + public static getMergedMannequinFigureContainer(figure: string, targetFigure: string): IAvatarFigureContainer + { + const figureContainer = GetAvatarRenderManager().createFigureContainer(figure); + const targetFigureContainer = GetAvatarRenderManager().createFigureContainer(targetFigure); + + for(const part of this.MANNEQUIN_CLOTHING_PART_TYPES) figureContainer.removePart(part); + + for(const part of targetFigureContainer.getPartTypeIds()) figureContainer.updatePart(part, targetFigureContainer.getPartSetId(part), targetFigureContainer.getPartColorIds(part)); + + return figureContainer; + } + + public static transformAsMannequinFigure(figureContainer: IAvatarFigureContainer): void + { + for(const part of figureContainer.getPartTypeIds()) + { + if(this.MANNEQUIN_CLOTHING_PART_TYPES.indexOf(part) >= 0) continue; + + figureContainer.removePart(part); + } + + figureContainer.updatePart((this.MANNEQUIN_FIGURE[0] as string), (this.MANNEQUIN_FIGURE[1] as number), (this.MANNEQUIN_FIGURE[2] as number[])); + }; +} diff --git a/Coolui v3 test/src/api/room/widgets/PetSupplementEnum.ts b/Coolui v3 test/src/api/room/widgets/PetSupplementEnum.ts new file mode 100644 index 0000000000..eb23687513 --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/PetSupplementEnum.ts @@ -0,0 +1,5 @@ +export class PetSupplementEnum +{ + public static WATER: number = 0; + public static LIGHT: number = 1; +} diff --git a/Coolui v3 test/src/api/room/widgets/PostureTypeEnum.ts b/Coolui v3 test/src/api/room/widgets/PostureTypeEnum.ts new file mode 100644 index 0000000000..21352d7875 --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/PostureTypeEnum.ts @@ -0,0 +1,5 @@ +export class PostureTypeEnum +{ + public static POSTURE_STAND: number = 0; + public static POSTURE_SIT: number = 1; +} diff --git a/Coolui v3 test/src/api/room/widgets/RoomDimmerPreset.ts b/Coolui v3 test/src/api/room/widgets/RoomDimmerPreset.ts new file mode 100644 index 0000000000..86600d5835 --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/RoomDimmerPreset.ts @@ -0,0 +1,35 @@ +export class RoomDimmerPreset +{ + private _id: number; + private _type: number; + private _color: number; + private _brightness: number; + + constructor(id: number, type: number, color: number, brightness: number) + { + this._id = id; + this._type = type; + this._color = color; + this._brightness = brightness; + } + + public get id(): number + { + return this._id; + } + + public get type(): number + { + return this._type; + } + + public get color(): number + { + return this._color; + } + + public get brightness(): number + { + return this._brightness; + } +} diff --git a/Coolui v3 test/src/api/room/widgets/RoomObjectItem.ts b/Coolui v3 test/src/api/room/widgets/RoomObjectItem.ts new file mode 100644 index 0000000000..f4fb2d6fe7 --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/RoomObjectItem.ts @@ -0,0 +1,28 @@ +export class RoomObjectItem +{ + private _id: number; + private _category: number; + private _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/Coolui v3 test/src/api/room/widgets/UseProductItem.ts b/Coolui v3 test/src/api/room/widgets/UseProductItem.ts new file mode 100644 index 0000000000..d3e2088939 --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/UseProductItem.ts @@ -0,0 +1,12 @@ +export class UseProductItem +{ + constructor( + public readonly id: number, + public readonly category: number, + public readonly name: string, + public readonly requestRoomObjectId: number, + public readonly targetRoomObjectId: number, + public readonly requestInventoryStripId: number, + public readonly replace: boolean) + {} +} diff --git a/Coolui v3 test/src/api/room/widgets/VoteValue.ts b/Coolui v3 test/src/api/room/widgets/VoteValue.ts new file mode 100644 index 0000000000..ecf4336eab --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/VoteValue.ts @@ -0,0 +1,8 @@ +export const VALUE_KEY_DISLIKE = '0'; +export const VALUE_KEY_LIKE = '1'; + +export interface VoteValue +{ + value: string; + secondsLeft: number; +} diff --git a/Coolui v3 test/src/api/room/widgets/YoutubeVideoPlaybackStateEnum.ts b/Coolui v3 test/src/api/room/widgets/YoutubeVideoPlaybackStateEnum.ts new file mode 100644 index 0000000000..2d1784158e --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/YoutubeVideoPlaybackStateEnum.ts @@ -0,0 +1,9 @@ +export class YoutubeVideoPlaybackStateEnum +{ + public static readonly UNSTARTED = -1; + public static readonly ENDED = 0; + public static readonly PLAYING = 1; + public static readonly PAUSED = 2; + public static readonly BUFFERING = 3; + public static readonly CUED = 5; +} diff --git a/Coolui v3 test/src/api/room/widgets/index.ts b/Coolui v3 test/src/api/room/widgets/index.ts new file mode 100644 index 0000000000..6c50c8383a --- /dev/null +++ b/Coolui v3 test/src/api/room/widgets/index.ts @@ -0,0 +1,26 @@ +export * from './AvatarInfoFurni'; +export * from './AvatarInfoName'; +export * from './AvatarInfoPet'; +export * from './AvatarInfoRentableBot'; +export * from './AvatarInfoUser'; +export * from './AvatarInfoUtilities'; +export * from './BotSkillsEnum'; +export * from './ChatBubbleMessage'; +export * from './ChatBubbleUtilities'; +export * from './ChatMessageTypeEnum'; +export * from './DimmerFurnitureWidgetPresetItem'; +export * from './DoChatsOverlap'; +export * from './FurnitureDimmerUtilities'; +export * from './GetDiskColor'; +export * from './IAvatarInfo'; +export * from './ICraftingIngredient'; +export * from './ICraftingRecipe'; +export * from './IPhotoData'; +export * from './MannequinUtilities'; +export * from './PetSupplementEnum'; +export * from './PostureTypeEnum'; +export * from './RoomDimmerPreset'; +export * from './RoomObjectItem'; +export * from './UseProductItem'; +export * from './VoteValue'; +export * from './YoutubeVideoPlaybackStateEnum'; diff --git a/Coolui v3 test/src/api/user/GetUserProfile.ts b/Coolui v3 test/src/api/user/GetUserProfile.ts new file mode 100644 index 0000000000..13c67aa465 --- /dev/null +++ b/Coolui v3 test/src/api/user/GetUserProfile.ts @@ -0,0 +1,7 @@ +import { UserProfileComposer } from '@nitrots/nitro-renderer'; +import { SendMessageComposer } from '../nitro'; + +export function GetUserProfile(userId: number): void +{ + SendMessageComposer(new UserProfileComposer(userId)); +} diff --git a/Coolui v3 test/src/api/user/index.ts b/Coolui v3 test/src/api/user/index.ts new file mode 100644 index 0000000000..1c609ea780 --- /dev/null +++ b/Coolui v3 test/src/api/user/index.ts @@ -0,0 +1 @@ +export * from './GetUserProfile'; diff --git a/Coolui v3 test/src/api/utils/CloneObject.ts b/Coolui v3 test/src/api/utils/CloneObject.ts new file mode 100644 index 0000000000..b306fac054 --- /dev/null +++ b/Coolui v3 test/src/api/utils/CloneObject.ts @@ -0,0 +1,14 @@ +export const CloneObject = (object: T): T => +{ + if((object == null) || ('object' != typeof object)) return object; + + // @ts-ignore + const copy = new object.constructor(); + + for(const attr in object) + { + if(object.hasOwnProperty(attr)) copy[attr] = object[attr]; + } + + return copy; +}; diff --git a/Coolui v3 test/src/api/utils/ColorUtils.ts b/Coolui v3 test/src/api/utils/ColorUtils.ts new file mode 100644 index 0000000000..ff3a0bf012 --- /dev/null +++ b/Coolui v3 test/src/api/utils/ColorUtils.ts @@ -0,0 +1,65 @@ +export class ColorUtils +{ + public static makeColorHex(color: string): string + { + return ('#' + color); + } + + public static makeColorNumberHex(color: number): string + { + let val = color.toString(16); + return ( '#' + val.padStart(6, '0')); + } + + public static convertFromHex(color: string): number + { + return parseInt(color.replace('#', ''), 16); + } + + public static uintHexColor(color: number): string + { + const realColor = color >>>0; + + return ColorUtils.makeColorHex(realColor.toString(16).substring(2)); + } + + /** + * Converts an integer format into an array of 8-bit values + * @param {number} value value in integer format + * @returns {Array} 8-bit values + */ + public static int_to_8BitVals(value: number): [number, number, number, number] + { + const val1 = ((value >> 24) & 0xFF); + const val2 = ((value >> 16) & 0xFF); + const val3 = ((value >> 8) & 0xFF); + const val4 = (value & 0xFF); + + return [ val1, val2, val3, val4 ]; + } + + /** + * Combines 4 8-bit values into a 32-bit integer. Values are combined in + * in the order of the parameters + * @param val1 + * @param val2 + * @param val3 + * @param val4 + * @returns 32-bit integer of combined values + */ + public static eight_bitVals_to_int(val1: number, val2: number, val3: number, val4: number): number + { + return (((val1) << 24) + ((val2) << 16) + ((val3) << 8) + (val4| 0)); + } + + public static int2rgb(color: number): string + { + color >>>= 0; + const b = color & 0xFF; + const g = (color & 0xFF00) >>> 8; + const r = (color & 0xFF0000) >>> 16; + const a = ((color & 0xFF000000) >>> 24) / 255; + + return 'rgba(' + [ r, g, b, 1 ].join(',') + ')'; + } +} diff --git a/Coolui v3 test/src/api/utils/ConvertSeconds.ts b/Coolui v3 test/src/api/utils/ConvertSeconds.ts new file mode 100644 index 0000000000..351dda81c5 --- /dev/null +++ b/Coolui v3 test/src/api/utils/ConvertSeconds.ts @@ -0,0 +1,9 @@ +export const ConvertSeconds = (seconds: number) => +{ + let numDays = Math.floor(seconds / 86400); + let numHours = Math.floor((seconds % 86400) / 3600); + let numMinutes = Math.floor(((seconds % 86400) % 3600) / 60); + let numSeconds = ((seconds % 86400) % 3600) % 60; + + return numDays.toString().padStart(2, '0') + ':' + numHours.toString().padStart(2, '0') + ':' + numMinutes.toString().padStart(2, '0') + ':' + numSeconds.toString().padStart(2, '0'); +}; diff --git a/Coolui v3 test/src/api/utils/FixedSizeStack.ts b/Coolui v3 test/src/api/utils/FixedSizeStack.ts new file mode 100644 index 0000000000..af8e09aa4b --- /dev/null +++ b/Coolui v3 test/src/api/utils/FixedSizeStack.ts @@ -0,0 +1,65 @@ +export class FixedSizeStack +{ + private _data: number[]; + private _maxSize: number; + private _index: number; + + constructor(k: number) + { + this._data = []; + this._maxSize = k; + this._index = 0; + } + + public reset(): void + { + this._data = []; + this._index = 0; + } + + public addValue(k: number): void + { + if(this._data.length < this._maxSize) + { + this._data.push(k); + } + else + { + this._data[this._index] = k; + } + + this._index = ((this._index + 1) % this._maxSize); + } + + public getMax(): number + { + let k = Number.MIN_VALUE; + + let _local_2 = 0; + + while(_local_2 < this._maxSize) + { + if(this._data[_local_2] > k) k = this._data[_local_2]; + + _local_2++; + } + + return k; + } + + public getMin(): number + { + let k = Number.MAX_VALUE; + + let _local_2 = 0; + + while(_local_2 < this._maxSize) + { + if(this._data[_local_2] < k) k = this._data[_local_2]; + + _local_2++; + } + + return k; + } +} diff --git a/Coolui v3 test/src/api/utils/FriendlyTime.ts b/Coolui v3 test/src/api/utils/FriendlyTime.ts new file mode 100644 index 0000000000..7acb39c577 --- /dev/null +++ b/Coolui v3 test/src/api/utils/FriendlyTime.ts @@ -0,0 +1,47 @@ +import { LocalizeText } from './LocalizeText'; + +export class FriendlyTime +{ + private static MINUTE: number = 60; + private static HOUR: number = (60 * FriendlyTime.MINUTE); + private static DAY: number = (24 * FriendlyTime.HOUR); + private static WEEK: number = (7 * FriendlyTime.DAY); + private static MONTH: number = (30 * FriendlyTime.DAY); + private static YEAR: number = (365 * FriendlyTime.DAY); + + + public static format(seconds: number, key: string = '', threshold: number = 3): string + { + if(seconds > (threshold * FriendlyTime.YEAR)) return FriendlyTime.getLocalization(('friendlytime.years' + key), Math.round((seconds / FriendlyTime.YEAR))); + + if(seconds > (threshold * FriendlyTime.MONTH)) return FriendlyTime.getLocalization(('friendlytime.months' + key), Math.round((seconds / FriendlyTime.MONTH))); + + if(seconds > (threshold * FriendlyTime.DAY)) return FriendlyTime.getLocalization(('friendlytime.days' + key), Math.round((seconds / FriendlyTime.DAY))); + + if(seconds > (threshold * FriendlyTime.HOUR)) return FriendlyTime.getLocalization(('friendlytime.hours' + key), Math.round((seconds / FriendlyTime.HOUR))); + + if(seconds > (threshold * FriendlyTime.MINUTE)) return FriendlyTime.getLocalization(('friendlytime.minutes' + key), Math.round((seconds / FriendlyTime.MINUTE))); + + return FriendlyTime.getLocalization(('friendlytime.seconds' + key), Math.round(seconds)); + } + + public static shortFormat(seconds: number, key: string = '', threshold: number = 3): string + { + if(seconds > (threshold * FriendlyTime.YEAR)) return FriendlyTime.getLocalization(('friendlytime.years.short' + key), Math.round((seconds / FriendlyTime.YEAR))); + + if(seconds > (threshold * FriendlyTime.MONTH)) return FriendlyTime.getLocalization(('friendlytime.months.short' + key), Math.round((seconds / FriendlyTime.MONTH))); + + if(seconds > (threshold * FriendlyTime.DAY)) return FriendlyTime.getLocalization(('friendlytime.days.short' + key), Math.round((seconds / FriendlyTime.DAY))); + + if(seconds > (threshold * FriendlyTime.HOUR)) return FriendlyTime.getLocalization(('friendlytime.hours.short' + key), Math.round((seconds / FriendlyTime.HOUR))); + + if(seconds > (threshold * FriendlyTime.MINUTE)) return FriendlyTime.getLocalization(('friendlytime.minutes.short' + key), Math.round((seconds / FriendlyTime.MINUTE))); + + return FriendlyTime.getLocalization(('friendlytime.seconds.short' + key), Math.round(seconds)); + } + + public static getLocalization(key: string, amount: number): string + { + return LocalizeText(key, [ 'amount' ], [ amount.toString() ]); + } +} diff --git a/Coolui v3 test/src/api/utils/GetLocalStorage.ts b/Coolui v3 test/src/api/utils/GetLocalStorage.ts new file mode 100644 index 0000000000..a4270cfc23 --- /dev/null +++ b/Coolui v3 test/src/api/utils/GetLocalStorage.ts @@ -0,0 +1,11 @@ +export const GetLocalStorage = (key: string) => +{ + try + { + JSON.parse(window.localStorage.getItem(key)) as T ?? null; + } + catch (e) + { + return null; + } +}; diff --git a/Coolui v3 test/src/api/utils/LocalStorageKeys.ts b/Coolui v3 test/src/api/utils/LocalStorageKeys.ts new file mode 100644 index 0000000000..6c922790fc --- /dev/null +++ b/Coolui v3 test/src/api/utils/LocalStorageKeys.ts @@ -0,0 +1,5 @@ +export class LocalStorageKeys +{ + public static CATALOG_PLACE_MULTIPLE_OBJECTS: string = 'catalogPlaceMultipleObjects'; + public static CATALOG_SKIP_PURCHASE_CONFIRMATION: string = 'catalogSkipPurchaseConfirmation'; +} diff --git a/Coolui v3 test/src/api/utils/LocalizeBadgeDescription.ts b/Coolui v3 test/src/api/utils/LocalizeBadgeDescription.ts new file mode 100644 index 0000000000..11f178e776 --- /dev/null +++ b/Coolui v3 test/src/api/utils/LocalizeBadgeDescription.ts @@ -0,0 +1,10 @@ +import { GetLocalizationManager } from '@nitrots/nitro-renderer'; + +export const LocalizeBadgeDescription = (key: string) => +{ + let badgeDesc = GetLocalizationManager().getBadgeDesc(key); + + if(!badgeDesc || !badgeDesc.length) badgeDesc = `badge_desc_${ key }`; + + return badgeDesc; +}; diff --git a/Coolui v3 test/src/api/utils/LocalizeBageName.ts b/Coolui v3 test/src/api/utils/LocalizeBageName.ts new file mode 100644 index 0000000000..47645cbf33 --- /dev/null +++ b/Coolui v3 test/src/api/utils/LocalizeBageName.ts @@ -0,0 +1,10 @@ +import { GetLocalizationManager } from '@nitrots/nitro-renderer'; + +export const LocalizeBadgeName = (key: string) => +{ + let badgeName = GetLocalizationManager().getBadgeName(key); + + if(!badgeName || !badgeName.length) badgeName = `badge_name_${ key }`; + + return badgeName; +}; diff --git a/Coolui v3 test/src/api/utils/LocalizeFormattedNumber.ts b/Coolui v3 test/src/api/utils/LocalizeFormattedNumber.ts new file mode 100644 index 0000000000..fab30d466f --- /dev/null +++ b/Coolui v3 test/src/api/utils/LocalizeFormattedNumber.ts @@ -0,0 +1,6 @@ +export function LocalizeFormattedNumber(number: number): string +{ + if(!number || isNaN(number)) return '0'; + + return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ' '); +}; diff --git a/Coolui v3 test/src/api/utils/LocalizeShortNumber.ts b/Coolui v3 test/src/api/utils/LocalizeShortNumber.ts new file mode 100644 index 0000000000..30975ecac1 --- /dev/null +++ b/Coolui v3 test/src/api/utils/LocalizeShortNumber.ts @@ -0,0 +1,36 @@ +export function LocalizeShortNumber(number: number): string +{ + if(!number || isNaN(number)) return '0'; + + let abs = Math.abs(number); + + const rounder = Math.pow(10, 1); + const isNegative = (number < 0); + + let key = ''; + + const powers = [ + { key: 'Q', value: Math.pow(10, 15) }, + { key: 'T', value: Math.pow(10, 12) }, + { key: 'B', value: Math.pow(10, 9) }, + { key: 'M', value: Math.pow(10, 6) }, + { key: 'K', value: 1000 } + ]; + + for(const power of powers) + { + let reduced = abs / power.value; + + reduced = Math.round(reduced * rounder) / rounder; + + if(reduced >= 1) + { + abs = reduced; + key = power.key; + + break; + } + } + + return ((isNegative ? '-' : '') + abs + key); +} diff --git a/Coolui v3 test/src/api/utils/LocalizeText.ts b/Coolui v3 test/src/api/utils/LocalizeText.ts new file mode 100644 index 0000000000..68d0273918 --- /dev/null +++ b/Coolui v3 test/src/api/utils/LocalizeText.ts @@ -0,0 +1,6 @@ +import { GetLocalizationManager } from '@nitrots/nitro-renderer'; + +export function LocalizeText(key: string, parameters: string[] = null, replacements: string[] = null): string +{ + return GetLocalizationManager().getValueWithParameters(key, parameters, replacements); +} diff --git a/Coolui v3 test/src/api/utils/PlaySound.ts b/Coolui v3 test/src/api/utils/PlaySound.ts new file mode 100644 index 0000000000..b0f903cd83 --- /dev/null +++ b/Coolui v3 test/src/api/utils/PlaySound.ts @@ -0,0 +1,24 @@ +import { MouseEventType, NitroSoundEvent } from '@nitrots/nitro-renderer'; +import { DispatchMainEvent } from '../events'; + +let canPlaySound = false; + +export const PlaySound = (sampleCode: string) => +{ + if(!canPlaySound) return; + + DispatchMainEvent(new NitroSoundEvent(NitroSoundEvent.PLAY_SOUND, sampleCode)); +}; + +const eventTypes = [ MouseEventType.MOUSE_CLICK ]; + +const startListening = () => +{ + const stopListening = () => eventTypes.forEach(type => window.removeEventListener(type, onEvent)); + + const onEvent = (event: Event) => ((canPlaySound = true) && stopListening()); + + eventTypes.forEach(type => window.addEventListener(type, onEvent)); +}; + +startListening(); diff --git a/Coolui v3 test/src/api/utils/ProductImageUtility.ts b/Coolui v3 test/src/api/utils/ProductImageUtility.ts new file mode 100644 index 0000000000..544351322a --- /dev/null +++ b/Coolui v3 test/src/api/utils/ProductImageUtility.ts @@ -0,0 +1,58 @@ +import { FurnitureType, GetRoomEngine } from '@nitrots/nitro-renderer'; +import { FurniCategory } from '../inventory'; + +export class ProductImageUtility +{ + public static getProductImageUrl(productType: FurnitureType, furniClassId: number, extraParam: string): string + { + let imageUrl: string = null; + + switch(productType) + { + case FurnitureType.FLOOR: + imageUrl = GetRoomEngine().getFurnitureFloorIconUrl(furniClassId); + break; + case FurnitureType.WALL: + const productCategory = this.getProductCategory(CatalogPageMessageProductData.I, furniClassId); + + if(productCategory === 1) + { + imageUrl = GetRoomEngine().getFurnitureWallIconUrl(furniClassId, extraParam); + } + else + { + switch(productCategory) + { + case FurniCategory.WALL_PAPER: + break; + case FurniCategory.LANDSCAPE: + break; + case FurniCategory.FLOOR: + break; + } + } + break; + case FurnitureType.EFFECT: + // fx_icon_furniClassId_png + break; + } + + return imageUrl; + } + + public static getProductCategory(productType: FurnitureType, furniClassId: number): number + { + if(productType === FurnitureType.FLOOR) return 1; + + if(productType === FurnitureType.WALL) + { + if(furniClassId === 3001) return FurniCategory.WALL_PAPER; + + if(furniClassId === 3002) return FurniCategory.FLOOR; + + if(furniClassId === 4057) return FurniCategory.LANDSCAPE; + } + + return 1; + } +} diff --git a/Coolui v3 test/src/api/utils/Randomizer.ts b/Coolui v3 test/src/api/utils/Randomizer.ts new file mode 100644 index 0000000000..1f67a129ce --- /dev/null +++ b/Coolui v3 test/src/api/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/Coolui v3 test/src/api/utils/RoomChatFormatter.ts b/Coolui v3 test/src/api/utils/RoomChatFormatter.ts new file mode 100644 index 0000000000..f87840b337 --- /dev/null +++ b/Coolui v3 test/src/api/utils/RoomChatFormatter.ts @@ -0,0 +1,75 @@ +const allowedColours: Map = new Map(); + +allowedColours.set('r', 'red'); +allowedColours.set('b', 'blue'); +allowedColours.set('g', 'green'); +allowedColours.set('y', 'yellow'); +allowedColours.set('w', 'white'); +allowedColours.set('o', 'orange'); +allowedColours.set('c', 'cyan'); +allowedColours.set('br', 'brown'); +allowedColours.set('pr', 'purple'); +allowedColours.set('pk', 'pink'); + +allowedColours.set('red', 'red'); +allowedColours.set('blue', 'blue'); +allowedColours.set('green', 'green'); +allowedColours.set('yellow', 'yellow'); +allowedColours.set('white', 'white'); +allowedColours.set('orange', 'orange'); +allowedColours.set('cyan', 'cyan'); +allowedColours.set('brown', 'brown'); +allowedColours.set('purple', 'purple'); +allowedColours.set('pink', 'pink'); + +const encodeHTML = (str: string) => +{ + return str.replace(/([\u00A0-\u9999<>&])(.|$)/g, (full, char, next) => + { + if(char !== '&' || next !== '#') + { + if(/[\u00A0-\u9999<>&]/.test(next)) next = '&#' + next.charCodeAt(0) + ';'; + + return '&#' + char.charCodeAt(0) + ';' + next; + } + + return full; + }); +}; + +export const RoomChatFormatter = (content: string) => +{ + let result = ''; + + content = encodeHTML(content); + //content = (joypixels.shortnameToUnicode(content) as string) + + if(content.startsWith('@') && content.indexOf('@', 1) > -1) + { + let match = null; + + while((match = /@[a-zA-Z]+@/g.exec(content)) !== null) + { + const colorTag = match[0].toString(); + const colorName = colorTag.substr(1, colorTag.length - 2); + const text = content.replace(colorTag, ''); + + if(!allowedColours.has(colorName)) + { + result = text; + } + else + { + const color = allowedColours.get(colorName); + result = '' + text + ''; + } + break; + } + } + else + { + result = content; + } + + return result; +}; diff --git a/Coolui v3 test/src/api/utils/SetLocalStorage.ts b/Coolui v3 test/src/api/utils/SetLocalStorage.ts new file mode 100644 index 0000000000..02aa8f3da1 --- /dev/null +++ b/Coolui v3 test/src/api/utils/SetLocalStorage.ts @@ -0,0 +1 @@ +export const SetLocalStorage = (key: string, value: T) => window.localStorage.setItem(key, JSON.stringify(value)); diff --git a/Coolui v3 test/src/api/utils/SoundNames.ts b/Coolui v3 test/src/api/utils/SoundNames.ts new file mode 100644 index 0000000000..4459651b35 --- /dev/null +++ b/Coolui v3 test/src/api/utils/SoundNames.ts @@ -0,0 +1,9 @@ +export class SoundNames +{ + public static CAMERA_SHUTTER = 'camera_shutter'; + public static CREDITS = 'credits'; + public static DUCKETS = 'duckets'; + public static MESSENGER_NEW_THREAD = 'messenger_new_thread'; + public static MESSENGER_MESSAGE_RECEIVED = 'messenger_message_received'; + public static MODTOOLS_NEW_TICKET = 'modtools_new_ticket'; +} diff --git a/Coolui v3 test/src/api/utils/WindowSaveOptions.ts b/Coolui v3 test/src/api/utils/WindowSaveOptions.ts new file mode 100644 index 0000000000..9aa8456313 --- /dev/null +++ b/Coolui v3 test/src/api/utils/WindowSaveOptions.ts @@ -0,0 +1,5 @@ +export interface WindowSaveOptions +{ + offset: { x: number, y: number }; + size: { width: number, height: number }; +} diff --git a/Coolui v3 test/src/api/utils/index.ts b/Coolui v3 test/src/api/utils/index.ts new file mode 100644 index 0000000000..1824addff3 --- /dev/null +++ b/Coolui v3 test/src/api/utils/index.ts @@ -0,0 +1,19 @@ +export * from './CloneObject'; +export * from './ColorUtils'; +export * from './ConvertSeconds'; +export * from './FixedSizeStack'; +export * from './FriendlyTime'; +export * from './GetLocalStorage'; +export * from './LocalStorageKeys'; +export * from './LocalizeBadgeDescription'; +export * from './LocalizeBageName'; +export * from './LocalizeFormattedNumber'; +export * from './LocalizeShortNumber'; +export * from './LocalizeText'; +export * from './PlaySound'; +export * from './ProductImageUtility'; +export * from './Randomizer'; +export * from './RoomChatFormatter'; +export * from './SetLocalStorage'; +export * from './SoundNames'; +export * from './WindowSaveOptions'; diff --git a/Coolui v3 test/src/api/wired/GetWiredTimeLocale.ts b/Coolui v3 test/src/api/wired/GetWiredTimeLocale.ts new file mode 100644 index 0000000000..39f3516004 --- /dev/null +++ b/Coolui v3 test/src/api/wired/GetWiredTimeLocale.ts @@ -0,0 +1,8 @@ +export const GetWiredTimeLocale = (value: number) => +{ + const time = Math.floor((value / 2)); + + if(!(value % 2)) return time.toString(); + + return (time + 0.5).toString(); +}; diff --git a/Coolui v3 test/src/api/wired/WiredActionLayoutCode.ts b/Coolui v3 test/src/api/wired/WiredActionLayoutCode.ts new file mode 100644 index 0000000000..5282dc5905 --- /dev/null +++ b/Coolui v3 test/src/api/wired/WiredActionLayoutCode.ts @@ -0,0 +1,29 @@ +export class WiredActionLayoutCode +{ + public static TOGGLE_FURNI_STATE: number = 0; + public static RESET: number = 1; + public static SET_FURNI_STATE: number = 3; + public static MOVE_FURNI: number = 4; + public static GIVE_SCORE: number = 6; + public static CHAT: number = 7; + public static TELEPORT: number = 8; + public static JOIN_TEAM: number = 9; + public static LEAVE_TEAM: number = 10; + public static CHASE: number = 11; + public static FLEE: number = 12; + public static MOVE_AND_ROTATE_FURNI: number = 13; + public static GIVE_SCORE_TO_PREDEFINED_TEAM: number = 14; + public static TOGGLE_TO_RANDOM_STATE: number = 15; + public static MOVE_FURNI_TO: number = 16; + public static GIVE_REWARD: number = 17; + public static CALL_ANOTHER_STACK: number = 18; + public static KICK_FROM_ROOM: number = 19; + public static MUTE_USER: number = 20; + public static BOT_TELEPORT: number = 21; + public static BOT_MOVE: number = 22; + public static BOT_TALK: number = 23; + public static BOT_GIVE_HAND_ITEM: number = 24; + public static BOT_FOLLOW_AVATAR: number = 25; + public static BOT_CHANGE_FIGURE: number = 26; + public static BOT_TALK_DIRECT_TO_AVTR: number = 27; +} diff --git a/Coolui v3 test/src/api/wired/WiredConditionLayoutCode.ts b/Coolui v3 test/src/api/wired/WiredConditionLayoutCode.ts new file mode 100644 index 0000000000..58cae5db58 --- /dev/null +++ b/Coolui v3 test/src/api/wired/WiredConditionLayoutCode.ts @@ -0,0 +1,29 @@ +export class WiredConditionlayout +{ + public static STATES_MATCH: number = 0; + public static FURNIS_HAVE_AVATARS: number = 1; + public static ACTOR_IS_ON_FURNI: number = 2; + public static TIME_ELAPSED_MORE: number = 3; + public static TIME_ELAPSED_LESS: number = 4; + public static USER_COUNT_IN: number = 5; + public static ACTOR_IS_IN_TEAM: number = 6; + public static HAS_STACKED_FURNIS: number = 7; + public static STUFF_TYPE_MATCHES: number = 8; + public static STUFFS_IN_FORMATION: number = 9; + public static ACTOR_IS_GROUP_MEMBER: number = 10; + public static ACTOR_IS_WEARING_BADGE: number = 11; + public static ACTOR_IS_WEARING_EFFECT: number = 12; + public static NOT_STATES_MATCH: number = 13; + public static FURNI_NOT_HAVE_HABBO: number = 14; + public static NOT_ACTOR_ON_FURNI: number = 15; + public static NOT_USER_COUNT_IN: number = 16; + public static NOT_ACTOR_IN_TEAM: number = 17; + public static NOT_HAS_STACKED_FURNIS: number = 18; + public static NOT_FURNI_IS_OF_TYPE: number = 19; + public static NOT_STUFFS_IN_FORMATION: number = 20; + public static NOT_ACTOR_IN_GROUP: number = 21; + public static NOT_ACTOR_WEARS_BADGE: number = 22; + public static NOT_ACTOR_WEARING_EFFECT: number = 23; + public static DATE_RANGE_ACTIVE: number = 24; + public static ACTOR_HAS_HANDITEM: number = 25; +} diff --git a/Coolui v3 test/src/api/wired/WiredDateToString.ts b/Coolui v3 test/src/api/wired/WiredDateToString.ts new file mode 100644 index 0000000000..825adc8ec5 --- /dev/null +++ b/Coolui v3 test/src/api/wired/WiredDateToString.ts @@ -0,0 +1 @@ +export const WiredDateToString = (date: Date) => `${ date.getFullYear() }/${ ('0' + (date.getMonth() + 1)).slice(-2) }/${ ('0' + date.getDate()).slice(-2) } ${ ('0' + date.getHours()).slice(-2) }:${ ('0' + date.getMinutes()).slice(-2) }`; diff --git a/Coolui v3 test/src/api/wired/WiredFurniType.ts b/Coolui v3 test/src/api/wired/WiredFurniType.ts new file mode 100644 index 0000000000..447e970127 --- /dev/null +++ b/Coolui v3 test/src/api/wired/WiredFurniType.ts @@ -0,0 +1,7 @@ +export class WiredFurniType +{ + public static STUFF_SELECTION_OPTION_NONE: number = 0; + public static STUFF_SELECTION_OPTION_BY_ID: number = 1; + public static STUFF_SELECTION_OPTION_BY_ID_OR_BY_TYPE: number = 2; + public static STUFF_SELECTION_OPTION_BY_ID_BY_TYPE_OR_FROM_CONTEXT: number = 3; +} diff --git a/Coolui v3 test/src/api/wired/WiredSelectionVisualizer.ts b/Coolui v3 test/src/api/wired/WiredSelectionVisualizer.ts new file mode 100644 index 0000000000..18edbf7c7b --- /dev/null +++ b/Coolui v3 test/src/api/wired/WiredSelectionVisualizer.ts @@ -0,0 +1,85 @@ +import { GetRoomEngine, IRoomObject, IRoomObjectSpriteVisualization, RoomObjectCategory, WiredFilter } from '@nitrots/nitro-renderer'; + +export class WiredSelectionVisualizer +{ + private static _selectionShader: WiredFilter = new WiredFilter({ + lineColor: [ 1, 1, 1 ], + color: [ 0.6, 0.6, 0.6 ] + }); + + public static show(furniId: number): void + { + WiredSelectionVisualizer.applySelectionShader(WiredSelectionVisualizer.getRoomObject(furniId)); + } + + public static hide(furniId: number): void + { + WiredSelectionVisualizer.clearSelectionShader(WiredSelectionVisualizer.getRoomObject(furniId)); + } + + public static clearSelectionShaderFromFurni(furniIds: number[]): void + { + for(const furniId of furniIds) + { + WiredSelectionVisualizer.clearSelectionShader(WiredSelectionVisualizer.getRoomObject(furniId)); + } + } + + public static applySelectionShaderToFurni(furniIds: number[]): void + { + for(const furniId of furniIds) + { + WiredSelectionVisualizer.applySelectionShader(WiredSelectionVisualizer.getRoomObject(furniId)); + } + } + + private static getRoomObject(objectId: number): IRoomObject + { + const roomEngine = GetRoomEngine(); + + return roomEngine.getRoomObject(roomEngine.activeRoomId, objectId, RoomObjectCategory.FLOOR); + } + + private static applySelectionShader(roomObject: IRoomObject): void + { + if(!roomObject) return; + + const visualization = (roomObject.visualization as IRoomObjectSpriteVisualization); + + if(!visualization) return; + + for(const sprite of visualization.sprites) + { + if(sprite.blendMode === 'add') continue; + + if(!sprite.filters) sprite.filters = []; + + sprite.filters.push(WiredSelectionVisualizer._selectionShader); + + sprite.increaseUpdateCounter(); + } + } + + private static clearSelectionShader(roomObject: IRoomObject): void + { + if(!roomObject) return; + + const visualization = (roomObject.visualization as IRoomObjectSpriteVisualization); + + if(!visualization) return; + + for(const sprite of visualization.sprites) + { + if(!sprite.filters) continue; + + const index = sprite.filters.indexOf(WiredSelectionVisualizer._selectionShader); + + if(index >= 0) + { + sprite.filters.splice(index, 1); + + sprite.increaseUpdateCounter(); + } + } + } +} diff --git a/Coolui v3 test/src/api/wired/WiredStringDelimeter.ts b/Coolui v3 test/src/api/wired/WiredStringDelimeter.ts new file mode 100644 index 0000000000..bc4cf2e41a --- /dev/null +++ b/Coolui v3 test/src/api/wired/WiredStringDelimeter.ts @@ -0,0 +1 @@ +export const WIRED_STRING_DELIMETER: string = '\t'; diff --git a/Coolui v3 test/src/api/wired/WiredTriggerLayoutCode.ts b/Coolui v3 test/src/api/wired/WiredTriggerLayoutCode.ts new file mode 100644 index 0000000000..fd758dff54 --- /dev/null +++ b/Coolui v3 test/src/api/wired/WiredTriggerLayoutCode.ts @@ -0,0 +1,17 @@ +export class WiredTriggerLayout +{ + public static AVATAR_SAYS_SOMETHING: number = 0; + public static AVATAR_WALKS_ON_FURNI: number = 1; + public static AVATAR_WALKS_OFF_FURNI: number = 2; + public static EXECUTE_ONCE: number = 3; + public static TOGGLE_FURNI: number = 4; + public static EXECUTE_PERIODICALLY: number = 6; + public static AVATAR_ENTERS_ROOM: number = 7; + public static GAME_STARTS: number = 8; + public static GAME_ENDS: number = 9; + public static SCORE_ACHIEVED: number = 10; + public static COLLISION: number = 11; + public static EXECUTE_PERIODICALLY_LONG: number = 12; + public static BOT_REACHED_STUFF: number = 13; + public static BOT_REACHED_AVATAR: number = 14; +} diff --git a/Coolui v3 test/src/api/wired/index.ts b/Coolui v3 test/src/api/wired/index.ts new file mode 100644 index 0000000000..6590adfe21 --- /dev/null +++ b/Coolui v3 test/src/api/wired/index.ts @@ -0,0 +1,8 @@ +export * from './GetWiredTimeLocale'; +export * from './WiredActionLayoutCode'; +export * from './WiredConditionLayoutCode'; +export * from './WiredDateToString'; +export * from './WiredFurniType'; +export * from './WiredSelectionVisualizer'; +export * from './WiredStringDelimeter'; +export * from './WiredTriggerLayoutCode'; diff --git a/Coolui v3 test/src/assets/images/achievements/back-arrow.png b/Coolui v3 test/src/assets/images/achievements/back-arrow.png new file mode 100644 index 0000000000..e795c0ee17 Binary files /dev/null and b/Coolui v3 test/src/assets/images/achievements/back-arrow.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/arrow-left-icon.png b/Coolui v3 test/src/assets/images/avatareditor/arrow-left-icon.png new file mode 100644 index 0000000000..f94a7dfdd7 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/arrow-left-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/arrow-right-icon.png b/Coolui v3 test/src/assets/images/avatareditor/arrow-right-icon.png new file mode 100644 index 0000000000..1d2217fb27 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/arrow-right-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/avatar-editor-spritesheet.png b/Coolui v3 test/src/assets/images/avatareditor/avatar-editor-spritesheet.png new file mode 100644 index 0000000000..0c91ca0ffc Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/avatar-editor-spritesheet.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/ca-icon.png b/Coolui v3 test/src/assets/images/avatareditor/ca-icon.png new file mode 100644 index 0000000000..c9803b9505 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/ca-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/ca-selected-icon.png b/Coolui v3 test/src/assets/images/avatareditor/ca-selected-icon.png new file mode 100644 index 0000000000..b118c3ed60 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/ca-selected-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/cc-icon.png b/Coolui v3 test/src/assets/images/avatareditor/cc-icon.png new file mode 100644 index 0000000000..4a8844e49c Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/cc-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/cc-selected-icon.png b/Coolui v3 test/src/assets/images/avatareditor/cc-selected-icon.png new file mode 100644 index 0000000000..3493751af1 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/cc-selected-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/ch-icon.png b/Coolui v3 test/src/assets/images/avatareditor/ch-icon.png new file mode 100644 index 0000000000..ef7da1131b Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/ch-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/ch-selected-icon.png b/Coolui v3 test/src/assets/images/avatareditor/ch-selected-icon.png new file mode 100644 index 0000000000..c5e9f3402c Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/ch-selected-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/clear-icon.png b/Coolui v3 test/src/assets/images/avatareditor/clear-icon.png new file mode 100644 index 0000000000..e0d50abca8 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/clear-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/cp-icon.png b/Coolui v3 test/src/assets/images/avatareditor/cp-icon.png new file mode 100644 index 0000000000..5e460f153c Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/cp-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/cp-selected-icon.png b/Coolui v3 test/src/assets/images/avatareditor/cp-selected-icon.png new file mode 100644 index 0000000000..a067085d27 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/cp-selected-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/ea-icon.png b/Coolui v3 test/src/assets/images/avatareditor/ea-icon.png new file mode 100644 index 0000000000..c227ae1071 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/ea-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/ea-selected-icon.png b/Coolui v3 test/src/assets/images/avatareditor/ea-selected-icon.png new file mode 100644 index 0000000000..e7678c4a6e Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/ea-selected-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/fa-icon.png b/Coolui v3 test/src/assets/images/avatareditor/fa-icon.png new file mode 100644 index 0000000000..9b72ff5e38 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/fa-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/fa-selected-icon.png b/Coolui v3 test/src/assets/images/avatareditor/fa-selected-icon.png new file mode 100644 index 0000000000..a1d26b61c5 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/fa-selected-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/female-icon.png b/Coolui v3 test/src/assets/images/avatareditor/female-icon.png new file mode 100644 index 0000000000..8e6e8202c3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/female-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/female-selected-icon.png b/Coolui v3 test/src/assets/images/avatareditor/female-selected-icon.png new file mode 100644 index 0000000000..50ffde0999 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/female-selected-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/ha-icon.png b/Coolui v3 test/src/assets/images/avatareditor/ha-icon.png new file mode 100644 index 0000000000..f0a819181a Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/ha-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/ha-selected-icon.png b/Coolui v3 test/src/assets/images/avatareditor/ha-selected-icon.png new file mode 100644 index 0000000000..4c81ece520 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/ha-selected-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/he-icon.png b/Coolui v3 test/src/assets/images/avatareditor/he-icon.png new file mode 100644 index 0000000000..7cf6dc4c73 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/he-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/he-selected-icon.png b/Coolui v3 test/src/assets/images/avatareditor/he-selected-icon.png new file mode 100644 index 0000000000..32633559b9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/he-selected-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/hr-icon.png b/Coolui v3 test/src/assets/images/avatareditor/hr-icon.png new file mode 100644 index 0000000000..de299902af Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/hr-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/hr-selected-icon.png b/Coolui v3 test/src/assets/images/avatareditor/hr-selected-icon.png new file mode 100644 index 0000000000..c694b82a50 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/hr-selected-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/lg-icon.png b/Coolui v3 test/src/assets/images/avatareditor/lg-icon.png new file mode 100644 index 0000000000..0bdd750e4e Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/lg-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/lg-selected-icon.png b/Coolui v3 test/src/assets/images/avatareditor/lg-selected-icon.png new file mode 100644 index 0000000000..7a2853b027 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/lg-selected-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/loading-icon.png b/Coolui v3 test/src/assets/images/avatareditor/loading-icon.png new file mode 100644 index 0000000000..50d132b3e4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/loading-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/male-icon.png b/Coolui v3 test/src/assets/images/avatareditor/male-icon.png new file mode 100644 index 0000000000..95a1b35267 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/male-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/male-selected-icon.png b/Coolui v3 test/src/assets/images/avatareditor/male-selected-icon.png new file mode 100644 index 0000000000..85debbb3ef Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/male-selected-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/sellable-icon.png b/Coolui v3 test/src/assets/images/avatareditor/sellable-icon.png new file mode 100644 index 0000000000..4485b518d6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/sellable-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/sh-icon.png b/Coolui v3 test/src/assets/images/avatareditor/sh-icon.png new file mode 100644 index 0000000000..915c7c1e8d Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/sh-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/sh-selected-icon.png b/Coolui v3 test/src/assets/images/avatareditor/sh-selected-icon.png new file mode 100644 index 0000000000..12c6deb1fb Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/sh-selected-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/spotlight-icon.png b/Coolui v3 test/src/assets/images/avatareditor/spotlight-icon.png new file mode 100644 index 0000000000..8755373c50 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/spotlight-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/wa-icon.png b/Coolui v3 test/src/assets/images/avatareditor/wa-icon.png new file mode 100644 index 0000000000..8a73b7aef1 Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/wa-icon.png differ diff --git a/Coolui v3 test/src/assets/images/avatareditor/wa-selected-icon.png b/Coolui v3 test/src/assets/images/avatareditor/wa-selected-icon.png new file mode 100644 index 0000000000..5348be318f Binary files /dev/null and b/Coolui v3 test/src/assets/images/avatareditor/wa-selected-icon.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_0.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_0.png new file mode 100644 index 0000000000..dc80b28b07 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_0.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_1.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_1.gif new file mode 100644 index 0000000000..5a07f4f828 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_1.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_1.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_1.png new file mode 100644 index 0000000000..5b2fc5a87c Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_1.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_10.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_10.png new file mode 100644 index 0000000000..80764d4557 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_10.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_100.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_100.gif new file mode 100644 index 0000000000..8ad3ab7ade Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_100.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_101.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_101.png new file mode 100644 index 0000000000..22d8307160 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_101.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_102.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_102.gif new file mode 100644 index 0000000000..e5ee68a7cc Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_102.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_103.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_103.gif new file mode 100644 index 0000000000..d0645c1bd6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_103.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_104.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_104.gif new file mode 100644 index 0000000000..8198d2feb8 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_104.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_105.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_105.gif new file mode 100644 index 0000000000..508d38d300 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_105.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_106.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_106.gif new file mode 100644 index 0000000000..1a2f8aba4b Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_106.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_107.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_107.gif new file mode 100644 index 0000000000..2f24a27cfb Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_107.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_108.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_108.gif new file mode 100644 index 0000000000..b996f344a0 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_108.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_109.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_109.gif new file mode 100644 index 0000000000..23db9e6907 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_109.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_11.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_11.png new file mode 100644 index 0000000000..ebcc2a7fc6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_11.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_110.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_110.gif new file mode 100644 index 0000000000..fed52bbc76 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_110.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_111.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_111.gif new file mode 100644 index 0000000000..fa94d517c6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_111.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_112.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_112.gif new file mode 100644 index 0000000000..974a1ff0ac Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_112.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_113.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_113.gif new file mode 100644 index 0000000000..f63d02949e Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_113.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_114.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_114.gif new file mode 100644 index 0000000000..024c9b4283 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_114.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_115.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_115.gif new file mode 100644 index 0000000000..6f0cb29f7a Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_115.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_116.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_116.gif new file mode 100644 index 0000000000..02b464e9bf Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_116.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_117.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_117.gif new file mode 100644 index 0000000000..2c6a4a696f Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_117.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_118.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_118.gif new file mode 100644 index 0000000000..5b7d61fea9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_118.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_119.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_119.gif new file mode 100644 index 0000000000..52c4a2ccbd Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_119.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_12.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_12.png new file mode 100644 index 0000000000..6876efdd26 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_12.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_120.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_120.gif new file mode 100644 index 0000000000..4d2a314dd9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_120.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_121.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_121.gif new file mode 100644 index 0000000000..f5bc596931 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_121.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_122.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_122.gif new file mode 100644 index 0000000000..a625ecce1d Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_122.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_123.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_123.gif new file mode 100644 index 0000000000..adda1dca59 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_123.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_124.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_124.gif new file mode 100644 index 0000000000..551af328b5 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_124.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_125.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_125.gif new file mode 100644 index 0000000000..629010b56c Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_125.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_126.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_126.gif new file mode 100644 index 0000000000..c799c79030 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_126.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_127.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_127.gif new file mode 100644 index 0000000000..885ce780a5 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_127.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_128.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_128.gif new file mode 100644 index 0000000000..7603a4a4bc Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_128.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_129.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_129.gif new file mode 100644 index 0000000000..cd7c75ce92 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_129.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_13.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_13.png new file mode 100644 index 0000000000..d57057e9c1 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_13.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_130.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_130.gif new file mode 100644 index 0000000000..54e01ceb94 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_130.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_131.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_131.gif new file mode 100644 index 0000000000..19102c8f3b Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_131.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_132.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_132.gif new file mode 100644 index 0000000000..492c05defa Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_132.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_133.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_133.gif new file mode 100644 index 0000000000..5a033102bc Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_133.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_134.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_134.gif new file mode 100644 index 0000000000..13a07114d4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_134.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_135.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_135.gif new file mode 100644 index 0000000000..2f24a27cfb Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_135.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_136.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_136.gif new file mode 100644 index 0000000000..3d4d8f7104 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_136.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_137.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_137.gif new file mode 100644 index 0000000000..80cbbebc82 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_137.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_138.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_138.gif new file mode 100644 index 0000000000..0c7b67fb15 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_138.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_139.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_139.gif new file mode 100644 index 0000000000..6c76b2f224 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_139.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_14.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_14.png new file mode 100644 index 0000000000..5e8debc4c3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_14.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_140.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_140.gif new file mode 100644 index 0000000000..bce3709758 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_140.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_141.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_141.gif new file mode 100644 index 0000000000..05a7ad9efe Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_141.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_142.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_142.gif new file mode 100644 index 0000000000..aeef99c2e8 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_142.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_143.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_143.gif new file mode 100644 index 0000000000..5c1e597dc1 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_143.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_144.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_144.gif new file mode 100644 index 0000000000..a56328395a Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_144.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_145.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_145.gif new file mode 100644 index 0000000000..2b6e9c1fd6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_145.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_146.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_146.gif new file mode 100644 index 0000000000..ccc026484a Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_146.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_147.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_147.gif new file mode 100644 index 0000000000..9ea76f7b57 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_147.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_148.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_148.gif new file mode 100644 index 0000000000..2974315ed5 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_148.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_149.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_149.gif new file mode 100644 index 0000000000..7520899b0d Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_149.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_15.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_15.png new file mode 100644 index 0000000000..a9ec7693ea Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_15.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_150.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_150.gif new file mode 100644 index 0000000000..f0f50fade7 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_150.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_151.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_151.gif new file mode 100644 index 0000000000..77c150f970 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_151.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_152.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_152.gif new file mode 100644 index 0000000000..1ded113e8e Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_152.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_153.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_153.gif new file mode 100644 index 0000000000..19b9ecb7cd Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_153.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_154.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_154.gif new file mode 100644 index 0000000000..38338a0304 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_154.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_155.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_155.gif new file mode 100644 index 0000000000..8770d24919 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_155.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_156.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_156.gif new file mode 100644 index 0000000000..614d7b23b3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_156.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_157.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_157.gif new file mode 100644 index 0000000000..707a559b80 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_157.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_158.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_158.gif new file mode 100644 index 0000000000..ea576caa90 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_158.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_159.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_159.gif new file mode 100644 index 0000000000..d7b28fb4b6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_159.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_16.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_16.png new file mode 100644 index 0000000000..0afb1ed877 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_16.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_160.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_160.gif new file mode 100644 index 0000000000..d9824e8a1a Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_160.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_161.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_161.gif new file mode 100644 index 0000000000..91b9518ecb Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_161.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_162.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_162.gif new file mode 100644 index 0000000000..6029e0e96b Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_162.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_163.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_163.gif new file mode 100644 index 0000000000..8c597811b1 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_163.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_164.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_164.gif new file mode 100644 index 0000000000..b6804ab94f Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_164.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_165.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_165.gif new file mode 100644 index 0000000000..d01da99f5d Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_165.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_166.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_166.gif new file mode 100644 index 0000000000..ce7f41563b Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_166.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_167.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_167.gif new file mode 100644 index 0000000000..806869673a Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_167.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_168.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_168.gif new file mode 100644 index 0000000000..5de9226da4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_168.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_169.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_169.gif new file mode 100644 index 0000000000..f344b74708 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_169.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_17.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_17.png new file mode 100644 index 0000000000..3d593e4825 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_17.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_170.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_170.png new file mode 100644 index 0000000000..1880697b26 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_170.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_171.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_171.png new file mode 100644 index 0000000000..f1c1767fcc Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_171.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_172.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_172.png new file mode 100644 index 0000000000..6de0de046c Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_172.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_173.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_173.png new file mode 100644 index 0000000000..ee36cc76df Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_173.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_174.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_174.png new file mode 100644 index 0000000000..920270b235 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_174.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_175.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_175.png new file mode 100644 index 0000000000..5f2305ca30 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_175.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_176.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_176.png new file mode 100644 index 0000000000..f66effc6e9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_176.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_177.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_177.gif new file mode 100644 index 0000000000..7801fe0c04 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_177.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_178.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_178.png new file mode 100644 index 0000000000..287d1ed8c3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_178.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_179.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_179.png new file mode 100644 index 0000000000..39266b34cc Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_179.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_18.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_18.png new file mode 100644 index 0000000000..81bab2873d Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_18.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_180.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_180.png new file mode 100644 index 0000000000..4e1bb7aa4d Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_180.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_181.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_181.png new file mode 100644 index 0000000000..62c6dd2710 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_181.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_182.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_182.png new file mode 100644 index 0000000000..81613a1d7d Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_182.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_183.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_183.png new file mode 100644 index 0000000000..1d839eb0e3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_183.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_184.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_184.png new file mode 100644 index 0000000000..dd5388797f Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_184.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_185.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_185.png new file mode 100644 index 0000000000..669819e2f0 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_185.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_186.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_186.png new file mode 100644 index 0000000000..82709ad377 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_186.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_187.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_187.gif new file mode 100644 index 0000000000..f782ce7907 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_187.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_19.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_19.png new file mode 100644 index 0000000000..10bb78c01d Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_19.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_2.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_2.png new file mode 100644 index 0000000000..5b2fc5a87c Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_2.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_20.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_20.png new file mode 100644 index 0000000000..a60ef76da3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_20.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_21.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_21.png new file mode 100644 index 0000000000..8029ae00b5 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_21.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_22.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_22.png new file mode 100644 index 0000000000..07a1915cd7 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_22.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_23.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_23.png new file mode 100644 index 0000000000..86dbad3adf Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_23.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_24.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_24.png new file mode 100644 index 0000000000..79278d18e4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_24.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_25.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_25.png new file mode 100644 index 0000000000..d8025a683d Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_25.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_26.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_26.png new file mode 100644 index 0000000000..60e0c3715e Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_26.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_27.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_27.png new file mode 100644 index 0000000000..8e942a3501 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_27.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_28.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_28.png new file mode 100644 index 0000000000..689c2b9b41 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_28.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_29.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_29.png new file mode 100644 index 0000000000..3260464c60 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_29.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_3.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_3.png new file mode 100644 index 0000000000..41034f7d4a Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_3.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_30.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_30.png new file mode 100644 index 0000000000..3db687a20c Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_30.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_31.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_31.png new file mode 100644 index 0000000000..348b000bd5 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_31.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_32.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_32.png new file mode 100644 index 0000000000..7b11ec3f79 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_32.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_33.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_33.png new file mode 100644 index 0000000000..a5ba7926b2 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_33.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_34.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_34.png new file mode 100644 index 0000000000..c022119c7c Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_34.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_35.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_35.png new file mode 100644 index 0000000000..bacd72f3e3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_35.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_36.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_36.gif new file mode 100644 index 0000000000..b30f769d97 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_36.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_36.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_36.png new file mode 100644 index 0000000000..572e6611c7 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_36.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_37.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_37.png new file mode 100644 index 0000000000..572e6611c7 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_37.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_38.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_38.png new file mode 100644 index 0000000000..e47c7ad660 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_38.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_39.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_39.png new file mode 100644 index 0000000000..a4f199975c Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_39.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_4.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_4.png new file mode 100644 index 0000000000..b150551b71 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_4.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_40.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_40.png new file mode 100644 index 0000000000..1af2c2e6bf Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_40.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_41.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_41.png new file mode 100644 index 0000000000..4201d9e6b4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_41.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_42.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_42.png new file mode 100644 index 0000000000..61057a3baf Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_42.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_43.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_43.png new file mode 100644 index 0000000000..51781231ce Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_43.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_44.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_44.png new file mode 100644 index 0000000000..4f282a3426 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_44.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_45.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_45.png new file mode 100644 index 0000000000..0cfec58e22 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_45.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_46.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_46.png new file mode 100644 index 0000000000..0b370708ad Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_46.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_47.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_47.png new file mode 100644 index 0000000000..c8192c62fe Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_47.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_48.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_48.png new file mode 100644 index 0000000000..167ff55e18 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_48.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_49.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_49.png new file mode 100644 index 0000000000..ec8e60f160 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_49.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_5.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_5.png new file mode 100644 index 0000000000..f3a86fe03a Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_5.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_50.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_50.gif new file mode 100644 index 0000000000..f1e97a4515 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_50.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_50.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_50.png new file mode 100644 index 0000000000..275494e6cb Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_50.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_51.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_51.gif new file mode 100644 index 0000000000..f1e97a4515 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_51.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_52.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_52.gif new file mode 100644 index 0000000000..0f0c0719e9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_52.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_52.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_52.png new file mode 100644 index 0000000000..f0fadde78e Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_52.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_53.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_53.gif new file mode 100644 index 0000000000..fe88155545 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_53.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_53.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_53.png new file mode 100644 index 0000000000..629010b56c Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_53.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_54.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_54.gif new file mode 100644 index 0000000000..2dab5fe573 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_54.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_55.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_55.gif new file mode 100644 index 0000000000..a7688a198f Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_55.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_56.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_56.gif new file mode 100644 index 0000000000..c0fc06d8f9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_56.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_57.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_57.gif new file mode 100644 index 0000000000..2db068f2db Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_57.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_58.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_58.gif new file mode 100644 index 0000000000..d06f671a26 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_58.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_59.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_59.gif new file mode 100644 index 0000000000..a103717c7b Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_59.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_6.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_6.png new file mode 100644 index 0000000000..79ecaab5f3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_6.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_60.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_60.gif new file mode 100644 index 0000000000..9c7ad3822e Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_60.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_61.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_61.gif new file mode 100644 index 0000000000..aa0d872629 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_61.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_62.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_62.gif new file mode 100644 index 0000000000..b02708ee73 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_62.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_63.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_63.gif new file mode 100644 index 0000000000..ced6c2bf6b Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_63.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_64.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_64.gif new file mode 100644 index 0000000000..c0514928c0 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_64.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_65.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_65.gif new file mode 100644 index 0000000000..b48ed88eda Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_65.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_66.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_66.gif new file mode 100644 index 0000000000..45860c15d8 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_66.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_67.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_67.gif new file mode 100644 index 0000000000..613512a15a Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_67.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_68.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_68.gif new file mode 100644 index 0000000000..221547af10 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_68.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_69.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_69.gif new file mode 100644 index 0000000000..e23d28217c Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_69.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_7.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_7.png new file mode 100644 index 0000000000..7e61d10c34 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_7.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_70.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_70.gif new file mode 100644 index 0000000000..8f626fa192 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_70.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_71.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_71.gif new file mode 100644 index 0000000000..083417c7ee Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_71.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_72.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_72.gif new file mode 100644 index 0000000000..af10f9bf2e Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_72.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_73.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_73.gif new file mode 100644 index 0000000000..9293170fa9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_73.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_74.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_74.gif new file mode 100644 index 0000000000..a3c49ad645 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_74.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_75.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_75.gif new file mode 100644 index 0000000000..82709ad377 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_75.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_76.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_76.gif new file mode 100644 index 0000000000..bd9b9cd513 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_76.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_77.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_77.gif new file mode 100644 index 0000000000..14b2dc018c Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_77.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_78.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_78.gif new file mode 100644 index 0000000000..66288b3138 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_78.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_79.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_79.gif new file mode 100644 index 0000000000..82709ad377 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_79.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_8.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_8.png new file mode 100644 index 0000000000..89a49bb2a3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_8.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_80.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_80.gif new file mode 100644 index 0000000000..c1d6fa3072 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_80.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_81.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_81.gif new file mode 100644 index 0000000000..899e77c8d3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_81.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_82.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_82.gif new file mode 100644 index 0000000000..833069627b Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_82.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_83.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_83.gif new file mode 100644 index 0000000000..2cf235568b Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_83.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_84.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_84.gif new file mode 100644 index 0000000000..27282b7795 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_84.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_85.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_85.gif new file mode 100644 index 0000000000..7862b23df7 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_85.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_86.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_86.png new file mode 100644 index 0000000000..16ce06d4ed Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_86.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_87.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_87.gif new file mode 100644 index 0000000000..3833cae5d7 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_87.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_88.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_88.gif new file mode 100644 index 0000000000..ac1004b200 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_88.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_89.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_89.gif new file mode 100644 index 0000000000..071b4ac666 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_89.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_9.png b/Coolui v3 test/src/assets/images/backgrounds/background/bg_9.png new file mode 100644 index 0000000000..f48f4a4dcc Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_9.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_90.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_90.gif new file mode 100644 index 0000000000..5babf7434e Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_90.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_91.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_91.gif new file mode 100644 index 0000000000..cae21c57e2 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_91.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_92.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_92.gif new file mode 100644 index 0000000000..1ca656ef71 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_92.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_93.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_93.gif new file mode 100644 index 0000000000..ee7848789e Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_93.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_94.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_94.gif new file mode 100644 index 0000000000..f2ebe51ce3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_94.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_95.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_95.gif new file mode 100644 index 0000000000..568187f6d7 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_95.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_96.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_96.gif new file mode 100644 index 0000000000..8dfd887816 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_96.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_97.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_97.gif new file mode 100644 index 0000000000..62b8504b1e Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_97.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_98.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_98.gif new file mode 100644 index 0000000000..7f5ab864e0 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_98.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/background/bg_99.gif b/Coolui v3 test/src/assets/images/backgrounds/background/bg_99.gif new file mode 100644 index 0000000000..327a73bace Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/background/bg_99.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_0.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_0.png new file mode 100644 index 0000000000..dc80b28b07 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_0.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_1.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_1.gif new file mode 100644 index 0000000000..5a07f4f828 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_1.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_10.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_10.png new file mode 100644 index 0000000000..80764d4557 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_10.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_100.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_100.gif new file mode 100644 index 0000000000..8ad3ab7ade Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_100.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_102.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_102.gif new file mode 100644 index 0000000000..e5ee68a7cc Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_102.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_103.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_103.gif new file mode 100644 index 0000000000..d0645c1bd6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_103.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_104.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_104.gif new file mode 100644 index 0000000000..8198d2feb8 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_104.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_105.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_105.gif new file mode 100644 index 0000000000..508d38d300 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_105.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_106.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_106.gif new file mode 100644 index 0000000000..1a2f8aba4b Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_106.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_107.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_107.gif new file mode 100644 index 0000000000..2f24a27cfb Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_107.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_108.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_108.gif new file mode 100644 index 0000000000..b996f344a0 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_108.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_109.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_109.gif new file mode 100644 index 0000000000..23db9e6907 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_109.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_11.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_11.png new file mode 100644 index 0000000000..ebcc2a7fc6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_11.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_110.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_110.gif new file mode 100644 index 0000000000..fed52bbc76 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_110.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_111.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_111.gif new file mode 100644 index 0000000000..fa94d517c6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_111.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_112.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_112.gif new file mode 100644 index 0000000000..974a1ff0ac Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_112.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_113.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_113.gif new file mode 100644 index 0000000000..f63d02949e Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_113.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_114.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_114.gif new file mode 100644 index 0000000000..024c9b4283 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_114.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_115.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_115.gif new file mode 100644 index 0000000000..6f0cb29f7a Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_115.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_116.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_116.gif new file mode 100644 index 0000000000..02b464e9bf Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_116.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_117.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_117.gif new file mode 100644 index 0000000000..2c6a4a696f Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_117.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_118.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_118.gif new file mode 100644 index 0000000000..5b7d61fea9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_118.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_119.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_119.gif new file mode 100644 index 0000000000..52c4a2ccbd Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_119.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_12.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_12.png new file mode 100644 index 0000000000..6876efdd26 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_12.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_120.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_120.gif new file mode 100644 index 0000000000..4d2a314dd9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_120.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_121.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_121.gif new file mode 100644 index 0000000000..f5bc596931 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_121.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_122.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_122.gif new file mode 100644 index 0000000000..a625ecce1d Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_122.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_123.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_123.gif new file mode 100644 index 0000000000..adda1dca59 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_123.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_124.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_124.gif new file mode 100644 index 0000000000..551af328b5 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_124.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_125.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_125.gif new file mode 100644 index 0000000000..629010b56c Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_125.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_126.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_126.gif new file mode 100644 index 0000000000..c799c79030 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_126.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_127.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_127.gif new file mode 100644 index 0000000000..885ce780a5 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_127.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_128.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_128.gif new file mode 100644 index 0000000000..7603a4a4bc Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_128.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_129.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_129.gif new file mode 100644 index 0000000000..cd7c75ce92 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_129.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_13.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_13.png new file mode 100644 index 0000000000..d57057e9c1 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_13.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_130.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_130.gif new file mode 100644 index 0000000000..54e01ceb94 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_130.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_131.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_131.gif new file mode 100644 index 0000000000..19102c8f3b Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_131.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_132.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_132.gif new file mode 100644 index 0000000000..492c05defa Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_132.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_133.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_133.gif new file mode 100644 index 0000000000..5a033102bc Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_133.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_134.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_134.gif new file mode 100644 index 0000000000..13a07114d4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_134.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_135.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_135.gif new file mode 100644 index 0000000000..2f24a27cfb Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_135.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_136.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_136.gif new file mode 100644 index 0000000000..3d4d8f7104 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_136.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_137.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_137.gif new file mode 100644 index 0000000000..80cbbebc82 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_137.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_138.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_138.gif new file mode 100644 index 0000000000..0c7b67fb15 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_138.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_139.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_139.gif new file mode 100644 index 0000000000..6c76b2f224 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_139.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_14.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_14.png new file mode 100644 index 0000000000..5e8debc4c3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_14.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_140.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_140.gif new file mode 100644 index 0000000000..bce3709758 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_140.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_141.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_141.gif new file mode 100644 index 0000000000..05a7ad9efe Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_141.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_142.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_142.gif new file mode 100644 index 0000000000..aeef99c2e8 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_142.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_143.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_143.gif new file mode 100644 index 0000000000..5c1e597dc1 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_143.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_144.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_144.gif new file mode 100644 index 0000000000..a56328395a Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_144.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_145.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_145.gif new file mode 100644 index 0000000000..2b6e9c1fd6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_145.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_146.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_146.gif new file mode 100644 index 0000000000..ccc026484a Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_146.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_147.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_147.gif new file mode 100644 index 0000000000..9ea76f7b57 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_147.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_148.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_148.gif new file mode 100644 index 0000000000..2974315ed5 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_148.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_149.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_149.gif new file mode 100644 index 0000000000..7520899b0d Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_149.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_15.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_15.png new file mode 100644 index 0000000000..a9ec7693ea Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_15.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_150.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_150.gif new file mode 100644 index 0000000000..f0f50fade7 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_150.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_151.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_151.gif new file mode 100644 index 0000000000..77c150f970 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_151.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_152.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_152.gif new file mode 100644 index 0000000000..1ded113e8e Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_152.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_153.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_153.gif new file mode 100644 index 0000000000..19b9ecb7cd Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_153.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_154.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_154.gif new file mode 100644 index 0000000000..38338a0304 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_154.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_155.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_155.gif new file mode 100644 index 0000000000..8770d24919 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_155.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_156.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_156.gif new file mode 100644 index 0000000000..614d7b23b3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_156.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_157.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_157.gif new file mode 100644 index 0000000000..707a559b80 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_157.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_158.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_158.gif new file mode 100644 index 0000000000..ea576caa90 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_158.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_159.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_159.gif new file mode 100644 index 0000000000..d7b28fb4b6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_159.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_16.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_16.png new file mode 100644 index 0000000000..0afb1ed877 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_16.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_160.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_160.gif new file mode 100644 index 0000000000..d9824e8a1a Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_160.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_161.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_161.gif new file mode 100644 index 0000000000..91b9518ecb Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_161.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_162.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_162.gif new file mode 100644 index 0000000000..6029e0e96b Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_162.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_163.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_163.gif new file mode 100644 index 0000000000..8c597811b1 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_163.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_164.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_164.gif new file mode 100644 index 0000000000..b6804ab94f Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_164.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_165.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_165.gif new file mode 100644 index 0000000000..d01da99f5d Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_165.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_166.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_166.gif new file mode 100644 index 0000000000..ce7f41563b Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_166.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_167.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_167.gif new file mode 100644 index 0000000000..806869673a Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_167.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_168.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_168.gif new file mode 100644 index 0000000000..5de9226da4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_168.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_169.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_169.gif new file mode 100644 index 0000000000..f344b74708 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_169.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_17.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_17.png new file mode 100644 index 0000000000..3d593e4825 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_17.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_170.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_170.png new file mode 100644 index 0000000000..1880697b26 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_170.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_171.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_171.png new file mode 100644 index 0000000000..f1c1767fcc Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_171.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_172.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_172.png new file mode 100644 index 0000000000..6de0de046c Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_172.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_173.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_173.png new file mode 100644 index 0000000000..ee36cc76df Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_173.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_174.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_174.png new file mode 100644 index 0000000000..920270b235 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_174.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_175.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_175.png new file mode 100644 index 0000000000..5f2305ca30 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_175.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_176.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_176.png new file mode 100644 index 0000000000..f66effc6e9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_176.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_178.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_178.png new file mode 100644 index 0000000000..287d1ed8c3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_178.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_179.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_179.png new file mode 100644 index 0000000000..39266b34cc Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_179.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_18.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_18.png new file mode 100644 index 0000000000..81bab2873d Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_18.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_180.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_180.png new file mode 100644 index 0000000000..4e1bb7aa4d Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_180.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_181.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_181.png new file mode 100644 index 0000000000..62c6dd2710 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_181.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_182.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_182.png new file mode 100644 index 0000000000..81613a1d7d Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_182.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_183.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_183.png new file mode 100644 index 0000000000..1d839eb0e3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_183.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_184.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_184.png new file mode 100644 index 0000000000..dd5388797f Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_184.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_185.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_185.png new file mode 100644 index 0000000000..669819e2f0 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_185.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_186.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_186.png new file mode 100644 index 0000000000..82709ad377 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_186.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_187.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_187.gif new file mode 100644 index 0000000000..f782ce7907 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_187.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_188.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_188.gif new file mode 100644 index 0000000000..8d5e2a275f Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_188.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_19.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_19.png new file mode 100644 index 0000000000..10bb78c01d Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_19.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_2.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_2.png new file mode 100644 index 0000000000..5b2fc5a87c Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_2.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_20.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_20.png new file mode 100644 index 0000000000..a60ef76da3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_20.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_21.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_21.png new file mode 100644 index 0000000000..8029ae00b5 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_21.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_22.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_22.png new file mode 100644 index 0000000000..07a1915cd7 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_22.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_23.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_23.png new file mode 100644 index 0000000000..86dbad3adf Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_23.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_24.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_24.png new file mode 100644 index 0000000000..79278d18e4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_24.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_25.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_25.png new file mode 100644 index 0000000000..d8025a683d Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_25.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_26.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_26.png new file mode 100644 index 0000000000..60e0c3715e Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_26.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_27.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_27.png new file mode 100644 index 0000000000..8e942a3501 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_27.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_28.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_28.png new file mode 100644 index 0000000000..689c2b9b41 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_28.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_29.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_29.png new file mode 100644 index 0000000000..3260464c60 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_29.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_3.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_3.png new file mode 100644 index 0000000000..41034f7d4a Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_3.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_30.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_30.png new file mode 100644 index 0000000000..3db687a20c Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_30.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_31.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_31.png new file mode 100644 index 0000000000..348b000bd5 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_31.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_32.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_32.png new file mode 100644 index 0000000000..7b11ec3f79 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_32.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_33.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_33.png new file mode 100644 index 0000000000..a5ba7926b2 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_33.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_34.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_34.png new file mode 100644 index 0000000000..c022119c7c Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_34.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_35.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_35.png new file mode 100644 index 0000000000..bacd72f3e3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_35.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_36.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_36.gif new file mode 100644 index 0000000000..b30f769d97 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_36.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_37.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_37.png new file mode 100644 index 0000000000..572e6611c7 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_37.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_38.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_38.png new file mode 100644 index 0000000000..e47c7ad660 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_38.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_39.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_39.png new file mode 100644 index 0000000000..a4f199975c Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_39.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_4.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_4.png new file mode 100644 index 0000000000..b150551b71 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_4.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_40.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_40.png new file mode 100644 index 0000000000..1af2c2e6bf Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_40.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_41.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_41.png new file mode 100644 index 0000000000..4201d9e6b4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_41.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_42.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_42.png new file mode 100644 index 0000000000..61057a3baf Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_42.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_43.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_43.png new file mode 100644 index 0000000000..51781231ce Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_43.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_44.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_44.png new file mode 100644 index 0000000000..4f282a3426 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_44.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_45.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_45.png new file mode 100644 index 0000000000..0cfec58e22 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_45.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_46.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_46.png new file mode 100644 index 0000000000..0b370708ad Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_46.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_47.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_47.png new file mode 100644 index 0000000000..c8192c62fe Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_47.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_48.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_48.png new file mode 100644 index 0000000000..167ff55e18 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_48.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_49.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_49.png new file mode 100644 index 0000000000..ec8e60f160 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_49.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_5.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_5.png new file mode 100644 index 0000000000..f3a86fe03a Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_5.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_50.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_50.png new file mode 100644 index 0000000000..275494e6cb Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_50.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_51.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_51.gif new file mode 100644 index 0000000000..f1e97a4515 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_51.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_52.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_52.gif new file mode 100644 index 0000000000..0f0c0719e9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_52.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_53.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_53.gif new file mode 100644 index 0000000000..fe88155545 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_53.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_54.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_54.gif new file mode 100644 index 0000000000..2dab5fe573 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_54.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_55.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_55.gif new file mode 100644 index 0000000000..a7688a198f Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_55.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_56.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_56.gif new file mode 100644 index 0000000000..c0fc06d8f9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_56.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_57.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_57.gif new file mode 100644 index 0000000000..2db068f2db Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_57.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_58.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_58.gif new file mode 100644 index 0000000000..d06f671a26 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_58.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_59.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_59.gif new file mode 100644 index 0000000000..a103717c7b Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_59.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_6.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_6.png new file mode 100644 index 0000000000..79ecaab5f3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_6.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_60.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_60.gif new file mode 100644 index 0000000000..9c7ad3822e Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_60.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_61.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_61.gif new file mode 100644 index 0000000000..aa0d872629 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_61.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_62.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_62.gif new file mode 100644 index 0000000000..b02708ee73 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_62.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_63.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_63.gif new file mode 100644 index 0000000000..ced6c2bf6b Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_63.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_64.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_64.gif new file mode 100644 index 0000000000..c0514928c0 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_64.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_65.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_65.gif new file mode 100644 index 0000000000..b48ed88eda Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_65.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_66.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_66.gif new file mode 100644 index 0000000000..45860c15d8 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_66.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_67.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_67.gif new file mode 100644 index 0000000000..613512a15a Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_67.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_68.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_68.gif new file mode 100644 index 0000000000..221547af10 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_68.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_69.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_69.gif new file mode 100644 index 0000000000..e23d28217c Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_69.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_7.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_7.png new file mode 100644 index 0000000000..7e61d10c34 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_7.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_70.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_70.gif new file mode 100644 index 0000000000..8f626fa192 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_70.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_71.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_71.gif new file mode 100644 index 0000000000..083417c7ee Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_71.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_72.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_72.gif new file mode 100644 index 0000000000..af10f9bf2e Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_72.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_73.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_73.gif new file mode 100644 index 0000000000..9293170fa9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_73.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_74.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_74.gif new file mode 100644 index 0000000000..a3c49ad645 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_74.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_75.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_75.gif new file mode 100644 index 0000000000..82709ad377 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_75.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_76.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_76.gif new file mode 100644 index 0000000000..bd9b9cd513 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_76.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_77.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_77.gif new file mode 100644 index 0000000000..14b2dc018c Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_77.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_78.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_78.gif new file mode 100644 index 0000000000..66288b3138 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_78.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_79.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_79.gif new file mode 100644 index 0000000000..82709ad377 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_79.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_8.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_8.png new file mode 100644 index 0000000000..89a49bb2a3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_8.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_80.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_80.gif new file mode 100644 index 0000000000..c1d6fa3072 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_80.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_81.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_81.gif new file mode 100644 index 0000000000..899e77c8d3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_81.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_82.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_82.gif new file mode 100644 index 0000000000..833069627b Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_82.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_83.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_83.gif new file mode 100644 index 0000000000..2cf235568b Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_83.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_84.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_84.gif new file mode 100644 index 0000000000..27282b7795 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_84.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_85.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_85.gif new file mode 100644 index 0000000000..7862b23df7 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_85.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_86.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_86.gif new file mode 100644 index 0000000000..f9f0d0cbd4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_86.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_87.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_87.gif new file mode 100644 index 0000000000..3833cae5d7 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_87.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_88.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_88.gif new file mode 100644 index 0000000000..ac1004b200 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_88.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_89.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_89.gif new file mode 100644 index 0000000000..071b4ac666 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_89.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_9.png b/Coolui v3 test/src/assets/images/backgrounds/new/bg_9.png new file mode 100644 index 0000000000..f48f4a4dcc Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_9.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_90.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_90.gif new file mode 100644 index 0000000000..5babf7434e Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_90.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_91.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_91.gif new file mode 100644 index 0000000000..cae21c57e2 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_91.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_92.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_92.gif new file mode 100644 index 0000000000..1ca656ef71 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_92.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_93.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_93.gif new file mode 100644 index 0000000000..ee7848789e Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_93.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_94.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_94.gif new file mode 100644 index 0000000000..f2ebe51ce3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_94.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_95.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_95.gif new file mode 100644 index 0000000000..568187f6d7 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_95.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_96.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_96.gif new file mode 100644 index 0000000000..8dfd887816 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_96.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_97.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_97.gif new file mode 100644 index 0000000000..62b8504b1e Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_97.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_98.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_98.gif new file mode 100644 index 0000000000..7f5ab864e0 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_98.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/new/bg_99.gif b/Coolui v3 test/src/assets/images/backgrounds/new/bg_99.gif new file mode 100644 index 0000000000..327a73bace Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/new/bg_99.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_0.png b/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_0.png new file mode 100644 index 0000000000..afd389ab20 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_0.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_1.png b/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_1.png new file mode 100644 index 0000000000..22cadb7c91 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_1.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_2.png b/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_2.png new file mode 100644 index 0000000000..16aee82738 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_2.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_3.png b/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_3.png new file mode 100644 index 0000000000..ca5299231c Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_3.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_4.png b/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_4.png new file mode 100644 index 0000000000..b61dc84c40 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_4.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_5.gif b/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_5.gif new file mode 100644 index 0000000000..841a7b63fb Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_5.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_6.png b/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_6.png new file mode 100644 index 0000000000..a1f95e77e8 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_6.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_7.png b/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_7.png new file mode 100644 index 0000000000..987719ea27 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_7.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_8.png b/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_8.png new file mode 100644 index 0000000000..3c0f341853 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/overlay/overlay_8.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/overlay_0.png b/Coolui v3 test/src/assets/images/backgrounds/overlay_0.png new file mode 100644 index 0000000000..afd389ab20 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/overlay_0.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/overlay_1.png b/Coolui v3 test/src/assets/images/backgrounds/overlay_1.png new file mode 100644 index 0000000000..22cadb7c91 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/overlay_1.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/overlay_2.png b/Coolui v3 test/src/assets/images/backgrounds/overlay_2.png new file mode 100644 index 0000000000..16aee82738 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/overlay_2.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/overlay_3.png b/Coolui v3 test/src/assets/images/backgrounds/overlay_3.png new file mode 100644 index 0000000000..ca5299231c Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/overlay_3.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/overlay_4.png b/Coolui v3 test/src/assets/images/backgrounds/overlay_4.png new file mode 100644 index 0000000000..b61dc84c40 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/overlay_4.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/overlay_ring.gif b/Coolui v3 test/src/assets/images/backgrounds/overlay_ring.gif new file mode 100644 index 0000000000..841a7b63fb Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/overlay_ring.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_0.png b/Coolui v3 test/src/assets/images/backgrounds/stand_0.png new file mode 100644 index 0000000000..afd389ab20 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_0.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_1.png b/Coolui v3 test/src/assets/images/backgrounds/stand_1.png new file mode 100644 index 0000000000..27ebe0f772 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_1.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_10.png b/Coolui v3 test/src/assets/images/backgrounds/stand_10.png new file mode 100644 index 0000000000..59c2820763 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_10.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_11.png b/Coolui v3 test/src/assets/images/backgrounds/stand_11.png new file mode 100644 index 0000000000..6974b38adf Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_11.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_12.png b/Coolui v3 test/src/assets/images/backgrounds/stand_12.png new file mode 100644 index 0000000000..da4cccb2be Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_12.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_13.png b/Coolui v3 test/src/assets/images/backgrounds/stand_13.png new file mode 100644 index 0000000000..ab4e8be736 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_13.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_14.png b/Coolui v3 test/src/assets/images/backgrounds/stand_14.png new file mode 100644 index 0000000000..1a60cce5c3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_14.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_15.png b/Coolui v3 test/src/assets/images/backgrounds/stand_15.png new file mode 100644 index 0000000000..211802b946 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_15.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_16.png b/Coolui v3 test/src/assets/images/backgrounds/stand_16.png new file mode 100644 index 0000000000..b1e945dd5d Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_16.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_17.png b/Coolui v3 test/src/assets/images/backgrounds/stand_17.png new file mode 100644 index 0000000000..11907635b5 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_17.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_18.png b/Coolui v3 test/src/assets/images/backgrounds/stand_18.png new file mode 100644 index 0000000000..fd5aae57fb Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_18.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_19.png b/Coolui v3 test/src/assets/images/backgrounds/stand_19.png new file mode 100644 index 0000000000..c52280409b Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_19.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_2.png b/Coolui v3 test/src/assets/images/backgrounds/stand_2.png new file mode 100644 index 0000000000..9f789bd900 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_2.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_20.png b/Coolui v3 test/src/assets/images/backgrounds/stand_20.png new file mode 100644 index 0000000000..695122db2a Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_20.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_21.gif b/Coolui v3 test/src/assets/images/backgrounds/stand_21.gif new file mode 100644 index 0000000000..7449b3959f Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_21.gif differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_3.png b/Coolui v3 test/src/assets/images/backgrounds/stand_3.png new file mode 100644 index 0000000000..800748e7db Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_3.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_4.png b/Coolui v3 test/src/assets/images/backgrounds/stand_4.png new file mode 100644 index 0000000000..d7042dab6c Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_4.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_5.png b/Coolui v3 test/src/assets/images/backgrounds/stand_5.png new file mode 100644 index 0000000000..0f28a2927b Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_5.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_6.png b/Coolui v3 test/src/assets/images/backgrounds/stand_6.png new file mode 100644 index 0000000000..f20be87447 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_6.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_7.png b/Coolui v3 test/src/assets/images/backgrounds/stand_7.png new file mode 100644 index 0000000000..9a72c8f863 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_7.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_8.png b/Coolui v3 test/src/assets/images/backgrounds/stand_8.png new file mode 100644 index 0000000000..b0f8021ac2 Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_8.png differ diff --git a/Coolui v3 test/src/assets/images/backgrounds/stand_9.png b/Coolui v3 test/src/assets/images/backgrounds/stand_9.png new file mode 100644 index 0000000000..bf42a9424d Binary files /dev/null and b/Coolui v3 test/src/assets/images/backgrounds/stand_9.png differ diff --git a/Coolui v3 test/src/assets/images/campaign/available.png b/Coolui v3 test/src/assets/images/campaign/available.png new file mode 100644 index 0000000000..1cc8fa6219 Binary files /dev/null and b/Coolui v3 test/src/assets/images/campaign/available.png differ diff --git a/Coolui v3 test/src/assets/images/campaign/campaign_day_generic_bg.png b/Coolui v3 test/src/assets/images/campaign/campaign_day_generic_bg.png new file mode 100644 index 0000000000..25b3c622dc Binary files /dev/null and b/Coolui v3 test/src/assets/images/campaign/campaign_day_generic_bg.png differ diff --git a/Coolui v3 test/src/assets/images/campaign/campaign_opened.png b/Coolui v3 test/src/assets/images/campaign/campaign_opened.png new file mode 100644 index 0000000000..9ec1bb30be Binary files /dev/null and b/Coolui v3 test/src/assets/images/campaign/campaign_opened.png differ diff --git a/Coolui v3 test/src/assets/images/campaign/campaign_spritesheet.png b/Coolui v3 test/src/assets/images/campaign/campaign_spritesheet.png new file mode 100644 index 0000000000..eeac9d499e Binary files /dev/null and b/Coolui v3 test/src/assets/images/campaign/campaign_spritesheet.png differ diff --git a/Coolui v3 test/src/assets/images/campaign/locked.png b/Coolui v3 test/src/assets/images/campaign/locked.png new file mode 100644 index 0000000000..3805e50234 Binary files /dev/null and b/Coolui v3 test/src/assets/images/campaign/locked.png differ diff --git a/Coolui v3 test/src/assets/images/campaign/locked_bg.png b/Coolui v3 test/src/assets/images/campaign/locked_bg.png new file mode 100644 index 0000000000..93927dd5a8 Binary files /dev/null and b/Coolui v3 test/src/assets/images/campaign/locked_bg.png differ diff --git a/Coolui v3 test/src/assets/images/campaign/next.png b/Coolui v3 test/src/assets/images/campaign/next.png new file mode 100644 index 0000000000..88a2883a7a Binary files /dev/null and b/Coolui v3 test/src/assets/images/campaign/next.png differ diff --git a/Coolui v3 test/src/assets/images/campaign/prev.png b/Coolui v3 test/src/assets/images/campaign/prev.png new file mode 100644 index 0000000000..914a659212 Binary files /dev/null and b/Coolui v3 test/src/assets/images/campaign/prev.png differ diff --git a/Coolui v3 test/src/assets/images/campaign/unavailable.png b/Coolui v3 test/src/assets/images/campaign/unavailable.png new file mode 100644 index 0000000000..dc134c3f12 Binary files /dev/null and b/Coolui v3 test/src/assets/images/campaign/unavailable.png differ diff --git a/Coolui v3 test/src/assets/images/campaign/unlocked_bg.png b/Coolui v3 test/src/assets/images/campaign/unlocked_bg.png new file mode 100644 index 0000000000..31c35ba172 Binary files /dev/null and b/Coolui v3 test/src/assets/images/campaign/unlocked_bg.png differ diff --git a/Coolui v3 test/src/assets/images/catalog/diamond_info_illustration.gif b/Coolui v3 test/src/assets/images/catalog/diamond_info_illustration.gif new file mode 100644 index 0000000000..d082ef4d7b Binary files /dev/null and b/Coolui v3 test/src/assets/images/catalog/diamond_info_illustration.gif differ diff --git a/Coolui v3 test/src/assets/images/catalog/hc_banner_big.png b/Coolui v3 test/src/assets/images/catalog/hc_banner_big.png new file mode 100644 index 0000000000..4b2c4ec39e Binary files /dev/null and b/Coolui v3 test/src/assets/images/catalog/hc_banner_big.png differ diff --git a/Coolui v3 test/src/assets/images/catalog/hc_big.png b/Coolui v3 test/src/assets/images/catalog/hc_big.png new file mode 100644 index 0000000000..5f8c0a2360 Binary files /dev/null and b/Coolui v3 test/src/assets/images/catalog/hc_big.png differ diff --git a/Coolui v3 test/src/assets/images/catalog/hc_small.png b/Coolui v3 test/src/assets/images/catalog/hc_small.png new file mode 100644 index 0000000000..99833309b2 Binary files /dev/null and b/Coolui v3 test/src/assets/images/catalog/hc_small.png differ diff --git a/Coolui v3 test/src/assets/images/catalog/paint-icon.png b/Coolui v3 test/src/assets/images/catalog/paint-icon.png new file mode 100644 index 0000000000..f2bf7ea3fa Binary files /dev/null and b/Coolui v3 test/src/assets/images/catalog/paint-icon.png differ diff --git a/Coolui v3 test/src/assets/images/catalog/target-price.png b/Coolui v3 test/src/assets/images/catalog/target-price.png new file mode 100644 index 0000000000..8639afd55a Binary files /dev/null and b/Coolui v3 test/src/assets/images/catalog/target-price.png differ diff --git a/Coolui v3 test/src/assets/images/catalog/vip.png b/Coolui v3 test/src/assets/images/catalog/vip.png new file mode 100644 index 0000000000..9a3aad6d2f Binary files /dev/null and b/Coolui v3 test/src/assets/images/catalog/vip.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_0.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_0.png new file mode 100644 index 0000000000..da685365b1 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_0.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_0_1_33_34_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_0_1_33_34_pointer.png new file mode 100644 index 0000000000..e7a4740b2f Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_0_1_33_34_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_0_transparent.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_0_transparent.png new file mode 100644 index 0000000000..596d2c7c9e Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_0_transparent.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_1.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_1.png new file mode 100644 index 0000000000..492dbde7da Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_1.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_10.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_10.png new file mode 100644 index 0000000000..cbf25a8346 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_10.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_10_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_10_pointer.png new file mode 100644 index 0000000000..f7bd858733 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_10_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_11.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_11.png new file mode 100644 index 0000000000..a8026d6708 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_11.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_11_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_11_pointer.png new file mode 100644 index 0000000000..d6c4482a78 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_11_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_12.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_12.png new file mode 100644 index 0000000000..fa73413c7e Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_12.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_12_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_12_pointer.png new file mode 100644 index 0000000000..309a550636 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_12_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_13.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_13.png new file mode 100644 index 0000000000..a9f2c41b71 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_13.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_13_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_13_pointer.png new file mode 100644 index 0000000000..65be4f2320 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_13_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_14.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_14.png new file mode 100644 index 0000000000..54232f244e Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_14.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_14_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_14_pointer.png new file mode 100644 index 0000000000..4975897a17 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_14_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_15.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_15.png new file mode 100644 index 0000000000..6a7ad1306a Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_15.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_15_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_15_pointer.png new file mode 100644 index 0000000000..b4a69e1d03 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_15_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_16.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_16.png new file mode 100644 index 0000000000..ae0a23eb5d Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_16.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_16_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_16_pointer.png new file mode 100644 index 0000000000..abb9625e3e Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_16_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_17.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_17.png new file mode 100644 index 0000000000..51930255e8 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_17.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_17_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_17_pointer.png new file mode 100644 index 0000000000..b73b25b6eb Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_17_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_18.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_18.png new file mode 100644 index 0000000000..ad07d05ae9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_18.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_18_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_18_pointer.png new file mode 100644 index 0000000000..f364525700 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_18_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_19.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_19.png new file mode 100644 index 0000000000..c0dfb4120d Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_19.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_19_20_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_19_20_pointer.png new file mode 100644 index 0000000000..990c21f908 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_19_20_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_2.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_2.png new file mode 100644 index 0000000000..dc33507bba Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_2.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_20.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_20.png new file mode 100644 index 0000000000..127d0f924a Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_20.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_21.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_21.png new file mode 100644 index 0000000000..933daf5afb Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_21.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_21_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_21_pointer.png new file mode 100644 index 0000000000..fe1f3126e8 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_21_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_22.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_22.png new file mode 100644 index 0000000000..a77a733da9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_22.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_22_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_22_pointer.png new file mode 100644 index 0000000000..855ceffd16 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_22_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_23.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_23.png new file mode 100644 index 0000000000..d2a8fb4940 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_23.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_23_37_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_23_37_pointer.png new file mode 100644 index 0000000000..786c84945f Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_23_37_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_24.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_24.png new file mode 100644 index 0000000000..73ee650574 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_24.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_24_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_24_pointer.png new file mode 100644 index 0000000000..4653eef442 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_24_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_25.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_25.png new file mode 100644 index 0000000000..60dcaad550 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_25.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_25_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_25_pointer.png new file mode 100644 index 0000000000..7567395b81 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_25_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_26.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_26.png new file mode 100644 index 0000000000..0b43dec579 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_26.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_26_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_26_pointer.png new file mode 100644 index 0000000000..d97093f43e Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_26_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_27.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_27.png new file mode 100644 index 0000000000..57de9a9cee Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_27.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_27_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_27_pointer.png new file mode 100644 index 0000000000..d0c0cee210 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_27_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_28.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_28.png new file mode 100644 index 0000000000..3337b797ba Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_28.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_28_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_28_pointer.png new file mode 100644 index 0000000000..850b99e4cd Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_28_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_29.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_29.png new file mode 100644 index 0000000000..9eb5aecb27 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_29.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_29_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_29_pointer.png new file mode 100644 index 0000000000..1462b37ac8 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_29_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_2_31_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_2_31_pointer.png new file mode 100644 index 0000000000..ad9db877d2 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_2_31_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_3.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_3.png new file mode 100644 index 0000000000..6298809647 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_3.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_30.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_30.png new file mode 100644 index 0000000000..581fc70923 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_30.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_30_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_30_pointer.png new file mode 100644 index 0000000000..8660de9cd4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_30_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_32.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_32.png new file mode 100644 index 0000000000..598d8c8513 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_32.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_32_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_32_pointer.png new file mode 100644 index 0000000000..a68ddfbe09 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_32_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_33_34.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_33_34.png new file mode 100644 index 0000000000..d871e1a825 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_33_34.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_33_extra.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_33_extra.png new file mode 100644 index 0000000000..5b398baa0f Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_33_extra.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_34_extra.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_34_extra.png new file mode 100644 index 0000000000..9a67674fce Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_34_extra.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_35.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_35.png new file mode 100644 index 0000000000..e4e7ea6535 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_35.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_35_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_35_pointer.png new file mode 100644 index 0000000000..a8e8c32b3c Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_35_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_36.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_36.png new file mode 100644 index 0000000000..a96e5e0c2b Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_36.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_36_extra.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_36_extra.png new file mode 100644 index 0000000000..8e72fe4473 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_36_extra.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_36_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_36_pointer.png new file mode 100644 index 0000000000..caa9e3c073 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_36_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_37.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_37.png new file mode 100644 index 0000000000..43e609e069 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_37.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_38.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_38.png new file mode 100644 index 0000000000..326cdf489f Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_38.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_38_extra.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_38_extra.png new file mode 100644 index 0000000000..73cfcafb14 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_38_extra.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_38_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_38_pointer.png new file mode 100644 index 0000000000..402e543ca6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_38_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_3_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_3_pointer.png new file mode 100644 index 0000000000..55df368254 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_3_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_4.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_4.png new file mode 100644 index 0000000000..c5f5706127 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_4.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_4_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_4_pointer.png new file mode 100644 index 0000000000..beb69192f4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_4_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_5.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_5.png new file mode 100644 index 0000000000..fa33a77638 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_5.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_5_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_5_pointer.png new file mode 100644 index 0000000000..ce8131a054 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_5_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_6.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_6.png new file mode 100644 index 0000000000..ad6a0f2e94 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_6.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_6_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_6_pointer.png new file mode 100644 index 0000000000..8c343f5e6c Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_6_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_7.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_7.png new file mode 100644 index 0000000000..8ced1de793 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_7.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_7_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_7_pointer.png new file mode 100644 index 0000000000..6c056520de Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_7_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_8.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_8.png new file mode 100644 index 0000000000..2d370694a4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_8.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_8_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_8_pointer.png new file mode 100644 index 0000000000..f786e7e182 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_8_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_9.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_9.png new file mode 100644 index 0000000000..23d572145a Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_9.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_9_pointer.png b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_9_pointer.png new file mode 100644 index 0000000000..9bc5919bc9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chatbubbles/bubble_9_pointer.png differ diff --git a/Coolui v3 test/src/assets/images/chat/chathistory_background.png b/Coolui v3 test/src/assets/images/chat/chathistory_background.png new file mode 100644 index 0000000000..301d9512cd Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/chathistory_background.png differ diff --git a/Coolui v3 test/src/assets/images/chat/styles-icon.png b/Coolui v3 test/src/assets/images/chat/styles-icon.png new file mode 100644 index 0000000000..74cd9ecda0 Binary files /dev/null and b/Coolui v3 test/src/assets/images/chat/styles-icon.png differ diff --git a/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-0.png b/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-0.png new file mode 100644 index 0000000000..8c272a0a97 Binary files /dev/null and b/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-0.png differ diff --git a/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-1.png b/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-1.png new file mode 100644 index 0000000000..52e488f68b Binary files /dev/null and b/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-1.png differ diff --git a/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-2.png b/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-2.png new file mode 100644 index 0000000000..da1a1cb52a Binary files /dev/null and b/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-2.png differ diff --git a/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-3.png b/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-3.png new file mode 100644 index 0000000000..15712a91ac Binary files /dev/null and b/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-3.png differ diff --git a/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-4.png b/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-4.png new file mode 100644 index 0000000000..eb1b4b5e0f Binary files /dev/null and b/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-4.png differ diff --git a/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-5.png b/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-5.png new file mode 100644 index 0000000000..46e6f4d9b6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-5.png differ diff --git a/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-6.png b/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-6.png new file mode 100644 index 0000000000..fda613acc0 Binary files /dev/null and b/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-6.png differ diff --git a/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-7.png b/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-7.png new file mode 100644 index 0000000000..96fa8e483b Binary files /dev/null and b/Coolui v3 test/src/assets/images/floorplaneditor/door-direction-7.png differ diff --git a/Coolui v3 test/src/assets/images/floorplaneditor/icon-active-squaresselect.png b/Coolui v3 test/src/assets/images/floorplaneditor/icon-active-squaresselect.png new file mode 100644 index 0000000000..ea9d9f7e87 Binary files /dev/null and b/Coolui v3 test/src/assets/images/floorplaneditor/icon-active-squaresselect.png differ diff --git a/Coolui v3 test/src/assets/images/floorplaneditor/icon-deselect.png b/Coolui v3 test/src/assets/images/floorplaneditor/icon-deselect.png new file mode 100644 index 0000000000..6fa4f742ed Binary files /dev/null and b/Coolui v3 test/src/assets/images/floorplaneditor/icon-deselect.png differ diff --git a/Coolui v3 test/src/assets/images/floorplaneditor/icon-door.png b/Coolui v3 test/src/assets/images/floorplaneditor/icon-door.png new file mode 100644 index 0000000000..1b56bb2b56 Binary files /dev/null and b/Coolui v3 test/src/assets/images/floorplaneditor/icon-door.png differ diff --git a/Coolui v3 test/src/assets/images/floorplaneditor/icon-select.png b/Coolui v3 test/src/assets/images/floorplaneditor/icon-select.png new file mode 100644 index 0000000000..dc81c0ed66 Binary files /dev/null and b/Coolui v3 test/src/assets/images/floorplaneditor/icon-select.png differ diff --git a/Coolui v3 test/src/assets/images/floorplaneditor/icon-squaresselect.png b/Coolui v3 test/src/assets/images/floorplaneditor/icon-squaresselect.png new file mode 100644 index 0000000000..351098a3a5 Binary files /dev/null and b/Coolui v3 test/src/assets/images/floorplaneditor/icon-squaresselect.png differ diff --git a/Coolui v3 test/src/assets/images/floorplaneditor/icon-tile-down.png b/Coolui v3 test/src/assets/images/floorplaneditor/icon-tile-down.png new file mode 100644 index 0000000000..352c48dffb Binary files /dev/null and b/Coolui v3 test/src/assets/images/floorplaneditor/icon-tile-down.png differ diff --git a/Coolui v3 test/src/assets/images/floorplaneditor/icon-tile-set.png b/Coolui v3 test/src/assets/images/floorplaneditor/icon-tile-set.png new file mode 100644 index 0000000000..eac61532ca Binary files /dev/null and b/Coolui v3 test/src/assets/images/floorplaneditor/icon-tile-set.png differ diff --git a/Coolui v3 test/src/assets/images/floorplaneditor/icon-tile-unset.png b/Coolui v3 test/src/assets/images/floorplaneditor/icon-tile-unset.png new file mode 100644 index 0000000000..3f5e21817a Binary files /dev/null and b/Coolui v3 test/src/assets/images/floorplaneditor/icon-tile-unset.png differ diff --git a/Coolui v3 test/src/assets/images/floorplaneditor/icon-tile-up.png b/Coolui v3 test/src/assets/images/floorplaneditor/icon-tile-up.png new file mode 100644 index 0000000000..27153e0ce0 Binary files /dev/null and b/Coolui v3 test/src/assets/images/floorplaneditor/icon-tile-up.png differ diff --git a/Coolui v3 test/src/assets/images/floorplaneditor/preview_tile.png b/Coolui v3 test/src/assets/images/floorplaneditor/preview_tile.png new file mode 100644 index 0000000000..607f450134 Binary files /dev/null and b/Coolui v3 test/src/assets/images/floorplaneditor/preview_tile.png differ diff --git a/Coolui v3 test/src/assets/images/floorplaneditor/selected_height_icon.png b/Coolui v3 test/src/assets/images/floorplaneditor/selected_height_icon.png new file mode 100644 index 0000000000..f763fde5aa Binary files /dev/null and b/Coolui v3 test/src/assets/images/floorplaneditor/selected_height_icon.png differ diff --git a/Coolui v3 test/src/assets/images/friends/friends-spritesheet.png b/Coolui v3 test/src/assets/images/friends/friends-spritesheet.png new file mode 100644 index 0000000000..aa72325dbd Binary files /dev/null and b/Coolui v3 test/src/assets/images/friends/friends-spritesheet.png differ diff --git a/Coolui v3 test/src/assets/images/friends/icon-accept.png b/Coolui v3 test/src/assets/images/friends/icon-accept.png new file mode 100644 index 0000000000..da56941a0d Binary files /dev/null and b/Coolui v3 test/src/assets/images/friends/icon-accept.png differ diff --git a/Coolui v3 test/src/assets/images/friends/icon-add.png b/Coolui v3 test/src/assets/images/friends/icon-add.png new file mode 100644 index 0000000000..d570c8f58f Binary files /dev/null and b/Coolui v3 test/src/assets/images/friends/icon-add.png differ diff --git a/Coolui v3 test/src/assets/images/friends/icon-bobba.png b/Coolui v3 test/src/assets/images/friends/icon-bobba.png new file mode 100644 index 0000000000..eaea89573d Binary files /dev/null and b/Coolui v3 test/src/assets/images/friends/icon-bobba.png differ diff --git a/Coolui v3 test/src/assets/images/friends/icon-chat.png b/Coolui v3 test/src/assets/images/friends/icon-chat.png new file mode 100644 index 0000000000..631b7bc268 Binary files /dev/null and b/Coolui v3 test/src/assets/images/friends/icon-chat.png differ diff --git a/Coolui v3 test/src/assets/images/friends/icon-deny.png b/Coolui v3 test/src/assets/images/friends/icon-deny.png new file mode 100644 index 0000000000..c74e5c067c Binary files /dev/null and b/Coolui v3 test/src/assets/images/friends/icon-deny.png differ diff --git a/Coolui v3 test/src/assets/images/friends/icon-follow.png b/Coolui v3 test/src/assets/images/friends/icon-follow.png new file mode 100644 index 0000000000..9e045168a6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/friends/icon-follow.png differ diff --git a/Coolui v3 test/src/assets/images/friends/icon-friendbar-chat.png b/Coolui v3 test/src/assets/images/friends/icon-friendbar-chat.png new file mode 100644 index 0000000000..e0c1645933 Binary files /dev/null and b/Coolui v3 test/src/assets/images/friends/icon-friendbar-chat.png differ diff --git a/Coolui v3 test/src/assets/images/friends/icon-friendbar-visit.png b/Coolui v3 test/src/assets/images/friends/icon-friendbar-visit.png new file mode 100644 index 0000000000..fac57d9a67 Binary files /dev/null and b/Coolui v3 test/src/assets/images/friends/icon-friendbar-visit.png differ diff --git a/Coolui v3 test/src/assets/images/friends/icon-heart.png b/Coolui v3 test/src/assets/images/friends/icon-heart.png new file mode 100644 index 0000000000..5dd1015e96 Binary files /dev/null and b/Coolui v3 test/src/assets/images/friends/icon-heart.png differ diff --git a/Coolui v3 test/src/assets/images/friends/icon-new-message.png b/Coolui v3 test/src/assets/images/friends/icon-new-message.png new file mode 100644 index 0000000000..46d23f5a29 Binary files /dev/null and b/Coolui v3 test/src/assets/images/friends/icon-new-message.png differ diff --git a/Coolui v3 test/src/assets/images/friends/icon-none.png b/Coolui v3 test/src/assets/images/friends/icon-none.png new file mode 100644 index 0000000000..ececd9ee44 Binary files /dev/null and b/Coolui v3 test/src/assets/images/friends/icon-none.png differ diff --git a/Coolui v3 test/src/assets/images/friends/icon-profile-sm-hover.png b/Coolui v3 test/src/assets/images/friends/icon-profile-sm-hover.png new file mode 100644 index 0000000000..f8f42f2bf0 Binary files /dev/null and b/Coolui v3 test/src/assets/images/friends/icon-profile-sm-hover.png differ diff --git a/Coolui v3 test/src/assets/images/friends/icon-profile-sm.png b/Coolui v3 test/src/assets/images/friends/icon-profile-sm.png new file mode 100644 index 0000000000..60107e1e19 Binary files /dev/null and b/Coolui v3 test/src/assets/images/friends/icon-profile-sm.png differ diff --git a/Coolui v3 test/src/assets/images/friends/icon-profile.png b/Coolui v3 test/src/assets/images/friends/icon-profile.png new file mode 100644 index 0000000000..2c8ec5c713 Binary files /dev/null and b/Coolui v3 test/src/assets/images/friends/icon-profile.png differ diff --git a/Coolui v3 test/src/assets/images/friends/icon-smile.png b/Coolui v3 test/src/assets/images/friends/icon-smile.png new file mode 100644 index 0000000000..62fcae6ebc Binary files /dev/null and b/Coolui v3 test/src/assets/images/friends/icon-smile.png differ diff --git a/Coolui v3 test/src/assets/images/friends/icon-warning.png b/Coolui v3 test/src/assets/images/friends/icon-warning.png new file mode 100644 index 0000000000..3a3ffcf9ef Binary files /dev/null and b/Coolui v3 test/src/assets/images/friends/icon-warning.png differ diff --git a/Coolui v3 test/src/assets/images/friends/messenger_notification_icon.png b/Coolui v3 test/src/assets/images/friends/messenger_notification_icon.png new file mode 100644 index 0000000000..73f7e5eaba Binary files /dev/null and b/Coolui v3 test/src/assets/images/friends/messenger_notification_icon.png differ diff --git a/Coolui v3 test/src/assets/images/gamecenter/selectedIcon.png b/Coolui v3 test/src/assets/images/gamecenter/selectedIcon.png new file mode 100644 index 0000000000..718e48b8b3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/gamecenter/selectedIcon.png differ diff --git a/Coolui v3 test/src/assets/images/gift/gift_tag.png b/Coolui v3 test/src/assets/images/gift/gift_tag.png new file mode 100644 index 0000000000..3c24813e19 Binary files /dev/null and b/Coolui v3 test/src/assets/images/gift/gift_tag.png differ diff --git a/Coolui v3 test/src/assets/images/gift/incognito.png b/Coolui v3 test/src/assets/images/gift/incognito.png new file mode 100644 index 0000000000..304c30c253 Binary files /dev/null and b/Coolui v3 test/src/assets/images/gift/incognito.png differ diff --git a/Coolui v3 test/src/assets/images/groups/creator_images.png b/Coolui v3 test/src/assets/images/groups/creator_images.png new file mode 100644 index 0000000000..b39b0d7b83 Binary files /dev/null and b/Coolui v3 test/src/assets/images/groups/creator_images.png differ diff --git a/Coolui v3 test/src/assets/images/groups/creator_tabs.png b/Coolui v3 test/src/assets/images/groups/creator_tabs.png new file mode 100644 index 0000000000..e95b9f0cb0 Binary files /dev/null and b/Coolui v3 test/src/assets/images/groups/creator_tabs.png differ diff --git a/Coolui v3 test/src/assets/images/groups/icons/group_decorate_icon.png b/Coolui v3 test/src/assets/images/groups/icons/group_decorate_icon.png new file mode 100644 index 0000000000..3a395fbb7b Binary files /dev/null and b/Coolui v3 test/src/assets/images/groups/icons/group_decorate_icon.png differ diff --git a/Coolui v3 test/src/assets/images/groups/icons/group_favorite.png b/Coolui v3 test/src/assets/images/groups/icons/group_favorite.png new file mode 100644 index 0000000000..4cd734d12d Binary files /dev/null and b/Coolui v3 test/src/assets/images/groups/icons/group_favorite.png differ diff --git a/Coolui v3 test/src/assets/images/groups/icons/group_icon_admin.png b/Coolui v3 test/src/assets/images/groups/icons/group_icon_admin.png new file mode 100644 index 0000000000..bad07e4ae6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/groups/icons/group_icon_admin.png differ diff --git a/Coolui v3 test/src/assets/images/groups/icons/group_icon_big_admin.png b/Coolui v3 test/src/assets/images/groups/icons/group_icon_big_admin.png new file mode 100644 index 0000000000..2d3e28765d Binary files /dev/null and b/Coolui v3 test/src/assets/images/groups/icons/group_icon_big_admin.png differ diff --git a/Coolui v3 test/src/assets/images/groups/icons/group_icon_big_member.png b/Coolui v3 test/src/assets/images/groups/icons/group_icon_big_member.png new file mode 100644 index 0000000000..3435937e26 Binary files /dev/null and b/Coolui v3 test/src/assets/images/groups/icons/group_icon_big_member.png differ diff --git a/Coolui v3 test/src/assets/images/groups/icons/group_icon_big_owner.png b/Coolui v3 test/src/assets/images/groups/icons/group_icon_big_owner.png new file mode 100644 index 0000000000..52b8361e59 Binary files /dev/null and b/Coolui v3 test/src/assets/images/groups/icons/group_icon_big_owner.png differ diff --git a/Coolui v3 test/src/assets/images/groups/icons/group_icon_not_admin.png b/Coolui v3 test/src/assets/images/groups/icons/group_icon_not_admin.png new file mode 100644 index 0000000000..7c8b9ee492 Binary files /dev/null and b/Coolui v3 test/src/assets/images/groups/icons/group_icon_not_admin.png differ diff --git a/Coolui v3 test/src/assets/images/groups/icons/group_icon_small_owner.png b/Coolui v3 test/src/assets/images/groups/icons/group_icon_small_owner.png new file mode 100644 index 0000000000..7230ecc590 Binary files /dev/null and b/Coolui v3 test/src/assets/images/groups/icons/group_icon_small_owner.png differ diff --git a/Coolui v3 test/src/assets/images/groups/icons/group_notfavorite.png b/Coolui v3 test/src/assets/images/groups/icons/group_notfavorite.png new file mode 100644 index 0000000000..835d8eb7e4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/groups/icons/group_notfavorite.png differ diff --git a/Coolui v3 test/src/assets/images/groups/icons/grouptype_icon_0.png b/Coolui v3 test/src/assets/images/groups/icons/grouptype_icon_0.png new file mode 100644 index 0000000000..9dc4191d59 Binary files /dev/null and b/Coolui v3 test/src/assets/images/groups/icons/grouptype_icon_0.png differ diff --git a/Coolui v3 test/src/assets/images/groups/icons/grouptype_icon_1.png b/Coolui v3 test/src/assets/images/groups/icons/grouptype_icon_1.png new file mode 100644 index 0000000000..ed37213e38 Binary files /dev/null and b/Coolui v3 test/src/assets/images/groups/icons/grouptype_icon_1.png differ diff --git a/Coolui v3 test/src/assets/images/groups/icons/grouptype_icon_2.png b/Coolui v3 test/src/assets/images/groups/icons/grouptype_icon_2.png new file mode 100644 index 0000000000..6a5c0571fe Binary files /dev/null and b/Coolui v3 test/src/assets/images/groups/icons/grouptype_icon_2.png differ diff --git a/Coolui v3 test/src/assets/images/groups/no-group-1.png b/Coolui v3 test/src/assets/images/groups/no-group-1.png new file mode 100644 index 0000000000..caf0182de3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/groups/no-group-1.png differ diff --git a/Coolui v3 test/src/assets/images/groups/no-group-2.png b/Coolui v3 test/src/assets/images/groups/no-group-2.png new file mode 100644 index 0000000000..797c946800 Binary files /dev/null and b/Coolui v3 test/src/assets/images/groups/no-group-2.png differ diff --git a/Coolui v3 test/src/assets/images/groups/no-group-3.png b/Coolui v3 test/src/assets/images/groups/no-group-3.png new file mode 100644 index 0000000000..e5d6a7b77d Binary files /dev/null and b/Coolui v3 test/src/assets/images/groups/no-group-3.png differ diff --git a/Coolui v3 test/src/assets/images/groups/no-group-spritesheet.png b/Coolui v3 test/src/assets/images/groups/no-group-spritesheet.png new file mode 100644 index 0000000000..3eed4b97d0 Binary files /dev/null and b/Coolui v3 test/src/assets/images/groups/no-group-spritesheet.png differ diff --git a/Coolui v3 test/src/assets/images/guide-tool/guide_tool_duty_switch.png b/Coolui v3 test/src/assets/images/guide-tool/guide_tool_duty_switch.png new file mode 100644 index 0000000000..f7de6be96b Binary files /dev/null and b/Coolui v3 test/src/assets/images/guide-tool/guide_tool_duty_switch.png differ diff --git a/Coolui v3 test/src/assets/images/guide-tool/guide_tool_info_icon.png b/Coolui v3 test/src/assets/images/guide-tool/guide_tool_info_icon.png new file mode 100644 index 0000000000..32c4a3531d Binary files /dev/null and b/Coolui v3 test/src/assets/images/guide-tool/guide_tool_info_icon.png differ diff --git a/Coolui v3 test/src/assets/images/hc-center/benefits.png b/Coolui v3 test/src/assets/images/hc-center/benefits.png new file mode 100644 index 0000000000..508ecc823c Binary files /dev/null and b/Coolui v3 test/src/assets/images/hc-center/benefits.png differ diff --git a/Coolui v3 test/src/assets/images/hc-center/clock.png b/Coolui v3 test/src/assets/images/hc-center/clock.png new file mode 100644 index 0000000000..4c37e957de Binary files /dev/null and b/Coolui v3 test/src/assets/images/hc-center/clock.png differ diff --git a/Coolui v3 test/src/assets/images/hc-center/hc_logo.gif b/Coolui v3 test/src/assets/images/hc-center/hc_logo.gif new file mode 100644 index 0000000000..8834034f38 Binary files /dev/null and b/Coolui v3 test/src/assets/images/hc-center/hc_logo.gif differ diff --git a/Coolui v3 test/src/assets/images/hc-center/payday.png b/Coolui v3 test/src/assets/images/hc-center/payday.png new file mode 100644 index 0000000000..c9bd80ba04 Binary files /dev/null and b/Coolui v3 test/src/assets/images/hc-center/payday.png differ diff --git a/Coolui v3 test/src/assets/images/help/help_index.png b/Coolui v3 test/src/assets/images/help/help_index.png new file mode 100644 index 0000000000..2844f41e11 Binary files /dev/null and b/Coolui v3 test/src/assets/images/help/help_index.png differ diff --git a/Coolui v3 test/src/assets/images/hotelview/arrow_down.png b/Coolui v3 test/src/assets/images/hotelview/arrow_down.png new file mode 100644 index 0000000000..70d0b9c7be Binary files /dev/null and b/Coolui v3 test/src/assets/images/hotelview/arrow_down.png differ diff --git a/Coolui v3 test/src/assets/images/hotelview/hotelview.png b/Coolui v3 test/src/assets/images/hotelview/hotelview.png new file mode 100644 index 0000000000..62609c2008 Binary files /dev/null and b/Coolui v3 test/src/assets/images/hotelview/hotelview.png differ diff --git a/Coolui v3 test/src/assets/images/hotelview/infobus.gif b/Coolui v3 test/src/assets/images/hotelview/infobus.gif new file mode 100644 index 0000000000..f15e9a4571 Binary files /dev/null and b/Coolui v3 test/src/assets/images/hotelview/infobus.gif differ diff --git a/Coolui v3 test/src/assets/images/hotelview/lobby.png b/Coolui v3 test/src/assets/images/hotelview/lobby.png new file mode 100644 index 0000000000..f5f3e86083 Binary files /dev/null and b/Coolui v3 test/src/assets/images/hotelview/lobby.png differ diff --git a/Coolui v3 test/src/assets/images/hotelview/peacefulpark.gif b/Coolui v3 test/src/assets/images/hotelview/peacefulpark.gif new file mode 100644 index 0000000000..9bde74aca2 Binary files /dev/null and b/Coolui v3 test/src/assets/images/hotelview/peacefulpark.gif differ diff --git a/Coolui v3 test/src/assets/images/hotelview/picnic.gif b/Coolui v3 test/src/assets/images/hotelview/picnic.gif new file mode 100644 index 0000000000..a59d214b1a Binary files /dev/null and b/Coolui v3 test/src/assets/images/hotelview/picnic.gif differ diff --git a/Coolui v3 test/src/assets/images/hotelview/pool.gif b/Coolui v3 test/src/assets/images/hotelview/pool.gif new file mode 100644 index 0000000000..18aea23399 Binary files /dev/null and b/Coolui v3 test/src/assets/images/hotelview/pool.gif differ diff --git a/Coolui v3 test/src/assets/images/hotelview/rooftop.gif b/Coolui v3 test/src/assets/images/hotelview/rooftop.gif new file mode 100644 index 0000000000..5d53599fa9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/hotelview/rooftop.gif differ diff --git a/Coolui v3 test/src/assets/images/hotelview/rooftop_pool.gif b/Coolui v3 test/src/assets/images/hotelview/rooftop_pool.gif new file mode 100644 index 0000000000..d74569cea5 Binary files /dev/null and b/Coolui v3 test/src/assets/images/hotelview/rooftop_pool.gif differ diff --git a/Coolui v3 test/src/assets/images/icons/arrows.png b/Coolui v3 test/src/assets/images/icons/arrows.png new file mode 100644 index 0000000000..47a833ce7a Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/arrows.png differ diff --git a/Coolui v3 test/src/assets/images/icons/camera-colormatrix.png b/Coolui v3 test/src/assets/images/icons/camera-colormatrix.png new file mode 100644 index 0000000000..894396e7c6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/camera-colormatrix.png differ diff --git a/Coolui v3 test/src/assets/images/icons/camera-composite.png b/Coolui v3 test/src/assets/images/icons/camera-composite.png new file mode 100644 index 0000000000..681fb18cb0 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/camera-composite.png differ diff --git a/Coolui v3 test/src/assets/images/icons/camera-small.png b/Coolui v3 test/src/assets/images/icons/camera-small.png new file mode 100644 index 0000000000..1c0563eeb7 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/camera-small.png differ diff --git a/Coolui v3 test/src/assets/images/icons/chat-history.png b/Coolui v3 test/src/assets/images/icons/chat-history.png new file mode 100644 index 0000000000..da51f37e2c Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/chat-history.png differ diff --git a/Coolui v3 test/src/assets/images/icons/close.png b/Coolui v3 test/src/assets/images/icons/close.png new file mode 100644 index 0000000000..a723b3eac2 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/close.png differ diff --git a/Coolui v3 test/src/assets/images/icons/cog.png b/Coolui v3 test/src/assets/images/icons/cog.png new file mode 100644 index 0000000000..b7101d7184 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/cog.png differ diff --git a/Coolui v3 test/src/assets/images/icons/disablebubble.png b/Coolui v3 test/src/assets/images/icons/disablebubble.png new file mode 100644 index 0000000000..bbf1390d20 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/disablebubble.png differ diff --git a/Coolui v3 test/src/assets/images/icons/enablebubble.png b/Coolui v3 test/src/assets/images/icons/enablebubble.png new file mode 100644 index 0000000000..217109c5f3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/enablebubble.png differ diff --git a/Coolui v3 test/src/assets/images/icons/help.png b/Coolui v3 test/src/assets/images/icons/help.png new file mode 100644 index 0000000000..50d8aa8a0e Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/help.png differ diff --git a/Coolui v3 test/src/assets/images/icons/house-small.png b/Coolui v3 test/src/assets/images/icons/house-small.png new file mode 100644 index 0000000000..e106a45603 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/house-small.png differ diff --git a/Coolui v3 test/src/assets/images/icons/icon_cog.png b/Coolui v3 test/src/assets/images/icons/icon_cog.png new file mode 100644 index 0000000000..7175afb784 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/icon_cog.png differ diff --git a/Coolui v3 test/src/assets/images/icons/like-room.png b/Coolui v3 test/src/assets/images/icons/like-room.png new file mode 100644 index 0000000000..1c13cd8512 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/like-room.png differ diff --git a/Coolui v3 test/src/assets/images/icons/loading-icon.png b/Coolui v3 test/src/assets/images/icons/loading-icon.png new file mode 100644 index 0000000000..e3d64d0bd0 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/loading-icon.png differ diff --git a/Coolui v3 test/src/assets/images/icons/room-history-back-disabled.png b/Coolui v3 test/src/assets/images/icons/room-history-back-disabled.png new file mode 100644 index 0000000000..78a447502e Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/room-history-back-disabled.png differ diff --git a/Coolui v3 test/src/assets/images/icons/room-history-back-enabled.png b/Coolui v3 test/src/assets/images/icons/room-history-back-enabled.png new file mode 100644 index 0000000000..bed6a42535 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/room-history-back-enabled.png differ diff --git a/Coolui v3 test/src/assets/images/icons/room-history-disabled.png b/Coolui v3 test/src/assets/images/icons/room-history-disabled.png new file mode 100644 index 0000000000..fcd811976c Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/room-history-disabled.png differ diff --git a/Coolui v3 test/src/assets/images/icons/room-history-enabled.png b/Coolui v3 test/src/assets/images/icons/room-history-enabled.png new file mode 100644 index 0000000000..287227bf40 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/room-history-enabled.png differ diff --git a/Coolui v3 test/src/assets/images/icons/room-history-next-disabled.png b/Coolui v3 test/src/assets/images/icons/room-history-next-disabled.png new file mode 100644 index 0000000000..3f82d0ee2e Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/room-history-next-disabled.png differ diff --git a/Coolui v3 test/src/assets/images/icons/room-history-next-enabled.png b/Coolui v3 test/src/assets/images/icons/room-history-next-enabled.png new file mode 100644 index 0000000000..3de01c078e Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/room-history-next-enabled.png differ diff --git a/Coolui v3 test/src/assets/images/icons/room-link.png b/Coolui v3 test/src/assets/images/icons/room-link.png new file mode 100644 index 0000000000..efbebf4a80 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/room-link.png differ diff --git a/Coolui v3 test/src/assets/images/icons/sign-exclamation.png b/Coolui v3 test/src/assets/images/icons/sign-exclamation.png new file mode 100644 index 0000000000..7db61fb02b Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/sign-exclamation.png differ diff --git a/Coolui v3 test/src/assets/images/icons/sign-heart.png b/Coolui v3 test/src/assets/images/icons/sign-heart.png new file mode 100644 index 0000000000..8ac56853d0 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/sign-heart.png differ diff --git a/Coolui v3 test/src/assets/images/icons/sign-red.png b/Coolui v3 test/src/assets/images/icons/sign-red.png new file mode 100644 index 0000000000..ac0915e108 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/sign-red.png differ diff --git a/Coolui v3 test/src/assets/images/icons/sign-skull.png b/Coolui v3 test/src/assets/images/icons/sign-skull.png new file mode 100644 index 0000000000..6221d9a5b9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/sign-skull.png differ diff --git a/Coolui v3 test/src/assets/images/icons/sign-smile.png b/Coolui v3 test/src/assets/images/icons/sign-smile.png new file mode 100644 index 0000000000..1a1721cd0f Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/sign-smile.png differ diff --git a/Coolui v3 test/src/assets/images/icons/sign-soccer.png b/Coolui v3 test/src/assets/images/icons/sign-soccer.png new file mode 100644 index 0000000000..334f1fab46 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/sign-soccer.png differ diff --git a/Coolui v3 test/src/assets/images/icons/sign-yellow.png b/Coolui v3 test/src/assets/images/icons/sign-yellow.png new file mode 100644 index 0000000000..272358f202 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/sign-yellow.png differ diff --git a/Coolui v3 test/src/assets/images/icons/small-room.png b/Coolui v3 test/src/assets/images/icons/small-room.png new file mode 100644 index 0000000000..c8bbbccc0b Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/small-room.png differ diff --git a/Coolui v3 test/src/assets/images/icons/tickets.png b/Coolui v3 test/src/assets/images/icons/tickets.png new file mode 100644 index 0000000000..81f48834ba Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/tickets.png differ diff --git a/Coolui v3 test/src/assets/images/icons/user.png b/Coolui v3 test/src/assets/images/icons/user.png new file mode 100644 index 0000000000..c4155a2c23 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/user.png differ diff --git a/Coolui v3 test/src/assets/images/icons/zoom-less.png b/Coolui v3 test/src/assets/images/icons/zoom-less.png new file mode 100644 index 0000000000..36423da8e9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/zoom-less.png differ diff --git a/Coolui v3 test/src/assets/images/icons/zoom-more.png b/Coolui v3 test/src/assets/images/icons/zoom-more.png new file mode 100644 index 0000000000..c14a9e8d48 Binary files /dev/null and b/Coolui v3 test/src/assets/images/icons/zoom-more.png differ diff --git a/Coolui v3 test/src/assets/images/infostand/bot_background.png b/Coolui v3 test/src/assets/images/infostand/bot_background.png new file mode 100644 index 0000000000..cd460bbbf4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/infostand/bot_background.png differ diff --git a/Coolui v3 test/src/assets/images/infostand/countown-timer.png b/Coolui v3 test/src/assets/images/infostand/countown-timer.png new file mode 100644 index 0000000000..ebfe62911d Binary files /dev/null and b/Coolui v3 test/src/assets/images/infostand/countown-timer.png differ diff --git a/Coolui v3 test/src/assets/images/infostand/disk-creator.png b/Coolui v3 test/src/assets/images/infostand/disk-creator.png new file mode 100644 index 0000000000..c4e95c9dd0 Binary files /dev/null and b/Coolui v3 test/src/assets/images/infostand/disk-creator.png differ diff --git a/Coolui v3 test/src/assets/images/infostand/disk-icon.png b/Coolui v3 test/src/assets/images/infostand/disk-icon.png new file mode 100644 index 0000000000..9ee4ed83d0 Binary files /dev/null and b/Coolui v3 test/src/assets/images/infostand/disk-icon.png differ diff --git a/Coolui v3 test/src/assets/images/infostand/icon_edit.gif b/Coolui v3 test/src/assets/images/infostand/icon_edit.gif new file mode 100644 index 0000000000..aabdb0a214 Binary files /dev/null and b/Coolui v3 test/src/assets/images/infostand/icon_edit.gif differ diff --git a/Coolui v3 test/src/assets/images/infostand/pencil-icon.png b/Coolui v3 test/src/assets/images/infostand/pencil-icon.png new file mode 100644 index 0000000000..27de0d6dd2 Binary files /dev/null and b/Coolui v3 test/src/assets/images/infostand/pencil-icon.png differ diff --git a/Coolui v3 test/src/assets/images/infostand/rarity-level.png b/Coolui v3 test/src/assets/images/infostand/rarity-level.png new file mode 100644 index 0000000000..eb1278ef84 Binary files /dev/null and b/Coolui v3 test/src/assets/images/infostand/rarity-level.png differ diff --git a/Coolui v3 test/src/assets/images/inventory/empty.png b/Coolui v3 test/src/assets/images/inventory/empty.png new file mode 100644 index 0000000000..d975b4113c Binary files /dev/null and b/Coolui v3 test/src/assets/images/inventory/empty.png differ diff --git a/Coolui v3 test/src/assets/images/inventory/rarity-level.png b/Coolui v3 test/src/assets/images/inventory/rarity-level.png new file mode 100644 index 0000000000..218eccbd6b Binary files /dev/null and b/Coolui v3 test/src/assets/images/inventory/rarity-level.png differ diff --git a/Coolui v3 test/src/assets/images/inventory/trading/locked-icon.png b/Coolui v3 test/src/assets/images/inventory/trading/locked-icon.png new file mode 100644 index 0000000000..4f54e2d3c3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/inventory/trading/locked-icon.png differ diff --git a/Coolui v3 test/src/assets/images/inventory/trading/unlocked-icon.png b/Coolui v3 test/src/assets/images/inventory/trading/unlocked-icon.png new file mode 100644 index 0000000000..d6362c4524 Binary files /dev/null and b/Coolui v3 test/src/assets/images/inventory/trading/unlocked-icon.png differ diff --git a/Coolui v3 test/src/assets/images/loading/loading.gif b/Coolui v3 test/src/assets/images/loading/loading.gif new file mode 100644 index 0000000000..1303b75584 Binary files /dev/null and b/Coolui v3 test/src/assets/images/loading/loading.gif differ diff --git a/Coolui v3 test/src/assets/images/loading/progress_habbos.gif b/Coolui v3 test/src/assets/images/loading/progress_habbos.gif new file mode 100644 index 0000000000..2224994d32 Binary files /dev/null and b/Coolui v3 test/src/assets/images/loading/progress_habbos.gif differ diff --git a/Coolui v3 test/src/assets/images/modtool/chatlog.gif b/Coolui v3 test/src/assets/images/modtool/chatlog.gif new file mode 100644 index 0000000000..a64ca0b4c0 Binary files /dev/null and b/Coolui v3 test/src/assets/images/modtool/chatlog.gif differ diff --git a/Coolui v3 test/src/assets/images/modtool/key.gif b/Coolui v3 test/src/assets/images/modtool/key.gif new file mode 100644 index 0000000000..578ee6507d Binary files /dev/null and b/Coolui v3 test/src/assets/images/modtool/key.gif differ diff --git a/Coolui v3 test/src/assets/images/modtool/m_icon.png b/Coolui v3 test/src/assets/images/modtool/m_icon.png new file mode 100644 index 0000000000..1116b4ded8 Binary files /dev/null and b/Coolui v3 test/src/assets/images/modtool/m_icon.png differ diff --git a/Coolui v3 test/src/assets/images/modtool/reports.png b/Coolui v3 test/src/assets/images/modtool/reports.png new file mode 100644 index 0000000000..4731fed34a Binary files /dev/null and b/Coolui v3 test/src/assets/images/modtool/reports.png differ diff --git a/Coolui v3 test/src/assets/images/modtool/room.gif b/Coolui v3 test/src/assets/images/modtool/room.gif new file mode 100644 index 0000000000..94e77dd9e8 Binary files /dev/null and b/Coolui v3 test/src/assets/images/modtool/room.gif differ diff --git a/Coolui v3 test/src/assets/images/modtool/room.png b/Coolui v3 test/src/assets/images/modtool/room.png new file mode 100644 index 0000000000..2ce5efa4e5 Binary files /dev/null and b/Coolui v3 test/src/assets/images/modtool/room.png differ diff --git a/Coolui v3 test/src/assets/images/modtool/user.gif b/Coolui v3 test/src/assets/images/modtool/user.gif new file mode 100644 index 0000000000..ab9a590dda Binary files /dev/null and b/Coolui v3 test/src/assets/images/modtool/user.gif differ diff --git a/Coolui v3 test/src/assets/images/modtool/wrench.gif b/Coolui v3 test/src/assets/images/modtool/wrench.gif new file mode 100644 index 0000000000..530c78a8ce Binary files /dev/null and b/Coolui v3 test/src/assets/images/modtool/wrench.gif differ diff --git a/Coolui v3 test/src/assets/images/mysterybox/chain_mysterybox_box_overlay.png b/Coolui v3 test/src/assets/images/mysterybox/chain_mysterybox_box_overlay.png new file mode 100644 index 0000000000..5914aa5a27 Binary files /dev/null and b/Coolui v3 test/src/assets/images/mysterybox/chain_mysterybox_box_overlay.png differ diff --git a/Coolui v3 test/src/assets/images/mysterybox/key_overlay.png b/Coolui v3 test/src/assets/images/mysterybox/key_overlay.png new file mode 100644 index 0000000000..8f8c2a5bed Binary files /dev/null and b/Coolui v3 test/src/assets/images/mysterybox/key_overlay.png differ diff --git a/Coolui v3 test/src/assets/images/mysterybox/mystery_box.png b/Coolui v3 test/src/assets/images/mysterybox/mystery_box.png new file mode 100644 index 0000000000..e85f966ce1 Binary files /dev/null and b/Coolui v3 test/src/assets/images/mysterybox/mystery_box.png differ diff --git a/Coolui v3 test/src/assets/images/mysterybox/mystery_box_key.png b/Coolui v3 test/src/assets/images/mysterybox/mystery_box_key.png new file mode 100644 index 0000000000..79b43deee6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/mysterybox/mystery_box_key.png differ diff --git a/Coolui v3 test/src/assets/images/mysterytrophy/frank_mystery_trophy.png b/Coolui v3 test/src/assets/images/mysterytrophy/frank_mystery_trophy.png new file mode 100644 index 0000000000..67bfeba771 Binary files /dev/null and b/Coolui v3 test/src/assets/images/mysterytrophy/frank_mystery_trophy.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/icons/info.png b/Coolui v3 test/src/assets/images/navigator/icons/info.png new file mode 100644 index 0000000000..b32d14d9e8 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/icons/info.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/icons/room_group.png b/Coolui v3 test/src/assets/images/navigator/icons/room_group.png new file mode 100644 index 0000000000..b059ba4444 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/icons/room_group.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/icons/room_invisible.png b/Coolui v3 test/src/assets/images/navigator/icons/room_invisible.png new file mode 100644 index 0000000000..976fe8b41e Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/icons/room_invisible.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/icons/room_locked.png b/Coolui v3 test/src/assets/images/navigator/icons/room_locked.png new file mode 100644 index 0000000000..f46843c890 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/icons/room_locked.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/icons/room_password.png b/Coolui v3 test/src/assets/images/navigator/icons/room_password.png new file mode 100644 index 0000000000..9fa392f8e0 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/icons/room_password.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_0.png b/Coolui v3 test/src/assets/images/navigator/models/model_0.png new file mode 100644 index 0000000000..8b7b1d3e3d Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_0.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_1.png b/Coolui v3 test/src/assets/images/navigator/models/model_1.png new file mode 100644 index 0000000000..36f325ad32 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_1.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_2.png b/Coolui v3 test/src/assets/images/navigator/models/model_2.png new file mode 100644 index 0000000000..921d6f1da2 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_2.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_3.png b/Coolui v3 test/src/assets/images/navigator/models/model_3.png new file mode 100644 index 0000000000..0444324a76 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_3.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_4.png b/Coolui v3 test/src/assets/images/navigator/models/model_4.png new file mode 100644 index 0000000000..e3714753ad Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_4.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_5.png b/Coolui v3 test/src/assets/images/navigator/models/model_5.png new file mode 100644 index 0000000000..4036e1d317 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_5.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_6.png b/Coolui v3 test/src/assets/images/navigator/models/model_6.png new file mode 100644 index 0000000000..dd14b3b242 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_6.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_7.png b/Coolui v3 test/src/assets/images/navigator/models/model_7.png new file mode 100644 index 0000000000..031751ed4b Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_7.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_8.png b/Coolui v3 test/src/assets/images/navigator/models/model_8.png new file mode 100644 index 0000000000..7e38e1ffdb Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_8.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_9.png b/Coolui v3 test/src/assets/images/navigator/models/model_9.png new file mode 100644 index 0000000000..0f36c7ca95 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_9.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_a.png b/Coolui v3 test/src/assets/images/navigator/models/model_a.png new file mode 100644 index 0000000000..cc4a072b97 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_a.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_b.png b/Coolui v3 test/src/assets/images/navigator/models/model_b.png new file mode 100644 index 0000000000..49b780ae21 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_b.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_c.png b/Coolui v3 test/src/assets/images/navigator/models/model_c.png new file mode 100644 index 0000000000..2ce5efa4e5 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_c.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_d.png b/Coolui v3 test/src/assets/images/navigator/models/model_d.png new file mode 100644 index 0000000000..de061c8209 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_d.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_e.png b/Coolui v3 test/src/assets/images/navigator/models/model_e.png new file mode 100644 index 0000000000..039b927604 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_e.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_f.png b/Coolui v3 test/src/assets/images/navigator/models/model_f.png new file mode 100644 index 0000000000..4b4fadb805 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_f.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_g.png b/Coolui v3 test/src/assets/images/navigator/models/model_g.png new file mode 100644 index 0000000000..26d03724ca Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_g.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_h.png b/Coolui v3 test/src/assets/images/navigator/models/model_h.png new file mode 100644 index 0000000000..d8c4be7fb3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_h.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_i.png b/Coolui v3 test/src/assets/images/navigator/models/model_i.png new file mode 100644 index 0000000000..f5e3d55ccd Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_i.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_j.png b/Coolui v3 test/src/assets/images/navigator/models/model_j.png new file mode 100644 index 0000000000..8be8f6732e Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_j.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_k.png b/Coolui v3 test/src/assets/images/navigator/models/model_k.png new file mode 100644 index 0000000000..96fcc8b156 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_k.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_l.png b/Coolui v3 test/src/assets/images/navigator/models/model_l.png new file mode 100644 index 0000000000..f479323b7e Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_l.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_m.png b/Coolui v3 test/src/assets/images/navigator/models/model_m.png new file mode 100644 index 0000000000..d1d8dd76e6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_m.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_n.png b/Coolui v3 test/src/assets/images/navigator/models/model_n.png new file mode 100644 index 0000000000..6e023a1bb1 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_n.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_o.png b/Coolui v3 test/src/assets/images/navigator/models/model_o.png new file mode 100644 index 0000000000..458706466d Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_o.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_p.png b/Coolui v3 test/src/assets/images/navigator/models/model_p.png new file mode 100644 index 0000000000..356601e090 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_p.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_q.png b/Coolui v3 test/src/assets/images/navigator/models/model_q.png new file mode 100644 index 0000000000..9208a14930 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_q.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_r.png b/Coolui v3 test/src/assets/images/navigator/models/model_r.png new file mode 100644 index 0000000000..a93d80d3e6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_r.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_snowwar1.png b/Coolui v3 test/src/assets/images/navigator/models/model_snowwar1.png new file mode 100644 index 0000000000..41bab59ce4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_snowwar1.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_snowwar2.png b/Coolui v3 test/src/assets/images/navigator/models/model_snowwar2.png new file mode 100644 index 0000000000..41bab59ce4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_snowwar2.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_t.png b/Coolui v3 test/src/assets/images/navigator/models/model_t.png new file mode 100644 index 0000000000..920255d74e Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_t.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_u.png b/Coolui v3 test/src/assets/images/navigator/models/model_u.png new file mode 100644 index 0000000000..96da1012a9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_u.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_v.png b/Coolui v3 test/src/assets/images/navigator/models/model_v.png new file mode 100644 index 0000000000..6d85c22c73 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_v.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_w.png b/Coolui v3 test/src/assets/images/navigator/models/model_w.png new file mode 100644 index 0000000000..7bc8024fdb Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_w.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_x.png b/Coolui v3 test/src/assets/images/navigator/models/model_x.png new file mode 100644 index 0000000000..ce0403737f Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_x.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_y.png b/Coolui v3 test/src/assets/images/navigator/models/model_y.png new file mode 100644 index 0000000000..430344cb2c Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_y.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/models/model_z.png b/Coolui v3 test/src/assets/images/navigator/models/model_z.png new file mode 100644 index 0000000000..0809c916b9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/models/model_z.png differ diff --git a/Coolui v3 test/src/assets/images/navigator/thumbnail_placeholder.png b/Coolui v3 test/src/assets/images/navigator/thumbnail_placeholder.png new file mode 100644 index 0000000000..be26f84767 Binary files /dev/null and b/Coolui v3 test/src/assets/images/navigator/thumbnail_placeholder.png differ diff --git a/Coolui v3 test/src/assets/images/nitro/nitro-dark.svg b/Coolui v3 test/src/assets/images/nitro/nitro-dark.svg new file mode 100644 index 0000000000..20cc53358d --- /dev/null +++ b/Coolui v3 test/src/assets/images/nitro/nitro-dark.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + diff --git a/Coolui v3 test/src/assets/images/nitro/nitro-light.svg b/Coolui v3 test/src/assets/images/nitro/nitro-light.svg new file mode 100644 index 0000000000..5706684a37 --- /dev/null +++ b/Coolui v3 test/src/assets/images/nitro/nitro-light.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + diff --git a/Coolui v3 test/src/assets/images/nitro/nitro-n-dark.svg b/Coolui v3 test/src/assets/images/nitro/nitro-n-dark.svg new file mode 100644 index 0000000000..f8d0ebd654 --- /dev/null +++ b/Coolui v3 test/src/assets/images/nitro/nitro-n-dark.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + diff --git a/Coolui v3 test/src/assets/images/nitro/nitro-n-light.svg b/Coolui v3 test/src/assets/images/nitro/nitro-n-light.svg new file mode 100644 index 0000000000..4dd94fca32 --- /dev/null +++ b/Coolui v3 test/src/assets/images/nitro/nitro-n-light.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + diff --git a/Coolui v3 test/src/assets/images/notifications/coolui.png b/Coolui v3 test/src/assets/images/notifications/coolui.png new file mode 100644 index 0000000000..b78ce8bd89 Binary files /dev/null and b/Coolui v3 test/src/assets/images/notifications/coolui.png differ diff --git a/Coolui v3 test/src/assets/images/notifications/frank.gif b/Coolui v3 test/src/assets/images/notifications/frank.gif new file mode 100644 index 0000000000..211634f745 Binary files /dev/null and b/Coolui v3 test/src/assets/images/notifications/frank.gif differ diff --git a/Coolui v3 test/src/assets/images/pets/pet-package/gnome.png b/Coolui v3 test/src/assets/images/pets/pet-package/gnome.png new file mode 100644 index 0000000000..2c38828022 Binary files /dev/null and b/Coolui v3 test/src/assets/images/pets/pet-package/gnome.png differ diff --git a/Coolui v3 test/src/assets/images/pets/pet-package/leprechaun_box.png b/Coolui v3 test/src/assets/images/pets/pet-package/leprechaun_box.png new file mode 100644 index 0000000000..1603eb86f3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/pets/pet-package/leprechaun_box.png differ diff --git a/Coolui v3 test/src/assets/images/pets/pet-package/petbox_epic.png b/Coolui v3 test/src/assets/images/pets/pet-package/petbox_epic.png new file mode 100644 index 0000000000..e09ad774fa Binary files /dev/null and b/Coolui v3 test/src/assets/images/pets/pet-package/petbox_epic.png differ diff --git a/Coolui v3 test/src/assets/images/pets/pet-package/pterosaur_egg.png b/Coolui v3 test/src/assets/images/pets/pet-package/pterosaur_egg.png new file mode 100644 index 0000000000..43ee1418ab Binary files /dev/null and b/Coolui v3 test/src/assets/images/pets/pet-package/pterosaur_egg.png differ diff --git a/Coolui v3 test/src/assets/images/pets/pet-package/val11_present.png b/Coolui v3 test/src/assets/images/pets/pet-package/val11_present.png new file mode 100644 index 0000000000..3d371b5b37 Binary files /dev/null and b/Coolui v3 test/src/assets/images/pets/pet-package/val11_present.png differ diff --git a/Coolui v3 test/src/assets/images/pets/pet-package/velociraptor_egg.png b/Coolui v3 test/src/assets/images/pets/pet-package/velociraptor_egg.png new file mode 100644 index 0000000000..242f0dfae4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/pets/pet-package/velociraptor_egg.png differ diff --git a/Coolui v3 test/src/assets/images/prize/prize_background.png b/Coolui v3 test/src/assets/images/prize/prize_background.png new file mode 100644 index 0000000000..ec9c030653 Binary files /dev/null and b/Coolui v3 test/src/assets/images/prize/prize_background.png differ diff --git a/Coolui v3 test/src/assets/images/profile/icons/offline.png b/Coolui v3 test/src/assets/images/profile/icons/offline.png new file mode 100644 index 0000000000..677aadcf2e Binary files /dev/null and b/Coolui v3 test/src/assets/images/profile/icons/offline.png differ diff --git a/Coolui v3 test/src/assets/images/profile/icons/online.gif b/Coolui v3 test/src/assets/images/profile/icons/online.gif new file mode 100644 index 0000000000..3a79838bd3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/profile/icons/online.gif differ diff --git a/Coolui v3 test/src/assets/images/profile/icons/tick.png b/Coolui v3 test/src/assets/images/profile/icons/tick.png new file mode 100644 index 0000000000..ec8c52fdf7 Binary files /dev/null and b/Coolui v3 test/src/assets/images/profile/icons/tick.png differ diff --git a/Coolui v3 test/src/assets/images/room-spectator/room_spectator_bottom_left.png b/Coolui v3 test/src/assets/images/room-spectator/room_spectator_bottom_left.png new file mode 100644 index 0000000000..01688cb295 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-spectator/room_spectator_bottom_left.png differ diff --git a/Coolui v3 test/src/assets/images/room-spectator/room_spectator_bottom_right.png b/Coolui v3 test/src/assets/images/room-spectator/room_spectator_bottom_right.png new file mode 100644 index 0000000000..59c8ef2c2d Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-spectator/room_spectator_bottom_right.png differ diff --git a/Coolui v3 test/src/assets/images/room-spectator/room_spectator_middle_bottom.png b/Coolui v3 test/src/assets/images/room-spectator/room_spectator_middle_bottom.png new file mode 100644 index 0000000000..ba6fdeccce Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-spectator/room_spectator_middle_bottom.png differ diff --git a/Coolui v3 test/src/assets/images/room-spectator/room_spectator_middle_left.png b/Coolui v3 test/src/assets/images/room-spectator/room_spectator_middle_left.png new file mode 100644 index 0000000000..6d9aaa7958 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-spectator/room_spectator_middle_left.png differ diff --git a/Coolui v3 test/src/assets/images/room-spectator/room_spectator_middle_right.png b/Coolui v3 test/src/assets/images/room-spectator/room_spectator_middle_right.png new file mode 100644 index 0000000000..9d963b3d11 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-spectator/room_spectator_middle_right.png differ diff --git a/Coolui v3 test/src/assets/images/room-spectator/room_spectator_middle_top.png b/Coolui v3 test/src/assets/images/room-spectator/room_spectator_middle_top.png new file mode 100644 index 0000000000..f6559cee0e Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-spectator/room_spectator_middle_top.png differ diff --git a/Coolui v3 test/src/assets/images/room-spectator/room_spectator_top_left.png b/Coolui v3 test/src/assets/images/room-spectator/room_spectator_top_left.png new file mode 100644 index 0000000000..5e62a3c954 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-spectator/room_spectator_top_left.png differ diff --git a/Coolui v3 test/src/assets/images/room-spectator/room_spectator_top_right.png b/Coolui v3 test/src/assets/images/room-spectator/room_spectator_top_right.png new file mode 100644 index 0000000000..825f3fb10b Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-spectator/room_spectator_top_right.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/avatar-info/preview-background.png b/Coolui v3 test/src/assets/images/room-widgets/avatar-info/preview-background.png new file mode 100644 index 0000000000..dea4f08dd4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/avatar-info/preview-background.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/camera-widget/btn.png b/Coolui v3 test/src/assets/images/room-widgets/camera-widget/btn.png new file mode 100644 index 0000000000..76b086b18d Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/camera-widget/btn.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/camera-widget/btn_down.png b/Coolui v3 test/src/assets/images/room-widgets/camera-widget/btn_down.png new file mode 100644 index 0000000000..76f25da1d9 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/camera-widget/btn_down.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/camera-widget/btn_hi.png b/Coolui v3 test/src/assets/images/room-widgets/camera-widget/btn_hi.png new file mode 100644 index 0000000000..5f04fc007a Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/camera-widget/btn_hi.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/camera-widget/cam_bg.png b/Coolui v3 test/src/assets/images/room-widgets/camera-widget/cam_bg.png new file mode 100644 index 0000000000..d6cf994d06 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/camera-widget/cam_bg.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/camera-widget/camera-spritesheet.png b/Coolui v3 test/src/assets/images/room-widgets/camera-widget/camera-spritesheet.png new file mode 100644 index 0000000000..4ea82e31a7 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/camera-widget/camera-spritesheet.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/camera-widget/viewfinder.png b/Coolui v3 test/src/assets/images/room-widgets/camera-widget/viewfinder.png new file mode 100644 index 0000000000..ab6a9b24f6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/camera-widget/viewfinder.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/dimmer-widget/dimmer_banner.png b/Coolui v3 test/src/assets/images/room-widgets/dimmer-widget/dimmer_banner.png new file mode 100644 index 0000000000..fdc6e9faba Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/dimmer-widget/dimmer_banner.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/engraving-lock-widget/engraving-lock-spritesheet.png b/Coolui v3 test/src/assets/images/room-widgets/engraving-lock-widget/engraving-lock-spritesheet.png new file mode 100644 index 0000000000..472dc85b29 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/engraving-lock-widget/engraving-lock-spritesheet.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/exchange-credit/exchange-credit-image.png b/Coolui v3 test/src/assets/images/room-widgets/exchange-credit/exchange-credit-image.png new file mode 100644 index 0000000000..eef5da6cb5 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/exchange-credit/exchange-credit-image.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/furni-context-menu/monsterplant-preview.png b/Coolui v3 test/src/assets/images/room-widgets/furni-context-menu/monsterplant-preview.png new file mode 100644 index 0000000000..8d3d771ef4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/furni-context-menu/monsterplant-preview.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/mannequin-widget/mannequin-spritesheet.png b/Coolui v3 test/src/assets/images/room-widgets/mannequin-widget/mannequin-spritesheet.png new file mode 100644 index 0000000000..45e11f346d Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/mannequin-widget/mannequin-spritesheet.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/playlist-editor/disk_2.png b/Coolui v3 test/src/assets/images/room-widgets/playlist-editor/disk_2.png new file mode 100644 index 0000000000..3033020977 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/playlist-editor/disk_2.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/playlist-editor/disk_image.png b/Coolui v3 test/src/assets/images/room-widgets/playlist-editor/disk_image.png new file mode 100644 index 0000000000..7a8ab453dd Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/playlist-editor/disk_image.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/playlist-editor/move.png b/Coolui v3 test/src/assets/images/room-widgets/playlist-editor/move.png new file mode 100644 index 0000000000..9d1635d83e Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/playlist-editor/move.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/playlist-editor/pause-btn.png b/Coolui v3 test/src/assets/images/room-widgets/playlist-editor/pause-btn.png new file mode 100644 index 0000000000..900f99b4d7 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/playlist-editor/pause-btn.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/playlist-editor/pause.png b/Coolui v3 test/src/assets/images/room-widgets/playlist-editor/pause.png new file mode 100644 index 0000000000..ec5fef47dc Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/playlist-editor/pause.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/playlist-editor/playing.png b/Coolui v3 test/src/assets/images/room-widgets/playlist-editor/playing.png new file mode 100644 index 0000000000..0e3449d161 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/playlist-editor/playing.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/playlist-editor/preview.png b/Coolui v3 test/src/assets/images/room-widgets/playlist-editor/preview.png new file mode 100644 index 0000000000..160f0befb6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/playlist-editor/preview.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-blue.png b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-blue.png new file mode 100644 index 0000000000..9a14182e51 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-blue.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-christmas.png b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-christmas.png new file mode 100644 index 0000000000..82b4732fa8 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-christmas.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-close.png b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-close.png new file mode 100644 index 0000000000..9621c56f2c Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-close.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-dreams.png b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-dreams.png new file mode 100644 index 0000000000..1723bdcb06 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-dreams.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-green.png b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-green.png new file mode 100644 index 0000000000..5e73c74733 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-green.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-heart.png b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-heart.png new file mode 100644 index 0000000000..455238513a Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-heart.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-juninas.png b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-juninas.png new file mode 100644 index 0000000000..faaea9d1e6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-juninas.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-pink.png b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-pink.png new file mode 100644 index 0000000000..7565899834 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-pink.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-shakesp.png b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-shakesp.png new file mode 100644 index 0000000000..d5011c74b2 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-shakesp.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-spritesheet.png b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-spritesheet.png new file mode 100644 index 0000000000..02495714fc Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-spritesheet.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-trash.png b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-trash.png new file mode 100644 index 0000000000..96dff8f02b Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-trash.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-yellow.png b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-yellow.png new file mode 100644 index 0000000000..759d3f9902 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/stickie-widget/stickie-yellow.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/thumbnail-widget/thumbnail-camera-spritesheet.png b/Coolui v3 test/src/assets/images/room-widgets/thumbnail-widget/thumbnail-camera-spritesheet.png new file mode 100644 index 0000000000..63a9397f20 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/thumbnail-widget/thumbnail-camera-spritesheet.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/trophy-widget/trophy-spritesheet.png b/Coolui v3 test/src/assets/images/room-widgets/trophy-widget/trophy-spritesheet.png new file mode 100644 index 0000000000..f9184cb578 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/trophy-widget/trophy-spritesheet.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/wordquiz-widget/thumbs-down-small.png b/Coolui v3 test/src/assets/images/room-widgets/wordquiz-widget/thumbs-down-small.png new file mode 100644 index 0000000000..78e51cfe56 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/wordquiz-widget/thumbs-down-small.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/wordquiz-widget/thumbs-down.png b/Coolui v3 test/src/assets/images/room-widgets/wordquiz-widget/thumbs-down.png new file mode 100644 index 0000000000..fd320c51d7 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/wordquiz-widget/thumbs-down.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/wordquiz-widget/thumbs-up-small.png b/Coolui v3 test/src/assets/images/room-widgets/wordquiz-widget/thumbs-up-small.png new file mode 100644 index 0000000000..b93111f0cc Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/wordquiz-widget/thumbs-up-small.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/wordquiz-widget/thumbs-up.png b/Coolui v3 test/src/assets/images/room-widgets/wordquiz-widget/thumbs-up.png new file mode 100644 index 0000000000..dd650987dd Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/wordquiz-widget/thumbs-up.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/youtube-widget/next.png b/Coolui v3 test/src/assets/images/room-widgets/youtube-widget/next.png new file mode 100644 index 0000000000..a02e164ba6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/youtube-widget/next.png differ diff --git a/Coolui v3 test/src/assets/images/room-widgets/youtube-widget/prev.png b/Coolui v3 test/src/assets/images/room-widgets/youtube-widget/prev.png new file mode 100644 index 0000000000..d48b658eba Binary files /dev/null and b/Coolui v3 test/src/assets/images/room-widgets/youtube-widget/prev.png differ diff --git a/Coolui v3 test/src/assets/images/stackhelper/slider-background.png b/Coolui v3 test/src/assets/images/stackhelper/slider-background.png new file mode 100644 index 0000000000..20ab191e45 Binary files /dev/null and b/Coolui v3 test/src/assets/images/stackhelper/slider-background.png differ diff --git a/Coolui v3 test/src/assets/images/stackhelper/slider-pointer.png b/Coolui v3 test/src/assets/images/stackhelper/slider-pointer.png new file mode 100644 index 0000000000..8787456f5e Binary files /dev/null and b/Coolui v3 test/src/assets/images/stackhelper/slider-pointer.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/arrow.png b/Coolui v3 test/src/assets/images/toolbar/arrow.png new file mode 100644 index 0000000000..bf04ea0ecf Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/arrow.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/friend-search.png b/Coolui v3 test/src/assets/images/toolbar/friend-search.png new file mode 100644 index 0000000000..7156c4fd2e Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/friend-search.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/buildersclub.png b/Coolui v3 test/src/assets/images/toolbar/icons/buildersclub.png new file mode 100644 index 0000000000..bbf6d68126 Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/buildersclub.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/camera.png b/Coolui v3 test/src/assets/images/toolbar/icons/camera.png new file mode 100644 index 0000000000..da5d835f24 Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/camera.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/catalog.png b/Coolui v3 test/src/assets/images/toolbar/icons/catalog.png new file mode 100644 index 0000000000..f680921711 Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/catalog.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/friend_all.png b/Coolui v3 test/src/assets/images/toolbar/icons/friend_all.png new file mode 100644 index 0000000000..b2ca0d7d52 Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/friend_all.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/friend_head.png b/Coolui v3 test/src/assets/images/toolbar/icons/friend_head.png new file mode 100644 index 0000000000..6380c90c1f Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/friend_head.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/friend_search.png b/Coolui v3 test/src/assets/images/toolbar/icons/friend_search.png new file mode 100644 index 0000000000..ebe1c65ed7 Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/friend_search.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/game.png b/Coolui v3 test/src/assets/images/toolbar/icons/game.png new file mode 100644 index 0000000000..59ef8aafb5 Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/game.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/habbo.png b/Coolui v3 test/src/assets/images/toolbar/icons/habbo.png new file mode 100644 index 0000000000..78cd0a486e Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/habbo.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/house.png b/Coolui v3 test/src/assets/images/toolbar/icons/house.png new file mode 100644 index 0000000000..f2c8746ab2 Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/house.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/inventory.png b/Coolui v3 test/src/assets/images/toolbar/icons/inventory.png new file mode 100644 index 0000000000..d848586ae3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/inventory.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/joinroom.png b/Coolui v3 test/src/assets/images/toolbar/icons/joinroom.png new file mode 100644 index 0000000000..894ee78ff7 Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/joinroom.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/achievements.png b/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/achievements.png new file mode 100644 index 0000000000..575464d617 Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/achievements.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/clothing.png b/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/clothing.png new file mode 100644 index 0000000000..bfacabd844 Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/clothing.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/cog.png b/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/cog.png new file mode 100644 index 0000000000..6180409a10 Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/cog.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/forums.png b/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/forums.png new file mode 100644 index 0000000000..e22426e6d6 Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/forums.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/helper-tool.png b/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/helper-tool.png new file mode 100644 index 0000000000..e324611fca Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/helper-tool.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/my-rooms.png b/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/my-rooms.png new file mode 100644 index 0000000000..8d4dcad00a Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/my-rooms.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/profile.png b/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/profile.png new file mode 100644 index 0000000000..04964bfe64 Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/profile.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/rooms.png b/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/rooms.png new file mode 100644 index 0000000000..00261ceed4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/rooms.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/talents.png b/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/talents.png new file mode 100644 index 0000000000..2f91dfe03b Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/me-menu/talents.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/message.png b/Coolui v3 test/src/assets/images/toolbar/icons/message.png new file mode 100644 index 0000000000..c12d5bb4a4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/message.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/message_unsee.gif b/Coolui v3 test/src/assets/images/toolbar/icons/message_unsee.gif new file mode 100644 index 0000000000..eddfe1cc2b Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/message_unsee.gif differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/modtools.png b/Coolui v3 test/src/assets/images/toolbar/icons/modtools.png new file mode 100644 index 0000000000..24c362f0e3 Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/modtools.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/rooms.png b/Coolui v3 test/src/assets/images/toolbar/icons/rooms.png new file mode 100644 index 0000000000..00261ceed4 Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/rooms.png differ diff --git a/Coolui v3 test/src/assets/images/toolbar/icons/sendmessage.png b/Coolui v3 test/src/assets/images/toolbar/icons/sendmessage.png new file mode 100644 index 0000000000..9f64b17c34 Binary files /dev/null and b/Coolui v3 test/src/assets/images/toolbar/icons/sendmessage.png differ diff --git a/Coolui v3 test/src/assets/images/ui/loading_icon.png b/Coolui v3 test/src/assets/images/ui/loading_icon.png new file mode 100644 index 0000000000..15f66be400 Binary files /dev/null and b/Coolui v3 test/src/assets/images/ui/loading_icon.png differ diff --git a/Coolui v3 test/src/assets/images/ui/ubuntu-close-buttons.png b/Coolui v3 test/src/assets/images/ui/ubuntu-close-buttons.png new file mode 100644 index 0000000000..d6a79a6732 Binary files /dev/null and b/Coolui v3 test/src/assets/images/ui/ubuntu-close-buttons.png differ diff --git a/Coolui v3 test/src/assets/images/unique/catalog-info-amount-bg.png b/Coolui v3 test/src/assets/images/unique/catalog-info-amount-bg.png new file mode 100644 index 0000000000..4a56c9b265 Binary files /dev/null and b/Coolui v3 test/src/assets/images/unique/catalog-info-amount-bg.png differ diff --git a/Coolui v3 test/src/assets/images/unique/catalog-info-sold-out.png b/Coolui v3 test/src/assets/images/unique/catalog-info-sold-out.png new file mode 100644 index 0000000000..79626e146b Binary files /dev/null and b/Coolui v3 test/src/assets/images/unique/catalog-info-sold-out.png differ diff --git a/Coolui v3 test/src/assets/images/unique/grid-bg-glass.png b/Coolui v3 test/src/assets/images/unique/grid-bg-glass.png new file mode 100644 index 0000000000..5b64c480bf Binary files /dev/null and b/Coolui v3 test/src/assets/images/unique/grid-bg-glass.png differ diff --git a/Coolui v3 test/src/assets/images/unique/grid-bg-sold-out.png b/Coolui v3 test/src/assets/images/unique/grid-bg-sold-out.png new file mode 100644 index 0000000000..94f66620ab Binary files /dev/null and b/Coolui v3 test/src/assets/images/unique/grid-bg-sold-out.png differ diff --git a/Coolui v3 test/src/assets/images/unique/grid-bg.png b/Coolui v3 test/src/assets/images/unique/grid-bg.png new file mode 100644 index 0000000000..d7737ba83e Binary files /dev/null and b/Coolui v3 test/src/assets/images/unique/grid-bg.png differ diff --git a/Coolui v3 test/src/assets/images/unique/grid-count-bg.png b/Coolui v3 test/src/assets/images/unique/grid-count-bg.png new file mode 100644 index 0000000000..68e13bddbb Binary files /dev/null and b/Coolui v3 test/src/assets/images/unique/grid-count-bg.png differ diff --git a/Coolui v3 test/src/assets/images/unique/inventory-info-amount-bg.png b/Coolui v3 test/src/assets/images/unique/inventory-info-amount-bg.png new file mode 100644 index 0000000000..af4e31e2e5 Binary files /dev/null and b/Coolui v3 test/src/assets/images/unique/inventory-info-amount-bg.png differ diff --git a/Coolui v3 test/src/assets/images/unique/numbers.png b/Coolui v3 test/src/assets/images/unique/numbers.png new file mode 100644 index 0000000000..e1ece79f46 Binary files /dev/null and b/Coolui v3 test/src/assets/images/unique/numbers.png differ diff --git a/Coolui v3 test/src/assets/images/wired/card-action-corners.png b/Coolui v3 test/src/assets/images/wired/card-action-corners.png new file mode 100644 index 0000000000..faec2349dc Binary files /dev/null and b/Coolui v3 test/src/assets/images/wired/card-action-corners.png differ diff --git a/Coolui v3 test/src/assets/images/wired/icon_action.png b/Coolui v3 test/src/assets/images/wired/icon_action.png new file mode 100644 index 0000000000..78e90e6302 Binary files /dev/null and b/Coolui v3 test/src/assets/images/wired/icon_action.png differ diff --git a/Coolui v3 test/src/assets/images/wired/icon_condition.png b/Coolui v3 test/src/assets/images/wired/icon_condition.png new file mode 100644 index 0000000000..26925a63f5 Binary files /dev/null and b/Coolui v3 test/src/assets/images/wired/icon_condition.png differ diff --git a/Coolui v3 test/src/assets/images/wired/icon_trigger.png b/Coolui v3 test/src/assets/images/wired/icon_trigger.png new file mode 100644 index 0000000000..f48d13c875 Binary files /dev/null and b/Coolui v3 test/src/assets/images/wired/icon_trigger.png differ diff --git a/Coolui v3 test/src/assets/images/wired/icon_wired_around.png b/Coolui v3 test/src/assets/images/wired/icon_wired_around.png new file mode 100644 index 0000000000..0b4b5a1254 Binary files /dev/null and b/Coolui v3 test/src/assets/images/wired/icon_wired_around.png differ diff --git a/Coolui v3 test/src/assets/images/wired/icon_wired_left_right.png b/Coolui v3 test/src/assets/images/wired/icon_wired_left_right.png new file mode 100644 index 0000000000..862d6d8138 Binary files /dev/null and b/Coolui v3 test/src/assets/images/wired/icon_wired_left_right.png differ diff --git a/Coolui v3 test/src/assets/images/wired/icon_wired_north_east.png b/Coolui v3 test/src/assets/images/wired/icon_wired_north_east.png new file mode 100644 index 0000000000..3710854fda Binary files /dev/null and b/Coolui v3 test/src/assets/images/wired/icon_wired_north_east.png differ diff --git a/Coolui v3 test/src/assets/images/wired/icon_wired_north_west.png b/Coolui v3 test/src/assets/images/wired/icon_wired_north_west.png new file mode 100644 index 0000000000..09eeefc18a Binary files /dev/null and b/Coolui v3 test/src/assets/images/wired/icon_wired_north_west.png differ diff --git a/Coolui v3 test/src/assets/images/wired/icon_wired_rotate_clockwise.png b/Coolui v3 test/src/assets/images/wired/icon_wired_rotate_clockwise.png new file mode 100644 index 0000000000..2827e3d23d Binary files /dev/null and b/Coolui v3 test/src/assets/images/wired/icon_wired_rotate_clockwise.png differ diff --git a/Coolui v3 test/src/assets/images/wired/icon_wired_rotate_counter_clockwise.png b/Coolui v3 test/src/assets/images/wired/icon_wired_rotate_counter_clockwise.png new file mode 100644 index 0000000000..7e281bacbc Binary files /dev/null and b/Coolui v3 test/src/assets/images/wired/icon_wired_rotate_counter_clockwise.png differ diff --git a/Coolui v3 test/src/assets/images/wired/icon_wired_south_east.png b/Coolui v3 test/src/assets/images/wired/icon_wired_south_east.png new file mode 100644 index 0000000000..4217c4b830 Binary files /dev/null and b/Coolui v3 test/src/assets/images/wired/icon_wired_south_east.png differ diff --git a/Coolui v3 test/src/assets/images/wired/icon_wired_south_west.png b/Coolui v3 test/src/assets/images/wired/icon_wired_south_west.png new file mode 100644 index 0000000000..07ab1f95ee Binary files /dev/null and b/Coolui v3 test/src/assets/images/wired/icon_wired_south_west.png differ diff --git a/Coolui v3 test/src/assets/images/wired/icon_wired_up_down.png b/Coolui v3 test/src/assets/images/wired/icon_wired_up_down.png new file mode 100644 index 0000000000..c2d243bae5 Binary files /dev/null and b/Coolui v3 test/src/assets/images/wired/icon_wired_up_down.png differ diff --git a/Coolui v3 test/src/assets/webfonts/Ubuntu-C.ttf b/Coolui v3 test/src/assets/webfonts/Ubuntu-C.ttf new file mode 100644 index 0000000000..8e2c4bc27a Binary files /dev/null and b/Coolui v3 test/src/assets/webfonts/Ubuntu-C.ttf differ diff --git a/Coolui v3 test/src/assets/webfonts/Ubuntu-b.ttf b/Coolui v3 test/src/assets/webfonts/Ubuntu-b.ttf new file mode 100644 index 0000000000..9073aa25ff Binary files /dev/null and b/Coolui v3 test/src/assets/webfonts/Ubuntu-b.ttf differ diff --git a/Coolui v3 test/src/assets/webfonts/Ubuntu-i.ttf b/Coolui v3 test/src/assets/webfonts/Ubuntu-i.ttf new file mode 100644 index 0000000000..1be5141e04 Binary files /dev/null and b/Coolui v3 test/src/assets/webfonts/Ubuntu-i.ttf differ diff --git a/Coolui v3 test/src/assets/webfonts/Ubuntu-ib.ttf b/Coolui v3 test/src/assets/webfonts/Ubuntu-ib.ttf new file mode 100644 index 0000000000..13ecca8123 Binary files /dev/null and b/Coolui v3 test/src/assets/webfonts/Ubuntu-ib.ttf differ diff --git a/Coolui v3 test/src/assets/webfonts/Ubuntu-m.ttf b/Coolui v3 test/src/assets/webfonts/Ubuntu-m.ttf new file mode 100644 index 0000000000..8de0928562 Binary files /dev/null and b/Coolui v3 test/src/assets/webfonts/Ubuntu-m.ttf differ diff --git a/Coolui v3 test/src/assets/webfonts/Ubuntu.ttf b/Coolui v3 test/src/assets/webfonts/Ubuntu.ttf new file mode 100644 index 0000000000..975da10fcd Binary files /dev/null and b/Coolui v3 test/src/assets/webfonts/Ubuntu.ttf differ diff --git a/Coolui v3 test/src/common/AutoGrid.tsx b/Coolui v3 test/src/common/AutoGrid.tsx new file mode 100644 index 0000000000..167ee92b32 --- /dev/null +++ b/Coolui v3 test/src/common/AutoGrid.tsx @@ -0,0 +1,28 @@ +import { CSSProperties, FC, useMemo } from 'react'; +import { Grid, GridProps } from './Grid'; + +export interface AutoGridProps extends GridProps +{ + columnMinWidth?: number; + columnMinHeight?: number; +} + +export const AutoGrid: FC = props => +{ + const { columnMinWidth = 40, columnMinHeight = 40, columnCount = 0, fullHeight = false, maxContent = true, overflow = 'auto', style = {}, ...rest } = props; + + const getStyle = useMemo(() => + { + let newStyle: CSSProperties = {}; + + newStyle['--nitro-grid-column-min-height'] = (columnMinHeight + 'px'); + + if(columnCount > 1) newStyle.gridTemplateColumns = `repeat(auto-fill, minmax(${ columnMinWidth }px, 1fr))`; + + if(Object.keys(style).length) newStyle = { ...newStyle, ...style }; + + return newStyle; + }, [ columnMinWidth, columnMinHeight, columnCount, style ]); + + return ; +}; diff --git a/Coolui v3 test/src/common/Base.tsx b/Coolui v3 test/src/common/Base.tsx new file mode 100644 index 0000000000..a2747c65e8 --- /dev/null +++ b/Coolui v3 test/src/common/Base.tsx @@ -0,0 +1,84 @@ +import { CSSProperties, DetailedHTMLProps, FC, HTMLAttributes, MutableRefObject, ReactNode, useMemo } from 'react'; +import { ColorVariantType, DisplayType, FloatType, OverflowType, PositionType } from './types'; + +export interface BaseProps extends DetailedHTMLProps, T> +{ + innerRef?: MutableRefObject; + display?: DisplayType; + fit?: boolean; + fitV?: boolean; + grow?: boolean; + shrink?: boolean; + fullWidth?: boolean; + fullHeight?: boolean; + overflow?: OverflowType; + position?: PositionType; + float?: FloatType; + pointer?: boolean; + visible?: boolean; + textColor?: ColorVariantType; + classNames?: string[]; + children?: ReactNode; +} + +export const Base: FC> = props => +{ + const { ref = null, innerRef = null, display = null, fit = false, fitV = false, grow = false, shrink = false, fullWidth = false, fullHeight = false, overflow = null, position = null, float = null, pointer = false, visible = null, textColor = null, classNames = [], className = '', style = {}, children = null, ...rest } = props; + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = []; + + if(display && display.length) newClassNames.push(display); + + if(fit || fullWidth) newClassNames.push('w-full'); + + if(fit || fullHeight) newClassNames.push('h-full'); + + if(fitV) newClassNames.push('vw-full', 'vh-full'); + + if(grow) newClassNames.push('!flex-grow'); + + if(shrink) newClassNames.push('!flex-shrink-0'); + + if(overflow) newClassNames.push('overflow-' + overflow); + + if(position) newClassNames.push(position); + + if(float) newClassNames.push('float-' + float); + + if(pointer) newClassNames.push('cursor-pointer'); + + if(visible !== null) newClassNames.push(visible ? 'visible' : 'invisible'); + + if(textColor) newClassNames.push('text-' + textColor); + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ display, fit, fitV, grow, shrink, fullWidth, fullHeight, overflow, position, float, pointer, visible, textColor, classNames ]); + + const getClassName = useMemo(() => + { + let newClassName = getClassNames.join(' '); + + if(className.length) newClassName += (' ' + className); + + return newClassName.trim(); + }, [ getClassNames, className ]); + + const getStyle = useMemo(() => + { + let newStyle: CSSProperties = {}; + + if(Object.keys(style).length) newStyle = { ...newStyle, ...style }; + + return newStyle; + }, [ style ]); + + return ( +
+ { children } +
+ ); +}; diff --git a/Coolui v3 test/src/common/Button.tsx b/Coolui v3 test/src/common/Button.tsx new file mode 100644 index 0000000000..5caca6c16a --- /dev/null +++ b/Coolui v3 test/src/common/Button.tsx @@ -0,0 +1,71 @@ +import { FC, useMemo } from 'react'; +import { Flex, FlexProps } from './Flex'; +import { ButtonSizeType, ColorVariantType } from './types'; + +export interface ButtonProps extends FlexProps +{ + variant?: ColorVariantType; + size?: ButtonSizeType; + active?: boolean; + disabled?: boolean; +} + +export const Button: FC = props => +{ + const { variant = 'primary', size = 'sm', active = false, disabled = false, classNames = [], ...rest } = props; + + const getClassNames = useMemo(() => + { + + // fucked up method i know (i dont have a clue what im doing because im a ninja) + + const newClassNames: string[] = [ 'pointer-events-auto inline-block font-normal leading-normal text-[#fff] text-center no-underline align-middle cursor-pointer select-none border-[1px] border-[solid] border-[transparent] px-[.75rem] py-[.375rem] text-[.9rem] rounded-[.25rem] [transition:color_.15s_ease-in-out,_background-color_.15s_ease-in-out,_border-color_.15s_ease-in-out,_box-shadow_.15s_ease-in-out]' ]; + + if(variant) + { + + if(variant == 'primary') + newClassNames.push('text-white bg-[#1e7295] border-[#1e7295] [box-shadow:inset_0_2px_#ffffff26,inset_0_-2px_#0000001a,0_1px_#0000001a] hover:text-white hover:bg-[#1a617f] hover:border-[#185b77]'); + + if(variant == 'success') + newClassNames.push('text-white bg-[#00800b] border-[#00800b] [box-shadow:inset_0_2px_#ffffff26,inset_0_-2px_#0000001a,0_1px_#0000001a] hover:text-white hover:bg-[#006d09] hover:border-[#006609]'); + + if(variant == 'danger') + newClassNames.push('text-white bg-[#a81a12] border-[#a81a12] [box-shadow:inset_0_2px_#ffffff26,inset_0_-2px_#0000001a,0_1px_#0000001a] hover:text-white hover:bg-[#8f160f] hover:border-[#86150e]'); + + if(variant == 'warning') + newClassNames.push('text-white bg-[#ffc107] border-[#ffc107] [box-shadow:inset_0_2px_#ffffff26,inset_0_-2px_#0000001a,0_1px_#0000001a] hover:text-[#000] hover:bg-[#ffca2c] hover:border-[#ffc720]'); + + if(variant == 'black') + newClassNames.push('text-white bg-[#000] border-[#000] [box-shadow:inset_0_2px_#ffffff26,inset_0_-2px_#0000001a,0_1px_#0000001a] hover:text-white hover:bg-[#000] hover:border-[#000]'); + + if(variant == 'secondary') + newClassNames.push('text-white bg-[#185d79] border-[#185d79] [box-shadow:inset_0_2px_#ffffff26,_inset_0_-2px_#0000001a,_0_1px_#0000001a] hover:text-white hover:bg-[#144f67] hover:border-[#134a61]'); + + if(variant == 'dark') + newClassNames.push('text-white bg-dark [box-shadow:inset_0_2px_#ffffff26,inset_0_-2px_#0000001a,0_1px_#0000001a] hover:text-white hover:bg-[#18181bfb] hover:border-[#161619fb]'); + + if(variant == 'gray') + newClassNames.push('text-white bg-[#1e7295] border-[#1e7295] [box-shadow:inset_0_2px_#ffffff26,inset_0_-2px_#0000001a,0_1px_#0000001a] hover:text-white hover:bg-[#1a617f] hover:border-[#185b77]'); + + } + + if(size) + { + if(size == 'sm') + { + newClassNames.push('!px-[.5rem] !py-[.25rem] !text-[.7875rem] !rounded-[.2rem] !min-h-[28px]'); + } + } + + if(active) newClassNames.push('active'); + + if(disabled) newClassNames.push('pointer-events-none opacity-[.65] [box-shadow:none]'); + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ variant, size, active, disabled, classNames ]); + + return ; +}; diff --git a/Coolui v3 test/src/common/ButtonGroup.tsx b/Coolui v3 test/src/common/ButtonGroup.tsx new file mode 100644 index 0000000000..033bb1fc28 --- /dev/null +++ b/Coolui v3 test/src/common/ButtonGroup.tsx @@ -0,0 +1,22 @@ +import { FC, useMemo } from 'react'; +import { Base, BaseProps } from './Base'; + +export interface ButtonGroupProps extends BaseProps +{ +} + +export const ButtonGroup: FC = props => +{ + const { classNames = [], ...rest } = props; + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ 'btn-group' ]; + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ classNames ]); + + return ; +} diff --git a/Coolui v3 test/src/common/Column.tsx b/Coolui v3 test/src/common/Column.tsx new file mode 100644 index 0000000000..13cca1e2e4 --- /dev/null +++ b/Coolui v3 test/src/common/Column.tsx @@ -0,0 +1,46 @@ +import { FC, useMemo } from 'react'; +import { Flex, FlexProps } from './Flex'; +import { useGridContext } from './GridContext'; +import { ColumnSizesType } from './types'; + +export interface ColumnProps extends FlexProps +{ + size?: ColumnSizesType; + offset?: ColumnSizesType; + column?: boolean; +} + +export const Column: FC = props => +{ + const { size = 0, offset = 0, column = true, gap = 2, classNames = [], ...rest } = props; + const { isCssGrid = false } = useGridContext(); + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = []; + + if(size) + { + let colClassName = `col-span-${ size }`; + + if(isCssGrid) colClassName = `${ colClassName }`; + + newClassNames.push(colClassName); + } + + if(offset) + { + let colClassName = `offset-${ offset }`; + + if(isCssGrid) colClassName = `g-start-${ offset }`; + + newClassNames.push(colClassName); + } + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ size, offset, isCssGrid, classNames ]); + + return ; +}; diff --git a/Coolui v3 test/src/common/Flex.tsx b/Coolui v3 test/src/common/Flex.tsx new file mode 100644 index 0000000000..6d332acbd3 --- /dev/null +++ b/Coolui v3 test/src/common/Flex.tsx @@ -0,0 +1,50 @@ +import { FC, useMemo } from 'react'; +import { Base, BaseProps } from './Base'; +import { AlignItemType, AlignSelfType, JustifyContentType, SpacingType } from './types'; + +export interface FlexProps extends BaseProps +{ + column?: boolean; + reverse?: boolean; + gap?: SpacingType; + center?: boolean; + alignSelf?: AlignSelfType; + alignItems?: AlignItemType; + justifyContent?: JustifyContentType; +} + +export const Flex: FC = props => +{ + const { display = 'flex', column = undefined, reverse = false, gap = null, center = false, alignSelf = null, alignItems = null, justifyContent = null, classNames = [], ...rest } = props; + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = []; + + if(column) + { + if(reverse) newClassNames.push('flex-col-span-reverse'); + else newClassNames.push('flex-col'); + } + else + { + if(reverse) newClassNames.push('flex-row-reverse'); + } + + if(gap) newClassNames.push('gap-' + gap); + + if(alignSelf) newClassNames.push('self-' + alignSelf); + + if(alignItems) newClassNames.push('items-' + alignItems); + + if(justifyContent) newClassNames.push('justify-' + justifyContent); + + if(!alignItems && !justifyContent && center) newClassNames.push('items-center', 'justify-center'); + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ column, reverse, gap, center, alignSelf, alignItems, justifyContent, classNames ]); + + return ; +}; diff --git a/Coolui v3 test/src/common/FormGroup.tsx b/Coolui v3 test/src/common/FormGroup.tsx new file mode 100644 index 0000000000..2d73f24a8f --- /dev/null +++ b/Coolui v3 test/src/common/FormGroup.tsx @@ -0,0 +1,22 @@ +import { FC, useMemo } from 'react'; +import { Flex, FlexProps } from './Flex'; + +export interface FormGroupProps extends FlexProps +{ +} + +export const FormGroup: FC = props => +{ + const { classNames = [], ...rest } = props; + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ 'form-group' ]; + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ classNames ]); + + return ; +}; diff --git a/Coolui v3 test/src/common/Grid.tsx b/Coolui v3 test/src/common/Grid.tsx new file mode 100644 index 0000000000..441db8abfd --- /dev/null +++ b/Coolui v3 test/src/common/Grid.tsx @@ -0,0 +1,64 @@ +import { CSSProperties, FC, useMemo } from 'react'; +import { Base, BaseProps } from './Base'; +import { GridContextProvider } from './GridContext'; +import { AlignItemType, AlignSelfType, JustifyContentType, SpacingType } from './types'; + +export interface GridProps extends BaseProps +{ + inline?: boolean; + gap?: SpacingType; + maxContent?: boolean; + columnCount?: number; + center?: boolean; + alignSelf?: AlignSelfType; + alignItems?: AlignItemType; + justifyContent?: JustifyContentType; +} + +export const Grid: FC = props => +{ + const { inline = false, gap = 2, maxContent = false, columnCount = 0, center = false, alignSelf = null, alignItems = null, justifyContent = null, fullHeight = true, classNames = [], style = {}, ...rest } = props; + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = []; + + + if(inline) newClassNames.push('inline-grid'); + else newClassNames.push('grid grid-rows-[repeat(var(--bs-rows,_1),_1fr)] grid-cols-[repeat(var(--bs-columns,_12),_1fr)]'); + + if(gap) newClassNames.push('gap-' + gap); + else if(gap === 0) newClassNames.push('gap-0'); + + if(maxContent) newClassNames.push('[flex-basis:max-content]'); + + if(alignSelf) newClassNames.push('self-' + alignSelf); + + if(alignItems) newClassNames.push('items-' + alignItems); + + if(justifyContent) newClassNames.push('justify-' + justifyContent); + + if(!alignItems && !justifyContent && center) newClassNames.push('items-center', 'justify-center'); + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ inline, gap, maxContent, alignSelf, alignItems, justifyContent, center, classNames ]); + + const getStyle = useMemo(() => + { + let newStyle: CSSProperties = {}; + + if(columnCount) newStyle['--bs-columns'] = columnCount.toString(); + + if(Object.keys(style).length) newStyle = { ...newStyle, ...style }; + + return newStyle; + }, [ columnCount, style ]); + + return ( + + + + ); +}; diff --git a/Coolui v3 test/src/common/GridContext.tsx b/Coolui v3 test/src/common/GridContext.tsx new file mode 100644 index 0000000000..082d4bed27 --- /dev/null +++ b/Coolui v3 test/src/common/GridContext.tsx @@ -0,0 +1,17 @@ +import { createContext, FC, ProviderProps, useContext } from 'react'; + +export interface IGridContext +{ + isCssGrid: boolean; +} + +const GridContext = createContext({ + isCssGrid: false +}); + +export const GridContextProvider: FC> = props => +{ + return { props.children }; +}; + +export const useGridContext = () => useContext(GridContext); diff --git a/Coolui v3 test/src/common/HorizontalRule.tsx b/Coolui v3 test/src/common/HorizontalRule.tsx new file mode 100644 index 0000000000..54164ae9ff --- /dev/null +++ b/Coolui v3 test/src/common/HorizontalRule.tsx @@ -0,0 +1,38 @@ +import { CSSProperties, FC, useMemo } from 'react'; +import { Base, BaseProps } from './Base'; +import { ColorVariantType } from './types'; + +export interface HorizontalRuleProps extends BaseProps +{ + variant?: ColorVariantType; + height?: number; +} + +export const HorizontalRule: FC = props => +{ + const { variant = 'black', height = 1, classNames = [], style = {}, ...rest } = props; + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = []; + + if(variant) newClassNames.push('bg-' + variant); + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ variant, classNames ]); + + const getStyle = useMemo(() => + { + let newStyle: CSSProperties = { display: 'list-item' }; + + if(height > 0) newStyle.height = height; + + if(Object.keys(style).length) newStyle = { ...newStyle, ...style }; + + return newStyle; + }, [ height, style ]); + + return ; +}; diff --git a/Coolui v3 test/src/common/InfiniteScroll.tsx b/Coolui v3 test/src/common/InfiniteScroll.tsx new file mode 100644 index 0000000000..51966f887e --- /dev/null +++ b/Coolui v3 test/src/common/InfiniteScroll.tsx @@ -0,0 +1,55 @@ +import { useVirtualizer } from '@tanstack/react-virtual'; +import { FC, ReactElement, useRef, useState } from 'react'; +import { Base } from './Base'; + +interface InfiniteScrollProps +{ + rows: T[]; + overscan?: number; + scrollToBottom?: boolean; + rowRender: (row: T) => ReactElement; +} + +export const InfiniteScroll: FC = props => +{ + const { rows = [], overscan = 5, scrollToBottom = false, rowRender = null } = props; + const [ scrollIndex, setScrollIndex ] = useState(rows.length - 1); + const parentRef = useRef(null); + + const virtualizer = useVirtualizer({ + count: rows.length, + overscan, + getScrollElement: () => parentRef.current, + estimateSize: () => 45, + }); + const items = virtualizer.getVirtualItems(); + + return ( + +
+
+ { items.map((virtualRow) => ( +
+ { rowRender(rows[virtualRow.index]) } +
+ )) } +
+
+ + ); +}; diff --git a/Coolui v3 test/src/common/Popover.tsx b/Coolui v3 test/src/common/Popover.tsx new file mode 100644 index 0000000000..5a7c5c8954 --- /dev/null +++ b/Coolui v3 test/src/common/Popover.tsx @@ -0,0 +1,54 @@ +import { FC, PropsWithChildren, useEffect, useRef, useState } from 'react'; + +export const ReactPopover: FC> = props => +{ + const { content = null, trigger = null, children = null } = props; + const [ show, setShow ] = useState(false); + const wrapperRef = useRef(null); + + const handleMouseOver = () => (trigger === 'hover') && setShow(true); + + const handleMouseLeft = () => (trigger === 'hover') && setShow(false); + + useEffect(() => + { + if(!show) return; + + const handleClickOutside = (event: MouseEvent) => + { + if(wrapperRef.current && !wrapperRef.current.contains(event.target)) setShow(false); + }; + + document.addEventListener('mousedown', handleClickOutside); + + return () => + { + // Unbind the event listener on clean up + document.removeEventListener('mousedown', handleClickOutside); + }; + }, [ show, wrapperRef ]); + + return ( +
+
setShow(!show) } + > + { children } +
+ +
+ ); +}; diff --git a/Coolui v3 test/src/common/Slider.tsx b/Coolui v3 test/src/common/Slider.tsx new file mode 100644 index 0000000000..50cba28c55 --- /dev/null +++ b/Coolui v3 test/src/common/Slider.tsx @@ -0,0 +1,21 @@ +import { FC } from 'react'; +import ReactSlider, { ReactSliderProps } from 'react-slider'; +import { Button } from './Button'; +import { Flex } from './Flex'; +import { FaAngleLeft, FaAngleRight } from 'react-icons/fa'; + +export interface SliderProps extends ReactSliderProps +{ + disabledButton?: boolean; +} + +export const Slider: FC = props => +{ + const { disabledButton, max, min, value, onChange, ...rest } = props; + + return + { !disabledButton && } + + { !disabledButton && } + ; +} diff --git a/Coolui v3 test/src/common/Text.tsx b/Coolui v3 test/src/common/Text.tsx new file mode 100644 index 0000000000..da5235d92a --- /dev/null +++ b/Coolui v3 test/src/common/Text.tsx @@ -0,0 +1,79 @@ +import { FC, useMemo } from 'react'; +import { Base, BaseProps } from './Base'; +import { ColorVariantType, FontSizeType, FontWeightType, TextAlignType } from './types'; + +export interface TextProps extends BaseProps { + variant?: ColorVariantType; + fontWeight?: FontWeightType; + fontSize?: FontSizeType; + fontSizeCustom?: number; + align?: TextAlignType; + bold?: boolean; + underline?: boolean; + italics?: boolean; + truncate?: boolean; + center?: boolean; + textEnd?: boolean; + small?: boolean; + wrap?: boolean; + noWrap?: boolean; + textBreak?: boolean; +} + +export const Text: FC = props => { + const { + variant = 'black', + fontWeight = null, + fontSize = 0, + fontSizeCustom, + align = null, + bold = false, + underline = false, + italics = false, + truncate = false, + center = false, + textEnd = false, + small = false, + wrap = false, + noWrap = false, + textBreak = false, + ...rest + } = props; + + const getClassNames = useMemo(() => { + const newClassNames: string[] = ['inline']; + + if (variant) { + if (variant === 'primary') newClassNames.push('text-[#1e7295]'); + if (variant == 'secondary') newClassNames.push('text-[#185d79]'); + if (variant === 'black') newClassNames.push('text-[#000000]'); + if (variant == 'dark') newClassNames.push('text-[#18181b]'); + if (variant === 'gray') newClassNames.push('text-[#6b7280]'); + if (variant === 'white') newClassNames.push('text-[#ffffff]'); + if (variant == 'success') newClassNames.push('text-[#00800b]'); + if (variant == 'danger') newClassNames.push('text-[#a81a12]'); + if (variant == 'warning') newClassNames.push('text-[#ffc107]'); + } + + if (bold) newClassNames.push('font-bold'); + if (fontWeight) newClassNames.push('font-' + fontWeight); + if (fontSize) newClassNames.push('fs-' + fontSize); + if (fontSizeCustom) newClassNames.push('fs-custom'); + if (align) newClassNames.push('text-' + align); + if (underline) newClassNames.push('underline'); + if (italics) newClassNames.push('italic'); + if (truncate) newClassNames.push('text-truncate'); + if (center) newClassNames.push('text-center'); + if (textEnd) newClassNames.push('text-end'); + if (small) newClassNames.push('text-sm'); + if (wrap) newClassNames.push('text-wrap'); + if (noWrap) newClassNames.push('text-nowrap'); + if (textBreak) newClassNames.push('text-break'); + + return newClassNames; + }, [variant, fontWeight, fontSize, fontSizeCustom, align, bold, underline, italics, truncate, center, textEnd, small, wrap, noWrap, textBreak]); + + const style = fontSizeCustom ? { '--font-size': `${fontSizeCustom}px` } as React.CSSProperties : undefined; + + return ; +}; \ No newline at end of file diff --git a/Coolui v3 test/src/common/card/NitroCardContentView.tsx b/Coolui v3 test/src/common/card/NitroCardContentView.tsx new file mode 100644 index 0000000000..a93703be88 --- /dev/null +++ b/Coolui v3 test/src/common/card/NitroCardContentView.tsx @@ -0,0 +1,19 @@ +import { FC, useMemo } from 'react'; +import { Column, ColumnProps } from '..'; + +export const NitroCardContentView: FC = props => +{ + const { overflow = 'auto', classNames = [], ...rest } = props; + + const getClassNames = useMemo(() => + { + // Theme Changer + const newClassNames: string[] = [ 'container-fluid', 'h-full p-[8px] overflow-auto', 'bg-light' ]; + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ classNames ]); + + return ; +}; diff --git a/Coolui v3 test/src/common/card/NitroCardContext.tsx b/Coolui v3 test/src/common/card/NitroCardContext.tsx new file mode 100644 index 0000000000..c296b2a5da --- /dev/null +++ b/Coolui v3 test/src/common/card/NitroCardContext.tsx @@ -0,0 +1,17 @@ +import { createContext, FC, ProviderProps, useContext } from 'react'; + +interface INitroCardContext +{ + theme: string; +} + +const NitroCardContext = createContext({ + theme: null +}); + +export const NitroCardContextProvider: FC> = props => +{ + return { props.children }; +}; + +export const useNitroCardContext = () => useContext(NitroCardContext); diff --git a/Coolui v3 test/src/common/card/NitroCardHeaderView.tsx b/Coolui v3 test/src/common/card/NitroCardHeaderView.tsx new file mode 100644 index 0000000000..2cfd63807d --- /dev/null +++ b/Coolui v3 test/src/common/card/NitroCardHeaderView.tsx @@ -0,0 +1,41 @@ +import { FC, MouseEvent } from 'react'; +import { FaFlag } from 'react-icons/fa'; +import { Base, Column, ColumnProps, Flex } from '..'; + +interface NitroCardHeaderViewProps extends ColumnProps +{ + headerText: string; + isGalleryPhoto?: boolean; + noCloseButton?: boolean; + onReportPhoto?: (event: MouseEvent) => void; + onCloseClick: (event: MouseEvent) => void; +} + +export const NitroCardHeaderView: FC = props => +{ + const { headerText = null, isGalleryPhoto = false, noCloseButton = false, onReportPhoto = null, onCloseClick = null, justifyContent = 'center', alignItems = 'center', classNames = [], children = null, ...rest } = props; + + + + const onMouseDown = (event: MouseEvent) => + { + event.stopPropagation(); + event.nativeEvent.stopImmediatePropagation(); + }; + + return ( + + + { headerText } + { isGalleryPhoto && + + + + } +
+
+ +
+
+ ); +}; diff --git a/Coolui v3 test/src/common/card/NitroCardView.tsx b/Coolui v3 test/src/common/card/NitroCardView.tsx new file mode 100644 index 0000000000..9018cace58 --- /dev/null +++ b/Coolui v3 test/src/common/card/NitroCardView.tsx @@ -0,0 +1,35 @@ +import { FC, useMemo, useRef } from 'react'; +import { Column, ColumnProps } from '..'; +import { DraggableWindow, DraggableWindowPosition, DraggableWindowProps } from '../draggable-window'; +import { NitroCardContextProvider } from './NitroCardContext'; + +export interface NitroCardViewProps extends DraggableWindowProps, ColumnProps +{ + theme?: string; +} + +export const NitroCardView: FC = props => +{ + const { theme = 'primary', uniqueKey = null, handleSelector = '.drag-handler', windowPosition = DraggableWindowPosition.CENTER, disableDrag = false, overflow = 'hidden', position = 'relative', gap = 0, classNames = [], ...rest } = props; + const elementRef = useRef(); + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ 'resize', 'rounded', 'shadow', ]; + + // Card Theme Changer + newClassNames.push('border-[1px] border-[#283F5D]'); + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ classNames ]); + + return ( + + + + + + ); +}; diff --git a/Coolui v3 test/src/common/card/accordion/NitroCardAccordionContext.tsx b/Coolui v3 test/src/common/card/accordion/NitroCardAccordionContext.tsx new file mode 100644 index 0000000000..5e65c30b39 --- /dev/null +++ b/Coolui v3 test/src/common/card/accordion/NitroCardAccordionContext.tsx @@ -0,0 +1,21 @@ +import { createContext, Dispatch, FC, ProviderProps, SetStateAction, useContext } from 'react'; + +export interface INitroCardAccordionContext +{ + closers: Function[]; + setClosers: Dispatch>; + closeAll: () => void; +} + +const NitroCardAccordionContext = createContext({ + closers: null, + setClosers: null, + closeAll: null +}); + +export const NitroCardAccordionContextProvider: FC> = props => +{ + return ; +}; + +export const useNitroCardAccordionContext = () => useContext(NitroCardAccordionContext); diff --git a/Coolui v3 test/src/common/card/accordion/NitroCardAccordionItemView.tsx b/Coolui v3 test/src/common/card/accordion/NitroCardAccordionItemView.tsx new file mode 100644 index 0000000000..238aab40e2 --- /dev/null +++ b/Coolui v3 test/src/common/card/accordion/NitroCardAccordionItemView.tsx @@ -0,0 +1,18 @@ +import { FC } from 'react'; +import { Flex, FlexProps } from '../..'; + +export interface NitroCardAccordionItemViewProps extends FlexProps +{ + +} + +export const NitroCardAccordionItemView: FC = props => +{ + const { alignItems = 'center', gap = 1, children = null, ...rest } = props; + + return ( + + { children } + + ); +}; diff --git a/Coolui v3 test/src/common/card/accordion/NitroCardAccordionSetView.tsx b/Coolui v3 test/src/common/card/accordion/NitroCardAccordionSetView.tsx new file mode 100644 index 0000000000..1a059d4b07 --- /dev/null +++ b/Coolui v3 test/src/common/card/accordion/NitroCardAccordionSetView.tsx @@ -0,0 +1,84 @@ +import { FC, useCallback, useEffect, useMemo, useState } from 'react'; +import { FaCaretDown, FaCaretUp } from 'react-icons/fa'; +import { Column, ColumnProps, Flex, Text } from '../..'; +import { useNitroCardAccordionContext } from './NitroCardAccordionContext'; + +export interface NitroCardAccordionSetViewProps extends ColumnProps +{ + headerText: string; + isExpanded?: boolean; +} + +export const NitroCardAccordionSetView: FC = props => +{ + const { headerText = '', isExpanded = false, gap = 0, classNames = [], children = null, ...rest } = props; + const [ isOpen, setIsOpen ] = useState(false); + const { setClosers = null, closeAll = null } = useNitroCardAccordionContext(); + + const onClick = () => + { + closeAll(); + + setIsOpen(prevValue => !prevValue); + }; + + const onClose = useCallback(() => setIsOpen(false), []); + + const getClassNames = useMemo(() => + { + const newClassNames = [ 'nitro-card-accordion-set' ]; + + if(isOpen) newClassNames.push('active'); + + if(classNames && classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ isOpen, classNames ]); + + useEffect(() => + { + setIsOpen(isExpanded); + }, [ isExpanded ]); + + useEffect(() => + { + const closeFunction = onClose; + + setClosers(prevValue => + { + const newClosers = [ ...prevValue ]; + + newClosers.push(closeFunction); + + return newClosers; + }); + + return () => + { + setClosers(prevValue => + { + const newClosers = [ ...prevValue ]; + + const index = newClosers.indexOf(closeFunction); + + if(index >= 0) newClosers.splice(index, 1); + + return newClosers; + }); + }; + }, [ onClose, setClosers ]); + + return ( + + + { headerText } + { isOpen && } + { !isOpen && } + + { isOpen && + + { children } + } + + ); +}; diff --git a/Coolui v3 test/src/common/card/accordion/NitroCardAccordionView.tsx b/Coolui v3 test/src/common/card/accordion/NitroCardAccordionView.tsx new file mode 100644 index 0000000000..0874450a0f --- /dev/null +++ b/Coolui v3 test/src/common/card/accordion/NitroCardAccordionView.tsx @@ -0,0 +1,25 @@ +import { FC, useCallback, useState } from 'react'; +import { Column, ColumnProps } from '../..'; +import { NitroCardAccordionContextProvider } from './NitroCardAccordionContext'; + +interface NitroCardAccordionViewProps extends ColumnProps +{ + +} + +export const NitroCardAccordionView: FC = props => +{ + const { ...rest } = props; + const [ closers, setClosers ] = useState([]); + + const closeAll = useCallback(() => + { + for(const closer of closers) closer(); + }, [ closers ]); + + return ( + + + + ); +}; diff --git a/Coolui v3 test/src/common/card/accordion/index.ts b/Coolui v3 test/src/common/card/accordion/index.ts new file mode 100644 index 0000000000..d585b3362b --- /dev/null +++ b/Coolui v3 test/src/common/card/accordion/index.ts @@ -0,0 +1,4 @@ +export * from './NitroCardAccordionContext'; +export * from './NitroCardAccordionItemView'; +export * from './NitroCardAccordionSetView'; +export * from './NitroCardAccordionView'; diff --git a/Coolui v3 test/src/common/card/index.ts b/Coolui v3 test/src/common/card/index.ts new file mode 100644 index 0000000000..3ce0d60687 --- /dev/null +++ b/Coolui v3 test/src/common/card/index.ts @@ -0,0 +1,6 @@ +export * from './NitroCardContentView'; +export * from './NitroCardContext'; +export * from './NitroCardHeaderView'; +export * from './NitroCardView'; +export * from './accordion'; +export * from './tabs'; diff --git a/Coolui v3 test/src/common/card/tabs/NitroCardTabsItemView.tsx b/Coolui v3 test/src/common/card/tabs/NitroCardTabsItemView.tsx new file mode 100644 index 0000000000..2f0b014821 --- /dev/null +++ b/Coolui v3 test/src/common/card/tabs/NitroCardTabsItemView.tsx @@ -0,0 +1,36 @@ +import { FC, useMemo } from 'react'; +import { Flex, FlexProps } from '../../Flex'; +import { LayoutItemCountView } from '../../layout'; + +interface NitroCardTabsItemViewProps extends FlexProps +{ + isActive?: boolean; + count?: number; +} + +export const NitroCardTabsItemView: FC = props => +{ + const { isActive = false, count = 0, overflow = 'hidden', position = 'relative', pointer = true, classNames = [], children = null, ...rest } = props; + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ 'overflow-hidden relative cursor-pointer rounded-t-md flex bg-card-tab-item px-3 py-1 z-[1] border-card-border border-t border-l border-r before:absolute before:w-[93%] before:h-[3px] before:rounded-md before:top-[1.5px] before:left-0 before:right-0 before:m-auto before:z-[1] before:bg-[#C2C9D1]', + isActive && 'bg-card-tab-item-active -mb-[1px] before:bg-white' ]; + + //if (isActive) newClassNames.push('bg-[#dfdfdf] border-b-[1px_solid_black]'); + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ isActive, classNames ]); + + return ( + + + { children } + + { (count > 0) && + } + + ); +}; diff --git a/Coolui v3 test/src/common/card/tabs/NitroCardTabsView.tsx b/Coolui v3 test/src/common/card/tabs/NitroCardTabsView.tsx new file mode 100644 index 0000000000..8e5d118d3d --- /dev/null +++ b/Coolui v3 test/src/common/card/tabs/NitroCardTabsView.tsx @@ -0,0 +1,22 @@ +import { FC, useMemo } from 'react'; +import { Flex, FlexProps } from '../..'; + +export const NitroCardTabsView: FC = props => +{ + const { justifyContent = 'center', gap = 1, classNames = [], children = null, ...rest } = props; + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ 'justify-center gap-0.5 flex bg-card-tabs min-h-card-tabs max-h-card-tabs pt-1 border-b border-card-border px-2 -mt-[1px]' ]; + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ classNames ]); + + return ( + + { children } + + ); +}; diff --git a/Coolui v3 test/src/common/card/tabs/index.ts b/Coolui v3 test/src/common/card/tabs/index.ts new file mode 100644 index 0000000000..517db1146c --- /dev/null +++ b/Coolui v3 test/src/common/card/tabs/index.ts @@ -0,0 +1,2 @@ +export * from './NitroCardTabsItemView'; +export * from './NitroCardTabsView'; diff --git a/Coolui v3 test/src/common/draggable-window/DraggableWindow.tsx b/Coolui v3 test/src/common/draggable-window/DraggableWindow.tsx new file mode 100644 index 0000000000..b71a3537d2 --- /dev/null +++ b/Coolui v3 test/src/common/draggable-window/DraggableWindow.tsx @@ -0,0 +1,245 @@ +import { MouseEventType, TouchEventType } from '@nitrots/nitro-renderer'; +import { CSSProperties, FC, Key, MouseEvent as ReactMouseEvent, ReactNode, TouchEvent as ReactTouchEvent, useCallback, useEffect, useRef, useState } from 'react'; +import { createPortal } from 'react-dom'; +import { GetLocalStorage, SetLocalStorage, WindowSaveOptions } from '../../api'; +import { DraggableWindowPosition } from './DraggableWindowPosition'; + +const CURRENT_WINDOWS: HTMLElement[] = []; +const POS_MEMORY: Map = new Map(); +const BOUNDS_THRESHOLD_TOP: number = 0; +const BOUNDS_THRESHOLD_LEFT: number = 0; + +export interface DraggableWindowProps { + uniqueKey?: Key; + handleSelector?: string; + windowPosition?: string; + disableDrag?: boolean; + dragStyle?: CSSProperties; + offsetLeft?: number; + offsetTop?: number; + children?: ReactNode; +} + +export const DraggableWindow: FC = props => { + const { uniqueKey = null, handleSelector = '.drag-handler', windowPosition = DraggableWindowPosition.CENTER, disableDrag = false, dragStyle = {}, children = null, offsetLeft = 0, offsetTop = 0 } = props; + const [delta, setDelta] = useState<{ x: number, y: number }>({ x: 0, y: 0 }); + const [offset, setOffset] = useState<{ x: number, y: number }>({ x: 0, y: 0 }); + const [start, setStart] = useState<{ x: number, y: number }>({ x: 0, y: 0 }); + const [isDragging, setIsDragging] = useState(false); + const [isPositioned, setIsPositioned] = useState(false); // New state to control visibility + const [dragHandler, setDragHandler] = useState(null); + const elementRef = useRef(); + + const bringToTop = useCallback(() => { + let zIndex = 400; + for (const existingWindow of CURRENT_WINDOWS) { + zIndex += 1; + existingWindow.style.zIndex = zIndex.toString(); + } + }, []); + + const moveCurrentWindow = useCallback(() => { + const index = CURRENT_WINDOWS.indexOf(elementRef.current); + if (index === -1) { + CURRENT_WINDOWS.push(elementRef.current); + } else if (index === (CURRENT_WINDOWS.length - 1)) return; + else if (index >= 0) { + CURRENT_WINDOWS.splice(index, 1); + CURRENT_WINDOWS.push(elementRef.current); + } + bringToTop(); + }, [bringToTop]); + + const onMouseDown = useCallback((event: ReactMouseEvent) => { + moveCurrentWindow(); + }, [moveCurrentWindow]); + + const onTouchStart = useCallback((event: ReactTouchEvent) => { + moveCurrentWindow(); + }, [moveCurrentWindow]); + + const startDragging = useCallback((startX: number, startY: number) => { + setStart({ x: startX, y: startY }); + setIsDragging(true); + }, []); + + const onDragMouseDown = useCallback((event: MouseEvent) => { + startDragging(event.clientX, event.clientY); + }, [startDragging]); + + const onTouchDown = useCallback((event: TouchEvent) => { + const touch = event.touches[0]; + startDragging(touch.clientX, touch.clientY); + }, [startDragging]); + + const clampPosition = useCallback((newX: number, newY: number) => { + if (!elementRef.current) return { x: newX, y: newY }; + + const windowWidth = elementRef.current.offsetWidth; + const windowHeight = elementRef.current.offsetHeight; + const viewportWidth = window.innerWidth; + const viewportHeight = window.innerHeight; + + const clampedX = Math.max(BOUNDS_THRESHOLD_LEFT, Math.min(newX, viewportWidth - windowWidth)); + const clampedY = Math.max(BOUNDS_THRESHOLD_TOP, Math.min(newY, viewportHeight - windowHeight)); + + return { x: clampedX, y: clampedY }; + }, []); + + const onDragMouseMove = useCallback((event: MouseEvent) => { + if (!elementRef.current || !isDragging) return; + + const newDeltaX = event.clientX - start.x; + const newDeltaY = event.clientY - start.y; + const newOffsetX = offset.x + newDeltaX; + const newOffsetY = offset.y + newDeltaY; + + const clampedPos = clampPosition(newOffsetX, newOffsetY); + setDelta({ x: clampedPos.x - offset.x, y: clampedPos.y - offset.y }); + }, [start, offset, clampPosition, isDragging]); + + const onDragTouchMove = useCallback((event: TouchEvent) => { + if (!elementRef.current || !isDragging) return; + + const touch = event.touches[0]; + const newDeltaX = touch.clientX - start.x; + const newDeltaY = touch.clientY - start.y; + const newOffsetX = offset.x + newDeltaX; + const newOffsetY = offset.y + newDeltaY; + + const clampedPos = clampPosition(newOffsetX, newOffsetY); + setDelta({ x: clampedPos.x - offset.x, y: clampedPos.y - offset.y }); + }, [start, offset, clampPosition, isDragging]); + + const completeDrag = useCallback(() => { + if (!elementRef.current || !dragHandler || !isDragging) return; + + const finalOffsetX = offset.x + delta.x; + const finalOffsetY = offset.y + delta.y; + const clampedPos = clampPosition(finalOffsetX, finalOffsetY); + + setDelta({ x: 0, y: 0 }); + setOffset({ x: clampedPos.x, y: clampedPos.y }); + setIsDragging(false); + + if (uniqueKey !== null) { + const newStorage = { ...GetLocalStorage(`nitro.windows.${uniqueKey}`) } as WindowSaveOptions; + newStorage.offset = { x: clampedPos.x, y: clampedPos.y }; + SetLocalStorage(`nitro.windows.${uniqueKey}`, newStorage); + } + }, [dragHandler, delta, offset, uniqueKey, clampPosition, isDragging]); + + const onDragMouseUp = useCallback((event: MouseEvent) => { + completeDrag(); + }, [completeDrag]); + + const onDragTouchUp = useCallback((event: TouchEvent) => { + completeDrag(); + }, [completeDrag]); + + useEffect(() => { + const element = elementRef.current as HTMLElement; + if (!element) return; + + CURRENT_WINDOWS.push(element); + bringToTop(); + + if (!disableDrag) { + const handle = element.querySelector(handleSelector); + if (handle) setDragHandler(handle as HTMLElement); + } + + const windowWidth = element.offsetWidth || 340; + const windowHeight = element.offsetHeight || 462; + let offsetX = 0; + let offsetY = 0; + + switch (windowPosition) { + case DraggableWindowPosition.TOP_CENTER: + offsetY = 50 + offsetTop; + offsetX = (window.innerWidth - windowWidth) / 2 + offsetLeft; + break; + case DraggableWindowPosition.CENTER: + offsetY = (window.innerHeight - windowHeight) / 2 + offsetTop; + offsetX = (window.innerWidth - windowWidth) / 2 + offsetLeft; + break; + case DraggableWindowPosition.TOP_LEFT: + offsetY = 50 + offsetTop; + offsetX = 50 + offsetLeft; + break; + } + + const clampedPos = clampPosition(offsetX, offsetY); + element.style.left = '0px'; + element.style.top = '0px'; + setOffset({ x: clampedPos.x, y: clampedPos.y }); + setDelta({ x: 0, y: 0 }); + setIsPositioned(true); // Mark as positioned after setting initial offset + + return () => { + const index = CURRENT_WINDOWS.indexOf(element); + if (index >= 0) CURRENT_WINDOWS.splice(index, 1); + }; + }, [handleSelector, windowPosition, uniqueKey, disableDrag, offsetLeft, offsetTop, bringToTop]); + + useEffect(() => { + const element = elementRef.current as HTMLElement; + if (!element || !isPositioned) return; + + element.style.transform = `translate(${offset.x + delta.x}px, ${offset.y + delta.y}px)`; + element.style.visibility = 'visible'; + }, [offset, delta, isPositioned]); + + useEffect(() => { + if (!dragHandler) return; + + dragHandler.addEventListener(MouseEventType.MOUSE_DOWN, onDragMouseDown); + dragHandler.addEventListener(TouchEventType.TOUCH_START, onTouchDown); + + return () => { + dragHandler.removeEventListener(MouseEventType.MOUSE_DOWN, onDragMouseDown); + dragHandler.removeEventListener(TouchEventType.TOUCH_START, onTouchDown); + }; + }, [dragHandler, onDragMouseDown, onTouchDown]); + + useEffect(() => { + if (!isDragging) return; + + document.addEventListener(MouseEventType.MOUSE_UP, onDragMouseUp); + document.addEventListener(TouchEventType.TOUCH_END, onDragTouchUp); + document.addEventListener(MouseEventType.MOUSE_MOVE, onDragMouseMove); + document.addEventListener(TouchEventType.TOUCH_MOVE, onDragTouchMove); + + return () => { + document.removeEventListener(MouseEventType.MOUSE_UP, onDragMouseUp); + document.removeEventListener(TouchEventType.TOUCH_END, onDragTouchUp); + document.removeEventListener(MouseEventType.MOUSE_MOVE, onDragMouseMove); + document.removeEventListener(TouchEventType.TOUCH_MOVE, onDragTouchMove); + }; + }, [isDragging, onDragMouseUp, onDragMouseMove, onDragTouchUp, onDragTouchMove]); + + useEffect(() => { + if (!uniqueKey) return; + + const localStorage = GetLocalStorage(`nitro.windows.${uniqueKey}`); + if (!localStorage || !localStorage.offset) return; + + const clampedPos = clampPosition(localStorage.offset.x, localStorage.offset.y); + setDelta({ x: 0, y: 0 }); + setOffset({ x: clampedPos.x, y: clampedPos.y }); + setIsPositioned(true); // Ensure positioned when loading from storage + }, [uniqueKey, clampPosition]); + + return createPortal( +
+ {children} +
, + document.getElementById('draggable-windows-container') + ); +}; \ No newline at end of file diff --git a/Coolui v3 test/src/common/draggable-window/DraggableWindowPosition.ts b/Coolui v3 test/src/common/draggable-window/DraggableWindowPosition.ts new file mode 100644 index 0000000000..476a37ec95 --- /dev/null +++ b/Coolui v3 test/src/common/draggable-window/DraggableWindowPosition.ts @@ -0,0 +1,7 @@ +export class DraggableWindowPosition +{ + public static CENTER: string = 'DWP_CENTER'; + public static TOP_CENTER: string = 'DWP_TOP_CENTER'; + public static TOP_LEFT: string = 'DWP_TOP_LEFT'; + public static NOTHING: string = 'DWP_NOTHING'; +} diff --git a/Coolui v3 test/src/common/draggable-window/index.ts b/Coolui v3 test/src/common/draggable-window/index.ts new file mode 100644 index 0000000000..7672f5270c --- /dev/null +++ b/Coolui v3 test/src/common/draggable-window/index.ts @@ -0,0 +1,2 @@ +export * from './DraggableWindow'; +export * from './DraggableWindowPosition'; diff --git a/Coolui v3 test/src/common/index.ts b/Coolui v3 test/src/common/index.ts new file mode 100644 index 0000000000..d8c47aefd0 --- /dev/null +++ b/Coolui v3 test/src/common/index.ts @@ -0,0 +1,22 @@ + +export * from './AutoGrid'; +export * from './Base'; +export * from './Button'; +export * from './ButtonGroup'; +export * from './Column'; +export * from './Flex'; +export * from './FormGroup'; +export * from './Grid'; +export * from './GridContext'; +export * from './HorizontalRule'; +export * from './InfiniteScroll'; +export * from './Text'; +export * from './card'; +export * from './card/accordion'; +export * from './card/tabs'; +export * from './draggable-window'; +export * from './layout'; +export * from './layout/limited-edition'; +export * from './types'; +export * from "./Slider"; +export * from './utils'; diff --git a/Coolui v3 test/src/common/layout/LayoutAvatarImageView.tsx b/Coolui v3 test/src/common/layout/LayoutAvatarImageView.tsx new file mode 100644 index 0000000000..86d589e43c --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutAvatarImageView.tsx @@ -0,0 +1,103 @@ +import { AvatarScaleType, AvatarSetType, GetAvatarRenderManager } from '@nitrots/nitro-renderer'; +import { CSSProperties, FC, useEffect, useMemo, useRef, useState } from 'react'; +import { Base, BaseProps } from '../Base'; + +const AVATAR_IMAGE_CACHE: Map = new Map(); + +export interface LayoutAvatarImageViewProps extends BaseProps +{ + figure: string; + gender?: string; + headOnly?: boolean; + direction?: number; + scale?: number; +} + +export const LayoutAvatarImageView: FC = props => +{ + const { figure = '', gender = 'M', headOnly = false, direction = 0, scale = 1, classNames = [], style = {}, ...rest } = props; + const [ avatarUrl, setAvatarUrl ] = useState(null); + const [ isReady, setIsReady ] = useState(false); + const isDisposed = useRef(false); + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ 'avatar-image relative w-[90px] h-[130px] bg-no-repeat bg-[center_-8px] pointer-events-none' ]; + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ classNames ]); + + const getStyle = useMemo(() => + { + let newStyle: CSSProperties = {}; + + if(avatarUrl && avatarUrl.length) newStyle.backgroundImage = `url('${ avatarUrl }')`; + + if(scale !== 1) + { + newStyle.transform = `scale(${ scale })`; + + if(!(scale % 1)) newStyle.imageRendering = 'pixelated'; + } + + if(Object.keys(style).length) newStyle = { ...newStyle, ...style }; + + return newStyle; + }, [ avatarUrl, scale, style ]); + + useEffect(() => + { + if(!isReady) return; + + const figureKey = [ figure, gender, direction, headOnly ].join('-'); + + if(AVATAR_IMAGE_CACHE.has(figureKey)) + { + setAvatarUrl(AVATAR_IMAGE_CACHE.get(figureKey)); + } + else + { + const resetFigure = (_figure: string) => + { + if(isDisposed.current) return; + + const avatarImage = GetAvatarRenderManager().createAvatarImage(_figure, AvatarScaleType.LARGE, gender, { resetFigure: (figure: string) => resetFigure(figure), dispose: null, disposed: false }); + + let setType = AvatarSetType.FULL; + + if(headOnly) setType = AvatarSetType.HEAD; + + avatarImage.setDirection(setType, direction); + + const imageUrl = avatarImage.processAsImageUrl(setType); + + if(imageUrl && !isDisposed.current) + { + if(!avatarImage.isPlaceholder()) AVATAR_IMAGE_CACHE.set(figureKey, imageUrl); + + setAvatarUrl(imageUrl); + } + + avatarImage.dispose(); + }; + + resetFigure(figure); + } + }, [ figure, gender, direction, headOnly, isReady ]); + + useEffect(() => + { + isDisposed.current = false; + + setIsReady(true); + + return () => + { + isDisposed.current = true; + }; + }, []); + + return ; +}; diff --git a/Coolui v3 test/src/common/layout/LayoutBackgroundImage.tsx b/Coolui v3 test/src/common/layout/LayoutBackgroundImage.tsx new file mode 100644 index 0000000000..622d9598b1 --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutBackgroundImage.tsx @@ -0,0 +1,23 @@ +import { FC, useMemo } from 'react'; +import { Base, BaseProps } from '../Base'; + +export interface LayoutBackgroundImageProps extends BaseProps +{ + imageUrl?: string; +} + +export const LayoutBackgroundImage: FC = props => +{ + const { imageUrl = null, fit = true, style = null, ...rest } = props; + + const getStyle = useMemo(() => + { + const newStyle = { ...style }; + + if(imageUrl) newStyle.background = `url(${ imageUrl }) center no-repeat`; + + return newStyle; + }, [ style, imageUrl ]); + + return ; +}; diff --git a/Coolui v3 test/src/common/layout/LayoutBadgeImageView.tsx b/Coolui v3 test/src/common/layout/LayoutBadgeImageView.tsx new file mode 100644 index 0000000000..c9e0e5e364 --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutBadgeImageView.tsx @@ -0,0 +1,112 @@ +import { BadgeImageReadyEvent, GetEventDispatcher, GetSessionDataManager, NitroSprite, TextureUtils } from '@nitrots/nitro-renderer'; +import { CSSProperties, FC, useEffect, useMemo, useState } from 'react'; +import { GetConfigurationValue, LocalizeBadgeDescription, LocalizeBadgeName, LocalizeText } from '../../api'; +import { Base, BaseProps } from '../Base'; + +export interface LayoutBadgeImageViewProps extends BaseProps +{ + badgeCode: string; + isGroup?: boolean; + showInfo?: boolean; + customTitle?: string; + isGrayscale?: boolean; + scale?: number; +} + +export const LayoutBadgeImageView: FC = props => +{ + const { badgeCode = null, isGroup = false, showInfo = false, customTitle = null, isGrayscale = false, scale = 1, classNames = [], style = {}, children = null, ...rest } = props; + const [ imageElement, setImageElement ] = useState(null); + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ 'relative w-[40px] h-[40px] bg-no-repeat bg-center z-50' ]; + + if(isGroup) newClassNames.push('group-badge'); + + if(isGrayscale) newClassNames.push('grayscale'); + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ classNames, isGroup, isGrayscale ]); + + + const getStyle = useMemo(() => + { + let newStyle: CSSProperties = {}; + + if(imageElement) + { + newStyle.backgroundImage = `url(${ (isGroup) ? imageElement.src : GetConfigurationValue('badge.asset.url').replace('%badgename%', badgeCode.toString()) })`; + newStyle.width = imageElement.width; + newStyle.height = imageElement.height; + newStyle.zIndex = 50; + newStyle.position = 'relative'; + + if(scale !== 1) + { + newStyle.transform = `scale(${ scale })`; + + if(!(scale % 1)) newStyle.imageRendering = 'pixelated'; + + newStyle.width = (imageElement.width * scale); + newStyle.height = (imageElement.height * scale); + } + } + + if(Object.keys(style).length) newStyle = { ...newStyle, ...style }; + + return newStyle; + }, [ badgeCode, isGroup, imageElement, scale, style ]); + + useEffect(() => + { + if(!badgeCode || !badgeCode.length) return; + + let didSetBadge = false; + + const onBadgeImageReadyEvent = async (event: BadgeImageReadyEvent) => + { + if(event.badgeId !== badgeCode) return; + + const element = await TextureUtils.generateImage(new NitroSprite(event.image)); + + console.log ('boe'); + + element.onload = () => setImageElement(element); + + didSetBadge = true; + + GetEventDispatcher().removeEventListener(BadgeImageReadyEvent.IMAGE_READY, onBadgeImageReadyEvent); + }; + + GetEventDispatcher().addEventListener(BadgeImageReadyEvent.IMAGE_READY, onBadgeImageReadyEvent); + + const texture = isGroup ? GetSessionDataManager().getGroupBadgeImage(badgeCode) : GetSessionDataManager().getBadgeImage(badgeCode); + + if(texture && !didSetBadge) + { + (async () => + { + const element = await TextureUtils.generateImage(new NitroSprite(texture)); + + + element.onload = () => setImageElement(element); + })(); + } + + return () => GetEventDispatcher().removeEventListener(BadgeImageReadyEvent.IMAGE_READY, onBadgeImageReadyEvent); + }, [ badgeCode, isGroup ]); + + return ( + + { (showInfo && GetConfigurationValue('badge.descriptions.enabled', true)) && + +
{ isGroup ? customTitle : LocalizeBadgeName(badgeCode) }
+
{ isGroup ? LocalizeText('group.badgepopup.body') : LocalizeBadgeDescription(badgeCode) }
+ } + { children } + + ); +}; diff --git a/Coolui v3 test/src/common/layout/LayoutCounterTimeView.tsx b/Coolui v3 test/src/common/layout/LayoutCounterTimeView.tsx new file mode 100644 index 0000000000..9b370954c9 --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutCounterTimeView.tsx @@ -0,0 +1,42 @@ +import { FC, useMemo } from 'react'; +import { LocalizeText } from '../../api'; +import { Base, BaseProps } from '../Base'; + +interface LayoutCounterTimeViewProps extends BaseProps +{ + day: string; + hour: string; + minutes: string; + seconds: string; +} + +export const LayoutCounterTimeView: FC = props => +{ + const { day = '00', hour = '00', minutes = '00', seconds = '00', classNames = [], children = null, ...rest } = props; + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ 'nitro-counter-time' ]; + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ classNames ]); + + return ( +
+ +
{ day != '00' ? day : hour }{ day != '00' ? LocalizeText('countdown_clock_unit_days') : LocalizeText('countdown_clock_unit_hours') }
+ +
:
+ +
{ minutes }{ LocalizeText('countdown_clock_unit_minutes') }
+ + : + +
{ seconds }{ LocalizeText('countdown_clock_unit_seconds') }
+ + { children } +
+ ); +}; diff --git a/Coolui v3 test/src/common/layout/LayoutCurrencyIcon.tsx b/Coolui v3 test/src/common/layout/LayoutCurrencyIcon.tsx new file mode 100644 index 0000000000..f311c22047 --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutCurrencyIcon.tsx @@ -0,0 +1,44 @@ +import { CSSProperties, FC, useMemo } from 'react'; +import { GetConfigurationValue } from '../../api'; +import { Base, BaseProps } from '../Base'; + +export interface CurrencyIconProps extends BaseProps +{ + type: number | string; +} + +export const LayoutCurrencyIcon: FC = props => +{ + const { type = '', classNames = [], style = {}, ...rest } = props; + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ 'nitro-currency-icon', 'bg-center bg-no-repeat w-[15px] h-[15px]' ]; + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ classNames ]); + + const urlString = useMemo(() => + { + let url = GetConfigurationValue('currency.asset.icon.url', ''); + + url = url.replace('%type%', type.toString()); + + return `url(${ url })`; + }, [ type ]); + + const getStyle = useMemo(() => + { + let newStyle: CSSProperties = {}; + + newStyle.backgroundImage = urlString; + + if(Object.keys(style).length) newStyle = { ...newStyle, ...style }; + + return newStyle; + }, [ style, urlString ]); + + return ; +}; diff --git a/Coolui v3 test/src/common/layout/LayoutFurniIconImageView.tsx b/Coolui v3 test/src/common/layout/LayoutFurniIconImageView.tsx new file mode 100644 index 0000000000..b7eaeff7c4 --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutFurniIconImageView.tsx @@ -0,0 +1,17 @@ +import { FC } from 'react'; +import { GetImageIconUrlForProduct } from '../../api'; +import { LayoutImage, LayoutImageProps } from './LayoutImage'; + +interface LayoutFurniIconImageViewProps extends LayoutImageProps +{ + productType: string; + productClassId: number; + extraData?: string; +} + +export const LayoutFurniIconImageView: FC = props => +{ + const { productType = 's', productClassId = -1, extraData = '', ...rest } = props; + + return ; +}; diff --git a/Coolui v3 test/src/common/layout/LayoutFurniImageView.tsx b/Coolui v3 test/src/common/layout/LayoutFurniImageView.tsx new file mode 100644 index 0000000000..b83d81151c --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutFurniImageView.tsx @@ -0,0 +1,70 @@ +import { GetRoomEngine, IGetImageListener, ImageResult, TextureUtils, Vector3d } from '@nitrots/nitro-renderer'; +import { CSSProperties, FC, useEffect, useMemo, useState } from 'react'; +import { ProductTypeEnum } from '../../api'; +import { Base, BaseProps } from '../Base'; + +interface LayoutFurniImageViewProps extends BaseProps +{ + productType: string; + productClassId: number; + direction?: number; + extraData?: string; + scale?: number; +} + +export const LayoutFurniImageView: FC = props => +{ + const { productType = 's', productClassId = -1, direction = 2, extraData = '', scale = 1, style = {}, ...rest } = props; + const [ imageElement, setImageElement ] = useState(null); + + const getStyle = useMemo(() => + { + let newStyle: CSSProperties = {}; + + if(imageElement?.src?.length) + { + newStyle.backgroundImage = `url('${ imageElement.src }')`; + newStyle.width = imageElement.width; + newStyle.height = imageElement.height; + } + + if(scale !== 1) + { + newStyle.transform = `scale(${ scale })`; + + if(!(scale % 1)) newStyle.imageRendering = 'pixelated'; + } + + if(Object.keys(style).length) newStyle = { ...newStyle, ...style }; + + return newStyle; + }, [ imageElement, scale, style ]); + + useEffect(() => + { + let imageResult: ImageResult = null; + + const listener: IGetImageListener = { + imageReady: async (id, texture, image) => setImageElement(await TextureUtils.generateImage(texture)), + imageFailed: null + }; + + switch(productType.toLocaleLowerCase()) + { + case ProductTypeEnum.FLOOR: + imageResult = GetRoomEngine().getFurnitureFloorImage(productClassId, new Vector3d(direction), 64, listener, 0, extraData); + break; + case ProductTypeEnum.WALL: + imageResult = GetRoomEngine().getFurnitureWallImage(productClassId, new Vector3d(direction), 64, listener, 0, extraData); + break; + } + + if(!imageResult) return; + + (async () => setImageElement(await TextureUtils.generateImage(imageResult.data)))(); + }, [ productType, productClassId, direction, extraData ]); + + if(!imageElement) return null; + + return ; +}; diff --git a/Coolui v3 test/src/common/layout/LayoutGiftTagView.tsx b/Coolui v3 test/src/common/layout/LayoutGiftTagView.tsx new file mode 100644 index 0000000000..75004ec42f --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutGiftTagView.tsx @@ -0,0 +1,41 @@ +import { FC } from 'react'; +import { LocalizeText } from '../../api'; +import { Column } from '../Column'; +import { Flex } from '../Flex'; +import { Text } from '../Text'; +import { LayoutAvatarImageView } from './LayoutAvatarImageView'; + +interface LayoutGiftTagViewProps +{ + figure?: string; + userName?: string; + message?: string; + editable?: boolean; + onChange?: (value: string) => void; +} + +export const LayoutGiftTagView: FC = props => +{ + const { figure = null, userName = null, message = null, editable = false, onChange = null } = props; + + return ( + +
+ { !userName &&
} + { figure &&
+ +
} +
+ + + { !editable && + { message } } + { editable && (onChange !== null) && + } + { userName && + { LocalizeText('catalog.gift_wrapping_new.message_from', [ 'name' ], [ userName ]) } } + + +
+ ); +}; diff --git a/Coolui v3 test/src/common/layout/LayoutGridItem.tsx b/Coolui v3 test/src/common/layout/LayoutGridItem.tsx new file mode 100644 index 0000000000..5bf73eae58 --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutGridItem.tsx @@ -0,0 +1,76 @@ +import { FC, useMemo } from 'react'; +import { Base } from '../Base'; +import { Column, ColumnProps } from '../Column'; +import { LayoutItemCountView } from './LayoutItemCountView'; +import { LayoutLimitedEditionStyledNumberView } from './limited-edition'; + +export interface LayoutGridItemProps extends ColumnProps +{ + itemImage?: string; + itemColor?: string; + itemActive?: boolean; + itemCount?: number; + itemCountMinimum?: number; + itemUniqueSoldout?: boolean; + itemUniqueNumber?: number; + itemUnseen?: boolean; + itemHighlight?: boolean; + disabled?: boolean; +} + +export const LayoutGridItem: FC = props => +{ + const { itemImage = undefined, itemColor = undefined, itemActive = false, itemCount = 1, itemCountMinimum = 1, itemUniqueSoldout = false, itemUniqueNumber = -2, itemUnseen = false, itemHighlight = false, disabled = false, center = true, column = true, style = {}, classNames = [], position = 'relative', overflow = 'hidden', children = null, ...rest } = props; + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ 'layout-grid-item', 'border', 'border-2', 'border-muted', 'rounded' ]; + + + if(itemActive) newClassNames.push('!bg-[#ececec] !border-[#fff]'); + + if(itemUniqueSoldout || (itemUniqueNumber > 0)) newClassNames.push('unique-item'); + + if(itemUniqueSoldout) newClassNames.push('sold-out'); + + if(itemUnseen) newClassNames.push('unseen'); + + if(itemHighlight) newClassNames.push('has-highlight'); + + if(disabled) newClassNames.push('disabled'); + + if(itemImage === null) newClassNames.push('icon', 'loading-icon'); + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ itemActive, itemUniqueSoldout, itemUniqueNumber, itemUnseen, itemHighlight, disabled, itemImage, classNames ]); + + const getStyle = useMemo(() => + { + let newStyle = { ...style }; + + if(itemImage && !(itemUniqueSoldout || (itemUniqueNumber > 0))) newStyle.backgroundImage = `url(${ itemImage })`; + + if(itemColor) newStyle.backgroundColor = itemColor; + + if(Object.keys(style).length) newStyle = { ...newStyle, ...style }; + + return newStyle; + }, [ style, itemImage, itemColor, itemUniqueSoldout, itemUniqueNumber ]); + + return ( + + { (itemCount > itemCountMinimum) && + } + { (itemUniqueNumber > 0) && + <> + +
+ +
+ } + { children } +
+ ); +}; diff --git a/Coolui v3 test/src/common/layout/LayoutImage.tsx b/Coolui v3 test/src/common/layout/LayoutImage.tsx new file mode 100644 index 0000000000..f3db3bdc6d --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutImage.tsx @@ -0,0 +1,13 @@ +import { DetailedHTMLProps, FC, HTMLAttributes } from 'react'; + +export interface LayoutImageProps extends DetailedHTMLProps, HTMLImageElement> +{ + imageUrl?: string; +} + +export const LayoutImage: FC = props => +{ + const { imageUrl = null, className = '', ...rest } = props; + + return ; +}; diff --git a/Coolui v3 test/src/common/layout/LayoutItemCountView.tsx b/Coolui v3 test/src/common/layout/LayoutItemCountView.tsx new file mode 100644 index 0000000000..5b14ed54ba --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutItemCountView.tsx @@ -0,0 +1,28 @@ +import { FC, useMemo } from 'react'; +import { Base, BaseProps } from '../Base'; + +interface LayoutItemCountViewProps extends BaseProps +{ + count: number; +} + +export const LayoutItemCountView: FC = props => +{ + const { count = 0, position = 'absolute', classNames = [], children = null, ...rest } = props; + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ 'inline-block px-[.65em] py-[.35em] text-[.75em] font-bold leading-none text-[#fff] text-center whitespace-nowrap align-baseline rounded-[.25rem]', '!border-[1px] !border-[solid] !border-[#283F5D]', 'border-black', 'bg-danger', 'px-1', 'top-[2px] right-[2px] text-[9.5px] px-[3px] py-[2px] ' ]; + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ classNames ]); + + return ( + + { count } + { children } + + ); +}; diff --git a/Coolui v3 test/src/common/layout/LayoutLoadingSpinnerView.tsx b/Coolui v3 test/src/common/layout/LayoutLoadingSpinnerView.tsx new file mode 100644 index 0000000000..1d2641f679 --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutLoadingSpinnerView.tsx @@ -0,0 +1,15 @@ +import { FC } from 'react'; +import { Base, BaseProps } from '../Base'; + +export const LayoutLoadingSpinnerView: FC> = props => +{ + const { ...rest } = props; + + return ( + + + + + + ); +}; diff --git a/Coolui v3 test/src/common/layout/LayoutMiniCameraView.tsx b/Coolui v3 test/src/common/layout/LayoutMiniCameraView.tsx new file mode 100644 index 0000000000..70962bbf93 --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutMiniCameraView.tsx @@ -0,0 +1,73 @@ +import { GetRoomEngine, NitroRectangle, NitroTexture } from '@nitrots/nitro-renderer'; +import { FC, useRef } from 'react'; +import { LocalizeText, PlaySound, SoundNames } from '../../api'; +import { DraggableWindow } from '../draggable-window'; + +interface LayoutMiniCameraViewProps { + roomId: number; + textureReceiver: (texture: NitroTexture) => Promise; + onClose: () => void; +} + +export const LayoutMiniCameraView: FC = props => { + const { roomId = -1, textureReceiver = null, onClose = null } = props; + const elementRef = useRef(); + + const getCameraBounds = () => { + 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 = () => { + PlaySound(SoundNames.CAMERA_SHUTTER); + textureReceiver(GetRoomEngine().createTextureFromRoom(roomId, 1, getCameraBounds())); + }; + + return ( + +
+
+
+
+ + +
+
+
+ + ); +}; \ No newline at end of file diff --git a/Coolui v3 test/src/common/layout/LayoutNotificationAlertView.tsx b/Coolui v3 test/src/common/layout/LayoutNotificationAlertView.tsx new file mode 100644 index 0000000000..b1cdf53576 --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutNotificationAlertView.tsx @@ -0,0 +1,35 @@ +import { FC, useMemo } from 'react'; +import { NotificationAlertType } from '../../api'; +import { NitroCardContentView, NitroCardHeaderView, NitroCardView, NitroCardViewProps } from '../card'; + +export interface LayoutNotificationAlertViewProps extends NitroCardViewProps +{ + title?: string; + type?: string; + onClose: () => void; +} + +export const LayoutNotificationAlertView: FC = props => +{ + const { title = '', onClose = null, classNames = [], children = null,type = NotificationAlertType.DEFAULT, ...rest } = props; + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ 'nitro-alert' ]; + + newClassNames.push('nitro-alert-' + type); + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ classNames, type ]); + + return ( + + + + { children } + + + ); +}; diff --git a/Coolui v3 test/src/common/layout/LayoutNotificationBubbleView.tsx b/Coolui v3 test/src/common/layout/LayoutNotificationBubbleView.tsx new file mode 100644 index 0000000000..0b62a84bb9 --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutNotificationBubbleView.tsx @@ -0,0 +1,58 @@ +import { AnimatePresence, motion } from 'framer-motion'; +import { FC, useEffect, useMemo, useState } from 'react'; +import { Flex, FlexProps } from '../Flex'; + +export interface LayoutNotificationBubbleViewProps extends FlexProps +{ + fadesOut?: boolean; + timeoutMs?: number; + onClose: () => void; +} + +export const LayoutNotificationBubbleView: FC = props => +{ + const { fadesOut = true, timeoutMs = 8000, onClose = null, overflow = 'hidden', classNames = [], ...rest } = props; + const [ isVisible, setIsVisible ] = useState(false); + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ 'text-sm bg-[#1c1c20f2] px-[5px] py-[6px] [box-shadow:inset_0_5px_#22222799,_inset_0_-4px_#12121599] ', 'rounded' ]; + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ classNames ]); + + useEffect(() => + { + setIsVisible(true); + + return () => setIsVisible(false); + }, []); + + useEffect(() => + { + if(!fadesOut) return; + + const timeout = setTimeout(() => + { + setIsVisible(false); + + setTimeout(() => onClose(), 300); + }, timeoutMs); + + return () => clearTimeout(timeout); + }, [ fadesOut, timeoutMs, onClose ]); + + return ( + + { isVisible && + + + } + + ); +}; diff --git a/Coolui v3 test/src/common/layout/LayoutPetImageView.tsx b/Coolui v3 test/src/common/layout/LayoutPetImageView.tsx new file mode 100644 index 0000000000..acf1a7990a --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutPetImageView.tsx @@ -0,0 +1,123 @@ +import { GetRoomEngine, IPetCustomPart, PetFigureData, TextureUtils, Vector3d } from '@nitrots/nitro-renderer'; +import { CSSProperties, FC, useEffect, useMemo, useRef, useState } from 'react'; +import { Base, BaseProps } from '../Base'; + +interface LayoutPetImageViewProps extends BaseProps +{ + figure?: string; + typeId?: number; + paletteId?: number; + petColor?: number; + customParts?: IPetCustomPart[]; + posture?: string; + headOnly?: boolean; + direction?: number; + scale?: number; +} + +export const LayoutPetImageView: FC = props => +{ + const { figure = '', typeId = -1, paletteId = -1, petColor = 0xFFFFFF, customParts = [], posture = 'std', headOnly = false, direction = 0, scale = 1, style = {}, ...rest } = props; + const [ petUrl, setPetUrl ] = useState(null); + const [ width, setWidth ] = useState(0); + const [ height, setHeight ] = useState(0); + const isDisposed = useRef(false); + + const getStyle = useMemo(() => + { + let newStyle: CSSProperties = {}; + + if(petUrl && petUrl.length) newStyle.backgroundImage = `url(${ petUrl })`; + + if(scale !== 1) + { + newStyle.transform = `scale(${ scale })`; + + if(!(scale % 1)) newStyle.imageRendering = 'pixelated'; + } + + newStyle.width = width; + newStyle.height = height; + + if(Object.keys(style).length) newStyle = { ...newStyle, ...style }; + + return newStyle; + }, [ petUrl, scale, style, width, height ]); + + useEffect(() => + { + let url = null; + + let petTypeId = typeId; + let petPaletteId = paletteId; + let petColor1 = petColor; + let petCustomParts: IPetCustomPart[] = customParts; + let petHeadOnly = headOnly; + + if(figure && figure.length) + { + const petFigureData = new PetFigureData(figure); + + petTypeId = petFigureData.typeId; + petPaletteId = petFigureData.paletteId; + petColor1 = petFigureData.color; + petCustomParts = petFigureData.customParts; + } + + if(petTypeId === 16) petHeadOnly = false; + + const imageResult = GetRoomEngine().getRoomObjectPetImage(petTypeId, petPaletteId, petColor1, new Vector3d((direction * 45)), 64, { + imageReady: async (id, texture, image) => + { + if(isDisposed.current) return; + + if(image) + { + setPetUrl(image.src); + setWidth(image.width); + setHeight(image.height); + } + + else if(texture) + { + setPetUrl(await TextureUtils.generateImageUrl(texture)); + setWidth(texture.width); + setHeight(texture.height); + } + }, + imageFailed: (id) => + { + + } + }, petHeadOnly, 0, petCustomParts, posture); + + if(imageResult) + { + (async () => + { + const image = await imageResult.getImage(); + + if(image) + { + setPetUrl(image.src); + setWidth(image.width); + setHeight(image.height); + } + })(); + } + }, [ figure, typeId, paletteId, petColor, customParts, posture, headOnly, direction ]); + + useEffect(() => + { + isDisposed.current = false; + + return () => + { + isDisposed.current = true; + }; + }, []); + + const url = `url('${ petUrl }')`; + + return ; +}; diff --git a/Coolui v3 test/src/common/layout/LayoutPrizeProductImageView.tsx b/Coolui v3 test/src/common/layout/LayoutPrizeProductImageView.tsx new file mode 100644 index 0000000000..a83861e8f4 --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutPrizeProductImageView.tsx @@ -0,0 +1,30 @@ +import { FC } from 'react'; +import { ProductTypeEnum } from '../../api'; +import { LayoutBadgeImageView } from './LayoutBadgeImageView'; +import { LayoutCurrencyIcon } from './LayoutCurrencyIcon'; +import { LayoutFurniImageView } from './LayoutFurniImageView'; + +interface LayoutPrizeProductImageViewProps +{ + productType: string; + classId: number; + extraParam?: string; +} + +export const LayoutPrizeProductImageView: FC = props => +{ + const { productType = ProductTypeEnum.FLOOR, classId = -1, extraParam = undefined } = props; + + switch(productType) + { + case ProductTypeEnum.WALL: + case ProductTypeEnum.FLOOR: + return ; + case ProductTypeEnum.BADGE: + return ; + case ProductTypeEnum.HABBO_CLUB: + return ; + } + + return null; +}; diff --git a/Coolui v3 test/src/common/layout/LayoutProgressBar.tsx b/Coolui v3 test/src/common/layout/LayoutProgressBar.tsx new file mode 100644 index 0000000000..dbbd8f939b --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutProgressBar.tsx @@ -0,0 +1,32 @@ +import { FC, useMemo } from 'react'; +import { Base, Column, ColumnProps, Flex } from '..'; + +interface LayoutProgressBarProps extends ColumnProps +{ + text?: string; + progress: number; + maxProgress?: number; +} + +export const LayoutProgressBar: FC = props => +{ + const { text = '', progress = 0, maxProgress = 100, position = 'relative', justifyContent = 'center', classNames = [], children = null, ...rest } = props; + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ 'border-[1px] border-[solid] border-[#fff] p-[2px] h-[20px] rounded-[.25rem] overflow-hidden bg-[#1E7295] ', 'text-white' ]; + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ classNames ]); + + return ( + + { text && (text.length > 0) && + { text } } + + { children } + + ); +}; diff --git a/Coolui v3 test/src/common/layout/LayoutRarityLevelView.tsx b/Coolui v3 test/src/common/layout/LayoutRarityLevelView.tsx new file mode 100644 index 0000000000..f6711aae7c --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutRarityLevelView.tsx @@ -0,0 +1,28 @@ +import { FC, useMemo } from 'react'; +import { Base, BaseProps } from '../Base'; + +interface LayoutRarityLevelViewProps extends BaseProps +{ + level: number; +} + +export const LayoutRarityLevelView: FC = props => +{ + const { level = 0, classNames = [], children = null, ...rest } = props; + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ 'nitro-rarity-level' ]; + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ classNames ]); + + return ( + +
{ level }
+ { children } + + ); +}; diff --git a/Coolui v3 test/src/common/layout/LayoutRoomObjectImageView.tsx b/Coolui v3 test/src/common/layout/LayoutRoomObjectImageView.tsx new file mode 100644 index 0000000000..01328afae9 --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutRoomObjectImageView.tsx @@ -0,0 +1,59 @@ +import { GetRoomEngine, TextureUtils, Vector3d } from '@nitrots/nitro-renderer'; +import { CSSProperties, FC, useEffect, useMemo, useState } from 'react'; +import { Base, BaseProps } from '../Base'; + +interface LayoutRoomObjectImageViewProps extends BaseProps +{ + roomId: number; + objectId: number; + category: number; + direction?: number; + scale?: number; +} + +export const LayoutRoomObjectImageView: FC = props => +{ + const { roomId = -1, objectId = 1, category = -1, direction = 2, scale = 1, style = {}, ...rest } = props; + const [ imageElement, setImageElement ] = useState(null); + + const getStyle = useMemo(() => + { + let newStyle: CSSProperties = {}; + + if(imageElement?.src?.length) + { + newStyle.backgroundImage = `url('${ imageElement.src }')`; + newStyle.width = imageElement.width; + newStyle.height = imageElement.height; + } + + if(scale !== 1) + { + newStyle.transform = `scale(${ scale })`; + + if(!(scale % 1)) newStyle.imageRendering = 'pixelated'; + } + + if(Object.keys(style).length) newStyle = { ...newStyle, ...style }; + + return newStyle; + }, [ imageElement, scale, style ]); + + useEffect(() => + { + const imageResult = GetRoomEngine().getRoomObjectImage(roomId, objectId, category, new Vector3d(direction * 45), 64, { + imageReady: async (id, texture, image) => setImageElement(await TextureUtils.generateImage(texture)), + imageFailed: null + }); + + // needs (roomObjectImage.data.width > 140) || (roomObjectImage.data.height > 200) scale 1 + + if(!imageResult) return; + + (async () => setImageElement(await TextureUtils.generateImage(imageResult.data)))(); + }, [ roomId, objectId, category, direction, scale ]); + + if(!imageElement) return null; + + return ; +}; diff --git a/Coolui v3 test/src/common/layout/LayoutRoomPreviewerView.tsx b/Coolui v3 test/src/common/layout/LayoutRoomPreviewerView.tsx new file mode 100644 index 0000000000..daceeef08f --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutRoomPreviewerView.tsx @@ -0,0 +1,89 @@ +import { GetRenderer, GetTicker, NitroTicker, RoomPreviewer, TextureUtils } from '@nitrots/nitro-renderer'; +import { FC, MouseEvent, useEffect, useRef } from 'react'; + +export const LayoutRoomPreviewerView: FC<{ + roomPreviewer: RoomPreviewer; + height?: number; +}> = props => +{ + const { roomPreviewer = null, height = 0 } = props; + const elementRef = useRef(); + + const onClick = (event: MouseEvent) => + { + if(!roomPreviewer) return; + + if(event.shiftKey) roomPreviewer.changeRoomObjectDirection(); + else roomPreviewer.changeRoomObjectState(); + }; + + useEffect(() => + { + if(!elementRef) return; + + const width = elementRef.current.parentElement.clientWidth; + const texture = TextureUtils.createRenderTexture(width, height); + + const update = async (ticker: NitroTicker) => + { + if(!roomPreviewer || !elementRef.current) return; + + roomPreviewer.updatePreviewRoomView(); + + const renderingCanvas = roomPreviewer.getRenderingCanvas(); + + if(!renderingCanvas.canvasUpdated) return; + + GetRenderer().render({ + target: texture, + container: renderingCanvas.master, + clear: true + }); + + let canvas = GetRenderer().texture.generateCanvas(texture); + const base64 = canvas.toDataURL('image/png'); + + canvas = null; + + elementRef.current.style.backgroundImage = `url(${ base64 })`; + }; + + GetTicker().add(update); + + const resizeObserver = new ResizeObserver(() => + { + if(!roomPreviewer || !elementRef.current) return; + + const width = elementRef.current.parentElement.offsetWidth; + + roomPreviewer.modifyRoomCanvas(width, height); + + update(GetTicker()); + }); + + roomPreviewer.getRoomCanvas(width, height); + + resizeObserver.observe(elementRef.current); + + return () => + { + GetTicker().remove(update); + + resizeObserver.disconnect(); + + texture.destroy(true); + }; + }, [ roomPreviewer, elementRef, height ]); + + return ( +
+ ); +}; diff --git a/Coolui v3 test/src/common/layout/LayoutRoomThumbnailView.tsx b/Coolui v3 test/src/common/layout/LayoutRoomThumbnailView.tsx new file mode 100644 index 0000000000..d6626ff9ea --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutRoomThumbnailView.tsx @@ -0,0 +1,37 @@ +import { FC, useMemo } from 'react'; +import { GetConfigurationValue } from '../../api'; +import { Base, BaseProps } from '../Base'; + +export interface LayoutRoomThumbnailViewProps extends BaseProps +{ + roomId?: number; + customUrl?: string; +} + +export const LayoutRoomThumbnailView: FC = props => +{ + const { roomId = -1, customUrl = null, shrink = true, overflow = 'hidden', classNames = [], children = null, ...rest } = props; + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ 'relative w-[110px] h-[110px] bg-[url("@/assets/images/navigator/thumbnail_placeholder.png")] bg-no-repeat bg-center', 'rounded', '!border-[1px] !border-[solid] !border-[#283F5D]' ]; + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ classNames ]); + + const getImageUrl = useMemo(() => + { + if(customUrl && customUrl.length) return (GetConfigurationValue('image.library.url') + customUrl); + + return (GetConfigurationValue('thumbnails.url').replace('%thumbnail%', roomId.toString())); + }, [ customUrl, roomId ]); + + return ( + + { getImageUrl && } + { children } + + ); +}; diff --git a/Coolui v3 test/src/common/layout/LayoutTrophyView.tsx b/Coolui v3 test/src/common/layout/LayoutTrophyView.tsx new file mode 100644 index 0000000000..dd2c284f56 --- /dev/null +++ b/Coolui v3 test/src/common/layout/LayoutTrophyView.tsx @@ -0,0 +1,42 @@ +import { FC } from 'react'; +import { LocalizeText } from '../../api'; +import { Base } from '../Base'; +import { Column } from '../Column'; +import { Flex } from '../Flex'; +import { Text } from '../Text'; +import { DraggableWindow } from '../draggable-window'; + +interface LayoutTrophyViewProps +{ + color: string; + message: string; + date: string; + senderName: string; + customTitle?: string; + onCloseClick: () => void; +} + +export const LayoutTrophyView: FC = props => +{ + const { color = '', message = '', date = '', senderName = '', customTitle = null, onCloseClick = null } = props; + + return ( + + + + + { LocalizeText('widget.furni.trophy.title') } + + + { customTitle && + { customTitle } } + { message } + + + { date } + { senderName } + + + + ); +}; diff --git a/Coolui v3 test/src/common/layout/UserProfileIconView.tsx b/Coolui v3 test/src/common/layout/UserProfileIconView.tsx new file mode 100644 index 0000000000..8898c7065b --- /dev/null +++ b/Coolui v3 test/src/common/layout/UserProfileIconView.tsx @@ -0,0 +1,29 @@ +import { FC, useMemo } from 'react'; +import { GetUserProfile } from '../../api'; +import { Base, BaseProps } from '../Base'; + +export interface UserProfileIconViewProps extends BaseProps +{ + userId?: number; + userName?: string; +} + +export const UserProfileIconView: FC = props => +{ + const { userId = 0, userName = null, classNames = [], pointer = true, children = null, ...rest } = props; + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ 'bg-[url("@/assets/images/friends/friends-spritesheet.png")]', 'w-[13px] h-[11px] bg-[-51px_-91px]' ]; + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ classNames ]); + + return ( + GetUserProfile(userId) } { ...rest }> + { children } + + ); +}; diff --git a/Coolui v3 test/src/common/layout/index.ts b/Coolui v3 test/src/common/layout/index.ts new file mode 100644 index 0000000000..cbb056854a --- /dev/null +++ b/Coolui v3 test/src/common/layout/index.ts @@ -0,0 +1,24 @@ +export * from './LayoutAvatarImageView'; +export * from './LayoutBackgroundImage'; +export * from './LayoutBadgeImageView'; +export * from './LayoutCounterTimeView'; +export * from './LayoutCurrencyIcon'; +export * from './LayoutFurniIconImageView'; +export * from './LayoutFurniImageView'; +export * from './LayoutGiftTagView'; +export * from './LayoutGridItem'; +export * from './LayoutImage'; +export * from './LayoutItemCountView'; +export * from './LayoutLoadingSpinnerView'; +export * from './LayoutMiniCameraView'; +export * from './LayoutNotificationAlertView'; +export * from './LayoutNotificationBubbleView'; +export * from './LayoutPetImageView'; +export * from './LayoutProgressBar'; +export * from './LayoutRarityLevelView'; +export * from './LayoutRoomObjectImageView'; +export * from './LayoutRoomPreviewerView'; +export * from './LayoutRoomThumbnailView'; +export * from './LayoutTrophyView'; +export * from './UserProfileIconView'; +export * from './limited-edition'; diff --git a/Coolui v3 test/src/common/layout/limited-edition/LayoutLimitedEditionCompactPlateView.tsx b/Coolui v3 test/src/common/layout/limited-edition/LayoutLimitedEditionCompactPlateView.tsx new file mode 100644 index 0000000000..86fc9772a7 --- /dev/null +++ b/Coolui v3 test/src/common/layout/limited-edition/LayoutLimitedEditionCompactPlateView.tsx @@ -0,0 +1,35 @@ +import { FC, useMemo } from 'react'; +import { Base, BaseProps } from '../../Base'; +import { LayoutLimitedEditionStyledNumberView } from './LayoutLimitedEditionStyledNumberView'; + +interface LayoutLimitedEditionCompactPlateViewProps extends BaseProps +{ + uniqueNumber: number; + uniqueSeries: number; +} + +export const LayoutLimitedEditionCompactPlateView: FC = props => +{ + const { uniqueNumber = 0, uniqueSeries = 0, classNames = [], children = null, ...rest } = props; + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ 'unique-compact-plate', 'z-index-1' ]; + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ classNames ]); + + return ( + +
+ +
+
+ +
+ { children } + + ); +}; diff --git a/Coolui v3 test/src/common/layout/limited-edition/LayoutLimitedEditionCompletePlateView.tsx b/Coolui v3 test/src/common/layout/limited-edition/LayoutLimitedEditionCompletePlateView.tsx new file mode 100644 index 0000000000..5bcf776fac --- /dev/null +++ b/Coolui v3 test/src/common/layout/limited-edition/LayoutLimitedEditionCompletePlateView.tsx @@ -0,0 +1,40 @@ +import { FC, useMemo } from 'react'; +import { LocalizeText } from '../../../api'; +import { Base, BaseProps } from '../../Base'; +import { Column } from '../../Column'; +import { LayoutLimitedEditionStyledNumberView } from './LayoutLimitedEditionStyledNumberView'; + +interface LayoutLimitedEditionCompletePlateViewProps extends BaseProps +{ + uniqueLimitedItemsLeft: number; + uniqueLimitedSeriesSize: number; +} + +export const LayoutLimitedEditionCompletePlateView: FC = props => +{ + const { uniqueLimitedItemsLeft = 0, uniqueLimitedSeriesSize = 0, classNames = [], ...rest } = props; + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ 'unique-complete-plate' ]; + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ classNames ]); + + return ( + + +
+ { LocalizeText('unique.items.left') } +
+
+
+ { LocalizeText('unique.items.number.sold') } +
+
+
+ + ); +}; diff --git a/Coolui v3 test/src/common/layout/limited-edition/LayoutLimitedEditionStyledNumberView.tsx b/Coolui v3 test/src/common/layout/limited-edition/LayoutLimitedEditionStyledNumberView.tsx new file mode 100644 index 0000000000..992ad09dbd --- /dev/null +++ b/Coolui v3 test/src/common/layout/limited-edition/LayoutLimitedEditionStyledNumberView.tsx @@ -0,0 +1,18 @@ +import { FC } from 'react'; + +interface LayoutLimitedEditionStyledNumberViewProps +{ + value: number; +} + +export const LayoutLimitedEditionStyledNumberView: FC = props => +{ + const { value = 0 } = props; + const numbers = value.toString().split(''); + + return ( + <> + { numbers.map((number, index) => ) } + + ); +}; diff --git a/Coolui v3 test/src/common/layout/limited-edition/index.ts b/Coolui v3 test/src/common/layout/limited-edition/index.ts new file mode 100644 index 0000000000..ee41cf9f96 --- /dev/null +++ b/Coolui v3 test/src/common/layout/limited-edition/index.ts @@ -0,0 +1,3 @@ +export * from './LayoutLimitedEditionCompactPlateView'; +export * from './LayoutLimitedEditionCompletePlateView'; +export * from './LayoutLimitedEditionStyledNumberView'; diff --git a/Coolui v3 test/src/common/transitions/TransitionAnimation.tsx b/Coolui v3 test/src/common/transitions/TransitionAnimation.tsx new file mode 100644 index 0000000000..8e3484970b --- /dev/null +++ b/Coolui v3 test/src/common/transitions/TransitionAnimation.tsx @@ -0,0 +1,52 @@ +import { FC, ReactNode, useEffect, useState } from 'react'; +import { Transition } from 'react-transition-group'; +import { getTransitionAnimationStyle } from './TransitionAnimationStyles'; + +interface TransitionAnimationProps +{ + type: string; + inProp: boolean; + timeout?: number; + className?: string; + children?: ReactNode; +} + +export const TransitionAnimation: FC = props => +{ + const { type = null, inProp = false, timeout = 300, className = null, children = null } = props; + + const [ isChildrenVisible, setChildrenVisible ] = useState(false); + + useEffect(() => + { + let timeoutData: ReturnType = null; + + if(inProp) + { + setChildrenVisible(true); + } + else + { + timeoutData = setTimeout(() => + { + setChildrenVisible(false); + clearTimeout(timeout); + }, timeout); + } + + return () => + { + if(timeoutData) clearTimeout(timeoutData); + }; + }, [ inProp, timeout ]); + + return ( + + { state => ( +
+ { isChildrenVisible && children } +
+ ) } +
+ ); +}; diff --git a/Coolui v3 test/src/common/transitions/TransitionAnimationStyles.ts b/Coolui v3 test/src/common/transitions/TransitionAnimationStyles.ts new file mode 100644 index 0000000000..feebdccad1 --- /dev/null +++ b/Coolui v3 test/src/common/transitions/TransitionAnimationStyles.ts @@ -0,0 +1,136 @@ +import { CSSProperties } from 'react'; +import { TransitionStatus } from 'react-transition-group'; +import { ENTERING, EXITING } from 'react-transition-group/Transition'; +import { TransitionAnimationTypes } from './TransitionAnimationTypes'; + +export function getTransitionAnimationStyle(type: string, transition: TransitionStatus, timeout: number = 300): Partial +{ + switch(type) + { + case TransitionAnimationTypes.BOUNCE: + switch(transition) + { + default: + return {}; + case ENTERING: + return { + animationName: 'bounceIn', + animationDuration: `${ timeout }ms` + }; + case EXITING: + return { + animationName: 'bounceOut', + animationDuration: `${ timeout }ms` + }; + } + case TransitionAnimationTypes.SLIDE_LEFT: + switch(transition) + { + default: + return {}; + case ENTERING: + return { + animationName: 'slideInLeft', + animationDuration: `${ timeout }ms` + }; + case EXITING: + return { + animationName: 'slideOutLeft', + animationDuration: `${ timeout }ms` + }; + } + case TransitionAnimationTypes.SLIDE_RIGHT: + switch(transition) + { + default: + return {}; + case ENTERING: + return { + animationName: 'slideInRight', + animationDuration: `${ timeout }ms` + }; + case EXITING: + return { + animationName: 'slideOutRight', + animationDuration: `${ timeout }ms` + }; + } + case TransitionAnimationTypes.FLIP_X: + switch(transition) + { + default: + return {}; + case ENTERING: + return { + animationName: 'flipInX', + animationDuration: `${ timeout }ms` + }; + case EXITING: + return { + animationName: 'flipOutX', + animationDuration: `${ timeout }ms` + }; + } + case TransitionAnimationTypes.FADE_UP: + switch(transition) + { + default: + return {}; + case ENTERING: + return { + animationName: 'fadeInUp', + animationDuration: `${ timeout }ms` + }; + case EXITING: + return { + animationName: 'fadeOutDown', + animationDuration: `${ timeout }ms` + }; + } + case TransitionAnimationTypes.FADE_IN: + switch(transition) + { + default: + return {}; + case ENTERING: + return { + animationName: 'fadeIn', + animationDuration: `${ timeout }ms` + }; + case EXITING: + return { + animationName: 'fadeOut', + animationDuration: `${ timeout }ms` + }; + } + case TransitionAnimationTypes.FADE_DOWN: + switch(transition) + { + default: + return {}; + case ENTERING: + return { + animationName: 'fadeInDown', + animationDuration: `${ timeout }ms` + }; + case EXITING: + return { + animationName: 'fadeOutUp', + animationDuration: `${ timeout }ms` + }; + } + case TransitionAnimationTypes.HEAD_SHAKE: + switch(transition) + { + default: + return {}; + case ENTERING: + return { + animationName: 'headShake', + animationDuration: `${ timeout }ms` + }; + } + } + + return null; +} diff --git a/Coolui v3 test/src/common/transitions/TransitionAnimationTypes.ts b/Coolui v3 test/src/common/transitions/TransitionAnimationTypes.ts new file mode 100644 index 0000000000..4ecc23be1f --- /dev/null +++ b/Coolui v3 test/src/common/transitions/TransitionAnimationTypes.ts @@ -0,0 +1,11 @@ +export class TransitionAnimationTypes +{ + public static BOUNCE: string = 'bounce'; + public static SLIDE_LEFT: string = 'slideLeft'; + public static SLIDE_RIGHT: string = 'slideRight'; + public static FLIP_X: string = 'flipX'; + public static FADE_IN: string = 'fadeIn'; + public static FADE_DOWN: string = 'fadeDown'; + public static FADE_UP: string = 'fadeUp'; + public static HEAD_SHAKE: string = 'headShake'; +} diff --git a/Coolui v3 test/src/common/transitions/index.ts b/Coolui v3 test/src/common/transitions/index.ts new file mode 100644 index 0000000000..283a00587a --- /dev/null +++ b/Coolui v3 test/src/common/transitions/index.ts @@ -0,0 +1,3 @@ +export * from './TransitionAnimation'; +export * from './TransitionAnimationStyles'; +export * from './TransitionAnimationTypes'; diff --git a/Coolui v3 test/src/common/types/AlignItemType.ts b/Coolui v3 test/src/common/types/AlignItemType.ts new file mode 100644 index 0000000000..5a61476df1 --- /dev/null +++ b/Coolui v3 test/src/common/types/AlignItemType.ts @@ -0,0 +1 @@ +export type AlignItemType = 'start' | 'end' | 'center' | 'baseline' | 'stretch'; diff --git a/Coolui v3 test/src/common/types/AlignSelfType.ts b/Coolui v3 test/src/common/types/AlignSelfType.ts new file mode 100644 index 0000000000..8e26378bda --- /dev/null +++ b/Coolui v3 test/src/common/types/AlignSelfType.ts @@ -0,0 +1 @@ +export type AlignSelfType = 'start' | 'end' | 'center' | 'baseline' | 'stretch'; diff --git a/Coolui v3 test/src/common/types/ButtonSizeType.ts b/Coolui v3 test/src/common/types/ButtonSizeType.ts new file mode 100644 index 0000000000..a520c885b8 --- /dev/null +++ b/Coolui v3 test/src/common/types/ButtonSizeType.ts @@ -0,0 +1 @@ +export type ButtonSizeType = 'lg' | 'sm' | 'md'; diff --git a/Coolui v3 test/src/common/types/ColorVariantType.ts b/Coolui v3 test/src/common/types/ColorVariantType.ts new file mode 100644 index 0000000000..945b64de7d --- /dev/null +++ b/Coolui v3 test/src/common/types/ColorVariantType.ts @@ -0,0 +1 @@ +export type ColorVariantType = 'primary' | 'success' | 'danger' | 'secondary' | 'link' | 'black' | 'white' | 'dark' | 'warning' | 'muted' | 'light' | 'gray'; diff --git a/Coolui v3 test/src/common/types/ColumnSizesType.ts b/Coolui v3 test/src/common/types/ColumnSizesType.ts new file mode 100644 index 0000000000..2b130d85e7 --- /dev/null +++ b/Coolui v3 test/src/common/types/ColumnSizesType.ts @@ -0,0 +1 @@ +export type ColumnSizesType = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12; diff --git a/Coolui v3 test/src/common/types/DisplayType.ts b/Coolui v3 test/src/common/types/DisplayType.ts new file mode 100644 index 0000000000..7551d72150 --- /dev/null +++ b/Coolui v3 test/src/common/types/DisplayType.ts @@ -0,0 +1 @@ +export type DisplayType = 'none' | 'inline' | 'inline-block' | 'block' | 'grid' | 'table' | 'table-cell' | 'table-row' | 'flex' | 'inline-flex'; diff --git a/Coolui v3 test/src/common/types/FloatType.ts b/Coolui v3 test/src/common/types/FloatType.ts new file mode 100644 index 0000000000..63e495fe5b --- /dev/null +++ b/Coolui v3 test/src/common/types/FloatType.ts @@ -0,0 +1 @@ +export type FloatType = 'start' | 'end' | 'none'; diff --git a/Coolui v3 test/src/common/types/FontSizeType.ts b/Coolui v3 test/src/common/types/FontSizeType.ts new file mode 100644 index 0000000000..120c11c96e --- /dev/null +++ b/Coolui v3 test/src/common/types/FontSizeType.ts @@ -0,0 +1 @@ +export type FontSizeType = 1 | 2 | 3 | 4 | 5 | 6; diff --git a/Coolui v3 test/src/common/types/FontWeightType.ts b/Coolui v3 test/src/common/types/FontWeightType.ts new file mode 100644 index 0000000000..c7c92866ce --- /dev/null +++ b/Coolui v3 test/src/common/types/FontWeightType.ts @@ -0,0 +1 @@ +export type FontWeightType = 'bold' | 'bolder' | 'normal' | 'light' | 'lighter'; diff --git a/Coolui v3 test/src/common/types/JustifyContentType.ts b/Coolui v3 test/src/common/types/JustifyContentType.ts new file mode 100644 index 0000000000..73a318d2d4 --- /dev/null +++ b/Coolui v3 test/src/common/types/JustifyContentType.ts @@ -0,0 +1 @@ +export type JustifyContentType = 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly'; diff --git a/Coolui v3 test/src/common/types/OverflowType.ts b/Coolui v3 test/src/common/types/OverflowType.ts new file mode 100644 index 0000000000..9231ff9f42 --- /dev/null +++ b/Coolui v3 test/src/common/types/OverflowType.ts @@ -0,0 +1 @@ +export type OverflowType = 'auto' | 'hidden' | 'visible' | 'scroll' | 'y-scroll' | 'unset'; diff --git a/Coolui v3 test/src/common/types/PositionType.ts b/Coolui v3 test/src/common/types/PositionType.ts new file mode 100644 index 0000000000..4e20b2fbdc --- /dev/null +++ b/Coolui v3 test/src/common/types/PositionType.ts @@ -0,0 +1 @@ +export type PositionType = 'static' | 'relative' | 'fixed' | 'absolute' | 'sticky'; diff --git a/Coolui v3 test/src/common/types/SpacingType.ts b/Coolui v3 test/src/common/types/SpacingType.ts new file mode 100644 index 0000000000..91c2bb573b --- /dev/null +++ b/Coolui v3 test/src/common/types/SpacingType.ts @@ -0,0 +1 @@ +export type SpacingType = 0 | 1 | 2 | 3 | 4 | 5; diff --git a/Coolui v3 test/src/common/types/TextAlignType.ts b/Coolui v3 test/src/common/types/TextAlignType.ts new file mode 100644 index 0000000000..cb82648065 --- /dev/null +++ b/Coolui v3 test/src/common/types/TextAlignType.ts @@ -0,0 +1 @@ +export type TextAlignType = 'start' | 'center' | 'end'; diff --git a/Coolui v3 test/src/common/types/index.ts b/Coolui v3 test/src/common/types/index.ts new file mode 100644 index 0000000000..333177e289 --- /dev/null +++ b/Coolui v3 test/src/common/types/index.ts @@ -0,0 +1,14 @@ +export * from './AlignItemType'; +export * from './AlignSelfType'; +export * from './ButtonSizeType'; +export * from './ColorVariantType'; +export * from './ColumnSizesType'; +export * from './DisplayType'; +export * from './FloatType'; +export * from './FontSizeType'; +export * from './FontWeightType'; +export * from './JustifyContentType'; +export * from './OverflowType'; +export * from './PositionType'; +export * from './SpacingType'; +export * from './TextAlignType'; diff --git a/Coolui v3 test/src/common/utils/CreateTransitionToIcon.ts b/Coolui v3 test/src/common/utils/CreateTransitionToIcon.ts new file mode 100644 index 0000000000..20e9885876 --- /dev/null +++ b/Coolui v3 test/src/common/utils/CreateTransitionToIcon.ts @@ -0,0 +1,13 @@ +import { GetEventDispatcher, NitroToolbarAnimateIconEvent } from '@nitrots/nitro-renderer'; + +export const CreateTransitionToIcon = (image: HTMLImageElement, fromElement: HTMLElement, icon: string) => +{ + const bounds = fromElement.getBoundingClientRect(); + const x = (bounds.x + (bounds.width / 2)); + const y = (bounds.y + (bounds.height / 2)); + const event = new NitroToolbarAnimateIconEvent(image, x, y); + + event.iconName = icon; + + GetEventDispatcher().dispatchEvent(event); +}; diff --git a/Coolui v3 test/src/common/utils/FriendlyTimeView.tsx b/Coolui v3 test/src/common/utils/FriendlyTimeView.tsx new file mode 100644 index 0000000000..4a85c4abde --- /dev/null +++ b/Coolui v3 test/src/common/utils/FriendlyTimeView.tsx @@ -0,0 +1,28 @@ +import { FC, useEffect, useMemo, useState } from 'react'; +import { FriendlyTime } from '../../api'; +import { Base, BaseProps } from '../Base'; + +interface FriendlyTimeViewProps extends BaseProps +{ + seconds: number; + isShort?: boolean; +} + +export const FriendlyTimeView: FC = props => +{ + const { seconds = 0, isShort = false, children = null, ...rest } = props; + const [ updateId, setUpdateId ] = useState(-1); + + const getStartSeconds = useMemo(() => (Math.round(new Date().getSeconds()) - seconds), [ seconds ]); + + useEffect(() => + { + const interval = setInterval(() => setUpdateId(prevValue => (prevValue + 1)), 10000); + + return () => clearInterval(interval); + }, []); + + const value = (Math.round(new Date().getSeconds()) - getStartSeconds); + + return { isShort ? FriendlyTime.shortFormat(value) : FriendlyTime.format(value) }; +}; diff --git a/Coolui v3 test/src/common/utils/index.ts b/Coolui v3 test/src/common/utils/index.ts new file mode 100644 index 0000000000..11d60a3432 --- /dev/null +++ b/Coolui v3 test/src/common/utils/index.ts @@ -0,0 +1,2 @@ +export * from './CreateTransitionToIcon'; +export * from './FriendlyTimeView'; diff --git a/Coolui v3 test/src/components/MainView.tsx b/Coolui v3 test/src/components/MainView.tsx new file mode 100644 index 0000000000..e8b838d1fa --- /dev/null +++ b/Coolui v3 test/src/components/MainView.tsx @@ -0,0 +1,119 @@ +import { AddLinkEventTracker, GetCommunication, HabboWebTools, ILinkEventTracker, RemoveLinkEventTracker, RoomSessionEvent } from '@nitrots/nitro-renderer'; +import { AnimatePresence, motion } from 'framer-motion'; +import { FC, useEffect, useState } from 'react'; +import { useNitroEvent } from '../hooks'; +import { AchievementsView } from './achievements/AchievementsView'; +import { AvatarEditorView } from './avatar-editor'; +import { CameraWidgetView } from './camera/CameraWidgetView'; +import { CampaignView } from './campaign/CampaignView'; +import { CatalogView } from './catalog/CatalogView'; +import { ChatHistoryView } from './chat-history/ChatHistoryView'; +import { FloorplanEditorView } from './floorplan-editor/FloorplanEditorView'; +import { FriendsView } from './friends/FriendsView'; +import { GameCenterView } from './game-center/GameCenterView'; +import { GroupsView } from './groups/GroupsView'; +import { GuideToolView } from './guide-tool/GuideToolView'; +import { HcCenterView } from './hc-center/HcCenterView'; +import { HelpView } from './help/HelpView'; +import { HotelView } from './hotel-view/HotelView'; +import { InventoryView } from './inventory/InventoryView'; +import { ModToolsView } from './mod-tools/ModToolsView'; +import { NavigatorView } from './navigator/NavigatorView'; +import { NitrobubbleHiddenView } from './nitrobubblehidden/NitrobubbleHiddenView'; +import { NitropediaView } from './nitropedia/NitropediaView'; +import { RightSideView } from './right-side/RightSideView'; +import { RoomView } from './room/RoomView'; +import { ToolbarView } from './toolbar/ToolbarView'; +import { UserProfileView } from './user-profile/UserProfileView'; +import { UserSettingsView } from './user-settings/UserSettingsView'; +import { WiredView } from './wired/WiredView'; + +export const MainView: FC<{}> = props => +{ + const [ isReady, setIsReady ] = useState(false); + const [ landingViewVisible, setLandingViewVisible ] = useState(true); + + useNitroEvent(RoomSessionEvent.CREATED, event => setLandingViewVisible(false)); + useNitroEvent(RoomSessionEvent.ENDED, event => setLandingViewVisible(event.openLandingView)); + + useEffect(() => + { + setIsReady(true); + + GetCommunication().connection.ready(); + }, []); + + useEffect(() => + { + const linkTracker: ILinkEventTracker = { + linkReceived: (url: string) => + { + const parts = url.split('/'); + + if(parts.length < 2) return; + + switch(parts[1]) + { + case 'open': + if(parts.length > 2) + { + switch(parts[2]) + { + case 'credits': + //HabboWebTools.openWebPageAndMinimizeClient(this._windowManager.getProperty(ExternalVariables.WEB_SHOP_RELATIVE_URL)); + break; + default: { + const name = parts[2]; + HabboWebTools.openHabblet(name); + } + } + } + return; + } + }, + eventUrlPrefix: 'habblet/' + }; + + AddLinkEventTracker(linkTracker); + + return () => RemoveLinkEventTracker(linkTracker); + }, []); + + return ( + <> + + { landingViewVisible && + + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +}; diff --git a/Coolui v3 test/src/components/achievements/AchievementBadgeView.tsx b/Coolui v3 test/src/components/achievements/AchievementBadgeView.tsx new file mode 100644 index 0000000000..5365265855 --- /dev/null +++ b/Coolui v3 test/src/components/achievements/AchievementBadgeView.tsx @@ -0,0 +1,19 @@ +import { AchievementData } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { AchievementUtilities } from '../../api'; +import { BaseProps, LayoutBadgeImageView } from '../../common'; + +interface AchievementBadgeViewProps extends BaseProps +{ + achievement: AchievementData; + scale?: number; +} + +export const AchievementBadgeView: FC = props => +{ + const { achievement = null, scale = 1, ...rest } = props; + + if(!achievement) return null; + + return ; +}; diff --git a/Coolui v3 test/src/components/achievements/AchievementCategoryView.tsx b/Coolui v3 test/src/components/achievements/AchievementCategoryView.tsx new file mode 100644 index 0000000000..3a6f99f186 --- /dev/null +++ b/Coolui v3 test/src/components/achievements/AchievementCategoryView.tsx @@ -0,0 +1,42 @@ +import { FC, useEffect } from 'react'; +import { AchievementCategory } from '../../api'; +import { Column } from '../../common'; +import { useAchievements } from '../../hooks'; +import { AchievementDetailsView } from './AchievementDetailsView'; +import { AchievementListView } from './achievement-list'; + +interface AchievementCategoryViewProps { + category: AchievementCategory; +} + +export const AchievementCategoryView: FC = ( + props, +) => +{ + const { category = null } = props; + const { selectedAchievement = null, setSelectedAchievementId = null } = + useAchievements(); + + useEffect(() => + { + if(!category) return; + + if(!selectedAchievement) + { + setSelectedAchievementId( + category?.achievements?.[0]?.achievementId, + ); + } + }, [category, selectedAchievement, setSelectedAchievementId]); + + if(!category) return null; + + return ( + + + {!!selectedAchievement && ( + + )} + + ); +}; diff --git a/Coolui v3 test/src/components/achievements/AchievementDetailsView.tsx b/Coolui v3 test/src/components/achievements/AchievementDetailsView.tsx new file mode 100644 index 0000000000..a413883bef --- /dev/null +++ b/Coolui v3 test/src/components/achievements/AchievementDetailsView.tsx @@ -0,0 +1,53 @@ +import { AchievementData } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { AchievementUtilities, LocalizeBadgeDescription, LocalizeBadgeName, LocalizeText } from '../../api'; +import { Column, Flex, LayoutCurrencyIcon, LayoutProgressBar, Text } from '../../common'; +import { AchievementBadgeView } from './AchievementBadgeView'; + +interface AchievementDetailsViewProps +{ + achievement: AchievementData; +} + +export const AchievementDetailsView: FC = props => +{ + const { achievement = null } = props; + + if(!achievement) return null; + + return ( + + + + + { LocalizeText('achievements.details.level', [ 'level', 'limit' ], [ AchievementUtilities.getAchievementLevel(achievement).toString(), achievement.levelCount.toString() ]) } + + + +
+ + { LocalizeBadgeName(AchievementUtilities.getAchievementBadgeCode(achievement)) } + + + { LocalizeBadgeDescription(AchievementUtilities.getAchievementBadgeCode(achievement)) } + +
+ { ((achievement.levelRewardPoints > 0) || (achievement.scoreLimit > 0)) && +
+ { (achievement.levelRewardPoints > 0) && +
+ + { LocalizeText('achievements.details.reward') } + + + { achievement.levelRewardPoints } + + +
} + { (achievement.scoreLimit > 0) && + } +
} +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/achievements/AchievementsView.tsx b/Coolui v3 test/src/components/achievements/AchievementsView.tsx new file mode 100644 index 0000000000..bdb80aef76 --- /dev/null +++ b/Coolui v3 test/src/components/achievements/AchievementsView.tsx @@ -0,0 +1,143 @@ +import +{ + AddLinkEventTracker, + ILinkEventTracker, + RemoveLinkEventTracker, +} from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { AchievementUtilities, LocalizeText } from '../../api'; +import { Column, LayoutImage, LayoutProgressBar, Text } from '../../common'; +import { useAchievements } from '../../hooks'; +import { NitroCard } from '../../layout'; +import { AchievementCategoryView } from './AchievementCategoryView'; +import { AchievementsCategoryListView } from './category-list'; + +export const AchievementsView: FC<{}> = (props) => +{ + const [isVisible, setIsVisible] = useState(false); + const { + achievementCategories = [], + selectedCategoryCode = null, + setSelectedCategoryCode = null, + achievementScore = 0, + getProgress = 0, + getMaxProgress = 0, + selectedCategory = null, + } = useAchievements(); + + useEffect(() => + { + const linkTracker: ILinkEventTracker = { + linkReceived: (url: string) => + { + const parts = url.split('/'); + + if(parts.length < 2) return; + + switch(parts[1]) + { + case 'show': + setIsVisible(true); + return; + case 'hide': + setIsVisible(false); + return; + case 'toggle': + setIsVisible((prevValue) => !prevValue); + return; + } + }, + eventUrlPrefix: 'achievements/', + }; + + AddLinkEventTracker(linkTracker); + + return () => RemoveLinkEventTracker(linkTracker); + }, []); + + if(!isVisible) return null; + + return ( + + setIsVisible(false)} + /> + {selectedCategory && ( +
+
setSelectedCategoryCode(null)} + /> + + + {LocalizeText( + `quests.${selectedCategory.code}.name` + )} + + + {LocalizeText( + 'achievements.details.categoryprogress', + ['progress', 'limit'], + [ + selectedCategory.getProgress().toString(), + selectedCategory + .getMaxProgress() + .toString(), + ] + )} + + + +
+ )} + + {!selectedCategory && ( + <> + +
+ + {LocalizeText( + 'achievements.categories.score', + ['score'], + [achievementScore.toString()] + )} + + +
+ + )} + {selectedCategory && ( + + )} +
+ + ); +}; diff --git a/Coolui v3 test/src/components/achievements/achievement-list/AchievementListItemView.tsx b/Coolui v3 test/src/components/achievements/achievement-list/AchievementListItemView.tsx new file mode 100644 index 0000000000..88386f3e4b --- /dev/null +++ b/Coolui v3 test/src/components/achievements/achievement-list/AchievementListItemView.tsx @@ -0,0 +1,24 @@ +import { AchievementData } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { LayoutGridItem } from '../../../common'; +import { useAchievements } from '../../../hooks'; +import { AchievementBadgeView } from '../AchievementBadgeView'; + +interface AchievementListItemViewProps +{ + achievement: AchievementData; +} + +export const AchievementListItemView: FC = props => +{ + const { achievement = null } = props; + const { selectedAchievement = null, setSelectedAchievementId = null } = useAchievements(); + + if(!achievement) return null; + + return ( + 0) } onClick={ event => setSelectedAchievementId(achievement.achievementId) }> + + + ); +}; diff --git a/Coolui v3 test/src/components/achievements/achievement-list/AchievementListView.tsx b/Coolui v3 test/src/components/achievements/achievement-list/AchievementListView.tsx new file mode 100644 index 0000000000..0d4647230a --- /dev/null +++ b/Coolui v3 test/src/components/achievements/achievement-list/AchievementListView.tsx @@ -0,0 +1,20 @@ +import { AchievementData } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { AutoGrid } from '../../../common'; +import { AchievementListItemView } from './AchievementListItemView'; + +interface AchievementListViewProps +{ + achievements: AchievementData[]; +} + +export const AchievementListView: FC = props => +{ + const { achievements = null } = props; + + return ( + + { achievements && (achievements.length > 0) && achievements.map((achievement, index) => ) } + + ); +}; diff --git a/Coolui v3 test/src/components/achievements/achievement-list/index.ts b/Coolui v3 test/src/components/achievements/achievement-list/index.ts new file mode 100644 index 0000000000..87ccb432ed --- /dev/null +++ b/Coolui v3 test/src/components/achievements/achievement-list/index.ts @@ -0,0 +1,2 @@ +export * from './AchievementListItemView'; +export * from './AchievementListView'; diff --git a/Coolui v3 test/src/components/achievements/category-list/AchievementsCategoryListItemView.tsx b/Coolui v3 test/src/components/achievements/category-list/AchievementsCategoryListItemView.tsx new file mode 100644 index 0000000000..f73c0966a3 --- /dev/null +++ b/Coolui v3 test/src/components/achievements/category-list/AchievementsCategoryListItemView.tsx @@ -0,0 +1,31 @@ +import { Dispatch, FC, SetStateAction } from 'react'; +import { AchievementUtilities, IAchievementCategory, LocalizeText } from '../../../api'; +import { LayoutBackgroundImage, LayoutGridItem, Text } from '../../../common'; + +interface AchievementCategoryListItemViewProps +{ + category: IAchievementCategory; + selectedCategoryCode: string; + setSelectedCategoryCode: Dispatch>; +} + +export const AchievementsCategoryListItemView: FC = props => +{ + const { category = null, selectedCategoryCode = null, setSelectedCategoryCode = null } = props; + + if(!category) return null; + + const progress = AchievementUtilities.getAchievementCategoryProgress(category); + const maxProgress = AchievementUtilities.getAchievementCategoryMaxProgress(category); + const getCategoryImage = AchievementUtilities.getAchievementCategoryImageUrl(category, progress); + const getTotalUnseen = AchievementUtilities.getAchievementCategoryTotalUnseen(category); + + return ( + setSelectedCategoryCode(category.code) }> + { LocalizeText(`quests.${ category.code }.name`) } + + { progress } / { maxProgress } + + + ); +}; diff --git a/Coolui v3 test/src/components/achievements/category-list/AchievementsCategoryListView.tsx b/Coolui v3 test/src/components/achievements/category-list/AchievementsCategoryListView.tsx new file mode 100644 index 0000000000..c641f623b3 --- /dev/null +++ b/Coolui v3 test/src/components/achievements/category-list/AchievementsCategoryListView.tsx @@ -0,0 +1,22 @@ +import { Dispatch, FC, SetStateAction } from 'react'; +import { IAchievementCategory } from '../../../api'; +import { AutoGrid } from '../../../common'; +import { AchievementsCategoryListItemView } from './AchievementsCategoryListItemView'; + +interface AchievementsCategoryListViewProps +{ + categories: IAchievementCategory[]; + selectedCategoryCode: string; + setSelectedCategoryCode: Dispatch>; +} + +export const AchievementsCategoryListView: FC = props => +{ + const { categories = null, selectedCategoryCode = null, setSelectedCategoryCode = null } = props; + + return ( + + { categories && (categories.length > 0) && categories.map((category, index) => ) } + + ); +}; diff --git a/Coolui v3 test/src/components/achievements/category-list/index.ts b/Coolui v3 test/src/components/achievements/category-list/index.ts new file mode 100644 index 0000000000..5a367f857b --- /dev/null +++ b/Coolui v3 test/src/components/achievements/category-list/index.ts @@ -0,0 +1,2 @@ +export * from './AchievementsCategoryListItemView'; +export * from './AchievementsCategoryListView'; diff --git a/Coolui v3 test/src/components/achievements/index.ts b/Coolui v3 test/src/components/achievements/index.ts new file mode 100644 index 0000000000..89f6737d7c --- /dev/null +++ b/Coolui v3 test/src/components/achievements/index.ts @@ -0,0 +1,6 @@ +export * from './AchievementBadgeView'; +export * from './AchievementCategoryView'; +export * from './AchievementDetailsView'; +export * from './AchievementsView'; +export * from './achievement-list'; +export * from './category-list'; diff --git a/Coolui v3 test/src/components/avatar-editor/AvatarEditorFigurePreviewView.tsx b/Coolui v3 test/src/components/avatar-editor/AvatarEditorFigurePreviewView.tsx new file mode 100644 index 0000000000..25bb60977f --- /dev/null +++ b/Coolui v3 test/src/components/avatar-editor/AvatarEditorFigurePreviewView.tsx @@ -0,0 +1,40 @@ +import { AvatarDirectionAngle } from '@nitrots/nitro-renderer'; +import { FC, useState } from 'react'; +import { LayoutAvatarImageView } from '../../common'; +import { useAvatarEditor } from '../../hooks'; +import { AvatarEditorIcon } from './AvatarEditorIcon'; + +const DEFAULT_DIRECTION: number = 4; + +export const AvatarEditorFigurePreviewView: FC<{}> = props => +{ + const [ direction, setDirection ] = useState(DEFAULT_DIRECTION); + const { getFigureString = null } = useAvatarEditor(); + + const rotateFigure = (newDirection: number) => + { + if(direction < AvatarDirectionAngle.MIN_DIRECTION) + { + newDirection = (AvatarDirectionAngle.MAX_DIRECTION + (direction + 1)); + } + + if(direction > AvatarDirectionAngle.MAX_DIRECTION) + { + newDirection = (direction - (AvatarDirectionAngle.MAX_DIRECTION + 1)); + } + + setDirection(newDirection); + }; + + return ( +
+ + +
+
+ rotateFigure(direction + 1) } /> + rotateFigure(direction - 1) } /> +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/avatar-editor/AvatarEditorIcon.tsx b/Coolui v3 test/src/components/avatar-editor/AvatarEditorIcon.tsx new file mode 100644 index 0000000000..f5623ed2c2 --- /dev/null +++ b/Coolui v3 test/src/components/avatar-editor/AvatarEditorIcon.tsx @@ -0,0 +1,46 @@ +import { DetailedHTMLProps, HTMLAttributes, PropsWithChildren, forwardRef } from 'react'; +import { classNames } from '../../layout'; + +type AvatarIconType = 'male' | 'female' | 'clear' | 'sellable'; + +export const AvatarEditorIcon = forwardRef & DetailedHTMLProps, HTMLDivElement>>((props, ref) => +{ + const { icon = null, selected = false, className = null, ...rest } = props; + + /* + switch (icon) + { + case 'male': + + + break; + + case 'arrow-left': + + break; + + default: + //statements; + break; + + } +*/ + return ( +
+ ); +}); + +AvatarEditorIcon.displayName = 'AvatarEditorIcon'; diff --git a/Coolui v3 test/src/components/avatar-editor/AvatarEditorModelView.tsx b/Coolui v3 test/src/components/avatar-editor/AvatarEditorModelView.tsx new file mode 100644 index 0000000000..53a49ab21a --- /dev/null +++ b/Coolui v3 test/src/components/avatar-editor/AvatarEditorModelView.tsx @@ -0,0 +1,80 @@ +import { AvatarEditorFigureCategory, AvatarFigurePartType, FigureDataContainer } from '@nitrots/nitro-renderer'; +import { FC, useCallback, useEffect, useMemo, useState } from 'react'; +import { IAvatarEditorCategory } from '../../api'; +import { useAvatarEditor } from '../../hooks'; +import { AvatarEditorIcon } from './AvatarEditorIcon'; +import { AvatarEditorFigureSetView } from './figure-set'; +import { AvatarEditorPaletteSetView } from './palette-set'; + +export const AvatarEditorModelView: FC<{ + name: string, + categories: IAvatarEditorCategory[] +}> = props => +{ + const { name = '', categories = [] } = props; + const [ didChange, setDidChange ] = useState(false); + const [ activeSetType, setActiveSetType ] = useState(''); + const { maxPaletteCount = 1, gender = null, setGender = null, selectedColorParts = null, getFirstSelectableColor = null, selectEditorColor = null } = useAvatarEditor(); + + const activeCategory = useMemo(() => + { + return categories.find(category => category.setType === activeSetType) ?? null; + }, [ categories, activeSetType ]); + + const selectSet = useCallback((setType: string) => + { + const selectedPalettes = selectedColorParts[setType]; + + if(!selectedPalettes || !selectedPalettes.length) selectEditorColor(setType, 0, getFirstSelectableColor(setType)); + + setActiveSetType(setType); + }, [ getFirstSelectableColor, selectEditorColor, selectedColorParts ]); + + useEffect(() => + { + if(!categories || !categories.length || !didChange) return; + + selectSet(categories[0]?.setType); + setDidChange(false); + }, [ categories, didChange, selectSet ]); + + useEffect(() => + { + setDidChange(true); + }, [ categories ]); + + if(!activeCategory) return null; + + return ( +
+
+ { (name === AvatarEditorFigureCategory.GENERIC) && + <> +
setGender(AvatarFigurePartType.MALE) }> + +
+
setGender(AvatarFigurePartType.FEMALE) }> + +
+ } + { (name !== AvatarEditorFigureCategory.GENERIC) && (categories.length > 0) && categories.map(category => + { + return ( +
selectSet(category.setType) }> + +
+ ); + }) } +
+
+ +
+
+ { (maxPaletteCount >= 1) && + } + { (maxPaletteCount === 2) && + } +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/avatar-editor/AvatarEditorView.tsx b/Coolui v3 test/src/components/avatar-editor/AvatarEditorView.tsx new file mode 100644 index 0000000000..5dea113ec3 --- /dev/null +++ b/Coolui v3 test/src/components/avatar-editor/AvatarEditorView.tsx @@ -0,0 +1,122 @@ +import { AddLinkEventTracker, AvatarEditorFigureCategory, GetSessionDataManager, ILinkEventTracker, RemoveLinkEventTracker, UserFigureComposer } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { FaDice, FaRedo, FaTrash } from 'react-icons/fa'; +import { AvatarEditorAction, LocalizeText, SendMessageComposer } from '../../api'; +import { Button, Grid, NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from '../../common'; +import { useAvatarEditor } from '../../hooks'; +import { AvatarEditorFigurePreviewView } from './AvatarEditorFigurePreviewView'; +import { AvatarEditorModelView } from './AvatarEditorModelView'; +import { AvatarEditorWardrobeView } from './AvatarEditorWardrobeView'; + +const DEFAULT_MALE_FIGURE: string = 'hr-100.hd-180-7.ch-215-66.lg-270-79.sh-305-62.ha-1002-70.wa-2007'; +const DEFAULT_FEMALE_FIGURE: string = 'hr-515-33.hd-600-1.ch-635-70.lg-716-66-62.sh-735-68'; + +export const AvatarEditorView: FC<{}> = props => +{ + const [ isVisible, setIsVisible ] = useState(false); + const { setIsVisible: setEditorVisibility, avatarModels, activeModelKey, setActiveModelKey, loadAvatarData, getFigureStringWithFace, gender, figureSetIds = [], randomizeCurrentFigure = null, getFigureString = null } = useAvatarEditor(); + + const processAction = (action: string) => + { + switch(action) + { + case AvatarEditorAction.ACTION_RESET: + loadAvatarData(GetSessionDataManager().figure, GetSessionDataManager().gender); + return; + case AvatarEditorAction.ACTION_CLEAR: + loadAvatarData(getFigureStringWithFace(0, false), gender); + return; + case AvatarEditorAction.ACTION_RANDOMIZE: + randomizeCurrentFigure(); + return; + case AvatarEditorAction.ACTION_SAVE: + SendMessageComposer(new UserFigureComposer(gender, getFigureString)); + setIsVisible(false); + return; + } + }; + + useEffect(() => + { + const linkTracker: ILinkEventTracker = { + linkReceived: (url: string) => + { + const parts = url.split('/'); + + if(parts.length < 2) return; + + switch(parts[1]) + { + case 'show': + setIsVisible(true); + return; + case 'hide': + setIsVisible(false); + return; + case 'toggle': + setIsVisible(prevValue => !prevValue); + return; + } + }, + eventUrlPrefix: 'avatar-editor/' + }; + + AddLinkEventTracker(linkTracker); + + return () => RemoveLinkEventTracker(linkTracker); + }, []); + + useEffect(() => + { + setEditorVisibility(isVisible); + }, [ isVisible, setEditorVisibility ]); + + if(!isVisible) return null; + + return ( + + setIsVisible(false) } /> + + { Object.keys(avatarModels).map(modelKey => + { + const isActive = (activeModelKey === modelKey); + + return ( + setActiveModelKey(modelKey) }> + { LocalizeText(`avatareditor.category.${ modelKey }`) } + + ); + }) } + + + +
+ { ((activeModelKey.length > 0) && (activeModelKey !== AvatarEditorFigureCategory.WARDROBE)) && + } + { (activeModelKey === AvatarEditorFigureCategory.WARDROBE) && + } +
+
+ +
+
+ + + +
+ +
+
+
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/avatar-editor/AvatarEditorWardrobeView.tsx b/Coolui v3 test/src/components/avatar-editor/AvatarEditorWardrobeView.tsx new file mode 100644 index 0000000000..6981bd5f39 --- /dev/null +++ b/Coolui v3 test/src/components/avatar-editor/AvatarEditorWardrobeView.tsx @@ -0,0 +1,61 @@ +import { GetAvatarRenderManager, IAvatarFigureContainer, SaveWardrobeOutfitMessageComposer } from '@nitrots/nitro-renderer'; +import { FC, useCallback } from 'react'; +import { GetClubMemberLevel, GetConfigurationValue, LocalizeText, SendMessageComposer } from '../../api'; +import { Button, LayoutAvatarImageView, LayoutCurrencyIcon } from '../../common'; +import { useAvatarEditor } from '../../hooks'; +import { InfiniteGrid } from '../../layout'; + +export const AvatarEditorWardrobeView: FC<{}> = props => +{ + const { savedFigures = [], setSavedFigures = null, loadAvatarData = null, getFigureString = null, gender = null } = useAvatarEditor(); + + const hcDisabled = GetConfigurationValue('hc.disabled', false); + + const wearFigureAtIndex = useCallback((index: number) => + { + if((index >= savedFigures.length) || (index < 0)) return; + + const [ figure, gender ] = savedFigures[index]; + + loadAvatarData(figure.getFigureString(), gender); + }, [ savedFigures, loadAvatarData ]); + + const saveFigureAtWardrobeIndex = useCallback((index: number) => + { + if((index >= savedFigures.length) || (index < 0)) return; + + const newFigures = [ ...savedFigures ]; + + const figure = getFigureString; + + newFigures[index] = [ GetAvatarRenderManager().createFigureContainer(figure), gender ]; + + setSavedFigures(newFigures); + SendMessageComposer(new SaveWardrobeOutfitMessageComposer((index + 1), figure, gender)); + }, [ getFigureString, gender, savedFigures, setSavedFigures ]); + + return ( + + { + const [ figureContainer, gender ] = item; + + let clubLevel = 0; + + if(figureContainer) clubLevel = GetAvatarRenderManager().getFigureClubLevel(figureContainer, gender); + + return ( + + { figureContainer && + } +
+ { !hcDisabled && (clubLevel > 0) && } +
+ + { figureContainer && + } +
+ + ); + } } items={ savedFigures } overscan={ 5 } /> + ); +}; diff --git a/Coolui v3 test/src/components/avatar-editor/figure-set/AvatarEditorFigureSetItemView.tsx b/Coolui v3 test/src/components/avatar-editor/figure-set/AvatarEditorFigureSetItemView.tsx new file mode 100644 index 0000000000..4126fa3a66 --- /dev/null +++ b/Coolui v3 test/src/components/avatar-editor/figure-set/AvatarEditorFigureSetItemView.tsx @@ -0,0 +1,56 @@ +import { AvatarFigurePartType } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { AvatarEditorThumbnailsHelper, GetConfigurationValue, IAvatarEditorCategoryPartItem } from '../../../api'; +import { LayoutCurrencyIcon, LayoutGridItemProps } from '../../../common'; +import { useAvatarEditor } from '../../../hooks'; +import { InfiniteGrid } from '../../../layout'; +import { AvatarEditorIcon } from '../AvatarEditorIcon'; + +export const AvatarEditorFigureSetItemView: FC<{ + setType: string; + partItem: IAvatarEditorCategoryPartItem; + isSelected: boolean; + width?: string; +} & LayoutGridItemProps> = props => +{ + const { setType = null, partItem = null, isSelected = false, width = '100%', ...rest } = props; + const [ assetUrl, setAssetUrl ] = useState(''); + const { selectedColorParts = null, getFigureStringWithFace = null } = useAvatarEditor(); + + const isHC = !GetConfigurationValue('hc.disabled', false) && ((partItem.partSet?.clubLevel ?? 0) > 0); + + useEffect(() => + { + if(!setType || !setType.length || !partItem) return; + + const loadImage = async () => + { + const isHC = !GetConfigurationValue('hc.disabled', false) && ((partItem.partSet?.clubLevel ?? 0) > 0); + + let url: string = null; + + if(setType === AvatarFigurePartType.HEAD) + { + url = await AvatarEditorThumbnailsHelper.buildForFace(getFigureStringWithFace(partItem.id), isHC); + } + else + { + url = await AvatarEditorThumbnailsHelper.build(setType, partItem, partItem.usesColor, selectedColorParts[setType] ?? null, isHC); + } + + if(url && url.length) setAssetUrl(url); + }; + + loadImage(); + }, [ setType, partItem, selectedColorParts, getFigureStringWithFace ]); + + if(!partItem) return null; + + return ( + + { !partItem.isClear && isHC && } + { partItem.isClear && } + { !partItem.isClear && partItem.partSet.isSellable && } + + ); +}; diff --git a/Coolui v3 test/src/components/avatar-editor/figure-set/AvatarEditorFigureSetView.tsx b/Coolui v3 test/src/components/avatar-editor/figure-set/AvatarEditorFigureSetView.tsx new file mode 100644 index 0000000000..9a5b543233 --- /dev/null +++ b/Coolui v3 test/src/components/avatar-editor/figure-set/AvatarEditorFigureSetView.tsx @@ -0,0 +1,41 @@ +import { FC } from 'react'; +import { IAvatarEditorCategory, IAvatarEditorCategoryPartItem } from '../../../api'; +import { useAvatarEditor } from '../../../hooks'; +import { InfiniteGrid } from '../../../layout'; +import { AvatarEditorFigureSetItemView } from './AvatarEditorFigureSetItemView'; + +export const AvatarEditorFigureSetView: FC<{ + category: IAvatarEditorCategory; + columnCount: number; +}> = props => +{ + const { category = null, columnCount = 3 } = props; + const { selectedParts = null, selectEditorPart } = useAvatarEditor(); + + const isPartItemSelected = (partItem: IAvatarEditorCategoryPartItem) => + { + if(!category || !category.setType || !selectedParts) return false; + + if(!selectedParts[category.setType]) + { + if(partItem.isClear) return true; + + return false; + } + + const partId = selectedParts[category.setType]; + + return (partId === partItem.id); + }; + + return ( + columnCount={ columnCount } itemRender={ (item: IAvatarEditorCategoryPartItem) => + { + if(!item) return null; + + return ( + selectEditorPart(category.setType, item.partSet?.id ?? -1) } /> + ); + } } items={ category.partItems } overscan={ columnCount } /> + ); +}; diff --git a/Coolui v3 test/src/components/avatar-editor/figure-set/index.ts b/Coolui v3 test/src/components/avatar-editor/figure-set/index.ts new file mode 100644 index 0000000000..0c5880b261 --- /dev/null +++ b/Coolui v3 test/src/components/avatar-editor/figure-set/index.ts @@ -0,0 +1,2 @@ +export * from './AvatarEditorFigureSetItemView'; +export * from './AvatarEditorFigureSetView'; diff --git a/Coolui v3 test/src/components/avatar-editor/index.ts b/Coolui v3 test/src/components/avatar-editor/index.ts new file mode 100644 index 0000000000..5ae66e5498 --- /dev/null +++ b/Coolui v3 test/src/components/avatar-editor/index.ts @@ -0,0 +1,7 @@ +export * from './AvatarEditorFigurePreviewView'; +export * from './AvatarEditorIcon'; +export * from './AvatarEditorModelView'; +export * from './AvatarEditorView'; +export * from './AvatarEditorWardrobeView'; +export * from './figure-set'; +export * from './palette-set'; diff --git a/Coolui v3 test/src/components/avatar-editor/palette-set/AvatarEditorPaletteSetItemView.tsx b/Coolui v3 test/src/components/avatar-editor/palette-set/AvatarEditorPaletteSetItemView.tsx new file mode 100644 index 0000000000..8a520bc53e --- /dev/null +++ b/Coolui v3 test/src/components/avatar-editor/palette-set/AvatarEditorPaletteSetItemView.tsx @@ -0,0 +1,25 @@ +import { ColorConverter, IPartColor } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { GetConfigurationValue } from '../../../api'; +import { LayoutCurrencyIcon, LayoutGridItemProps } from '../../../common'; +import { InfiniteGrid } from '../../../layout'; + +export const AvatarEditorPaletteSetItem: FC<{ + setType: string; + partColor: IPartColor; + isSelected: boolean; + width?: string; +} & LayoutGridItemProps> = props => +{ + const { setType = null, partColor = null, isSelected = false, width = '100%', ...rest } = props; + + if(!partColor) return null; + + const isHC = !GetConfigurationValue('hc.disabled', false) && (partColor.clubLevel > 0); + + return ( + + { isHC && } + + ); +}; diff --git a/Coolui v3 test/src/components/avatar-editor/palette-set/AvatarEditorPaletteSetView.tsx b/Coolui v3 test/src/components/avatar-editor/palette-set/AvatarEditorPaletteSetView.tsx new file mode 100644 index 0000000000..d40c8d1cc0 --- /dev/null +++ b/Coolui v3 test/src/components/avatar-editor/palette-set/AvatarEditorPaletteSetView.tsx @@ -0,0 +1,36 @@ +import { IPartColor } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { IAvatarEditorCategory } from '../../../api'; +import { useAvatarEditor } from '../../../hooks'; +import { InfiniteGrid } from '../../../layout'; +import { AvatarEditorPaletteSetItem } from './AvatarEditorPaletteSetItemView'; + +export const AvatarEditorPaletteSetView: FC<{ + category: IAvatarEditorCategory; + paletteIndex: number; + columnCount: number; +}> = props => +{ + const { category = null, paletteIndex = -1, columnCount = 3 } = props; + const { selectedColorParts = null, selectEditorColor = null } = useAvatarEditor(); + + const isPartColorSelected = (partColor: IPartColor) => + { + if(!category || !category.setType || !selectedColorParts || !selectedColorParts[category.setType] || !selectedColorParts[category.setType][paletteIndex]) return false; + + const selectedColorPart = selectedColorParts[category.setType][paletteIndex]; + + return (selectedColorPart.id === partColor.id); + }; + + return ( + columnCount={ columnCount } itemRender={ (item: IPartColor) => + { + if(!item) return null; + + return ( + selectEditorColor(category.setType, paletteIndex, item.id) } /> + ); + } } items={ category.colorItems[paletteIndex] } overscan={ columnCount } /> + ); +}; diff --git a/Coolui v3 test/src/components/avatar-editor/palette-set/index.ts b/Coolui v3 test/src/components/avatar-editor/palette-set/index.ts new file mode 100644 index 0000000000..977e5b982a --- /dev/null +++ b/Coolui v3 test/src/components/avatar-editor/palette-set/index.ts @@ -0,0 +1,2 @@ +export * from './AvatarEditorPaletteSetItemView'; +export * from './AvatarEditorPaletteSetView'; diff --git a/Coolui v3 test/src/components/backgrounds/BackgroundsView.tsx b/Coolui v3 test/src/components/backgrounds/BackgroundsView.tsx new file mode 100644 index 0000000000..4813b47abd --- /dev/null +++ b/Coolui v3 test/src/components/backgrounds/BackgroundsView.tsx @@ -0,0 +1,111 @@ +import { GetSessionDataManager, HabboClubLevelEnum} from '@nitrots/nitro-renderer'; +import { Dispatch, FC, SetStateAction, useCallback, useMemo, useState } from 'react'; +import { Base, Grid, Flex, NitroCardView, NitroCardHeaderView, NitroCardTabsView, NitroCardTabsItemView, NitroCardContentView, Text, LayoutCurrencyIcon } from '../../common'; +import { useRoom } from '../../hooks'; +import { GetClubMemberLevel, GetConfigurationValue } from '../../api'; + +interface ItemData { + id: number; + isHcOnly: boolean; + minRank: number; + isAmbassadorOnly: boolean; + selectable: boolean; +} + +interface BackgroundsViewProps { + setIsVisible: Dispatch>; + selectedBackground: number; + setSelectedBackground: Dispatch>; + selectedStand: number; + setSelectedStand: Dispatch>; + selectedOverlay: number; + setSelectedOverlay: Dispatch>; +} + +const TABS = ['backgrounds', 'stands', 'overlays'] as const; +type TabType = typeof TABS[number]; + +export const BackgroundsView: FC = ({ + setIsVisible, + selectedBackground, + setSelectedBackground, + selectedStand, + setSelectedStand, + selectedOverlay, + setSelectedOverlay +}) => { + const [activeTab, setActiveTab] = useState('backgrounds'); + const { roomSession } = useRoom(); + + const userData = useMemo(() => ({ + isHcMember: GetClubMemberLevel() >= HabboClubLevelEnum.CLUB, + securityLevel: GetSessionDataManager().canChangeName, + isAmbassador: GetSessionDataManager().isAmbassador + }), []); + + const processData = useCallback((configData: any[], dataType: string): ItemData[] => { + if (!configData?.length) return []; + + return configData + .filter(item => { + const meetsRank = userData.securityLevel >= item.minRank; + const ambassadorEligible = !item.isAmbassadorOnly || userData.isAmbassador; + return item.isHcOnly || (meetsRank && ambassadorEligible); + }) + .map(item => ({ id: item[`${dataType}Id`], ...item, selectable: !item.isHcOnly || userData.isHcMember })); + }, [userData]); + + const allData = useMemo(() => ({ + backgrounds: processData(GetConfigurationValue('backgrounds.data'), 'background'), + stands: processData(GetConfigurationValue('stands.data'), 'stand'), + overlays: processData(GetConfigurationValue('overlays.data'), 'overlay') + }), [processData]); + + const handleSelection = useCallback((id: number) => { + if (!roomSession) return; + + const setters = { backgrounds: setSelectedBackground, stands: setSelectedStand, overlays: setSelectedOverlay }; + + const currentValues = { backgrounds: selectedBackground, stands: selectedStand, overlays: selectedOverlay }; + + setters[activeTab](id); + const newValues = { ...currentValues, [activeTab]: id }; + roomSession.sendBackgroundMessage( newValues.backgrounds, newValues.stands, newValues.overlays ); + }, [activeTab, roomSession, selectedBackground, selectedStand, selectedOverlay, setSelectedBackground, setSelectedStand, setSelectedOverlay]); + + const renderItem = useCallback((item: ItemData, type: string) => ( + item.selectable && handleSelection(item.id)} + className={item.selectable ? '' : 'non-selectable'} + > + + {item.isHcOnly && } + + ), [handleSelection]); + + return ( + + setIsVisible(false)} /> + + {TABS.map(tab => ( + setActiveTab(tab)} + > + {tab.charAt(0).toUpperCase() + tab.slice(1)} + + ))} + + + Select an Option + + {allData[activeTab].map(item => renderItem(item, activeTab.slice(0, -1)))} + + + + ); +}; \ No newline at end of file diff --git a/Coolui v3 test/src/components/camera/CameraWidgetView.tsx b/Coolui v3 test/src/components/camera/CameraWidgetView.tsx new file mode 100644 index 0000000000..d4221e8402 --- /dev/null +++ b/Coolui v3 test/src/components/camera/CameraWidgetView.tsx @@ -0,0 +1,97 @@ +import { AddLinkEventTracker, ILinkEventTracker, RemoveLinkEventTracker, RoomSessionEvent } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { useCamera, useNitroEvent } from '../../hooks'; +import { CameraWidgetCaptureView } from './views/CameraWidgetCaptureView'; +import { CameraWidgetCheckoutView } from './views/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 [ mode, setMode ] = useState(MODE_NONE); + const [ base64Url, setSavedPictureUrl ] = useState(null); + const { availableEffects = [], selectedPictureIndex = -1, cameraRoll = [], setCameraRoll = null, myLevel = 0, price = { credits: 0, duckets: 0, publishDucketPrice: 0 } } = useCamera(); + + + const processAction = (type: string) => + { + switch(type) + { + case 'close': + setMode(MODE_NONE); + return; + case 'edit': + setMode(MODE_EDITOR); + return; + case 'delete': + setCameraRoll(prevValue => + { + const clone = [ ...prevValue ]; + + clone.splice(selectedPictureIndex, 1); + + return clone; + }); + return; + case 'editor_cancel': + setMode(MODE_CAPTURE); + return; + } + }; + + const checkoutPictureUrl = (pictureUrl: string) => + { + setSavedPictureUrl(pictureUrl); + setMode(MODE_CHECKOUT); + }; + + useNitroEvent(RoomSessionEvent.ENDED, event => setMode(MODE_NONE)); + + useEffect(() => + { + const linkTracker: ILinkEventTracker = { + linkReceived: (url: string) => + { + const parts = url.split('/'); + + if(parts.length < 2) return; + + switch(parts[1]) + { + case 'show': + setMode(MODE_CAPTURE); + return; + case 'hide': + setMode(MODE_NONE); + return; + case 'toggle': + setMode(prevValue => + { + if(!prevValue) return MODE_CAPTURE; + else return MODE_NONE; + }); + return; + } + }, + eventUrlPrefix: 'camera/' + }; + + AddLinkEventTracker(linkTracker); + + return () => RemoveLinkEventTracker(linkTracker); + }, []); + + if(mode === MODE_NONE) return null; + + return ( + <> + { (mode === MODE_CAPTURE) && processAction('close') } onDelete={ () => processAction('delete') } onEdit={ () => processAction('edit') } /> } + { (mode === MODE_EDITOR) && processAction('editor_cancel') } onCheckout={ checkoutPictureUrl } onClose={ () => processAction('close') } /> } + { (mode === MODE_CHECKOUT) && processAction('editor_cancel') } onCloseClick={ () => processAction('close') }> } + + ); +}; diff --git a/Coolui v3 test/src/components/camera/index.ts b/Coolui v3 test/src/components/camera/index.ts new file mode 100644 index 0000000000..43c10cdc17 --- /dev/null +++ b/Coolui v3 test/src/components/camera/index.ts @@ -0,0 +1,4 @@ +export * from './CameraWidgetView'; +export * from './views'; +export * from './views/editor'; +export * from './views/editor/effect-list'; diff --git a/Coolui v3 test/src/components/camera/views/CameraWidgetCaptureView.tsx b/Coolui v3 test/src/components/camera/views/CameraWidgetCaptureView.tsx new file mode 100644 index 0000000000..89fe25ee78 --- /dev/null +++ b/Coolui v3 test/src/components/camera/views/CameraWidgetCaptureView.tsx @@ -0,0 +1,90 @@ +import { GetRoomEngine, NitroRectangle, TextureUtils } from '@nitrots/nitro-renderer'; +import { FC, useRef } from 'react'; +import { FaTimes } from 'react-icons/fa'; +import { CameraPicture, GetRoomSession, LocalizeText, PlaySound, SoundNames } from '../../../api'; +import { Button, Column, DraggableWindow } from '../../../common'; +import { useCamera, useNotification } from '../../../hooks'; + +export interface CameraWidgetCaptureViewProps +{ + onClose: () => void; + onEdit: () => void; + onDelete: () => void; +} + +const CAMERA_ROLL_LIMIT: number = 5; + +export const CameraWidgetCaptureView: FC = props => +{ + const { onClose = null, onEdit = null, onDelete = null } = props; + const { cameraRoll = null, setCameraRoll = null, selectedPictureIndex = -1, setSelectedPictureIndex = null } = useCamera(); + const { simpleAlert = null } = useNotification(); + const elementRef = useRef(); + + const selectedPicture = ((selectedPictureIndex > -1) ? cameraRoll[selectedPictureIndex] : null); + + const getCameraBounds = () => + { + 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 = async () => + { + if(selectedPictureIndex > -1) + { + setSelectedPictureIndex(-1); + return; + } + + const texture = GetRoomEngine().createTextureFromRoom(GetRoomSession().roomId, 1, getCameraBounds()); + + const clone = [ ...cameraRoll ]; + + if(clone.length >= CAMERA_ROLL_LIMIT) + { + simpleAlert(LocalizeText('camera.full.body')); + + clone.pop(); + } + + PlaySound(SoundNames.CAMERA_SHUTTER); + clone.push(new CameraPicture(texture, await TextureUtils.generateImageUrl(texture))); + + setCameraRoll(clone); + }; + + return ( + + + { selectedPicture && } +
+
+ +
+ { !selectedPicture &&
} + { selectedPicture && +
+
+ + +
+
} +
+
+
+
+ { (cameraRoll.length > 0) && +
+ { cameraRoll.map((picture, index) => + { + return setSelectedPictureIndex(index) } />; + }) } +
} + + + ); +}; diff --git a/Coolui v3 test/src/components/camera/views/CameraWidgetCheckoutView.tsx b/Coolui v3 test/src/components/camera/views/CameraWidgetCheckoutView.tsx new file mode 100644 index 0000000000..2ab2f5b21d --- /dev/null +++ b/Coolui v3 test/src/components/camera/views/CameraWidgetCheckoutView.tsx @@ -0,0 +1,159 @@ +import { CameraPublishStatusMessageEvent, CameraPurchaseOKMessageEvent, CameraStorageUrlMessageEvent, CreateLinkEvent, GetRoomEngine, PublishPhotoMessageComposer, PurchasePhotoMessageComposer } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useMemo, useState } from 'react'; +import { GetConfigurationValue, LocalizeText, SendMessageComposer } from '../../../api'; +import { Button, Column, LayoutCurrencyIcon, LayoutImage, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../common'; +import { useMessageEvent } from '../../../hooks'; + +export interface CameraWidgetCheckoutViewProps +{ + base64Url: string; + onCloseClick: () => void; + onCancelClick: () => void; + price: { credits: number, duckets: number, publishDucketPrice: number }; +} + +export const CameraWidgetCheckoutView: FC = 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 publishDisabled = useMemo(() => GetConfigurationValue('camera.publish.disabled', false), []); + + useMessageEvent(CameraPurchaseOKMessageEvent, event => + { + setPicturesBought(value => (value + 1)); + setIsWaiting(false); + }); + + useMessageEvent(CameraPublishStatusMessageEvent, event => + { + const parser = event.getParser(); + + setPublishUrl(parser.extraDataId); + setPublishCooldown(parser.secondsToWait); + setWasPicturePublished(parser.ok); + setIsWaiting(false); + }); + + useMessageEvent(CameraStorageUrlMessageEvent, event => + { + const parser = event.getParser(); + + setPictureUrl(GetConfigurationValue('camera.url') + '/' + parser.url); + }); + + const processAction = (type: string, value: string | number = null) => + { + switch(type) + { + case 'close': + onCloseClick(); + return; + case 'buy': + if(isWaiting) return; + + setIsWaiting(true); + SendMessageComposer(new PurchasePhotoMessageComposer('')); + return; + case 'publish': + if(isWaiting) return; + + setIsWaiting(true); + SendMessageComposer(new PublishPhotoMessageComposer()); + return; + case 'cancel': + onCancelClick(); + return; + } + }; + + useEffect(() => + { + if(!base64Url) return; + + GetRoomEngine().saveBase64AsScreenshot(base64Url); + }, [ base64Url ]); + + if(!price) return null; + + return ( + + processAction('close') } /> + +
+ { (pictureUrl && pictureUrl.length) && + } + { (!pictureUrl || !pictureUrl.length) && +
+ { LocalizeText('camera.loading') } +
} +
+
+ + + { 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 } + CreateLinkEvent('inventory/toggle') }>{ LocalizeText('camera.open.inventory') } + } +
+
+ +
+
+ { !publishDisabled && +
+
+ + { LocalizeText(wasPicturePublished ? 'camera.publish.successful' : 'camera.publish.explanation') } + + + { LocalizeText(wasPicturePublished ? 'camera.publish.success.short.info' : 'camera.publish.detailed.explanation') } + + { 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() ]) }
} +
+ { !wasPicturePublished && +
+ +
} +
} + { LocalizeText('camera.warning.disclaimer') } +
+ +
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/camera/views/CameraWidgetShowPhotoView.tsx b/Coolui v3 test/src/components/camera/views/CameraWidgetShowPhotoView.tsx new file mode 100644 index 0000000000..212bee385e --- /dev/null +++ b/Coolui v3 test/src/components/camera/views/CameraWidgetShowPhotoView.tsx @@ -0,0 +1,68 @@ +import { GetRoomEngine, RoomObjectCategory, RoomObjectVariable } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { FaArrowLeft, FaArrowRight } from 'react-icons/fa'; +import { GetUserProfile, IPhotoData, LocalizeText } from '../../../api'; +import { Flex, Grid, Text } from '../../../common'; + +export interface CameraWidgetShowPhotoViewProps { + currentIndex: number; + currentPhotos: IPhotoData[]; + onClick?: () => void; +} + +export const CameraWidgetShowPhotoView: FC = props => { + const { currentIndex = -1, currentPhotos = null, onClick = null } = props; + const [imageIndex, setImageIndex] = useState(0); + + const currentImage = currentPhotos && currentPhotos.length ? currentPhotos[imageIndex] : null; + + const next = () => { + setImageIndex(prevValue => { + let newIndex = prevValue + 1; + if (newIndex >= currentPhotos.length) newIndex = 0; + return newIndex; + }); + }; + + const previous = () => { + setImageIndex(prevValue => { + let newIndex = prevValue - 1; + if (newIndex < 0) newIndex = currentPhotos.length - 1; + return newIndex; + }); + }; + + useEffect(() => { + setImageIndex(currentIndex); + }, [currentIndex]); + + if (!currentImage) return null; + + const getUserData = (roomId: number, objectId: number, type: string): number | string => + { + const roomObject = GetRoomEngine().getRoomObject(roomId, objectId, RoomObjectCategory.WALL); + if (!roomObject) return; + return type == 'username' ? roomObject.model.getValue(RoomObjectVariable.FURNITURE_OWNER_NAME) : roomObject.model.getValue(RoomObjectVariable.FURNITURE_OWNER_ID); + } + + return ( + + + {!currentImage.w && {LocalizeText('camera.loading')}} + + {currentImage.m && currentImage.m.length && {currentImage.m}} +
+ {currentImage.n || ''} + GetUserProfile(Number(getUserData(currentImage.s, Number(currentImage.u), 'id')))}> { getUserData(currentImage.s, Number(currentImage.u), 'username') } + GetUserProfile(currentImage.oi)}>{currentImage.o} + {new Date(currentImage.t * 1000).toLocaleDateString()} +
+ {currentPhotos.length > 1 && ( + + + + + )} +
+ ); +}; \ No newline at end of file diff --git a/Coolui v3 test/src/components/camera/views/editor/CameraWidgetEditorView.tsx b/Coolui v3 test/src/components/camera/views/editor/CameraWidgetEditorView.tsx new file mode 100644 index 0000000000..75ae074508 --- /dev/null +++ b/Coolui v3 test/src/components/camera/views/editor/CameraWidgetEditorView.tsx @@ -0,0 +1,222 @@ +import { GetRoomCameraWidgetManager, IRoomCameraWidgetEffect, IRoomCameraWidgetSelectedEffect, NitroLogger, RoomCameraWidgetSelectedEffect } from '@nitrots/nitro-renderer'; +import { FC, useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import { FaSave, FaSearchMinus, FaSearchPlus, FaTrash } from 'react-icons/fa'; +import ReactSlider from 'react-slider'; +import { CameraEditorTabs, CameraPicture, CameraPictureThumbnail, LocalizeText } from '../../../../api'; +import { Button, Column, Flex, Grid, LayoutImage, NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView, Text } from '../../../../common'; +import { CameraWidgetEffectListView } from './effect-list'; + +export interface CameraWidgetEditorViewProps { + picture: CameraPicture; + availableEffects: IRoomCameraWidgetEffect[]; + myLevel: number; + onClose: () => void; + onCancel: () => void; + onCheckout: (pictureUrl: string) => void; +} + +const TABS: string[] = [ CameraEditorTabs.COLORMATRIX, CameraEditorTabs.COMPOSITE ]; + +export const CameraWidgetEditorView: FC = 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 [ selectedEffects, setSelectedEffects ] = useState([]); + const [ effectsThumbnails, setEffectsThumbnails ] = useState([]); + const [ isZoomed, setIsZoomed ] = useState(false); + const [ currentPictureUrl, setCurrentPictureUrl ] = useState(''); + const isBusy = useRef(false); + + const getColorMatrixEffects = useMemo(() => { + return availableEffects.filter(effect => effect.colorMatrix); + }, [ availableEffects ]); + + const getCompositeEffects = useMemo(() => { + return availableEffects.filter(effect => effect.texture); + }, [ availableEffects ]); + + const getEffectList = useCallback(() => { + return currentTab === CameraEditorTabs.COLORMATRIX ? getColorMatrixEffects : getCompositeEffects; + }, [ currentTab, getColorMatrixEffects, getCompositeEffects ]); + + const getSelectedEffectIndex = useCallback((name: string) => { + if (!name || !name.length || !selectedEffects || !selectedEffects.length) return -1; + return selectedEffects.findIndex(effect => effect.effect.name === name); + }, [ selectedEffects ]); + + const getCurrentEffectIndex = useMemo(() => { + return getSelectedEffectIndex(selectedEffectName); + }, [ selectedEffectName, getSelectedEffectIndex ]); + + const getCurrentEffect = useMemo(() => { + if (!selectedEffectName) return null; + return selectedEffects[getCurrentEffectIndex] || null; + }, [ selectedEffectName, getCurrentEffectIndex, selectedEffects ]); + + const setSelectedEffectAlpha = useCallback((alpha: number) => { + const index = getCurrentEffectIndex; + if (index === -1) return; + + setSelectedEffects(prevValue => { + const clone = [ ...prevValue ]; + const currentEffect = clone[index]; + clone[index] = new RoomCameraWidgetSelectedEffect(currentEffect.effect, alpha); + return clone; + }); + }, [ getCurrentEffectIndex ]); + + const processAction = useCallback((type: string, effectName: string = null) => { + switch (type) { + case 'close': + onClose(); + return; + case 'cancel': + onCancel(); + return; + case 'checkout': + onCheckout(currentPictureUrl); + return; + case 'change_tab': + setCurrentTab(String(effectName)); + return; + case 'select_effect': { + const existingIndex = getSelectedEffectIndex(effectName); + if (existingIndex >= 0) return; + + const effect = availableEffects.find(effect => effect.name === effectName); + if (!effect) return; + + setSelectedEffects(prevValue => [ ...prevValue, new RoomCameraWidgetSelectedEffect(effect, 1) ]); + setSelectedEffectName(effect.name); + return; + } + case 'remove_effect': { + const existingIndex = getSelectedEffectIndex(effectName); + if (existingIndex === -1) return; + + setSelectedEffects(prevValue => { + const clone = [ ...prevValue ]; + clone.splice(existingIndex, 1); + return clone; + }); + + if (selectedEffectName === effectName) setSelectedEffectName(null); + return; + } + case 'clear_effects': + setSelectedEffectName(null); + setSelectedEffects([]); + return; + case 'download': { + (async () => { + const image = new Image(); + image.src = currentPictureUrl; + const newWindow = window.open(''); + newWindow.document.write(image.outerHTML); + })(); + return; + } + case 'zoom': + setIsZoomed(prev => !prev); + return; + } + }, [ availableEffects, selectedEffectName, currentPictureUrl, getSelectedEffectIndex, onCancel, onCheckout, onClose ]); + + useEffect(() => { + const processThumbnails = async () => { + const renderedEffects = await Promise.all( + availableEffects.map(effect => + GetRoomCameraWidgetManager().applyEffects(picture.texture, [ new RoomCameraWidgetSelectedEffect(effect, 1) ], false) + ) + ); + setEffectsThumbnails(renderedEffects.map((image, index) => new CameraPictureThumbnail(availableEffects[index].name, image.src))); + }; + processThumbnails(); + }, [ picture, availableEffects ]); + + useEffect(() => { + GetRoomCameraWidgetManager() + .applyEffects(picture.texture, selectedEffects, false) // Remove isZoomed from here + .then(imageElement => { + setCurrentPictureUrl(imageElement.src); + }) + .catch(error => { + NitroLogger.error('Failed to apply effects to picture', error); + }); + }, [ picture, selectedEffects ]); // Remove isZoomed from dependency array + + return ( + + processAction('close') } /> + + { TABS.map(tab => ( + processAction('change_tab', tab) }> + + + )) } + + + + + + + + + + { selectedEffectName && ( + + { LocalizeText('camera.effect.name.' + selectedEffectName) } + setSelectedEffectAlpha(event) } + renderThumb={ ({ key, ...props }, state) =>
{ state.valueNow }
} + /> +
+ ) } +
+
+
+ + + +
+
+ + +
+
+
+
+
+
+ ); +}; \ No newline at end of file diff --git a/Coolui v3 test/src/components/camera/views/editor/effect-list/CameraWidgetEffectListItemView.tsx b/Coolui v3 test/src/components/camera/views/editor/effect-list/CameraWidgetEffectListItemView.tsx new file mode 100644 index 0000000000..0b891a7457 --- /dev/null +++ b/Coolui v3 test/src/components/camera/views/editor/effect-list/CameraWidgetEffectListItemView.tsx @@ -0,0 +1,40 @@ +import { IRoomCameraWidgetEffect } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { FaLock, FaTimes } from 'react-icons/fa'; +import { LocalizeText } from '../../../../../api'; +import { Button, LayoutGridItem, Text } from '../../../../../common'; + +export interface CameraWidgetEffectListItemViewProps +{ + effect: IRoomCameraWidgetEffect; + thumbnailUrl: string; + isActive: boolean; + isLocked: boolean; + selectEffect: () => void; + removeEffect: () => void; +} + +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/Coolui v3 test/src/components/camera/views/editor/effect-list/CameraWidgetEffectListView.tsx b/Coolui v3 test/src/components/camera/views/editor/effect-list/CameraWidgetEffectListView.tsx new file mode 100644 index 0000000000..5f9b965cca --- /dev/null +++ b/Coolui v3 test/src/components/camera/views/editor/effect-list/CameraWidgetEffectListView.tsx @@ -0,0 +1,33 @@ +import { IRoomCameraWidgetEffect, IRoomCameraWidgetSelectedEffect } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { CameraPictureThumbnail } from '../../../../../api'; +import { Grid } from '../../../../../common'; +import { CameraWidgetEffectListItemView } from './CameraWidgetEffectListItemView'; + +export interface CameraWidgetEffectListViewProps +{ + myLevel: number; + selectedEffects: IRoomCameraWidgetSelectedEffect[]; + effects: IRoomCameraWidgetEffect[]; + thumbnails: CameraPictureThumbnail[]; + processAction: (type: string, name: string) => void; +} + +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) } removeEffect={ () => processAction('remove_effect', effect.name) } selectEffect={ () => processAction('select_effect', effect.name) } thumbnailUrl={ ((thumbnailUrl && thumbnailUrl.thumbnailUrl) || null) } />; + + return myLevel) } selectEffect={ () => processAction('select_effect', effect.name) } removeEffect={ () => processAction('remove_effect', effect.name) } /> + }) } + + ); +}; diff --git a/Coolui v3 test/src/components/camera/views/editor/effect-list/index.ts b/Coolui v3 test/src/components/camera/views/editor/effect-list/index.ts new file mode 100644 index 0000000000..7a4ebdb50f --- /dev/null +++ b/Coolui v3 test/src/components/camera/views/editor/effect-list/index.ts @@ -0,0 +1,2 @@ +export * from './CameraWidgetEffectListItemView'; +export * from './CameraWidgetEffectListView'; diff --git a/Coolui v3 test/src/components/camera/views/editor/index.ts b/Coolui v3 test/src/components/camera/views/editor/index.ts new file mode 100644 index 0000000000..49c615ea64 --- /dev/null +++ b/Coolui v3 test/src/components/camera/views/editor/index.ts @@ -0,0 +1,2 @@ +export * from './CameraWidgetEditorView'; +export * from './effect-list'; diff --git a/Coolui v3 test/src/components/camera/views/index.ts b/Coolui v3 test/src/components/camera/views/index.ts new file mode 100644 index 0000000000..cf44449313 --- /dev/null +++ b/Coolui v3 test/src/components/camera/views/index.ts @@ -0,0 +1,5 @@ +export * from './CameraWidgetCaptureView'; +export * from './CameraWidgetCheckoutView'; +export * from './CameraWidgetShowPhotoView'; +export * from './editor'; +export * from './editor/effect-list'; diff --git a/Coolui v3 test/src/components/campaign/CalendarItemView.tsx b/Coolui v3 test/src/components/campaign/CalendarItemView.tsx new file mode 100644 index 0000000000..234387aa42 --- /dev/null +++ b/Coolui v3 test/src/components/campaign/CalendarItemView.tsx @@ -0,0 +1,53 @@ +import { GetRoomEngine, GetSessionDataManager } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { CalendarItemState, GetConfigurationValue, ICalendarItem } from '../../api'; +import { Column, Flex, LayoutImage } from '../../common'; + +interface CalendarItemViewProps +{ + itemId: number; + state: number; + active?: boolean; + product?: ICalendarItem; + onClick: (itemId: number) => void; +} + +export const CalendarItemView: FC = props => +{ + const { itemId = -1, state = null, product = null, active = false, onClick = null } = props; + + const getFurnitureIcon = (name: string) => + { + let furniData = GetSessionDataManager().getFloorItemDataByName(name); + let url = null; + + if(furniData) url = GetRoomEngine().getFurnitureFloorIconUrl(furniData.id); + else + { + furniData = GetSessionDataManager().getWallItemDataByName(name); + + if(furniData) url = GetRoomEngine().getFurnitureWallIconUrl(furniData.id); + } + + return url; + }; + + return ( + onClick(itemId) }> + { (state === CalendarItemState.STATE_UNLOCKED) && + + + { product && + ('image.library.url') + product.customImage : getFurnitureIcon(product.productName) } /> } + + } + { (state !== CalendarItemState.STATE_UNLOCKED) && + + { (state === CalendarItemState.STATE_LOCKED_AVAILABLE) && +
} + { ((state === CalendarItemState.STATE_LOCKED_EXPIRED) || (state === CalendarItemState.STATE_LOCKED_FUTURE)) && +
} + } + + ); +}; diff --git a/Coolui v3 test/src/components/campaign/CalendarView.tsx b/Coolui v3 test/src/components/campaign/CalendarView.tsx new file mode 100644 index 0000000000..057d088ef9 --- /dev/null +++ b/Coolui v3 test/src/components/campaign/CalendarView.tsx @@ -0,0 +1,144 @@ +import { GetSessionDataManager } from '@nitrots/nitro-renderer'; +import { FC, useState } from 'react'; +import { CalendarItemState, ICalendarItem, LocalizeText } from '../../api'; +import { Button, Column, Grid, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../common'; +import { CalendarItemView } from './CalendarItemView'; + +interface CalendarViewProps +{ + onClose(): void; + openPackage(id: number, asStaff: boolean): void; + receivedProducts: Map; + campaignName: string; + currentDay: number; + numDays: number; + openedDays: number[]; + missedDays: number[]; +} + +const TOTAL_SHOWN_ITEMS = 5; + +export const CalendarView: FC = props => +{ + const { onClose = null, campaignName = null, currentDay = null, numDays = null, missedDays = null, openedDays = null, openPackage = null, receivedProducts = null } = props; + const [ selectedDay, setSelectedDay ] = useState(currentDay); + const [ index, setIndex ] = useState(Math.max(0, (selectedDay - 1))); + + const getDayState = (day: number) => + { + if(openedDays.includes(day)) return CalendarItemState.STATE_UNLOCKED; + + if(day > currentDay) return CalendarItemState.STATE_LOCKED_FUTURE; + + if(missedDays.includes(day)) return CalendarItemState.STATE_LOCKED_EXPIRED; + + return CalendarItemState.STATE_LOCKED_AVAILABLE; + }; + + const dayMessage = (day: number) => + { + const state = getDayState(day); + + switch(state) + { + case CalendarItemState.STATE_UNLOCKED: + return LocalizeText('campaign.calendar.info.unlocked'); + case CalendarItemState.STATE_LOCKED_FUTURE: + return LocalizeText('campaign.calendar.info.future'); + case CalendarItemState.STATE_LOCKED_EXPIRED: + return LocalizeText('campaign.calendar.info.expired'); + default: + return LocalizeText('campaign.calendar.info.available.desktop'); + } + }; + + const onClickNext = () => + { + const nextDay = (selectedDay + 1); + + if(nextDay === numDays) return; + + setSelectedDay(nextDay); + + if((index + TOTAL_SHOWN_ITEMS) < (nextDay + 1)) setIndex(index + 1); + }; + + const onClickPrev = () => + { + const prevDay = (selectedDay - 1); + + if(prevDay < 0) return; + + setSelectedDay(prevDay); + + if(index > prevDay) setIndex(index - 1); + }; + + const onClickItem = (item: number) => + { + if(selectedDay === item) + { + const state = getDayState(item); + + if(state === CalendarItemState.STATE_LOCKED_AVAILABLE) openPackage(item, false); + + return; + } + + setSelectedDay(item); + }; + + const forceOpen = () => + { + const id = selectedDay; + const state = getDayState(id); + + if(state !== CalendarItemState.STATE_UNLOCKED) openPackage(id, true); + }; + + return ( + + + + + + +
+
+ { LocalizeText('campaign.calendar.heading.day', [ 'number' ], [ (selectedDay + 1).toString() ]) } + { dayMessage(selectedDay) } +
+
+ { GetSessionDataManager().isModerator && + } +
+
+
+ +
+
+
+
+
+ + + { [ ...Array(TOTAL_SHOWN_ITEMS) ].map((e, i) => + { + const day = (index + i); + + return ( + + + + ); + }) } + + +
+
+
+
+ + + ); +}; diff --git a/Coolui v3 test/src/components/campaign/CampaignView.tsx b/Coolui v3 test/src/components/campaign/CampaignView.tsx new file mode 100644 index 0000000000..76230f489b --- /dev/null +++ b/Coolui v3 test/src/components/campaign/CampaignView.tsx @@ -0,0 +1,101 @@ +import { AddLinkEventTracker, CampaignCalendarData, CampaignCalendarDataMessageEvent, CampaignCalendarDoorOpenedMessageEvent, ILinkEventTracker, OpenCampaignCalendarDoorAsStaffComposer, OpenCampaignCalendarDoorComposer, RemoveLinkEventTracker } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { CalendarItem, SendMessageComposer } from '../../api'; +import { useMessageEvent } from '../../hooks'; +import { CalendarView } from './CalendarView'; + +export const CampaignView: FC<{}> = props => +{ + const [ calendarData, setCalendarData ] = useState(null); + const [ lastOpenAttempt, setLastOpenAttempt ] = useState(-1); + const [ receivedProducts, setReceivedProducts ] = useState>(new Map()); + const [ isCalendarOpen, setCalendarOpen ] = useState(false); + + const openPackage = (id: number, asStaff = false) => + { + if(!calendarData) return; + + setLastOpenAttempt(id); + + if(asStaff) + { + SendMessageComposer(new OpenCampaignCalendarDoorAsStaffComposer(calendarData.campaignName, id)); + } + + else + { + SendMessageComposer(new OpenCampaignCalendarDoorComposer(calendarData.campaignName, id)); + } + }; + + useMessageEvent(CampaignCalendarDataMessageEvent, event => + { + const parser = event.getParser(); + + if(!parser) return; + + setCalendarData(parser.calendarData); + }); + + useMessageEvent(CampaignCalendarDoorOpenedMessageEvent, event => + { + const parser = event.getParser(); + + if(!parser) return; + + const lastAttempt = lastOpenAttempt; + + if(parser.doorOpened) + { + setCalendarData(prev => + { + const copy = prev.clone(); + copy.openedDays.push(lastOpenAttempt); + + return copy; + }); + + setReceivedProducts(prev => + { + const copy = new Map(prev); + copy.set(lastAttempt, new CalendarItem(parser.productName, parser.customImage,parser.furnitureClassName)); + + return copy; + }); + } + + setLastOpenAttempt(-1); + }); + + useEffect(() => + { + const linkTracker: ILinkEventTracker = { + linkReceived: (url: string) => + { + const value = url.split('/'); + + if(value.length < 2) return; + + switch(value[1]) + { + case 'calendar': + setCalendarOpen(true); + break; + } + }, + eventUrlPrefix: 'openView/' + }; + + AddLinkEventTracker(linkTracker); + + return () => RemoveLinkEventTracker(linkTracker); + }, []); + + return ( + <> + { (calendarData && isCalendarOpen) && + setCalendarOpen(false) } /> + } + + ); +}; diff --git a/Coolui v3 test/src/components/catalog/CatalogView.tsx b/Coolui v3 test/src/components/catalog/CatalogView.tsx new file mode 100644 index 0000000000..d7ee89fcb5 --- /dev/null +++ b/Coolui v3 test/src/components/catalog/CatalogView.tsx @@ -0,0 +1,111 @@ +import { AddLinkEventTracker, ILinkEventTracker, RemoveLinkEventTracker } from '@nitrots/nitro-renderer'; +import { FC, useEffect } from 'react'; +import { GetConfigurationValue, LocalizeText } from '../../api'; +import { Column, Grid, NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from '../../common'; +import { useCatalog } from '../../hooks'; +import { CatalogIconView } from './views/catalog-icon/CatalogIconView'; +import { CatalogGiftView } from './views/gift/CatalogGiftView'; +import { CatalogNavigationView } from './views/navigation/CatalogNavigationView'; +import { GetCatalogLayout } from './views/page/layout/GetCatalogLayout'; +import { MarketplacePostOfferView } from './views/page/layout/marketplace/MarketplacePostOfferView'; + +export const CatalogView: FC<{}> = props => +{ + const { isVisible = false, setIsVisible = null, rootNode = null, currentPage = null, navigationHidden = false, setNavigationHidden = null, activeNodes = [], searchResult = null, setSearchResult = null, openPageByName = null, openPageByOfferId = null, activateNode = null, getNodeById } = useCatalog(); + + useEffect(() => + { + const linkTracker: ILinkEventTracker = { + linkReceived: (url: string) => + { + const parts = url.split('/'); + + if(parts.length < 2) return; + + switch(parts[1]) + { + case 'show': + setIsVisible(true); + return; + case 'hide': + setIsVisible(false); + return; + case 'toggle': + setIsVisible(prevValue => !prevValue); + return; + case 'open': + if(parts.length > 2) + { + if(parts.length === 4) + { + switch(parts[2]) + { + case 'offerId': + openPageByOfferId(parseInt(parts[3])); + return; + } + } + else + { + openPageByName(parts[2]); + } + } + else + { + setIsVisible(true); + } + + return; + } + }, + eventUrlPrefix: 'catalog/' + }; + + AddLinkEventTracker(linkTracker); + + return () => RemoveLinkEventTracker(linkTracker); + }, [ setIsVisible, openPageByOfferId, openPageByName ]); + + return ( + <> + { isVisible && + + setIsVisible(false) } /> + + { rootNode && (rootNode.children.length > 0) && rootNode.children.map(child => + { + if(!child.isVisible) return null; + + return ( + + { + if(searchResult) setSearchResult(null); + + activateNode(child); + } } > +
+ { GetConfigurationValue('catalog.tab.icons') && } + { child.localization } +
+
+ ); + }) } +
+ + + { !navigationHidden && + + { activeNodes && (activeNodes.length > 0) && + } + } + + { GetCatalogLayout(currentPage, () => setNavigationHidden(true)) } + + + +
} + + + + ); +}; diff --git a/Coolui v3 test/src/components/catalog/views/CatalogPurchaseConfirmView.tsx b/Coolui v3 test/src/components/catalog/views/CatalogPurchaseConfirmView.tsx new file mode 100644 index 0000000000..84ce08607f --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/CatalogPurchaseConfirmView.tsx @@ -0,0 +1,10 @@ +import { FC } from 'react'; + +export const CatalogPurchaseConfirmView: FC<{}> = props => +{ + const {} = props; + + return ( +
+ ); +}; diff --git a/Coolui v3 test/src/components/catalog/views/catalog-header/CatalogHeaderView.tsx b/Coolui v3 test/src/components/catalog/views/catalog-header/CatalogHeaderView.tsx new file mode 100644 index 0000000000..09ec089328 --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/catalog-header/CatalogHeaderView.tsx @@ -0,0 +1,25 @@ +import { FC, useEffect, useState } from 'react'; +import { GetConfigurationValue } from '../../../../api'; + +export interface CatalogHeaderViewProps +{ + imageUrl?: string; +} + +export const CatalogHeaderView: FC = props => +{ + const { imageUrl = null } = props; + const [ displayImageUrl, setDisplayImageUrl ] = useState(''); + + useEffect(() => + { + setDisplayImageUrl(imageUrl ?? GetConfigurationValue('catalog.asset.image.url').replace('%name%', 'catalog_header_roombuilder')); + }, [ imageUrl ]); + + return
+ + { + currentTarget.src = GetConfigurationValue('catalog.asset.image.url').replace('%name%', 'catalog_header_roombuilder'); + } } /> +
; +}; diff --git a/Coolui v3 test/src/components/catalog/views/catalog-icon/CatalogIconView.tsx b/Coolui v3 test/src/components/catalog/views/catalog-icon/CatalogIconView.tsx new file mode 100644 index 0000000000..01786629f6 --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/catalog-icon/CatalogIconView.tsx @@ -0,0 +1,20 @@ +import { FC, useMemo } from 'react'; +import { GetConfigurationValue } from '../../../../api'; +import { LayoutImage } from '../../../../common'; + +export interface CatalogIconViewProps +{ + icon: number; +} + +export const CatalogIconView: FC = props => +{ + const { icon = 0 } = props; + + const getIconUrl = useMemo(() => + { + return ((GetConfigurationValue('catalog.asset.icon.url')).replace('%name%', icon.toString())); + }, [ icon ]); + + return ; +}; diff --git a/Coolui v3 test/src/components/catalog/views/catalog-room-previewer/CatalogRoomPreviewerView.tsx b/Coolui v3 test/src/components/catalog/views/catalog-room-previewer/CatalogRoomPreviewerView.tsx new file mode 100644 index 0000000000..87738d5242 --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/catalog-room-previewer/CatalogRoomPreviewerView.tsx @@ -0,0 +1,47 @@ +import { GetEventDispatcher, NitroToolbarAnimateIconEvent, RoomPreviewer, TextureUtils, ToolbarIconEnum } from '@nitrots/nitro-renderer'; +import { FC, useRef } from 'react'; +import { LayoutRoomPreviewerView } from '../../../../common'; +import { CatalogPurchasedEvent } from '../../../../events'; +import { useUiEvent } from '../../../../hooks'; + +export const CatalogRoomPreviewerView: FC<{ + roomPreviewer: RoomPreviewer; + height?: number; +}> = props => +{ + const { roomPreviewer = null } = props; + const elementRef = useRef(null); + + useUiEvent(CatalogPurchasedEvent.PURCHASE_SUCCESS, event => + { + if(!elementRef) return; + + const renderTexture = roomPreviewer.getRoomObjectCurrentImage(); + + if(!renderTexture) return; + + (async () => + { + const image = await TextureUtils.generateImage(renderTexture); + + if(!image) return; + + const bounds = elementRef.current.getBoundingClientRect(); + + const x = (bounds.x + (bounds.width / 2)); + const y = (bounds.y + (bounds.height / 2)); + + const animateEvent = new NitroToolbarAnimateIconEvent(image, x, y); + + animateEvent.iconName = ToolbarIconEnum.INVENTORY; + + GetEventDispatcher().dispatchEvent(animateEvent); + })(); + }); + + return ( +
+ +
+ ); +}; diff --git a/Coolui v3 test/src/components/catalog/views/gift/CatalogGiftView.tsx b/Coolui v3 test/src/components/catalog/views/gift/CatalogGiftView.tsx new file mode 100644 index 0000000000..c027fba8c2 --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/gift/CatalogGiftView.tsx @@ -0,0 +1,290 @@ +import { GetSessionDataManager, GiftReceiverNotFoundEvent, PurchaseFromCatalogAsGiftComposer } from '@nitrots/nitro-renderer'; +import { ChangeEvent, FC, useCallback, useEffect, useMemo, useState } from 'react'; +import { FaChevronLeft, FaChevronRight } from 'react-icons/fa'; +import { ColorUtils, LocalizeText, MessengerFriend, ProductTypeEnum, SendMessageComposer } from '../../../../api'; +import { Button, Column, Flex, FormGroup, LayoutCurrencyIcon, LayoutFurniImageView, LayoutGiftTagView, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../common'; +import { CatalogEvent, CatalogInitGiftEvent, CatalogPurchasedEvent } from '../../../../events'; +import { useCatalog, useFriends, useMessageEvent, useUiEvent } from '../../../../hooks'; +import { classNames } from '../../../../layout'; + +export const CatalogGiftView: FC<{}> = props => +{ + const [ isVisible, setIsVisible ] = useState(false); + const [ pageId, setPageId ] = useState(0); + const [ offerId, setOfferId ] = useState(0); + const [ extraData, setExtraData ] = useState(''); + const [ receiverName, setReceiverName ] = useState(''); + const [ showMyFace, setShowMyFace ] = useState(true); + const [ message, setMessage ] = useState(''); + const [ colors, setColors ] = useState<{ id: number, color: string }[]>([]); + const [ selectedBoxIndex, setSelectedBoxIndex ] = useState(0); + const [ selectedRibbonIndex, setSelectedRibbonIndex ] = useState(0); + const [ selectedColorId, setSelectedColorId ] = useState(0); + const [ maxBoxIndex, setMaxBoxIndex ] = useState(0); + const [ maxRibbonIndex, setMaxRibbonIndex ] = useState(0); + const [ receiverNotFound, setReceiverNotFound ] = useState(false); + const { catalogOptions = null } = useCatalog(); + const { friends } = useFriends(); + const { giftConfiguration = null } = catalogOptions; + const [ boxTypes, setBoxTypes ] = useState([]); + const [ suggestions, setSuggestions ] = useState([]); + const [ isAutocompleteVisible, setIsAutocompleteVisible ] = useState(true); + + const onClose = useCallback(() => + { + setIsVisible(false); + setPageId(0); + setOfferId(0); + setExtraData(''); + setReceiverName(''); + setShowMyFace(true); + setMessage(''); + setSelectedBoxIndex(0); + setSelectedRibbonIndex(0); + setIsAutocompleteVisible(false); + setSuggestions([]); + + if(colors.length) setSelectedColorId(colors[0].id); + }, [ colors ]); + + const isBoxDefault = useMemo(() => + { + return giftConfiguration ? (giftConfiguration.defaultStuffTypes.findIndex(s => (s === boxTypes[selectedBoxIndex])) > -1) : false; + }, [ boxTypes, giftConfiguration, selectedBoxIndex ]); + + const boxExtraData = useMemo(() => + { + if(!giftConfiguration) return ''; + + return ((boxTypes[selectedBoxIndex] * 1000) + giftConfiguration.ribbonTypes[selectedRibbonIndex]).toString(); + }, [ giftConfiguration, selectedBoxIndex, selectedRibbonIndex, boxTypes ]); + + const isColorable = useMemo(() => + { + if(!giftConfiguration) return false; + + if(isBoxDefault) return false; + + const boxType = boxTypes[selectedBoxIndex]; + + return (boxType === 8 || (boxType >= 3 && boxType <= 6)) ? false : true; + }, [ giftConfiguration, selectedBoxIndex, isBoxDefault, boxTypes ]); + + const colourId = useMemo(() => + { + return isBoxDefault ? boxTypes[selectedBoxIndex] : selectedColorId; + }, [ isBoxDefault, boxTypes, selectedBoxIndex, selectedColorId ]); + + const allFriends = friends.filter((friend: MessengerFriend) => friend.id !== -1); + + const onTextChanged = (e: ChangeEvent) => + { + const value = e.target.value; + + let suggestions = []; + + if(value.length > 0) + { + suggestions = allFriends.sort().filter((friend: MessengerFriend) => friend.name.includes(value)); + } + + setReceiverName(value); + setIsAutocompleteVisible(true); + setSuggestions(suggestions); + }; + + const selectedReceiverName = (friendName: string) => + { + setReceiverName(friendName); + setIsAutocompleteVisible(false); + }; + + const handleAction = useCallback((action: string) => + { + switch(action) + { + case 'prev_box': + setSelectedBoxIndex(value => (value === 0 ? maxBoxIndex : value - 1)); + return; + case 'next_box': + setSelectedBoxIndex(value => (value === maxBoxIndex ? 0 : value + 1)); + return; + case 'prev_ribbon': + setSelectedRibbonIndex(value => (value === 0 ? maxRibbonIndex : value - 1)); + return; + case 'next_ribbon': + setSelectedRibbonIndex(value => (value === maxRibbonIndex ? 0 : value + 1)); + return; + case 'buy': + if(!receiverName || (receiverName.length === 0)) + { + setReceiverNotFound(true); + return; + } + + SendMessageComposer(new PurchaseFromCatalogAsGiftComposer(pageId, offerId, extraData, receiverName, message, colourId, selectedBoxIndex, selectedRibbonIndex, showMyFace)); + return; + } + }, [ colourId, extraData, maxBoxIndex, maxRibbonIndex, message, offerId, pageId, receiverName, selectedBoxIndex, selectedRibbonIndex, showMyFace ]); + + useMessageEvent(GiftReceiverNotFoundEvent, event => setReceiverNotFound(true)); + + useUiEvent([ + CatalogPurchasedEvent.PURCHASE_SUCCESS, + CatalogEvent.INIT_GIFT ], event => + { + switch(event.type) + { + case CatalogPurchasedEvent.PURCHASE_SUCCESS: + onClose(); + return; + case CatalogEvent.INIT_GIFT: + const castedEvent = (event as CatalogInitGiftEvent); + + onClose(); + + setPageId(castedEvent.pageId); + setOfferId(castedEvent.offerId); + setExtraData(castedEvent.extraData); + setIsVisible(true); + return; + } + }); + + useEffect(() => + { + setReceiverNotFound(false); + }, [ receiverName ]); + + const createBoxTypes = useCallback(() => + { + if(!giftConfiguration) return; + + setBoxTypes(prev => + { + let newPrev = [ ...giftConfiguration.boxTypes ]; + + newPrev.push(giftConfiguration.defaultStuffTypes[Math.floor((Math.random() * (giftConfiguration.defaultStuffTypes.length - 1)))]); + + setMaxBoxIndex(newPrev.length - 1); + setMaxRibbonIndex(newPrev.length - 1); + + return newPrev; + }); + }, [ giftConfiguration ]); + + useEffect(() => + { + if(!giftConfiguration) return; + + const newColors: { id: number, color: string }[] = []; + + for(const colorId of giftConfiguration.stuffTypes) + { + const giftData = GetSessionDataManager().getFloorItemData(colorId); + + if(!giftData) continue; + + if(giftData.colors && giftData.colors.length > 0) newColors.push({ id: colorId, color: ColorUtils.makeColorNumberHex(giftData.colors[0]) }); + } + + createBoxTypes(); + + if(newColors.length) + { + setSelectedColorId(newColors[0].id); + setColors(newColors); + } + }, [ giftConfiguration, createBoxTypes ]); + + useEffect(() => + { + if(!isVisible) return; + + createBoxTypes(); + }, [ createBoxTypes, isVisible ]); + + if(!giftConfiguration || !giftConfiguration.isEnabled || !isVisible) return null; + + const boxName = 'catalog.gift_wrapping_new.box.' + (isBoxDefault ? 'default' : boxTypes[selectedBoxIndex]); + const ribbonName = `catalog.gift_wrapping_new.ribbon.${ selectedRibbonIndex }`; + const priceText = 'catalog.gift_wrapping_new.' + (isBoxDefault ? 'freeprice' : 'price'); + + return ( + + + + + { LocalizeText('catalog.gift_wrapping.receiver') } + onTextChanged(e) } /> + { (suggestions.length > 0 && isAutocompleteVisible) && + + { suggestions.map((friend: MessengerFriend) => ( +
selectedReceiverName(friend.name) }>{ friend.name }
+ )) } +
+ } + { receiverNotFound && +
{ LocalizeText('catalog.gift_wrapping.receiver_not_found.title') }
} +
+ setMessage(value) } /> +
+ setShowMyFace(value => !value) } /> + +
+
+ { selectedColorId && +
+ +
} +
+
+
+ + +
+
+ { LocalizeText(boxName) } +
+ { LocalizeText(priceText, [ 'price' ], [ giftConfiguration.price.toString() ]) } + +
+
+
+ +
+ + +
+ { LocalizeText(ribbonName) } +
+
+
+ + + { LocalizeText('catalog.gift_wrapping.pick_color') } + +
+ { colors.map(color =>
+
+
+ + +
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/catalog/views/navigation/CatalogNavigationItemView.tsx b/Coolui v3 test/src/components/catalog/views/navigation/CatalogNavigationItemView.tsx new file mode 100644 index 0000000000..1bb4373b4f --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/navigation/CatalogNavigationItemView.tsx @@ -0,0 +1,35 @@ +import { FC } from 'react'; +import { FaCaretDown, FaCaretUp } from 'react-icons/fa'; +import { ICatalogNode } from '../../../../api'; +import { LayoutGridItem, Text } from '../../../../common'; +import { useCatalog } from '../../../../hooks'; +import { CatalogIconView } from '../catalog-icon/CatalogIconView'; +import { CatalogNavigationSetView } from './CatalogNavigationSetView'; + +export interface CatalogNavigationItemViewProps +{ + node: ICatalogNode; + child?: boolean; +} + +export const CatalogNavigationItemView: FC = props => +{ + const { node = null, child = false } = props; + const { activateNode = null } = useCatalog(); + + return ( +
+ activateNode(node) }> + + { node.localization } + { node.isBranch && + <> + { node.isOpen && } + { !node.isOpen && } + } + + { node.isOpen && node.isBranch && + } +
+ ); +}; diff --git a/Coolui v3 test/src/components/catalog/views/navigation/CatalogNavigationSetView.tsx b/Coolui v3 test/src/components/catalog/views/navigation/CatalogNavigationSetView.tsx new file mode 100644 index 0000000000..92923fdc9a --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/navigation/CatalogNavigationSetView.tsx @@ -0,0 +1,25 @@ +import { FC } from 'react'; +import { ICatalogNode } from '../../../../api'; +import { CatalogNavigationItemView } from './CatalogNavigationItemView'; + +export interface CatalogNavigationSetViewProps +{ + node: ICatalogNode; + child?: boolean; +} + +export const CatalogNavigationSetView: FC = props => +{ + const { node = null, child = false } = props; + + return ( + <> + { node && (node.children.length > 0) && node.children.map((n, index) => + { + if(!n.isVisible) return null; + + return ; + }) } + + ); +}; diff --git a/Coolui v3 test/src/components/catalog/views/navigation/CatalogNavigationView.tsx b/Coolui v3 test/src/components/catalog/views/navigation/CatalogNavigationView.tsx new file mode 100644 index 0000000000..da5c850cac --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/navigation/CatalogNavigationView.tsx @@ -0,0 +1,34 @@ +import { FC } from 'react'; +import { ICatalogNode } from '../../../../api'; +import { AutoGrid, Column } from '../../../../common'; +import { useCatalog } from '../../../../hooks'; +import { CatalogSearchView } from '../page/common/CatalogSearchView'; +import { CatalogNavigationItemView } from './CatalogNavigationItemView'; +import { CatalogNavigationSetView } from './CatalogNavigationSetView'; + +export interface CatalogNavigationViewProps +{ + node: ICatalogNode; +} + +export const CatalogNavigationView: FC = props => +{ + const { node = null } = props; + const { searchResult = null } = useCatalog(); + + return ( + <> + + + + { searchResult && (searchResult.filteredNodes.length > 0) && searchResult.filteredNodes.map((n, index) => + { + return ; + }) } + { !searchResult && + } + + + + ); +}; diff --git a/Coolui v3 test/src/components/catalog/views/page/common/CatalogGridOfferView.tsx b/Coolui v3 test/src/components/catalog/views/page/common/CatalogGridOfferView.tsx new file mode 100644 index 0000000000..f99bbad0e2 --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/page/common/CatalogGridOfferView.tsx @@ -0,0 +1,59 @@ +import { MouseEventType } from '@nitrots/nitro-renderer'; +import { FC, MouseEvent, useMemo, useState } from 'react'; +import { IPurchasableOffer, Offer, ProductTypeEnum } from '../../../../../api'; +import { LayoutAvatarImageView, LayoutGridItem, LayoutGridItemProps } from '../../../../../common'; +import { useCatalog, useInventoryFurni } from '../../../../../hooks'; + +interface CatalogGridOfferViewProps extends LayoutGridItemProps +{ + offer: IPurchasableOffer; + selectOffer: (offer: IPurchasableOffer) => void; +} + +export const CatalogGridOfferView: FC = props => +{ + const { offer = null, selectOffer = null, itemActive = false, ...rest } = props; + const [ isMouseDown, setMouseDown ] = useState(false); + const { requestOfferToMover = null } = useCatalog(); + const { isVisible = false } = useInventoryFurni(); + + const iconUrl = useMemo(() => + { + if(offer.pricingModel === Offer.PRICING_MODEL_BUNDLE) + { + return null; + } + + return offer.product.getIconUrl(offer); + }, [ offer ]); + + const onMouseEvent = (event: MouseEvent) => + { + switch(event.type) + { + case MouseEventType.MOUSE_DOWN: + selectOffer(offer); + setMouseDown(true); + return; + case MouseEventType.MOUSE_UP: + setMouseDown(false); + return; + case MouseEventType.ROLL_OUT: + if(!isMouseDown || !itemActive || !isVisible) return; + + requestOfferToMover(offer); + return; + } + }; + + const product = offer.product; + + if(!product) return null; + + return ( + + { (offer.product.productType === ProductTypeEnum.ROBOT) && + } + + ); +}; diff --git a/Coolui v3 test/src/components/catalog/views/page/common/CatalogRedeemVoucherView.tsx b/Coolui v3 test/src/components/catalog/views/page/common/CatalogRedeemVoucherView.tsx new file mode 100644 index 0000000000..c3469ecf66 --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/page/common/CatalogRedeemVoucherView.tsx @@ -0,0 +1,67 @@ +import { RedeemVoucherMessageComposer, VoucherRedeemErrorMessageEvent, VoucherRedeemOkMessageEvent } from '@nitrots/nitro-renderer'; +import { FC, useState } from 'react'; +import { FaTag } from 'react-icons/fa'; +import { LocalizeText, SendMessageComposer } from '../../../../../api'; +import { Button } from '../../../../../common'; +import { useMessageEvent, useNotification } from '../../../../../hooks'; +import { NitroInput } from '../../../../../layout'; + +export interface CatalogRedeemVoucherViewProps +{ + text: string; +} + +export const CatalogRedeemVoucherView: FC = props => +{ + const { text = null } = props; + const [ voucher, setVoucher ] = useState(''); + const [ isWaiting, setIsWaiting ] = useState(false); + const { simpleAlert = null } = useNotification(); + + const redeemVoucher = () => + { + if(!voucher || !voucher.length || isWaiting) return; + + SendMessageComposer(new RedeemVoucherMessageComposer(voucher)); + + setIsWaiting(true); + }; + + useMessageEvent(VoucherRedeemOkMessageEvent, event => + { + const parser = event.getParser(); + + let message = LocalizeText('catalog.alert.voucherredeem.ok.description'); + + if(parser.productName) message = LocalizeText('catalog.alert.voucherredeem.ok.description.furni', [ 'productName', 'productDescription' ], [ parser.productName, parser.productDescription ]); + + simpleAlert(message, null, null, null, LocalizeText('catalog.alert.voucherredeem.ok.title')); + + setIsWaiting(false); + setVoucher(''); + }); + + useMessageEvent(VoucherRedeemErrorMessageEvent, event => + { + const parser = event.getParser(); + + simpleAlert(LocalizeText(`catalog.alert.voucherredeem.error.description.${ parser.errorCode }`), null, null, null, LocalizeText('catalog.alert.voucherredeem.error.title')); + + setIsWaiting(false); + }); + + return ( +
+ + + + setVoucher(event.target.value) } /> + +
+ ); +}; diff --git a/Coolui v3 test/src/components/catalog/views/page/common/CatalogSearchView.tsx b/Coolui v3 test/src/components/catalog/views/page/common/CatalogSearchView.tsx new file mode 100644 index 0000000000..dc3f34b61d --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/page/common/CatalogSearchView.tsx @@ -0,0 +1,106 @@ +import { GetSessionDataManager, IFurnitureData } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { FaSearch, FaTimes } from 'react-icons/fa'; +import { CatalogPage, CatalogType, FilterCatalogNode, FurnitureOffer, GetOfferNodes, ICatalogNode, ICatalogPage, IPurchasableOffer, LocalizeText, PageLocalization, SearchResult } from '../../../../../api'; +import { Button, Flex } from '../../../../../common'; +import { useCatalog } from '../../../../../hooks'; +import { NitroInput } from '../../../../../layout'; + +export const CatalogSearchView: FC<{}> = props => +{ + const [ searchValue, setSearchValue ] = useState(''); + const { currentType = null, rootNode = null, offersToNodes = null, searchResult = null, setSearchResult = null, setCurrentPage = null } = useCatalog(); + + useEffect(() => + { + let search = searchValue?.toLocaleLowerCase().replace(' ', ''); + + if(!search || !search.length) + { + setSearchResult(null); + + return; + } + + const timeout = setTimeout(() => + { + const furnitureDatas = GetSessionDataManager().getAllFurnitureData(); + + if(!furnitureDatas || !furnitureDatas.length) return; + + const foundFurniture: IFurnitureData[] = []; + const foundFurniLines: string[] = []; + + for(const furniture of furnitureDatas) + { + if((currentType === CatalogType.BUILDER) && !furniture.availableForBuildersClub) continue; + + if((currentType === CatalogType.NORMAL) && furniture.excludeDynamic) continue; + + const searchValues = [ furniture.className, furniture.name, furniture.description ].join(' ').replace(/ /gi, '').toLowerCase(); + + if((currentType === CatalogType.BUILDER) && (furniture.purchaseOfferId === -1) && (furniture.rentOfferId === -1)) + { + if((furniture.furniLine !== '') && (foundFurniLines.indexOf(furniture.furniLine) < 0)) + { + if(searchValues.indexOf(search) >= 0) foundFurniLines.push(furniture.furniLine); + } + } + else + { + const foundNodes = [ + ...GetOfferNodes(offersToNodes, furniture.purchaseOfferId), + ...GetOfferNodes(offersToNodes, furniture.rentOfferId) + ]; + + if(foundNodes.length) + { + if(searchValues.indexOf(search) >= 0) foundFurniture.push(furniture); + + if(foundFurniture.length === 250) break; + } + } + } + + const offers: IPurchasableOffer[] = []; + + for(const furniture of foundFurniture) offers.push(new FurnitureOffer(furniture)); + + let nodes: ICatalogNode[] = []; + + FilterCatalogNode(search, foundFurniLines, rootNode, nodes); + + setSearchResult(new SearchResult(search, offers, nodes.filter(node => (node.isVisible)))); + setCurrentPage((new CatalogPage(-1, 'default_3x3', new PageLocalization([], []), offers, false, 1) as ICatalogPage)); + }, 300); + + return () => clearTimeout(timeout); + }, [ offersToNodes, currentType, rootNode, searchValue, setCurrentPage, setSearchResult ]); + + return ( +
+ + + + + + + + setSearchValue(event.target.value) } /> + + + + { (!searchValue || !searchValue.length) && + } + { searchValue && !!searchValue.length && + } +
+ ); +}; diff --git a/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayout.types.ts b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayout.types.ts new file mode 100644 index 0000000000..b05bccf972 --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayout.types.ts @@ -0,0 +1,7 @@ +import { ICatalogPage } from '../../../../../api'; + +export interface CatalogLayoutProps +{ + page: ICatalogPage; + hideNavigation: () => void; +} diff --git a/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutBadgeDisplayView.tsx b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutBadgeDisplayView.tsx new file mode 100644 index 0000000000..224946ef21 --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutBadgeDisplayView.tsx @@ -0,0 +1,54 @@ +import { FC } from 'react'; +import { LocalizeText } from '../../../../../api'; +import { Column, Grid, Text } from '../../../../../common'; +import { useCatalog } from '../../../../../hooks'; +import { CatalogBadgeSelectorWidgetView } from '../widgets/CatalogBadgeSelectorWidgetView'; +import { CatalogFirstProductSelectorWidgetView } from '../widgets/CatalogFirstProductSelectorWidgetView'; +import { CatalogItemGridWidgetView } from '../widgets/CatalogItemGridWidgetView'; +import { CatalogLimitedItemWidgetView } from '../widgets/CatalogLimitedItemWidgetView'; +import { CatalogPurchaseWidgetView } from '../widgets/CatalogPurchaseWidgetView'; +import { CatalogTotalPriceWidget } from '../widgets/CatalogTotalPriceWidget'; +import { CatalogViewProductWidgetView } from '../widgets/CatalogViewProductWidgetView'; +import { CatalogLayoutProps } from './CatalogLayout.types'; + +export const CatalogLayoutBadgeDisplayView: FC = props => +{ + const { page = null } = props; + const { currentOffer = null } = useCatalog(); + + return ( + <> + + + + + + { LocalizeText('catalog_selectbadge') } + + + + + { !currentOffer && + <> + { !!page.localization.getImage(1) && } + + } + { currentOffer && + <> +
+ +
+ + + { currentOffer.localizationName } +
+ +
+ +
+ } +
+
+ + ); +}; diff --git a/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutColorGroupingView.tsx b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutColorGroupingView.tsx new file mode 100644 index 0000000000..41d20145c7 --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutColorGroupingView.tsx @@ -0,0 +1,176 @@ +import { ColorConverter } from '@nitrots/nitro-renderer'; +import { FC, useMemo, useState } from 'react'; +import { FaFillDrip } from 'react-icons/fa'; +import { IPurchasableOffer } from '../../../../../api'; +import { AutoGrid, Button, Column, Grid, LayoutGridItem, Text } from '../../../../../common'; +import { useCatalog } from '../../../../../hooks'; +import { CatalogGridOfferView } from '../common/CatalogGridOfferView'; +import { CatalogAddOnBadgeWidgetView } from '../widgets/CatalogAddOnBadgeWidgetView'; +import { CatalogLimitedItemWidgetView } from '../widgets/CatalogLimitedItemWidgetView'; +import { CatalogPurchaseWidgetView } from '../widgets/CatalogPurchaseWidgetView'; +import { CatalogSpinnerWidgetView } from '../widgets/CatalogSpinnerWidgetView'; +import { CatalogTotalPriceWidget } from '../widgets/CatalogTotalPriceWidget'; +import { CatalogViewProductWidgetView } from '../widgets/CatalogViewProductWidgetView'; +import { CatalogLayoutProps } from './CatalogLayout.types'; + +export interface CatalogLayoutColorGroupViewProps extends CatalogLayoutProps +{ + +} + +export const CatalogLayoutColorGroupingView: FC = props => +{ + const { page = null } = props; + const [ colorableItems, setColorableItems ] = useState>(new Map()); + const { currentOffer = null, setCurrentOffer = null } = useCatalog(); + const [ colorsShowing, setColorsShowing ] = useState(false); + + const sortByColorIndex = (a: IPurchasableOffer, b: IPurchasableOffer) => + { + if(((!(a.product.furnitureData.colorIndex)) || (!(b.product.furnitureData.colorIndex)))) + { + return 1; + } + if(a.product.furnitureData.colorIndex > b.product.furnitureData.colorIndex) + { + return 1; + } + if(a == b) + { + return 0; + } + return -1; + }; + + const sortyByFurnitureClassName = (a: IPurchasableOffer, b: IPurchasableOffer) => + { + if(a.product.furnitureData.className > b.product.furnitureData.className) + { + return 1; + } + if(a == b) + { + return 0; + } + return -1; + }; + + const selectOffer = (offer: IPurchasableOffer) => + { + offer.activate(); + setCurrentOffer(offer); + }; + + const selectColor = (colorIndex: number, productName: string) => + { + const fullName = `${ productName }*${ colorIndex }`; + const index = page.offers.findIndex(offer => offer.product.furnitureData.fullName === fullName); + if(index > -1) + { + selectOffer(page.offers[index]); + } + }; + + const offers = useMemo(() => + { + const offers: IPurchasableOffer[] = []; + const addedColorableItems = new Map(); + const updatedColorableItems = new Map(); + + page.offers.sort(sortByColorIndex); + + page.offers.forEach(offer => + { + if(!offer.product) return; + + const furniData = offer.product.furnitureData; + + if(!furniData || !furniData.hasIndexedColor) + { + offers.push(offer); + } + else + { + const name = furniData.className; + const colorIndex = furniData.colorIndex; + + if(!updatedColorableItems.has(name)) + { + updatedColorableItems.set(name, []); + } + + let selectedColor = 0xFFFFFF; + + if(furniData.colors) + { + for(let color of furniData.colors) + { + if(color !== 0xFFFFFF) // skip the white colors + { + selectedColor = color; + } + } + + if(updatedColorableItems.get(name).indexOf(selectedColor) === -1) + { + updatedColorableItems.get(name)[colorIndex] = selectedColor; + } + + } + + if(!addedColorableItems.has(name)) + { + offers.push(offer); + addedColorableItems.set(name, true); + } + } + }); + offers.sort(sortyByFurnitureClassName); + setColorableItems(updatedColorableItems); + return offers; + }, [ page.offers ]); + + return ( + + + + { (!colorsShowing || !currentOffer || !colorableItems.has(currentOffer.product.furnitureData.className)) && + offers.map((offer, index) => ) + } + { (colorsShowing && currentOffer && colorableItems.has(currentOffer.product.furnitureData.className)) && + colorableItems.get(currentOffer.product.furnitureData.className).map((color, index) => selectColor(index, currentOffer.product.furnitureData.className) } />) + } + + + + { !currentOffer && + <> + { !!page.localization.getImage(1) && } + + } + { currentOffer && + <> +
+ + + { currentOffer.product.furnitureData.hasIndexedColor && + } +
+ + + { currentOffer.localizationName } +
+
+ +
+ +
+ +
+ } +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutDefaultView.tsx b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutDefaultView.tsx new file mode 100644 index 0000000000..4b86622e55 --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutDefaultView.tsx @@ -0,0 +1,61 @@ +import { FC } from 'react'; +import { GetConfigurationValue, ProductTypeEnum } from '../../../../../api'; +import { Column, Flex, Grid, LayoutImage, Text } from '../../../../../common'; +import { useCatalog } from '../../../../../hooks'; +import { CatalogHeaderView } from '../../catalog-header/CatalogHeaderView'; +import { CatalogAddOnBadgeWidgetView } from '../widgets/CatalogAddOnBadgeWidgetView'; +import { CatalogItemGridWidgetView } from '../widgets/CatalogItemGridWidgetView'; +import { CatalogLimitedItemWidgetView } from '../widgets/CatalogLimitedItemWidgetView'; +import { CatalogPurchaseWidgetView } from '../widgets/CatalogPurchaseWidgetView'; +import { CatalogSpinnerWidgetView } from '../widgets/CatalogSpinnerWidgetView'; +import { CatalogTotalPriceWidget } from '../widgets/CatalogTotalPriceWidget'; +import { CatalogViewProductWidgetView } from '../widgets/CatalogViewProductWidgetView'; +import { CatalogLayoutProps } from './CatalogLayout.types'; + +export const CatalogLayoutDefaultView: FC = props => +{ + const { page = null } = props; + const { currentOffer = null, currentPage = null } = useCatalog(); + + return ( + <> + + + { GetConfigurationValue('catalog.headers') && + } + + + + { !currentOffer && + <> + { !!page.localization.getImage(1) && + } + + } + { currentOffer && + <> + + { (currentOffer.product.productType !== ProductTypeEnum.BADGE) && + <> + + + } + { (currentOffer.product.productType === ProductTypeEnum.BADGE) && } + + + + { currentOffer.localizationName } +
+
+ +
+ +
+ +
+ } +
+
+ + ); +}; diff --git a/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutGuildCustomFurniView.tsx b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutGuildCustomFurniView.tsx new file mode 100644 index 0000000000..20805ba05b --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutGuildCustomFurniView.tsx @@ -0,0 +1,48 @@ +import { FC } from 'react'; +import { Column, Grid, Text } from '../../../../../common'; +import { useCatalog } from '../../../../../hooks'; +import { CatalogGuildBadgeWidgetView } from '../widgets/CatalogGuildBadgeWidgetView'; +import { CatalogGuildSelectorWidgetView } from '../widgets/CatalogGuildSelectorWidgetView'; +import { CatalogItemGridWidgetView } from '../widgets/CatalogItemGridWidgetView'; +import { CatalogPurchaseWidgetView } from '../widgets/CatalogPurchaseWidgetView'; +import { CatalogTotalPriceWidget } from '../widgets/CatalogTotalPriceWidget'; +import { CatalogViewProductWidgetView } from '../widgets/CatalogViewProductWidgetView'; +import { CatalogLayoutProps } from './CatalogLayout.types'; + +export const CatalogLayouGuildCustomFurniView: FC = props => +{ + const { page = null } = props; + const { currentOffer = null } = useCatalog(); + + return ( + + + + + + { !currentOffer && + <> + { !!page.localization.getImage(1) && } + + } + { currentOffer && + <> +
+ + +
+ + { currentOffer.localizationName } +
+ +
+
+ +
+ +
+ } +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutGuildForumView.tsx b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutGuildForumView.tsx new file mode 100644 index 0000000000..ed87f497d1 --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutGuildForumView.tsx @@ -0,0 +1,49 @@ +import { CatalogGroupsComposer } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { SendMessageComposer } from '../../../../../api'; +import { Column, Grid, Text } from '../../../../../common'; +import { useCatalog } from '../../../../../hooks'; +import { CatalogFirstProductSelectorWidgetView } from '../widgets/CatalogFirstProductSelectorWidgetView'; +import { CatalogGuildSelectorWidgetView } from '../widgets/CatalogGuildSelectorWidgetView'; +import { CatalogPurchaseWidgetView } from '../widgets/CatalogPurchaseWidgetView'; +import { CatalogTotalPriceWidget } from '../widgets/CatalogTotalPriceWidget'; +import { CatalogLayoutProps } from './CatalogLayout.types'; + +export const CatalogLayouGuildForumView: FC = props => +{ + const { page = null } = props; + const [ selectedGroupIndex, setSelectedGroupIndex ] = useState(0); + const { currentOffer = null, setCurrentOffer = null, catalogOptions = null } = useCatalog(); + const { groups = null } = catalogOptions; + + useEffect(() => + { + SendMessageComposer(new CatalogGroupsComposer()); + }, [ page ]); + + return ( + <> + + + +
+ + + { !!currentOffer && + <> + + { currentOffer.localizationName } +
+ +
+
+ +
+ +
+ } +
+ + + ); +}; diff --git a/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutGuildFrontpageView.tsx b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutGuildFrontpageView.tsx new file mode 100644 index 0000000000..44f66b82b7 --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutGuildFrontpageView.tsx @@ -0,0 +1,29 @@ +import { CreateLinkEvent } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { LocalizeText } from '../../../../../api'; +import { Button } from '../../../../../common/Button'; +import { Column } from '../../../../../common/Column'; +import { Grid } from '../../../../../common/Grid'; +import { LayoutImage } from '../../../../../common/layout/LayoutImage'; +import { CatalogLayoutProps } from './CatalogLayout.types'; + +export const CatalogLayouGuildFrontpageView: FC = props => +{ + const { page = null } = props; + + return ( + + +
+
+
+ + + + + + + ); +}; diff --git a/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutInfoLoyaltyView.tsx b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutInfoLoyaltyView.tsx new file mode 100644 index 0000000000..a2a6a6293a --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutInfoLoyaltyView.tsx @@ -0,0 +1,15 @@ +import { FC } from 'react'; +import { CatalogLayoutProps } from './CatalogLayout.types'; + +export const CatalogLayoutInfoLoyaltyView: FC = props => +{ + const { page = null } = props; + + return ( +
+
+
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutPets2View.tsx b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutPets2View.tsx new file mode 100644 index 0000000000..3498fe058e --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutPets2View.tsx @@ -0,0 +1,8 @@ +import { FC } from 'react'; +import { CatalogLayoutProps } from './CatalogLayout.types'; +import { CatalogLayoutPets3View } from './CatalogLayoutPets3View'; + +export const CatalogLayoutPets2View: FC = props => +{ + return ; +}; diff --git a/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutPets3View.tsx b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutPets3View.tsx new file mode 100644 index 0000000000..8c2e085060 --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutPets3View.tsx @@ -0,0 +1,25 @@ +import { FC } from 'react'; +import { Column } from '../../../../../common'; +import { CatalogLayoutProps } from './CatalogLayout.types'; + +export const CatalogLayoutPets3View: FC = props => +{ + const { page = null } = props; + + const imageUrl = page.localization.getImage(1); + + return ( + +
+ { imageUrl && } +
+
+ +
+ +
+
+
+ + ); +}; diff --git a/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutRoomAdsView.tsx b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutRoomAdsView.tsx new file mode 100644 index 0000000000..4a62f88602 --- /dev/null +++ b/Coolui v3 test/src/components/catalog/views/page/layout/CatalogLayoutRoomAdsView.tsx @@ -0,0 +1,116 @@ +import { GetRoomAdPurchaseInfoComposer, GetUserEventCatsMessageComposer, PurchaseRoomAdMessageComposer, RoomAdPurchaseInfoEvent, RoomEntryData } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, SendMessageComposer } from '../../../../../api'; +import { Button, Column, Text } from '../../../../../common'; +import { useCatalog, useMessageEvent, useNavigator, useRoomPromote } from '../../../../../hooks'; +import { NitroInput } from '../../../../../layout'; +import { CatalogLayoutProps } from './CatalogLayout.types'; + +export const CatalogLayoutRoomAdsView: FC = props => +{ + const { page = null } = props; + const [ eventName, setEventName ] = useState(''); + const [ eventDesc, setEventDesc ] = useState(''); + const [ roomId, setRoomId ] = useState(-1); + const [ availableRooms, setAvailableRooms ] = useState([]); + const [ extended, setExtended ] = useState(false); + const [ categoryId, setCategoryId ] = useState(1); + const { categories = null } = useNavigator(); + const { setIsVisible = null } = useCatalog(); + const { promoteInformation, isExtended, setIsExtended } = useRoomPromote(); + + useEffect(() => + { + if(isExtended) + { + setRoomId(promoteInformation.data.flatId); + setEventName(promoteInformation.data.eventName); + setEventDesc(promoteInformation.data.eventDescription); + setCategoryId(promoteInformation.data.categoryId); + setExtended(isExtended); // This is for sending to packet + setIsExtended(false); // This is from hook useRoomPromotte + } + + }, [ isExtended, eventName, eventDesc, categoryId, promoteInformation.data, setIsExtended ]); + + const resetData = () => + { + setRoomId(-1); + setEventName(''); + setEventDesc(''); + setCategoryId(1); + setIsExtended(false); + setIsVisible(false); + }; + + const purchaseAd = () => + { + const pageId = page.pageId; + const offerId = page.offers.length >= 1 ? page.offers[0].offerId : -1; + const flatId = roomId; + const name = eventName; + const desc = eventDesc; + const catId = categoryId; + + SendMessageComposer(new PurchaseRoomAdMessageComposer(pageId, offerId, flatId, name, extended, desc, catId)); + resetData(); + }; + + useMessageEvent(RoomAdPurchaseInfoEvent, event => + { + const parser = event.getParser(); + + if(!parser) return; + + setAvailableRooms(parser.rooms); + }); + + useEffect(() => + { + SendMessageComposer(new GetRoomAdPurchaseInfoComposer()); + // TODO: someone needs to fix this for morningstar + SendMessageComposer(new GetUserEventCatsMessageComposer()); + }, []); + + return (<> + { LocalizeText('roomad.catalog_header') } + +
{ LocalizeText('roomad.catalog_text', [ 'duration' ], [ '120' ]) }
+
+ + { LocalizeText('navigator.category') } + + +
+ { LocalizeText('roomad.catalog_name') } + setEventName(event.target.value) } /> + +
+
+ { LocalizeText('roomad.catalog_description') } + + { LocalizeText('friendlist.invite.note') } +
+ + +
+ + + ); +}; diff --git a/Coolui v3 test/src/components/friends/views/friends-list/FriendsListSearchView.tsx b/Coolui v3 test/src/components/friends/views/friends-list/FriendsListSearchView.tsx new file mode 100644 index 0000000000..fd53481bb4 --- /dev/null +++ b/Coolui v3 test/src/components/friends/views/friends-list/FriendsListSearchView.tsx @@ -0,0 +1,103 @@ +import { HabboSearchComposer, HabboSearchResultData, HabboSearchResultEvent } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, OpenMessengerChat, SendMessageComposer } from '../../../../api'; +import { Column, NitroCardAccordionItemView, NitroCardAccordionSetView, NitroCardAccordionSetViewProps, Text, UserProfileIconView } from '../../../../common'; +import { useFriends, useMessageEvent } from '../../../../hooks'; + +interface FriendsSearchViewProps extends NitroCardAccordionSetViewProps +{ + +} + +export const FriendsSearchView: FC = props => +{ + const { ...rest } = props; + const [ searchValue, setSearchValue ] = useState(''); + const [ friendResults, setFriendResults ] = useState(null); + const [ otherResults, setOtherResults ] = useState(null); + const { canRequestFriend = null, requestFriend = null } = useFriends(); + + useMessageEvent(HabboSearchResultEvent, event => + { + const parser = event.getParser(); + + setFriendResults(parser.friends); + setOtherResults(parser.others); + }); + + useEffect(() => + { + if(!searchValue || !searchValue.length) return; + + const timeout = setTimeout(() => + { + if(!searchValue || !searchValue.length) return; + + SendMessageComposer(new HabboSearchComposer(searchValue)); + }, 500); + + return () => clearTimeout(timeout); + }, [ searchValue ]); + + return ( + + setSearchValue(event.target.value) } /> +
+ { friendResults && + <> + { (friendResults.length === 0) && + { LocalizeText('friendlist.search.nofriendsfound') } } + { (friendResults.length > 0) && + + { LocalizeText('friendlist.search.friendscaption', [ 'cnt' ], [ friendResults.length.toString() ]) } +
+ + { friendResults.map(result => + { + return ( + +
+ +
{ result.avatarName }
+
+
+ { result.isAvatarOnline && +
OpenMessengerChat(result.avatarId) } /> } +
+ + ); + }) } + + } + } + { otherResults && + <> + { (otherResults.length === 0) && + { LocalizeText('friendlist.search.noothersfound') } } + { (otherResults.length > 0) && + + { LocalizeText('friendlist.search.otherscaption', [ 'cnt' ], [ otherResults.length.toString() ]) } +
+ + { otherResults.map(result => + { + return ( + +
+ +
{ result.avatarName }
+
+
+ { canRequestFriend(result.avatarId) && +
requestFriend(result.avatarId, result.avatarName) } /> } +
+ + ); + }) } + + } + } +
+ + ); +}; diff --git a/Coolui v3 test/src/components/friends/views/friends-list/FriendsListView.tsx b/Coolui v3 test/src/components/friends/views/friends-list/FriendsListView.tsx new file mode 100644 index 0000000000..ef30f23d44 --- /dev/null +++ b/Coolui v3 test/src/components/friends/views/friends-list/FriendsListView.tsx @@ -0,0 +1,150 @@ +import { AddLinkEventTracker, ILinkEventTracker, RemoveFriendComposer, RemoveLinkEventTracker, SendRoomInviteComposer } from '@nitrots/nitro-renderer'; +import { FC, useCallback, useEffect, useMemo, useState } from 'react'; +import { LocalizeText, MessengerFriend, SendMessageComposer } from '../../../../api'; +import { Button, Flex, NitroCardAccordionSetView, NitroCardAccordionView, NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../common'; +import { useFriends } from '../../../../hooks'; +import { FriendsRemoveConfirmationView } from './FriendsListRemoveConfirmationView'; +import { FriendsRoomInviteView } from './FriendsListRoomInviteView'; +import { FriendsSearchView } from './FriendsListSearchView'; +import { FriendsListGroupView } from './friends-list-group/FriendsListGroupView'; +import { FriendsListRequestView } from './friends-list-request/FriendsListRequestView'; + +export const FriendsListView: FC<{}> = props => +{ + const [ isVisible, setIsVisible ] = useState(false); + const [ selectedFriendsIds, setSelectedFriendsIds ] = useState([]); + const [ showRoomInvite, setShowRoomInvite ] = useState(false); + const [ showRemoveFriendsConfirmation, setShowRemoveFriendsConfirmation ] = useState(false); + const { onlineFriends = [], offlineFriends = [], requests = [], requestFriend = null } = useFriends(); + + const removeFriendsText = useMemo(() => + { + if(!selectedFriendsIds || !selectedFriendsIds.length) return ''; + + const userNames: string[] = []; + + for(const userId of selectedFriendsIds) + { + let existingFriend: MessengerFriend = onlineFriends.find(f => f.id === userId); + + if(!existingFriend) existingFriend = offlineFriends.find(f => f.id === userId); + + if(!existingFriend) continue; + + userNames.push(existingFriend.name); + } + + return LocalizeText('friendlist.removefriendconfirm.userlist', [ 'user_names' ], [ userNames.join(', ') ]); + }, [ offlineFriends, onlineFriends, selectedFriendsIds ]); + + const selectFriend = useCallback((userId: number) => + { + if(userId < 0) return; + + setSelectedFriendsIds(prevValue => + { + const newValue = [ ...prevValue ]; + + const existingUserIdIndex: number = newValue.indexOf(userId); + + if(existingUserIdIndex > -1) + { + newValue.splice(existingUserIdIndex, 1); + } + else + { + newValue.push(userId); + } + + return newValue; + }); + }, [ setSelectedFriendsIds ]); + + const sendRoomInvite = (message: string) => + { + if(!selectedFriendsIds.length || !message || !message.length || (message.length > 255)) return; + + SendMessageComposer(new SendRoomInviteComposer(message, selectedFriendsIds)); + + setShowRoomInvite(false); + }; + + const removeSelectedFriends = () => + { + if(selectedFriendsIds.length === 0) return; + + setSelectedFriendsIds(prevValue => + { + SendMessageComposer(new RemoveFriendComposer(...prevValue)); + + return []; + }); + + setShowRemoveFriendsConfirmation(false); + }; + + useEffect(() => + { + const linkTracker: ILinkEventTracker = { + linkReceived: (url: string) => + { + const parts = url.split('/'); + + if(parts.length < 2) return; + + switch(parts[1]) + { + case 'show': + setIsVisible(true); + return; + case 'hide': + setIsVisible(false); + return; + case 'toggle': + setIsVisible(prevValue => !prevValue); + return; + case 'request': + if(parts.length < 4) return; + + requestFriend(parseInt(parts[2]), parts[3]); + } + }, + eventUrlPrefix: 'friends/' + }; + + AddLinkEventTracker(linkTracker); + + return () => RemoveLinkEventTracker(linkTracker); + }, [ requestFriend ]); + + if(!isVisible) return null; + + return ( + <> + + setIsVisible(false) } /> + + + + + + + + + + + + { selectedFriendsIds && selectedFriendsIds.length > 0 && + + + + } + + + { showRoomInvite && + setShowRoomInvite(false) } /> } + { showRemoveFriendsConfirmation && + setShowRemoveFriendsConfirmation(false) } /> } + + ); +}; diff --git a/Coolui v3 test/src/components/friends/views/friends-list/friends-list-group/FriendsListGroupItemView.tsx b/Coolui v3 test/src/components/friends/views/friends-list/friends-list-group/FriendsListGroupItemView.tsx new file mode 100644 index 0000000000..509646089b --- /dev/null +++ b/Coolui v3 test/src/components/friends/views/friends-list/friends-list-group/FriendsListGroupItemView.tsx @@ -0,0 +1,85 @@ +import { FC, MouseEvent, useState } from 'react'; +import { LocalizeText, MessengerFriend, OpenMessengerChat } from '../../../../../api'; +import { NitroCardAccordionItemView, UserProfileIconView } from '../../../../../common'; +import { useFriends } from '../../../../../hooks'; + +export const FriendsListGroupItemView: FC<{ friend: MessengerFriend, selected: boolean, selectFriend: (userId: number) => void }> = props => +{ + const { friend = null, selected = false, selectFriend = null } = props; + const [ isRelationshipOpen, setIsRelationshipOpen ] = useState(false); + const { followFriend = null, updateRelationship = null } = useFriends(); + + const clickFollowFriend = (event: MouseEvent) => + { + event.stopPropagation(); + + followFriend(friend); + }; + + const openMessengerChat = (event: MouseEvent) => + { + event.stopPropagation(); + + OpenMessengerChat(friend.id); + }; + + const openRelationship = (event: MouseEvent) => + { + event.stopPropagation(); + + setIsRelationshipOpen(true); + }; + + const clickUpdateRelationship = (event: MouseEvent, type: number) => + { + event.stopPropagation(); + + updateRelationship(friend, type); + + setIsRelationshipOpen(false); + }; + + const getCurrentRelationshipName = () => + { + if(!friend) return 'none'; + + switch(friend.relationshipStatus) + { + case MessengerFriend.RELATIONSHIP_HEART: return 'heart'; + case MessengerFriend.RELATIONSHIP_SMILE: return 'smile'; + case MessengerFriend.RELATIONSHIP_BOBBA: return 'bobba'; + default: return 'none'; + } + }; + + if(!friend) return null; + + return ( + selectFriend(friend.id) }> +
+
event.stopPropagation() }> + +
+
{ friend.name }
+
+
+ { !isRelationshipOpen && + <> + { friend.followingAllowed && +
} + { friend.online && +
} + { (friend.id > 0) && +
} + } + { isRelationshipOpen && + <> +
clickUpdateRelationship(event, MessengerFriend.RELATIONSHIP_HEART) } /> +
clickUpdateRelationship(event, MessengerFriend.RELATIONSHIP_SMILE) } /> +
clickUpdateRelationship(event, MessengerFriend.RELATIONSHIP_BOBBA) } /> +
clickUpdateRelationship(event, MessengerFriend.RELATIONSHIP_NONE) } /> + } +
+ + ); +}; diff --git a/Coolui v3 test/src/components/friends/views/friends-list/friends-list-group/FriendsListGroupView.tsx b/Coolui v3 test/src/components/friends/views/friends-list/friends-list-group/FriendsListGroupView.tsx new file mode 100644 index 0000000000..ffd4cde84c --- /dev/null +++ b/Coolui v3 test/src/components/friends/views/friends-list/friends-list-group/FriendsListGroupView.tsx @@ -0,0 +1,23 @@ +import { FC } from 'react'; +import { MessengerFriend } from '../../../../../api'; +import { FriendsListGroupItemView } from './FriendsListGroupItemView'; + +interface FriendsListGroupViewProps +{ + list: MessengerFriend[]; + selectedFriendsIds: number[]; + selectFriend: (userId: number) => void; +} + +export const FriendsListGroupView: FC = props => +{ + const { list = null, selectedFriendsIds = null, selectFriend = null } = props; + + if(!list || !list.length) return null; + + return ( + <> + { list.map((item, index) => = 0) } selectFriend={ selectFriend } />) } + + ); +}; diff --git a/Coolui v3 test/src/components/friends/views/friends-list/friends-list-request/FriendsListRequestItemView.tsx b/Coolui v3 test/src/components/friends/views/friends-list/friends-list-request/FriendsListRequestItemView.tsx new file mode 100644 index 0000000000..c06840e0d2 --- /dev/null +++ b/Coolui v3 test/src/components/friends/views/friends-list/friends-list-request/FriendsListRequestItemView.tsx @@ -0,0 +1,25 @@ +import { FC } from 'react'; +import { MessengerRequest } from '../../../../../api'; +import { NitroCardAccordionItemView, UserProfileIconView } from '../../../../../common'; +import { useFriends } from '../../../../../hooks'; + +export const FriendsListRequestItemView: FC<{ request: MessengerRequest }> = props => +{ + const { request = null } = props; + const { requestResponse = null } = useFriends(); + + if(!request) return null; + + return ( + +
+ +
{ request.name }
+
+
+
requestResponse(request.id, true) } /> +
requestResponse(request.id, false) } /> +
+ + ); +}; diff --git a/Coolui v3 test/src/components/friends/views/friends-list/friends-list-request/FriendsListRequestView.tsx b/Coolui v3 test/src/components/friends/views/friends-list/friends-list-request/FriendsListRequestView.tsx new file mode 100644 index 0000000000..686b32da75 --- /dev/null +++ b/Coolui v3 test/src/components/friends/views/friends-list/friends-list-request/FriendsListRequestView.tsx @@ -0,0 +1,29 @@ +import { FC } from 'react'; +import { LocalizeText } from '../../../../../api'; +import { Button, Column, NitroCardAccordionSetView, NitroCardAccordionSetViewProps } from '../../../../../common'; +import { useFriends } from '../../../../../hooks'; +import { FriendsListRequestItemView } from './FriendsListRequestItemView'; + +export const FriendsListRequestView: FC = props => +{ + const { children = null, ...rest } = props; + const { requests = [], requestResponse = null } = useFriends(); + + if(!requests.length) return null; + + return ( + + + + { requests.map((request, index) => ) } + +
+ +
+
+ { children } +
+ ); +}; diff --git a/Coolui v3 test/src/components/friends/views/messenger/FriendsMessengerView.tsx b/Coolui v3 test/src/components/friends/views/messenger/FriendsMessengerView.tsx new file mode 100644 index 0000000000..354ddd5b73 --- /dev/null +++ b/Coolui v3 test/src/components/friends/views/messenger/FriendsMessengerView.tsx @@ -0,0 +1,178 @@ +import { AddLinkEventTracker, FollowFriendMessageComposer, GetSessionDataManager, ILinkEventTracker, RemoveLinkEventTracker } from '@nitrots/nitro-renderer'; +import { FC, KeyboardEvent, useEffect, useRef, useState } from 'react'; +import { FaTimes } from 'react-icons/fa'; +import { GetUserProfile, LocalizeText, ReportType, SendMessageComposer } from '../../../../api'; +import { Button, Column, Flex, Grid, LayoutAvatarImageView, LayoutBadgeImageView, LayoutGridItem, LayoutItemCountView, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../common'; +import { useHelp, useMessenger } from '../../../../hooks'; +import { NitroInput } from '../../../../layout'; +import { FriendsMessengerThreadView } from './messenger-thread/FriendsMessengerThreadView'; + +export const FriendsMessengerView: FC<{}> = props => +{ + const [ isVisible, setIsVisible ] = useState(false); + const [ lastThreadId, setLastThreadId ] = useState(-1); + const [ messageText, setMessageText ] = useState(''); + const { visibleThreads = [], activeThread = null, getMessageThread = null, sendMessage = null, setActiveThreadId = null, closeThread = null } = useMessenger(); + const { report = null } = useHelp(); + const messagesBox = useRef(); + + const followFriend = () => (activeThread && activeThread.participant && SendMessageComposer(new FollowFriendMessageComposer(activeThread.participant.id))); + const openProfile = () => (activeThread && activeThread.participant && GetUserProfile(activeThread.participant.id)); + + const send = () => + { + if(!activeThread || !messageText.length) return; + + sendMessage(activeThread, GetSessionDataManager().userId, messageText); + + setMessageText(''); + }; + + const onKeyDown = (event: KeyboardEvent) => + { + if(event.key !== 'Enter') return; + + send(); + }; + + useEffect(() => + { + const linkTracker: ILinkEventTracker = { + linkReceived: (url: string) => + { + const parts = url.split('/'); + + if(parts.length === 2) + { + if(parts[1] === 'open') + { + setIsVisible(true); + + return; + } + + if(parts[1] === 'toggle') + { + setIsVisible(prevValue => !prevValue); + + return; + } + + const thread = getMessageThread(parseInt(parts[1])); + + if(!thread) return; + + setActiveThreadId(thread.threadId); + setIsVisible(true); + } + }, + eventUrlPrefix: 'friends-messenger/' + }; + + AddLinkEventTracker(linkTracker); + + return () => RemoveLinkEventTracker(linkTracker); + }, [ getMessageThread, setActiveThreadId ]); + + useEffect(() => + { + if(!isVisible || !activeThread) return; + + messagesBox.current.scrollTop = messagesBox.current.scrollHeight; + }, [ isVisible, activeThread ]); + + useEffect(() => + { + if(isVisible && !activeThread) + { + if(lastThreadId > 0) + { + setActiveThreadId(lastThreadId); + } + else + { + if(visibleThreads.length > 0) setActiveThreadId(visibleThreads[0].threadId); + } + + return; + } + + if(!isVisible && activeThread) + { + setLastThreadId(activeThread.threadId); + setActiveThreadId(-1); + } + }, [ isVisible, activeThread, lastThreadId, visibleThreads, setActiveThreadId ]); + + if(!isVisible) return null; + + return ( + + setIsVisible(false) } /> + + + + { LocalizeText('toolbar.icon.label.messenger') } + +
+ { visibleThreads && (visibleThreads.length > 0) && visibleThreads.map(thread => + { + return ( + setActiveThreadId(thread.threadId) }> + { thread.unread && + } +
+
+ { (thread.participant.id > 0) && + } + { (thread.participant.id <= 0) && + } +
+ { thread.participant.name } +
+
+ ); + }) } +
+
+
+ + { activeThread && + <> + { LocalizeText('messenger.window.separator', [ 'FRIEND_NAME' ], [ activeThread.participant.name ]) } + +
+
+ + +
+ +
+ +
+ + + + + +
+ setMessageText(event.target.value) } onKeyDown={ onKeyDown } /> + +
+ } +
+
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/friends/views/messenger/messenger-thread/FriendsMessengerThreadGroup.tsx b/Coolui v3 test/src/components/friends/views/messenger/messenger-thread/FriendsMessengerThreadGroup.tsx new file mode 100644 index 0000000000..a6c35b4fbc --- /dev/null +++ b/Coolui v3 test/src/components/friends/views/messenger/messenger-thread/FriendsMessengerThreadGroup.tsx @@ -0,0 +1,73 @@ +import { GetSessionDataManager } from '@nitrots/nitro-renderer'; +import { FC, useMemo } from 'react'; +import { GetGroupChatData, LocalizeText, MessengerGroupType, MessengerThread, MessengerThreadChat, MessengerThreadChatGroup } from '../../../../../api'; +import { Base, Flex, LayoutAvatarImageView } from '../../../../../common'; + +export const FriendsMessengerThreadGroup: FC<{ thread: MessengerThread, group: MessengerThreadChatGroup }> = props => +{ + const { thread = null, group = null } = props; + + const groupChatData = useMemo(() => ((group.type === MessengerGroupType.GROUP_CHAT) && GetGroupChatData(group.chats[0].extraData)), [ group ]); + + const isOwnChat = useMemo(() => + { + if(!thread || !group) return false; + + if((group.type === MessengerGroupType.PRIVATE_CHAT) && (group.userId === GetSessionDataManager().userId)) return true; + + if(groupChatData && group.chats.length && (groupChatData.userId === GetSessionDataManager().userId)) return true; + + return false; + }, [ thread, group, groupChatData ]); + + if(!thread || !group) return null; + + if(!group.userId) + { + return ( + <> + { group.chats.map((chat, index) => + { + return ( + + + { (chat.type === MessengerThreadChat.SECURITY_NOTIFICATION) && + + + { chat.message } + } + { (chat.type === MessengerThreadChat.ROOM_INVITE) && + + + { (LocalizeText('messenger.invitation') + ' ') }{ chat.message } + } + + + ); + }) } + + ); + } + + return ( + + + { ((group.type === MessengerGroupType.PRIVATE_CHAT) && !isOwnChat) && + } + { (groupChatData && !isOwnChat) && + } + + + + { isOwnChat && GetSessionDataManager().userName } + { !isOwnChat && (groupChatData ? groupChatData.username : thread.participant.name) } + + { group.chats.map((chat, index) => { chat.message }) } + + { isOwnChat && + + + } + + ); +}; diff --git a/Coolui v3 test/src/components/friends/views/messenger/messenger-thread/FriendsMessengerThreadView.tsx b/Coolui v3 test/src/components/friends/views/messenger/messenger-thread/FriendsMessengerThreadView.tsx new file mode 100644 index 0000000000..8636997913 --- /dev/null +++ b/Coolui v3 test/src/components/friends/views/messenger/messenger-thread/FriendsMessengerThreadView.tsx @@ -0,0 +1,16 @@ +import { FC } from 'react'; +import { MessengerThread } from '../../../../../api'; +import { FriendsMessengerThreadGroup } from './FriendsMessengerThreadGroup'; + +export const FriendsMessengerThreadView: FC<{ thread: MessengerThread }> = props => +{ + const { thread = null } = props; + + thread.setRead(); + + return ( + <> + { (thread.groups.length > 0) && thread.groups.map((group, index) => ) } + + ); +}; diff --git a/Coolui v3 test/src/components/game-center/GameCenterView.tsx b/Coolui v3 test/src/components/game-center/GameCenterView.tsx new file mode 100644 index 0000000000..3b398d5ac9 --- /dev/null +++ b/Coolui v3 test/src/components/game-center/GameCenterView.tsx @@ -0,0 +1,49 @@ +import { AddLinkEventTracker, ILinkEventTracker, RemoveLinkEventTracker } from '@nitrots/nitro-renderer'; +import { useEffect } from 'react'; +import { Flex } from '../../common'; +import { useGameCenter } from '../../hooks'; +import { GameListView } from './views/GameListView'; +import { GameStageView } from './views/GameStageView'; +import { GameView } from './views/GameView'; + +export const GameCenterView = () => +{ + const { isVisible, setIsVisible, games, accountStatus } = useGameCenter(); + + useEffect(() => + { + const toggleGameCenter = () => + { + setIsVisible(prev => !prev); + }; + + const linkTracker: ILinkEventTracker = { + linkReceived: (url: string) => + { + const value = url.split('/'); + + switch(value[1]) + { + case 'toggle': + toggleGameCenter(); + break; + } + }, + eventUrlPrefix: 'games/' + }; + + AddLinkEventTracker(linkTracker); + + return () => RemoveLinkEventTracker(linkTracker); + }, [ setIsVisible ]); + + if(!isVisible || !games || !accountStatus) return; + + return + + + + + + ; +}; diff --git a/Coolui v3 test/src/components/game-center/views/GameListView.tsx b/Coolui v3 test/src/components/game-center/views/GameListView.tsx new file mode 100644 index 0000000000..a6cced915b --- /dev/null +++ b/Coolui v3 test/src/components/game-center/views/GameListView.tsx @@ -0,0 +1,31 @@ +import { GameConfigurationData } from '@nitrots/nitro-renderer'; +import { LocalizeText } from '../../../api'; +import { useGameCenter } from '../../../hooks'; + +export const GameListView = () => +{ + const { games, selectedGame, setSelectedGame } = useGameCenter(); + + const getClasses = (game: GameConfigurationData) => + { + let classes = [ 'game-icon' ]; + + if(selectedGame === game) classes.push('selected'); + + return classes.join(' '); + }; + + const getIconImage = (game: GameConfigurationData): string => + { + return `url(${ game.assetUrl }${ game.gameNameId }_icon.png)`; + }; + + return
+ { LocalizeText('gamecenter.game_list_title') } +
+ { games && games.map((game, index) => +
setSelectedGame(game) } /> + ) } +
+
; +}; diff --git a/Coolui v3 test/src/components/game-center/views/GameStageView.tsx b/Coolui v3 test/src/components/game-center/views/GameStageView.tsx new file mode 100644 index 0000000000..06cd25f0f9 --- /dev/null +++ b/Coolui v3 test/src/components/game-center/views/GameStageView.tsx @@ -0,0 +1,46 @@ +import { Game2ExitGameMessageComposer } from '@nitrots/nitro-renderer'; +import { useEffect, useRef, useState } from 'react'; +import { SendMessageComposer } from '../../../api'; +import { useGameCenter } from '../../../hooks'; + +export const GameStageView = () => +{ + const { gameURL, setGameURL } = useGameCenter(); + const [ loadTimes, setLoadTimes ] = useState(0); + const ref = useRef(); + + useEffect(() => + { + if(!ref || ref && !ref.current) return; + + setLoadTimes(0); + + let frame: HTMLIFrameElement = document.createElement('iframe'); + + frame.src = gameURL; + frame.classList.add('game-center-stage'); + frame.classList.add('h-full'); + + frame.onload = () => + { + setLoadTimes(prev => prev += 1); + }; + + ref.current.innerHTML = ''; + ref.current.appendChild(frame); + + }, [ ref, gameURL ]); + + useEffect(() => + { + if(loadTimes > 1) + { + setGameURL(null); + SendMessageComposer(new Game2ExitGameMessageComposer()); + } + }, [ loadTimes, setGameURL ]); + + if(!gameURL) return null; + + return
; +}; diff --git a/Coolui v3 test/src/components/game-center/views/GameView.tsx b/Coolui v3 test/src/components/game-center/views/GameView.tsx new file mode 100644 index 0000000000..c5d3561a72 --- /dev/null +++ b/Coolui v3 test/src/components/game-center/views/GameView.tsx @@ -0,0 +1,55 @@ +import { Game2GetAccountGameStatusMessageComposer, GetGameStatusMessageComposer, JoinQueueMessageComposer } from '@nitrots/nitro-renderer'; +import { useEffect } from 'react'; +import { ColorUtils, LocalizeText, SendMessageComposer } from '../../../api'; +import { Button, Flex, LayoutItemCountView, Text } from '../../../common'; +import { useGameCenter } from '../../../hooks'; + +export const GameView = () => +{ + const { selectedGame, accountStatus } = useGameCenter(); + + useEffect(()=> + { + if(selectedGame) + { + SendMessageComposer(new GetGameStatusMessageComposer(selectedGame.gameId)); + SendMessageComposer(new Game2GetAccountGameStatusMessageComposer(selectedGame.gameId)); + } + },[ selectedGame ]); + + const getBgColour = (): string => + { + return ColorUtils.uintHexColor(selectedGame.bgColor); + }; + + const getBgImage = (): string => + { + return `url(${ selectedGame.assetUrl }${ selectedGame.gameNameId }_theme.png)`; + }; + + const getColor = () => + { + return ColorUtils.uintHexColor(selectedGame.textColor); + }; + + const onPlay = () => + { + SendMessageComposer(new JoinQueueMessageComposer(selectedGame.gameId)); + }; + + return + + { LocalizeText(`gamecenter.${ selectedGame.gameNameId }.description_title`) } + + { (accountStatus.hasUnlimitedGames || accountStatus.freeGamesLeft > 0) && <> + + } + { LocalizeText(`gamecenter.${ selectedGame.gameNameId }.description_content`) } + +
+ ; +}; diff --git a/Coolui v3 test/src/components/groups/GroupsView.tsx b/Coolui v3 test/src/components/groups/GroupsView.tsx new file mode 100644 index 0000000000..0399861330 --- /dev/null +++ b/Coolui v3 test/src/components/groups/GroupsView.tsx @@ -0,0 +1,63 @@ +import { AddLinkEventTracker, GroupPurchasedEvent, GroupSettingsComposer, ILinkEventTracker, RemoveLinkEventTracker } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { SendMessageComposer, TryVisitRoom } from '../../api'; +import { useGroup, useMessageEvent } from '../../hooks'; +import { GroupCreatorView } from './views/GroupCreatorView'; +import { GroupInformationStandaloneView } from './views/GroupInformationStandaloneView'; +import { GroupManagerView } from './views/GroupManagerView'; +import { GroupMembersView } from './views/GroupMembersView'; + +export const GroupsView: FC<{}> = props => +{ + const [ isCreatorVisible, setCreatorVisible ] = useState(false); + const {} = useGroup(); + + useMessageEvent(GroupPurchasedEvent, event => + { + const parser = event.getParser(); + + setCreatorVisible(false); + TryVisitRoom(parser.roomId); + }); + + useEffect(() => + { + const linkTracker: ILinkEventTracker = { + linkReceived: (url: string) => + { + const parts = url.split('/'); + + if(parts.length < 2) return; + + switch(parts[1]) + { + case 'create': + setCreatorVisible(true); + return; + case 'manage': + if(!parts[2]) return; + + setCreatorVisible(false); + SendMessageComposer(new GroupSettingsComposer(Number(parts[2]))); + return; + } + }, + eventUrlPrefix: 'groups/' + }; + + AddLinkEventTracker(linkTracker); + + return () => RemoveLinkEventTracker(linkTracker); + }, []); + + return ( + <> + { isCreatorVisible && + setCreatorVisible(false) } /> } + { !isCreatorVisible && + } + + + + ); +}; diff --git a/Coolui v3 test/src/components/groups/views/GroupBadgeCreatorView.tsx b/Coolui v3 test/src/components/groups/views/GroupBadgeCreatorView.tsx new file mode 100644 index 0000000000..3f2e905b9c --- /dev/null +++ b/Coolui v3 test/src/components/groups/views/GroupBadgeCreatorView.tsx @@ -0,0 +1,83 @@ +import { Dispatch, FC, SetStateAction, useState } from 'react'; +import { FaPlus, FaTimes } from 'react-icons/fa'; +import { GroupBadgePart } from '../../../api'; +import { Column, Flex, Grid, LayoutBadgeImageView } from '../../../common'; +import { useGroup } from '../../../hooks'; + +interface GroupBadgeCreatorViewProps +{ + badgeParts: GroupBadgePart[]; + setBadgeParts: Dispatch>; +} + +const POSITIONS: number[] = [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ]; + +export const GroupBadgeCreatorView: FC = props => +{ + const { badgeParts = [], setBadgeParts = null } = props; + const [ selectedIndex, setSelectedIndex ] = useState(-1); + const { groupCustomize = null } = useGroup(); + + const setPartProperty = (partIndex: number, property: string, value: number) => + { + const newBadgeParts = [ ...badgeParts ]; + + newBadgeParts[partIndex][property] = value; + + setBadgeParts(newBadgeParts); + + if(property === 'key') setSelectedIndex(-1); + }; + + if(!badgeParts || !badgeParts.length) return null; + + return ( + <> + { ((selectedIndex < 0) && badgeParts && (badgeParts.length > 0)) && badgeParts.map((part, index) => + { + return ( + + setSelectedIndex(index) }> + { (badgeParts[index].code && (badgeParts[index].code.length > 0)) && + } + { (!badgeParts[index].code || !badgeParts[index].code.length) && + + + } + + { (part.type !== GroupBadgePart.BASE) && + + { POSITIONS.map((position, posIndex) => + { + return
setPartProperty(index, 'position', position) } />; + }) } + } + + { (groupCustomize.badgePartColors.length > 0) && groupCustomize.badgePartColors.map((item, colorIndex) => + { + return
setPartProperty(index, 'color', (colorIndex + 1)) } />; + }) } + + + ); + }) } + { (selectedIndex >= 0) && + + { (badgeParts[selectedIndex].type === GroupBadgePart.SYMBOL) && + setPartProperty(selectedIndex, 'key', 0) }> + + + + } + { ((badgeParts[selectedIndex].type === GroupBadgePart.BASE) ? groupCustomize.badgeBases : groupCustomize.badgeSymbols).map((item, index) => + { + return ( + setPartProperty(selectedIndex, 'key', item.id) }> + + + ); + }) } + } + + ); +}; diff --git a/Coolui v3 test/src/components/groups/views/GroupCreatorView.tsx b/Coolui v3 test/src/components/groups/views/GroupCreatorView.tsx new file mode 100644 index 0000000000..ee113eacf8 --- /dev/null +++ b/Coolui v3 test/src/components/groups/views/GroupCreatorView.tsx @@ -0,0 +1,165 @@ +import { GroupBuyComposer, GroupBuyDataComposer, GroupBuyDataEvent } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { HasHabboClub, IGroupData, LocalizeText, SendMessageComposer } from '../../../api'; +import { Button, Column, Flex, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../common'; +import { useMessageEvent } from '../../../hooks'; +import { GroupTabBadgeView } from './tabs/GroupTabBadgeView'; +import { GroupTabColorsView } from './tabs/GroupTabColorsView'; +import { GroupTabCreatorConfirmationView } from './tabs/GroupTabCreatorConfirmationView'; +import { GroupTabIdentityView } from './tabs/GroupTabIdentityView'; + +interface GroupCreatorViewProps +{ + onClose: () => void; +} + +const TABS: number[] = [ 1, 2, 3, 4 ]; + +export const GroupCreatorView: FC = props => +{ + const { onClose = null } = props; + const [ currentTab, setCurrentTab ] = useState(1); + const [ closeAction, setCloseAction ] = useState<{ action: () => boolean }>(null); + const [ groupData, setGroupData ] = useState(null); + const [ availableRooms, setAvailableRooms ] = useState<{ id: number, name: string }[]>(null); + const [ purchaseCost, setPurchaseCost ] = useState(0); + + const onCloseClose = () => + { + setCloseAction(null); + setGroupData(null); + + if(onClose) onClose(); + }; + + const buyGroup = () => + { + if(!groupData) return; + + const badge = []; + + groupData.groupBadgeParts.forEach(part => + { + if(part.code) + { + badge.push(part.key); + badge.push(part.color); + badge.push(part.position); + } + }); + + SendMessageComposer(new GroupBuyComposer(groupData.groupName, groupData.groupDescription, groupData.groupHomeroomId, groupData.groupColors[0], groupData.groupColors[1], badge)); + }; + + const previousStep = () => + { + if(closeAction && closeAction.action) + { + if(!closeAction.action()) return; + } + + if(currentTab === 1) + { + onClose(); + + return; + } + + setCurrentTab(value => value - 1); + }; + + const nextStep = () => + { + if(closeAction && closeAction.action) + { + if(!closeAction.action()) return; + } + + if(currentTab === 4) + { + buyGroup(); + + return; + } + + setCurrentTab(value => (value === 4 ? value : value + 1)); + }; + + useMessageEvent(GroupBuyDataEvent, event => + { + const parser = event.getParser(); + + const rooms: { id: number, name: string }[] = []; + + parser.availableRooms.forEach((name, id) => rooms.push({ id, name })); + + setAvailableRooms(rooms); + setPurchaseCost(parser.groupCost); + }); + + useEffect(() => + { + setCurrentTab(1); + + setGroupData({ + groupId: -1, + groupName: null, + groupDescription: null, + groupHomeroomId: -1, + groupState: 1, + groupCanMembersDecorate: true, + groupColors: null, + groupBadgeParts: null + }); + + SendMessageComposer(new GroupBuyDataComposer()); + }, [ setGroupData ]); + + if(!groupData) return null; + + return ( + + + +
+ { TABS.map((tab, index) => + { + return ( + + { LocalizeText(`group.create.steplabel.${ tab }`) } + + ); + }) } +
+ +
+
+ + { LocalizeText(`group.create.stepcaption.${ currentTab }`) } + { LocalizeText(`group.create.stepdesc.${ currentTab }`) } + +
+ + { (currentTab === 1) && + } + { (currentTab === 2) && + } + { (currentTab === 3) && + } + { (currentTab === 4) && + } + +
+ + +
+ + + + ); +}; diff --git a/Coolui v3 test/src/components/groups/views/GroupInformationStandaloneView.tsx b/Coolui v3 test/src/components/groups/views/GroupInformationStandaloneView.tsx new file mode 100644 index 0000000000..d4206d7f3a --- /dev/null +++ b/Coolui v3 test/src/components/groups/views/GroupInformationStandaloneView.tsx @@ -0,0 +1,29 @@ +import { GroupInformationEvent, GroupInformationParser } from '@nitrots/nitro-renderer'; +import { FC, useState } from 'react'; +import { LocalizeText } from '../../../api'; +import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../common'; +import { useMessageEvent } from '../../../hooks'; +import { GroupInformationView } from './GroupInformationView'; + +export const GroupInformationStandaloneView: FC<{}> = props => +{ + const [ groupInformation, setGroupInformation ] = useState(null); + + useMessageEvent(GroupInformationEvent, event => + { + const parser = event.getParser(); + + if((groupInformation && (groupInformation.id === parser.id)) || parser.flag) setGroupInformation(parser); + }); + + if(!groupInformation) return null; + + return ( + + setGroupInformation(null) } /> + + setGroupInformation(null) } /> + + + ); +}; diff --git a/Coolui v3 test/src/components/groups/views/GroupInformationView.tsx b/Coolui v3 test/src/components/groups/views/GroupInformationView.tsx new file mode 100644 index 0000000000..d2f8a80544 --- /dev/null +++ b/Coolui v3 test/src/components/groups/views/GroupInformationView.tsx @@ -0,0 +1,146 @@ +import { CreateLinkEvent, GetSessionDataManager, GroupInformationParser, GroupRemoveMemberComposer } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { CatalogPageName, GetGroupManager, GetGroupMembers, GroupMembershipType, GroupType, LocalizeText, SendMessageComposer, TryJoinGroup, TryVisitRoom } from '../../../api'; +import { Button, Column, Grid, GridProps, LayoutBadgeImageView, Text } from '../../../common'; +import { useNotification } from '../../../hooks'; + +const STATES: string[] = [ 'regular', 'exclusive', 'private' ]; + +interface GroupInformationViewProps extends GridProps +{ + groupInformation: GroupInformationParser; + onJoin?: () => void; + onClose?: () => void; +} + +export const GroupInformationView: FC = props => +{ + const { groupInformation = null, onClose = null, overflow = 'hidden', ...rest } = props; + const { showConfirm = null } = useNotification(); + + const isRealOwner = (groupInformation && (groupInformation.ownerName === GetSessionDataManager().userName)); + + const joinGroup = () => (groupInformation && TryJoinGroup(groupInformation.id)); + + const leaveGroup = () => + { + showConfirm(LocalizeText('group.leaveconfirm.desc'), () => + { + SendMessageComposer(new GroupRemoveMemberComposer(groupInformation.id, GetSessionDataManager().userId)); + + if(onClose) onClose(); + }, null); + }; + + const getRoleIcon = () => + { + if(groupInformation.membershipType === GroupMembershipType.NOT_MEMBER || groupInformation.membershipType === GroupMembershipType.REQUEST_PENDING) return null; + + if(isRealOwner) return ; + + if(groupInformation.isAdmin) return ; + + return ; + }; + + const getButtonText = () => + { + if(isRealOwner) return 'group.youareowner'; + + if(groupInformation.type === GroupType.PRIVATE && groupInformation.membershipType !== GroupMembershipType.MEMBER) return ''; + + if(groupInformation.membershipType === GroupMembershipType.MEMBER) return 'group.leave'; + + if((groupInformation.membershipType === GroupMembershipType.NOT_MEMBER) && groupInformation.type === GroupType.REGULAR) return 'group.join'; + + if(groupInformation.membershipType === GroupMembershipType.REQUEST_PENDING) return 'group.membershippending'; + + if((groupInformation.membershipType === GroupMembershipType.NOT_MEMBER) && groupInformation.type === GroupType.EXCLUSIVE) return 'group.requestmembership'; + }; + + const handleButtonClick = () => + { + if((groupInformation.type === GroupType.PRIVATE) && (groupInformation.membershipType === GroupMembershipType.NOT_MEMBER)) return; + + if(groupInformation.membershipType === GroupMembershipType.MEMBER) + { + leaveGroup(); + + return; + } + + joinGroup(); + }; + + const handleAction = (action: string) => + { + switch(action) + { + case 'members': + GetGroupMembers(groupInformation.id); + break; + case 'members_pending': + GetGroupMembers(groupInformation.id, 2); + break; + case 'manage': + GetGroupManager(groupInformation.id); + break; + case 'homeroom': + TryVisitRoom(groupInformation.roomId); + break; + case 'furniture': + CreateLinkEvent('catalog/open/' + CatalogPageName.GUILD_CUSTOM_FURNI); + break; + case 'popular_groups': + CreateLinkEvent('navigator/search/groups'); + break; + } + }; + + if(!groupInformation) return null; + + return ( + + +
+ +
+ + handleAction('members') }>{ LocalizeText('group.membercount', [ 'totalMembers' ], [ groupInformation.membersCount.toString() ]) } + { (groupInformation.pendingRequestsCount > 0) && + handleAction('members_pending') }>{ LocalizeText('group.pendingmembercount', [ 'amount' ], [ groupInformation.pendingRequestsCount.toString() ]) } } + { groupInformation.isOwner && + handleAction('manage') }>{ LocalizeText('group.manage') } } + + { getRoleIcon() } +
+
+
+
+
+ { groupInformation.title } +
+ + { groupInformation.canMembersDecorate && + } +
+
+ { LocalizeText('group.created', [ 'date', 'owner' ], [ groupInformation.createdAt, groupInformation.ownerName ]) } +
+ { groupInformation.description } +
+
+
+ handleAction('homeroom') }>{ LocalizeText('group.linktobase') } + handleAction('furniture') }>{ LocalizeText('group.buyfurni') } + handleAction('popular_groups') }>{ LocalizeText('group.showgroups') } +
+ { (groupInformation.type !== GroupType.PRIVATE || groupInformation.type === GroupType.PRIVATE && groupInformation.membershipType === GroupMembershipType.MEMBER) && + } +
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/groups/views/GroupManagerView.tsx b/Coolui v3 test/src/components/groups/views/GroupManagerView.tsx new file mode 100644 index 0000000000..b8336ab7a6 --- /dev/null +++ b/Coolui v3 test/src/components/groups/views/GroupManagerView.tsx @@ -0,0 +1,119 @@ +import { GroupBadgePart, GroupInformationEvent, GroupSettingsEvent } from '@nitrots/nitro-renderer'; +import { FC, useState } from 'react'; +import { IGroupData, LocalizeText } from '../../../api'; +import { Column, NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView, Text } from '../../../common'; +import { useMessageEvent } from '../../../hooks'; +import { GroupTabBadgeView } from './tabs/GroupTabBadgeView'; +import { GroupTabColorsView } from './tabs/GroupTabColorsView'; +import { GroupTabIdentityView } from './tabs/GroupTabIdentityView'; +import { GroupTabSettingsView } from './tabs/GroupTabSettingsView'; + +const TABS: number[] = [ 1, 2, 3, 5 ]; + +export const GroupManagerView: FC<{}> = props => +{ + const [ currentTab, setCurrentTab ] = useState(1); + const [ closeAction, setCloseAction ] = useState<{ action: () => boolean }>(null); + const [ groupData, setGroupData ] = useState(null); + + const onClose = () => + { + setCloseAction(prevValue => + { + if(prevValue && prevValue.action) prevValue.action(); + + return null; + }); + + setGroupData(null); + }; + + const changeTab = (tab: number) => + { + if(closeAction && closeAction.action) closeAction.action(); + + setCurrentTab(tab); + }; + + useMessageEvent(GroupInformationEvent, event => + { + const parser = event.getParser(); + + if(!groupData || (groupData.groupId !== parser.id)) return; + + setGroupData(prevValue => + { + const newValue = { ...prevValue }; + + newValue.groupName = parser.title; + newValue.groupDescription = parser.description; + newValue.groupState = parser.type; + newValue.groupCanMembersDecorate = parser.canMembersDecorate; + + return newValue; + }); + }); + + useMessageEvent(GroupSettingsEvent, event => + { + const parser = event.getParser(); + + const groupBadgeParts: GroupBadgePart[] = []; + + parser.badgeParts.forEach((part, id) => + { + groupBadgeParts.push(new GroupBadgePart( + part.isBase ? GroupBadgePart.BASE : GroupBadgePart.SYMBOL, + part.key, + part.color, + part.position + )); + }); + + setGroupData({ + groupId: parser.id, + groupName: parser.title, + groupDescription: parser.description, + groupHomeroomId: parser.roomId, + groupState: parser.state, + groupCanMembersDecorate: parser.canMembersDecorate, + groupColors: [ parser.colorA, parser.colorB ], + groupBadgeParts + }); + }); + + if(!groupData || (groupData.groupId <= 0)) return null; + + return ( + + + + { TABS.map(tab => + { + return ( changeTab(tab) }> + { LocalizeText(`group.edit.tab.${ tab }`) } + ); + }) } + + +
+
+ + { LocalizeText(`group.edit.tabcaption.${ currentTab }`) } + { LocalizeText(`group.edit.tabdesc.${ currentTab }`) } + +
+ + { (currentTab === 1) && + } + { (currentTab === 2) && + } + { (currentTab === 3) && + } + { (currentTab === 5) && + } + + + + ); +}; diff --git a/Coolui v3 test/src/components/groups/views/GroupMembersView.tsx b/Coolui v3 test/src/components/groups/views/GroupMembersView.tsx new file mode 100644 index 0000000000..af4d9ee8bb --- /dev/null +++ b/Coolui v3 test/src/components/groups/views/GroupMembersView.tsx @@ -0,0 +1,211 @@ +import { AddLinkEventTracker, GetSessionDataManager, GroupAdminGiveComposer, GroupAdminTakeComposer, GroupConfirmMemberRemoveEvent, GroupConfirmRemoveMemberComposer, GroupMemberParser, GroupMembersComposer, GroupMembersEvent, GroupMembershipAcceptComposer, GroupMembershipDeclineComposer, GroupMembersParser, GroupRank, GroupRemoveMemberComposer, ILinkEventTracker, RemoveLinkEventTracker } from '@nitrots/nitro-renderer'; +import { FC, useCallback, useEffect, useState } from 'react'; +import { FaChevronLeft, FaChevronRight } from 'react-icons/fa'; +import { GetUserProfile, LocalizeText, SendMessageComposer } from '../../../api'; +import { Button, Column, Flex, Grid, LayoutAvatarImageView, LayoutBadgeImageView, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../common'; +import { useMessageEvent, useNotification } from '../../../hooks'; +import { classNames } from '../../../layout'; + +export const GroupMembersView: FC<{}> = props => +{ + const [ groupId, setGroupId ] = useState(-1); + const [ levelId, setLevelId ] = useState(-1); + const [ membersData, setMembersData ] = useState(null); + const [ pageId, setPageId ] = useState(-1); + const [ totalPages, setTotalPages ] = useState(0); + const [ searchQuery, setSearchQuery ] = useState(''); + const [ removingMemberName, setRemovingMemberName ] = useState(null); + const { showConfirm = null } = useNotification(); + + const getRankDescription = (member: GroupMemberParser) => + { + if(member.rank === GroupRank.OWNER) return 'group.members.owner'; + + if(membersData.admin) + { + if(member.rank === GroupRank.ADMIN) return 'group.members.removerights'; + + if(member.rank === GroupRank.MEMBER) return 'group.members.giverights'; + } + + return ''; + }; + + const refreshMembers = useCallback(() => + { + if((groupId === -1) || (levelId === -1) || (pageId === -1)) return; + + SendMessageComposer(new GroupMembersComposer(groupId, pageId, searchQuery, levelId)); + }, [ groupId, levelId, pageId, searchQuery ]); + + const toggleAdmin = (member: GroupMemberParser) => + { + if(!membersData.admin || (member.rank === GroupRank.OWNER)) return; + + if(member.rank !== GroupRank.ADMIN) SendMessageComposer(new GroupAdminGiveComposer(membersData.groupId, member.id)); + else SendMessageComposer(new GroupAdminTakeComposer(membersData.groupId, member.id)); + + refreshMembers(); + }; + + const acceptMembership = (member: GroupMemberParser) => + { + if(!membersData.admin || (member.rank !== GroupRank.REQUESTED)) return; + + SendMessageComposer(new GroupMembershipAcceptComposer(membersData.groupId, member.id)); + + refreshMembers(); + }; + + const removeMemberOrDeclineMembership = (member: GroupMemberParser) => + { + if(!membersData.admin) return; + + if(member.rank === GroupRank.REQUESTED) + { + SendMessageComposer(new GroupMembershipDeclineComposer(membersData.groupId, member.id)); + + refreshMembers(); + + return; + } + + setRemovingMemberName(member.name); + SendMessageComposer(new GroupConfirmRemoveMemberComposer(membersData.groupId, member.id)); + }; + + useMessageEvent(GroupMembersEvent, event => + { + const parser = event.getParser(); + + setMembersData(parser); + setLevelId(parser.level); + setTotalPages(Math.ceil(parser.totalMembersCount / parser.pageSize)); + }); + + useMessageEvent(GroupConfirmMemberRemoveEvent, event => + { + const parser = event.getParser(); + + showConfirm(LocalizeText(((parser.furnitureCount > 0) ? 'group.kickconfirm.desc' : 'group.kickconfirm_nofurni.desc'), [ 'user', 'amount' ], [ removingMemberName, parser.furnitureCount.toString() ]), () => + { + SendMessageComposer(new GroupRemoveMemberComposer(membersData.groupId, parser.userId)); + + refreshMembers(); + }, null); + + setRemovingMemberName(null); + }); + + useEffect(() => + { + const linkTracker: ILinkEventTracker = { + linkReceived: (url: string) => + { + const parts = url.split('/'); + + if(parts.length < 2) return; + + const groupId = (parseInt(parts[1]) || -1); + const levelId = (parseInt(parts[2]) || 3); + + setGroupId(groupId); + setLevelId(levelId); + setPageId(0); + }, + eventUrlPrefix: 'group-members/' + }; + + AddLinkEventTracker(linkTracker); + + return () => RemoveLinkEventTracker(linkTracker); + }, []); + + useEffect(() => + { + setPageId(0); + }, [ groupId, levelId, searchQuery ]); + + useEffect(() => + { + if((groupId === -1) || (levelId === -1) || (pageId === -1)) return; + + SendMessageComposer(new GroupMembersComposer(groupId, pageId, searchQuery, levelId)); + }, [ groupId, levelId, pageId, searchQuery ]); + + useEffect(() => + { + if(groupId === -1) return; + + setLevelId(-1); + setMembersData(null); + setTotalPages(0); + setSearchQuery(''); + setRemovingMemberName(null); + }, [ groupId ]); + + if((groupId === -1) || !membersData) return null; + + return ( + + setGroupId(-1) } /> + +
+ + + + + setSearchQuery(event.target.value) } /> + + +
+ + { membersData.result.map((member, index) => + { + return ( + +
GetUserProfile(member.id) }> + +
+ + GetUserProfile(member.id) }>{ member.name } + { (member.rank !== GroupRank.REQUESTED) && + { LocalizeText('group.members.since', [ 'date' ], [ member.joinedAt ]) } } + +
+ { (member.rank !== GroupRank.REQUESTED) && +
+
toggleAdmin(member) } /> +
} + { membersData.admin && (member.rank === GroupRank.REQUESTED) && + +
acceptMembership(member) } /> + } + { membersData.admin && (member.rank !== GroupRank.OWNER) && (member.id !== GetSessionDataManager().userId) && + +
removeMemberOrDeclineMembership(member) } /> + } +
+
+ ); + }) } + + + + + { LocalizeText('group.members.pageinfo', [ 'amount', 'page', 'totalPages' ], [ membersData.totalMembersCount.toString(), (membersData.pageIndex + 1).toString(), totalPages.toString() ]) } + + + + + + ); +}; diff --git a/Coolui v3 test/src/components/groups/views/GroupRoomInformationView.tsx b/Coolui v3 test/src/components/groups/views/GroupRoomInformationView.tsx new file mode 100644 index 0000000000..7be8a9242f --- /dev/null +++ b/Coolui v3 test/src/components/groups/views/GroupRoomInformationView.tsx @@ -0,0 +1,132 @@ +import { DesktopViewEvent, GetGuestRoomResultEvent, GetSessionDataManager, GroupInformationComposer, GroupInformationEvent, GroupInformationParser, GroupRemoveMemberComposer, HabboGroupDeactivatedMessageEvent, RoomEntryInfoMessageEvent } from '@nitrots/nitro-renderer'; +import { FC, useState } from 'react'; +import { FaChevronDown, FaChevronUp } from 'react-icons/fa'; +import { GetGroupInformation, GetGroupManager, GroupMembershipType, GroupType, LocalizeText, SendMessageComposer, TryJoinGroup } from '../../../api'; +import { Button, Flex, LayoutBadgeImageView, Text } from '../../../common'; +import { useMessageEvent, useNotification } from '../../../hooks'; + +export const GroupRoomInformationView: FC<{}> = props => +{ + const [ expectedGroupId, setExpectedGroupId ] = useState(0); + const [ groupInformation, setGroupInformation ] = useState(null); + const [ isOpen, setIsOpen ] = useState(true); + const { showConfirm = null } = useNotification(); + + useMessageEvent(DesktopViewEvent, event => + { + setExpectedGroupId(0); + setGroupInformation(null); + }); + + useMessageEvent(RoomEntryInfoMessageEvent, event => + { + setExpectedGroupId(0); + setGroupInformation(null); + }); + + useMessageEvent(GetGuestRoomResultEvent, event => + { + const parser = event.getParser(); + + if(!parser.roomEnter) return; + + if(parser.data.habboGroupId > 0) + { + setExpectedGroupId(parser.data.habboGroupId); + SendMessageComposer(new GroupInformationComposer(parser.data.habboGroupId, false)); + } + else + { + setExpectedGroupId(0); + setGroupInformation(null); + } + }); + + useMessageEvent(HabboGroupDeactivatedMessageEvent, event => + { + const parser = event.getParser(); + + if(!groupInformation || ((parser.groupId !== groupInformation.id) && (parser.groupId !== expectedGroupId))) return; + + setExpectedGroupId(0); + setGroupInformation(null); + }); + + useMessageEvent(GroupInformationEvent, event => + { + const parser = event.getParser(); + + if(parser.id !== expectedGroupId) return; + + setGroupInformation(parser); + }); + + const leaveGroup = () => + { + showConfirm(LocalizeText('group.leaveconfirm.desc'), () => + { + SendMessageComposer(new GroupRemoveMemberComposer(groupInformation.id, GetSessionDataManager().userId)); + }, null); + }; + + const isRealOwner = (groupInformation && (groupInformation.ownerName === GetSessionDataManager().userName)); + + const getButtonText = () => + { + if(isRealOwner) return 'group.manage'; + + if(groupInformation.type === GroupType.PRIVATE) return ''; + + if(groupInformation.membershipType === GroupMembershipType.MEMBER) return 'group.leave'; + + if((groupInformation.membershipType === GroupMembershipType.NOT_MEMBER) && groupInformation.type === GroupType.REGULAR) return 'group.join'; + + if(groupInformation.membershipType === GroupMembershipType.REQUEST_PENDING) return 'group.membershippending'; + + if((groupInformation.membershipType === GroupMembershipType.NOT_MEMBER) && groupInformation.type === GroupType.EXCLUSIVE) return 'group.requestmembership'; + }; + + const handleButtonClick = () => + { + if(isRealOwner) return GetGroupManager(groupInformation.id); + + if((groupInformation.type === GroupType.PRIVATE) && (groupInformation.membershipType === GroupMembershipType.NOT_MEMBER)) return; + + if(groupInformation.membershipType === GroupMembershipType.MEMBER) + { + leaveGroup(); + + return; + } + + TryJoinGroup(groupInformation.id); + }; + + if(!groupInformation) return null; + + return ( +
+
+ setIsOpen(value => !value) }> + { LocalizeText('group.homeroominfo.title') } + { isOpen && } + { !isOpen && } + + { isOpen && + <> + GetGroupInformation(groupInformation.id) }> +
+ +
+ { groupInformation.title } +
+ { (groupInformation.type !== GroupType.PRIVATE || isRealOwner) && + + } + } +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/groups/views/tabs/GroupTabBadgeView.tsx b/Coolui v3 test/src/components/groups/views/tabs/GroupTabBadgeView.tsx new file mode 100644 index 0000000000..33c3cd34f5 --- /dev/null +++ b/Coolui v3 test/src/components/groups/views/tabs/GroupTabBadgeView.tsx @@ -0,0 +1,120 @@ +import { GroupSaveBadgeComposer } from '@nitrots/nitro-renderer'; +import { Dispatch, FC, SetStateAction, useCallback, useEffect, useState } from 'react'; +import { GroupBadgePart, IGroupData, SendMessageComposer } from '../../../../api'; +import { Column, Flex, Grid, LayoutBadgeImageView } from '../../../../common'; +import { useGroup } from '../../../../hooks'; +import { GroupBadgeCreatorView } from '../GroupBadgeCreatorView'; + +interface GroupTabBadgeViewProps +{ + skipDefault?: boolean; + setCloseAction: Dispatch boolean }>>; + groupData: IGroupData; + setGroupData: Dispatch>; +} + +export const GroupTabBadgeView: FC = props => +{ + const { groupData = null, setGroupData = null, setCloseAction = null, skipDefault = null } = props; + const [ badgeParts, setBadgeParts ] = useState(null); + const { groupCustomize = null } = useGroup(); + + const getModifiedBadgeCode = () => + { + if(!badgeParts || !badgeParts.length) return ''; + + let badgeCode = ''; + + badgeParts.forEach(part => (part.code && (badgeCode += part.code))); + + return badgeCode; + }; + + const saveBadge = useCallback(() => + { + if(!groupData || !badgeParts || !badgeParts.length) return false; + + if((groupData.groupBadgeParts === badgeParts)) return true; + + if(groupData.groupId <= 0) + { + setGroupData(prevValue => + { + const newValue = { ...prevValue }; + + newValue.groupBadgeParts = badgeParts; + + return newValue; + }); + + return true; + } + + const badge = []; + + badgeParts.forEach(part => + { + if(!part.code) return; + + badge.push(part.key); + badge.push(part.color); + badge.push(part.position); + }); + + SendMessageComposer(new GroupSaveBadgeComposer(groupData.groupId, badge)); + + return true; + }, [ groupData, badgeParts, setGroupData ]); + + useEffect(() => + { + if(groupData.groupBadgeParts) return; + + const badgeParts = [ + new GroupBadgePart(GroupBadgePart.BASE, groupCustomize.badgeBases[0].id, groupCustomize.badgePartColors[0].id), + new GroupBadgePart(GroupBadgePart.SYMBOL, 0, groupCustomize.badgePartColors[0].id), + new GroupBadgePart(GroupBadgePart.SYMBOL, 0, groupCustomize.badgePartColors[0].id), + new GroupBadgePart(GroupBadgePart.SYMBOL, 0, groupCustomize.badgePartColors[0].id), + new GroupBadgePart(GroupBadgePart.SYMBOL, 0, groupCustomize.badgePartColors[0].id) + ]; + + setGroupData(prevValue => + { + const groupBadgeParts = badgeParts; + + return { ...prevValue, groupBadgeParts }; + }); + }, [ groupData.groupBadgeParts, groupCustomize, setGroupData ]); + + useEffect(() => + { + if(groupData.groupId <= 0) + { + setBadgeParts(groupData.groupBadgeParts ? [ ...groupData.groupBadgeParts ] : null); + + return; + } + + setBadgeParts(groupData.groupBadgeParts); + }, [ groupData ]); + + useEffect(() => + { + setCloseAction({ action: saveBadge }); + + return () => setCloseAction(null); + }, [ setCloseAction, saveBadge ]); + + return ( + + + + + + + + + + + ); +}; diff --git a/Coolui v3 test/src/components/groups/views/tabs/GroupTabColorsView.tsx b/Coolui v3 test/src/components/groups/views/tabs/GroupTabColorsView.tsx new file mode 100644 index 0000000000..37a7fbfe1e --- /dev/null +++ b/Coolui v3 test/src/components/groups/views/tabs/GroupTabColorsView.tsx @@ -0,0 +1,128 @@ +import { GroupSaveColorsComposer } from '@nitrots/nitro-renderer'; +import { Dispatch, FC, SetStateAction, useCallback, useEffect, useState } from 'react'; +import { IGroupData, LocalizeText, SendMessageComposer } from '../../../../api'; +import { AutoGrid, Column, Grid, Text } from '../../../../common'; +import { useGroup } from '../../../../hooks'; +import { classNames } from '../../../../layout'; + +interface GroupTabColorsViewProps +{ + groupData: IGroupData; + setGroupData: Dispatch>; + setCloseAction: Dispatch boolean }>>; +} + +export const GroupTabColorsView: FC = props => +{ + const { groupData = null, setGroupData = null, setCloseAction = null } = props; + const [ colors, setColors ] = useState(null); + const { groupCustomize = null } = useGroup(); + + const getGroupColor = (colorIndex: number) => + { + if(colorIndex === 0) return groupCustomize.groupColorsA.find(color => (color.id === colors[colorIndex])).color; + + return groupCustomize.groupColorsB.find(color => (color.id === colors[colorIndex])).color; + }; + + const selectColor = (colorIndex: number, colorId: number) => + { + setColors(prevValue => + { + const newColors = [ ...prevValue ]; + + newColors[colorIndex] = colorId; + + return newColors; + }); + }; + + const saveColors = useCallback(() => + { + if(!groupData || !colors || !colors.length) return false; + + if(groupData.groupColors === colors) return true; + + if(groupData.groupId <= 0) + { + setGroupData(prevValue => + { + const newValue = { ...prevValue }; + + newValue.groupColors = [ ...colors ]; + + return newValue; + }); + + return true; + } + + SendMessageComposer(new GroupSaveColorsComposer(groupData.groupId, colors[0], colors[1])); + + return true; + }, [ groupData, colors, setGroupData ]); + + useEffect(() => + { + if(!groupCustomize.groupColorsA || !groupCustomize.groupColorsB || groupData.groupColors) return; + + const groupColors = [ groupCustomize.groupColorsA[0].id, groupCustomize.groupColorsB[0].id ]; + + setGroupData(prevValue => + { + return { ...prevValue, groupColors }; + }); + }, [ groupCustomize, groupData.groupColors, setGroupData ]); + + useEffect(() => + { + if(groupData.groupId <= 0) + { + setColors(groupData.groupColors ? [ ...groupData.groupColors ] : null); + + return; + } + + setColors(groupData.groupColors); + }, [ groupData ]); + + useEffect(() => + { + setCloseAction({ action: saveColors }); + + return () => setCloseAction(null); + }, [ setCloseAction, saveColors ]); + + if(!colors) return null; + + return ( + + + { LocalizeText('group.edit.color.guild.color') } + { groupData.groupColors && (groupData.groupColors.length > 0) && +
+
+
+
} + + + { LocalizeText('group.edit.color.primary.color') } + + { groupData.groupColors && groupCustomize.groupColorsA && groupCustomize.groupColorsA.map((item, index) => + { + return
selectColor(0, item.id) }>
; + }) } +
+
+ + { LocalizeText('group.edit.color.secondary.color') } + + { groupData.groupColors && groupCustomize.groupColorsB && groupCustomize.groupColorsB.map((item, index) => + { + return
selectColor(1, item.id) }>
; + }) } +
+
+ + ); +}; diff --git a/Coolui v3 test/src/components/groups/views/tabs/GroupTabCreatorConfirmationView.tsx b/Coolui v3 test/src/components/groups/views/tabs/GroupTabCreatorConfirmationView.tsx new file mode 100644 index 0000000000..9c76e250e9 --- /dev/null +++ b/Coolui v3 test/src/components/groups/views/tabs/GroupTabCreatorConfirmationView.tsx @@ -0,0 +1,67 @@ +import { Dispatch, FC, SetStateAction } from 'react'; +import { IGroupData, LocalizeText } from '../../../../api'; +import { Column, Flex, Grid, LayoutBadgeImageView, Text } from '../../../../common'; +import { useGroup } from '../../../../hooks'; + +interface GroupTabCreatorConfirmationViewProps +{ + groupData: IGroupData; + setGroupData: Dispatch>; + purchaseCost: number; +} + +export const GroupTabCreatorConfirmationView: FC = props => +{ + const { groupData = null, setGroupData = null, purchaseCost = 0 } = props; + const { groupCustomize = null } = useGroup(); + + const getCompleteBadgeCode = () => + { + if(!groupData || !groupData.groupBadgeParts || !groupData.groupBadgeParts.length) return ''; + + let badgeCode = ''; + + groupData.groupBadgeParts.forEach(part => (part.code && (badgeCode += part.code))); + + return badgeCode; + }; + + const getGroupColor = (colorIndex: number) => + { + if(colorIndex === 0) return groupCustomize.groupColorsA.find(c => c.id === groupData.groupColors[colorIndex]).color; + + return groupCustomize.groupColorsB.find(c => c.id === groupData.groupColors[colorIndex]).color; + }; + + if(!groupData) return null; + + return ( + + + + { LocalizeText('group.create.confirm.guildbadge') } + + + + { LocalizeText('group.edit.color.guild.color') } + +
+
+ + + + +
+
+ { groupData.groupName } + { groupData.groupDescription } +
+ { LocalizeText('group.create.confirm.info') } +
+ + { LocalizeText('group.create.confirm.buyinfo', [ 'amount' ], [ purchaseCost.toString() ]) } + +
+ + ); +}; diff --git a/Coolui v3 test/src/components/groups/views/tabs/GroupTabIdentityView.tsx b/Coolui v3 test/src/components/groups/views/tabs/GroupTabIdentityView.tsx new file mode 100644 index 0000000000..11e3e96ee3 --- /dev/null +++ b/Coolui v3 test/src/components/groups/views/tabs/GroupTabIdentityView.tsx @@ -0,0 +1,203 @@ +import +{ + CreateLinkEvent, + GroupDeleteComposer, + GroupSaveInformationComposer, +} from '@nitrots/nitro-renderer'; +import +{ + Dispatch, + FC, + SetStateAction, + useCallback, + useEffect, + useState, +} from 'react'; +import { IGroupData, LocalizeText, SendMessageComposer } from '../../../../api'; +import { Button, Column, Text } from '../../../../common'; +import { useNotification } from '../../../../hooks'; +import { NitroInput } from '../../../../layout'; + +interface GroupTabIdentityViewProps { + groupData: IGroupData; + setGroupData: Dispatch>; + setCloseAction: Dispatch boolean }>>; + onClose: () => void; + isCreator?: boolean; + availableRooms?: { id: number; name: string }[]; +} + +export const GroupTabIdentityView: FC = (props) => +{ + const { + groupData = null, + setGroupData = null, + setCloseAction = null, + onClose = null, + isCreator = false, + availableRooms = [], + } = props; + const [groupName, setGroupName] = useState(''); + const [groupDescription, setGroupDescription] = useState(''); + const [groupHomeroomId, setGroupHomeroomId] = useState(-1); + const { showConfirm = null } = useNotification(); + + const deleteGroup = () => + { + if(!groupData || groupData.groupId <= 0) return; + + showConfirm( + LocalizeText('group.deleteconfirm.desc'), + () => + { + SendMessageComposer(new GroupDeleteComposer(groupData.groupId)); + + if(onClose) onClose(); + }, + null, + null, + null, + LocalizeText('group.deleteconfirm.title') + ); + }; + + const saveIdentity = useCallback(() => + { + if(!groupData || !groupName || !groupName.length) return false; + + if( + groupName === groupData.groupName && + groupDescription === groupData.groupDescription + ) + return true; + + if(groupData.groupId <= 0) + { + if(groupHomeroomId <= 0) return false; + + setGroupData((prevValue) => + { + const newValue = { ...prevValue }; + + newValue.groupName = groupName; + newValue.groupDescription = groupDescription; + newValue.groupHomeroomId = groupHomeroomId; + + return newValue; + }); + + return true; + } + + SendMessageComposer( + new GroupSaveInformationComposer( + groupData.groupId, + groupName, + groupDescription || '' + ) + ); + + return true; + }, [groupData, groupName, groupDescription, groupHomeroomId, setGroupData]); + + useEffect(() => + { + setGroupName(groupData.groupName || ''); + setGroupDescription(groupData.groupDescription || ''); + setGroupHomeroomId(groupData.groupHomeroomId); + }, [groupData]); + + useEffect(() => + { + setCloseAction({ action: saveIdentity }); + + return () => setCloseAction(null); + }, [setCloseAction, saveIdentity]); + + if(!groupData) return null; + + return ( + +
+
+ + {LocalizeText('group.edit.name')} + + setGroupName(event.target.value)} + /> +
+
+ + {LocalizeText('group.edit.desc')} + + + +
+ ); +}; diff --git a/Coolui v3 test/src/components/guide-tool/views/GuideToolUserFeedbackView.tsx b/Coolui v3 test/src/components/guide-tool/views/GuideToolUserFeedbackView.tsx new file mode 100644 index 0000000000..e76b669bff --- /dev/null +++ b/Coolui v3 test/src/components/guide-tool/views/GuideToolUserFeedbackView.tsx @@ -0,0 +1,43 @@ +import { GuideSessionFeedbackMessageComposer } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { LocalizeText, SendMessageComposer } from '../../../api'; +import { Button, Column, Flex, Text } from '../../../common'; + +interface GuideToolUserFeedbackViewProps +{ + userName: string; +} + +export const GuideToolUserFeedbackView: FC = props => +{ + const { userName = null } = props; + + const giveFeedback = (recommend: boolean) => SendMessageComposer(new GuideSessionFeedbackMessageComposer(recommend)); + + return ( +
+ + + { userName } + { LocalizeText('guide.help.request.user.feedback.guide.desc') } + + + +
+ { LocalizeText('guide.help.request.user.feedback.closed.title') } + { LocalizeText('guide.help.request.user.feedback.closed.desc') } +
+ { userName && (userName.length > 0) && + <> +
+
+ { LocalizeText('guide.help.request.user.feedback.question') } +
+ + +
+
+ } +
+ ); +}; diff --git a/Coolui v3 test/src/components/guide-tool/views/GuideToolUserNoHelpersView.tsx b/Coolui v3 test/src/components/guide-tool/views/GuideToolUserNoHelpersView.tsx new file mode 100644 index 0000000000..9469e783a6 --- /dev/null +++ b/Coolui v3 test/src/components/guide-tool/views/GuideToolUserNoHelpersView.tsx @@ -0,0 +1,13 @@ +import { FC } from 'react'; +import { LocalizeText } from '../../../api'; +import { Text } from '../../../common'; + +export const GuideToolUserNoHelpersView: FC<{}> = props => +{ + return ( +
+ { LocalizeText('guide.help.request.no_tour_guides.title') } + { LocalizeText('guide.help.request.no_tour_guides.message') } +
+ ); +}; diff --git a/Coolui v3 test/src/components/guide-tool/views/GuideToolUserPendingView.tsx b/Coolui v3 test/src/components/guide-tool/views/GuideToolUserPendingView.tsx new file mode 100644 index 0000000000..d897ced94d --- /dev/null +++ b/Coolui v3 test/src/components/guide-tool/views/GuideToolUserPendingView.tsx @@ -0,0 +1,33 @@ +import { GuideSessionRequesterCancelsMessageComposer } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { LocalizeText, SendMessageComposer } from '../../../api'; +import { Button, Column, Text } from '../../../common'; + +interface GuideToolUserPendingViewProps +{ + helpRequestDescription: string; + helpRequestAverageTime: number; +} + +export const GuideToolUserPendingView: FC = props => +{ + const { helpRequestDescription = null, helpRequestAverageTime = 0 } = props; + + const cancelRequest = () => SendMessageComposer(new GuideSessionRequesterCancelsMessageComposer()); + + return ( +
+ + { LocalizeText('guide.help.request.guide.accept.request.title') } + { LocalizeText('guide.help.request.type.1') } + { helpRequestDescription } + +
+ { LocalizeText('guide.help.request.user.pending.info.title') } + { LocalizeText('guide.help.request.user.pending.info.message') } + { LocalizeText('guide.help.request.user.pending.info.waiting', [ 'waitingtime' ], [ helpRequestAverageTime.toString() ]) } +
+ +
+ ); +}; diff --git a/Coolui v3 test/src/components/guide-tool/views/GuideToolUserSomethingWrogView.tsx b/Coolui v3 test/src/components/guide-tool/views/GuideToolUserSomethingWrogView.tsx new file mode 100644 index 0000000000..6943379013 --- /dev/null +++ b/Coolui v3 test/src/components/guide-tool/views/GuideToolUserSomethingWrogView.tsx @@ -0,0 +1,12 @@ +import { FC } from 'react'; +import { LocalizeText } from '../../../api'; +import { Text } from '../../../common'; + +export const GuideToolUserSomethingWrogView: FC<{}> = props => +{ + return ( +
+ { LocalizeText('guide.help.request.user.guide.disconnected.error.desc') } +
+ ); +}; diff --git a/Coolui v3 test/src/components/guide-tool/views/GuideToolUserThanksView.tsx b/Coolui v3 test/src/components/guide-tool/views/GuideToolUserThanksView.tsx new file mode 100644 index 0000000000..cc74925112 --- /dev/null +++ b/Coolui v3 test/src/components/guide-tool/views/GuideToolUserThanksView.tsx @@ -0,0 +1,13 @@ +import { FC } from 'react'; +import { LocalizeText } from '../../../api'; +import { Text } from '../../../common'; + +export const GuideToolUserThanksView: FC<{}> = props => +{ + return ( +
+ { LocalizeText('guide.help.request.user.thanks.info.title') } + { LocalizeText('guide.help.request.user.thanks.info.desc') } +
+ ); +}; diff --git a/Coolui v3 test/src/components/hc-center/HcCenterView.tsx b/Coolui v3 test/src/components/hc-center/HcCenterView.tsx new file mode 100644 index 0000000000..206994eac5 --- /dev/null +++ b/Coolui v3 test/src/components/hc-center/HcCenterView.tsx @@ -0,0 +1,199 @@ +import { AddLinkEventTracker, ClubGiftInfoEvent, CreateLinkEvent, GetClubGiftInfo, ILinkEventTracker, RemoveLinkEventTracker, ScrGetKickbackInfoMessageComposer, ScrKickbackData, ScrSendKickbackInfoMessageEvent } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { ClubStatus, FriendlyTime, GetClubBadge, GetConfigurationValue, LocalizeText, SendMessageComposer } from '../../api'; +import { Button, Column, Flex, LayoutAvatarImageView, LayoutBadgeImageView, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../common'; +import { useInventoryBadges, useMessageEvent, usePurse, useSessionInfo } from '../../hooks'; + + +export const HcCenterView: FC<{}> = props => +{ + const [ isVisible, setIsVisible ] = useState(false); + const [ kickbackData, setKickbackData ] = useState(null); + const [ unclaimedGifts, setUnclaimedGifts ] = useState(0); + const [ badgeCode, setBadgeCode ] = useState(null); + const { userFigure = null } = useSessionInfo(); + const { purse = null, clubStatus = null } = usePurse(); + const { badgeCodes = [], activate = null, deactivate = null } = useInventoryBadges(); + + const getClubText = () => + { + if(purse.clubDays <= 0) return LocalizeText('purse.clubdays.zero.amount.text'); + + if((purse.minutesUntilExpiration > -1) && (purse.minutesUntilExpiration < (60 * 24))) + { + return FriendlyTime.shortFormat(purse.minutesUntilExpiration * 60); + } + + return FriendlyTime.shortFormat(((purse.clubPeriods * 31) + purse.clubDays) * 86400); + }; + + const getInfoText = () => + { + switch(clubStatus) + { + case ClubStatus.ACTIVE: + return LocalizeText(`hccenter.status.${ clubStatus }.info`, [ 'timeleft', 'joindate', 'streakduration' ], [ getClubText(), kickbackData?.firstSubscriptionDate, FriendlyTime.shortFormat(kickbackData?.currentHcStreak * 86400) ]); + case ClubStatus.EXPIRED: + return LocalizeText(`hccenter.status.${ clubStatus }.info`, [ 'joindate' ], [ kickbackData?.firstSubscriptionDate ]); + default: + return LocalizeText(`hccenter.status.${ clubStatus }.info`); + } + }; + + const getHcPaydayTime = () => (!kickbackData || kickbackData.timeUntilPayday < 60) ? LocalizeText('hccenter.special.time.soon') : FriendlyTime.shortFormat(kickbackData.timeUntilPayday * 60); + const getHcPaydayAmount = () => LocalizeText('hccenter.special.sum', [ 'credits' ], [ (kickbackData?.creditRewardForStreakBonus + kickbackData?.creditRewardForMonthlySpent).toString() ]); + + useMessageEvent(ClubGiftInfoEvent, event => + { + const parser = event.getParser(); + + setUnclaimedGifts(parser.giftsAvailable); + }); + + useMessageEvent(ScrSendKickbackInfoMessageEvent, event => + { + const parser = event.getParser(); + + setKickbackData(parser.data); + }); + + useEffect(() => + { + const linkTracker: ILinkEventTracker = { + linkReceived: (url: string) => + { + const parts = url.split('/'); + + if(parts.length < 2) return; + + switch(parts[1]) + { + case 'open': + if(parts.length > 2) + { + switch(parts[2]) + { + case 'hccenter': + setIsVisible(true); + break; + } + } + return; + } + }, + eventUrlPrefix: 'habboUI/' + }; + + AddLinkEventTracker(linkTracker); + + return () => RemoveLinkEventTracker(linkTracker); + }, []); + + useEffect(() => + { + setBadgeCode(GetClubBadge(badgeCodes)); + }, [ badgeCodes ]); + + useEffect(() => + { + if(!isVisible) return; + + const id = activate(); + + return () => deactivate(id); + }, [ isVisible, activate, deactivate ]); + + useEffect(() => + { + SendMessageComposer(new GetClubGiftInfo()); + SendMessageComposer(new ScrGetKickbackInfoMessageComposer()); + }, []); + + if(!isVisible) return null; + + const popover = ( + <> +
{ LocalizeText('hccenter.breakdown.title') }
+
{ LocalizeText('hccenter.breakdown.creditsspent', [ 'credits' ], [ kickbackData?.totalCreditsSpent.toString() ]) }
+
{ LocalizeText('hccenter.breakdown.paydayfactor.percent', [ 'percent' ], [ (kickbackData?.kickbackPercentage * 100).toString() ]) }
+
{ LocalizeText('hccenter.breakdown.streakbonus', [ 'credits' ], [ kickbackData?.creditRewardForStreakBonus.toString() ]) }
+
+
{ LocalizeText('hccenter.breakdown.total', [ 'credits', 'actual' ], [ getHcPaydayAmount(), ((((kickbackData?.kickbackPercentage * kickbackData?.totalCreditsSpent) + kickbackData?.creditRewardForStreakBonus) * 100) / 100).toString() ]) }
+
CreateLinkEvent('habbopages/' + GetConfigurationValue('hc.center')['payday.habbopage']) }> + { LocalizeText('hccenter.special.infolink') } +
+ + ); + + return ( + + setIsVisible(false) } /> + +
+
+ + + +
+
+ +
+ + +
+ + + { LocalizeText('hccenter.status.' + clubStatus) } + + +
+ { GetConfigurationValue('hc.center')['payday.info'] && + + + +

{ LocalizeText('hccenter.special.title') }

+
{ LocalizeText('hccenter.special.info') }
+
CreateLinkEvent('habbopages/' + GetConfigurationValue('hc.center')['payday.habbopage']) }>{ LocalizeText('hccenter.special.infolink') }
+
+
+
{ LocalizeText('hccenter.special.time.title') }
+
+
+
{ getHcPaydayTime() }
+
+ { clubStatus === ClubStatus.ACTIVE && +
+
{ LocalizeText('hccenter.special.amount.title') }
+
+
{ getHcPaydayAmount() }
+
+ { LocalizeText('hccenter.breakdown.infolink') } +
+
+
} +
+ } + { GetConfigurationValue('hc.center')['gift.info'] && +
+
+

{ LocalizeText('hccenter.gift.title') }

+
0 ? LocalizeText('hccenter.unclaimedgifts', [ 'unclaimedgifts' ], [ unclaimedGifts.toString() ]) : LocalizeText('hccenter.gift.info') } }>
+
+ +
} + { GetConfigurationValue('hc.center')['benefits.info'] && +
+
{ LocalizeText('hccenter.general.title') }
+
+ +
} + + + ); +}; diff --git a/Coolui v3 test/src/components/help/HelpView.tsx b/Coolui v3 test/src/components/help/HelpView.tsx new file mode 100644 index 0000000000..87ec07dd20 --- /dev/null +++ b/Coolui v3 test/src/components/help/HelpView.tsx @@ -0,0 +1,116 @@ +import { AddLinkEventTracker, ILinkEventTracker, RemoveLinkEventTracker } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, ReportState } from '../../api'; +import { Column, Grid, NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../common'; +import { useHelp } from '../../hooks'; +import { DescribeReportView } from './views/DescribeReportView'; +import { HelpIndexView } from './views/HelpIndexView'; +import { ReportSummaryView } from './views/ReportSummaryView'; +import { SanctionSatusView } from './views/SanctionStatusView'; +import { SelectReportedChatsView } from './views/SelectReportedChatsView'; +import { SelectReportedUserView } from './views/SelectReportedUserView'; +import { SelectTopicView } from './views/SelectTopicView'; +import { NameChangeView } from './views/name-change/NameChangeView'; + +export const HelpView: FC<{}> = props => +{ + const [ isVisible, setIsVisible ] = useState(false); + const { activeReport = null, setActiveReport = null, report = null } = useHelp(); + + const onClose = () => + { + setActiveReport(null); + setIsVisible(false); + }; + + useEffect(() => + { + const linkTracker: ILinkEventTracker = { + linkReceived: (url: string) => + { + const parts = url.split('/'); + + if(parts.length < 2) return; + + switch(parts[1]) + { + case 'show': + setIsVisible(true); + return; + case 'hide': + setIsVisible(false); + return; + case 'toggle': + setIsVisible(prevValue => !prevValue); + return; + case 'tour': + // todo: launch tour + return; + case 'report': + if((parts.length >= 5) && (parts[2] === 'room')) + { + const roomId = parseInt(parts[3]); + const unknown = unescape(parts.splice(4).join('/')); + //this.reportRoom(roomId, unknown, ""); + } + return; + } + }, + eventUrlPrefix: 'help/' + }; + + AddLinkEventTracker(linkTracker); + + return () => RemoveLinkEventTracker(linkTracker); + }, []); + + useEffect(() => + { + if(!activeReport) return; + + setIsVisible(true); + }, [ activeReport ]); + + const CurrentStepView = () => + { + if(activeReport) + { + switch(activeReport.currentStep) + { + case ReportState.SELECT_USER: + return ; + case ReportState.SELECT_CHATS: + return ; + case ReportState.SELECT_TOPICS: + return ; + case ReportState.INPUT_REPORT_MESSAGE: + return ; + case ReportState.REPORT_SUMMARY: + return ; + } + } + + return ; + }; + + return ( + <> + { isVisible && + + + + + +
+ + + + + + + } + + + + ); +}; diff --git a/Coolui v3 test/src/components/help/views/DescribeReportView.tsx b/Coolui v3 test/src/components/help/views/DescribeReportView.tsx new file mode 100644 index 0000000000..1a4360bd90 --- /dev/null +++ b/Coolui v3 test/src/components/help/views/DescribeReportView.tsx @@ -0,0 +1,48 @@ +import { FC, useState } from 'react'; +import { LocalizeText, ReportState, ReportType } from '../../../api'; +import { Button, Flex, Text } from '../../../common'; +import { useHelp } from '../../../hooks'; + +export const DescribeReportView: FC<{}> = props => +{ + const [ message, setMessage ] = useState(''); + const { activeReport = null, setActiveReport = null } = useHelp(); + + const submitMessage = () => + { + if(message.length < 15) return; + + setActiveReport(prevValue => + { + const currentStep = ReportState.REPORT_SUMMARY; + + return { ...prevValue, message, currentStep }; + }); + }; + + const back = () => + { + setActiveReport(prevValue => + { + return { ...prevValue, currentStep: (prevValue.currentStep - 1) }; + }); + }; + + return ( + <> +
+ { LocalizeText('help.emergency.chat_report.subtitle') } + { LocalizeText('help.cfh.input.text') } +
+ +
+ + +
+ + + ); +}; diff --git a/Coolui v3 test/src/components/mod-tools/views/tickets/CfhChatlogView.tsx b/Coolui v3 test/src/components/mod-tools/views/tickets/CfhChatlogView.tsx new file mode 100644 index 0000000000..9923fa9a0d --- /dev/null +++ b/Coolui v3 test/src/components/mod-tools/views/tickets/CfhChatlogView.tsx @@ -0,0 +1,41 @@ +import { CfhChatlogData, CfhChatlogEvent, GetCfhChatlogMessageComposer } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { SendMessageComposer } from '../../../../api'; +import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../common'; +import { useMessageEvent } from '../../../../hooks'; +import { ChatlogView } from '../chatlog/ChatlogView'; + +interface CfhChatlogViewProps +{ + issueId: number; + onCloseClick(): void; +} + +export const CfhChatlogView: FC = props => +{ + const { onCloseClick = null, issueId = null } = props; + const [ chatlogData, setChatlogData ] = useState(null); + + useMessageEvent(CfhChatlogEvent, event => + { + const parser = event.getParser(); + + if(!parser || parser.data.issueId !== issueId) return; + + setChatlogData(parser.data); + }); + + useEffect(() => + { + SendMessageComposer(new GetCfhChatlogMessageComposer(issueId)); + }, [ issueId ]); + + return ( + + + + { chatlogData && } + + + ); +}; diff --git a/Coolui v3 test/src/components/mod-tools/views/tickets/ModToolsIssueInfoView.tsx b/Coolui v3 test/src/components/mod-tools/views/tickets/ModToolsIssueInfoView.tsx new file mode 100644 index 0000000000..7444a73a3d --- /dev/null +++ b/Coolui v3 test/src/components/mod-tools/views/tickets/ModToolsIssueInfoView.tsx @@ -0,0 +1,86 @@ +import { CloseIssuesMessageComposer, ReleaseIssuesMessageComposer } from '@nitrots/nitro-renderer'; +import { FC, useState } from 'react'; +import { GetIssueCategoryName, LocalizeText, SendMessageComposer } from '../../../../api'; +import { Button, Column, Grid, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../common'; +import { useModTools } from '../../../../hooks'; +import { CfhChatlogView } from './CfhChatlogView'; + +interface IssueInfoViewProps +{ + issueId: number; + onIssueInfoClosed(issueId: number): void; +} + +export const ModToolsIssueInfoView: FC = props => +{ + const { issueId = null, onIssueInfoClosed = null } = props; + const [ cfhChatlogOpen, setcfhChatlogOpen ] = useState(false); + const { tickets = [], openUserInfo = null } = useModTools(); + const ticket = tickets.find(issue => (issue.issueId === issueId)); + + const releaseIssue = (issueId: number) => + { + SendMessageComposer(new ReleaseIssuesMessageComposer([ issueId ])); + + onIssueInfoClosed(issueId); + }; + + const closeIssue = (resolutionType: number) => + { + SendMessageComposer(new CloseIssuesMessageComposer([ issueId ], resolutionType)); + + onIssueInfoClosed(issueId); + }; + + return ( + <> + + onIssueInfoClosed(issueId) } /> + + Issue Information + + + + + + + + + + + + + + + + + + + + + + + + + +
Source{ GetIssueCategoryName(ticket.categoryId) }
Category{ LocalizeText('help.cfh.topic.' + ticket.reportedCategoryId) }
Description{ ticket.message }
Caller + openUserInfo(ticket.reporterUserId) }>{ ticket.reporterUserName } +
Reported User + openUserInfo(ticket.reportedUserId) }>{ ticket.reportedUserName } +
+
+ + + + + + + +
+
+
+ { cfhChatlogOpen && + setcfhChatlogOpen(false) }/> } + + ); +}; diff --git a/Coolui v3 test/src/components/mod-tools/views/tickets/ModToolsMyIssuesTabView.tsx b/Coolui v3 test/src/components/mod-tools/views/tickets/ModToolsMyIssuesTabView.tsx new file mode 100644 index 0000000000..a8de00ea01 --- /dev/null +++ b/Coolui v3 test/src/components/mod-tools/views/tickets/ModToolsMyIssuesTabView.tsx @@ -0,0 +1,47 @@ +import { IssueMessageData, ReleaseIssuesMessageComposer } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { SendMessageComposer } from '../../../../api'; +import { Button, Column, Grid } from '../../../../common'; + +interface ModToolsMyIssuesTabViewProps +{ + myIssues: IssueMessageData[]; + handleIssue: (issueId: number) => void; +} + +export const ModToolsMyIssuesTabView: FC = props => +{ + const { myIssues = null, handleIssue = null } = props; + + return ( + + + +
Type
+
Room/Player
+
Opened
+
+
+
+
+ + { myIssues && (myIssues.length > 0) && myIssues.map(issue => + { + return ( + +
{ issue.categoryId }
+
{ issue.reportedUserName }
+
{ new Date(Date.now() - issue.issueAgeInMilliseconds).toLocaleTimeString() }
+
+ +
+
+ +
+
+ ); + }) } +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/mod-tools/views/tickets/ModToolsOpenIssuesTabView.tsx b/Coolui v3 test/src/components/mod-tools/views/tickets/ModToolsOpenIssuesTabView.tsx new file mode 100644 index 0000000000..17e4901dc6 --- /dev/null +++ b/Coolui v3 test/src/components/mod-tools/views/tickets/ModToolsOpenIssuesTabView.tsx @@ -0,0 +1,42 @@ +import { IssueMessageData, PickIssuesMessageComposer } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { SendMessageComposer } from '../../../../api'; +import { Button, Column, Grid } from '../../../../common'; + +interface ModToolsOpenIssuesTabViewProps +{ + openIssues: IssueMessageData[]; +} + +export const ModToolsOpenIssuesTabView: FC = props => +{ + const { openIssues = null } = props; + + return ( + + + +
Type
+
Room/Player
+
Opened
+
+
+
+ + { openIssues && (openIssues.length > 0) && openIssues.map(issue => + { + return ( + +
{ issue.categoryId }
+
{ issue.reportedUserName }
+
{ new Date(Date.now() - issue.issueAgeInMilliseconds).toLocaleTimeString() }
+
+ +
+
+ ); + }) } +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/mod-tools/views/tickets/ModToolsPickedIssuesTabView.tsx b/Coolui v3 test/src/components/mod-tools/views/tickets/ModToolsPickedIssuesTabView.tsx new file mode 100644 index 0000000000..ca6003e272 --- /dev/null +++ b/Coolui v3 test/src/components/mod-tools/views/tickets/ModToolsPickedIssuesTabView.tsx @@ -0,0 +1,39 @@ +import { IssueMessageData } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { Column, Grid } from '../../../../common'; + +interface ModToolsPickedIssuesTabViewProps +{ + pickedIssues: IssueMessageData[]; +} + +export const ModToolsPickedIssuesTabView: FC = props => +{ + const { pickedIssues = null } = props; + + return ( + + + +
Type
+
Room/Player
+
Opened
+
Picker
+
+
+ + { pickedIssues && (pickedIssues.length > 0) && pickedIssues.map(issue => + { + return ( + +
{ issue.categoryId }
+
{ issue.reportedUserName }
+
{ new Date(Date.now() - issue.issueAgeInMilliseconds).toLocaleTimeString() }
+
{ issue.pickerUserName }
+
+ ); + }) } +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/mod-tools/views/tickets/ModToolsTicketsView.tsx b/Coolui v3 test/src/components/mod-tools/views/tickets/ModToolsTicketsView.tsx new file mode 100644 index 0000000000..ab7ac35f3d --- /dev/null +++ b/Coolui v3 test/src/components/mod-tools/views/tickets/ModToolsTicketsView.tsx @@ -0,0 +1,90 @@ +import { GetSessionDataManager, IssueMessageData } from '@nitrots/nitro-renderer'; +import { FC, useState } from 'react'; +import { NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from '../../../../common'; +import { useModTools } from '../../../../hooks'; +import { ModToolsIssueInfoView } from './ModToolsIssueInfoView'; +import { ModToolsMyIssuesTabView } from './ModToolsMyIssuesTabView'; +import { ModToolsOpenIssuesTabView } from './ModToolsOpenIssuesTabView'; +import { ModToolsPickedIssuesTabView } from './ModToolsPickedIssuesTabView'; + +interface ModToolsTicketsViewProps +{ + onCloseClick: () => void; +} + +const TABS: string[] = [ + 'Open Issues', + 'My Issues', + 'Picked Issues' +]; + +export const ModToolsTicketsView: FC = props => +{ + const { onCloseClick = null } = props; + const [ currentTab, setCurrentTab ] = useState(0); + const [ issueInfoWindows, setIssueInfoWindows ] = useState([]); + const { tickets = [] } = useModTools(); + + const openIssues = tickets.filter(issue => issue.state === IssueMessageData.STATE_OPEN); + const myIssues = tickets.filter(issue => (issue.state === IssueMessageData.STATE_PICKED) && (issue.pickerUserId === GetSessionDataManager().userId)); + const pickedIssues = tickets.filter(issue => issue.state === IssueMessageData.STATE_PICKED); + + const closeIssue = (issueId: number) => + { + setIssueInfoWindows(prevValue => + { + const newValue = [ ...prevValue ]; + const existingIndex = newValue.indexOf(issueId); + + if(existingIndex >= 0) newValue.splice(existingIndex, 1); + + return newValue; + }); + }; + + const handleIssue = (issueId: number) => + { + setIssueInfoWindows(prevValue => + { + const newValue = [ ...prevValue ]; + const existingIndex = newValue.indexOf(issueId); + + if(existingIndex === -1) newValue.push(issueId); + else newValue.splice(existingIndex, 1); + + return newValue; + }); + }; + + const CurrentTabComponent = () => + { + switch(currentTab) + { + case 0: return ; + case 1: return ; + case 2: return ; + } + + return null; + }; + + return ( + <> + + + + { TABS.map((tab, index) => + { + return ( setCurrentTab(index) }> + { tab } + ); + }) } + + + + + + { issueInfoWindows && (issueInfoWindows.length > 0) && issueInfoWindows.map(issueId => ) } + + ); +}; diff --git a/Coolui v3 test/src/components/mod-tools/views/user/ModToolsUserChatlogView.tsx b/Coolui v3 test/src/components/mod-tools/views/user/ModToolsUserChatlogView.tsx new file mode 100644 index 0000000000..acae308fbf --- /dev/null +++ b/Coolui v3 test/src/components/mod-tools/views/user/ModToolsUserChatlogView.tsx @@ -0,0 +1,44 @@ +import { ChatRecordData, GetUserChatlogMessageComposer, UserChatlogEvent } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { SendMessageComposer } from '../../../../api'; +import { DraggableWindowPosition, NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../common'; +import { useMessageEvent } from '../../../../hooks'; +import { ChatlogView } from '../chatlog/ChatlogView'; + +interface ModToolsUserChatlogViewProps +{ + userId: number; + onCloseClick: () => void; +} + +export const ModToolsUserChatlogView: FC = props => +{ + const { userId = null, onCloseClick = null } = props; + const [ userChatlog, setUserChatlog ] = useState(null); + const [ username, setUsername ] = useState(null); + + useMessageEvent(UserChatlogEvent, event => + { + const parser = event.getParser(); + + if(!parser || parser.data.userId !== userId) return; + + setUsername(parser.data.username); + setUserChatlog(parser.data.roomChatlogs); + }); + + useEffect(() => + { + SendMessageComposer(new GetUserChatlogMessageComposer(userId)); + }, [ userId ]); + + return ( + + + + { userChatlog && + } + + + ); +}; diff --git a/Coolui v3 test/src/components/mod-tools/views/user/ModToolsUserModActionView.tsx b/Coolui v3 test/src/components/mod-tools/views/user/ModToolsUserModActionView.tsx new file mode 100644 index 0000000000..2dcdd3e079 --- /dev/null +++ b/Coolui v3 test/src/components/mod-tools/views/user/ModToolsUserModActionView.tsx @@ -0,0 +1,176 @@ +import { CallForHelpTopicData, DefaultSanctionMessageComposer, ModAlertMessageComposer, ModBanMessageComposer, ModKickMessageComposer, ModMessageMessageComposer, ModMuteMessageComposer, ModTradingLockMessageComposer } from '@nitrots/nitro-renderer'; +import { FC, useMemo, useState } from 'react'; +import { ISelectedUser, LocalizeText, ModActionDefinition, NotificationAlertType, SendMessageComposer } from '../../../../api'; +import { Button, DraggableWindowPosition, Flex, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../common'; +import { useModTools, useNotification } from '../../../../hooks'; + +interface ModToolsUserModActionViewProps +{ + user: ISelectedUser; + onCloseClick: () => void; +} + +const MOD_ACTION_DEFINITIONS = [ + new ModActionDefinition(1, 'Alert', ModActionDefinition.ALERT, 1, 0), + new ModActionDefinition(2, 'Mute 1h', ModActionDefinition.MUTE, 2, 0), + new ModActionDefinition(3, 'Ban 18h', ModActionDefinition.BAN, 3, 0), + new ModActionDefinition(4, 'Ban 7 days', ModActionDefinition.BAN, 4, 0), + new ModActionDefinition(5, 'Ban 30 days (step 1)', ModActionDefinition.BAN, 5, 0), + new ModActionDefinition(7, 'Ban 30 days (step 2)', ModActionDefinition.BAN, 7, 0), + new ModActionDefinition(6, 'Ban 100 years', ModActionDefinition.BAN, 6, 0), + new ModActionDefinition(106, 'Ban avatar-only 100 years', ModActionDefinition.BAN, 6, 0), + new ModActionDefinition(101, 'Kick', ModActionDefinition.KICK, 0, 0), + new ModActionDefinition(102, 'Lock trade 1 week', ModActionDefinition.TRADE_LOCK, 0, 168), + new ModActionDefinition(104, 'Lock trade permanent', ModActionDefinition.TRADE_LOCK, 0, 876000), + new ModActionDefinition(105, 'Message', ModActionDefinition.MESSAGE, 0, 0), +]; + +export const ModToolsUserModActionView: FC = props => +{ + const { user = null, onCloseClick = null } = props; + const [ selectedTopic, setSelectedTopic ] = useState(-1); + const [ selectedAction, setSelectedAction ] = useState(-1); + const [ message, setMessage ] = useState(''); + const { cfhCategories = null, settings = null } = useModTools(); + const { simpleAlert = null } = useNotification(); + + const topics = useMemo(() => + { + const values: CallForHelpTopicData[] = []; + + if(cfhCategories && cfhCategories.length) + { + for(const category of cfhCategories) + { + for(const topic of category.topics) values.push(topic); + } + } + + return values; + }, [ cfhCategories ]); + + const sendAlert = (message: string) => simpleAlert(message, NotificationAlertType.DEFAULT, null, null, 'Error'); + + const sendDefaultSanction = () => + { + let errorMessage: string = null; + + const category = topics[selectedTopic]; + + if(selectedTopic === -1) errorMessage = 'You must select a CFH topic'; + + if(errorMessage) return sendAlert(errorMessage); + + const messageOrDefault = (message.trim().length === 0) ? LocalizeText(`help.cfh.topic.${ category.id }`) : message; + + SendMessageComposer(new DefaultSanctionMessageComposer(user.userId, selectedTopic, messageOrDefault)); + + onCloseClick(); + }; + + const sendSanction = () => + { + let errorMessage: string = null; + + const category = topics[selectedTopic]; + const sanction = MOD_ACTION_DEFINITIONS[selectedAction]; + + if((selectedTopic === -1) || (selectedAction === -1)) errorMessage = 'You must select a CFH topic and Sanction'; + else if(!settings || !settings.cfhPermission) errorMessage = 'You do not have permission to do this'; + else if(!category) errorMessage = 'You must select a CFH topic'; + else if(!sanction) errorMessage = 'You must select a sanction'; + + if(errorMessage) + { + sendAlert(errorMessage); + + return; + } + + const messageOrDefault = (message.trim().length === 0) ? LocalizeText(`help.cfh.topic.${ category.id }`) : message; + + switch(sanction.actionType) + { + case ModActionDefinition.ALERT: { + if(!settings.alertPermission) + { + sendAlert('You have insufficient permissions'); + + return; + } + + SendMessageComposer(new ModAlertMessageComposer(user.userId, messageOrDefault, category.id)); + break; + } + case ModActionDefinition.MUTE: + SendMessageComposer(new ModMuteMessageComposer(user.userId, messageOrDefault, category.id)); + break; + case ModActionDefinition.BAN: { + if(!settings.banPermission) + { + sendAlert('You have insufficient permissions'); + + return; + } + + SendMessageComposer(new ModBanMessageComposer(user.userId, messageOrDefault, category.id, selectedAction, (sanction.actionId === 106))); + break; + } + case ModActionDefinition.KICK: { + if(!settings.kickPermission) + { + sendAlert('You have insufficient permissions'); + return; + } + + SendMessageComposer(new ModKickMessageComposer(user.userId, messageOrDefault, category.id)); + break; + } + case ModActionDefinition.TRADE_LOCK: { + const numSeconds = (sanction.actionLengthHours * 60); + + SendMessageComposer(new ModTradingLockMessageComposer(user.userId, messageOrDefault, numSeconds, category.id)); + break; + } + case ModActionDefinition.MESSAGE: { + if(message.trim().length === 0) + { + sendAlert('Please write a message to user'); + + return; + } + + SendMessageComposer(new ModMessageMessageComposer(user.userId, message, category.id)); + break; + } + } + + onCloseClick(); + }; + + if(!user) return null; + + return ( + + onCloseClick() } /> + + + +
+ Optional message type, overrides default + + + + + ); +}; diff --git a/Coolui v3 test/src/components/mod-tools/views/user/ModToolsUserView.tsx b/Coolui v3 test/src/components/mod-tools/views/user/ModToolsUserView.tsx new file mode 100644 index 0000000000..6f65700c58 --- /dev/null +++ b/Coolui v3 test/src/components/mod-tools/views/user/ModToolsUserView.tsx @@ -0,0 +1,156 @@ +import { CreateLinkEvent, GetModeratorUserInfoMessageComposer, ModeratorUserInfoData, ModeratorUserInfoEvent } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useMemo, useState } from 'react'; +import { FriendlyTime, LocalizeText, SendMessageComposer } from '../../../../api'; +import { Button, Column, DraggableWindowPosition, Grid, NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../common'; +import { useMessageEvent } from '../../../../hooks'; +import { ModToolsUserModActionView } from './ModToolsUserModActionView'; +import { ModToolsUserRoomVisitsView } from './ModToolsUserRoomVisitsView'; +import { ModToolsUserSendMessageView } from './ModToolsUserSendMessageView'; + +interface ModToolsUserViewProps +{ + userId: number; + onCloseClick: () => void; +} + +export const ModToolsUserView: FC = props => +{ + const { onCloseClick = null, userId = null } = props; + const [ userInfo, setUserInfo ] = useState(null); + const [ sendMessageVisible, setSendMessageVisible ] = useState(false); + const [ modActionVisible, setModActionVisible ] = useState(false); + const [ roomVisitsVisible, setRoomVisitsVisible ] = useState(false); + + const userProperties = useMemo(() => + { + if(!userInfo) return null; + + return [ + { + localeKey: 'modtools.userinfo.userName', + value: userInfo.userName, + showOnline: true + }, + { + localeKey: 'modtools.userinfo.cfhCount', + value: userInfo.cfhCount.toString() + }, + { + localeKey: 'modtools.userinfo.abusiveCfhCount', + value: userInfo.abusiveCfhCount.toString() + }, + { + localeKey: 'modtools.userinfo.cautionCount', + value: userInfo.cautionCount.toString() + }, + { + localeKey: 'modtools.userinfo.banCount', + value: userInfo.banCount.toString() + }, + { + localeKey: 'modtools.userinfo.lastSanctionTime', + value: userInfo.lastSanctionTime + }, + { + localeKey: 'modtools.userinfo.tradingLockCount', + value: userInfo.tradingLockCount.toString() + }, + { + localeKey: 'modtools.userinfo.tradingExpiryDate', + value: userInfo.tradingExpiryDate + }, + { + localeKey: 'modtools.userinfo.minutesSinceLastLogin', + value: FriendlyTime.format(userInfo.minutesSinceLastLogin * 60, '.ago', 2) + }, + { + localeKey: 'modtools.userinfo.lastPurchaseDate', + value: userInfo.lastPurchaseDate + }, + { + localeKey: 'modtools.userinfo.primaryEmailAddress', + value: userInfo.primaryEmailAddress + }, + { + localeKey: 'modtools.userinfo.identityRelatedBanCount', + value: userInfo.identityRelatedBanCount.toString() + }, + { + localeKey: 'modtools.userinfo.registrationAgeInMinutes', + value: FriendlyTime.format(userInfo.registrationAgeInMinutes * 60, '.ago', 2) + }, + { + localeKey: 'modtools.userinfo.userClassification', + value: userInfo.userClassification + } + ]; + }, [ userInfo ]); + + useMessageEvent(ModeratorUserInfoEvent, event => + { + const parser = event.getParser(); + + if(!parser || parser.data.userId !== userId) return; + + setUserInfo(parser.data); + }); + + useEffect(() => + { + SendMessageComposer(new GetModeratorUserInfoMessageComposer(userId)); + }, [ userId ]); + + if(!userInfo) return null; + + return ( + <> + + onCloseClick() } /> + + + + + + { userProperties.map( (property, index) => + { + + return ( + + + + + ); + }) } + +
{ LocalizeText(property.localeKey) } + { property.value } + { property.showOnline && + } +
+
+ + + + + + +
+
+
+ { sendMessageVisible && + setSendMessageVisible(false) } /> } + { modActionVisible && + setModActionVisible(false) } /> } + { roomVisitsVisible && + setRoomVisitsVisible(false) } /> } + + ); +}; diff --git a/Coolui v3 test/src/components/navigator/NavigatorView.tsx b/Coolui v3 test/src/components/navigator/NavigatorView.tsx new file mode 100644 index 0000000000..813c390e5e --- /dev/null +++ b/Coolui v3 test/src/components/navigator/NavigatorView.tsx @@ -0,0 +1,240 @@ +import { NitroCard } from '@layout/NitroCard'; +import { AddLinkEventTracker, ConvertGlobalRoomIdMessageComposer, HabboWebTools, ILinkEventTracker, LegacyExternalInterface, NavigatorInitComposer, NavigatorSearchComposer, RemoveLinkEventTracker, RoomSessionEvent } from '@nitrots/nitro-renderer'; +import { FC, useCallback, useEffect, useRef, useState } from 'react'; +import { FaPlus } from 'react-icons/fa'; +import { LocalizeText, SendMessageComposer, TryVisitRoom } from '../../api'; +import { useNavigator, useNitroEvent } from '../../hooks'; +import { NavigatorDoorStateView } from './views/NavigatorDoorStateView'; +import { NavigatorRoomCreatorView } from './views/NavigatorRoomCreatorView'; +import { NavigatorRoomInfoView } from './views/NavigatorRoomInfoView'; +import { NavigatorRoomLinkView } from './views/NavigatorRoomLinkView'; +import { NavigatorRoomSettingsView } from './views/room-settings/NavigatorRoomSettingsView'; +import { NavigatorSearchResultView } from './views/search/NavigatorSearchResultView'; +import { NavigatorSearchView } from './views/search/NavigatorSearchView'; + +export const NavigatorView: FC<{}> = props => +{ + const [ isVisible, setIsVisible ] = useState(false); + const [ isReady, setIsReady ] = useState(false); + const [ isCreatorOpen, setCreatorOpen ] = useState(false); + const [ isRoomInfoOpen, setRoomInfoOpen ] = useState(false); + const [ isRoomLinkOpen, setRoomLinkOpen ] = useState(false); + const [ isLoading, setIsLoading ] = useState(false); + const [ needsInit, setNeedsInit ] = useState(true); + const [ needsSearch, setNeedsSearch ] = useState(false); + const { searchResult = null, topLevelContext = null, topLevelContexts = null, navigatorData = null } = useNavigator(); + const pendingSearch = useRef<{ value: string, code: string }>(null); + const elementRef = useRef(); + + useNitroEvent(RoomSessionEvent.CREATED, event => + { + setIsVisible(false); + setCreatorOpen(false); + }); + + const sendSearch = useCallback((searchValue: string, contextCode: string) => + { + setCreatorOpen(false); + + SendMessageComposer(new NavigatorSearchComposer(contextCode, searchValue)); + + setIsLoading(true); + }, []); + + const reloadCurrentSearch = useCallback(() => + { + if(!isReady) + { + setNeedsSearch(true); + + return; + } + + if(pendingSearch.current) + { + sendSearch(pendingSearch.current.value, pendingSearch.current.code); + + pendingSearch.current = null; + + return; + } + + if(searchResult) + { + sendSearch(searchResult.data, searchResult.code); + + return; + } + + if(!topLevelContext) return; + + sendSearch('', topLevelContext.code); + }, [ isReady, searchResult, topLevelContext, sendSearch ]); + + useEffect(() => + { + const linkTracker: ILinkEventTracker = { + linkReceived: (url: string) => + { + const parts = url.split('/'); + + if(parts.length < 2) return; + + switch(parts[1]) + { + case 'show': { + setIsVisible(true); + setNeedsSearch(true); + return; + } + case 'hide': + setIsVisible(false); + return; + case 'toggle': { + if(isVisible) + { + setIsVisible(false); + + return; + } + + setIsVisible(true); + setNeedsSearch(true); + return; + } + case 'toggle-room-info': + setRoomInfoOpen(value => !value); + return; + case 'toggle-room-link': + setRoomLinkOpen(value => !value); + return; + case 'goto': + if(parts.length <= 2) return; + + switch(parts[2]) + { + case 'home': + if(navigatorData.homeRoomId <= 0) return; + + TryVisitRoom(navigatorData.homeRoomId); + break; + default: { + const roomId = parseInt(parts[2]); + + TryVisitRoom(roomId); + } + } + return; + case 'create': + setIsVisible(true); + setCreatorOpen(true); + return; + case 'search': + if(parts.length > 2) + { + const topLevelContextCode = parts[2]; + + let searchValue = ''; + + if(parts.length > 3) searchValue = parts[3]; + + pendingSearch.current = { value: searchValue, code: topLevelContextCode }; + + setIsVisible(true); + setNeedsSearch(true); + } + return; + } + }, + eventUrlPrefix: 'navigator/' + }; + + AddLinkEventTracker(linkTracker); + + return () => RemoveLinkEventTracker(linkTracker); + }, [ isVisible, navigatorData ]); + + useEffect(() => + { + if(!searchResult) return; + + setIsLoading(false); + + if(elementRef && elementRef.current) elementRef.current.scrollTop = 0; + }, [ searchResult ]); + + useEffect(() => + { + if(!isVisible || !isReady || !needsSearch) return; + + reloadCurrentSearch(); + + setNeedsSearch(false); + }, [ isVisible, isReady, needsSearch, reloadCurrentSearch ]); + + useEffect(() => + { + if(isReady || !topLevelContext) return; + + setIsReady(true); + }, [ isReady, topLevelContext ]); + + useEffect(() => + { + if(!isVisible || !needsInit) return; + + SendMessageComposer(new NavigatorInitComposer()); + + setNeedsInit(false); + }, [ isVisible, needsInit ]); + + useEffect(() => + { + LegacyExternalInterface.addCallback(HabboWebTools.OPENROOM, (k: string, _arg_2: boolean = false, _arg_3: string = null) => SendMessageComposer(new ConvertGlobalRoomIdMessageComposer(k))); + }, []); + + return ( + <> + { isVisible && + + setIsVisible(false) } /> + + { topLevelContexts && (topLevelContexts.length > 0) && topLevelContexts.map((context, index) => + { + return ( + sendSearch('', context.code) }> + { LocalizeText(('navigator.toplevelview.' + context.code)) } + + ); + }) } + setCreatorOpen(true) }> + + + + + { !isCreatorOpen && + <> + +
+ { (searchResult && searchResult.results.map((result, index) => )) } +
+ } + { isCreatorOpen && } +
+
} + + { isRoomInfoOpen && setRoomInfoOpen(false) } /> } + { isRoomLinkOpen && setRoomLinkOpen(false) } /> } + + + ); +}; diff --git a/Coolui v3 test/src/components/navigator/views/NavigatorDoorStateView.tsx b/Coolui v3 test/src/components/navigator/views/NavigatorDoorStateView.tsx new file mode 100644 index 0000000000..0dcaa45c99 --- /dev/null +++ b/Coolui v3 test/src/components/navigator/views/NavigatorDoorStateView.tsx @@ -0,0 +1,111 @@ +import { FC, useEffect, useState } from 'react'; +import { CreateRoomSession, DoorStateType, GoToDesktop, LocalizeText } from '../../../api'; +import { Button, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../common'; +import { useNavigator } from '../../../hooks'; +import { NitroInput } from '../../../layout'; + +const VISIBLE_STATES = [ DoorStateType.START_DOORBELL, DoorStateType.STATE_WAITING, DoorStateType.STATE_NO_ANSWER, DoorStateType.START_PASSWORD, DoorStateType.STATE_WRONG_PASSWORD ]; +const DOORBELL_STATES = [ DoorStateType.START_DOORBELL, DoorStateType.STATE_WAITING, DoorStateType.STATE_NO_ANSWER ]; +const PASSWORD_STATES = [ DoorStateType.START_PASSWORD, DoorStateType.STATE_WRONG_PASSWORD ]; + +export const NavigatorDoorStateView: FC<{}> = props => +{ + const [ password, setPassword ] = useState(''); + const { doorData = null, setDoorData = null } = useNavigator(); + + const onClose = () => + { + if(doorData && (doorData.state === DoorStateType.STATE_WAITING)) GoToDesktop(); + + setDoorData(null); + }; + + const ring = () => + { + if(!doorData || !doorData.roomInfo) return; + + CreateRoomSession(doorData.roomInfo.roomId); + + setDoorData(prevValue => + { + const newValue = { ...prevValue }; + + newValue.state = DoorStateType.STATE_PENDING_SERVER; + + return newValue; + }); + }; + + const tryEntering = () => + { + if(!doorData || !doorData.roomInfo) return; + + CreateRoomSession(doorData.roomInfo.roomId, password); + + setDoorData(prevValue => + { + const newValue = { ...prevValue }; + + newValue.state = DoorStateType.STATE_PENDING_SERVER; + + return newValue; + }); + }; + + useEffect(() => + { + if(!doorData || (doorData.state !== DoorStateType.STATE_NO_ANSWER)) return; + + GoToDesktop(); + }, [ doorData ]); + + if(!doorData || (doorData.state === DoorStateType.NONE) || (VISIBLE_STATES.indexOf(doorData.state) === -1)) return null; + + const isDoorbell = (DOORBELL_STATES.indexOf(doorData.state) >= 0); + + return ( + + + +
+ { doorData && doorData.roomInfo && doorData.roomInfo.roomName } + { (doorData.state === DoorStateType.START_DOORBELL) && + { LocalizeText('navigator.doorbell.info') } } + { (doorData.state === DoorStateType.STATE_WAITING) && + { LocalizeText('navigator.doorbell.waiting') } } + { (doorData.state === DoorStateType.STATE_NO_ANSWER) && + { LocalizeText('navigator.doorbell.no.answer') } } + { (doorData.state === DoorStateType.START_PASSWORD) && + { LocalizeText('navigator.password.info') } } + { (doorData.state === DoorStateType.STATE_WRONG_PASSWORD) && + { LocalizeText('navigator.password.retryinfo') } } +
+ { isDoorbell && +
+ { (doorData.state === DoorStateType.START_DOORBELL) && + } + +
} + { !isDoorbell && + <> +
+ { LocalizeText('navigator.password.enter') } + setPassword(event.target.value) } /> +
+
+ + +
+ } +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/navigator/views/NavigatorRoomCreatorView.tsx b/Coolui v3 test/src/components/navigator/views/NavigatorRoomCreatorView.tsx new file mode 100644 index 0000000000..8469af36f6 --- /dev/null +++ b/Coolui v3 test/src/components/navigator/views/NavigatorRoomCreatorView.tsx @@ -0,0 +1,123 @@ + +import { CreateFlatMessageComposer, HabboClubLevelEnum } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { GetClubMemberLevel, GetConfigurationValue, IRoomModel, LocalizeText, SendMessageComposer } from '../../../api'; +import { Button, Flex, Grid, LayoutCurrencyIcon, LayoutGridItem, Text } from '../../../common'; +import { useNavigator } from '../../../hooks'; +import { NitroInput } from '../../../layout'; + +export const NavigatorRoomCreatorView: FC<{}> = props => +{ + const [ maxVisitorsList, setMaxVisitorsList ] = useState(null); + const [ name, setName ] = useState(null); + const [ description, setDescription ] = useState(null); + const [ category, setCategory ] = useState(null); + const [ visitorsCount, setVisitorsCount ] = useState(null); + const [ tradesSetting, setTradesSetting ] = useState(0); + const [ roomModels, setRoomModels ] = useState([]); + const [ selectedModelName, setSelectedModelName ] = useState(''); + const { categories = null } = useNavigator(); + + const hcDisabled = GetConfigurationValue('hc.disabled', false); + + const getRoomModelImage = (name: string) => GetConfigurationValue('images.url') + `/navigator/models/model_${ name }.png`; + + const selectModel = (model: IRoomModel, index: number) => + { + if(!model || (model.clubLevel > GetClubMemberLevel())) return; + + setSelectedModelName(roomModels[index].name); + }; + + const createRoom = () => + { + SendMessageComposer(new CreateFlatMessageComposer(name, description, 'model_' + selectedModelName, Number(category), Number(visitorsCount), tradesSetting)); + }; + + useEffect(() => + { + if(!maxVisitorsList) + { + const list = []; + + for(let i = 10; i <= 100; i = i + 10) list.push(i); + + setMaxVisitorsList(list); + setVisitorsCount(list[0]); + } + }, [ maxVisitorsList ]); + + useEffect(() => + { + if(categories && categories.length) setCategory(categories[0].id); + }, [ categories ]); + + useEffect(() => + { + const models = GetConfigurationValue('navigator.room.models'); + + if(models && models.length) + { + setRoomModels(models); + setSelectedModelName(models[0].name); + } + }, []); + + return ( +
+ +
+
+ { LocalizeText('navigator.createroom.roomnameinfo') } + setName(event.target.value) } /> +
+
+ { LocalizeText('navigator.createroom.roomdescinfo') } + +
+
+ + ); +}; diff --git a/Coolui v3 test/src/components/room/widgets/furniture/FurnitureStackHeightView.tsx b/Coolui v3 test/src/components/room/widgets/furniture/FurnitureStackHeightView.tsx new file mode 100644 index 0000000000..741a35eee8 --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/furniture/FurnitureStackHeightView.tsx @@ -0,0 +1,58 @@ +import { FurnitureStackHeightComposer } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; +import { LocalizeText, SendMessageComposer } from '../../../../api'; +import { Button, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../common'; +import { useFurnitureStackHeightWidget } from '../../../../hooks'; + +export const FurnitureStackHeightView: FC<{}> = props => +{ + const { objectId = -1, height = 0, maxHeight = 40, onClose = null, updateHeight = null } = useFurnitureStackHeightWidget(); + const [ tempHeight, setTempHeight ] = useState(''); + + const updateTempHeight = (value: string) => + { + setTempHeight(value); + + const newValue = parseFloat(value); + + if(isNaN(newValue) || (newValue === height)) return; + + updateHeight(newValue); + }; + + useEffect(() => + { + setTempHeight(height.toString()); + }, [ height ]); + + if(objectId === -1) return null; + + return ( + + + + { LocalizeText('widget.custom.stack.height.text') } +
+
{ state.valueNow }
} + step={ 0.01 } + value={ height } + onChange={ event => updateHeight(event) } /> + updateTempHeight(event.target.value) } /> +
+
+ + +
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/room/widgets/furniture/FurnitureStickieView.tsx b/Coolui v3 test/src/components/room/widgets/furniture/FurnitureStickieView.tsx new file mode 100644 index 0000000000..fec4845484 --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/furniture/FurnitureStickieView.tsx @@ -0,0 +1,66 @@ +import { FC, useEffect, useState } from 'react'; +import { ColorUtils } from '../../../../api'; +import { DraggableWindow, DraggableWindowPosition } from '../../../../common'; +import { useFurnitureStickieWidget } from '../../../../hooks'; + +const STICKIE_COLORS = [ '9CCEFF', 'FF9CFF', '9CFF9C', 'FFFF33' ]; +const STICKIE_COLOR_NAMES = [ 'blue', 'pink', 'green', 'yellow' ]; +const STICKIE_TYPES = [ 'post_it', 'post_it_shakesp', 'post_it_dreams', 'post_it_xmas', 'post_it_vd', 'post_it_juninas' ]; +const STICKIE_TYPE_NAMES = [ 'post_it', 'shakesp', 'dreams', 'christmas', 'heart', 'juninas' ]; + +const getStickieColorName = (color: string) => +{ + let index = STICKIE_COLORS.indexOf(color); + + if(index === -1) index = 0; + + return STICKIE_COLOR_NAMES[index]; +}; + +const getStickieTypeName = (type: string) => +{ + let index = STICKIE_TYPES.indexOf(type); + + if(index === -1) index = 0; + + return STICKIE_TYPE_NAMES[index]; +}; + +export const FurnitureStickieView: FC<{}> = props => +{ + const { objectId = -1, color = '0', text = '', type = '', canModify = false, updateColor = null, updateText = null, trash = null, onClose = null } = useFurnitureStickieWidget(); + const [ isEditing, setIsEditing ] = useState(false); + + useEffect(() => + { + setIsEditing(false); + }, [ objectId, color, text, type ]); + + if(objectId === -1) return null; + + return ( + +
+
+
+ { canModify && + <> +
+ { type == 'post_it' && + <> + { STICKIE_COLORS.map(color => + { + return
updateColor(color) } />; + }) } + } + } +
+
+
+
+ { (!isEditing || !canModify) ?
(canModify && setIsEditing(true)) }>{ text }
: } +
+
+ + ); +}; diff --git a/Coolui v3 test/src/components/room/widgets/furniture/FurnitureTrophyView.tsx b/Coolui v3 test/src/components/room/widgets/furniture/FurnitureTrophyView.tsx new file mode 100644 index 0000000000..2e08af0658 --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/furniture/FurnitureTrophyView.tsx @@ -0,0 +1,12 @@ +import { FC } from 'react'; +import { LayoutTrophyView } from '../../../../common'; +import { useFurnitureTrophyWidget } from '../../../../hooks'; + +export const FurnitureTrophyView: FC<{}> = props => +{ + const { objectId = -1, color = '1', senderName = '', date = '', message = '', onClose = null } = useFurnitureTrophyWidget(); + + if(objectId === -1) return null; + + return ; +}; diff --git a/Coolui v3 test/src/components/room/widgets/furniture/FurnitureWidgetsView.tsx b/Coolui v3 test/src/components/room/widgets/furniture/FurnitureWidgetsView.tsx new file mode 100644 index 0000000000..8c6dba25e6 --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/furniture/FurnitureWidgetsView.tsx @@ -0,0 +1,47 @@ +import { FC } from 'react'; +import { FurnitureBackgroundColorView } from './FurnitureBackgroundColorView'; +import { FurnitureBadgeDisplayView } from './FurnitureBadgeDisplayView'; +import { FurnitureCraftingView } from './FurnitureCraftingView'; +import { FurnitureDimmerView } from './FurnitureDimmerView'; +import { FurnitureExchangeCreditView } from './FurnitureExchangeCreditView'; +import { FurnitureExternalImageView } from './FurnitureExternalImageView'; +import { FurnitureFriendFurniView } from './FurnitureFriendFurniView'; +import { FurnitureGiftOpeningView } from './FurnitureGiftOpeningView'; +import { FurnitureHighScoreView } from './FurnitureHighScoreView'; +import { FurnitureInternalLinkView } from './FurnitureInternalLinkView'; +import { FurnitureMannequinView } from './FurnitureMannequinView'; +import { FurnitureRoomLinkView } from './FurnitureRoomLinkView'; +import { FurnitureSpamWallPostItView } from './FurnitureSpamWallPostItView'; +import { FurnitureStackHeightView } from './FurnitureStackHeightView'; +import { FurnitureStickieView } from './FurnitureStickieView'; +import { FurnitureTrophyView } from './FurnitureTrophyView'; +import { FurnitureYoutubeDisplayView } from './FurnitureYoutubeDisplayView'; +import { FurnitureContextMenuView } from './context-menu/FurnitureContextMenuView'; +import { FurniturePlaylistEditorWidgetView } from './playlist-editor/FurniturePlaylistEditorWidgetView'; + +export const FurnitureWidgetsView: FC<{}> = props => +{ + return ( + <> + + + + + + + + + + + + + + + + + + + + + ); +}; diff --git a/Coolui v3 test/src/components/room/widgets/furniture/FurnitureYoutubeDisplayView.tsx b/Coolui v3 test/src/components/room/widgets/furniture/FurnitureYoutubeDisplayView.tsx new file mode 100644 index 0000000000..0d8dd5e32d --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/furniture/FurnitureYoutubeDisplayView.tsx @@ -0,0 +1,109 @@ +import { FC, useEffect, useState } from 'react'; +import YouTube, { Options } from 'react-youtube'; +import { YouTubePlayer } from 'youtube-player/dist/types'; +import { LocalizeText, YoutubeVideoPlaybackStateEnum } from '../../../../api'; +import { AutoGrid, AutoGridProps, LayoutGridItem, NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../common'; +import { useFurnitureYoutubeWidget } from '../../../../hooks'; + +interface FurnitureYoutubeDisplayViewProps extends AutoGridProps +{ + +} + +export const FurnitureYoutubeDisplayView: FC<{}> = FurnitureYoutubeDisplayViewProps => +{ + const [ player, setPlayer ] = useState(null); + const { objectId = -1, videoId = null, videoStart = 0, videoEnd = 0, currentVideoState = null, selectedVideo = null, playlists = [], onClose = null, previous = null, next = null, pause = null, play = null, selectVideo = null } = useFurnitureYoutubeWidget(); + + const onStateChange = (event: { target: YouTubePlayer; data: number }) => + { + setPlayer(event.target); + + if(objectId === -1) return; + + switch(event.target.getPlayerState()) + { + case -1: + case 1: + if(currentVideoState === 2) + { + //event.target.pauseVideo(); + } + + if(currentVideoState !== 1) play(); + return; + case 2: + if(currentVideoState !== 2) pause(); + } + }; + + useEffect(() => + { + if((currentVideoState === null) || !player) return; + + if((currentVideoState === YoutubeVideoPlaybackStateEnum.PLAYING) && (player.getPlayerState() !== YoutubeVideoPlaybackStateEnum.PLAYING)) + { + player.playVideo(); + + return; + } + + if((currentVideoState === YoutubeVideoPlaybackStateEnum.PAUSED) && (player.getPlayerState() !== YoutubeVideoPlaybackStateEnum.PAUSED)) + { + player.pauseVideo(); + + return; + } + }, [ currentVideoState, player ]); + + if(objectId === -1) return null; + + const youtubeOptions: Options = { + height: '375', + width: '500', + playerVars: { + autoplay: 1, + disablekb: 1, + controls: 0, + origin: window.origin, + modestbranding: 1, + start: videoStart, + end: videoEnd + } + }; + + return ( + + + +
+
+ { (videoId && videoId.length > 0) && + setPlayer(event.target) } onStateChange={ onStateChange } /> + } + { (!videoId || videoId.length === 0) && +
{ LocalizeText('widget.furni.video_viewer.no_videos') }
+ } +
+
+ + + + +
{ LocalizeText('widget.furni.video_viewer.playlists') }
+ + { playlists && playlists.map((entry, index) => + { + return ( + selectVideo(entry.video) }> + { entry.title } + + ); + }) } + +
+
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/room/widgets/furniture/context-menu/EffectBoxConfirmView.tsx b/Coolui v3 test/src/components/room/widgets/furniture/context-menu/EffectBoxConfirmView.tsx new file mode 100644 index 0000000000..a818152b3f --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/furniture/context-menu/EffectBoxConfirmView.tsx @@ -0,0 +1,40 @@ +import { FC } from 'react'; +import { LocalizeText } from '../../../../../api'; +import { Button, Column, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../../common'; +import { useRoom } from '../../../../../hooks'; + +interface EffectBoxConfirmViewProps +{ + objectId: number; + onClose: () => void; +} + +export const EffectBoxConfirmView: FC = props => +{ + const { objectId = -1, onClose = null } = props; + const { roomSession = null } = useRoom(); + + const useProduct = () => + { + roomSession.useMultistateItem(objectId); + + onClose(); + }; + + return ( + + + +
+ + { LocalizeText('effectbox.header.description') } +
+ + +
+
+
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/room/widgets/furniture/context-menu/FurnitureContextMenuView.tsx b/Coolui v3 test/src/components/room/widgets/furniture/context-menu/FurnitureContextMenuView.tsx new file mode 100644 index 0000000000..7976d99ce9 --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/furniture/context-menu/FurnitureContextMenuView.tsx @@ -0,0 +1,130 @@ +import { ContextMenuEnum, CustomUserNotificationMessageEvent, GetSessionDataManager, RoomObjectCategory } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { GetGroupInformation, LocalizeText } from '../../../../../api'; +import { EFFECTBOX_OPEN, GROUP_FURNITURE, MONSTERPLANT_SEED_CONFIRMATION, MYSTERYTROPHY_OPEN_DIALOG, PURCHASABLE_CLOTHING_CONFIRMATION, useFurnitureContextMenuWidget, useMessageEvent, useNotification } from '../../../../../hooks'; +import { ContextMenuHeaderView } from '../../context-menu/ContextMenuHeaderView'; +import { ContextMenuListItemView } from '../../context-menu/ContextMenuListItemView'; +import { ContextMenuView } from '../../context-menu/ContextMenuView'; +import { FurnitureMysteryBoxOpenDialogView } from '../FurnitureMysteryBoxOpenDialogView'; +import { FurnitureMysteryTrophyOpenDialogView } from '../FurnitureMysteryTrophyOpenDialogView'; +import { EffectBoxConfirmView } from './EffectBoxConfirmView'; +import { MonsterPlantSeedConfirmView } from './MonsterPlantSeedConfirmView'; +import { PurchasableClothingConfirmView } from './PurchasableClothingConfirmView'; + +export const FurnitureContextMenuView: FC<{}> = props => +{ + const { closeConfirm = null, processAction = null, onClose = null, objectId = -1, mode = null, confirmMode = null, confirmingObjectId = -1, groupData = null, isGroupMember = false, objectOwnerId = -1 } = useFurnitureContextMenuWidget(); + const { simpleAlert = null } = useNotification(); + + useMessageEvent(CustomUserNotificationMessageEvent, event => + { + const parser = event.getParser(); + + if(!parser) return; + + // HOPPER_NO_COSTUME = 1; HOPPER_NO_HC = 2; GATE_NO_HC = 3; STARS_NOT_CANDIDATE = 4 (not coded in Emulator); STARS_NOT_ENOUGH_USERS = 5 (not coded in Emulator); + + switch(parser.count) + { + case 1: + simpleAlert(LocalizeText('costumehopper.costumerequired.bodytext'), null, 'catalog/open/temporary_effects' , LocalizeText('costumehopper.costumerequired.buy'), LocalizeText('costumehopper.costumerequired.header'), null); + break; + case 2: + simpleAlert(LocalizeText('viphopper.viprequired.bodytext'), null, 'catalog/open/habbo_club' , LocalizeText('viprequired.buy.vip'), LocalizeText('viprequired.header'), null); + break; + case 3: + simpleAlert(LocalizeText('gate.viprequired.bodytext'), null, 'catalog/open/habbo_club' , LocalizeText('viprequired.buy.vip'), LocalizeText('gate.viprequired.title'), null); + break; + } + }); + + const isOwner = GetSessionDataManager().userId === objectOwnerId; + + return ( + <> + { (confirmMode === MONSTERPLANT_SEED_CONFIRMATION) && + } + { (confirmMode === PURCHASABLE_CLOTHING_CONFIRMATION) && + } + { (confirmMode === EFFECTBOX_OPEN) && + } + { (confirmMode === MYSTERYTROPHY_OPEN_DIALOG) && + } + + { (objectId >= 0) && mode && + + { (mode === ContextMenuEnum.FRIEND_FURNITURE) && + <> + + { LocalizeText('friendfurni.context.title') } + + processAction('use_friend_furni') }> + { LocalizeText('friendfurni.context.use') } + + } + { (mode === ContextMenuEnum.MONSTERPLANT_SEED) && + <> + + { LocalizeText('furni.mnstr_seed.name') } + + processAction('use_monsterplant_seed') }> + { LocalizeText('widget.monsterplant_seed.button.use') } + + } + { (mode === ContextMenuEnum.RANDOM_TELEPORT) && + <> + + { LocalizeText('furni.random_teleport.name') } + + processAction('use_random_teleport') }> + { LocalizeText('widget.random_teleport.button.use') } + + } + { (mode === ContextMenuEnum.PURCHASABLE_CLOTHING) && + <> + + { LocalizeText('furni.generic_usable.name') } + + processAction('use_purchaseable_clothing') }> + { LocalizeText('widget.generic_usable.button.use') } + + } + { (mode === ContextMenuEnum.MYSTERY_BOX) && + <> + + { LocalizeText('mysterybox.context.title') } + + processAction('use_mystery_box') }> + { LocalizeText('mysterybox.context.' + ((isOwner) ? 'owner' : 'other') + '.use') } + + } + { (mode === ContextMenuEnum.MYSTERY_TROPHY) && + <> + + { LocalizeText('mysterytrophy.header.title') } + + processAction('use_mystery_trophy') }> + { LocalizeText('friendfurni.context.use') } + + } + { (mode === GROUP_FURNITURE) && groupData && + <> + GetGroupInformation(groupData.guildId) }> + { groupData.guildName } + + { !isGroupMember && + processAction('join_group') }> + { LocalizeText('widget.furniture.button.join.group') } + } + processAction('go_to_group_homeroom') }> + { LocalizeText('widget.furniture.button.go.to.group.home.room') } + + { groupData.guildHasReadableForum && + processAction('open_forum') }> + { LocalizeText('widget.furniture.button.open_group_forum') } + } + } + } + + ); +}; diff --git a/Coolui v3 test/src/components/room/widgets/furniture/context-menu/MonsterPlantSeedConfirmView.tsx b/Coolui v3 test/src/components/room/widgets/furniture/context-menu/MonsterPlantSeedConfirmView.tsx new file mode 100644 index 0000000000..4a5ed984ee --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/furniture/context-menu/MonsterPlantSeedConfirmView.tsx @@ -0,0 +1,85 @@ +import { IFurnitureData, RoomObjectCategory } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { FurniCategory, GetFurnitureDataForRoomObject, LocalizeText } from '../../../../../api'; +import { Button, Column, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../../common'; +import { useRoom } from '../../../../../hooks'; + +interface MonsterPlantSeedConfirmViewProps +{ + objectId: number; + onClose: () => void; +} + +const MODE_DEFAULT: number = -1; +const MODE_MONSTERPLANT_SEED: number = 0; + +export const MonsterPlantSeedConfirmView: FC = props => +{ + const { objectId = -1, onClose = null } = props; + const [ furniData, setFurniData ] = useState(null); + const [ mode, setMode ] = useState(MODE_DEFAULT); + const { roomSession = null } = useRoom(); + + const useProduct = () => + { + roomSession.useMultistateItem(objectId); + + onClose(); + }; + + useEffect(() => + { + if(!roomSession || (objectId === -1)) return; + + const furniData = GetFurnitureDataForRoomObject(roomSession.roomId, objectId, RoomObjectCategory.FLOOR); + + if(!furniData) return; + + setFurniData(furniData); + + let mode = MODE_DEFAULT; + + switch(furniData.specialType) + { + case FurniCategory.MONSTERPLANT_SEED: + mode = MODE_MONSTERPLANT_SEED; + break; + } + + if(mode === MODE_DEFAULT) + { + onClose(); + + return; + } + + setMode(mode); + }, [ roomSession, objectId, onClose ]); + + if(mode === MODE_DEFAULT) return null; + + return ( + + + +
+
+
+
+
+
+
+ + { LocalizeText('useproduct.widget.text.plant_seed', [ 'productName' ], [ furniData.name ]) } + { LocalizeText('useproduct.widget.info.plant_seed') } + +
+ + +
+
+
+ + + ); +}; diff --git a/Coolui v3 test/src/components/room/widgets/furniture/context-menu/PurchasableClothingConfirmView.tsx b/Coolui v3 test/src/components/room/widgets/furniture/context-menu/PurchasableClothingConfirmView.tsx new file mode 100644 index 0000000000..85a6f8062e --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/furniture/context-menu/PurchasableClothingConfirmView.tsx @@ -0,0 +1,104 @@ +import { AvatarFigurePartType, GetAvatarRenderManager, GetSessionDataManager, RedeemItemClothingComposer, RoomObjectCategory, UserFigureComposer } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { FurniCategory, GetFurnitureDataForRoomObject, LocalizeText, SendMessageComposer } from '../../../../../api'; +import { Button, Column, LayoutAvatarImageView, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../../common'; +import { useRoom } from '../../../../../hooks'; + +interface PurchasableClothingConfirmViewProps +{ + objectId: number; + onClose: () => void; +} + +const MODE_DEFAULT: number = -1; +const MODE_PURCHASABLE_CLOTHING: number = 0; + +export const PurchasableClothingConfirmView: FC = props => +{ + const { objectId = -1, onClose = null } = props; + const [ mode, setMode ] = useState(MODE_DEFAULT); + const [ gender, setGender ] = useState(AvatarFigurePartType.MALE); + const [ newFigure, setNewFigure ] = useState(null); + const { roomSession = null } = useRoom(); + + const useProduct = () => + { + SendMessageComposer(new RedeemItemClothingComposer(objectId)); + SendMessageComposer(new UserFigureComposer(gender, newFigure)); + + onClose(); + }; + + useEffect(() => + { + let mode = MODE_DEFAULT; + + const figure = GetSessionDataManager().figure; + const gender = GetSessionDataManager().gender; + const validSets: number[] = []; + + if(roomSession && (objectId >= 0)) + { + const furniData = GetFurnitureDataForRoomObject(roomSession.roomId, objectId, RoomObjectCategory.FLOOR); + + if(furniData) + { + switch(furniData.specialType) + { + case FurniCategory.FIGURE_PURCHASABLE_SET: + mode = MODE_PURCHASABLE_CLOTHING; + + const setIds = furniData.customParams.split(',').map(part => parseInt(part)); + + for(const setId of setIds) + { + if(GetAvatarRenderManager().isValidFigureSetForGender(setId, gender)) validSets.push(setId); + } + + break; + } + } + } + + if(mode === MODE_DEFAULT) + { + onClose(); + + return; + } + + setGender(gender); + setNewFigure(GetAvatarRenderManager().getFigureStringWithFigureIds(figure, gender, validSets)); + + // if owns clothing, change to it + + setMode(mode); + }, [ roomSession, objectId, onClose ]); + + if(mode === MODE_DEFAULT) return null; + + return ( + + + +
+
+
+ +
+
+
+ + { LocalizeText('useproduct.widget.text.bind_clothing') } + { LocalizeText('useproduct.widget.info.bind_clothing') } + +
+ + +
+
+
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/room/widgets/furniture/playlist-editor/DiskInventoryView.tsx b/Coolui v3 test/src/components/room/widgets/furniture/playlist-editor/DiskInventoryView.tsx new file mode 100644 index 0000000000..7550af9bf4 --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/furniture/playlist-editor/DiskInventoryView.tsx @@ -0,0 +1,94 @@ +import { CreateLinkEvent, GetSoundManager, IAdvancedMap, MusicPriorities } from '@nitrots/nitro-renderer'; +import { FC, MouseEvent, useCallback, useEffect, useState } from 'react'; +import { CatalogPageName, GetConfigurationValue, GetDiskColor, LocalizeText } from '../../../../../api'; +import { AutoGrid, Button, Flex, LayoutGridItem, Text } from '../../../../../common'; + +export interface DiskInventoryViewProps +{ + diskInventory: IAdvancedMap; + addToPlaylist: (diskId: number, slotNumber: number) => void; +} + +export const DiskInventoryView: FC = props => +{ + const { diskInventory = null, addToPlaylist = null } = props; + const [ selectedItem, setSelectedItem ] = useState(-1); + const [ previewSongId, setPreviewSongId ] = useState(-1); + + const previewSong = useCallback((event: MouseEvent, songId: number) => + { + event.stopPropagation(); + + setPreviewSongId(prevValue => (prevValue === songId) ? -1 : songId); + }, []); + + const addSong = useCallback((event: MouseEvent, diskId: number) => + { + event.stopPropagation(); + + addToPlaylist(diskId, GetSoundManager().musicController?.getRoomItemPlaylist()?.length); + }, [ addToPlaylist ]); + + const openCatalogPage = () => + { + CreateLinkEvent('catalog/open/' + CatalogPageName.TRAX_SONGS); + }; + + useEffect(() => + { + if(previewSongId === -1) return; + + GetSoundManager().musicController?.playSong(previewSongId, MusicPriorities.PRIORITY_SONG_PLAY, 0, 0, 0, 0); + + return () => + { + GetSoundManager().musicController?.stop(MusicPriorities.PRIORITY_SONG_PLAY); + }; + }, [ previewSongId ]); + + useEffect(() => + { + return () => setPreviewSongId(-1); + }, []); + + return (<> +
+ +

{ LocalizeText('playlist.editor.my.music') }

+
+
+ + { diskInventory && diskInventory.getKeys().map((key, index) => + { + const diskId = diskInventory.getKey(index); + const songId = diskInventory.getWithIndex(index); + const songInfo = GetSoundManager().musicController?.getSongInfo(songId); + + return ( + setSelectedItem(prev => prev === index ? -1 : index) }> +
+
+ { songInfo?.name } + { (selectedItem === index) && + + + + + } +
); + }) } +
+
+
+
{ LocalizeText('playlist.editor.text.get.more.music') }
+
{ LocalizeText('playlist.editor.text.you.have.no.songdisks.available') }
+
{ LocalizeText('playlist.editor.text.you.can.buy.some.from.the.catalogue') }
+ +
+ + ); +}; diff --git a/Coolui v3 test/src/components/room/widgets/furniture/playlist-editor/FurniturePlaylistEditorWidgetView.tsx b/Coolui v3 test/src/components/room/widgets/furniture/playlist-editor/FurniturePlaylistEditorWidgetView.tsx new file mode 100644 index 0000000000..611eba2195 --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/furniture/playlist-editor/FurniturePlaylistEditorWidgetView.tsx @@ -0,0 +1,29 @@ +import { FC } from 'react'; +import { LocalizeText } from '../../../../../api'; +import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../../common'; +import { useFurniturePlaylistEditorWidget } from '../../../../../hooks'; +import { DiskInventoryView } from './DiskInventoryView'; +import { SongPlaylistView } from './SongPlaylistView'; + +export const FurniturePlaylistEditorWidgetView: FC<{}> = props => +{ + const { objectId = -1, currentPlayingIndex = -1, playlist = null, diskInventory = null, onClose = null, togglePlayPause = null, removeFromPlaylist = null, addToPlaylist = null } = useFurniturePlaylistEditorWidget(); + + if(objectId === -1) return null; + + return ( + + + +
+
+ +
+
+ +
+
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/room/widgets/furniture/playlist-editor/SongPlaylistView.tsx b/Coolui v3 test/src/components/room/widgets/furniture/playlist-editor/SongPlaylistView.tsx new file mode 100644 index 0000000000..95289a7266 --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/furniture/playlist-editor/SongPlaylistView.tsx @@ -0,0 +1,78 @@ +import { ISongInfo } from '@nitrots/nitro-renderer'; +import { FC, useState } from 'react'; +import { GetConfigurationValue, GetDiskColor, LocalizeText } from '../../../../../api'; +import { Button, Text } from '../../../../../common'; + +export interface SongPlaylistViewProps +{ + furniId: number; + playlist: ISongInfo[]; + currentPlayingIndex: number; + removeFromPlaylist(slotNumber: number): void; + togglePlayPause(furniId: number, position: number): void; +} + +export const SongPlaylistView: FC = props => +{ + const { furniId = -1, playlist = null, currentPlayingIndex = -1, removeFromPlaylist = null, togglePlayPause = null } = props; + const [ selectedItem, setSelectedItem ] = useState(-1); + + const action = (index: number) => + { + if(selectedItem === index) removeFromPlaylist(index); + }; + + const playPause = (furniId: number, selectedItem: number) => + { + togglePlayPause(furniId, selectedItem !== -1 ? selectedItem : 0); + }; + + return (<> +
+ +

{ LocalizeText('playlist.editor.playlist') }

+
+
+
+ { playlist && playlist.map((songInfo, index) => + { + return
setSelectedItem(prev => prev === index ? -1 : index) }> +
action(index) } /> + { songInfo.name } +
; + }) } + +
+
+ { (!playlist || playlist.length === 0) && + <>
+
{ LocalizeText('playlist.editor.add.songs.to.your.playlist') }
+
{ LocalizeText('playlist.editor.text.click.song.to.choose.click.again.to.move') }
+
+ + } + { (playlist && playlist.length > 0) && + <> + { (currentPlayingIndex === -1) && + + } + { (currentPlayingIndex !== -1) && +
+ +
+ { LocalizeText('playlist.editor.text.now.playing.in.your.room') } + + { playlist[currentPlayingIndex]?.name + ' - ' + playlist[currentPlayingIndex]?.creator } + +
+
+ } + + } + + ); +}; diff --git a/Coolui v3 test/src/components/room/widgets/mysterybox/MysteryBoxExtensionView.tsx b/Coolui v3 test/src/components/room/widgets/mysterybox/MysteryBoxExtensionView.tsx new file mode 100644 index 0000000000..1e1828627b --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/mysterybox/MysteryBoxExtensionView.tsx @@ -0,0 +1,67 @@ +import { MysteryBoxKeysUpdateEvent } from '@nitrots/nitro-renderer'; +import { FC, useState } from 'react'; +import { FaChevronDown, FaChevronUp } from 'react-icons/fa'; +import { ColorUtils, LocalizeText } from '../../../../api'; +import { Flex, LayoutGridItem, Text } from '../../../../common'; +import { useNitroEvent } from '../../../../hooks'; + +const colorMap = { + 'purple': 9452386, + 'blue': 3891856, + 'green': 6459451, + 'yellow': 10658089, + 'lilac': 6897548, + 'orange': 10841125, + 'turquoise': 2661026, + 'red': 10104881 +}; + +export const MysteryBoxExtensionView: FC<{}> = props => +{ + const [ isOpen, setIsOpen ] = useState(true); + const [ keyColor, setKeyColor ] = useState(''); + const [ boxColor, setBoxColor ] = useState(''); + + useNitroEvent(MysteryBoxKeysUpdateEvent.MYSTERY_BOX_KEYS_UPDATE, event => + { + setKeyColor(event.keyColor); + setBoxColor(event.boxColor); + }); + + const getRgbColor = (color: string) => + { + const colorInt = colorMap[color]; + + return ColorUtils.int2rgb(colorInt); + }; + + if(keyColor === '' && boxColor === '') return null; + + return ( +
+
+ setIsOpen(value => !value) }> + { LocalizeText('mysterybox.tracker.title') } + { isOpen && } + { !isOpen && } + + { isOpen && + <> + { LocalizeText('mysterybox.tracker.description') } +
+ +
+
+
+ + +
+
+
+ +
+ } +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/room/widgets/object-location/ObjectLocationView.tsx b/Coolui v3 test/src/components/room/widgets/object-location/ObjectLocationView.tsx new file mode 100644 index 0000000000..0bd1a4837f --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/object-location/ObjectLocationView.tsx @@ -0,0 +1,61 @@ +import { GetTicker } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useRef, useState } from 'react'; +import { GetRoomObjectBounds, GetRoomSession } from '../../../../api'; +import { BaseProps } from '../../../../common'; + +interface ObjectLocationViewProps extends BaseProps +{ + objectId: number; + category: number; + noFollow?: boolean; +} + +export const ObjectLocationView: FC = props => +{ + const { objectId = -1, category = -1, noFollow = false, ...rest } = props; + const [ pos, setPos ] = useState<{ x: number, y: number }>({ x: -1, y: -1 }); + const elementRef = useRef(); + + useEffect(() => + { + let remove = false; + + const getObjectLocation = () => + { + const roomSession = GetRoomSession(); + const objectBounds = GetRoomObjectBounds(roomSession.roomId, objectId, category, 1); + + return objectBounds; + }; + + const updatePosition = () => + { + const bounds = getObjectLocation(); + + if(!bounds || !elementRef.current) return; + + setPos({ + x: Math.round(((bounds.left + (bounds.width / 2)) - (elementRef.current.offsetWidth / 2))), + y: Math.round((bounds.top - elementRef.current.offsetHeight) + 10) + }); + }; + + if(noFollow) + { + updatePosition(); + } + else + { + remove = true; + + GetTicker().add(updatePosition); + } + + return () => + { + if(remove) GetTicker().remove(updatePosition); + }; + }, [ objectId, category, noFollow ]); + + return
-1) ? 'visible' : 'hidden' } } { ...rest } />; +}; diff --git a/Coolui v3 test/src/components/room/widgets/pet-package/PetPackageWidgetView.tsx b/Coolui v3 test/src/components/room/widgets/pet-package/PetPackageWidgetView.tsx new file mode 100644 index 0000000000..9b4ff4a166 --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/pet-package/PetPackageWidgetView.tsx @@ -0,0 +1,41 @@ +import { FC } from 'react'; +import { GetConfigurationValue, LocalizeText } from '../../../../api'; +import { Button, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../common'; +import { usePetPackageWidget } from '../../../../hooks'; + +export const PetPackageWidgetView: FC<{}> = props => +{ + const { isVisible = false, errorResult = null, petName = null, objectType = null, onChangePetName = null, onConfirm = null, onClose = null } = usePetPackageWidget(); + + return ( + <> + { isVisible && + + onClose() } /> + +
+
+
+ { objectType === 'gnome_box' ? LocalizeText('widgets.gnomepackage.name.title') : LocalizeText('furni.petpackage') } +
+
+
+
+
+ onChangePetName(event.target.value) } /> +
+
+ { (errorResult.length > 0) && +
{ errorResult }
} +
+ onClose() }>{ LocalizeText('cancel') } + +
+
+
+
+
+ } + + ); +}; diff --git a/Coolui v3 test/src/components/room/widgets/room-filter-words/RoomFilterWordsWidgetView.tsx b/Coolui v3 test/src/components/room/widgets/room-filter-words/RoomFilterWordsWidgetView.tsx new file mode 100644 index 0000000000..bbed44b1f8 --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/room-filter-words/RoomFilterWordsWidgetView.tsx @@ -0,0 +1,75 @@ +import { UpdateRoomFilterMessageComposer } from '@nitrots/nitro-renderer'; +import { FC, useState } from 'react'; +import { LocalizeText, SendMessageComposer } from '../../../../api'; +import { Button, Column, Flex, Grid, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../common'; +import { useFilterWordsWidget, useNavigator } from '../../../../hooks'; +import { NitroInput, classNames } from '../../../../layout'; + +export const RoomFilterWordsWidgetView: FC<{}> = props => +{ + const [ word, setWord ] = useState('bobba'); + const [ selectedWord, setSelectedWord ] = useState(''); + const [ isSelectingWord, setIsSelectingWord ] = useState(false); + const { wordsFilter = [], isVisible = null, setWordsFilter, onClose = null } = useFilterWordsWidget(); + const { navigatorData = null } = useNavigator(); + + const processAction = (isAddingWord: boolean) => + { + if((isSelectingWord) ? (!selectedWord) : (!word)) return; + + SendMessageComposer(new UpdateRoomFilterMessageComposer(navigatorData.enteredGuestRoom.roomId, isAddingWord, (isSelectingWord ? selectedWord : word))); + setSelectedWord(''); + setWord('bobba'); + setIsSelectingWord(false); + + if(isAddingWord && wordsFilter.includes((isSelectingWord ? selectedWord : word))) return; + + setWordsFilter(prevValue => + { + const newWords = [ ...prevValue ]; + + isAddingWord ? newWords.push((isSelectingWord ? selectedWord : word)) : newWords.splice(newWords.indexOf((isSelectingWord ? selectedWord : word)), 1); + + return newWords; + }); + }; + + const onTyping = (word: string) => + { + setWord(word); + setIsSelectingWord(false); + }; + + const onSelectedWord = (word: string) => + { + setSelectedWord(word); + setIsSelectingWord(true); + }; + + if(!isVisible) return null; + + return ( + + onClose() } /> + + + onTyping(event.target.value) } /> + + + + { wordsFilter && (wordsFilter.length > 0) && wordsFilter.map((word, index) => + { + return ( + onSelectedWord(word) }> + { word } + + ); + }) } + + + + + + + ); +}; diff --git a/Coolui v3 test/src/components/room/widgets/room-promotes/RoomPromotesWidgetView.tsx b/Coolui v3 test/src/components/room/widgets/room-promotes/RoomPromotesWidgetView.tsx new file mode 100644 index 0000000000..07cf84185d --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/room-promotes/RoomPromotesWidgetView.tsx @@ -0,0 +1,55 @@ +import { DesktopViewEvent, GetSessionDataManager } from '@nitrots/nitro-renderer'; +import { FC, useState } from 'react'; +import { FaChevronDown, FaChevronUp } from 'react-icons/fa'; +import { Flex, Text } from '../../../../common'; +import { useMessageEvent, useRoomPromote } from '../../../../hooks'; +import { RoomPromoteEditWidgetView, RoomPromoteMyOwnEventWidgetView, RoomPromoteOtherEventWidgetView } from './views'; + +export const RoomPromotesWidgetView: FC<{}> = props => +{ + const [ isEditingPromote, setIsEditingPromote ] = useState(false); + const [ isOpen, setIsOpen ] = useState(true); + const { promoteInformation, setPromoteInformation } = useRoomPromote(); + + useMessageEvent(DesktopViewEvent, event => + { + setPromoteInformation(null); + }); + + if(!promoteInformation) return null; + + return ( + <> + { promoteInformation.data.adId !== -1 && +
+
+ setIsOpen(value => !value) }> + { promoteInformation.data.eventName } + { isOpen && } + { !isOpen && } + + { (isOpen && GetSessionDataManager().userId !== promoteInformation.data.ownerAvatarId) && + + } + { (isOpen && GetSessionDataManager().userId === promoteInformation.data.ownerAvatarId) && + setIsEditingPromote(true) } + /> + } + { isEditingPromote && + setIsEditingPromote(false) } + /> + } +
+
+ } + + ); +}; diff --git a/Coolui v3 test/src/components/room/widgets/room-promotes/views/RoomPromoteEditWidgetView.tsx b/Coolui v3 test/src/components/room/widgets/room-promotes/views/RoomPromoteEditWidgetView.tsx new file mode 100644 index 0000000000..bb3e6102d2 --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/room-promotes/views/RoomPromoteEditWidgetView.tsx @@ -0,0 +1,45 @@ +import { EditEventMessageComposer } from '@nitrots/nitro-renderer'; +import { FC, useState } from 'react'; +import { LocalizeText, SendMessageComposer } from '../../../../../api'; +import { Button, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../../common'; +import { NitroInput } from '../../../../../layout'; + +interface RoomPromoteEditWidgetViewProps +{ + eventId: number; + eventName: string; + eventDescription: string; + setIsEditingPromote: (value: boolean) => void; +} + +export const RoomPromoteEditWidgetView: FC = props => +{ + const { eventId = -1, eventName = '', eventDescription = '', setIsEditingPromote = null } = props; + const [ newEventName, setNewEventName ] = useState(eventName); + const [ newEventDescription, setNewEventDescription ] = useState(eventDescription); + + const updatePromote = () => + { + SendMessageComposer(new EditEventMessageComposer(eventId, newEventName, newEventDescription)); + setIsEditingPromote(false); + }; + + return ( + + setIsEditingPromote(false) } /> + +
+ { LocalizeText('navigator.eventsettings.name') } + setNewEventName(event.target.value) } /> +
+
+ { LocalizeText('navigator.eventsettings.desc') } + +
+
+ +
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/room/widgets/room-promotes/views/RoomPromoteMyOwnEventWidgetView.tsx b/Coolui v3 test/src/components/room/widgets/room-promotes/views/RoomPromoteMyOwnEventWidgetView.tsx new file mode 100644 index 0000000000..e53497d036 --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/room-promotes/views/RoomPromoteMyOwnEventWidgetView.tsx @@ -0,0 +1,36 @@ +import { CreateLinkEvent } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { LocalizeText } from '../../../../../api'; +import { Button, Flex, Grid, Text } from '../../../../../common'; +import { useRoomPromote } from '../../../../../hooks'; + +interface RoomPromoteMyOwnEventWidgetViewProps +{ + eventDescription: string; + setIsEditingPromote: (value: boolean) => void; +} + +export const RoomPromoteMyOwnEventWidgetView: FC = props => +{ + const { eventDescription = '', setIsEditingPromote = null } = props; + const { setIsExtended } = useRoomPromote(); + + const extendPromote = () => + { + setIsExtended(true); + CreateLinkEvent('catalog/open/room_event'); + }; + + return ( + <> + + { eventDescription } + +

+ + + + + + ); +}; diff --git a/Coolui v3 test/src/components/room/widgets/room-promotes/views/RoomPromoteOtherEventWidgetView.tsx b/Coolui v3 test/src/components/room/widgets/room-promotes/views/RoomPromoteOtherEventWidgetView.tsx new file mode 100644 index 0000000000..3a3ed08af4 --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/room-promotes/views/RoomPromoteOtherEventWidgetView.tsx @@ -0,0 +1,30 @@ +import { FC } from 'react'; +import { LocalizeText } from '../../../../../api'; +import { Column, Flex, Text } from '../../../../../common'; + +interface RoomPromoteOtherEventWidgetViewProps +{ + eventDescription: string; +} + +export const RoomPromoteOtherEventWidgetView: FC = props => +{ + const { eventDescription = '' } = props; + + return ( + <> + + { eventDescription } + +

+ +
+
+ { LocalizeText('navigator.eventinprogress') } +
+   +
+
+ + ); +}; diff --git a/Coolui v3 test/src/components/room/widgets/room-promotes/views/index.ts b/Coolui v3 test/src/components/room/widgets/room-promotes/views/index.ts new file mode 100644 index 0000000000..da746917f6 --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/room-promotes/views/index.ts @@ -0,0 +1,3 @@ +export * from './RoomPromoteEditWidgetView'; +export * from './RoomPromoteMyOwnEventWidgetView'; +export * from './RoomPromoteOtherEventWidgetView'; diff --git a/Coolui v3 test/src/components/room/widgets/room-thumbnail/RoomThumbnailWidgetView.tsx b/Coolui v3 test/src/components/room/widgets/room-thumbnail/RoomThumbnailWidgetView.tsx new file mode 100644 index 0000000000..a14744c259 --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/room-thumbnail/RoomThumbnailWidgetView.tsx @@ -0,0 +1,41 @@ +import { GetRoomEngine, NitroRenderTexture } from '@nitrots/nitro-renderer'; +import { FC, useState } from 'react'; +import { LayoutMiniCameraView } from '../../../../common'; +import { RoomWidgetThumbnailEvent } from '../../../../events'; +import { useRoom, useUiEvent } from '../../../../hooks'; + +export const RoomThumbnailWidgetView: FC<{}> = props => +{ + const [ isVisible, setIsVisible ] = useState(false); + const { roomSession = null } = useRoom(); + + useUiEvent([ + RoomWidgetThumbnailEvent.SHOW_THUMBNAIL, + RoomWidgetThumbnailEvent.HIDE_THUMBNAIL, + RoomWidgetThumbnailEvent.TOGGLE_THUMBNAIL ], event => + { + switch(event.type) + { + case RoomWidgetThumbnailEvent.SHOW_THUMBNAIL: + setIsVisible(true); + return; + case RoomWidgetThumbnailEvent.HIDE_THUMBNAIL: + setIsVisible(false); + return; + case RoomWidgetThumbnailEvent.TOGGLE_THUMBNAIL: + setIsVisible(value => !value); + return; + } + }); + + const receiveTexture = async (texture: NitroRenderTexture) => + { + await GetRoomEngine().saveTextureAsScreenshot(texture, true); + + setIsVisible(false); + }; + + if(!isVisible) return null; + + return setIsVisible(false) } />; +}; diff --git a/Coolui v3 test/src/components/room/widgets/room-tools/RoomToolsWidgetView.tsx b/Coolui v3 test/src/components/room/widgets/room-tools/RoomToolsWidgetView.tsx new file mode 100644 index 0000000000..19d382ac8f --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/room-tools/RoomToolsWidgetView.tsx @@ -0,0 +1,162 @@ +import { CreateLinkEvent, GetGuestRoomResultEvent, GetRoomEngine, NavigatorSearchComposer, RateFlatMessageComposer } from '@nitrots/nitro-renderer'; +import { AnimatePresence, motion } from 'framer-motion'; +import { classNames } from '../../../../layout'; +import { FC, useEffect, useState } from 'react'; +import { GetConfigurationValue, LocalizeText, SendMessageComposer, SetLocalStorage, TryVisitRoom } from '../../../../api'; +import { Text } from '../../../../common'; +import { useMessageEvent, useNavigator, useRoom } from '../../../../hooks'; + +export const RoomToolsWidgetView: FC<{}> = props => { + const [areBubblesMuted, setAreBubblesMuted] = useState(false); + const [isZoomedIn, setIsZoomedIn] = useState(false); + const [roomName, setRoomName] = useState(null); + const [roomOwner, setRoomOwner] = useState(null); + const [roomTags, setRoomTags] = useState(null); + const [isOpen, setIsOpen] = useState(false); + const [isOpenHistory, setIsOpenHistory] = useState(false); + const [roomHistory, setRoomHistory] = useState<{ roomId: number, roomName: string }[]>([]); + const { navigatorData = null } = useNavigator(); + const { roomSession = null } = useRoom(); + + const handleToolClick = (action: string, value?: string) => { + if (!roomSession) return; + + switch (action) { + case 'settings': + CreateLinkEvent('navigator/toggle-room-info'); + return; + case 'zoom': + setIsZoomedIn(prevValue => { + if (GetConfigurationValue('room.zoom.enabled', true)) { + const scale = GetRoomEngine().getRoomInstanceRenderingCanvasScale(roomSession.roomId, 1); + GetRoomEngine().setRoomInstanceRenderingCanvasScale(roomSession.roomId, 1, scale === 1 ? 0.5 : 1); + } else { + const geometry = GetRoomEngine().getRoomInstanceGeometry(roomSession.roomId, 1); + if (geometry) geometry.performZoom(); + } + return !prevValue; + }); + return; + case 'chat_history': + CreateLinkEvent('chat-history/toggle'); + return; + case 'hiddenbubbles': + CreateLinkEvent('nitrobubblehidden/toggle'); + setAreBubblesMuted(prev => !prev); + return; + case 'like_room': + SendMessageComposer(new RateFlatMessageComposer(1)); + return; + case 'toggle_room_link': + CreateLinkEvent('navigator/toggle-room-link'); + return; + case 'navigator_search_tag': + CreateLinkEvent(`navigator/search/${value}`); + SendMessageComposer(new NavigatorSearchComposer('hotel_view', `tag:${value}`)); + return; + case 'room_history': + if (roomHistory.length > 0) setIsOpenHistory(prev => !prev); + return; + case 'room_history_back': + const prevIndex = roomHistory.findIndex(room => room.roomId === navigatorData.currentRoomId) - 1; + if (prevIndex >= 0) TryVisitRoom(roomHistory[prevIndex].roomId); + return; + case 'room_history_next': + const nextIndex = roomHistory.findIndex(room => room.roomId === navigatorData.currentRoomId) + 1; + if (nextIndex < roomHistory.length) TryVisitRoom(roomHistory[nextIndex].roomId); + return; + } + }; + + const onChangeRoomHistory = (roomId: number, roomName: string) => { + let newStorage = JSON.parse(window.localStorage.getItem('nitro.room.history') || '[]'); + if (newStorage.some((room: { roomId: number }) => room.roomId === roomId)) return; + + if (newStorage.length >= 10) newStorage.shift(); + newStorage = [...newStorage, { roomId, roomName }]; + + setRoomHistory(newStorage); + SetLocalStorage('nitro.room.history', newStorage); + }; + + useMessageEvent(GetGuestRoomResultEvent, event => { + const parser = event.getParser(); + if (!parser.roomEnter || (parser.data.roomId !== roomSession.roomId)) return; + + if (roomName !== parser.data.roomName) setRoomName(parser.data.roomName); + if (roomOwner !== parser.data.ownerName) setRoomOwner(parser.data.ownerName); + if (roomTags !== parser.data.tags) setRoomTags(parser.data.tags); + onChangeRoomHistory(parser.data.roomId, parser.data.roomName); + }); + + useEffect(() => { + setIsOpen(true); + const timeout = setTimeout(() => setIsOpen(false), 5000); + return () => clearTimeout(timeout); + }, [roomName, roomOwner, roomTags]); + + useEffect(() => { + setRoomHistory(JSON.parse(window.localStorage.getItem('nitro.room.history') || '[]')); + }, []); + + useEffect(() => { + const handleTabClose = () => { + window.localStorage.removeItem('nitro.room.history'); + }; + window.addEventListener('beforeunload', handleTabClose); + return () => window.removeEventListener('beforeunload', handleTabClose); + }, []); + + return ( +
+
+
handleToolClick('settings')} /> +
handleToolClick('zoom')} /> +
handleToolClick('chat_history')} /> +
handleToolClick('hiddenbubbles')} /> + + {navigatorData.canRate && ( +
handleToolClick('like_room')} /> + )} +
handleToolClick('toggle_room_link')} /> +
handleToolClick('room_history')} /> +
+
+ + {isOpen && ( + +
+
+
+ {roomName} + {roomOwner} +
+ {roomTags && roomTags.length > 0 && ( +
+ {roomTags.map((tag, index) => ( + handleToolClick('navigator_search_tag', tag)}> + #{tag} + + ))} +
+ )} +
+
+
+ )} + {isOpenHistory && ( + +
+ {roomHistory.map(history => ( + TryVisitRoom(history.roomId)}> + {history.roomName} + + ))} +
+
+ )} +
+
+
+ ); +}; \ No newline at end of file diff --git a/Coolui v3 test/src/components/room/widgets/user-location/UserLocationView.tsx b/Coolui v3 test/src/components/room/widgets/user-location/UserLocationView.tsx new file mode 100644 index 0000000000..f7b9daac42 --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/user-location/UserLocationView.tsx @@ -0,0 +1,24 @@ +import { RoomObjectCategory } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { BaseProps } from '../../../../common'; +import { useRoom } from '../../../../hooks'; +import { ObjectLocationView } from '../object-location/ObjectLocationView'; + +interface UserLocationViewProps extends BaseProps +{ + userId: number; +} + +export const UserLocationView: FC = props => +{ + const { userId = -1, ...rest } = props; + const { roomSession = null } = useRoom(); + + if((userId === -1) || !roomSession) return null; + + const userData = roomSession.userDataManager.getUserData(userId); + + if(!userData) return null; + + return ; +}; diff --git a/Coolui v3 test/src/components/room/widgets/word-quiz/WordQuizQuestionView.tsx b/Coolui v3 test/src/components/room/widgets/word-quiz/WordQuizQuestionView.tsx new file mode 100644 index 0000000000..92f0b9605b --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/word-quiz/WordQuizQuestionView.tsx @@ -0,0 +1,44 @@ +import { FC } from 'react'; +import { VALUE_KEY_DISLIKE, VALUE_KEY_LIKE } from '../../../../api'; +import { Column, Flex, Text } from '../../../../common'; + +interface WordQuizQuestionViewProps +{ + question: string; + canVote: boolean; + vote(value: string): void; + noVotes: number; + yesVotes: number; +} + +export const WordQuizQuestionView: FC = props => +{ + const { question = null, canVote = null, vote = null, noVotes = null, yesVotes = null } = props; + + return ( + + { !canVote && +
+
+ { noVotes } +
+ { question } +
+ { yesVotes } +
+
} + { canVote && +
+ { question } +
+ vote(VALUE_KEY_DISLIKE) }> +
+ + vote(VALUE_KEY_LIKE) }> +
+ +
+
} + + ); +}; diff --git a/Coolui v3 test/src/components/room/widgets/word-quiz/WordQuizVoteView.tsx b/Coolui v3 test/src/components/room/widgets/word-quiz/WordQuizVoteView.tsx new file mode 100644 index 0000000000..b1925a0c80 --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/word-quiz/WordQuizVoteView.tsx @@ -0,0 +1,24 @@ +import { RoomObjectCategory } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { VALUE_KEY_DISLIKE } from '../../../../api'; +import { BaseProps } from '../../../../common'; +import { ObjectLocationView } from '../object-location/ObjectLocationView'; + +interface WordQuizVoteViewProps extends BaseProps +{ + userIndex: number; + vote: string; +} + +export const WordQuizVoteView: FC = props => +{ + const { userIndex = null, vote = null, ...rest } = props; + + return ( + +
+
+
+ + ); +}; diff --git a/Coolui v3 test/src/components/room/widgets/word-quiz/WordQuizWidgetView.tsx b/Coolui v3 test/src/components/room/widgets/word-quiz/WordQuizWidgetView.tsx new file mode 100644 index 0000000000..d433d3504c --- /dev/null +++ b/Coolui v3 test/src/components/room/widgets/word-quiz/WordQuizWidgetView.tsx @@ -0,0 +1,19 @@ +import { FC } from 'react'; +import { VALUE_KEY_DISLIKE, VALUE_KEY_LIKE } from '../../../../api'; +import { useWordQuizWidget } from '../../../../hooks'; +import { WordQuizQuestionView } from './WordQuizQuestionView'; +import { WordQuizVoteView } from './WordQuizVoteView'; + +export const WordQuizWidgetView: FC<{}> = props => +{ + const { question = null, answerSent = false, answerCounts = null, userAnswers = null, vote = null } = useWordQuizWidget(); + + return ( + <> + { question && + } + { userAnswers && + Array.from(userAnswers.entries()).map(([ key, value ], index) => ) } + + ); +}; diff --git a/Coolui v3 test/src/components/toolbar/ToolbarItemView.tsx b/Coolui v3 test/src/components/toolbar/ToolbarItemView.tsx new file mode 100644 index 0000000000..3a0822a2a3 --- /dev/null +++ b/Coolui v3 test/src/components/toolbar/ToolbarItemView.tsx @@ -0,0 +1,22 @@ +import { DetailedHTMLProps, forwardRef, HTMLAttributes, PropsWithChildren } from 'react'; +import { classNames } from '../../layout'; + +export const ToolbarItemView = forwardRef & DetailedHTMLProps, HTMLDivElement>>((props, ref) => +{ + const { icon = null, className = null, ...rest } = props; + + return ( +
+ ); +}); + +ToolbarItemView.displayName = 'ToolbarItemView'; diff --git a/Coolui v3 test/src/components/toolbar/ToolbarMeView.tsx b/Coolui v3 test/src/components/toolbar/ToolbarMeView.tsx new file mode 100644 index 0000000000..c420fce84f --- /dev/null +++ b/Coolui v3 test/src/components/toolbar/ToolbarMeView.tsx @@ -0,0 +1,49 @@ +import { CreateLinkEvent, GetRoomEngine, GetSessionDataManager, MouseEventType, RoomObjectCategory } from '@nitrots/nitro-renderer'; +import { Dispatch, FC, PropsWithChildren, SetStateAction, useEffect, useRef } from 'react'; +import { DispatchUiEvent, GetConfigurationValue, GetRoomSession, GetUserProfile } from '../../api'; +import { Flex, LayoutItemCountView } from '../../common'; +import { GuideToolEvent } from '../../events'; + +export const ToolbarMeView: FC>; +}>> = props => +{ + const { useGuideTool = false, unseenAchievementCount = 0, setMeExpanded = null, children = null, ...rest } = props; + const elementRef = useRef(); + + useEffect(() => + { + const roomSession = GetRoomSession(); + + if(!roomSession) return; + + GetRoomEngine().selectRoomObject(roomSession.roomId, roomSession.ownRoomIndex, RoomObjectCategory.UNIT); + }, []); + + useEffect(() => + { + const onClick = (event: MouseEvent) => setMeExpanded(false); + + document.addEventListener('click', onClick); + + return () => document.removeEventListener(MouseEventType.MOUSE_CLICK, onClick); + }, [ setMeExpanded ]); + + return ( + + { (GetConfigurationValue('guides.enabled') && useGuideTool) && +
DispatchUiEvent(new GuideToolEvent(GuideToolEvent.TOGGLE_GUIDE_TOOL)) } /> } +
CreateLinkEvent('achievements/toggle') }> + { (unseenAchievementCount > 0) && + } +
+
GetUserProfile(GetSessionDataManager().userId) } /> +
CreateLinkEvent('navigator/search/myworld_view') } /> +
CreateLinkEvent('avatar-editor/toggle') } /> +
CreateLinkEvent('user-settings/toggle') } /> + { children } + + ); +}; diff --git a/Coolui v3 test/src/components/toolbar/ToolbarView.tsx b/Coolui v3 test/src/components/toolbar/ToolbarView.tsx new file mode 100644 index 0000000000..27e6a4ab33 --- /dev/null +++ b/Coolui v3 test/src/components/toolbar/ToolbarView.tsx @@ -0,0 +1,117 @@ +import { CreateLinkEvent, Dispose, DropBounce, EaseOut, GetSessionDataManager, JumpBy, Motions, NitroToolbarAnimateIconEvent, PerkAllowancesMessageEvent, PerkEnum, Queue, Wait } from '@nitrots/nitro-renderer'; +import { AnimatePresence, motion } from 'framer-motion'; +import { FC, useState } from 'react'; +import { GetConfigurationValue, MessengerIconState, OpenMessengerChat, VisitDesktop } from '../../api'; +import { Flex, LayoutAvatarImageView, LayoutItemCountView } from '../../common'; +import { useAchievements, useFriends, useInventoryUnseenTracker, useMessageEvent, useMessenger, useNitroEvent, useSessionInfo } from '../../hooks'; +import { ToolbarItemView } from './ToolbarItemView'; +import { ToolbarMeView } from './ToolbarMeView'; + +export const ToolbarView: FC<{ isInRoom: boolean }> = props => +{ + const { isInRoom } = props; + const [ isMeExpanded, setMeExpanded ] = useState(false); + const [ useGuideTool, setUseGuideTool ] = useState(false); + const { userFigure = null } = useSessionInfo(); + const { getFullCount = 0 } = useInventoryUnseenTracker(); + const { getTotalUnseen = 0 } = useAchievements(); + const { requests = [] } = useFriends(); + const { iconState = MessengerIconState.HIDDEN } = useMessenger(); + const isMod = GetSessionDataManager().isModerator; + + useMessageEvent(PerkAllowancesMessageEvent, event => + { + setUseGuideTool(event.getParser().isAllowed(PerkEnum.USE_GUIDE_TOOL)); + }); + + useNitroEvent(NitroToolbarAnimateIconEvent.ANIMATE_ICON, event => + { + const animationIconToToolbar = (iconName: string, image: HTMLImageElement, x: number, y: number) => + { + const target = (document.body.getElementsByClassName(iconName)[0] as HTMLElement); + + if(!target) return; + + image.className = 'toolbar-icon-animation'; + image.style.visibility = 'visible'; + image.style.left = (x + 'px'); + image.style.top = (y + 'px'); + + document.body.append(image); + + const targetBounds = target.getBoundingClientRect(); + const imageBounds = image.getBoundingClientRect(); + + const left = (imageBounds.x - targetBounds.x); + const top = (imageBounds.y - targetBounds.y); + const squared = Math.sqrt(((left * left) + (top * top))); + const wait = (500 - Math.abs(((((1 / squared) * 100) * 500) * 0.5))); + const height = 20; + + const motionName = (`ToolbarBouncing[${ iconName }]`); + + if(!Motions.getMotionByTag(motionName)) + { + Motions.runMotion(new Queue(new Wait((wait + 8)), new DropBounce(target, 400, 12))).tag = motionName; + } + + const motion = new Queue(new EaseOut(new JumpBy(image, wait, ((targetBounds.x - imageBounds.x) + height), (targetBounds.y - imageBounds.y), 100, 1), 1), new Dispose(image)); + + Motions.runMotion(motion); + }; + + animationIconToToolbar('icon-inventory', event.image, event.x, event.y); + }); + + return ( + <> + { isMeExpanded && ( + + )} + + + + + + { + setMeExpanded(!isMeExpanded); + event.stopPropagation(); + } }> + + { (getTotalUnseen > 0) && + } + + { isInRoom && + VisitDesktop() } /> } + { !isInRoom && + CreateLinkEvent('navigator/goto/home') } /> } + CreateLinkEvent('navigator/toggle') } /> + { GetConfigurationValue('game.center.enabled') && + CreateLinkEvent('games/toggle') } /> } + CreateLinkEvent('catalog/toggle') } /> + CreateLinkEvent('inventory/toggle') }> + { (getFullCount > 0) && + } + + { isInRoom && + CreateLinkEvent('camera/toggle') } /> } + { isMod && + CreateLinkEvent('mod-tools/toggle') } /> } + + + + + + CreateLinkEvent('friends/toggle') }> + { (requests.length > 0) && + } + + { ((iconState === MessengerIconState.SHOW) || (iconState === MessengerIconState.UNREAD)) && + OpenMessengerChat() } /> } + +
+ + + + ); +}; diff --git a/Coolui v3 test/src/components/user-profile/FriendsContainerView.tsx b/Coolui v3 test/src/components/user-profile/FriendsContainerView.tsx new file mode 100644 index 0000000000..b92b82d014 --- /dev/null +++ b/Coolui v3 test/src/components/user-profile/FriendsContainerView.tsx @@ -0,0 +1,27 @@ +import { RelationshipStatusInfoMessageParser } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { LocalizeText } from '../../api'; +import { RelationshipsContainerView } from './RelationshipsContainerView'; + +interface FriendsContainerViewProps +{ + relationships: RelationshipStatusInfoMessageParser; + friendsCount: number; +} + +export const FriendsContainerView: FC = props => +{ + const { relationships = null, friendsCount = null } = props; + + return ( +
+

+ { LocalizeText('extendedprofile.friends.count') } { friendsCount } +

+
+

{ LocalizeText('extendedprofile.relstatus') }

+ +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/user-profile/GroupsContainerView.tsx b/Coolui v3 test/src/components/user-profile/GroupsContainerView.tsx new file mode 100644 index 0000000000..3ffd78745f --- /dev/null +++ b/Coolui v3 test/src/components/user-profile/GroupsContainerView.tsx @@ -0,0 +1,90 @@ +import { GroupInformationComposer, GroupInformationEvent, GroupInformationParser, HabboGroupEntryData } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { SendMessageComposer, ToggleFavoriteGroup } from '../../api'; +import { AutoGrid, Column, Grid, GridProps, LayoutBadgeImageView, LayoutGridItem } from '../../common'; +import { useMessageEvent } from '../../hooks'; +import { GroupInformationView } from '../groups/views/GroupInformationView'; + +interface GroupsContainerViewProps extends GridProps +{ + itsMe: boolean; + groups: HabboGroupEntryData[]; + onLeaveGroup: () => void; +} + +export const GroupsContainerView: FC = props => +{ + const { itsMe = null, groups = null, onLeaveGroup = null, overflow = 'hidden', gap = 2, ...rest } = props; + const [ selectedGroupId, setSelectedGroupId ] = useState(null); + const [ groupInformation, setGroupInformation ] = useState(null); + + useMessageEvent(GroupInformationEvent, event => + { + const parser = event.getParser(); + + if(!selectedGroupId || (selectedGroupId !== parser.id) || parser.flag) return; + + setGroupInformation(parser); + }); + + useEffect(() => + { + if(!selectedGroupId) return; + + SendMessageComposer(new GroupInformationComposer(selectedGroupId, false)); + }, [ selectedGroupId ]); + + useEffect(() => + { + setGroupInformation(null); + + if(groups.length > 0) + { + setSelectedGroupId(prevValue => + { + if(prevValue === groups[0].groupId) + { + SendMessageComposer(new GroupInformationComposer(groups[0].groupId, false)); + } + + return groups[0].groupId; + }); + } + }, [ groups ]); + + if(!groups || !groups.length) + { + return ( + +
+
+
+
+
+ + ); + } + + return ( + + + + { groups.map((group, index) => + { + return ( + setSelectedGroupId(group.groupId) }> + { itsMe && + ToggleFavoriteGroup(group) } /> } + + + ); + }) } + + + + { groupInformation && + } + + + ); +}; diff --git a/Coolui v3 test/src/components/user-profile/RelationshipsContainerView.tsx b/Coolui v3 test/src/components/user-profile/RelationshipsContainerView.tsx new file mode 100644 index 0000000000..7bdca660a8 --- /dev/null +++ b/Coolui v3 test/src/components/user-profile/RelationshipsContainerView.tsx @@ -0,0 +1,62 @@ +import { RelationshipStatusEnum, RelationshipStatusInfoMessageParser } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { GetUserProfile, LocalizeText } from '../../api'; +import { Flex, LayoutAvatarImageView } from '../../common'; + +interface RelationshipsContainerViewProps +{ + relationships: RelationshipStatusInfoMessageParser; +} + +interface RelationshipsContainerRelationshipViewProps +{ + type: number; +} + +export const RelationshipsContainerView: FC = props => +{ + const { relationships = null } = props; + + const RelationshipComponent = ({ type }: RelationshipsContainerRelationshipViewProps) => + { + const relationshipInfo = (relationships && relationships.relationshipStatusMap.hasKey(type)) ? relationships.relationshipStatusMap.getValue(type) : null; + const relationshipName = RelationshipStatusEnum.RELATIONSHIP_NAMES[type].toLocaleLowerCase(); + + return ( +
+ + + +
+
+

(relationshipInfo && (relationshipInfo.randomFriendId >= 1) && GetUserProfile(relationshipInfo.randomFriendId)) }> + { (!relationshipInfo || (relationshipInfo.friendCount === 0)) && + LocalizeText('extendedprofile.add.friends') } + { (relationshipInfo && (relationshipInfo.friendCount >= 1)) && + relationshipInfo.randomFriendName } +

+ { (relationshipInfo && (relationshipInfo.friendCount >= 1)) && +
+ +
} +
+

+ { (!relationshipInfo || (relationshipInfo.friendCount === 0)) && + LocalizeText('extendedprofile.no.friends.in.this.category') } + { (relationshipInfo && (relationshipInfo.friendCount > 1)) && + LocalizeText(`extendedprofile.relstatus.others.${ relationshipName }`, [ 'count' ], [ (relationshipInfo.friendCount - 1).toString() ]) } +   +

+
+
+ ); + }; + + return ( + <> + + + + + ); +}; diff --git a/Coolui v3 test/src/components/user-profile/UserContainerView.tsx b/Coolui v3 test/src/components/user-profile/UserContainerView.tsx new file mode 100644 index 0000000000..20d0768c76 --- /dev/null +++ b/Coolui v3 test/src/components/user-profile/UserContainerView.tsx @@ -0,0 +1,71 @@ +import { GetSessionDataManager, RequestFriendComposer, UserProfileParser } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { FriendlyTime, LocalizeText, SendMessageComposer } from '../../api'; +import { LayoutAvatarImageView, Text } from '../../common'; + +export const UserContainerView: FC<{ + userProfile: UserProfileParser; +}> = props => +{ + const { userProfile = null } = props; + const [ requestSent, setRequestSent ] = useState(userProfile.requestSent); + const isOwnProfile = (userProfile.id === GetSessionDataManager().userId); + const canSendFriendRequest = !requestSent && (!isOwnProfile && !userProfile.isMyFriend && !userProfile.requestSent); + + const addFriend = () => + { + setRequestSent(true); + + SendMessageComposer(new RequestFriendComposer(userProfile.username)); + }; + + useEffect(() => + { + setRequestSent(userProfile.requestSent); + }, [ userProfile ]); + + return ( +
+
+ +
+
+
+

{ userProfile.username }

+

{ userProfile.motto }

+
+
+

+ { LocalizeText('extendedprofile.created') } { userProfile.registration } +

+

+ { LocalizeText('extendedprofile.last.login') } { FriendlyTime.format(userProfile.secondsSinceLastVisit, '.ago', 2) } +

+

+ { LocalizeText('extendedprofile.achievementscore') } { userProfile.achievementPoints } +

+
+
+ { userProfile.isOnline && + } + { !userProfile.isOnline && + } +
+ { canSendFriendRequest && + { LocalizeText('extendedprofile.addasafriend') } } + { !canSendFriendRequest && + <> + + { isOwnProfile && +

{ LocalizeText('extendedprofile.me') }

} + { userProfile.isMyFriend && +

{ LocalizeText('extendedprofile.friend') }

} + { (requestSent || userProfile.requestSent) && +

{ LocalizeText('extendedprofile.friendrequestsent') }

} + } +
+
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/user-profile/UserProfileView.tsx b/Coolui v3 test/src/components/user-profile/UserProfileView.tsx new file mode 100644 index 0000000000..1df7e0b152 --- /dev/null +++ b/Coolui v3 test/src/components/user-profile/UserProfileView.tsx @@ -0,0 +1,125 @@ +import { CreateLinkEvent, ExtendedProfileChangedMessageEvent, GetSessionDataManager, RelationshipStatusInfoEvent, RelationshipStatusInfoMessageParser, RoomEngineObjectEvent, RoomObjectCategory, RoomObjectType, UserCurrentBadgesComposer, UserCurrentBadgesEvent, UserProfileEvent, UserProfileParser, UserRelationshipsComposer } from '@nitrots/nitro-renderer'; +import { FC, useState } from 'react'; +import { GetRoomSession, GetUserProfile, LocalizeText, SendMessageComposer } from '../../api'; +import { Flex, Grid, LayoutBadgeImageView, Text } from '../../common'; +import { useMessageEvent, useNitroEvent } from '../../hooks'; +import { NitroCard } from '../../layout'; +import { FriendsContainerView } from './FriendsContainerView'; +import { GroupsContainerView } from './GroupsContainerView'; +import { UserContainerView } from './UserContainerView'; + +export const UserProfileView: FC<{}> = props => +{ + const [ userProfile, setUserProfile ] = useState(null); + const [ userBadges, setUserBadges ] = useState([]); + const [ userRelationships, setUserRelationships ] = useState(null); + + const onClose = () => + { + setUserProfile(null); + setUserBadges([]); + setUserRelationships(null); + }; + + const onLeaveGroup = () => + { + if(!userProfile || (userProfile.id !== GetSessionDataManager().userId)) return; + + GetUserProfile(userProfile.id); + }; + + useMessageEvent(UserCurrentBadgesEvent, event => + { + const parser = event.getParser(); + + if(!userProfile || (parser.userId !== userProfile.id)) return; + + setUserBadges(parser.badges); + }); + + useMessageEvent(RelationshipStatusInfoEvent, event => + { + const parser = event.getParser(); + + if(!userProfile || (parser.userId !== userProfile.id)) return; + + setUserRelationships(parser); + }); + + useMessageEvent(UserProfileEvent, event => + { + const parser = event.getParser(); + + let isSameProfile = false; + + setUserProfile(prevValue => + { + if(prevValue && prevValue.id) isSameProfile = (prevValue.id === parser.id); + + return parser; + }); + + if(!isSameProfile) + { + setUserBadges([]); + setUserRelationships(null); + } + + SendMessageComposer(new UserCurrentBadgesComposer(parser.id)); + SendMessageComposer(new UserRelationshipsComposer(parser.id)); + }); + + useMessageEvent(ExtendedProfileChangedMessageEvent, event => + { + const parser = event.getParser(); + + if(parser.userId != userProfile?.id) return; + + GetUserProfile(parser.userId); + }); + + useNitroEvent(RoomEngineObjectEvent.SELECTED, event => + { + if(!userProfile) return; + + if(event.category !== RoomObjectCategory.UNIT) return; + + const userData = GetRoomSession().userDataManager.getUserDataByIndex(event.objectId); + + if(userData.type !== RoomObjectType.USER) return; + + GetUserProfile(userData.webID); + }); + + if(!userProfile) return null; + + return ( + + + + +
+ +
+ { userBadges && (userBadges.length > 0) && userBadges.map((badge, index) => ) } +
+
+
+ { userRelationships && + } +
+
+ + CreateLinkEvent(`navigator/search/hotel_view/owner:${ userProfile.username }`) }> + + { LocalizeText('extendedprofile.rooms') } + + + +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/user-settings/UserSettingsView.tsx b/Coolui v3 test/src/components/user-settings/UserSettingsView.tsx new file mode 100644 index 0000000000..d52df7438f --- /dev/null +++ b/Coolui v3 test/src/components/user-settings/UserSettingsView.tsx @@ -0,0 +1,188 @@ +import { AddLinkEventTracker, ILinkEventTracker, NitroSettingsEvent, RemoveLinkEventTracker, UserSettingsCameraFollowComposer, UserSettingsEvent, UserSettingsOldChatComposer, UserSettingsRoomInvitesComposer, UserSettingsSoundComposer } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { FaVolumeDown, FaVolumeMute, FaVolumeUp } from 'react-icons/fa'; +import { DispatchMainEvent, DispatchUiEvent, LocalizeText, SendMessageComposer } from '../../api'; +import { NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../common'; +import { useCatalogPlaceMultipleItems, useCatalogSkipPurchaseConfirmation, useMessageEvent } from '../../hooks'; +import { classNames } from '../../layout'; + +export const UserSettingsView: FC<{}> = props => +{ + const [ isVisible, setIsVisible ] = useState(false); + const [ userSettings, setUserSettings ] = useState(null); + const [ catalogPlaceMultipleObjects, setCatalogPlaceMultipleObjects ] = useCatalogPlaceMultipleItems(); + const [ catalogSkipPurchaseConfirmation, setCatalogSkipPurchaseConfirmation ] = useCatalogSkipPurchaseConfirmation(); + + const processAction = (type: string, value?: boolean | number | string) => + { + let doUpdate = true; + + const clone = userSettings.clone(); + + switch(type) + { + case 'close_view': + setIsVisible(false); + doUpdate = false; + return; + case 'oldchat': + clone.oldChat = value as boolean; + SendMessageComposer(new UserSettingsOldChatComposer(clone.oldChat)); + break; + case 'room_invites': + clone.roomInvites = value as boolean; + SendMessageComposer(new UserSettingsRoomInvitesComposer(clone.roomInvites)); + break; + case 'camera_follow': + clone.cameraFollow = value as boolean; + SendMessageComposer(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); + + DispatchMainEvent(clone); + }; + + const saveRangeSlider = (type: string) => + { + switch(type) + { + case 'volume': + SendMessageComposer(new UserSettingsSoundComposer(Math.round(userSettings.volumeSystem), Math.round(userSettings.volumeFurni), Math.round(userSettings.volumeTrax))); + break; + } + }; + + useMessageEvent(UserSettingsEvent, event => + { + const parser = event.getParser(); + const settingsEvent = new NitroSettingsEvent(); + + 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; + + setUserSettings(settingsEvent); + DispatchMainEvent(settingsEvent); + }); + + useEffect(() => + { + const linkTracker: ILinkEventTracker = { + linkReceived: (url: string) => + { + const parts = url.split('/'); + + if(parts.length < 2) return; + + switch(parts[1]) + { + case 'show': + setIsVisible(true); + return; + case 'hide': + setIsVisible(false); + return; + case 'toggle': + setIsVisible(prevValue => !prevValue); + return; + } + }, + eventUrlPrefix: 'user-settings/' + }; + + AddLinkEventTracker(linkTracker); + + return () => RemoveLinkEventTracker(linkTracker); + }, []); + + useEffect(() => + { + if(!userSettings) return; + + DispatchUiEvent(userSettings); + }, [ userSettings ]); + + if(!isVisible || !userSettings) return null; + + return ( + + processAction('close_view') } /> + +
+
+ processAction('oldchat', event.target.checked) } /> + { LocalizeText('memenu.settings.chat.prefer.old.chat') } +
+
+ processAction('room_invites', event.target.checked) } /> + { LocalizeText('memenu.settings.other.ignore.room.invites') } +
+
+ processAction('camera_follow', event.target.checked) } /> + { LocalizeText('memenu.settings.other.disable.room.camera.follow') } +
+
+ setCatalogPlaceMultipleObjects(event.target.checked) } /> + { LocalizeText('memenu.settings.other.place.multiple.objects') } +
+
+ setCatalogSkipPurchaseConfirmation(event.target.checked) } /> + { LocalizeText('memenu.settings.other.skip.purchase.confirmation') } +
+
+
+ { LocalizeText('widget.memenu.settings.volume') } +
+ { LocalizeText('widget.memenu.settings.volume.ui') } +
+ { (userSettings.volumeSystem === 0) && = 50) && 'text-muted', 'fa-icon') } /> } + { (userSettings.volumeSystem > 0) && = 50) && 'text-muted', 'fa-icon') } /> } + processAction('system_volume', event.target.value) } onMouseUp={ () => saveRangeSlider('volume') } /> + +
+
+
+ { LocalizeText('widget.memenu.settings.volume.furni') } +
+ { (userSettings.volumeFurni === 0) && = 50) && 'text-muted', 'fa-icon') } /> } + { (userSettings.volumeFurni > 0) && = 50) && 'text-muted', 'fa-icon') } /> } + processAction('furni_volume', event.target.value) } onMouseUp={ () => saveRangeSlider('volume') } /> + +
+
+
+ { LocalizeText('widget.memenu.settings.volume.trax') } +
+ { (userSettings.volumeTrax === 0) && = 50) && 'text-muted', 'fa-icon') } /> } + { (userSettings.volumeTrax > 0) && = 50) && 'text-muted', 'fa-icon') } /> } + processAction('trax_volume', event.target.value) } onMouseUp={ () => saveRangeSlider('volume') } /> + +
+
+
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/WiredView.tsx b/Coolui v3 test/src/components/wired/WiredView.tsx new file mode 100644 index 0000000000..0f073abdd1 --- /dev/null +++ b/Coolui v3 test/src/components/wired/WiredView.tsx @@ -0,0 +1,21 @@ +import { ConditionDefinition, TriggerDefinition, WiredActionDefinition } from '@nitrots/nitro-renderer'; +import { FC } from 'react'; +import { useWired } from '../../hooks'; +import { WiredActionLayoutView } from './views/actions/WiredActionLayoutView'; +import { WiredConditionLayoutView } from './views/conditions/WiredConditionLayoutView'; +import { WiredTriggerLayoutView } from './views/triggers/WiredTriggerLayoutView'; + +export const WiredView: FC<{}> = props => +{ + const { trigger = null } = useWired(); + + if(!trigger) return null; + + if(trigger instanceof WiredActionDefinition) return WiredActionLayoutView(trigger.code); + + if(trigger instanceof TriggerDefinition) return WiredTriggerLayoutView(trigger.code); + + if(trigger instanceof ConditionDefinition) return WiredConditionLayoutView(trigger.code); + + return null; +}; diff --git a/Coolui v3 test/src/components/wired/views/WiredBaseView.tsx b/Coolui v3 test/src/components/wired/views/WiredBaseView.tsx new file mode 100644 index 0000000000..8e8fb374fc --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/WiredBaseView.tsx @@ -0,0 +1,114 @@ +import { GetSessionDataManager } from '@nitrots/nitro-renderer'; +import { FC, PropsWithChildren, useEffect, useState } from 'react'; +import { LocalizeText, WiredFurniType, WiredSelectionVisualizer } from '../../../api'; +import { Button, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../common'; +import { useWired } from '../../../hooks'; +import { WiredFurniSelectorView } from './WiredFurniSelectorView'; + +export interface WiredBaseViewProps +{ + wiredType: string; + requiresFurni: number; + hasSpecialInput: boolean; + save: () => void; + validate?: () => boolean; +} + +export const WiredBaseView: FC> = props => +{ + const { wiredType = '', requiresFurni = WiredFurniType.STUFF_SELECTION_OPTION_NONE, save = null, validate = null, children = null, hasSpecialInput = false } = props; + const [ wiredName, setWiredName ] = useState(null); + const [ wiredDescription, setWiredDescription ] = useState(null); + const [ needsSave, setNeedsSave ] = useState(false); + const { trigger = null, setTrigger = null, setIntParams = null, setStringParam = null, setFurniIds = null, setAllowsFurni = null, saveWired = null } = useWired(); + + const onClose = () => setTrigger(null); + + const onSave = () => + { + if(validate && !validate()) return; + + if(save) save(); + + setNeedsSave(true); + }; + + useEffect(() => + { + if(!needsSave) return; + + saveWired(); + + setNeedsSave(false); + }, [ needsSave, saveWired ]); + + useEffect(() => + { + if(!trigger) return; + + const spriteId = (trigger.spriteId || -1); + const furniData = GetSessionDataManager().getFloorItemData(spriteId); + + if(!furniData) + { + setWiredName(('NAME: ' + spriteId)); + setWiredDescription(('NAME: ' + spriteId)); + } + else + { + setWiredName(furniData.name); + setWiredDescription(furniData.description); + } + + if(hasSpecialInput) + { + setIntParams(trigger.intData); + setStringParam(trigger.stringData); + } + + if(requiresFurni > WiredFurniType.STUFF_SELECTION_OPTION_NONE) + { + setFurniIds(prevValue => + { + if(prevValue && prevValue.length) WiredSelectionVisualizer.clearSelectionShaderFromFurni(prevValue); + + if(trigger.selectedItems && trigger.selectedItems.length) + { + WiredSelectionVisualizer.applySelectionShaderToFurni(trigger.selectedItems); + + return trigger.selectedItems; + } + + return []; + }); + } + + setAllowsFurni(requiresFurni); + }, [ trigger, hasSpecialInput, requiresFurni, setIntParams, setStringParam, setFurniIds, setAllowsFurni ]); + + return ( + + + +
+
+ + { wiredName } +
+ { wiredDescription } +
+ { !!children &&
} + { children } + { (requiresFurni > WiredFurniType.STUFF_SELECTION_OPTION_NONE) && + <> +
+ + } +
+ + +
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/WiredFurniSelectorView.tsx b/Coolui v3 test/src/components/wired/views/WiredFurniSelectorView.tsx new file mode 100644 index 0000000000..1363326bda --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/WiredFurniSelectorView.tsx @@ -0,0 +1,16 @@ +import { FC } from 'react'; +import { LocalizeText } from '../../../api'; +import { Text } from '../../../common'; +import { useWired } from '../../../hooks'; + +export const WiredFurniSelectorView: FC<{}> = props => +{ + const { trigger = null, furniIds = [] } = useWired(); + + return ( +
+ { LocalizeText('wiredfurni.pickfurnis.caption', [ 'count', 'limit' ], [ furniIds.length.toString(), trigger.maximumItemSelectionCount.toString() ]) } + { LocalizeText('wiredfurni.pickfurnis.desc') } +
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionBaseView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionBaseView.tsx new file mode 100644 index 0000000000..aef1cdbaab --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionBaseView.tsx @@ -0,0 +1,41 @@ +import { WiredActionDefinition } from '@nitrots/nitro-renderer'; +import { FC, PropsWithChildren, useEffect } from 'react'; +import ReactSlider from 'react-slider'; +import { GetWiredTimeLocale, LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { WiredBaseView } from '../WiredBaseView'; + +export interface WiredActionBaseViewProps +{ + hasSpecialInput: boolean; + requiresFurni: number; + save: () => void; +} + +export const WiredActionBaseView: FC> = props => +{ + const { requiresFurni = WiredFurniType.STUFF_SELECTION_OPTION_NONE, save = null, hasSpecialInput = false, children = null } = props; + const { trigger = null, actionDelay = 0, setActionDelay = null } = useWired(); + + useEffect(() => + { + setActionDelay((trigger as WiredActionDefinition).delayInPulses); + }, [ trigger, setActionDelay ]); + + return ( + + { children } + { !!children &&
} +
+ { LocalizeText('wiredfurni.params.delay', [ 'seconds' ], [ GetWiredTimeLocale(actionDelay) ]) } + setActionDelay(event) } /> +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionBotChangeFigureView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionBotChangeFigureView.tsx new file mode 100644 index 0000000000..e359037f67 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionBotChangeFigureView.tsx @@ -0,0 +1,39 @@ +import { GetSessionDataManager } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, WIRED_STRING_DELIMETER, WiredFurniType } from '../../../../api'; +import { Button, LayoutAvatarImageView, Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { NitroInput } from '../../../../layout'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +const DEFAULT_FIGURE: string = 'hd-180-1.ch-210-66.lg-270-82.sh-290-81'; + +export const WiredActionBotChangeFigureView: FC<{}> = props => +{ + const [ botName, setBotName ] = useState(''); + const [ figure, setFigure ] = useState(''); + const { trigger = null, setStringParam = null } = useWired(); + + const save = () => setStringParam((botName + WIRED_STRING_DELIMETER + figure)); + + useEffect(() => + { + const data = trigger.stringData.split(WIRED_STRING_DELIMETER); + + if(data.length > 0) setBotName(data[0]); + if(data.length > 1) setFigure(data[1].length > 0 ? data[1] : DEFAULT_FIGURE); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.bot.name') } + setBotName(event.target.value) } /> +
+
+ + +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionBotFollowAvatarView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionBotFollowAvatarView.tsx new file mode 100644 index 0000000000..9576ea04dc --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionBotFollowAvatarView.tsx @@ -0,0 +1,44 @@ +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { NitroInput } from '../../../../layout'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +export const WiredActionBotFollowAvatarView: FC<{}> = props => +{ + const [ botName, setBotName ] = useState(''); + const [ followMode, setFollowMode ] = useState(-1); + const { trigger = null, setStringParam = null, setIntParams = null } = useWired(); + + const save = () => + { + setStringParam(botName); + setIntParams([ followMode ]); + }; + + useEffect(() => + { + setBotName(trigger.stringData); + setFollowMode((trigger.intData.length > 0) ? trigger.intData[0] : 0); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.bot.name') } + setBotName(event.target.value) } /> +
+
+
+ setFollowMode(1) } /> + { LocalizeText('wiredfurni.params.start.following') } +
+
+ setFollowMode(0) } /> + { LocalizeText('wiredfurni.params.stop.following') } +
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionBotGiveHandItemView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionBotGiveHandItemView.tsx new file mode 100644 index 0000000000..0dc2bc480f --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionBotGiveHandItemView.tsx @@ -0,0 +1,43 @@ +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { NitroInput } from '../../../../layout'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +const ALLOWED_HAND_ITEM_IDS: number[] = [ 2, 5, 7, 8, 9, 10, 27 ]; + +export const WiredActionBotGiveHandItemView: FC<{}> = props => +{ + const [ botName, setBotName ] = useState(''); + const [ handItemId, setHandItemId ] = useState(-1); + const { trigger = null, setStringParam = null, setIntParams = null } = useWired(); + + const save = () => + { + setStringParam(botName); + setIntParams([ handItemId ]); + }; + + useEffect(() => + { + setBotName(trigger.stringData); + setHandItemId((trigger.intData.length > 0) ? trigger.intData[0] : 0); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.bot.name') } + setBotName(event.target.value) } /> +
+
+ { LocalizeText('wiredfurni.params.handitem') } + +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionBotMoveView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionBotMoveView.tsx new file mode 100644 index 0000000000..644b34e1e6 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionBotMoveView.tsx @@ -0,0 +1,28 @@ +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { NitroInput } from '../../../../layout'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +export const WiredActionBotMoveView: FC<{}> = props => +{ + const [ botName, setBotName ] = useState(''); + const { trigger = null, setStringParam = null } = useWired(); + + const save = () => setStringParam(botName); + + useEffect(() => + { + setBotName(trigger.stringData); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.bot.name') } + setBotName(event.target.value) } /> +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionBotTalkToAvatarView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionBotTalkToAvatarView.tsx new file mode 100644 index 0000000000..b69a9724d0 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionBotTalkToAvatarView.tsx @@ -0,0 +1,53 @@ +import { FC, useEffect, useState } from 'react'; +import { GetConfigurationValue, LocalizeText, WIRED_STRING_DELIMETER, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { NitroInput } from '../../../../layout'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +export const WiredActionBotTalkToAvatarView: FC<{}> = props => +{ + const [ botName, setBotName ] = useState(''); + const [ message, setMessage ] = useState(''); + const [ talkMode, setTalkMode ] = useState(-1); + const { trigger = null, setStringParam = null, setIntParams = null } = useWired(); + + const save = () => + { + setStringParam(botName + WIRED_STRING_DELIMETER + message); + setIntParams([ talkMode ]); + }; + + useEffect(() => + { + const data = trigger.stringData.split(WIRED_STRING_DELIMETER); + + if(data.length > 0) setBotName(data[0]); + if(data.length > 1) setMessage(data[1].length > 0 ? data[1] : ''); + + setTalkMode((trigger.intData.length > 0) ? trigger.intData[0] : 0); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.bot.name') } + setBotName(event.target.value) } /> +
+
+ { LocalizeText('wiredfurni.params.message') } + ('wired.action.bot.talk.to.avatar.max.length', 64) } type="text" value={ message } onChange={ event => setMessage(event.target.value) } /> +
+
+
+ setTalkMode(0) } /> + { LocalizeText('wiredfurni.params.talk') } +
+
+ setTalkMode(1) } /> + { LocalizeText('wiredfurni.params.whisper') } +
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionBotTalkView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionBotTalkView.tsx new file mode 100644 index 0000000000..31b6a14ce3 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionBotTalkView.tsx @@ -0,0 +1,53 @@ +import { FC, useEffect, useState } from 'react'; +import { GetConfigurationValue, LocalizeText, WIRED_STRING_DELIMETER, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { NitroInput } from '../../../../layout'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +export const WiredActionBotTalkView: FC<{}> = props => +{ + const [ botName, setBotName ] = useState(''); + const [ message, setMessage ] = useState(''); + const [ talkMode, setTalkMode ] = useState(-1); + const { trigger = null, setStringParam = null, setIntParams = null } = useWired(); + + const save = () => + { + setStringParam(botName + WIRED_STRING_DELIMETER + message); + setIntParams([ talkMode ]); + }; + + useEffect(() => + { + const data = trigger.stringData.split(WIRED_STRING_DELIMETER); + + if(data.length > 0) setBotName(data[0]); + if(data.length > 1) setMessage(data[1].length > 0 ? data[1] : ''); + + setTalkMode((trigger.intData.length > 0) ? trigger.intData[0] : 0); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.bot.name') } + setBotName(event.target.value) } /> +
+
+ { LocalizeText('wiredfurni.params.message') } + ('wired.action.bot.talk.max.length', 64) } type="text" value={ message } onChange={ event => setMessage(event.target.value) } /> +
+
+
+ setTalkMode(0) } /> + { LocalizeText('wiredfurni.params.talk') } +
+
+ setTalkMode(1) } /> + { LocalizeText('wiredfurni.params.shout') } +
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionBotTeleportView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionBotTeleportView.tsx new file mode 100644 index 0000000000..1979930dca --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionBotTeleportView.tsx @@ -0,0 +1,28 @@ +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { NitroInput } from '../../../../layout'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +export const WiredActionBotTeleportView: FC<{}> = props => +{ + const [ botName, setBotName ] = useState(''); + const { trigger = null, setStringParam = null } = useWired(); + + const save = () => setStringParam(botName); + + useEffect(() => + { + setBotName(trigger.stringData); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.bot.name') } + setBotName(event.target.value) } /> +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionCallAnotherStackView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionCallAnotherStackView.tsx new file mode 100644 index 0000000000..69c17fe1f5 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionCallAnotherStackView.tsx @@ -0,0 +1,8 @@ +import { FC } from 'react'; +import { WiredFurniType } from '../../../../api'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +export const WiredActionCallAnotherStackView: FC<{}> = props => +{ + return ; +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionChaseView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionChaseView.tsx new file mode 100644 index 0000000000..d0e1c419f8 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionChaseView.tsx @@ -0,0 +1,8 @@ +import { FC } from 'react'; +import { WiredFurniType } from '../../../../api'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +export const WiredActionChaseView: FC<{}> = props => +{ + return ; +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionChatView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionChatView.tsx new file mode 100644 index 0000000000..8f622c2bc3 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionChatView.tsx @@ -0,0 +1,28 @@ +import { FC, useEffect, useState } from 'react'; +import { GetConfigurationValue, LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { NitroInput } from '../../../../layout'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +export const WiredActionChatView: FC<{}> = props => +{ + const [ message, setMessage ] = useState(''); + const { trigger = null, setStringParam = null } = useWired(); + + const save = () => setStringParam(message); + + useEffect(() => + { + setMessage(trigger.stringData); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.message') } + ('wired.action.chat.max.length', 100) } type="text" value={ message } onChange={ event => setMessage(event.target.value) } /> +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionFleeView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionFleeView.tsx new file mode 100644 index 0000000000..e3e5776082 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionFleeView.tsx @@ -0,0 +1,8 @@ +import { FC } from 'react'; +import { WiredFurniType } from '../../../../api'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +export const WiredActionFleeView: FC<{}> = props => +{ + return ; +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionGiveRewardView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionGiveRewardView.tsx new file mode 100644 index 0000000000..8e8716761d --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionGiveRewardView.tsx @@ -0,0 +1,161 @@ +import { FC, useEffect, useState } from 'react'; +import { FaPlus, FaTrash } from 'react-icons/fa'; +import ReactSlider from 'react-slider'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Button, Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { NitroInput } from '../../../../layout'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +export const WiredActionGiveRewardView: FC<{}> = props => +{ + const [ limitEnabled, setLimitEnabled ] = useState(false); + const [ rewardTime, setRewardTime ] = useState(1); + const [ uniqueRewards, setUniqueRewards ] = useState(false); + const [ rewardsLimit, setRewardsLimit ] = useState(1); + const [ limitationInterval, setLimitationInterval ] = useState(1); + const [ rewards, setRewards ] = useState<{ isBadge: boolean, itemCode: string, probability: number }[]>([]); + const { trigger = null, setIntParams = null, setStringParam = null } = useWired(); + + const addReward = () => setRewards(rewards => [ ...rewards, { isBadge: false, itemCode: '', probability: null } ]); + + const removeReward = (index: number) => + { + setRewards(prevValue => + { + const newValues = Array.from(prevValue); + + newValues.splice(index, 1); + + return newValues; + }); + }; + + const updateReward = (index: number, isBadge: boolean, itemCode: string, probability: number) => + { + const rewardsClone = Array.from(rewards); + const reward = rewardsClone[index]; + + if(!reward) return; + + reward.isBadge = isBadge; + reward.itemCode = itemCode; + reward.probability = probability; + + setRewards(rewardsClone); + }; + + const save = () => + { + let stringRewards = []; + + for(const reward of rewards) + { + if(!reward.itemCode) continue; + + const rewardsString = [ reward.isBadge ? '0' : '1', reward.itemCode, reward.probability.toString() ]; + stringRewards.push(rewardsString.join(',')); + } + + if(stringRewards.length > 0) + { + setStringParam(stringRewards.join(';')); + setIntParams([ rewardTime, uniqueRewards ? 1 : 0, rewardsLimit, limitationInterval ]); + } + }; + + useEffect(() => + { + const readRewards: { isBadge: boolean, itemCode: string, probability: number }[] = []; + + if(trigger.stringData.length > 0 && trigger.stringData.includes(';')) + { + const splittedRewards = trigger.stringData.split(';'); + + for(const rawReward of splittedRewards) + { + const reward = rawReward.split(','); + + if(reward.length !== 3) continue; + + readRewards.push({ isBadge: reward[0] === '0', itemCode: reward[1], probability: Number(reward[2]) }); + } + } + + if(readRewards.length === 0) readRewards.push({ isBadge: false, itemCode: '', probability: null }); + + setRewardTime((trigger.intData.length > 0) ? trigger.intData[0] : 0); + setUniqueRewards((trigger.intData.length > 1) ? (trigger.intData[1] === 1) : false); + setRewardsLimit((trigger.intData.length > 2) ? trigger.intData[2] : 0); + setLimitationInterval((trigger.intData.length > 3) ? trigger.intData[3] : 0); + setLimitEnabled((trigger.intData.length > 3) ? trigger.intData[3] > 0 : false); + setRewards(readRewards); + }, [ trigger ]); + + return ( + +
+ setLimitEnabled(event.target.checked) } /> + { LocalizeText('wiredfurni.params.prizelimit', [ 'amount' ], [ limitEnabled ? rewardsLimit.toString() : '' ]) } +
+ { !limitEnabled && + + Reward limit not set. Make sure rewards are badges or non-tradeable items. + } + { limitEnabled && + setRewardsLimit(event) } /> } +
+
+ How often can a user be rewarded? +
+ + { (rewardTime > 0) && setLimitationInterval(Number(event.target.value)) } /> } +
+
+
+
+ setUniqueRewards(e.target.checked) } /> + Unique rewards +
+ + If checked each reward will be given once to each user. This will disable the probabilities option. + +
+
+ Rewards + +
+
+ { rewards && rewards.map((reward, index) => + { + return ( +
+
+ updateReward(index, e.target.checked, reward.itemCode, reward.probability) } /> + Badge? +
+ updateReward(index, reward.isBadge, e.target.value, reward.probability) } /> + updateReward(index, reward.isBadge, reward.itemCode, Number(e.target.value)) } /> + { (index > 0) && + } +
+ ); + }) } +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionGiveScoreToPredefinedTeamView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionGiveScoreToPredefinedTeamView.tsx new file mode 100644 index 0000000000..02d228112a --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionGiveScoreToPredefinedTeamView.tsx @@ -0,0 +1,67 @@ +import { FC, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +export const WiredActionGiveScoreToPredefinedTeamView: FC<{}> = props => +{ + const [ points, setPoints ] = useState(1); + const [ time, setTime ] = useState(1); + const [ selectedTeam, setSelectedTeam ] = useState(1); + const { trigger = null, setIntParams = null } = useWired(); + + const save = () => setIntParams([ points, time, selectedTeam ]); + + useEffect(() => + { + if(trigger.intData.length >= 2) + { + setPoints(trigger.intData[0]); + setTime(trigger.intData[1]); + setSelectedTeam(trigger.intData[2]); + } + else + { + setPoints(1); + setTime(1); + setSelectedTeam(1); + } + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.setpoints', [ 'points' ], [ points.toString() ]) } + setPoints(event) } /> +
+
+ { LocalizeText('wiredfurni.params.settimesingame', [ 'times' ], [ time.toString() ]) } + setTime(event) } /> +
+
+ { LocalizeText('wiredfurni.params.team') } + { [ 1, 2, 3, 4 ].map(value => + { + return ( +
+ setSelectedTeam(value) } /> + { LocalizeText('wiredfurni.params.team.' + value) } +
+ ); + }) } +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionGiveScoreView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionGiveScoreView.tsx new file mode 100644 index 0000000000..a2b9f86bee --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionGiveScoreView.tsx @@ -0,0 +1,52 @@ +import { FC, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +export const WiredActionGiveScoreView: FC<{}> = props => +{ + const [ points, setPoints ] = useState(1); + const [ time, setTime ] = useState(1); + const { trigger = null, setIntParams = null } = useWired(); + + const save = () => setIntParams([ points, time ]); + + useEffect(() => + { + if(trigger.intData.length >= 2) + { + setPoints(trigger.intData[0]); + setTime(trigger.intData[1]); + } + else + { + setPoints(1); + setTime(1); + } + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.setpoints', [ 'points' ], [ points.toString() ]) } + setPoints(event) } /> +
+
+ { LocalizeText('wiredfurni.params.settimesingame', [ 'times' ], [ time.toString() ]) } + setTime(event) } /> +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionJoinTeamView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionJoinTeamView.tsx new file mode 100644 index 0000000000..10b8c24f2c --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionJoinTeamView.tsx @@ -0,0 +1,35 @@ +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +export const WiredActionJoinTeamView: FC<{}> = props => +{ + const [ selectedTeam, setSelectedTeam ] = useState(-1); + const { trigger = null, setIntParams = null } = useWired(); + + const save = () => setIntParams([ selectedTeam ]); + + useEffect(() => + { + setSelectedTeam((trigger.intData.length > 0) ? trigger.intData[0] : 0); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.team') } + { [ 1, 2, 3, 4 ].map(team => + { + return ( +
+ setSelectedTeam(team) } /> + { LocalizeText(`wiredfurni.params.team.${ team }`) } +
+ ); + }) } +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionKickFromRoomView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionKickFromRoomView.tsx new file mode 100644 index 0000000000..002426d089 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionKickFromRoomView.tsx @@ -0,0 +1,28 @@ +import { FC, useEffect, useState } from 'react'; +import { GetConfigurationValue, LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { NitroInput } from '../../../../layout'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +export const WiredActionKickFromRoomView: FC<{}> = props => +{ + const [ message, setMessage ] = useState(''); + const { trigger = null, setStringParam = null } = useWired(); + + const save = () => setStringParam(message); + + useEffect(() => + { + setMessage(trigger.stringData); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.message') } + ('wired.action.kick.from.room.max.length', 100) } type="text" value={ message } onChange={ event => setMessage(event.target.value) } /> +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionLayoutView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionLayoutView.tsx new file mode 100644 index 0000000000..36d14d4936 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionLayoutView.tsx @@ -0,0 +1,85 @@ +import { WiredActionLayoutCode } from '../../../../api'; +import { WiredActionBotChangeFigureView } from './WiredActionBotChangeFigureView'; +import { WiredActionBotFollowAvatarView } from './WiredActionBotFollowAvatarView'; +import { WiredActionBotGiveHandItemView } from './WiredActionBotGiveHandItemView'; +import { WiredActionBotMoveView } from './WiredActionBotMoveView'; +import { WiredActionBotTalkToAvatarView } from './WiredActionBotTalkToAvatarView'; +import { WiredActionBotTalkView } from './WiredActionBotTalkView'; +import { WiredActionBotTeleportView } from './WiredActionBotTeleportView'; +import { WiredActionCallAnotherStackView } from './WiredActionCallAnotherStackView'; +import { WiredActionChaseView } from './WiredActionChaseView'; +import { WiredActionChatView } from './WiredActionChatView'; +import { WiredActionFleeView } from './WiredActionFleeView'; +import { WiredActionGiveRewardView } from './WiredActionGiveRewardView'; +import { WiredActionGiveScoreToPredefinedTeamView } from './WiredActionGiveScoreToPredefinedTeamView'; +import { WiredActionGiveScoreView } from './WiredActionGiveScoreView'; +import { WiredActionJoinTeamView } from './WiredActionJoinTeamView'; +import { WiredActionKickFromRoomView } from './WiredActionKickFromRoomView'; +import { WiredActionLeaveTeamView } from './WiredActionLeaveTeamView'; +import { WiredActionMoveAndRotateFurniView } from './WiredActionMoveAndRotateFurniView'; +import { WiredActionMoveFurniToView } from './WiredActionMoveFurniToView'; +import { WiredActionMoveFurniView } from './WiredActionMoveFurniView'; +import { WiredActionMuteUserView } from './WiredActionMuteUserView'; +import { WiredActionResetView } from './WiredActionResetView'; +import { WiredActionSetFurniStateToView } from './WiredActionSetFurniStateToView'; +import { WiredActionTeleportView } from './WiredActionTeleportView'; +import { WiredActionToggleFurniStateView } from './WiredActionToggleFurniStateView'; + +export const WiredActionLayoutView = (code: number) => +{ + switch(code) + { + case WiredActionLayoutCode.BOT_CHANGE_FIGURE: + return ; + case WiredActionLayoutCode.BOT_FOLLOW_AVATAR: + return ; + case WiredActionLayoutCode.BOT_GIVE_HAND_ITEM: + return ; + case WiredActionLayoutCode.BOT_MOVE: + return ; + case WiredActionLayoutCode.BOT_TALK: + return ; + case WiredActionLayoutCode.BOT_TALK_DIRECT_TO_AVTR: + return ; + case WiredActionLayoutCode.BOT_TELEPORT: + return ; + case WiredActionLayoutCode.CALL_ANOTHER_STACK: + return ; + case WiredActionLayoutCode.CHASE: + return ; + case WiredActionLayoutCode.CHAT: + return ; + case WiredActionLayoutCode.FLEE: + return ; + case WiredActionLayoutCode.GIVE_REWARD: + return ; + case WiredActionLayoutCode.GIVE_SCORE: + return ; + case WiredActionLayoutCode.GIVE_SCORE_TO_PREDEFINED_TEAM: + return ; + case WiredActionLayoutCode.JOIN_TEAM: + return ; + case WiredActionLayoutCode.KICK_FROM_ROOM: + return ; + case WiredActionLayoutCode.LEAVE_TEAM: + return ; + case WiredActionLayoutCode.MOVE_FURNI: + return ; + case WiredActionLayoutCode.MOVE_AND_ROTATE_FURNI: + return ; + case WiredActionLayoutCode.MOVE_FURNI_TO: + return ; + case WiredActionLayoutCode.MUTE_USER: + return ; + case WiredActionLayoutCode.RESET: + return ; + case WiredActionLayoutCode.SET_FURNI_STATE: + return ; + case WiredActionLayoutCode.TELEPORT: + return ; + case WiredActionLayoutCode.TOGGLE_FURNI_STATE: + return ; + } + + return null; +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionLeaveTeamView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionLeaveTeamView.tsx new file mode 100644 index 0000000000..9202ed34b5 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionLeaveTeamView.tsx @@ -0,0 +1,8 @@ +import { FC } from 'react'; +import { WiredFurniType } from '../../../../api'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +export const WiredActionLeaveTeamView: FC<{}> = props => +{ + return ; +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionMoveAndRotateFurniView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionMoveAndRotateFurniView.tsx new file mode 100644 index 0000000000..d30b43bb42 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionMoveAndRotateFurniView.tsx @@ -0,0 +1,82 @@ +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +const directionOptions: { value: number, icon: string }[] = [ + { + value: 0, + icon: 'ne' + }, + { + value: 2, + icon: 'se' + }, + { + value: 4, + icon: 'sw' + }, + { + value: 6, + icon: 'nw' + } +]; + +const rotationOptions: number[] = [ 0, 1, 2, 3, 4, 5, 6 ]; + +export const WiredActionMoveAndRotateFurniView: FC<{}> = props => +{ + const [ movement, setMovement ] = useState(-1); + const [ rotation, setRotation ] = useState(-1); + const { trigger = null, setIntParams = null } = useWired(); + + const save = () => setIntParams([ movement, rotation ]); + + useEffect(() => + { + if(trigger.intData.length >= 2) + { + setMovement(trigger.intData[0]); + setRotation(trigger.intData[1]); + } + else + { + setMovement(-1); + setRotation(-1); + } + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.startdir') } +
+ { directionOptions.map(option => + { + return ( +
+ setMovement(option.value) } /> + + + +
+ ); + }) } +
+
+
+ { LocalizeText('wiredfurni.params.turn') } + { rotationOptions.map(option => + { + return ( +
+ setRotation(option) } /> + { LocalizeText(`wiredfurni.params.turn.${ option }`) } +
+ ); + }) } +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionMoveFurniToView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionMoveFurniToView.tsx new file mode 100644 index 0000000000..0b6d78155e --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionMoveFurniToView.tsx @@ -0,0 +1,76 @@ +import { FC, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +const directionOptions: { value: number, icon: string }[] = [ + { + value: 0, + icon: 'ne' + }, + { + value: 2, + icon: 'se' + }, + { + value: 4, + icon: 'sw' + }, + { + value: 6, + icon: 'nw' + } +]; + +export const WiredActionMoveFurniToView: FC<{}> = props => +{ + const [ spacing, setSpacing ] = useState(-1); + const [ movement, setMovement ] = useState(-1); + const { trigger = null, setIntParams = null } = useWired(); + + const save = () => setIntParams([ movement, spacing ]); + + useEffect(() => + { + if(trigger.intData.length >= 2) + { + setSpacing(trigger.intData[1]); + setMovement(trigger.intData[0]); + } + else + { + setSpacing(-1); + setMovement(-1); + } + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.emptytiles', [ 'tiles' ], [ spacing.toString() ]) } + setSpacing(event) } /> +
+
+ { LocalizeText('wiredfurni.params.startdir') } +
+ { directionOptions.map(value => + { + return ( +
+ setMovement(value.value) } /> + +
+ ); + }) } +
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionMoveFurniView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionMoveFurniView.tsx new file mode 100644 index 0000000000..1a7c0edf72 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionMoveFurniView.tsx @@ -0,0 +1,100 @@ +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +const directionOptions: { value: number, icon: string }[] = [ + { + value: 4, + icon: 'ne' + }, + { + value: 5, + icon: 'se' + }, + { + value: 6, + icon: 'sw' + }, + { + value: 7, + icon: 'nw' + }, + { + value: 2, + icon: 'mv-2' + }, + { + value: 3, + icon: 'mv-3' + }, + { + value: 1, + icon: 'mv-1' + } +]; + +const rotationOptions: number[] = [ 0, 1, 2, 3 ]; + +export const WiredActionMoveFurniView: FC<{}> = props => +{ + const [ movement, setMovement ] = useState(-1); + const [ rotation, setRotation ] = useState(-1); + const { trigger = null, setIntParams = null } = useWired(); + + const save = () => setIntParams([ movement, rotation ]); + + useEffect(() => + { + if(trigger.intData.length >= 2) + { + setMovement(trigger.intData[0]); + setRotation(trigger.intData[1]); + } + else + { + setMovement(-1); + setRotation(-1); + } + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.movefurni') } +
+ setMovement(0) } /> + { LocalizeText('wiredfurni.params.movefurni.0') } +
+
+ { directionOptions.map(option => + { + return ( +
+ setMovement(option.value) } /> + +
+ ); + }) } +
+
+
+
+ { LocalizeText('wiredfurni.params.rotatefurni') } + { rotationOptions.map(option => + { + return ( +
+ setRotation(option) } /> + + { [ 1, 2 ].includes(option) && } + { LocalizeText(`wiredfurni.params.rotatefurni.${ option }`) } + +
+ ); + }) } +
+ + ); +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionMuteUserView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionMuteUserView.tsx new file mode 100644 index 0000000000..a5e2a3df51 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionMuteUserView.tsx @@ -0,0 +1,44 @@ +import { FC, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; +import { GetConfigurationValue, LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { NitroInput } from '../../../../layout'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +export const WiredActionMuteUserView: FC<{}> = props => +{ + const [ time, setTime ] = useState(-1); + const [ message, setMessage ] = useState(''); + const { trigger = null, setIntParams = null, setStringParam = null } = useWired(); + + const save = () => + { + setIntParams([ time ]); + setStringParam(message); + }; + + useEffect(() => + { + setTime((trigger.intData.length > 0) ? trigger.intData[0] : 0); + setMessage(trigger.stringData); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.length.minutes', [ 'minutes' ], [ time.toString() ]) } + setTime(event) } /> +
+
+ { LocalizeText('wiredfurni.params.message') } + ('wired.action.mute.user.max.length', 100) } type="text" value={ message } onChange={ event => setMessage(event.target.value) } /> +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionResetView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionResetView.tsx new file mode 100644 index 0000000000..eed03e3ac2 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionResetView.tsx @@ -0,0 +1,8 @@ +import { FC } from 'react'; +import { WiredFurniType } from '../../../../api'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +export const WiredActionResetView: FC<{}> = props => +{ + return ; +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionSetFurniStateToView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionSetFurniStateToView.tsx new file mode 100644 index 0000000000..96b7237bc6 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionSetFurniStateToView.tsx @@ -0,0 +1,42 @@ +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +export const WiredActionSetFurniStateToView: FC<{}> = props => +{ + const [ stateFlag, setStateFlag ] = useState(0); + const [ directionFlag, setDirectionFlag ] = useState(0); + const [ positionFlag, setPositionFlag ] = useState(0); + const { trigger = null, setIntParams = null } = useWired(); + + const save = () => setIntParams([ stateFlag, directionFlag, positionFlag ]); + + useEffect(() => + { + setStateFlag(trigger.getBoolean(0) ? 1 : 0); + setDirectionFlag(trigger.getBoolean(1) ? 1 : 0); + setPositionFlag(trigger.getBoolean(2) ? 1 : 0); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.conditions') } +
+ setStateFlag(event.target.checked ? 1 : 0) } /> + { LocalizeText('wiredfurni.params.condition.state') } +
+
+ setDirectionFlag(event.target.checked ? 1 : 0) } /> + { LocalizeText('wiredfurni.params.condition.direction') } +
+
+ setPositionFlag(event.target.checked ? 1 : 0) } /> + { LocalizeText('wiredfurni.params.condition.position') } +
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionTeleportView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionTeleportView.tsx new file mode 100644 index 0000000000..04ef42de8c --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionTeleportView.tsx @@ -0,0 +1,8 @@ +import { FC } from 'react'; +import { WiredFurniType } from '../../../../api'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +export const WiredActionTeleportView: FC<{}> = props => +{ + return ; +}; diff --git a/Coolui v3 test/src/components/wired/views/actions/WiredActionToggleFurniStateView.tsx b/Coolui v3 test/src/components/wired/views/actions/WiredActionToggleFurniStateView.tsx new file mode 100644 index 0000000000..486aa8e237 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/actions/WiredActionToggleFurniStateView.tsx @@ -0,0 +1,8 @@ +import { FC } from 'react'; +import { WiredFurniType } from '../../../../api'; +import { WiredActionBaseView } from './WiredActionBaseView'; + +export const WiredActionToggleFurniStateView: FC<{}> = props => +{ + return ; +}; diff --git a/Coolui v3 test/src/components/wired/views/conditions/WiredConditionActorHasHandItem.tsx b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionActorHasHandItem.tsx new file mode 100644 index 0000000000..5c6c391bfb --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionActorHasHandItem.tsx @@ -0,0 +1,34 @@ +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { WiredConditionBaseView } from './WiredConditionBaseView'; + +const ALLOWED_HAND_ITEM_IDS: number[] = [ 2, 5, 7, 8, 9, 10, 27 ]; + +export const WiredConditionActorHasHandItemView: FC<{}> = props => +{ + const [ handItemId, setHandItemId ] = useState(-1); + const { trigger = null, setIntParams = null } = useWired(); + + const save = () => setIntParams([ handItemId ]); + + useEffect(() => + { + setHandItemId((trigger.intData.length > 0) ? trigger.intData[0] : 0); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.handitem') } + +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/conditions/WiredConditionActorIsGroupMemberView.tsx b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionActorIsGroupMemberView.tsx new file mode 100644 index 0000000000..0f425f3529 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionActorIsGroupMemberView.tsx @@ -0,0 +1,8 @@ +import { FC } from 'react'; +import { WiredFurniType } from '../../../../api'; +import { WiredConditionBaseView } from './WiredConditionBaseView'; + +export const WiredConditionActorIsGroupMemberView: FC<{}> = props => +{ + return ; +}; diff --git a/Coolui v3 test/src/components/wired/views/conditions/WiredConditionActorIsOnFurniView.tsx b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionActorIsOnFurniView.tsx new file mode 100644 index 0000000000..9aedea64f4 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionActorIsOnFurniView.tsx @@ -0,0 +1,8 @@ +import { FC } from 'react'; +import { WiredFurniType } from '../../../../api'; +import { WiredConditionBaseView } from './WiredConditionBaseView'; + +export const WiredConditionActorIsOnFurniView: FC<{}> = props => +{ + return ; +}; diff --git a/Coolui v3 test/src/components/wired/views/conditions/WiredConditionActorIsTeamMemberView.tsx b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionActorIsTeamMemberView.tsx new file mode 100644 index 0000000000..7fc69ba625 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionActorIsTeamMemberView.tsx @@ -0,0 +1,37 @@ +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { WiredConditionBaseView } from './WiredConditionBaseView'; + +const teamIds: number[] = [ 1, 2, 3, 4 ]; + +export const WiredConditionActorIsTeamMemberView: FC<{}> = props => +{ + const [ selectedTeam, setSelectedTeam ] = useState(-1); + const { trigger = null, setIntParams = null } = useWired(); + + const save = () => setIntParams([ selectedTeam ]); + + useEffect(() => + { + setSelectedTeam((trigger.intData.length > 0) ? trigger.intData[0] : 0); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.team') } + { teamIds.map(value => + { + return ( +
+ setSelectedTeam(value) } /> + { LocalizeText(`wiredfurni.params.team.${ value }`) } +
+ ); + }) } +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/conditions/WiredConditionActorIsWearingBadgeView.tsx b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionActorIsWearingBadgeView.tsx new file mode 100644 index 0000000000..5a46f6448e --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionActorIsWearingBadgeView.tsx @@ -0,0 +1,28 @@ +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { NitroInput } from '../../../../layout'; +import { WiredConditionBaseView } from './WiredConditionBaseView'; + +export const WiredConditionActorIsWearingBadgeView: FC<{}> = props => +{ + const [ badge, setBadge ] = useState(''); + const { trigger = null, setStringParam = null } = useWired(); + + const save = () => setStringParam(badge); + + useEffect(() => + { + setBadge(trigger.stringData); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.badgecode') } + setBadge(event.target.value) } /> +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/conditions/WiredConditionActorIsWearingEffectView.tsx b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionActorIsWearingEffectView.tsx new file mode 100644 index 0000000000..42188cc078 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionActorIsWearingEffectView.tsx @@ -0,0 +1,28 @@ +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { NitroInput } from '../../../../layout'; +import { WiredConditionBaseView } from './WiredConditionBaseView'; + +export const WiredConditionActorIsWearingEffectView: FC<{}> = props => +{ + const [ effect, setEffect ] = useState(-1); + const { trigger = null, setIntParams = null } = useWired(); + + const save = () => setIntParams([ effect ]); + + useEffect(() => + { + setEffect(trigger?.intData[0] ?? 0); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.tooltip.effectid') } + setEffect(parseInt(event.target.value)) } /> +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/conditions/WiredConditionBaseView.tsx b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionBaseView.tsx new file mode 100644 index 0000000000..5782942cb3 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionBaseView.tsx @@ -0,0 +1,23 @@ +import { FC, PropsWithChildren } from 'react'; +import { WiredFurniType } from '../../../../api'; +import { WiredBaseView } from '../WiredBaseView'; + +export interface WiredConditionBaseViewProps +{ + hasSpecialInput: boolean; + requiresFurni: number; + save: () => void; +} + +export const WiredConditionBaseView: FC> = props => +{ + const { requiresFurni = WiredFurniType.STUFF_SELECTION_OPTION_NONE, save = null, hasSpecialInput = false, children = null } = props; + + const onSave = () => (save && save()); + + return ( + + { children } + + ); +}; diff --git a/Coolui v3 test/src/components/wired/views/conditions/WiredConditionDateRangeView.tsx b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionDateRangeView.tsx new file mode 100644 index 0000000000..8eedbf3ba3 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionDateRangeView.tsx @@ -0,0 +1,59 @@ +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, WiredDateToString, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { NitroInput } from '../../../../layout'; +import { WiredConditionBaseView } from './WiredConditionBaseView'; + +export const WiredConditionDateRangeView: FC<{}> = props => +{ + const [ startDate, setStartDate ] = useState(''); + const [ endDate, setEndDate ] = useState(''); + const { trigger = null, setIntParams = null } = useWired(); + + const save = () => + { + let startDateMili = 0; + let endDateMili = 0; + + const startDateInstance = new Date(startDate); + const endDateInstance = new Date(endDate); + + if(startDateInstance && endDateInstance) + { + startDateMili = startDateInstance.getTime() / 1000; + endDateMili = endDateInstance.getTime() / 1000; + } + + setIntParams([ startDateMili, endDateMili ]); + }; + + useEffect(() => + { + if(trigger.intData.length >= 2) + { + let startDate = new Date(); + let endDate = new Date(); + + if(trigger.intData[0] > 0) startDate = new Date((trigger.intData[0] * 1000)); + + if(trigger.intData[1] > 0) endDate = new Date((trigger.intData[1] * 1000)); + + setStartDate(WiredDateToString(startDate)); + setEndDate(WiredDateToString(endDate)); + } + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.startdate') } + setStartDate(e.target.value) } /> +
+
+ { LocalizeText('wiredfurni.params.enddate') } + setEndDate(e.target.value) } /> +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/conditions/WiredConditionFurniHasAvatarOnView.tsx b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionFurniHasAvatarOnView.tsx new file mode 100644 index 0000000000..5575e13e98 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionFurniHasAvatarOnView.tsx @@ -0,0 +1,8 @@ +import { FC } from 'react'; +import { WiredFurniType } from '../../../../api'; +import { WiredConditionBaseView } from './WiredConditionBaseView'; + +export const WiredConditionFurniHasAvatarOnView: FC<{}> = props => +{ + return ; +}; diff --git a/Coolui v3 test/src/components/wired/views/conditions/WiredConditionFurniHasFurniOnView.tsx b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionFurniHasFurniOnView.tsx new file mode 100644 index 0000000000..7759f94740 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionFurniHasFurniOnView.tsx @@ -0,0 +1,35 @@ +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { WiredConditionBaseView } from './WiredConditionBaseView'; + +export const WiredConditionFurniHasFurniOnView: FC<{}> = props => +{ + const [ requireAll, setRequireAll ] = useState(-1); + const { trigger = null, setIntParams = null } = useWired(); + + const save = () => setIntParams([ requireAll ]); + + useEffect(() => + { + setRequireAll((trigger.intData.length > 0) ? trigger.intData[0] : 0); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.requireall') } + { [ 0, 1 ].map(value => + { + return ( +
+ setRequireAll(value) } /> + { LocalizeText('wiredfurni.params.requireall.' + value) } +
+ ); + }) } +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/conditions/WiredConditionFurniHasNotFurniOnView.tsx b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionFurniHasNotFurniOnView.tsx new file mode 100644 index 0000000000..44c193595d --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionFurniHasNotFurniOnView.tsx @@ -0,0 +1,35 @@ +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { WiredConditionBaseView } from './WiredConditionBaseView'; + +export const WiredConditionFurniHasNotFurniOnView: FC<{}> = props => +{ + const [ requireAll, setRequireAll ] = useState(-1); + const { trigger = null, setIntParams = null } = useWired(); + + const save = () => setIntParams([ requireAll ]); + + useEffect(() => + { + setRequireAll((trigger.intData.length > 0) ? trigger.intData[0] : 0); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.not_requireall') } + { [ 0, 1 ].map(value => + { + return ( +
+ setRequireAll(value) } /> + { LocalizeText(`wiredfurni.params.not_requireall.${ value }`) } +
+ ); + }) } +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/conditions/WiredConditionFurniIsOfTypeView.tsx b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionFurniIsOfTypeView.tsx new file mode 100644 index 0000000000..5cda9f79c4 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionFurniIsOfTypeView.tsx @@ -0,0 +1,8 @@ +import { FC } from 'react'; +import { WiredFurniType } from '../../../../api'; +import { WiredConditionBaseView } from './WiredConditionBaseView'; + +export const WiredConditionFurniIsOfTypeView: FC<{}> = props => +{ + return ; +}; diff --git a/Coolui v3 test/src/components/wired/views/conditions/WiredConditionFurniMatchesSnapshotView.tsx b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionFurniMatchesSnapshotView.tsx new file mode 100644 index 0000000000..176a0e6707 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionFurniMatchesSnapshotView.tsx @@ -0,0 +1,42 @@ +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { WiredConditionBaseView } from './WiredConditionBaseView'; + +export const WiredConditionFurniMatchesSnapshotView: FC<{}> = props => +{ + const [ stateFlag, setStateFlag ] = useState(0); + const [ directionFlag, setDirectionFlag ] = useState(0); + const [ positionFlag, setPositionFlag ] = useState(0); + const { trigger = null, setIntParams = null } = useWired(); + + const save = () => setIntParams([ stateFlag, directionFlag, positionFlag ]); + + useEffect(() => + { + setStateFlag(trigger.getBoolean(0) ? 1 : 0); + setDirectionFlag(trigger.getBoolean(1) ? 1 : 0); + setPositionFlag(trigger.getBoolean(2) ? 1 : 0); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.conditions') } +
+ setStateFlag(event.target.checked ? 1 : 0) } /> + { LocalizeText('wiredfurni.params.condition.state') } +
+
+ setDirectionFlag(event.target.checked ? 1 : 0) } /> + { LocalizeText('wiredfurni.params.condition.direction') } +
+
+ setPositionFlag(event.target.checked ? 1 : 0) } /> + { LocalizeText('wiredfurni.params.condition.position') } +
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/conditions/WiredConditionLayoutView.tsx b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionLayoutView.tsx new file mode 100644 index 0000000000..a1a88c2a95 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionLayoutView.tsx @@ -0,0 +1,64 @@ +import { WiredConditionlayout } from '../../../../api'; +import { WiredConditionActorHasHandItemView } from './WiredConditionActorHasHandItem'; +import { WiredConditionActorIsGroupMemberView } from './WiredConditionActorIsGroupMemberView'; +import { WiredConditionActorIsOnFurniView } from './WiredConditionActorIsOnFurniView'; +import { WiredConditionActorIsTeamMemberView } from './WiredConditionActorIsTeamMemberView'; +import { WiredConditionActorIsWearingBadgeView } from './WiredConditionActorIsWearingBadgeView'; +import { WiredConditionActorIsWearingEffectView } from './WiredConditionActorIsWearingEffectView'; +import { WiredConditionDateRangeView } from './WiredConditionDateRangeView'; +import { WiredConditionFurniHasAvatarOnView } from './WiredConditionFurniHasAvatarOnView'; +import { WiredConditionFurniHasFurniOnView } from './WiredConditionFurniHasFurniOnView'; +import { WiredConditionFurniHasNotFurniOnView } from './WiredConditionFurniHasNotFurniOnView'; +import { WiredConditionFurniIsOfTypeView } from './WiredConditionFurniIsOfTypeView'; +import { WiredConditionFurniMatchesSnapshotView } from './WiredConditionFurniMatchesSnapshotView'; +import { WiredConditionTimeElapsedLessView } from './WiredConditionTimeElapsedLessView'; +import { WiredConditionTimeElapsedMoreView } from './WiredConditionTimeElapsedMoreView'; +import { WiredConditionUserCountInRoomView } from './WiredConditionUserCountInRoomView'; + +export const WiredConditionLayoutView = (code: number) => +{ + switch(code) + { + case WiredConditionlayout.ACTOR_HAS_HANDITEM: + return ; + case WiredConditionlayout.ACTOR_IS_GROUP_MEMBER: + case WiredConditionlayout.NOT_ACTOR_IN_GROUP: + return ; + case WiredConditionlayout.ACTOR_IS_ON_FURNI: + case WiredConditionlayout.NOT_ACTOR_ON_FURNI: + return ; + case WiredConditionlayout.ACTOR_IS_IN_TEAM: + case WiredConditionlayout.NOT_ACTOR_IN_TEAM: + return ; + case WiredConditionlayout.ACTOR_IS_WEARING_BADGE: + case WiredConditionlayout.NOT_ACTOR_WEARS_BADGE: + return ; + case WiredConditionlayout.ACTOR_IS_WEARING_EFFECT: + case WiredConditionlayout.NOT_ACTOR_WEARING_EFFECT: + return ; + case WiredConditionlayout.DATE_RANGE_ACTIVE: + return ; + case WiredConditionlayout.FURNIS_HAVE_AVATARS: + case WiredConditionlayout.FURNI_NOT_HAVE_HABBO: + return ; + case WiredConditionlayout.HAS_STACKED_FURNIS: + return ; + case WiredConditionlayout.NOT_HAS_STACKED_FURNIS: + return ; + case WiredConditionlayout.STUFF_TYPE_MATCHES: + case WiredConditionlayout.NOT_FURNI_IS_OF_TYPE: + return ; + case WiredConditionlayout.STATES_MATCH: + case WiredConditionlayout.NOT_STATES_MATCH: + return ; + case WiredConditionlayout.TIME_ELAPSED_LESS: + return ; + case WiredConditionlayout.TIME_ELAPSED_MORE: + return ; + case WiredConditionlayout.USER_COUNT_IN: + case WiredConditionlayout.NOT_USER_COUNT_IN: + return ; + } + + return null; +}; diff --git a/Coolui v3 test/src/components/wired/views/conditions/WiredConditionTimeElapsedLessView.tsx b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionTimeElapsedLessView.tsx new file mode 100644 index 0000000000..9054fe3d83 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionTimeElapsedLessView.tsx @@ -0,0 +1,33 @@ +import { FC, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; +import { GetWiredTimeLocale, LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { WiredConditionBaseView } from './WiredConditionBaseView'; + +export const WiredConditionTimeElapsedLessView: FC<{}> = props => +{ + const [ time, setTime ] = useState(-1); + const { trigger = null, setIntParams = null } = useWired(); + + const save = () => setIntParams([ time ]); + + useEffect(() => + { + setTime((trigger.intData.length > 0) ? trigger.intData[0] : 0); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.allowbefore', [ 'seconds' ], [ GetWiredTimeLocale(time) ]) } + setTime(event) } /> +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/conditions/WiredConditionTimeElapsedMoreView.tsx b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionTimeElapsedMoreView.tsx new file mode 100644 index 0000000000..a31efdb986 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionTimeElapsedMoreView.tsx @@ -0,0 +1,33 @@ +import { FC, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; +import { GetWiredTimeLocale, LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { WiredConditionBaseView } from './WiredConditionBaseView'; + +export const WiredConditionTimeElapsedMoreView: FC<{}> = props => +{ + const [ time, setTime ] = useState(-1); + const { trigger = null, setIntParams = null } = useWired(); + + const save = () => setIntParams([ time ]); + + useEffect(() => + { + setTime((trigger.intData.length > 0) ? trigger.intData[0] : 0); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.allowafter', [ 'seconds' ], [ GetWiredTimeLocale(time) ]) } + setTime(event) } /> +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/conditions/WiredConditionUserCountInRoomView.tsx b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionUserCountInRoomView.tsx new file mode 100644 index 0000000000..d6557213f0 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/conditions/WiredConditionUserCountInRoomView.tsx @@ -0,0 +1,52 @@ +import { FC, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { WiredConditionBaseView } from './WiredConditionBaseView'; + +export const WiredConditionUserCountInRoomView: FC<{}> = props => +{ + const [ min, setMin ] = useState(1); + const [ max, setMax ] = useState(0); + const { trigger = null, setIntParams = null } = useWired(); + + const save = () => setIntParams([ min, max ]); + + useEffect(() => + { + if(trigger.intData.length >= 2) + { + setMin(trigger.intData[0]); + setMax(trigger.intData[1]); + } + else + { + setMin(1); + setMax(0); + } + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.usercountmin', [ 'value' ], [ min.toString() ]) } + setMin(event) } /> +
+
+ { LocalizeText('wiredfurni.params.usercountmax', [ 'value' ], [ max.toString() ]) } + setMax(event) } /> +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerAvatarEnterRoomView.tsx b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerAvatarEnterRoomView.tsx new file mode 100644 index 0000000000..2d948a4b52 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerAvatarEnterRoomView.tsx @@ -0,0 +1,39 @@ +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { NitroInput } from '../../../../layout'; +import { WiredTriggerBaseView } from './WiredTriggerBaseView'; + +export const WiredTriggerAvatarEnterRoomView: FC<{}> = props => +{ + const [ username, setUsername ] = useState(''); + const [ avatarMode, setAvatarMode ] = useState(0); + const { trigger = null, setStringParam = null } = useWired(); + + const save = () => setStringParam((avatarMode === 1) ? username : ''); + + useEffect(() => + { + setUsername(trigger.stringData); + setAvatarMode(trigger.stringData ? 1 : 0); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.picktriggerer') } +
+ setAvatarMode(0) } /> + { LocalizeText('wiredfurni.params.anyavatar') } +
+
+ setAvatarMode(1) } /> + { LocalizeText('wiredfurni.params.certainavatar') } +
+ { (avatarMode === 1) && + setUsername(event.target.value) } /> } +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerAvatarSaysSomethingView.tsx b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerAvatarSaysSomethingView.tsx new file mode 100644 index 0000000000..e2d9dd35c8 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerAvatarSaysSomethingView.tsx @@ -0,0 +1,46 @@ +import { GetSessionDataManager } from '@nitrots/nitro-renderer'; +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { NitroInput } from '../../../../layout'; +import { WiredTriggerBaseView } from './WiredTriggerBaseView'; + +export const WiredTriggerAvatarSaysSomethingView: FC<{}> = props => +{ + const [ message, setMessage ] = useState(''); + const [ triggererAvatar, setTriggererAvatar ] = useState(-1); + const { trigger = null, setStringParam = null, setIntParams = null } = useWired(); + + const save = () => + { + setStringParam(message); + setIntParams([ triggererAvatar ]); + }; + + useEffect(() => + { + setMessage(trigger.stringData); + setTriggererAvatar((trigger.intData.length > 0) ? trigger.intData[0] : 0); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.whatissaid') } + setMessage(event.target.value) } /> +
+
+ { LocalizeText('wiredfurni.params.picktriggerer') } +
+ setTriggererAvatar(0) } /> + { LocalizeText('wiredfurni.params.anyavatar') } +
+
+ setTriggererAvatar(1) } /> + { GetSessionDataManager().userName } +
+
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerAvatarWalksOffFurniView.tsx b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerAvatarWalksOffFurniView.tsx new file mode 100644 index 0000000000..fc6c198480 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerAvatarWalksOffFurniView.tsx @@ -0,0 +1,8 @@ +import { FC } from 'react'; +import { WiredFurniType } from '../../../../api'; +import { WiredTriggerBaseView } from './WiredTriggerBaseView'; + +export const WiredTriggerAvatarWalksOffFurniView: FC<{}> = props => +{ + return ; +}; diff --git a/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerAvatarWalksOnFurni.tsx b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerAvatarWalksOnFurni.tsx new file mode 100644 index 0000000000..217cbd58bb --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerAvatarWalksOnFurni.tsx @@ -0,0 +1,8 @@ +import { FC } from 'react'; +import { WiredFurniType } from '../../../../api'; +import { WiredTriggerBaseView } from './WiredTriggerBaseView'; + +export const WiredTriggerAvatarWalksOnFurniView: FC<{}> = props => +{ + return ; +}; diff --git a/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerBaseView.tsx b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerBaseView.tsx new file mode 100644 index 0000000000..7590d9aa86 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerBaseView.tsx @@ -0,0 +1,23 @@ +import { FC, PropsWithChildren } from 'react'; +import { WiredFurniType } from '../../../../api'; +import { WiredBaseView } from '../WiredBaseView'; + +export interface WiredTriggerBaseViewProps +{ + hasSpecialInput: boolean; + requiresFurni: number; + save: () => void; +} + +export const WiredTriggerBaseView: FC> = props => +{ + const { requiresFurni = WiredFurniType.STUFF_SELECTION_OPTION_NONE, save = null, hasSpecialInput = false, children = null } = props; + + const onSave = () => (save && save()); + + return ( + + { children } + + ); +}; diff --git a/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerBotReachedAvatarView.tsx b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerBotReachedAvatarView.tsx new file mode 100644 index 0000000000..6aa3fde546 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerBotReachedAvatarView.tsx @@ -0,0 +1,28 @@ +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { NitroInput } from '../../../../layout'; +import { WiredTriggerBaseView } from './WiredTriggerBaseView'; + +export const WiredTriggerBotReachedAvatarView: FC<{}> = props => +{ + const [ botName, setBotName ] = useState(''); + const { trigger = null, setStringParam = null } = useWired(); + + const save = () => setStringParam(botName); + + useEffect(() => + { + setBotName(trigger.stringData); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.bot.name') } + setBotName(event.target.value) } /> +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerBotReachedStuffView.tsx b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerBotReachedStuffView.tsx new file mode 100644 index 0000000000..0034603a11 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerBotReachedStuffView.tsx @@ -0,0 +1,28 @@ +import { FC, useEffect, useState } from 'react'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { NitroInput } from '../../../../layout'; +import { WiredTriggerBaseView } from './WiredTriggerBaseView'; + +export const WiredTriggerBotReachedStuffView: FC<{}> = props => +{ + const [ botName, setBotName ] = useState(''); + const { trigger = null, setStringParam = null } = useWired(); + + const save = () => setStringParam(botName); + + useEffect(() => + { + setBotName(trigger.stringData); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.bot.name') } + setBotName(event.target.value) } /> +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerCollisionView.tsx b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerCollisionView.tsx new file mode 100644 index 0000000000..d7efc34074 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerCollisionView.tsx @@ -0,0 +1,8 @@ +import { FC } from 'react'; +import { WiredFurniType } from '../../../../api'; +import { WiredTriggerBaseView } from './WiredTriggerBaseView'; + +export const WiredTriggerCollisionView: FC<{}> = props => +{ + return ; +}; diff --git a/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerExecuteOnceView.tsx b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerExecuteOnceView.tsx new file mode 100644 index 0000000000..0b91a905c4 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerExecuteOnceView.tsx @@ -0,0 +1,33 @@ +import { FC, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; +import { GetWiredTimeLocale, LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { WiredTriggerBaseView } from './WiredTriggerBaseView'; + +export const WiredTriggeExecuteOnceView: FC<{}> = props => +{ + const [ time, setTime ] = useState(1); + const { trigger = null, setIntParams = null } = useWired(); + + const save = () => setIntParams([ time ]); + + useEffect(() => + { + setTime((trigger.intData.length > 0) ? trigger.intData[0] : 0); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.settime', [ 'seconds' ], [ GetWiredTimeLocale(time) ]) } + setTime(event) } /> +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerExecutePeriodicallyLongView.tsx b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerExecutePeriodicallyLongView.tsx new file mode 100644 index 0000000000..b20e7ed708 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerExecutePeriodicallyLongView.tsx @@ -0,0 +1,33 @@ +import { FC, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; +import { FriendlyTime, LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { WiredTriggerBaseView } from './WiredTriggerBaseView'; + +export const WiredTriggeExecutePeriodicallyLongView: FC<{}> = props => +{ + const [ time, setTime ] = useState(1); + const { trigger = null, setIntParams = null } = useWired(); + + const save = () => setIntParams([ time ]); + + useEffect(() => + { + setTime((trigger.intData.length > 0) ? trigger.intData[0] : 0); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.setlongtime', [ 'time' ], [ FriendlyTime.format(time * 5).toString() ]) } + setTime(event) } /> +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerExecutePeriodicallyView.tsx b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerExecutePeriodicallyView.tsx new file mode 100644 index 0000000000..35471ce79d --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerExecutePeriodicallyView.tsx @@ -0,0 +1,33 @@ +import { FC, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; +import { GetWiredTimeLocale, LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { WiredTriggerBaseView } from './WiredTriggerBaseView'; + +export const WiredTriggeExecutePeriodicallyView: FC<{}> = props => +{ + const [ time, setTime ] = useState(1); + const { trigger = null, setIntParams = null } = useWired(); + + const save = () => setIntParams([ time ]); + + useEffect(() => + { + setTime((trigger.intData.length > 0) ? trigger.intData[0] : 0); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.settime', [ 'seconds' ], [ GetWiredTimeLocale(time) ]) } + setTime(event) } /> +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerGameEndsView.tsx b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerGameEndsView.tsx new file mode 100644 index 0000000000..476ed70335 --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerGameEndsView.tsx @@ -0,0 +1,8 @@ +import { FC } from 'react'; +import { WiredFurniType } from '../../../../api'; +import { WiredTriggerBaseView } from './WiredTriggerBaseView'; + +export const WiredTriggerGameEndsView: FC<{}> = props => +{ + return ; +}; diff --git a/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerGameStartsView.tsx b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerGameStartsView.tsx new file mode 100644 index 0000000000..5c9b93789e --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerGameStartsView.tsx @@ -0,0 +1,8 @@ +import { FC } from 'react'; +import { WiredFurniType } from '../../../../api'; +import { WiredTriggerBaseView } from './WiredTriggerBaseView'; + +export const WiredTriggerGameStartsView: FC<{}> = props => +{ + return ; +}; diff --git a/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerLayoutView.tsx b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerLayoutView.tsx new file mode 100644 index 0000000000..0b0192244b --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerLayoutView.tsx @@ -0,0 +1,52 @@ +import { WiredTriggerLayout } from '../../../../api'; +import { WiredTriggerAvatarEnterRoomView } from './WiredTriggerAvatarEnterRoomView'; +import { WiredTriggerAvatarSaysSomethingView } from './WiredTriggerAvatarSaysSomethingView'; +import { WiredTriggerAvatarWalksOffFurniView } from './WiredTriggerAvatarWalksOffFurniView'; +import { WiredTriggerAvatarWalksOnFurniView } from './WiredTriggerAvatarWalksOnFurni'; +import { WiredTriggerBotReachedAvatarView } from './WiredTriggerBotReachedAvatarView'; +import { WiredTriggerBotReachedStuffView } from './WiredTriggerBotReachedStuffView'; +import { WiredTriggerCollisionView } from './WiredTriggerCollisionView'; +import { WiredTriggeExecuteOnceView } from './WiredTriggerExecuteOnceView'; +import { WiredTriggeExecutePeriodicallyLongView } from './WiredTriggerExecutePeriodicallyLongView'; +import { WiredTriggeExecutePeriodicallyView } from './WiredTriggerExecutePeriodicallyView'; +import { WiredTriggerGameEndsView } from './WiredTriggerGameEndsView'; +import { WiredTriggerGameStartsView } from './WiredTriggerGameStartsView'; +import { WiredTriggeScoreAchievedView } from './WiredTriggerScoreAchievedView'; +import { WiredTriggerToggleFurniView } from './WiredTriggerToggleFurniView'; + +export const WiredTriggerLayoutView = (code: number) => +{ + switch(code) + { + case WiredTriggerLayout.AVATAR_ENTERS_ROOM: + return ; + case WiredTriggerLayout.AVATAR_SAYS_SOMETHING: + return ; + case WiredTriggerLayout.AVATAR_WALKS_OFF_FURNI: + return ; + case WiredTriggerLayout.AVATAR_WALKS_ON_FURNI: + return ; + case WiredTriggerLayout.BOT_REACHED_AVATAR: + return ; + case WiredTriggerLayout.BOT_REACHED_STUFF: + return ; + case WiredTriggerLayout.COLLISION: + return ; + case WiredTriggerLayout.EXECUTE_ONCE: + return ; + case WiredTriggerLayout.EXECUTE_PERIODICALLY: + return ; + case WiredTriggerLayout.EXECUTE_PERIODICALLY_LONG: + return ; + case WiredTriggerLayout.GAME_ENDS: + return ; + case WiredTriggerLayout.GAME_STARTS: + return ; + case WiredTriggerLayout.SCORE_ACHIEVED: + return ; + case WiredTriggerLayout.TOGGLE_FURNI: + return ; + } + + return null; +}; diff --git a/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerScoreAchievedView.tsx b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerScoreAchievedView.tsx new file mode 100644 index 0000000000..0c4c7385ca --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerScoreAchievedView.tsx @@ -0,0 +1,33 @@ +import { FC, useEffect, useState } from 'react'; +import ReactSlider from 'react-slider'; +import { LocalizeText, WiredFurniType } from '../../../../api'; +import { Text } from '../../../../common'; +import { useWired } from '../../../../hooks'; +import { WiredTriggerBaseView } from './WiredTriggerBaseView'; + +export const WiredTriggeScoreAchievedView: FC<{}> = props => +{ + const [ points, setPoints ] = useState(1); + const { trigger = null, setIntParams = null } = useWired(); + + const save = () => setIntParams([ points ]); + + useEffect(() => + { + setPoints((trigger.intData.length > 0) ? trigger.intData[0] : 0); + }, [ trigger ]); + + return ( + +
+ { LocalizeText('wiredfurni.params.setscore', [ 'points' ], [ points.toString() ]) } + setPoints(event) } /> +
+
+ ); +}; diff --git a/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerToggleFurniView.tsx b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerToggleFurniView.tsx new file mode 100644 index 0000000000..474848174f --- /dev/null +++ b/Coolui v3 test/src/components/wired/views/triggers/WiredTriggerToggleFurniView.tsx @@ -0,0 +1,8 @@ +import { FC } from 'react'; +import { WiredFurniType } from '../../../../api'; +import { WiredTriggerBaseView } from './WiredTriggerBaseView'; + +export const WiredTriggerToggleFurniView: FC<{}> = props => +{ + return ; +}; diff --git a/Coolui v3 test/src/css/backgrounds/BackgroundsView.css b/Coolui v3 test/src/css/backgrounds/BackgroundsView.css new file mode 100644 index 0000000000..3f1bace19c --- /dev/null +++ b/Coolui v3 test/src/css/backgrounds/BackgroundsView.css @@ -0,0 +1,957 @@ +.backgrounds-view-container { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 100; + pointer-events: none; +} + +.profile-background, +.profile-stand, +.profile-overlay { + z-index: 1; +} + +.profile-overlay { + z-index: 40; +} + +@keyframes fadeIn { + to { opacity: 1; } +} + +.non-selectable { + cursor: default; +} + +.non-selectable .profile-background { + filter: opacity(0.5); + transition: linear 0.25s; +} + +.non-selectable .profile-background:hover { + filter: opacity(1); +} + +.background-edit-icon { + background-image: url('@/assets/images/infostand/icon_edit.gif'); + width: 19px; + height: 19px; + pointer-events: auto; + cursor: pointer; + z-index: 10; + display: block; + transition: opacity 0.2s ease; +} + +.background-edit-icon:hover { + opacity: 0.8; +} + +.background-edit-position { + position: absolute; + left: 8px; +} + +.profile-background { + background-repeat: no-repeat; + background-position: center; + height: 135px; + width: 68px; +} + +.profile-background.background-default { + background-color: #f0f0f0; +} + +.profile-stand { + background-repeat: no-repeat; + background-position: center; + height: 135px; + width: 68px; +} + +.profile-stand.stand-default { + background: none; +} + +.profile-overlay { + background-repeat: no-repeat; + background-position: center; + height: 135px; + width: 68px; +} + +.profile-overlay.overlay-default { + background: none; +} + +.profile-background { + background-repeat: no-repeat; + background-position: center; + height: 135px; + width: 68px; + + &.background-0 { + background-image: url('@/assets/images/backgrounds/background/bg_0.png'); + } + + &.background-1 { + background-image: url('@/assets/images/backgrounds/background/bg_1.gif'); + } + + &.background-2 { + background-image: url('@/assets/images/backgrounds/background/bg_2.png'); + } + + &.background-3 { + background-image: url('@/assets/images/backgrounds/background/bg_3.png'); + } + + &.background-4 { + background-image: url('@/assets/images/backgrounds/background/bg_4.png'); + } + + &.background-5 { + background-image: url('@/assets/images/backgrounds/background/bg_5.png'); + } + + &.background-6 { + background-image: url('@/assets/images/backgrounds/background/bg_6.png'); + } + + &.background-7 { + background-image: url('@/assets/images/backgrounds/background/bg_7.png'); + } + + &.background-8 { + background-image: url('@/assets/images/backgrounds/background/bg_8.png'); + } + + &.background-9 { + background-image: url('@/assets/images/backgrounds/background/bg_9.png'); + } + + &.background-10 { + background-image: url('@/assets/images/backgrounds/background/bg_10.png'); + } + + &.background-11 { + background-image: url('@/assets/images/backgrounds/background/bg_11.png'); + } + + &.background-12 { + background-image: url('@/assets/images/backgrounds/background/bg_12.png'); + } + + &.background-13 { + background-image: url('@/assets/images/backgrounds/background/bg_13.png'); + } + + &.background-14 { + background-image: url('@/assets/images/backgrounds/background/bg_14.png'); + } + + &.background-15 { + background-image: url('@/assets/images/backgrounds/background/bg_15.png'); + } + + &.background-16 { + background-image: url('@/assets/images/backgrounds/background/bg_16.png'); + } + + &.background-17 { + background-image: url('@/assets/images/backgrounds/background/bg_17.png'); + } + + &.background-18 { + background-image: url('@/assets/images/backgrounds/background/bg_18.png'); + } + + &.background-19 { + background-image: url('@/assets/images/backgrounds/background/bg_19.png'); + } + + &.background-20 { + background-image: url('@/assets/images/backgrounds/background/bg_20.png'); + } + + &.background-21 { + background-image: url('@/assets/images/backgrounds/background/bg_21.png'); + } + + &.background-22 { + background-image: url('@/assets/images/backgrounds/background/bg_22.png'); + } + + &.background-23 { + background-image: url('@/assets/images/backgrounds/background/bg_23.png'); + } + + &.background-24 { + background-image: url('@/assets/images/backgrounds/background/bg_24.png'); + } + + &.background-25 { + background-image: url('@/assets/images/backgrounds/background/bg_25.png'); + } + + &.background-26 { + background-image: url('@/assets/images/backgrounds/background/bg_26.png'); + } + + &.background-27 { + background-image: url('@/assets/images/backgrounds/background/bg_27.png'); + } + + &.background-28 { + background-image: url('@/assets/images/backgrounds/background/bg_28.png'); + } + + &.background-29 { + background-image: url('@/assets/images/backgrounds/background/bg_29.png'); + } + + &.background-30 { + background-image: url('@/assets/images/backgrounds/background/bg_30.png'); + } + + &.background-31 { + background-image: url('@/assets/images/backgrounds/background/bg_31.png'); + } + + &.background-32 { + background-image: url('@/assets/images/backgrounds/background/bg_32.png'); + } + + &.background-33 { + background-image: url('@/assets/images/backgrounds/background/bg_33.png'); + } + + &.background-34 { + background-image: url('@/assets/images/backgrounds/background/bg_34.png'); + } + + &.background-35 { + background-image: url('@/assets/images/backgrounds/background/bg_35.png'); + } + + &.background-36 { + background-image: url('@/assets/images/backgrounds/background/bg_36.gif'); + } + + &.background-37 { + background-image: url('@/assets/images/backgrounds/background/bg_37.png'); + } + + &.background-38 { + background-image: url('@/assets/images/backgrounds/background/bg_38.png'); + } + + &.background-39 { + background-image: url('@/assets/images/backgrounds/background/bg_39.png'); + } + + &.background-40 { + background-image: url('@/assets/images/backgrounds/background/bg_40.png'); + } + + &.background-41 { + background-image: url('@/assets/images/backgrounds/background/bg_41.png'); + } + + &.background-42 { + background-image: url('@/assets/images/backgrounds/background/bg_42.png'); + } + + &.background-43 { + background-image: url('@/assets/images/backgrounds/background/bg_43.png'); + } + + &.background-44 { + background-image: url('@/assets/images/backgrounds/background/bg_44.png'); + } + + &.background-45 { + background-image: url('@/assets/images/backgrounds/background/bg_45.png'); + } + + &.background-46 { + background-image: url('@/assets/images/backgrounds/background/bg_46.png'); + } + + &.background-47 { + background-image: url('@/assets/images/backgrounds/background/bg_47.png'); + } + + &.background-48 { + background-image: url('@/assets/images/backgrounds/background/bg_48.png'); + } + + &.background-49 { + background-image: url('@/assets/images/backgrounds/background/bg_49.png'); + } + + &.background-50 { + background-image: url('@/assets/images/backgrounds/background/bg_50.png'); + } + + &.background-51 { + background-image: url('@/assets/images/backgrounds/background/bg_51.gif'); + } + + &.background-52 { + background-image: url('@/assets/images/backgrounds/background/bg_52.gif'); + } + + &.background-53 { + background-image: url('@/assets/images/backgrounds/background/bg_53.gif'); + } + + &.background-54 { + background-image: url('@/assets/images/backgrounds/background/bg_54.gif'); + } + + &.background-55 { + background-image: url('@/assets/images/backgrounds/background/bg_55.gif'); + } + + &.background-56 { + background-image: url('@/assets/images/backgrounds/background/bg_56.gif'); + } + + &.background-57 { + background-image: url('@/assets/images/backgrounds/background/bg_57.gif'); + } + + &.background-58 { + background-image: url('@/assets/images/backgrounds/background/bg_58.gif'); + } + + &.background-59 { + background-image: url('@/assets/images/backgrounds/background/bg_59.gif'); + } + + &.background-60 { + background-image: url('@/assets/images/backgrounds/background/bg_60.gif'); + } + + &.background-61 { + background-image: url('@/assets/images/backgrounds/background/bg_61.gif'); + } + + &.background-62 { + background-image: url('@/assets/images/backgrounds/background/bg_62.gif'); + } + + &.background-63 { + background-image: url('@/assets/images/backgrounds/background/bg_63.gif'); + } + + &.background-64 { + background-image: url('@/assets/images/backgrounds/background/bg_64.gif'); + } + + &.background-65 { + background-image: url('@/assets/images/backgrounds/background/bg_65.gif'); + } + + &.background-66 { + background-image: url('@/assets/images/backgrounds/background/bg_66.gif'); + } + + &.background-67 { + background-image: url('@/assets/images/backgrounds/background/bg_67.gif'); + } + + &.background-68 { + background-image: url('@/assets/images/backgrounds/background/bg_68.gif'); + } + + &.background-69 { + background-image: url('@/assets/images/backgrounds/background/bg_69.gif'); + } + + &.background-70 { + background-image: url('@/assets/images/backgrounds/background/bg_70.gif'); + } + + &.background-71 { + background-image: url('@/assets/images/backgrounds/background/bg_71.gif'); + } + + &.background-72 { + background-image: url('@/assets/images/backgrounds/background/bg_72.gif'); + } + + &.background-73 { + background-image: url('@/assets/images/backgrounds/background/bg_73.gif'); + } + + &.background-74 { + background-image: url('@/assets/images/backgrounds/background/bg_74.gif'); + } + + &.background-75 { + background-image: url('@/assets/images/backgrounds/background/bg_75.gif'); + } + + &.background-76 { + background-image: url('@/assets/images/backgrounds/background/bg_76.gif'); + } + + &.background-77 { + background-image: url('@/assets/images/backgrounds/background/bg_77.gif'); + } + + &.background-78 { + background-image: url('@/assets/images/backgrounds/background/bg_78.gif'); + } + + &.background-79 { + background-image: url('@/assets/images/backgrounds/background/bg_79.gif'); + } + + &.background-80 { + background-image: url('@/assets/images/backgrounds/background/bg_80.gif'); + } + + &.background-81 { + background-image: url('@/assets/images/backgrounds/background/bg_81.gif'); + } + + &.background-82 { + background-image: url('@/assets/images/backgrounds/background/bg_82.gif'); + } + + &.background-83 { + background-image: url('@/assets/images/backgrounds/background/bg_83.gif'); + } + + &.background-84 { + background-image: url('@/assets/images/backgrounds/background/bg_84.gif'); + } + + &.background-85 { + background-image: url('@/assets/images/backgrounds/background/bg_85.gif'); + } + + &.background-86 { + background-image: url('@/assets/images/backgrounds/background/bg_86.png'); + } + + &.background-87 { + background-image: url('@/assets/images/backgrounds/background/bg_87.gif'); + } + + &.background-88 { + background-image: url('@/assets/images/backgrounds/background/bg_88.gif'); + } + + &.background-89 { + background-image: url('@/assets/images/backgrounds/background/bg_89.gif'); + } + + &.background-90 { + background-image: url('@/assets/images/backgrounds/background/bg_90.gif'); + } + + &.background-91 { + background-image: url('@/assets/images/backgrounds/background/bg_91.gif'); + } + + &.background-92 { + background-image: url('@/assets/images/backgrounds/background/bg_92.gif'); + } + + &.background-93 { + background-image: url('@/assets/images/backgrounds/background/bg_93.gif'); + } + + &.background-94 { + background-image: url('@/assets/images/backgrounds/background/bg_94.gif'); + } + + &.background-95 { + background-image: url('@/assets/images/backgrounds/background/bg_95.gif'); + } + + &.background-96 { + background-image: url('@/assets/images/backgrounds/background/bg_96.gif'); + } + + &.background-97 { + background-image: url('@/assets/images/backgrounds/background/bg_97.gif'); + } + + &.background-98 { + background-image: url('@/assets/images/backgrounds/background/bg_98.gif'); + } + + &.background-99 { + background-image: url('@/assets/images/backgrounds/background/bg_99.gif'); + } + + &.background-100 { + background-image: url('@/assets/images/backgrounds/background/bg_100.gif'); + } + + &.background-101 { + background-image: url('@/assets/images/backgrounds/background/bg_101.png'); + } + + &.background-102 { + background-image: url('@/assets/images/backgrounds/background/bg_102.gif'); + } + + &.background-103 { + background-image: url('@/assets/images/backgrounds/background/bg_103.gif'); + } + + &.background-104 { + background-image: url('@/assets/images/backgrounds/background/bg_104.gif'); + } + + &.background-105 { + background-image: url('@/assets/images/backgrounds/background/bg_105.gif'); + } + + &.background-106 { + background-image: url('@/assets/images/backgrounds/background/bg_106.gif'); + } + + &.background-107 { + background-image: url('@/assets/images/backgrounds/background/bg_107.gif'); + } + + &.background-108 { + background-image: url('@/assets/images/backgrounds/background/bg_108.gif'); + } + + &.background-109 { + background-image: url('@/assets/images/backgrounds/background/bg_109.gif'); + } + + &.background-110 { + background-image: url('@/assets/images/backgrounds/background/bg_110.gif'); + } + + &.background-111 { + background-image: url('@/assets/images/backgrounds/background/bg_111.gif'); + } + + &.background-112 { + background-image: url('@/assets/images/backgrounds/background/bg_112.gif'); + } + + &.background-113 { + background-image: url('@/assets/images/backgrounds/background/bg_113.gif'); + } + + &.background-114 { + background-image: url('@/assets/images/backgrounds/background/bg_114.gif'); + } + + &.background-115 { + background-image: url('@/assets/images/backgrounds/background/bg_115.gif'); + } + + &.background-116 { + background-image: url('@/assets/images/backgrounds/background/bg_116.gif'); + } + + &.background-117 { + background-image: url('@/assets/images/backgrounds/background/bg_117.gif'); + } + + &.background-118 { + background-image: url('@/assets/images/backgrounds/background/bg_118.gif'); + } + + &.background-119 { + background-image: url('@/assets/images/backgrounds/background/bg_119.gif'); + } + + &.background-120 { + background-image: url('@/assets/images/backgrounds/background/bg_120.gif'); + } + + &.background-121 { + background-image: url('@/assets/images/backgrounds/background/bg_121.gif'); + } + + &.background-122 { + background-image: url('@/assets/images/backgrounds/background/bg_122.gif'); + } + + &.background-123 { + background-image: url('@/assets/images/backgrounds/background/bg_123.gif'); + } + + &.background-124 { + background-image: url('@/assets/images/backgrounds/background/bg_124.gif'); + } + + &.background-125 { + background-image: url('@/assets/images/backgrounds/background/bg_125.gif'); + } + + &.background-126 { + background-image: url('@/assets/images/backgrounds/background/bg_126.gif'); + } + + &.background-127 { + background-image: url('@/assets/images/backgrounds/background/bg_127.gif'); + } + + &.background-128 { + background-image: url('@/assets/images/backgrounds/background/bg_128.gif'); + } + + &.background-129 { + background-image: url('@/assets/images/backgrounds/background/bg_129.gif'); + } + + &.background-130 { + background-image: url('@/assets/images/backgrounds/background/bg_130.gif'); + } + + &.background-131 { + background-image: url('@/assets/images/backgrounds/background/bg_131.gif'); + } + + &.background-132 { + background-image: url('@/assets/images/backgrounds/background/bg_132.gif'); + } + + &.background-133 { + background-image: url('@/assets/images/backgrounds/background/bg_133.gif'); + } + + &.background-134 { + background-image: url('@/assets/images/backgrounds/background/bg_134.gif'); + } + + &.background-135 { + background-image: url('@/assets/images/backgrounds/background/bg_135.gif'); + } + + &.background-136 { + background-image: url('@/assets/images/backgrounds/background/bg_136.gif'); + } + + &.background-137 { + background-image: url('@/assets/images/backgrounds/background/bg_137.gif'); + } + + &.background-138 { + background-image: url('@/assets/images/backgrounds/background/bg_138.gif'); + } + + &.background-139 { + background-image: url('@/assets/images/backgrounds/background/bg_139.gif'); + } + + &.background-140 { + background-image: url('@/assets/images/backgrounds/background/bg_140.gif'); + } + + &.background-141 { + background-image: url('@/assets/images/backgrounds/background/bg_141.gif'); + } + + &.background-142 { + background-image: url('@/assets/images/backgrounds/background/bg_142.gif'); + } + + &.background-143 { + background-image: url('@/assets/images/backgrounds/background/bg_143.gif'); + } + + &.background-144 { + background-image: url('@/assets/images/backgrounds/background/bg_144.gif'); + } + + &.background-145 { + background-image: url('@/assets/images/backgrounds/background/bg_145.gif'); + } + + &.background-146 { + background-image: url('@/assets/images/backgrounds/background/bg_146.gif'); + } + + &.background-147 { + background-image: url('@/assets/images/backgrounds/background/bg_147.gif'); + } + + &.background-148 { + background-image: url('@/assets/images/backgrounds/background/bg_148.gif'); + } + + &.background-149 { + background-image: url('@/assets/images/backgrounds/background/bg_149.gif'); + } + + &.background-150 { + background-image: url('@/assets/images/backgrounds/background/bg_150.gif'); + } + + &.background-151 { + background-image: url('@/assets/images/backgrounds/background/bg_151.gif'); + } + + &.background-152 { + background-image: url('@/assets/images/backgrounds/background/bg_152.gif'); + } + + &.background-153 { + background-image: url('@/assets/images/backgrounds/background/bg_153.gif'); + } + + &.background-154 { + background-image: url('@/assets/images/backgrounds/background/bg_154.gif'); + } + + &.background-155 { + background-image: url('@/assets/images/backgrounds/background/bg_155.gif'); + } + + &.background-156 { + background-image: url('@/assets/images/backgrounds/background/bg_156.gif'); + } + + &.background-157 { + background-image: url('@/assets/images/backgrounds/background/bg_157.gif'); + } + + &.background-158 { + background-image: url('@/assets/images/backgrounds/background/bg_158.gif'); + } + + &.background-159 { + background-image: url('@/assets/images/backgrounds/background/bg_159.gif'); + } + + &.background-160 { + background-image: url('@/assets/images/backgrounds/background/bg_160.gif'); + } + + &.background-161 { + background-image: url('@/assets/images/backgrounds/background/bg_161.gif'); + } + + &.background-162 { + background-image: url('@/assets/images/backgrounds/background/bg_162.gif'); + } + + &.background-163 { + background-image: url('@/assets/images/backgrounds/background/bg_163.gif'); + } + + &.background-164 { + background-image: url('@/assets/images/backgrounds/background/bg_164.gif'); + } + + &.background-165 { + background-image: url('@/assets/images/backgrounds/background/bg_165.gif'); + } + + &.background-166 { + background-image: url('@/assets/images/backgrounds/background/bg_166.gif'); + } + + &.background-167 { + background-image: url('@/assets/images/backgrounds/background/bg_167.gif'); + } + + &.background-168 { + background-image: url('@/assets/images/backgrounds/background/bg_168.gif'); + } + + &.background-169 { + background-image: url('@/assets/images/backgrounds/background/bg_169.gif'); + } + + &.background-170 { + background-image: url('@/assets/images/backgrounds/background/bg_170.png'); + } + + &.background-171 { + background-image: url('@/assets/images/backgrounds/background/bg_171.png'); + } + + &.background-172 { + background-image: url('@/assets/images/backgrounds/background/bg_172.png'); + } + + &.background-173 { + background-image: url('@/assets/images/backgrounds/background/bg_173.png'); + } + + &.background-174 { + background-image: url('@/assets/images/backgrounds/background/bg_174.png'); + } + + &.background-175 { + background-image: url('@/assets/images/backgrounds/background/bg_175.png'); + } + + &.background-176 { + background-image: url('@/assets/images/backgrounds/background/bg_176.png'); + } + + &.background-177 { + background-image: url('@/assets/images/backgrounds/background/bg_177.gif'); + } + + &.background-178 { + background-image: url('@/assets/images/backgrounds/background/bg_178.png'); + } + + &.background-179 { + background-image: url('@/assets/images/backgrounds/background/bg_179.png'); + } + + &.background-180 { + background-image: url('@/assets/images/backgrounds/background/bg_180.png'); + } + + &.background-181 { + background-image: url('@/assets/images/backgrounds/background/bg_181.png'); + } + + &.background-182 { + background-image: url('@/assets/images/backgrounds/background/bg_182.png'); + } + + &.background-183 { + background-image: url('@/assets/images/backgrounds/background/bg_183.png'); + } + + &.background-184 { + background-image: url('@/assets/images/backgrounds/background/bg_184.png'); + } + + &.background-185 { + background-image: url('@/assets/images/backgrounds/background/bg_185.png'); + } + + &.background-186 { + background-image: url('@/assets/images/backgrounds/background/bg_186.png'); + } + + &.background-187 { + background-image: url('@/assets/images/backgrounds/background/bg_187.gif'); + } +} + +.profile-stand { + background-repeat: no-repeat; + background-position: center; + height: 135px; + width: 68px; + + &.stand-0 { + background-image: url('@/assets/images/backgrounds/stand_0.png'); + } + &.stand-1 { + background-image: url('@/assets/images/backgrounds/stand_1.png'); + } + &.stand-2 { + background-image: url('@/assets/images/backgrounds/stand_2.png'); + } + &.stand-3 { + background-image: url('@/assets/images/backgrounds/stand_3.png'); + } + &.stand-4 { + background-image: url('@/assets/images/backgrounds/stand_4.png'); + } + &.stand-5 { + background-image: url('@/assets/images/backgrounds/stand_5.png'); + } + &.stand-6 { + background-image: url('@/assets/images/backgrounds/stand_6.png'); + } + &.stand-7 { + background-image: url('@/assets/images/backgrounds/stand_7.png'); + } + &.stand-8 { + background-image: url('@/assets/images/backgrounds/stand_8.png'); + } + &.stand-9 { + background-image: url('@/assets/images/backgrounds/stand_9.png'); + } + &.stand-10 { + background-image: url('@/assets/images/backgrounds/stand_10.png'); + } + &.stand-11 { + background-image: url('@/assets/images/backgrounds/stand_11.png'); + } + &.stand-12 { + background-image: url('@/assets/images/backgrounds/stand_12.png'); + } + &.stand-13 { + background-image: url('@/assets/images/backgrounds/stand_13.png'); + } + &.stand-14 { + background-image: url('@/assets/images/backgrounds/stand_14.png'); + } + &.stand-15 { + background-image: url('@/assets/images/backgrounds/stand_15.png'); + } + &.stand-16 { + background-image: url('@/assets/images/backgrounds/stand_16.png'); + } + &.stand-17 { + background-image: url('@/assets/images/backgrounds/stand_17.png'); + } + &.stand-18 { + background-image: url('@/assets/images/backgrounds/stand_18.png'); + } + &.stand-19 { + background-image: url('@/assets/images/backgrounds/stand_19.png'); + } + &.stand-20 { + background-image: url('@/assets/images/backgrounds/stand_20.png'); + } + &.stand-21 { + background-image: url('@/assets/images/backgrounds/stand_21.gif'); + } +} + +.profile-overlay { + background-repeat: no-repeat; + background-position: center; + height: 135px; + width: 68px; + + &.overlay-0 { + background-image: url('@/assets/images/backgrounds/overlay/overlay_0.png'); + } + &.overlay-1 { + background-image: url('@/assets/images/backgrounds/overlay/overlay_1.png'); + } + &.overlay-2 { + background-image: url('@/assets/images/backgrounds/overlay/overlay_2.png'); + } + &.overlay-3 { + background-image: url('@/assets/images/backgrounds/overlay/overlay_3.png'); + } + &.overlay-4 { + background-image: url('@/assets/images/backgrounds/overlay/overlay_4.png'); + } + &.overlay-5 { + background-image: url('@/assets/images/backgrounds/overlay/overlay_5.gif'); + } + &.overlay-6 { + background-image: url('@/assets/images/backgrounds/overlay/overlay_6.png'); + } + &.overlay-7 { + background-image: url('@/assets/images/backgrounds/overlay/overlay_7.png'); + } + &.overlay-8 { + background-image: url('@/assets/images/backgrounds/overlay/overlay_8.png'); + } +} \ No newline at end of file diff --git a/Coolui v3 test/src/css/chat/ChatHistoryView.css b/Coolui v3 test/src/css/chat/ChatHistoryView.css new file mode 100644 index 0000000000..815aafd666 --- /dev/null +++ b/Coolui v3 test/src/css/chat/ChatHistoryView.css @@ -0,0 +1,28 @@ +.nitro-chat-history { + background-color: #f0f0f0; + width: 400px; + height: 400px; + } + +.nitro-chat-history .nitro-card-content { + height: 100%; + background-image: url('@/assets/images/chat/chathistory_background.png'); + background-repeat: repeat; + background-size: auto; + background-color: #f0f0f0; +} + +.nitro-chat-history .p-1.slide-in { + animation: slideIn 0.3s ease-out; +} + +@keyframes slideIn { + 0% { + transform: translateY(-20px); + opacity: 0; + } + 100% { + transform: translateY(0); + opacity: 1; + } +} \ No newline at end of file diff --git a/Coolui v3 test/src/css/chat/chats.css b/Coolui v3 test/src/css/chat/chats.css new file mode 100644 index 0000000000..7d9c1738f3 --- /dev/null +++ b/Coolui v3 test/src/css/chat/chats.css @@ -0,0 +1,856 @@ +.bubble-container { + transition: top 0.2s ease 0s; + + .chat-bubble { + border-image-slice: 17 6 6 29 fill; + border-image-width: 17px 6px 6px 29px; + border-image-outset: 2px 0px 0px 0px; + border-image-repeat: repeat repeat; + + &.type-0 { + + // normal + .message { + font-weight: 400; + } + } + + &.type-1 { + + // whisper + .message { + font-weight: 400; + font-style: italic; + color: #595959; + } + } + + &.type-2 { + + // shout + .message { + font-weight: 700; + } + } + + &.bubble-0 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_0_transparent.png'); + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_0_1_33_34_pointer.png'); + bottom: -5px; + } + } + + &.bubble-1 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_1.png'); + + border-image-slice: 18 6 6 29 fill; + border-image-width: 18px 6px 6px 29px; + border-image-outset: 3px 0px 0px 0px; + + .user-container { + display: none; + } + + .username { + display: none; + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_0_1_33_34_pointer.png'); + } + } + + &.bubble-2, + &.bubble-31 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_2.png'); + + .user-container { + display: none; + } + + .username { + color: rgba(#FFF, 1); + } + + .message { + color: rgba(#FFF, 1) !important; + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_2_31_pointer.png'); + height: 7px; + } + } + + &.bubble-3 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_3.png'); + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_3_pointer.png'); + } + } + + &.bubble-4 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_4.png'); + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_4_pointer.png'); + } + } + + &.bubble-5 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_5.png'); + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_5_pointer.png'); + } + } + + &.bubble-6 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_6.png'); + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_6_pointer.png'); + } + } + + &.bubble-7 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_7.png'); + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_7_pointer.png'); + } + } + + &.bubble-8 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_8.png'); + + border-image-slice: 20 6 6 27 fill; + border-image-width: 20px 6px 6px 27px; + border-image-outset: 5px 0px 0px 0px; + + .chat-content { + color: #fff; + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_8_pointer.png'); + } + } + + &.bubble-9 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_9.png'); + + border-image-slice: 17 18 12 19 fill; + border-image-width: 17px 18px 12px 19px; + border-image-outset: 7px 7px 0px 9px; + + .chat-content { + margin-left: 20px; + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_9_pointer.png'); + width: 7px; + height: 10px; + bottom: -6px; + } + } + + &.bubble-10 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_10.png'); + + border-image-slice: 29 18 8 37 fill; + border-image-width: 29px 18px 8px 37px; + border-image-outset: 12px 7px 1px 5px; + + .chat-content { + margin-left: 24px; + color: #fff; + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_10_pointer.png'); + width: 7px; + height: 8px; + bottom: -3px; + } + } + + &.bubble-11 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_11.png'); + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_11_pointer.png'); + } + } + + &.bubble-12 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_12.png'); + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_12_pointer.png'); + } + } + + &.bubble-13 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_13.png'); + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_13_pointer.png'); + } + } + + &.bubble-14 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_14.png'); + + .chat-content { + color: #fff; + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_14_pointer.png'); + } + } + + &.bubble-15 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_15.png'); + + .chat-content { + color: #fff; + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_15_pointer.png'); + } + } + + &.bubble-16 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_16.png'); + + border-image-slice: 13 6 10 31 fill; + border-image-width: 13px 6px 10px 31px; + border-image-outset: 6px 0px 0px 0px; + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_16_pointer.png'); + height: 8px; + } + } + + &.bubble-17 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_17.png'); + + border-image-slice: 24 6 8 35 fill; + border-image-width: 24px 6px 8px 35px; + border-image-outset: 9px 0px 2px 5px; + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_17_pointer.png'); + } + } + + &.bubble-18 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_18.png'); + + border-image-slice: 7 16 8 16 fill; + border-image-width: 7px 16px 8px 16px; + border-image-outset: 3px 10px 2px 11px; + + .chat-content { + margin-left: 20px; + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_18_pointer.png'); + height: 8px; + } + } + + &.bubble-19 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_19.png'); + + border-image-slice: 17 6 9 19 fill; + border-image-width: 17px 6px 9px 19px; + border-image-outset: 5px 0px 0px 8px; + + .chat-content { + margin-left: 20px; + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_19_20_pointer.png'); + } + } + + &.bubble-20 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_20.png'); + + border-image-slice: 18 6 8 19 fill; + border-image-width: 18px 6px 8px 19px; + border-image-outset: 5px 0px 0px 8px; + + .chat-content { + margin-left: 20px; + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_19_20_pointer.png'); + } + } + + &.bubble-21 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_21.png'); + + border-image-slice: 20 6 12 24 fill; + border-image-width: 20px 6px 12px 24px; + border-image-outset: 13px 2px 1px 3px; + + .chat-content { + margin-left: 20px; + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_21_pointer.png'); + bottom: -4px; + } + } + + &.bubble-22 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_22.png'); + + border-image-slice: 18 19 11 33 fill; + border-image-width: 18px 19px 11px 33px; + border-image-outset: 7px 1px 1px 5px; + + .chat-content { + margin-left: 20px; + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_22_pointer.png'); + } + } + + &.bubble-23 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_23.png'); + + border-image-slice: 16 6 7 32 fill; + border-image-width: 16px 6px 7px 32px; + border-image-outset: 5px 0px 0px 3px; + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_23_37_pointer.png'); + } + } + + &.bubble-24 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_24.png'); + + border-image-slice: 23 8 6 40 fill; + border-image-width: 23px 8px 6px 40px; + border-image-outset: 6px 0px 0px 6px; + + .chat-content { + margin-left: 30px; + color: #fff; + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_24_pointer.png'); + bottom: -4px; + } + } + + &.bubble-25 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_25.png'); + + border-image-slice: 10 13 8 28 fill; + border-image-width: 10px 13px 8px 28px; + border-image-outset: 6px 3px 2px 0px; + + .chat-content { + color: #fff; + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_25_pointer.png'); + height: 9px; + bottom: -7px; + } + } + + &.bubble-26 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_26.png'); + + border-image-slice: 16 9 8 29 fill; + border-image-width: 16px 9px 8px 29px; + border-image-outset: 2px 2px 2px 0px; + + .chat-content { + color: #c59432; + text-shadow: 1px 1px rgba(0, 0, 0, 0.3); + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_26_pointer.png'); + height: 10px; + bottom: -6px; + } + } + + &.bubble-27 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_27.png'); + + border-image-slice: 25 6 5 36 fill; + border-image-width: 25px 6px 5px 36px; + border-image-outset: 8px 0px 0px 5px; + + .chat-content { + margin-left: 30px; + color: #fff; + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_27_pointer.png'); + } + } + + &.bubble-28 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_28.png'); + + border-image-slice: 16 7 7 27 fill; + border-image-width: 16px 7px 7px 27px; + border-image-outset: 3px 0px 0px 0px; + + .chat-content { + margin-left: 25px; + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_28_pointer.png'); + } + } + + &.bubble-29 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_29.png'); + + border-image-slice: 10 7 15 31 fill; + border-image-width: 10px 7px 15px 31px; + border-image-outset: 2px 0px 0px 1px; + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_29_pointer.png'); + bottom: -4px; + } + } + + &.bubble-30 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_30.png'); + + .user-container { + display: none; + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_30_pointer.png'); + height: 7px; + } + } + + &.bubble-32 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_32.png'); + + border-image-slice: 15 7 7 30 fill; + border-image-width: 15px 7px 7px 30px; + border-image-outset: 2px 0px 0px 0px; + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_32_pointer.png'); + } + } + + &.bubble-33 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_33_34.png'); + + border-image-slice: 7 6 6 39 fill; + border-image-width: 7px 6px 6px 39px; + border-image-outset: 2px 0px 0px 0px; + + .user-container { + display: none; + } + + .chat-content { + margin-left: 35px; + } + + &::before { + content: ' '; + position: absolute; + width: 19px; + height: 19px; + left: 9px; + top: 2px; + background: url('@/assets/images/chat/chatbubbles/bubble_33_extra.png'); + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_0_1_33_34_pointer.png'); + } + } + + &.bubble-34 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_33_34.png'); + + border-image-slice: 7 6 6 39 fill; + border-image-width: 7px 6px 6px 39px; + border-image-outset: 2px 0px 0px 0px; + + &.type-1 { + .message { + font-style: unset; + color: inherit; + } + } + + .user-container { + display: none; + } + + .username { + display: none; + } + + .chat-content { + margin-left: 35px; + } + + &::before { + content: ' '; + position: absolute; + width: 19px; + height: 19px; + left: 9px; + top: 2px; + background: url('@/assets/images/chat/chatbubbles/bubble_34_extra.png'); + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_0_1_33_34_pointer.png'); + } + } + + &.bubble-35 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_35.png'); + + border-image-slice: 19 6 5 29 fill; + border-image-width: 19px 6px 5px 29px; + border-image-outset: 4px 0px 0px 0px; + + .user-container { + display: none; + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_35_pointer.png'); + } + } + + &.bubble-36 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_36.png'); + + border-image-slice: 17 7 5 30 fill; + border-image-width: 17px 7px 5px 30px; + border-image-outset: 2px 0px 0px 0px; + + .user-container { + display: none; + } + + &::before { + content: ' '; + position: absolute; + width: 13px; + height: 18px; + left: 5px; + top: 2px; + background: url('@/assets/images/chat/chatbubbles/bubble_36_extra.png'); + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_36_pointer.png'); + } + } + + &.bubble-37 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_37.png'); + + border-image-slice: 16 6 7 32 fill; + border-image-width: 16px 6px 7px 32px; + border-image-outset: 5px 0px 0px 3px; + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_23_37_pointer.png'); + } + } + + &.bubble-38 { + border-image-source: url('@/assets/images/chat/chatbubbles/bubble_38.png'); + + border-image-slice: 17 7 5 30 fill; + border-image-width: 17px 7px 5px 30px; + border-image-outset: 2px 0px 0px 0px; + + .user-container { + display: none; + } + + &::before { + content: ' '; + position: absolute; + width: 19px; + height: 19px; + left: 3px; + top: 2px; + background: url('@/assets/images/chat/chatbubbles/bubble_38_extra.png'); + } + + .pointer { + background: url('@/assets/images/chat/chatbubbles/bubble_38_pointer.png'); + } + } + + .user-container { + z-index: 3; + display: flex; + align-items: center; + justify-content: center; + height: 100%; + max-height: 24px; + overflow: hidden; + + .user-image { + position: absolute; + top: -15px; + left: -9.25px; + width: 45px; + height: 65px; + background-repeat: no-repeat; + background-position: center; + transform: scale(0.5); + overflow: hidden; + image-rendering: initial; + } + } + + .chat-content { + padding: 5px 6px 5px 4px; + margin-left: 27px; + line-height: 1; + color: #000; + min-height: 25px; + } + } +} + +.chat-bubble-icon { + background-repeat: no-repeat; + background-position: center; + + &.bubble-0 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_0.png'); + } + + &.bubble-1 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_1.png'); + height: 25px; + } + + &.bubble-2, + &.bubble-31 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_2.png'); + } + + &.bubble-3 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_3.png'); + } + + &.bubble-4 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_4.png'); + } + + &.bubble-5 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_5.png'); + } + + &.bubble-6 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_6.png'); + } + + &.bubble-7 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_7.png'); + } + + &.bubble-8 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_8.png'); + } + + &.bubble-9 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_9.png'); + } + + &.bubble-10 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_10.png'); + } + + &.bubble-11 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_11.png'); + } + + &.bubble-12 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_12.png'); + } + + &.bubble-13 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_13.png'); + } + + &.bubble-14 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_14.png'); + } + + &.bubble-15 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_15.png'); + } + + &.bubble-16 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_16.png'); + } + + &.bubble-17 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_17.png'); + } + + &.bubble-18 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_18.png'); + } + + &.bubble-19 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_19.png'); + } + + &.bubble-20 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_20.png'); + } + + &.bubble-21 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_21.png'); + } + + &.bubble-22 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_22.png'); + } + + &.bubble-23 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_23.png'); + } + + &.bubble-24 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_24.png'); + } + + &.bubble-25 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_25.png'); + } + + &.bubble-26 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_26.png'); + } + + &.bubble-27 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_27.png'); + } + + &.bubble-28 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_28.png'); + } + + &.bubble-29 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_29.png'); + } + + &.bubble-30 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_30.png'); + } + + &.bubble-32 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_32.png'); + } + + &.bubble-33 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_33_34.png'); + + &::before { + content: ' '; + position: absolute; + width: 19px; + height: 19px; + left: 11px; + top: 10px; + background: url('@/assets/images/chat/chatbubbles/bubble_33_extra.png'); + } + } + + &.bubble-34 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_33_34.png'); + + &::before { + content: ' '; + position: absolute; + width: 19px; + height: 19px; + left: 11px; + top: 10px; + background: url('@/assets/images/chat/chatbubbles/bubble_34_extra.png'); + } + } + + &.bubble-35 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_35.png'); + } + + &.bubble-36 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_36.png'); + + &::before { + content: ' '; + position: absolute; + width: 13px; + height: 18px; + left: 13px; + top: 10px; + background: url('@/assets/images/chat/chatbubbles/bubble_36_extra.png'); + } + } + + &.bubble-37 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_35.png'); + } + + &.bubble-38 { + background-image: url('@/assets/images/chat/chatbubbles/bubble_38.png'); + + &::before { + content: ' '; + position: absolute; + width: 19px; + height: 19px; + left: 11px; + top: 10px; + background: url('@/assets/images/chat/chatbubbles/bubble_38_extra.png'); + } + } +} \ No newline at end of file diff --git a/Coolui v3 test/src/css/common/Buttons.css b/Coolui v3 test/src/css/common/Buttons.css new file mode 100644 index 0000000000..106a3cc62c --- /dev/null +++ b/Coolui v3 test/src/css/common/Buttons.css @@ -0,0 +1,109 @@ +.btn-sm { + min-height: 28px; +} + +textarea { + resize: none; +} + +/* Chrome, Safari, Edge, Opera */ +input::-webkit-outer-spin-button, +input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; +} + +/* Firefox */ +input[type=number] { + -moz-appearance: textfield; +} + +.rounded { + border-radius: 0.5rem; +} + +.btn-primary { + color: #fff; + background-color: #3c6d82; + border: 2px solid #1a617f; + padding: 0.25rem 0.5rem; + font-size: .7875rem; + border-radius: 0.5rem; + box-shadow: none!important; +} + +.btn-primary:hover { + border: 2px solid #1a617f; + box-shadow: none!important; +} + +.btn-success{ + color: #fff; + background-color: #3c8243; + border: 2px solid #006d09; + padding: 0.25rem 0.5rem; + font-size: .7875rem; + border-radius: 0.5rem; + box-shadow: none!important; +} + +.btn-success:hover{ + box-shadow: none!important; +} + +.btn-danger{ + color: #fff; + background-color: #a81a12; + border: 2px solid #b9322a; + padding: 0.25rem 0.5rem; + font-size: .7875rem; + border-radius: 0.5rem; + box-shadow: none!important; +} + +.btn-danger:hover{ + box-shadow: none!important; +} + +.btn-warning{ + color: #222; + background-color: #ffc107; + border: 2px solid #f3c12a; + padding: 0.25rem 0.5rem; + font-size: .7875rem; + border-radius: 0.5rem; + box-shadow: none!important; +} + +.btn-warning:hover{ + box-shadow: none!important; +} + +.btn-dark { + color: #fff; + background-color: #212131; + border: 2px solid #1c1c2a; + box-shadow: none!important; + border-radius: 8px; + padding: 4px 11px 4px 11px; +} + +.btn-dark:hover{ + background-color: #212131; + border: 2px solid #1c1c2a; + box-shadow: none!important; + border-radius: 8px; + padding: 4px 11px 4px 11px; +} + +.btn-friendsgen{ + background-color: #424354; + border: 2px solid #63647a; + border-radius: 10px; +} + +.btn-friendsgensuccess{ + background-color: #b69b83; + border: 2px solid #e2c1a3; + border-radius: 10px; +} diff --git a/Coolui v3 test/src/css/common/MiniCamera.css b/Coolui v3 test/src/css/common/MiniCamera.css new file mode 100644 index 0000000000..fd4a145fb7 --- /dev/null +++ b/Coolui v3 test/src/css/common/MiniCamera.css @@ -0,0 +1,13 @@ +.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: 30px; + margin-left: 3px; + } +} \ No newline at end of file diff --git a/Coolui v3 test/src/css/floorplan/FloorplanEditorView.css b/Coolui v3 test/src/css/floorplan/FloorplanEditorView.css new file mode 100644 index 0000000000..219a197a0f --- /dev/null +++ b/Coolui v3 test/src/css/floorplan/FloorplanEditorView.css @@ -0,0 +1,9 @@ +.nitro-floorplan-editor { + width: 760px; + height: 500px; +} + +.floorplan-import-export { + width: 630px; + height: 475px; +} \ No newline at end of file diff --git a/Coolui v3 test/src/css/forms/form_select.css b/Coolui v3 test/src/css/forms/form_select.css new file mode 100644 index 0000000000..8336b6ffff --- /dev/null +++ b/Coolui v3 test/src/css/forms/form_select.css @@ -0,0 +1,24 @@ +/* Styling for text inputs (e.g., password fields) */ +.form-control-sm { + padding: 0.25rem 0.5rem; /* Reduced padding */ + font-size: 0.75rem; /* Small font size, adjust to match */ + line-height: 1.5; + border-radius: 0.2rem; + min-height: calc(1.5em + 0.5rem + 2px); /* Matches your inline style */ +} + +/* Optional: Styling for radio/checkbox inputs */ +.form-check-input { + /* No font-size here since it’s an input’s appearance, not text */ + margin-top: 0.25rem; /* Align with small text */ +} + +/* If you have + ); +}); + +NitroInput.displayName = 'NitroInput'; diff --git a/Coolui v3 test/src/layout/NitroItemCountBadge.tsx b/Coolui v3 test/src/layout/NitroItemCountBadge.tsx new file mode 100644 index 0000000000..f8b0782f2d --- /dev/null +++ b/Coolui v3 test/src/layout/NitroItemCountBadge.tsx @@ -0,0 +1,33 @@ +import { DetailedHTMLProps, forwardRef, HTMLAttributes, PropsWithChildren } from 'react'; +import { classNames } from './classNames'; + +const classes = { + base: 'text-[white] font-bold leading-none text-[9.5px] absolute right-0 top-0 py-0.5 px-[3px] z-[1] rounded border', + themes: { + 'primary': 'border-black bg-red-700' + } +}; + +export const NitroItemCountBadge = forwardRef & DetailedHTMLProps, HTMLDivElement>>((props, ref) => +{ + const { theme = 'primary', count = 0, className = null, children = null, ...rest } = props; + + return ( +
+ { count } + { children } +
+ ); +}); + +NitroItemCountBadge.displayName = 'NitroItemCountBadge'; diff --git a/Coolui v3 test/src/layout/classNames.ts b/Coolui v3 test/src/layout/classNames.ts new file mode 100644 index 0000000000..2127d85ef9 --- /dev/null +++ b/Coolui v3 test/src/layout/classNames.ts @@ -0,0 +1 @@ +export const classNames = (...classes: string[]) => classes.filter(Boolean).join(' '); diff --git a/Coolui v3 test/src/layout/index.ts b/Coolui v3 test/src/layout/index.ts new file mode 100644 index 0000000000..a7041de8ec --- /dev/null +++ b/Coolui v3 test/src/layout/index.ts @@ -0,0 +1,8 @@ +export * from './InfiniteGrid'; +export * from './NitroButton'; +export * from './NitroCard'; +export * from './NitroInput'; +export * from './NitroItemCountBadge'; +export * from './classNames'; +export * from './limited-edition'; +export * from './styleNames'; diff --git a/Coolui v3 test/src/layout/limited-edition/NitroLimitedEditionStyledNumberView.tsx b/Coolui v3 test/src/layout/limited-edition/NitroLimitedEditionStyledNumberView.tsx new file mode 100644 index 0000000000..0cd02506de --- /dev/null +++ b/Coolui v3 test/src/layout/limited-edition/NitroLimitedEditionStyledNumberView.tsx @@ -0,0 +1,18 @@ +import { FC } from 'react'; + +export const NitroLimitedEditionStyledNumberView: FC<{ + value: number; +}> = props => +{ + const { value = 0 } = props; + + return ( + <> + { value.toString().split('').map((number, index) => + + ) } + + ); +}; diff --git a/Coolui v3 test/src/layout/limited-edition/index.ts b/Coolui v3 test/src/layout/limited-edition/index.ts new file mode 100644 index 0000000000..079a6d4fc3 --- /dev/null +++ b/Coolui v3 test/src/layout/limited-edition/index.ts @@ -0,0 +1 @@ +export * from './NitroLimitedEditionStyledNumberView'; diff --git a/Coolui v3 test/src/layout/styleNames.ts b/Coolui v3 test/src/layout/styleNames.ts new file mode 100644 index 0000000000..ac58f7791c --- /dev/null +++ b/Coolui v3 test/src/layout/styleNames.ts @@ -0,0 +1,8 @@ +export const styleNames = (...styles: object[]) => +{ + let mergedStyle = {}; + + styles.filter(Boolean).forEach(style => mergedStyle = { ...mergedStyle, ...style }); + + return mergedStyle; +}; diff --git a/Coolui v3 test/src/react-app-env.d.ts b/Coolui v3 test/src/react-app-env.d.ts new file mode 100644 index 0000000000..6431bc5fc6 --- /dev/null +++ b/Coolui v3 test/src/react-app-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/Coolui v3 test/src/workers/IntervalWebWorker.ts b/Coolui v3 test/src/workers/IntervalWebWorker.ts new file mode 100644 index 0000000000..add63f620a --- /dev/null +++ b/Coolui v3 test/src/workers/IntervalWebWorker.ts @@ -0,0 +1,26 @@ +export default () => +{ + let interval: ReturnType = null; + + + self.onmessage = (message: MessageEvent) => + { + if(!message) return; + + const data: { [index: string]: any } = message.data; + + switch(data.action) + { + case 'START': + interval = setInterval(() => postMessage(null), data.content); + break; + case 'STOP': + if(interval) + { + clearInterval(interval); + interval = null; + } + break; + } + }; +}; diff --git a/Coolui v3 test/src/workers/WorkerBuilder.ts b/Coolui v3 test/src/workers/WorkerBuilder.ts new file mode 100644 index 0000000000..b848893e25 --- /dev/null +++ b/Coolui v3 test/src/workers/WorkerBuilder.ts @@ -0,0 +1,10 @@ +export class WorkerBuilder extends Worker +{ + constructor(worker) + { + const code = worker.toString(); + const blob = new Blob([ `(${ code })()` ]); + + super(URL.createObjectURL(blob)); + } +} diff --git a/Coolui v3 test/tailwind.config.js b/Coolui v3 test/tailwind.config.js new file mode 100644 index 0000000000..9ac9330019 --- /dev/null +++ b/Coolui v3 test/tailwind.config.js @@ -0,0 +1,160 @@ +/** @type {import('tailwindcss').Config} */ + +const { generateShades } = require('./css-utils/CSSColorUtils'); + +const colors = { + 'toolbar': '#555555', + 'card-header': '#1E7295', + 'card-close': '#921911', + 'card-tabs': '#185D79', + 'card-border': '#283F5D', + 'card-tab-item': '#B6BEC5', + 'card-tab-item-active': '#DFDFDF', + 'card-content-area': '#DFDFDF', + 'card-grid-item': '#CDD3D9', + 'card-grid-item-active': '#ECECEC', + 'card-grid-item-border': '#B6BEC5', + 'card-grid-item-border-active': '#FFFFFF', + 'loading': '#393A85', + 'muted': 'rgba(182, 190, 197)', + 'blue': '#0d6efd', + 'indigo': '#6610f2', + 'pink': '#d63384', + 'red': '#a81a12', + 'orange': '#fd7e14', + 'yellow': '#ffc107', + 'green': '#00800b', + 'teal': '#20c997', + 'cyan': '#0dcaf0', + 'gray': '#6c757d', + 'gray-dark': '#343a40', + 'gray-100': '#f8f9fa', + 'gray-200': '#e9ecef', + 'gray-300': '#dee2e6', + 'gray-400': '#ced4da', + 'gray-500': '#adb5bd', + 'gray-600': '#6c757d', + 'gray-700': '#495057', + 'gray-800': '#343a40', + 'gray-900': '#212529', + 'primary': '#1E7295', + 'secondary': '#185D79', + 'success': '#00800b', + 'info': '#0dcaf0', + 'warning': '#ffc107', + 'danger': '#a81a12', + 'light': '#DFDFDF', + 'dark': 'rgba(28, 28, 32, .9803921569)', + 'light-dark': '#343a40', + 'white': '#fff', + 'black': '#000', + 'muted': '#B6BEC5', + 'purple': '#6f42c1', + 'gainsboro': '#d9d9d9' +}; + +const boxShadow = { + 'inner1px': 'inset 0 0 0 1px rgba(255,255,255,.3)', + 'room-previewer': '-2px -2px rgba(0, 0, 0, 0.4), inset 3px 3px rgba(0, 0, 0, 0.2);' +}; + + +module.exports = { + theme: { + extend: { + fontSize: { + base: '0.9rem', + sm: '0.7875rem', + xl: '1.25rem', + '2xl': '1.563rem', + '3xl': '1.953rem', + '4xl': '2.441rem', + '5xl': '3.052rem', + }, + + fontFamily: { + sans: [ 'Ubuntu' ], + }, + colors: generateShades(colors), + boxShadow, + backgroundImage: { + 'button-gradient-gray': 'linear-gradient(to bottom, #e2e2e2 50%, #c8c8c8 50%)', + }, + spacing: { + 'card-header': '33px', + 'card-tabs': '33px', + 'navigator-w': '420px', + 'navigator-h': '440px', + 'inventory-w': '528px', + 'inventory-h': '320px' + }, + borderRadius: { + + '3': '0.3rem', + + }, + zIndex: { + 'toolbar': '', + 'loading': '100', + 'chat-zindex': '20' + }, + dropShadow: { + 'hover': '2px 2px 0 rgba(0,0,0,0.8)' + }, + }, + }, + safelist: [ + 'grid-cols-1', + 'grid-cols-2', + 'grid-cols-3', + 'grid-cols-4', + 'grid-cols-5', + 'grid-cols-6', + 'grid-cols-7', + 'grid-cols-8', + 'grid-cols-9', + 'grid-cols-10', + 'grid-cols-11', + 'grid-cols-12', + 'col-span-1', + 'col-span-2', + 'col-span-3', + 'col-span-4', + 'col-span-5', + 'col-span-6', + 'col-span-7', + 'col-span-8', + 'col-span-9', + 'col-span-10', + 'col-span-11', + 'col-span-12', + 'grid-rows-1', + 'grid-rows-2', + 'grid-rows-3', + 'grid-rows-4', + 'grid-rows-5', + 'grid-rows-6', + 'grid-rows-7', + 'grid-rows-8', + 'grid-rows-9', + 'grid-rows-10', + 'grid-rows-11', + 'grid-rows-12', + 'justify-end', + 'items-end' + ], + darkMode: 'class', + variants: { + extend: { + divideColor: [ 'group-hover' ], + backgroundColor: [ 'group-focus' ], + } + }, + plugins: [ + require('@tailwindcss/forms'), + ], + content: [ + './index.html', + './src/**/*.{html,js,jsx,ts,tsx}' + ] +} diff --git a/Coolui v3 test/tsconfig.json b/Coolui v3 test/tsconfig.json new file mode 100644 index 0000000000..e5c6ba1511 --- /dev/null +++ b/Coolui v3 test/tsconfig.json @@ -0,0 +1,34 @@ +{ + "compilerOptions": { + "baseUrl": "./src", + "target": "es2022", + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], + "allowJs": true, + "skipLibCheck": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": false, + "downlevelIteration": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": false, + "module": "ES2022", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + "paths": { + "@layout/*": [ + "layout/*" + ] + } + }, + "include": [ + "src", + "node_modules/@nitrots/nitro-renderer/src/**/*.ts" + ] +} diff --git a/Coolui v3 test/vite.config.mjs b/Coolui v3 test/vite.config.mjs new file mode 100644 index 0000000000..3267645adc --- /dev/null +++ b/Coolui v3 test/vite.config.mjs @@ -0,0 +1,32 @@ +import react from '@vitejs/plugin-react'; +import { resolve } from 'path'; +import { defineConfig } from 'vite'; +import tsconfigPaths from 'vite-tsconfig-paths'; + +export default defineConfig({ + plugins: [ react(), tsconfigPaths() ], + resolve: { + alias: { + '@': resolve(__dirname, 'src'), + '~': resolve(__dirname, 'node_modules') + } + }, + build: { + assetsInlineLimit: 102400, + chunkSizeWarningLimit: 200000, + rollupOptions: { + output: { + assetFileNames: 'src/assets/[name].[ext]', + manualChunks: id => + { + if(id.includes('node_modules')) + { + if(id.includes('@nitrots/nitro-renderer')) return 'nitro-renderer'; + + return 'vendor'; + } + } + } + } + } +}) diff --git a/Coolui v3 test/yarn.lock b/Coolui v3 test/yarn.lock new file mode 100644 index 0000000000..7816d0ae92 --- /dev/null +++ b/Coolui v3 test/yarn.lock @@ -0,0 +1,3364 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@alloc/quick-lru@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@alloc/quick-lru/-/quick-lru-5.2.0.tgz#7bf68b20c0a350f936915fcae06f58e32007ce30" + integrity sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw== + +"@babel/code-frame@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.28.6.tgz#72499312ec58b1e2245ba4a4f550c132be4982f7" + integrity sha512-JYgintcMjRiCvS8mMECzaEn+m3PfoQiyqukOMCCVQtoJGYJw8j/8LBJEiqkHLkfwCcs74E3pbAUFNg7d9VNJ+Q== + dependencies: + "@babel/helper-validator-identifier" "^7.28.5" + js-tokens "^4.0.0" + picocolors "^1.1.1" + +"@babel/compat-data@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.28.6.tgz#103f466803fa0f059e82ccac271475470570d74c" + integrity sha512-2lfu57JtzctfIrcGMz992hyLlByuzgIk58+hhGCxjKZ3rWI82NnVLjXcaTqkI2NvlcvOskZaiZ5kjUALo3Lpxg== + +"@babel/core@^7.28.0": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.28.6.tgz#531bf883a1126e53501ba46eb3bb414047af507f" + integrity sha512-H3mcG6ZDLTlYfaSNi0iOKkigqMFvkTKlGUYlD8GW7nNOYRrevuA46iTypPyv+06V3fEmvvazfntkBU34L0azAw== + dependencies: + "@babel/code-frame" "^7.28.6" + "@babel/generator" "^7.28.6" + "@babel/helper-compilation-targets" "^7.28.6" + "@babel/helper-module-transforms" "^7.28.6" + "@babel/helpers" "^7.28.6" + "@babel/parser" "^7.28.6" + "@babel/template" "^7.28.6" + "@babel/traverse" "^7.28.6" + "@babel/types" "^7.28.6" + "@jridgewell/remapping" "^2.3.5" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + +"@babel/generator@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.28.6.tgz#48dcc65d98fcc8626a48f72b62e263d25fc3c3f1" + integrity sha512-lOoVRwADj8hjf7al89tvQ2a1lf53Z+7tiXMgpZJL3maQPDxh0DgLMN62B2MKUOFcoodBHLMbDM6WAbKgNy5Suw== + dependencies: + "@babel/parser" "^7.28.6" + "@babel/types" "^7.28.6" + "@jridgewell/gen-mapping" "^0.3.12" + "@jridgewell/trace-mapping" "^0.3.28" + jsesc "^3.0.2" + +"@babel/helper-compilation-targets@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz#32c4a3f41f12ed1532179b108a4d746e105c2b25" + integrity sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA== + dependencies: + "@babel/compat-data" "^7.28.6" + "@babel/helper-validator-option" "^7.27.1" + browserslist "^4.24.0" + lru-cache "^5.1.1" + semver "^6.3.1" + +"@babel/helper-globals@^7.28.0": + version "7.28.0" + resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674" + integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw== + +"@babel/helper-module-imports@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz#60632cbd6ffb70b22823187201116762a03e2d5c" + integrity sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw== + dependencies: + "@babel/traverse" "^7.28.6" + "@babel/types" "^7.28.6" + +"@babel/helper-module-transforms@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz#9312d9d9e56edc35aeb6e95c25d4106b50b9eb1e" + integrity sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA== + dependencies: + "@babel/helper-module-imports" "^7.28.6" + "@babel/helper-validator-identifier" "^7.28.5" + "@babel/traverse" "^7.28.6" + +"@babel/helper-plugin-utils@^7.27.1": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz#6f13ea251b68c8532e985fd532f28741a8af9ac8" + integrity sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug== + +"@babel/helper-string-parser@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687" + integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== + +"@babel/helper-validator-identifier@^7.28.5": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz#010b6938fab7cb7df74aa2bbc06aa503b8fe5fb4" + integrity sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q== + +"@babel/helper-validator-option@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f" + integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg== + +"@babel/helpers@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.28.6.tgz#fca903a313ae675617936e8998b814c415cbf5d7" + integrity sha512-xOBvwq86HHdB7WUDTfKfT/Vuxh7gElQ+Sfti2Cy6yIWNW05P8iUslOVcZ4/sKbE+/jQaukQAdz/gf3724kYdqw== + dependencies: + "@babel/template" "^7.28.6" + "@babel/types" "^7.28.6" + +"@babel/parser@^7.1.0", "@babel/parser@^7.20.7", "@babel/parser@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.6.tgz#f01a8885b7fa1e56dd8a155130226cd698ef13fd" + integrity sha512-TeR9zWR18BvbfPmGbLampPMW+uW1NZnJlRuuHso8i87QZNq2JRF9i6RgxRqtEq+wQGsS19NNTWr2duhnE49mfQ== + dependencies: + "@babel/types" "^7.28.6" + +"@babel/plugin-transform-react-jsx-self@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.27.1.tgz#af678d8506acf52c577cac73ff7fe6615c85fc92" + integrity sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-react-jsx-source@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.27.1.tgz#dcfe2c24094bb757bf73960374e7c55e434f19f0" + integrity sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/runtime@^7.24.7", "@babel/runtime@^7.26.0", "@babel/runtime@^7.26.9", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.8.7": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.28.6.tgz#d267a43cb1836dc4d182cce93ae75ba954ef6d2b" + integrity sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA== + +"@babel/template@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.28.6.tgz#0e7e56ecedb78aeef66ce7972b082fce76a23e57" + integrity sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ== + dependencies: + "@babel/code-frame" "^7.28.6" + "@babel/parser" "^7.28.6" + "@babel/types" "^7.28.6" + +"@babel/traverse@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.28.6.tgz#871ddc79a80599a5030c53b1cc48cbe3a5583c2e" + integrity sha512-fgWX62k02qtjqdSNTAGxmKYY/7FSL9WAS1o2Hu5+I5m9T0yxZzr4cnrfXQ/MX0rIifthCSs6FKTlzYbJcPtMNg== + dependencies: + "@babel/code-frame" "^7.28.6" + "@babel/generator" "^7.28.6" + "@babel/helper-globals" "^7.28.0" + "@babel/parser" "^7.28.6" + "@babel/template" "^7.28.6" + "@babel/types" "^7.28.6" + debug "^4.3.1" + +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.28.2", "@babel/types@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.6.tgz#c3e9377f1b155005bcc4c46020e7e394e13089df" + integrity sha512-0ZrskXVEHSWIqZM/sQZ4EV3jZJXRkio/WCxaqKZP1g//CEWEPSfeZFcms4XeKBCHU0ZKnIkdJeU/kF+eRp5lBg== + dependencies: + "@babel/helper-string-parser" "^7.27.1" + "@babel/helper-validator-identifier" "^7.28.5" + +"@esbuild/aix-ppc64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz#c7184a326533fcdf1b8ee0733e21c713b975575f" + integrity sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ== + +"@esbuild/android-arm64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz#09d9b4357780da9ea3a7dfb833a1f1ff439b4052" + integrity sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A== + +"@esbuild/android-arm@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.21.5.tgz#9b04384fb771926dfa6d7ad04324ecb2ab9b2e28" + integrity sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg== + +"@esbuild/android-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.21.5.tgz#29918ec2db754cedcb6c1b04de8cd6547af6461e" + integrity sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA== + +"@esbuild/darwin-arm64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz#e495b539660e51690f3928af50a76fb0a6ccff2a" + integrity sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ== + +"@esbuild/darwin-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz#c13838fa57372839abdddc91d71542ceea2e1e22" + integrity sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw== + +"@esbuild/freebsd-arm64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz#646b989aa20bf89fd071dd5dbfad69a3542e550e" + integrity sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g== + +"@esbuild/freebsd-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz#aa615cfc80af954d3458906e38ca22c18cf5c261" + integrity sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ== + +"@esbuild/linux-arm64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz#70ac6fa14f5cb7e1f7f887bcffb680ad09922b5b" + integrity sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q== + +"@esbuild/linux-arm@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz#fc6fd11a8aca56c1f6f3894f2bea0479f8f626b9" + integrity sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA== + +"@esbuild/linux-ia32@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz#3271f53b3f93e3d093d518d1649d6d68d346ede2" + integrity sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg== + +"@esbuild/linux-loong64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz#ed62e04238c57026aea831c5a130b73c0f9f26df" + integrity sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg== + +"@esbuild/linux-mips64el@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz#e79b8eb48bf3b106fadec1ac8240fb97b4e64cbe" + integrity sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg== + +"@esbuild/linux-ppc64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz#5f2203860a143b9919d383ef7573521fb154c3e4" + integrity sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w== + +"@esbuild/linux-riscv64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz#07bcafd99322d5af62f618cb9e6a9b7f4bb825dc" + integrity sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA== + +"@esbuild/linux-s390x@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz#b7ccf686751d6a3e44b8627ababc8be3ef62d8de" + integrity sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A== + +"@esbuild/linux-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz#6d8f0c768e070e64309af8004bb94e68ab2bb3b0" + integrity sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ== + +"@esbuild/netbsd-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz#bbe430f60d378ecb88decb219c602667387a6047" + integrity sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg== + +"@esbuild/openbsd-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz#99d1cf2937279560d2104821f5ccce220cb2af70" + integrity sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow== + +"@esbuild/sunos-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz#08741512c10d529566baba837b4fe052c8f3487b" + integrity sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg== + +"@esbuild/win32-arm64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz#675b7385398411240735016144ab2e99a60fc75d" + integrity sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A== + +"@esbuild/win32-ia32@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz#1bfc3ce98aa6ca9a0969e4d2af72144c59c1193b" + integrity sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA== + +"@esbuild/win32-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz#acad351d582d157bb145535db2a6ff53dd514b5c" + integrity sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw== + +"@eslint-community/eslint-utils@^4.4.0", "@eslint-community/eslint-utils@^4.8.0": + version "4.9.1" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz#4e90af67bc51ddee6cdef5284edf572ec376b595" + integrity sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ== + dependencies: + eslint-visitor-keys "^3.4.3" + +"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.12.1": + version "4.12.2" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.2.tgz#bccdf615bcf7b6e8db830ec0b8d21c9a25de597b" + integrity sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew== + +"@eslint/config-array@^0.21.1": + version "0.21.1" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.21.1.tgz#7d1b0060fea407f8301e932492ba8c18aff29713" + integrity sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA== + dependencies: + "@eslint/object-schema" "^2.1.7" + debug "^4.3.1" + minimatch "^3.1.2" + +"@eslint/config-helpers@^0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@eslint/config-helpers/-/config-helpers-0.4.2.tgz#1bd006ceeb7e2e55b2b773ab318d300e1a66aeda" + integrity sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw== + dependencies: + "@eslint/core" "^0.17.0" + +"@eslint/core@^0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.17.0.tgz#77225820413d9617509da9342190a2019e78761c" + integrity sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ== + dependencies: + "@types/json-schema" "^7.0.15" + +"@eslint/eslintrc@^3.3.1": + version "3.3.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.3.3.tgz#26393a0806501b5e2b6a43aa588a4d8df67880ac" + integrity sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^10.0.1" + globals "^14.0.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.1" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + +"@eslint/js@9.39.2": + version "9.39.2" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.39.2.tgz#2d4b8ec4c3ea13c1b3748e0c97ecd766bdd80599" + integrity sha512-q1mjIoW1VX4IvSocvM/vbTiveKC4k9eLrajNEuSsmjymSDEbpGddtpfOoN7YGAqBK3NG+uqo8ia4PDTt8buCYA== + +"@eslint/object-schema@^2.1.7": + version "2.1.7" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.7.tgz#6e2126a1347e86a4dedf8706ec67ff8e107ebbad" + integrity sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA== + +"@eslint/plugin-kit@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz#9779e3fd9b7ee33571a57435cf4335a1794a6cb2" + integrity sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA== + dependencies: + "@eslint/core" "^0.17.0" + levn "^0.4.1" + +"@humanfs/core@^0.19.1": + version "0.19.1" + resolved "https://registry.yarnpkg.com/@humanfs/core/-/core-0.19.1.tgz#17c55ca7d426733fe3c561906b8173c336b40a77" + integrity sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA== + +"@humanfs/node@^0.16.6": + version "0.16.7" + resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.7.tgz#822cb7b3a12c5a240a24f621b5a2413e27a45f26" + integrity sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ== + dependencies: + "@humanfs/core" "^0.19.1" + "@humanwhocodes/retry" "^0.4.0" + +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/retry@^0.4.0", "@humanwhocodes/retry@^0.4.2": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.3.tgz#c2b9d2e374ee62c586d3adbea87199b1d7a7a6ba" + integrity sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ== + +"@jridgewell/gen-mapping@^0.3.12", "@jridgewell/gen-mapping@^0.3.2", "@jridgewell/gen-mapping@^0.3.5": + version "0.3.13" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz#6342a19f44347518c93e43b1ac69deb3c4656a1f" + integrity sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA== + dependencies: + "@jridgewell/sourcemap-codec" "^1.5.0" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/remapping@^2.3.5": + version "2.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/remapping/-/remapping-2.3.5.tgz#375c476d1972947851ba1e15ae8f123047445aa1" + integrity sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.5.0": + version "1.5.5" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba" + integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== + +"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.28": + version "0.3.31" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0" + integrity sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@parcel/watcher-android-arm64@2.5.6": + version "2.5.6" + resolved "https://registry.yarnpkg.com/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.6.tgz#5f32e0dba356f4ac9a11068d2a5c134ca3ba6564" + integrity sha512-YQxSS34tPF/6ZG7r/Ih9xy+kP/WwediEUsqmtf0cuCV5TPPKw/PQHRhueUo6JdeFJaqV3pyjm0GdYjZotbRt/A== + +"@parcel/watcher-darwin-arm64@2.5.6": + version "2.5.6" + resolved "https://registry.yarnpkg.com/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.6.tgz#88d3e720b59b1eceffce98dac46d7c40e8be5e8e" + integrity sha512-Z2ZdrnwyXvvvdtRHLmM4knydIdU9adO3D4n/0cVipF3rRiwP+3/sfzpAwA/qKFL6i1ModaabkU7IbpeMBgiVEA== + +"@parcel/watcher-darwin-x64@2.5.6": + version "2.5.6" + resolved "https://registry.yarnpkg.com/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.6.tgz#bf05d76a78bc15974f15ec3671848698b0838063" + integrity sha512-HgvOf3W9dhithcwOWX9uDZyn1lW9R+7tPZ4sug+NGrGIo4Rk1hAXLEbcH1TQSqxts0NYXXlOWqVpvS1SFS4fRg== + +"@parcel/watcher-freebsd-x64@2.5.6": + version "2.5.6" + resolved "https://registry.yarnpkg.com/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.6.tgz#8bc26e9848e7303ac82922a5ae1b1ef1bdb48a53" + integrity sha512-vJVi8yd/qzJxEKHkeemh7w3YAn6RJCtYlE4HPMoVnCpIXEzSrxErBW5SJBgKLbXU3WdIpkjBTeUNtyBVn8TRng== + +"@parcel/watcher-linux-arm-glibc@2.5.6": + version "2.5.6" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.6.tgz#1328fee1deb0c2d7865079ef53a2ba4cc2f8b40a" + integrity sha512-9JiYfB6h6BgV50CCfasfLf/uvOcJskMSwcdH1PHH9rvS1IrNy8zad6IUVPVUfmXr+u+Km9IxcfMLzgdOudz9EQ== + +"@parcel/watcher-linux-arm-musl@2.5.6": + version "2.5.6" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.6.tgz#bad0f45cb3e2157746db8b9d22db6a125711f152" + integrity sha512-Ve3gUCG57nuUUSyjBq/MAM0CzArtuIOxsBdQ+ftz6ho8n7s1i9E1Nmk/xmP323r2YL0SONs1EuwqBp2u1k5fxg== + +"@parcel/watcher-linux-arm64-glibc@2.5.6": + version "2.5.6" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.6.tgz#b75913fbd501d9523c5f35d420957bf7d0204809" + integrity sha512-f2g/DT3NhGPdBmMWYoxixqYr3v/UXcmLOYy16Bx0TM20Tchduwr4EaCbmxh1321TABqPGDpS8D/ggOTaljijOA== + +"@parcel/watcher-linux-arm64-musl@2.5.6": + version "2.5.6" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.6.tgz#da5621a6a576070c8c0de60dea8b46dc9c3827d4" + integrity sha512-qb6naMDGlbCwdhLj6hgoVKJl2odL34z2sqkC7Z6kzir8b5W65WYDpLB6R06KabvZdgoHI/zxke4b3zR0wAbDTA== + +"@parcel/watcher-linux-x64-glibc@2.5.6": + version "2.5.6" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.6.tgz#ce437accdc4b30f93a090b4a221fd95cd9b89639" + integrity sha512-kbT5wvNQlx7NaGjzPFu8nVIW1rWqV780O7ZtkjuWaPUgpv2NMFpjYERVi0UYj1msZNyCzGlaCWEtzc+exjMGbQ== + +"@parcel/watcher-linux-x64-musl@2.5.6": + version "2.5.6" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.6.tgz#02400c54b4a67efcc7e2327b249711920ac969e2" + integrity sha512-1JRFeC+h7RdXwldHzTsmdtYR/Ku8SylLgTU/reMuqdVD7CtLwf0VR1FqeprZ0eHQkO0vqsbvFLXUmYm/uNKJBg== + +"@parcel/watcher-win32-arm64@2.5.6": + version "2.5.6" + resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.6.tgz#caae3d3c7583ca0a7171e6bd142c34d20ea1691e" + integrity sha512-3ukyebjc6eGlw9yRt678DxVF7rjXatWiHvTXqphZLvo7aC5NdEgFufVwjFfY51ijYEWpXbqF5jtrK275z52D4Q== + +"@parcel/watcher-win32-ia32@2.5.6": + version "2.5.6" + resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.6.tgz#9ac922550896dfe47bfc5ae3be4f1bcaf8155d6d" + integrity sha512-k35yLp1ZMwwee3Ez/pxBi5cf4AoBKYXj00CZ80jUz5h8prpiaQsiRPKQMxoLstNuqe2vR4RNPEAEcjEFzhEz/g== + +"@parcel/watcher-win32-x64@2.5.6": + version "2.5.6" + resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.6.tgz#73fdafba2e21c448f0e456bbe13178d8fe11739d" + integrity sha512-hbQlYcCq5dlAX9Qx+kFb0FHue6vbjlf0FrNzSKdYK2APUf7tGfGxQCk2ihEREmbR6ZMc0MVAD5RIX/41gpUzTw== + +"@parcel/watcher@^2.4.1": + version "2.5.6" + resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.5.6.tgz#3f932828c894f06d0ad9cfefade1756ecc6ef1f1" + integrity sha512-tmmZ3lQxAe/k/+rNnXQRawJ4NjxO2hqiOLTHvWchtGZULp4RyFeh6aU4XdOYBFe2KE1oShQTv4AblOs2iOrNnQ== + dependencies: + detect-libc "^2.0.3" + is-glob "^4.0.3" + node-addon-api "^7.0.0" + picomatch "^4.0.3" + optionalDependencies: + "@parcel/watcher-android-arm64" "2.5.6" + "@parcel/watcher-darwin-arm64" "2.5.6" + "@parcel/watcher-darwin-x64" "2.5.6" + "@parcel/watcher-freebsd-x64" "2.5.6" + "@parcel/watcher-linux-arm-glibc" "2.5.6" + "@parcel/watcher-linux-arm-musl" "2.5.6" + "@parcel/watcher-linux-arm64-glibc" "2.5.6" + "@parcel/watcher-linux-arm64-musl" "2.5.6" + "@parcel/watcher-linux-x64-glibc" "2.5.6" + "@parcel/watcher-linux-x64-musl" "2.5.6" + "@parcel/watcher-win32-arm64" "2.5.6" + "@parcel/watcher-win32-ia32" "2.5.6" + "@parcel/watcher-win32-x64" "2.5.6" + +"@popperjs/core@^2.11.8": + version "2.11.8" + resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.8.tgz#6b79032e760a0899cd4204710beede972a3a185f" + integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A== + +"@react-aria/ssr@^3.5.0": + version "3.9.10" + resolved "https://registry.yarnpkg.com/@react-aria/ssr/-/ssr-3.9.10.tgz#7fdc09e811944ce0df1d7e713de1449abd7435e6" + integrity sha512-hvTm77Pf+pMBhuBm760Li0BVIO38jv1IBws1xFm1NoL26PU+fe+FMW5+VZWyANR6nYL65joaJKZqOdTQMkO9IQ== + dependencies: + "@swc/helpers" "^0.5.0" + +"@restart/hooks@^0.4.9": + version "0.4.16" + resolved "https://registry.yarnpkg.com/@restart/hooks/-/hooks-0.4.16.tgz#95ae8ac1cc7e2bd4fed5e39800ff85604c6d59fb" + integrity sha512-f7aCv7c+nU/3mF7NWLtVVr0Ra80RqsO89hO72r+Y/nvQr5+q0UFGkocElTH6MJApvReVh6JHUFYn2cw1WdHF3w== + dependencies: + dequal "^2.0.3" + +"@restart/hooks@^0.5.0": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@restart/hooks/-/hooks-0.5.1.tgz#6776b3859e33aea72b23b81fc47021edf17fd247" + integrity sha512-EMoH04NHS1pbn07iLTjIjgttuqb7qu4+/EyhAx27MHpoENcB2ZdSsLTNxmKD+WEPnZigo62Qc8zjGnNxoSE/5Q== + dependencies: + dequal "^2.0.3" + +"@restart/ui@^1.9.4": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@restart/ui/-/ui-1.9.4.tgz#9d61f56f2647f5ab8a33d87b278b9ce183511a26" + integrity sha512-N4C7haUc3vn4LTwVUPlkJN8Ach/+yIMvRuTVIhjilNHqegY60SGLrzud6errOMNJwSnmYFnt1J0H/k8FE3A4KA== + dependencies: + "@babel/runtime" "^7.26.0" + "@popperjs/core" "^2.11.8" + "@react-aria/ssr" "^3.5.0" + "@restart/hooks" "^0.5.0" + "@types/warning" "^3.0.3" + dequal "^2.0.3" + dom-helpers "^5.2.0" + uncontrollable "^8.0.4" + warning "^4.0.3" + +"@rolldown/pluginutils@1.0.0-beta.27": + version "1.0.0-beta.27" + resolved "https://registry.yarnpkg.com/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz#47d2bf4cef6d470b22f5831b420f8964e0bf755f" + integrity sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA== + +"@rollup/rollup-android-arm-eabi@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.56.0.tgz#067cfcd81f1c1bfd92aefe3ad5ef1523549d5052" + integrity sha512-LNKIPA5k8PF1+jAFomGe3qN3bbIgJe/IlpDBwuVjrDKrJhVWywgnJvflMt/zkbVNLFtF1+94SljYQS6e99klnw== + +"@rollup/rollup-android-arm64@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.56.0.tgz#85e39a44034d7d4e4fee2a1616f0bddb85a80517" + integrity sha512-lfbVUbelYqXlYiU/HApNMJzT1E87UPGvzveGg2h0ktUNlOCxKlWuJ9jtfvs1sKHdwU4fzY7Pl8sAl49/XaEk6Q== + +"@rollup/rollup-darwin-arm64@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.56.0.tgz#17d92fe98f2cc277b91101eb1528b7c0b6c00c54" + integrity sha512-EgxD1ocWfhoD6xSOeEEwyE7tDvwTgZc8Bss7wCWe+uc7wO8G34HHCUH+Q6cHqJubxIAnQzAsyUsClt0yFLu06w== + +"@rollup/rollup-darwin-x64@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.56.0.tgz#89ae6c66b1451609bd1f297da9384463f628437d" + integrity sha512-1vXe1vcMOssb/hOF8iv52A7feWW2xnu+c8BV4t1F//m9QVLTfNVpEdja5ia762j/UEJe2Z1jAmEqZAK42tVW3g== + +"@rollup/rollup-freebsd-arm64@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.56.0.tgz#cdbdb9947b26e76c188a31238c10639347413628" + integrity sha512-bof7fbIlvqsyv/DtaXSck4VYQ9lPtoWNFCB/JY4snlFuJREXfZnm+Ej6yaCHfQvofJDXLDMTVxWscVSuQvVWUQ== + +"@rollup/rollup-freebsd-x64@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.56.0.tgz#9b1458d07b6e040be16ee36d308a2c9520f7f7cc" + integrity sha512-KNa6lYHloW+7lTEkYGa37fpvPq+NKG/EHKM8+G/g9WDU7ls4sMqbVRV78J6LdNuVaeeK5WB9/9VAFbKxcbXKYg== + +"@rollup/rollup-linux-arm-gnueabihf@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.56.0.tgz#1d50ded7c965d5f125f5832c971ad5b287befef7" + integrity sha512-E8jKK87uOvLrrLN28jnAAAChNq5LeCd2mGgZF+fGF5D507WlG/Noct3lP/QzQ6MrqJ5BCKNwI9ipADB6jyiq2A== + +"@rollup/rollup-linux-arm-musleabihf@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.56.0.tgz#53597e319b7e65990d3bc2a5048097384814c179" + integrity sha512-jQosa5FMYF5Z6prEpTCCmzCXz6eKr/tCBssSmQGEeozA9tkRUty/5Vx06ibaOP9RCrW1Pvb8yp3gvZhHwTDsJw== + +"@rollup/rollup-linux-arm64-gnu@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.56.0.tgz#597002909dec198ca4bdccb25f043d32db3d6283" + integrity sha512-uQVoKkrC1KGEV6udrdVahASIsaF8h7iLG0U0W+Xn14ucFwi6uS539PsAr24IEF9/FoDtzMeeJXJIBo5RkbNWvQ== + +"@rollup/rollup-linux-arm64-musl@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.56.0.tgz#286f0e0f799545ce288bdc5a7c777261fcba3d54" + integrity sha512-vLZ1yJKLxhQLFKTs42RwTwa6zkGln+bnXc8ueFGMYmBTLfNu58sl5/eXyxRa2RarTkJbXl8TKPgfS6V5ijNqEA== + +"@rollup/rollup-linux-loong64-gnu@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.56.0.tgz#1fab07fa1a4f8d3697735b996517f1bae0ba101b" + integrity sha512-FWfHOCub564kSE3xJQLLIC/hbKqHSVxy8vY75/YHHzWvbJL7aYJkdgwD/xGfUlL5UV2SB7otapLrcCj2xnF1dg== + +"@rollup/rollup-linux-loong64-musl@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.56.0.tgz#efc2cb143d6c067f95205482afb177f78ed9ea3d" + integrity sha512-z1EkujxIh7nbrKL1lmIpqFTc/sr0u8Uk0zK/qIEFldbt6EDKWFk/pxFq3gYj4Bjn3aa9eEhYRlL3H8ZbPT1xvA== + +"@rollup/rollup-linux-ppc64-gnu@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.56.0.tgz#e8de8bd3463f96b92b7dfb7f151fd80ffe8a937c" + integrity sha512-iNFTluqgdoQC7AIE8Q34R3AuPrJGJirj5wMUErxj22deOcY7XwZRaqYmB6ZKFHoVGqRcRd0mqO+845jAibKCkw== + +"@rollup/rollup-linux-ppc64-musl@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.56.0.tgz#8c508fe28a239da83b3a9da75bcf093186e064b4" + integrity sha512-MtMeFVlD2LIKjp2sE2xM2slq3Zxf9zwVuw0jemsxvh1QOpHSsSzfNOTH9uYW9i1MXFxUSMmLpeVeUzoNOKBaWg== + +"@rollup/rollup-linux-riscv64-gnu@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.56.0.tgz#ff6d51976e0830732880770a9e18553136b8d92b" + integrity sha512-in+v6wiHdzzVhYKXIk5U74dEZHdKN9KH0Q4ANHOTvyXPG41bajYRsy7a8TPKbYPl34hU7PP7hMVHRvv/5aCSew== + +"@rollup/rollup-linux-riscv64-musl@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.56.0.tgz#325fb35eefc7e81d75478318f0deee1e4a111493" + integrity sha512-yni2raKHB8m9NQpI9fPVwN754mn6dHQSbDTwxdr9SE0ks38DTjLMMBjrwvB5+mXrX+C0npX0CVeCUcvvvD8CNQ== + +"@rollup/rollup-linux-s390x-gnu@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.56.0.tgz#37410fabb5d3ba4ad34abcfbe9ba9b6288413f30" + integrity sha512-zhLLJx9nQPu7wezbxt2ut+CI4YlXi68ndEve16tPc/iwoylWS9B3FxpLS2PkmfYgDQtosah07Mj9E0khc3Y+vQ== + +"@rollup/rollup-linux-x64-gnu@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.56.0.tgz#8ef907a53b2042068fc03fcc6a641e2b02276eca" + integrity sha512-MVC6UDp16ZSH7x4rtuJPAEoE1RwS8N4oK9DLHy3FTEdFoUTCFVzMfJl/BVJ330C+hx8FfprA5Wqx4FhZXkj2Kw== + +"@rollup/rollup-linux-x64-musl@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.56.0.tgz#61b9ba09ea219e0174b3f35a6ad2afc94bdd5662" + integrity sha512-ZhGH1eA4Qv0lxaV00azCIS1ChedK0V32952Md3FtnxSqZTBTd6tgil4nZT5cU8B+SIw3PFYkvyR4FKo2oyZIHA== + +"@rollup/rollup-openbsd-x64@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.56.0.tgz#fc4e54133134c1787d0b016ffdd5aeb22a5effd3" + integrity sha512-O16XcmyDeFI9879pEcmtWvD/2nyxR9mF7Gs44lf1vGGx8Vg2DRNx11aVXBEqOQhWb92WN4z7fW/q4+2NYzCbBA== + +"@rollup/rollup-openharmony-arm64@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.56.0.tgz#959ae225b1eeea0cc5b7c9f88e4834330fb6cd09" + integrity sha512-LhN/Reh+7F3RCgQIRbgw8ZMwUwyqJM+8pXNT6IIJAqm2IdKkzpCh/V9EdgOMBKuebIrzswqy4ATlrDgiOwbRcQ== + +"@rollup/rollup-win32-arm64-msvc@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.56.0.tgz#842acd38869fa1cbdbc240c76c67a86f93444c27" + integrity sha512-kbFsOObXp3LBULg1d3JIUQMa9Kv4UitDmpS+k0tinPBz3watcUiV2/LUDMMucA6pZO3WGE27P7DsfaN54l9ing== + +"@rollup/rollup-win32-ia32-msvc@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.56.0.tgz#7ab654def4042df44cb29f8ed9d5044e850c66d5" + integrity sha512-vSSgny54D6P4vf2izbtFm/TcWYedw7f8eBrOiGGecyHyQB9q4Kqentjaj8hToe+995nob/Wv48pDqL5a62EWtg== + +"@rollup/rollup-win32-x64-gnu@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.56.0.tgz#7426cdec1b01d2382ffd5cda83cbdd1c8efb3ca6" + integrity sha512-FeCnkPCTHQJFbiGG49KjV5YGW/8b9rrXAM2Mz2kiIoktq2qsJxRD5giEMEOD2lPdgs72upzefaUvS+nc8E3UzQ== + +"@rollup/rollup-win32-x64-msvc@4.56.0": + version "4.56.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.56.0.tgz#9eec0212732a432c71bde0350bc40b673d15b2db" + integrity sha512-H8AE9Ur/t0+1VXujj90w0HrSOuv0Nq9r1vSZF2t5km20NTfosQsGGUXDaKdQZzwuLts7IyL1fYT4hM95TI9c4g== + +"@swc/helpers@^0.5.0": + version "0.5.18" + resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.18.tgz#feeeabea0d10106ee25aaf900165df911ab6d3b1" + integrity sha512-TXTnIcNJQEKwThMMqBXsZ4VGAza6bvN4pa41Rkqoio6QBKMvo+5lexeTMScGCIxtzgQJzElcvIltani+adC5PQ== + dependencies: + tslib "^2.8.0" + +"@tailwindcss/forms@^0.5.7": + version "0.5.11" + resolved "https://registry.yarnpkg.com/@tailwindcss/forms/-/forms-0.5.11.tgz#e77039e96fa7b87c3d001a991f77f9418e666700" + integrity sha512-h9wegbZDPurxG22xZSoWtdzc41/OlNEUQERNqI/0fOwa2aVlWGu7C35E/x6LDyD3lgtztFSSjKZyuVM0hxhbgA== + dependencies: + mini-svg-data-uri "^1.2.3" + +"@tanstack/react-virtual@3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@tanstack/react-virtual/-/react-virtual-3.2.0.tgz#fb70f9c6baee753a5a0f7618ac886205d5a02af9" + integrity sha512-OEdMByf2hEfDa6XDbGlZN8qO6bTjlNKqjM3im9JG+u3mCL8jALy0T/67oDI001raUUPh1Bdmfn4ZvPOV5knpcg== + dependencies: + "@tanstack/virtual-core" "3.2.0" + +"@tanstack/virtual-core@3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@tanstack/virtual-core/-/virtual-core-3.2.0.tgz#874d36135e4badce2719e7bdc556ce240cbaff14" + integrity sha512-P5XgYoAw/vfW65byBbJQCw+cagdXDT/qH6wmABiLt4v4YBT2q2vqCOhihe+D1Nt325F/S/0Tkv6C5z0Lv+VBQQ== + +"@types/babel__core@^7.20.5": + version "7.20.5" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" + integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== + dependencies: + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + +"@types/babel__generator@*": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.27.0.tgz#b5819294c51179957afaec341442f9341e4108a9" + integrity sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg== + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__template@*": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.4.tgz#5672513701c1b2199bc6dad636a9d7491586766f" + integrity sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@*": + version "7.28.0" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.28.0.tgz#07d713d6cce0d265c9849db0cbe62d3f61f36f74" + integrity sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q== + dependencies: + "@babel/types" "^7.28.2" + +"@types/estree@1.0.8", "@types/estree@^1.0.6": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.8.tgz#958b91c991b1867ced318bedea0e215ee050726e" + integrity sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w== + +"@types/json-schema@^7.0.15": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + +"@types/node@^20.11.30": + version "20.19.30" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.19.30.tgz#84fa87498ade5cd2b6ba8f8eec01d3b138ca60d0" + integrity sha512-WJtwWJu7UdlvzEAUm484QNg5eAoq5QR08KDNx7g45Usrs2NtOPiX8ugDqmKdXkyL03rBqU5dYNYVQetEpBHq2g== + dependencies: + undici-types "~6.21.0" + +"@types/prop-types@*", "@types/prop-types@^15.7.12": + version "15.7.15" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.15.tgz#e6e5a86d602beaca71ce5163fadf5f95d70931c7" + integrity sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw== + +"@types/react-dom@^18.3.0": + version "18.3.7" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.3.7.tgz#b89ddf2cd83b4feafcc4e2ea41afdfb95a0d194f" + integrity sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ== + +"@types/react-slider@^1.3.6": + version "1.3.6" + resolved "https://registry.yarnpkg.com/@types/react-slider/-/react-slider-1.3.6.tgz#6f5602be93ab1cb3d273428c87aa227ad2ff68ff" + integrity sha512-RS8XN5O159YQ6tu3tGZIQz1/9StMLTg/FCIPxwqh2gwVixJnlfIodtVx+fpXVMZHe7A58lAX1Q4XTgAGOQaCQg== + dependencies: + "@types/react" "*" + +"@types/react-transition-group@^4.4.10", "@types/react-transition-group@^4.4.6": + version "4.4.12" + resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.4.12.tgz#b5d76568485b02a307238270bfe96cb51ee2a044" + integrity sha512-8TV6R3h2j7a91c+1DXdJi3Syo69zzIZbz7Lg5tORM5LEJG7X/E6a1V3drRyBRZq7/utz7A+c4OgYLiLcYGHG6w== + +"@types/react@*", "@types/react@>=16.9.11": + version "19.2.9" + resolved "https://registry.yarnpkg.com/@types/react/-/react-19.2.9.tgz#84ec7669742bb3e7e2e8d6a5258d95ead7764200" + integrity sha512-Lpo8kgb/igvMIPeNV2rsYKTgaORYdO1XGVZ4Qz3akwOj0ySGYMPlQWa8BaLn0G63D1aSaAQ5ldR06wCpChQCjA== + dependencies: + csstype "^3.2.2" + +"@types/react@^18.3.3": + version "18.3.27" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.27.tgz#74a3b590ea183983dc65a474dc17553ae1415c34" + integrity sha512-cisd7gxkzjBKU2GgdYrTdtQx1SORymWyaAFhaxQPK9bYO9ot3Y5OikQRvY0VYQtvwjeQnizCINJAenh/V7MK2w== + dependencies: + "@types/prop-types" "*" + csstype "^3.2.2" + +"@types/trusted-types@^2.0.7": + version "2.0.7" + resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.7.tgz#baccb07a970b91707df3a3e8ba6896c57ead2d11" + integrity sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw== + +"@types/warning@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/warning/-/warning-3.0.3.tgz#d1884c8cc4a426d1ac117ca2611bf333834c6798" + integrity sha512-D1XC7WK8K+zZEveUPY+cf4+kgauk8N4eHr/XIHXGlGYkHLud6hK9lYfZk1ry1TNh798cZUCgb6MqGEG8DkJt6Q== + +"@typescript-eslint/eslint-plugin@7.18.0", "@typescript-eslint/eslint-plugin@^7.13.1": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz#b16d3cf3ee76bf572fdf511e79c248bdec619ea3" + integrity sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw== + dependencies: + "@eslint-community/regexpp" "^4.10.0" + "@typescript-eslint/scope-manager" "7.18.0" + "@typescript-eslint/type-utils" "7.18.0" + "@typescript-eslint/utils" "7.18.0" + "@typescript-eslint/visitor-keys" "7.18.0" + graphemer "^1.4.0" + ignore "^5.3.1" + natural-compare "^1.4.0" + ts-api-utils "^1.3.0" + +"@typescript-eslint/parser@7.18.0", "@typescript-eslint/parser@^7.13.1": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.18.0.tgz#83928d0f1b7f4afa974098c64b5ce6f9051f96a0" + integrity sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg== + dependencies: + "@typescript-eslint/scope-manager" "7.18.0" + "@typescript-eslint/types" "7.18.0" + "@typescript-eslint/typescript-estree" "7.18.0" + "@typescript-eslint/visitor-keys" "7.18.0" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@7.18.0": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz#c928e7a9fc2c0b3ed92ab3112c614d6bd9951c83" + integrity sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA== + dependencies: + "@typescript-eslint/types" "7.18.0" + "@typescript-eslint/visitor-keys" "7.18.0" + +"@typescript-eslint/type-utils@7.18.0": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz#2165ffaee00b1fbbdd2d40aa85232dab6998f53b" + integrity sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA== + dependencies: + "@typescript-eslint/typescript-estree" "7.18.0" + "@typescript-eslint/utils" "7.18.0" + debug "^4.3.4" + ts-api-utils "^1.3.0" + +"@typescript-eslint/types@7.18.0": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.18.0.tgz#b90a57ccdea71797ffffa0321e744f379ec838c9" + integrity sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ== + +"@typescript-eslint/typescript-estree@7.18.0": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz#b5868d486c51ce8f312309ba79bdb9f331b37931" + integrity sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA== + dependencies: + "@typescript-eslint/types" "7.18.0" + "@typescript-eslint/visitor-keys" "7.18.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^1.3.0" + +"@typescript-eslint/utils@7.18.0": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.18.0.tgz#bca01cde77f95fc6a8d5b0dbcbfb3d6ca4be451f" + integrity sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@typescript-eslint/scope-manager" "7.18.0" + "@typescript-eslint/types" "7.18.0" + "@typescript-eslint/typescript-estree" "7.18.0" + +"@typescript-eslint/visitor-keys@7.18.0": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz#0564629b6124d67607378d0f0332a0495b25e7d7" + integrity sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg== + dependencies: + "@typescript-eslint/types" "7.18.0" + eslint-visitor-keys "^3.4.3" + +"@vitejs/plugin-react@^4.3.1": + version "4.7.0" + resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz#647af4e7bb75ad3add578e762ad984b90f4a24b9" + integrity sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA== + dependencies: + "@babel/core" "^7.28.0" + "@babel/plugin-transform-react-jsx-self" "^7.27.1" + "@babel/plugin-transform-react-jsx-source" "^7.27.1" + "@rolldown/pluginutils" "1.0.0-beta.27" + "@types/babel__core" "^7.20.5" + react-refresh "^0.17.0" + +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn@^8.15.0: + version "8.15.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816" + integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg== + +ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + 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-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +any-promise@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== + +anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +arg@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.2.tgz#c81433cc427c92c4dcf4865142dbca6f15acd59c" + integrity sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg== + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +array-buffer-byte-length@^1.0.1, array-buffer-byte-length@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz#384d12a37295aec3769ab022ad323a18a51ccf8b" + integrity sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw== + dependencies: + call-bound "^1.0.3" + is-array-buffer "^3.0.5" + +array-includes@^3.1.6, array-includes@^3.1.8: + version "3.1.9" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.9.tgz#1f0ccaa08e90cdbc3eb433210f903ad0f17c3f3a" + integrity sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.4" + define-properties "^1.2.1" + es-abstract "^1.24.0" + es-object-atoms "^1.1.1" + get-intrinsic "^1.3.0" + is-string "^1.1.1" + math-intrinsics "^1.1.0" + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +array.prototype.findlast@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz#3e4fbcb30a15a7f5bf64cf2faae22d139c2e4904" + integrity sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-shim-unscopables "^1.0.2" + +array.prototype.flat@^1.3.1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz#534aaf9e6e8dd79fb6b9a9917f839ef1ec63afe5" + integrity sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg== + dependencies: + call-bind "^1.0.8" + define-properties "^1.2.1" + es-abstract "^1.23.5" + es-shim-unscopables "^1.0.2" + +array.prototype.flatmap@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz#712cc792ae70370ae40586264629e33aab5dd38b" + integrity sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg== + dependencies: + call-bind "^1.0.8" + define-properties "^1.2.1" + es-abstract "^1.23.5" + es-shim-unscopables "^1.0.2" + +array.prototype.tosorted@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz#fe954678ff53034e717ea3352a03f0b0b86f7ffc" + integrity sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.3" + es-errors "^1.3.0" + es-shim-unscopables "^1.0.2" + +arraybuffer.prototype.slice@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz#9d760d84dbdd06d0cbf92c8849615a1a7ab3183c" + integrity sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ== + dependencies: + array-buffer-byte-length "^1.0.1" + call-bind "^1.0.8" + define-properties "^1.2.1" + es-abstract "^1.23.5" + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + is-array-buffer "^3.0.4" + +async-function@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/async-function/-/async-function-1.0.0.tgz#509c9fca60eaf85034c6829838188e4e4c8ffb2b" + integrity sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA== + +autoprefixer@^10.4.19: + version "10.4.23" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.23.tgz#c6aa6db8e7376fcd900f9fd79d143ceebad8c4e6" + integrity sha512-YYTXSFulfwytnjAPlw8QHncHJmlvFKtczb8InXaAx9Q0LbfDnfEYDE55omerIJKihhmU61Ft+cAOSzQVaBUmeA== + dependencies: + browserslist "^4.28.1" + caniuse-lite "^1.0.30001760" + fraction.js "^5.3.4" + picocolors "^1.1.1" + postcss-value-parser "^4.2.0" + +available-typed-arrays@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" + integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== + dependencies: + possible-typed-array-names "^1.0.0" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +baseline-browser-mapping@^2.9.0: + version "2.9.18" + resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.9.18.tgz#c8281693035a9261b10d662a5379650a6c2d1ff7" + integrity sha512-e23vBV1ZLfjb9apvfPk4rHVu2ry6RIr2Wfs+O324okSidrX7pTAnEJPCh/O5BtRlr7QtZI7ktOP3vsqr7Z5XoA== + +binary-extensions@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" + integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== + +brace-expansion@^1.1.7: + version "1.1.12" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843" + integrity sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.2.tgz#54fc53237a613d854c7bd37463aad17df87214e7" + integrity sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ== + dependencies: + balanced-match "^1.0.0" + +braces@^3.0.3, braces@~3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +browserslist@^4.24.0, browserslist@^4.28.1: + version "4.28.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.28.1.tgz#7f534594628c53c63101079e27e40de490456a95" + integrity sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA== + dependencies: + baseline-browser-mapping "^2.9.0" + caniuse-lite "^1.0.30001759" + electron-to-chromium "^1.5.263" + node-releases "^2.0.27" + update-browserslist-db "^1.2.0" + +call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6" + integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + +call-bind@^1.0.7, call-bind@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.8.tgz#0736a9660f537e3388826f440d5ec45f744eaa4c" + integrity sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww== + dependencies: + call-bind-apply-helpers "^1.0.0" + es-define-property "^1.0.0" + get-intrinsic "^1.2.4" + set-function-length "^1.2.2" + +call-bound@^1.0.2, call-bound@^1.0.3, call-bound@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.4.tgz#238de935d2a2a692928c538c7ccfa91067fd062a" + integrity sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg== + dependencies: + call-bind-apply-helpers "^1.0.2" + get-intrinsic "^1.3.0" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camelcase-css@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/camelcase-css/-/camelcase-css-2.0.1.tgz#ee978f6947914cc30c6b44741b6ed1df7f043fd5" + integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA== + +caniuse-lite@^1.0.30001759, caniuse-lite@^1.0.30001760: + version "1.0.30001766" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001766.tgz#b6f6b55cb25a2d888d9393104d14751c6a7d6f7a" + integrity sha512-4C0lfJ0/YPjJQHagaE9x2Elb69CIqEPZeG0anQt9SIvIoOH4a4uaRl73IavyO+0qZh6MDLH//DrXThEYKHkmYA== + +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chokidar@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +chokidar@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-4.0.3.tgz#7be37a4c03c9aee1ecfe862a4a23b2c70c205d30" + integrity sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA== + dependencies: + readdirp "^4.0.1" + +classnames@^2.3.2: + version "2.5.1" + resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.5.1.tgz#ba774c614be0f016da105c858e7159eae8e7687b" + integrity sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow== + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +commander@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" + integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +convert-source-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== + +cross-spawn@^7.0.6: + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== + +csstype@^3.0.2, csstype@^3.2.2: + version "3.2.3" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.2.3.tgz#ec48c0f3e993e50648c86da559e2610995cf989a" + integrity sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ== + +data-view-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.2.tgz#211a03ba95ecaf7798a8c7198d79536211f88570" + integrity sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ== + dependencies: + call-bound "^1.0.3" + es-errors "^1.3.0" + is-data-view "^1.0.2" + +data-view-byte-length@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz#9e80f7ca52453ce3e93d25a35318767ea7704735" + integrity sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ== + dependencies: + call-bound "^1.0.3" + es-errors "^1.3.0" + is-data-view "^1.0.2" + +data-view-byte-offset@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz#068307f9b71ab76dbbe10291389e020856606191" + integrity sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +debug@^2.6.6: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: + version "4.4.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== + dependencies: + ms "^2.1.3" + +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +define-data-property@^1.0.1, define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + +define-properties@^1.1.3, define-properties@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" + integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== + dependencies: + define-data-property "^1.0.1" + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + +dequal@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be" + integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA== + +detect-libc@^2.0.3: + version "2.1.2" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.1.2.tgz#689c5dcdc1900ef5583a4cb9f6d7b473742074ad" + integrity sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ== + +didyoumean@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037" + integrity sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw== + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +dlv@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79" + integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== + +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + +dom-helpers@^5.0.1, dom-helpers@^5.2.0, dom-helpers@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-5.2.1.tgz#d9400536b2bf8225ad98fe052e029451ac40e902" + integrity sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA== + dependencies: + "@babel/runtime" "^7.8.7" + csstype "^3.0.2" + +dompurify@^3.1.5: + version "3.3.1" + resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.3.1.tgz#c7e1ddebfe3301eacd6c0c12a4af284936dbbb86" + integrity sha512-qkdCKzLNtrgPFP1Vo+98FRzJnBRGe4ffyCea9IwHB1fyxPOeNTHpLKYGd4Uk9xvNoH0ZoOjwZxNptyMwqrId1Q== + optionalDependencies: + "@types/trusted-types" "^2.0.7" + +dunder-proto@^1.0.0, dunder-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== + dependencies: + call-bind-apply-helpers "^1.0.1" + es-errors "^1.3.0" + gopd "^1.2.0" + +electron-to-chromium@^1.5.263: + version "1.5.279" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.279.tgz#67dfdeb22fd81412d0d18d1d9b2c749e9b8945cb" + integrity sha512-0bblUU5UNdOt5G7XqGiJtpZMONma6WAfq9vsFmtn9x1+joAObr6x1chfqyxFSDCAFwFhCQDrqeAr6MYdpwJ9Hg== + +es-abstract@^1.17.5, es-abstract@^1.23.2, es-abstract@^1.23.3, es-abstract@^1.23.5, es-abstract@^1.23.6, es-abstract@^1.23.9, es-abstract@^1.24.0, es-abstract@^1.24.1: + version "1.24.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.24.1.tgz#f0c131ed5ea1bb2411134a8dd94def09c46c7899" + integrity sha512-zHXBLhP+QehSSbsS9Pt23Gg964240DPd6QCf8WpkqEXxQ7fhdZzYsocOr5u7apWonsS5EjZDmTF+/slGMyasvw== + dependencies: + array-buffer-byte-length "^1.0.2" + arraybuffer.prototype.slice "^1.0.4" + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + call-bound "^1.0.4" + data-view-buffer "^1.0.2" + data-view-byte-length "^1.0.2" + data-view-byte-offset "^1.0.1" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.1.1" + es-set-tostringtag "^2.1.0" + es-to-primitive "^1.3.0" + function.prototype.name "^1.1.8" + get-intrinsic "^1.3.0" + get-proto "^1.0.1" + get-symbol-description "^1.1.0" + globalthis "^1.0.4" + gopd "^1.2.0" + has-property-descriptors "^1.0.2" + has-proto "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + internal-slot "^1.1.0" + is-array-buffer "^3.0.5" + is-callable "^1.2.7" + is-data-view "^1.0.2" + is-negative-zero "^2.0.3" + is-regex "^1.2.1" + is-set "^2.0.3" + is-shared-array-buffer "^1.0.4" + is-string "^1.1.1" + is-typed-array "^1.1.15" + is-weakref "^1.1.1" + math-intrinsics "^1.1.0" + object-inspect "^1.13.4" + object-keys "^1.1.1" + object.assign "^4.1.7" + own-keys "^1.0.1" + regexp.prototype.flags "^1.5.4" + safe-array-concat "^1.1.3" + safe-push-apply "^1.0.0" + safe-regex-test "^1.1.0" + set-proto "^1.0.0" + stop-iteration-iterator "^1.1.0" + string.prototype.trim "^1.2.10" + string.prototype.trimend "^1.0.9" + string.prototype.trimstart "^1.0.8" + typed-array-buffer "^1.0.3" + typed-array-byte-length "^1.0.3" + typed-array-byte-offset "^1.0.4" + typed-array-length "^1.0.7" + unbox-primitive "^1.1.0" + which-typed-array "^1.1.19" + +es-define-property@^1.0.0, es-define-property@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +es-iterator-helpers@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.2.2.tgz#d979a9f686e2b0b72f88dbead7229924544720bc" + integrity sha512-BrUQ0cPTB/IwXj23HtwHjS9n7O4h9FX94b4xc5zlTHxeLgTAdzYUDyy6KdExAl9lbN5rtfe44xpjpmj9grxs5w== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.4" + define-properties "^1.2.1" + es-abstract "^1.24.1" + es-errors "^1.3.0" + es-set-tostringtag "^2.1.0" + function-bind "^1.1.2" + get-intrinsic "^1.3.0" + globalthis "^1.0.4" + gopd "^1.2.0" + has-property-descriptors "^1.0.2" + has-proto "^1.2.0" + has-symbols "^1.1.0" + internal-slot "^1.1.0" + iterator.prototype "^1.1.5" + safe-array-concat "^1.1.3" + +es-object-atoms@^1.0.0, es-object-atoms@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1" + integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== + dependencies: + es-errors "^1.3.0" + +es-set-tostringtag@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz#f31dbbe0c183b00a6d26eb6325c810c0fd18bd4d" + integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA== + dependencies: + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + has-tostringtag "^1.0.2" + hasown "^2.0.2" + +es-shim-unscopables@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz#438df35520dac5d105f3943d927549ea3b00f4b5" + integrity sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw== + dependencies: + hasown "^2.0.2" + +es-to-primitive@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.3.0.tgz#96c89c82cc49fd8794a24835ba3e1ff87f214e18" + integrity sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g== + dependencies: + is-callable "^1.2.7" + is-date-object "^1.0.5" + is-symbol "^1.0.4" + +esbuild@^0.21.3: + version "0.21.5" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.21.5.tgz#9ca301b120922959b766360d8ac830da0d02997d" + integrity sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw== + optionalDependencies: + "@esbuild/aix-ppc64" "0.21.5" + "@esbuild/android-arm" "0.21.5" + "@esbuild/android-arm64" "0.21.5" + "@esbuild/android-x64" "0.21.5" + "@esbuild/darwin-arm64" "0.21.5" + "@esbuild/darwin-x64" "0.21.5" + "@esbuild/freebsd-arm64" "0.21.5" + "@esbuild/freebsd-x64" "0.21.5" + "@esbuild/linux-arm" "0.21.5" + "@esbuild/linux-arm64" "0.21.5" + "@esbuild/linux-ia32" "0.21.5" + "@esbuild/linux-loong64" "0.21.5" + "@esbuild/linux-mips64el" "0.21.5" + "@esbuild/linux-ppc64" "0.21.5" + "@esbuild/linux-riscv64" "0.21.5" + "@esbuild/linux-s390x" "0.21.5" + "@esbuild/linux-x64" "0.21.5" + "@esbuild/netbsd-x64" "0.21.5" + "@esbuild/openbsd-x64" "0.21.5" + "@esbuild/sunos-x64" "0.21.5" + "@esbuild/win32-arm64" "0.21.5" + "@esbuild/win32-ia32" "0.21.5" + "@esbuild/win32-x64" "0.21.5" + +escalade@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-plugin-react-hooks@^5.1.0-rc-1434af3d22-20240618: + version "5.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.2.0.tgz#1be0080901e6ac31ce7971beed3d3ec0a423d9e3" + integrity sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg== + +eslint-plugin-react@^7.34.2: + version "7.37.5" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz#2975511472bdda1b272b34d779335c9b0e877065" + integrity sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA== + dependencies: + array-includes "^3.1.8" + array.prototype.findlast "^1.2.5" + array.prototype.flatmap "^1.3.3" + array.prototype.tosorted "^1.1.4" + doctrine "^2.1.0" + es-iterator-helpers "^1.2.1" + estraverse "^5.3.0" + hasown "^2.0.2" + jsx-ast-utils "^2.4.1 || ^3.0.0" + minimatch "^3.1.2" + object.entries "^1.1.9" + object.fromentries "^2.0.8" + object.values "^1.2.1" + prop-types "^15.8.1" + resolve "^2.0.0-next.5" + semver "^6.3.1" + string.prototype.matchall "^4.0.12" + string.prototype.repeat "^1.0.0" + +eslint-scope@^8.4.0: + version "8.4.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.4.0.tgz#88e646a207fad61436ffa39eb505147200655c82" + integrity sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint-visitor-keys@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz#4cfea60fe7dd0ad8e816e1ed026c1d5251b512c1" + integrity sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ== + +eslint@^9.5.0: + version "9.39.2" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.39.2.tgz#cb60e6d16ab234c0f8369a3fe7cc87967faf4b6c" + integrity sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw== + dependencies: + "@eslint-community/eslint-utils" "^4.8.0" + "@eslint-community/regexpp" "^4.12.1" + "@eslint/config-array" "^0.21.1" + "@eslint/config-helpers" "^0.4.2" + "@eslint/core" "^0.17.0" + "@eslint/eslintrc" "^3.3.1" + "@eslint/js" "9.39.2" + "@eslint/plugin-kit" "^0.4.1" + "@humanfs/node" "^0.16.6" + "@humanwhocodes/module-importer" "^1.0.1" + "@humanwhocodes/retry" "^0.4.2" + "@types/estree" "^1.0.6" + ajv "^6.12.4" + chalk "^4.0.0" + cross-spawn "^7.0.6" + debug "^4.3.2" + escape-string-regexp "^4.0.0" + eslint-scope "^8.4.0" + eslint-visitor-keys "^4.2.1" + espree "^10.4.0" + esquery "^1.5.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^8.0.0" + find-up "^5.0.0" + glob-parent "^6.0.2" + ignore "^5.2.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + json-stable-stringify-without-jsonify "^1.0.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.3" + +espree@^10.0.1, espree@^10.4.0: + version "10.4.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.4.0.tgz#d54f4949d4629005a1fa168d937c3ff1f7e2a837" + integrity sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ== + dependencies: + acorn "^8.15.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^4.2.1" + +esquery@^1.5.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.7.0.tgz#08d048f261f0ddedb5bae95f46809463d9c9496d" + integrity sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +fast-deep-equal@3.1.3, fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-glob@^3.2.9, fast-glob@^3.3.2: + version "3.3.3" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818" + integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.8" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + +fastq@^1.6.0: + version "1.20.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.20.1.tgz#ca750a10dc925bc8b18839fd203e3ef4b3ced675" + integrity sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw== + dependencies: + reusify "^1.0.4" + +fdir@^6.5.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/fdir/-/fdir-6.5.0.tgz#ed2ab967a331ade62f18d077dae192684d50d350" + integrity sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg== + +file-entry-cache@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" + integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== + dependencies: + flat-cache "^4.0.0" + +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +flat-cache@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" + integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== + dependencies: + flatted "^3.2.9" + keyv "^4.5.4" + +flatted@^3.2.9: + version "3.3.3" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.3.tgz#67c8fad95454a7c7abebf74bb78ee74a44023358" + integrity sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg== + +for-each@^0.3.3, for-each@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.5.tgz#d650688027826920feeb0af747ee7b9421a41d47" + integrity sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg== + dependencies: + is-callable "^1.2.7" + +fraction.js@^5.3.4: + version "5.3.4" + resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-5.3.4.tgz#8c0fcc6a9908262df4ed197427bdeef563e0699a" + integrity sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ== + +framer-motion@^11.2.12: + version "11.18.2" + resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-11.18.2.tgz#0c6bd05677f4cfd3b3bdead4eb5ecdd5ed245718" + integrity sha512-5F5Och7wrvtLVElIpclDT0CBzMVg3dL22B64aZwHtsIY8RB4mXICLrkajK4G9R+ieSAGcgrLeae2SeUTg2pr6w== + dependencies: + motion-dom "^11.18.1" + motion-utils "^11.18.1" + tslib "^2.4.0" + +fsevents@~2.3.2, fsevents@~2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + +function.prototype.name@^1.1.6, function.prototype.name@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.8.tgz#e68e1df7b259a5c949eeef95cdbde53edffabb78" + integrity sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + define-properties "^1.2.1" + functions-have-names "^1.2.3" + hasown "^2.0.2" + is-callable "^1.2.7" + +functions-have-names@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + +generator-function@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/generator-function/-/generator-function-2.0.1.tgz#0e75dd410d1243687a0ba2e951b94eedb8f737a2" + integrity sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g== + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +get-intrinsic@^1.2.4, get-intrinsic@^1.2.5, get-intrinsic@^1.2.6, get-intrinsic@^1.2.7, get-intrinsic@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01" + integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== + dependencies: + call-bind-apply-helpers "^1.0.2" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.1.1" + function-bind "^1.1.2" + get-proto "^1.0.1" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + math-intrinsics "^1.1.0" + +get-proto@^1.0.0, get-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" + integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== + dependencies: + dunder-proto "^1.0.1" + es-object-atoms "^1.0.0" + +get-symbol-description@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.1.0.tgz#7bdd54e0befe8ffc9f3b4e203220d9f1e881b6ee" + integrity sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg== + dependencies: + call-bound "^1.0.3" + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + +glob-parent@^5.1.2, glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + +globals@^14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" + integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== + +globalthis@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.4.tgz#7430ed3a975d97bfb59bcce41f5cabbafa651236" + integrity sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ== + dependencies: + define-properties "^1.2.1" + gopd "^1.0.1" + +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + +globrex@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/globrex/-/globrex-0.1.2.tgz#dd5d9ec826232730cd6793a5e33a9302985e6098" + integrity sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg== + +gopd@^1.0.1, gopd@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== + +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + +has-bigints@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.1.0.tgz#28607e965ac967e03cd2a2c70a2636a1edad49fe" + integrity sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + +has-proto@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.2.0.tgz#5de5a6eabd95fdffd9818b43055e8065e39fe9d5" + integrity sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ== + dependencies: + dunder-proto "^1.0.0" + +has-symbols@^1.0.3, has-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== + +has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== + dependencies: + has-symbols "^1.0.3" + +hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + +ignore@^5.2.0, ignore@^5.3.1: + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== + +immutable@^5.0.2: + version "5.1.4" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-5.1.4.tgz#e3f8c1fe7b567d56cf26698f31918c241dae8c1f" + integrity sha512-p6u1bG3YSnINT5RQmx/yRZBpenIl30kVxkTLDyHLIMk0gict704Q9n+thfDI7lTRm9vXdDYutVzXhzcThxTnXA== + +import-fresh@^3.2.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.1.tgz#9cecb56503c0ada1f2741dbbd6546e4b13b57ccf" + integrity sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +internal-slot@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.1.0.tgz#1eac91762947d2f7056bc838d93e13b2e9604961" + integrity sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw== + dependencies: + es-errors "^1.3.0" + hasown "^2.0.2" + side-channel "^1.1.0" + +invariant@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" + +is-array-buffer@^3.0.4, is-array-buffer@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.5.tgz#65742e1e687bd2cc666253068fd8707fe4d44280" + integrity sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + get-intrinsic "^1.2.6" + +is-async-function@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-async-function/-/is-async-function-2.1.1.tgz#3e69018c8e04e73b738793d020bfe884b9fd3523" + integrity sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ== + dependencies: + async-function "^1.0.0" + call-bound "^1.0.3" + get-proto "^1.0.1" + has-tostringtag "^1.0.2" + safe-regex-test "^1.1.0" + +is-bigint@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.1.0.tgz#dda7a3445df57a42583db4228682eba7c4170672" + integrity sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ== + dependencies: + has-bigints "^1.0.2" + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-boolean-object@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.2.2.tgz#7067f47709809a393c71ff5bb3e135d8a9215d9e" + integrity sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A== + dependencies: + call-bound "^1.0.3" + has-tostringtag "^1.0.2" + +is-callable@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" + integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== + +is-core-module@^2.13.0, is-core-module@^2.16.1: + version "2.16.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4" + integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w== + dependencies: + hasown "^2.0.2" + +is-data-view@^1.0.1, is-data-view@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.2.tgz#bae0a41b9688986c2188dda6657e56b8f9e63b8e" + integrity sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw== + dependencies: + call-bound "^1.0.2" + get-intrinsic "^1.2.6" + is-typed-array "^1.1.13" + +is-date-object@^1.0.5, is-date-object@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.1.0.tgz#ad85541996fc7aa8b2729701d27b7319f95d82f7" + integrity sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg== + dependencies: + call-bound "^1.0.2" + has-tostringtag "^1.0.2" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-finalizationregistry@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz#eefdcdc6c94ddd0674d9c85887bf93f944a97c90" + integrity sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg== + dependencies: + call-bound "^1.0.3" + +is-generator-function@^1.0.10: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.1.2.tgz#ae3b61e3d5ea4e4839b90bad22b02335051a17d5" + integrity sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA== + dependencies: + call-bound "^1.0.4" + generator-function "^2.0.0" + get-proto "^1.0.1" + has-tostringtag "^1.0.2" + safe-regex-test "^1.1.0" + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-map@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.3.tgz#ede96b7fe1e270b3c4465e3a465658764926d62e" + integrity sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw== + +is-negative-zero@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" + integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== + +is-number-object@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.1.1.tgz#144b21e95a1bc148205dcc2814a9134ec41b2541" + integrity sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw== + dependencies: + call-bound "^1.0.3" + has-tostringtag "^1.0.2" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-regex@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.2.1.tgz#76d70a3ed10ef9be48eb577887d74205bf0cad22" + integrity sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g== + dependencies: + call-bound "^1.0.2" + gopd "^1.2.0" + has-tostringtag "^1.0.2" + hasown "^2.0.2" + +is-set@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.3.tgz#8ab209ea424608141372ded6e0cb200ef1d9d01d" + integrity sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg== + +is-shared-array-buffer@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz#9b67844bd9b7f246ba0708c3a93e34269c774f6f" + integrity sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A== + dependencies: + call-bound "^1.0.3" + +is-string@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.1.1.tgz#92ea3f3d5c5b6e039ca8677e5ac8d07ea773cbb9" + integrity sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA== + dependencies: + call-bound "^1.0.3" + has-tostringtag "^1.0.2" + +is-symbol@^1.0.4, is-symbol@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.1.1.tgz#f47761279f532e2b05a7024a7506dbbedacd0634" + integrity sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w== + dependencies: + call-bound "^1.0.2" + has-symbols "^1.1.0" + safe-regex-test "^1.1.0" + +is-typed-array@^1.1.13, is-typed-array@^1.1.14, is-typed-array@^1.1.15: + version "1.1.15" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.15.tgz#4bfb4a45b61cee83a5a46fba778e4e8d59c0ce0b" + integrity sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ== + dependencies: + which-typed-array "^1.1.16" + +is-weakmap@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.2.tgz#bf72615d649dfe5f699079c54b83e47d1ae19cfd" + integrity sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w== + +is-weakref@^1.0.2, is-weakref@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.1.1.tgz#eea430182be8d64174bd96bffbc46f21bf3f9293" + integrity sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew== + dependencies: + call-bound "^1.0.3" + +is-weakset@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.4.tgz#c9f5deb0bc1906c6d6f1027f284ddf459249daca" + integrity sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ== + dependencies: + call-bound "^1.0.3" + get-intrinsic "^1.2.6" + +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +iterator.prototype@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/iterator.prototype/-/iterator.prototype-1.1.5.tgz#12c959a29de32de0aa3bbbb801f4d777066dae39" + integrity sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g== + dependencies: + define-data-property "^1.1.4" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.6" + get-proto "^1.0.0" + has-symbols "^1.1.0" + set-function-name "^2.0.2" + +jiti@^1.21.7: + version "1.21.7" + resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.7.tgz#9dd81043424a3d28458b193d965f0d18a2300ba9" + integrity sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A== + +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.1.tgz#854c292467705b699476e1a2decc0c8a3458806b" + integrity sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA== + dependencies: + argparse "^2.0.1" + +jsesc@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" + integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== + +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + +json5@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + +"jsx-ast-utils@^2.4.1 || ^3.0.0": + version "3.3.5" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz#4766bd05a8e2a11af222becd19e15575e52a853a" + integrity sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ== + dependencies: + array-includes "^3.1.6" + array.prototype.flat "^1.3.1" + object.assign "^4.1.4" + object.values "^1.1.6" + +keyv@^4.5.4: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +lilconfig@^3.1.1, lilconfig@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.3.tgz#a1bcfd6257f9585bf5ae14ceeebb7b559025e4c4" + integrity sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw== + +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + +load-script@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/load-script/-/load-script-1.0.0.tgz#0491939e0bee5643ee494a7e3da3d2bac70c6ca4" + integrity sha512-kPEjMFtZvwL9TaZo0uZ2ml+Ye9HUMmPwbYRJ324qF9tqMejwykJ5ggTyvzmrbBeapCAbk98BSbTeovHEEP1uCA== + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +math-intrinsics@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== + dependencies: + braces "^3.0.3" + picomatch "^2.3.1" + +mini-svg-data-uri@^1.2.3: + version "1.4.4" + resolved "https://registry.yarnpkg.com/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz#8ab0aabcdf8c29ad5693ca595af19dd2ead09939" + integrity sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg== + +minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^9.0.4: + version "9.0.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== + dependencies: + brace-expansion "^2.0.1" + +motion-dom@^11.18.1: + version "11.18.1" + resolved "https://registry.yarnpkg.com/motion-dom/-/motion-dom-11.18.1.tgz#e7fed7b7dc6ae1223ef1cce29ee54bec826dc3f2" + integrity sha512-g76KvA001z+atjfxczdRtw/RXOM3OMSdd1f4DL77qCTF/+avrRJiawSG4yDibEQ215sr9kpinSlX2pCTJ9zbhw== + dependencies: + motion-utils "^11.18.1" + +motion-utils@^11.18.1: + version "11.18.1" + resolved "https://registry.yarnpkg.com/motion-utils/-/motion-utils-11.18.1.tgz#671227669833e991c55813cf337899f41327db5b" + integrity sha512-49Kt+HKjtbJKLtgO/LKj9Ld+6vw9BjH5d9sc40R/kVyH8GLAXgT42M2NnuPcJNuA3s9ZfZBUcwIgpmZWGEE+hA== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +ms@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +mz@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" + integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== + dependencies: + any-promise "^1.0.0" + object-assign "^4.0.1" + thenify-all "^1.0.0" + +nanoid@^3.3.11: + version "3.3.11" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.11.tgz#4f4f112cefbe303202f2199838128936266d185b" + integrity sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + +node-addon-api@^7.0.0: + version "7.1.1" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-7.1.1.tgz#1aba6693b0f255258a049d621329329322aad558" + integrity sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ== + +node-releases@^2.0.27: + version "2.0.27" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.27.tgz#eedca519205cf20f650f61d56b070db111231e4e" + integrity sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA== + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +object-assign@^4.0.1, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== + +object-hash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" + integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== + +object-inspect@^1.13.3, object-inspect@^1.13.4: + version "1.13.4" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.4.tgz#8375265e21bc20d0fa582c22e1b13485d6e00213" + integrity sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew== + +object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object.assign@^4.1.4, object.assign@^4.1.7: + version "4.1.7" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.7.tgz#8c14ca1a424c6a561b0bb2a22f66f5049a945d3d" + integrity sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + has-symbols "^1.1.0" + object-keys "^1.1.1" + +object.entries@^1.1.9: + version "1.1.9" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.9.tgz#e4770a6a1444afb61bd39f984018b5bede25f8b3" + integrity sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.4" + define-properties "^1.2.1" + es-object-atoms "^1.1.1" + +object.fromentries@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65" + integrity sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" + +object.values@^1.1.6, object.values@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.1.tgz#deed520a50809ff7f75a7cfd4bc64c7a038c6216" + integrity sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + +optionator@^0.9.3: + version "0.9.4" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" + integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== + dependencies: + 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.5" + +own-keys@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/own-keys/-/own-keys-1.0.1.tgz#e4006910a2bf913585289676eebd6f390cf51358" + integrity sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg== + dependencies: + get-intrinsic "^1.2.6" + object-keys "^1.1.1" + safe-push-apply "^1.0.0" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +picocolors@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== + +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +picomatch@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.3.tgz#796c76136d1eead715db1e7bad785dedd695a042" + integrity sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q== + +pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== + +pirates@^4.0.1: + version "4.0.7" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.7.tgz#643b4a18c4257c8a65104b73f3049ce9a0a15e22" + integrity sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA== + +possible-typed-array-names@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz#93e3582bc0e5426586d9d07b79ee40fc841de4ae" + integrity sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg== + +postcss-import@^15.1.0: + version "15.1.0" + resolved "https://registry.yarnpkg.com/postcss-import/-/postcss-import-15.1.0.tgz#41c64ed8cc0e23735a9698b3249ffdbf704adc70" + integrity sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew== + dependencies: + postcss-value-parser "^4.0.0" + read-cache "^1.0.0" + resolve "^1.1.7" + +postcss-js@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-4.1.0.tgz#003b63c6edde948766e40f3daf7e997ae43a5ce6" + integrity sha512-oIAOTqgIo7q2EOwbhb8UalYePMvYoIeRY2YKntdpFQXNosSu3vLrniGgmH9OKs/qAkfoj5oB3le/7mINW1LCfw== + dependencies: + camelcase-css "^2.0.1" + +"postcss-load-config@^4.0.2 || ^5.0 || ^6.0": + version "6.0.1" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-6.0.1.tgz#6fd7dcd8ae89badcf1b2d644489cbabf83aa8096" + integrity sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g== + dependencies: + lilconfig "^3.1.1" + +postcss-nested@^6.0.1, postcss-nested@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-6.2.0.tgz#4c2d22ab5f20b9cb61e2c5c5915950784d068131" + integrity sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ== + dependencies: + postcss-selector-parser "^6.1.1" + +postcss-selector-parser@^6.1.1, postcss-selector-parser@^6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz#27ecb41fb0e3b6ba7a1ec84fff347f734c7929de" + integrity sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg== + dependencies: + cssesc "^3.0.0" + util-deprecate "^1.0.2" + +postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" + integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== + +postcss@^8.4.38, postcss@^8.4.43, postcss@^8.4.47: + version "8.5.6" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.5.6.tgz#2825006615a619b4f62a9e7426cc120b349a8f3c" + integrity sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg== + dependencies: + nanoid "^3.3.11" + picocolors "^1.1.1" + source-map-js "^1.2.1" + +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +prop-types-extra@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/prop-types-extra/-/prop-types-extra-1.1.1.tgz#58c3b74cbfbb95d304625975aa2f0848329a010b" + integrity sha512-59+AHNnHYCdiC+vMwY52WmvP5dM3QLeoumYuEyceQDi9aEhtwN9zIQ2ZNo25sMyXnbh32h+P1ezDsUpUH3JAew== + dependencies: + react-is "^16.3.2" + warning "^4.0.0" + +prop-types@15.7.2: + version "15.7.2" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" + integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.8.1" + +prop-types@^15.6.2, prop-types@^15.8.1: + version "15.8.1" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" + integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.13.1" + +punycode@^2.1.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +react-bootstrap@^2.10.9: + version "2.10.10" + resolved "https://registry.yarnpkg.com/react-bootstrap/-/react-bootstrap-2.10.10.tgz#be0b0d951a69987152d75c0e6986c80425efdf21" + integrity sha512-gMckKUqn8aK/vCnfwoBpBVFUGT9SVQxwsYrp9yDHt0arXMamxALerliKBxr1TPbntirK/HGrUAHYbAeQTa9GHQ== + dependencies: + "@babel/runtime" "^7.24.7" + "@restart/hooks" "^0.4.9" + "@restart/ui" "^1.9.4" + "@types/prop-types" "^15.7.12" + "@types/react-transition-group" "^4.4.6" + classnames "^2.3.2" + dom-helpers "^5.2.1" + invariant "^2.2.4" + prop-types "^15.8.1" + prop-types-extra "^1.1.0" + react-transition-group "^4.4.5" + uncontrollable "^7.2.1" + warning "^4.0.3" + +react-dom@^18.3.1: + version "18.3.1" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.3.1.tgz#c2265d79511b57d479b3dd3fdfa51536494c5cb4" + integrity sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw== + dependencies: + loose-envify "^1.1.0" + scheduler "^0.23.2" + +react-icons@^5.2.1: + version "5.5.0" + resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-5.5.0.tgz#8aa25d3543ff84231685d3331164c00299cdfaf2" + integrity sha512-MEFcXdkP3dLo8uumGI5xN3lDFNsRtrjbOEKDLD7yv76v4wpnEq2Lt2qeHaQOr34I/wPN3s3+N08WkQ+CW37Xiw== + +react-is@^16.13.1, react-is@^16.3.2, react-is@^16.8.1: + version "16.13.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== + +react-lifecycles-compat@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" + integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== + +react-refresh@^0.17.0: + version "0.17.0" + resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.17.0.tgz#b7e579c3657f23d04eccbe4ad2e58a8ed51e7e53" + integrity sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ== + +react-slider@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/react-slider/-/react-slider-2.0.6.tgz#8c7ff0301211f7c3ff32aa0163b33bdab6258559" + integrity sha512-gJxG1HwmuMTJ+oWIRCmVWvgwotNCbByTwRkFZC6U4MBsHqJBmxwbYRJUmxy4Tke1ef8r9jfXjgkmY/uHOCEvbA== + dependencies: + prop-types "^15.8.1" + +react-tiny-popover@^8.0.4: + version "8.1.6" + resolved "https://registry.yarnpkg.com/react-tiny-popover/-/react-tiny-popover-8.1.6.tgz#82fad10eb8f0d8197ce0944031fd03a524b78c29" + integrity sha512-jeZnGqHxb5TX7pCzpqLoVJned7DTVnLrLoCQQGFTyvlxXB/QUaet7O0krG22t5FReMBH035SLnzThKvk8tIfsg== + +react-transition-group@^4.4.5: + version "4.4.5" + resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.5.tgz#e53d4e3f3344da8521489fbef8f2581d42becdd1" + integrity sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g== + dependencies: + "@babel/runtime" "^7.5.5" + dom-helpers "^5.0.1" + loose-envify "^1.4.0" + prop-types "^15.6.2" + +react-youtube@^7.13.1: + version "7.14.0" + resolved "https://registry.yarnpkg.com/react-youtube/-/react-youtube-7.14.0.tgz#0505d86491521ca94ef0afb74af3f7936dc7bc86" + integrity sha512-SUHZ4F4pd1EHmQu0CV0KSQvAs5KHOT5cfYaq4WLCcDbU8fBo1ouTXaAOIASWbrz8fHwg+G1evfoSIYpV2AwSAg== + dependencies: + fast-deep-equal "3.1.3" + prop-types "15.7.2" + youtube-player "5.5.2" + +react@^18.3.1: + version "18.3.1" + resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891" + integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ== + dependencies: + loose-envify "^1.1.0" + +read-cache@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774" + integrity sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA== + dependencies: + pify "^2.3.0" + +readdirp@^4.0.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-4.1.2.tgz#eb85801435fbf2a7ee58f19e0921b068fc69948d" + integrity sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg== + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +reflect.getprototypeof@^1.0.6, reflect.getprototypeof@^1.0.9: + version "1.0.10" + resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz#c629219e78a3316d8b604c765ef68996964e7bf9" + integrity sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw== + dependencies: + call-bind "^1.0.8" + define-properties "^1.2.1" + es-abstract "^1.23.9" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.7" + get-proto "^1.0.1" + which-builtin-type "^1.2.1" + +regexp.prototype.flags@^1.5.3, regexp.prototype.flags@^1.5.4: + version "1.5.4" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz#1ad6c62d44a259007e55b3970e00f746efbcaa19" + integrity sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA== + dependencies: + call-bind "^1.0.8" + define-properties "^1.2.1" + es-errors "^1.3.0" + get-proto "^1.0.1" + gopd "^1.2.0" + set-function-name "^2.0.2" + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve@^1.1.7, resolve@^1.22.8: + version "1.22.11" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.11.tgz#aad857ce1ffb8bfa9b0b1ac29f1156383f68c262" + integrity sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ== + dependencies: + is-core-module "^2.16.1" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +resolve@^2.0.0-next.5: + version "2.0.0-next.5" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.5.tgz#6b0ec3107e671e52b68cd068ef327173b90dc03c" + integrity sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +reusify@^1.0.4: + version "1.1.0" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.1.0.tgz#0fe13b9522e1473f51b558ee796e08f11f9b489f" + integrity sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw== + +rollup@^4.20.0: + version "4.56.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.56.0.tgz#65959d13cfbd7e48b8868c05165b1738f0143862" + integrity sha512-9FwVqlgUHzbXtDg9RCMgodF3Ua4Na6Gau+Sdt9vyCN4RhHfVKX2DCHy3BjMLTDd47ITDhYAnTwGulWTblJSDLg== + dependencies: + "@types/estree" "1.0.8" + optionalDependencies: + "@rollup/rollup-android-arm-eabi" "4.56.0" + "@rollup/rollup-android-arm64" "4.56.0" + "@rollup/rollup-darwin-arm64" "4.56.0" + "@rollup/rollup-darwin-x64" "4.56.0" + "@rollup/rollup-freebsd-arm64" "4.56.0" + "@rollup/rollup-freebsd-x64" "4.56.0" + "@rollup/rollup-linux-arm-gnueabihf" "4.56.0" + "@rollup/rollup-linux-arm-musleabihf" "4.56.0" + "@rollup/rollup-linux-arm64-gnu" "4.56.0" + "@rollup/rollup-linux-arm64-musl" "4.56.0" + "@rollup/rollup-linux-loong64-gnu" "4.56.0" + "@rollup/rollup-linux-loong64-musl" "4.56.0" + "@rollup/rollup-linux-ppc64-gnu" "4.56.0" + "@rollup/rollup-linux-ppc64-musl" "4.56.0" + "@rollup/rollup-linux-riscv64-gnu" "4.56.0" + "@rollup/rollup-linux-riscv64-musl" "4.56.0" + "@rollup/rollup-linux-s390x-gnu" "4.56.0" + "@rollup/rollup-linux-x64-gnu" "4.56.0" + "@rollup/rollup-linux-x64-musl" "4.56.0" + "@rollup/rollup-openbsd-x64" "4.56.0" + "@rollup/rollup-openharmony-arm64" "4.56.0" + "@rollup/rollup-win32-arm64-msvc" "4.56.0" + "@rollup/rollup-win32-ia32-msvc" "4.56.0" + "@rollup/rollup-win32-x64-gnu" "4.56.0" + "@rollup/rollup-win32-x64-msvc" "4.56.0" + fsevents "~2.3.2" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +safe-array-concat@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.3.tgz#c9e54ec4f603b0bbb8e7e5007a5ee7aecd1538c3" + integrity sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.2" + get-intrinsic "^1.2.6" + has-symbols "^1.1.0" + isarray "^2.0.5" + +safe-push-apply@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/safe-push-apply/-/safe-push-apply-1.0.0.tgz#01850e981c1602d398c85081f360e4e6d03d27f5" + integrity sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA== + dependencies: + es-errors "^1.3.0" + isarray "^2.0.5" + +safe-regex-test@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.1.0.tgz#7f87dfb67a3150782eaaf18583ff5d1711ac10c1" + integrity sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + is-regex "^1.2.1" + +sass@^1.77.4: + version "1.97.3" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.97.3.tgz#9cb59339514fa7e2aec592b9700953ac6e331ab2" + integrity sha512-fDz1zJpd5GycprAbu4Q2PV/RprsRtKC/0z82z0JLgdytmcq0+ujJbJ/09bPGDxCLkKY3Np5cRAOcWiVkLXJURg== + dependencies: + chokidar "^4.0.0" + immutable "^5.0.2" + source-map-js ">=0.6.2 <2.0.0" + optionalDependencies: + "@parcel/watcher" "^2.4.1" + +scheduler@^0.23.2: + version "0.23.2" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.2.tgz#414ba64a3b282892e944cf2108ecc078d115cdc3" + integrity sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ== + dependencies: + loose-envify "^1.1.0" + +semver@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^7.6.0: + version "7.7.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946" + integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q== + +set-function-length@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + +set-function-name@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985" + integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.2" + +set-proto@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/set-proto/-/set-proto-1.0.0.tgz#0760dbcff30b2d7e801fd6e19983e56da337565e" + integrity sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw== + dependencies: + dunder-proto "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +side-channel-list@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/side-channel-list/-/side-channel-list-1.0.0.tgz#10cb5984263115d3b7a0e336591e290a830af8ad" + integrity sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA== + dependencies: + es-errors "^1.3.0" + object-inspect "^1.13.3" + +side-channel-map@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/side-channel-map/-/side-channel-map-1.0.1.tgz#d6bb6b37902c6fef5174e5f533fab4c732a26f42" + integrity sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + get-intrinsic "^1.2.5" + object-inspect "^1.13.3" + +side-channel-weakmap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz#11dda19d5368e40ce9ec2bdc1fb0ecbc0790ecea" + integrity sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + get-intrinsic "^1.2.5" + object-inspect "^1.13.3" + side-channel-map "^1.0.1" + +side-channel@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.1.0.tgz#c3fcff9c4da932784873335ec9765fa94ff66bc9" + integrity sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw== + dependencies: + es-errors "^1.3.0" + object-inspect "^1.13.3" + side-channel-list "^1.0.0" + side-channel-map "^1.0.1" + side-channel-weakmap "^1.0.2" + +sister@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/sister/-/sister-3.0.2.tgz#bb3e39f07b1f75bbe1945f29a27ff1e5a2f26be4" + integrity sha512-p19rtTs+NksBRKW9qn0UhZ8/TUI9BPw9lmtHny+Y3TinWlOa9jWh9xB0AtPSdmOy49NJJJSSe0Ey4C7h0TrcYA== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" + integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== + +stop-iteration-iterator@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz#f481ff70a548f6124d0312c3aa14cbfa7aa542ad" + integrity sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ== + dependencies: + es-errors "^1.3.0" + internal-slot "^1.1.0" + +string.prototype.matchall@^4.0.12: + version "4.0.12" + resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz#6c88740e49ad4956b1332a911e949583a275d4c0" + integrity sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + define-properties "^1.2.1" + es-abstract "^1.23.6" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.6" + gopd "^1.2.0" + has-symbols "^1.1.0" + internal-slot "^1.1.0" + regexp.prototype.flags "^1.5.3" + set-function-name "^2.0.2" + side-channel "^1.1.0" + +string.prototype.repeat@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz#e90872ee0308b29435aa26275f6e1b762daee01a" + integrity sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +string.prototype.trim@^1.2.10: + version "1.2.10" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz#40b2dd5ee94c959b4dcfb1d65ce72e90da480c81" + integrity sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.2" + define-data-property "^1.1.4" + define-properties "^1.2.1" + es-abstract "^1.23.5" + es-object-atoms "^1.0.0" + has-property-descriptors "^1.0.2" + +string.prototype.trimend@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz#62e2731272cd285041b36596054e9f66569b6942" + integrity sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.2" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + +string.prototype.trimstart@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde" + integrity sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + +strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +sucrase@^3.35.0: + version "3.35.1" + resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.35.1.tgz#4619ea50393fe8bd0ae5071c26abd9b2e346bfe1" + integrity sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw== + dependencies: + "@jridgewell/gen-mapping" "^0.3.2" + commander "^4.0.0" + lines-and-columns "^1.1.6" + mz "^2.7.0" + pirates "^4.0.1" + tinyglobby "^0.2.11" + ts-interface-checker "^0.1.9" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +tailwindcss@^3.4.4: + version "3.4.19" + resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.4.19.tgz#af2a0a4ae302d52ebe078b6775e799e132500ee2" + integrity sha512-3ofp+LL8E+pK/JuPLPggVAIaEuhvIz4qNcf3nA1Xn2o/7fb7s/TYpHhwGDv1ZU3PkBluUVaF8PyCHcm48cKLWQ== + dependencies: + "@alloc/quick-lru" "^5.2.0" + arg "^5.0.2" + chokidar "^3.6.0" + didyoumean "^1.2.2" + dlv "^1.1.3" + fast-glob "^3.3.2" + glob-parent "^6.0.2" + is-glob "^4.0.3" + jiti "^1.21.7" + lilconfig "^3.1.3" + micromatch "^4.0.8" + normalize-path "^3.0.0" + object-hash "^3.0.0" + picocolors "^1.1.1" + postcss "^8.4.47" + postcss-import "^15.1.0" + postcss-js "^4.0.1" + postcss-load-config "^4.0.2 || ^5.0 || ^6.0" + postcss-nested "^6.2.0" + postcss-selector-parser "^6.1.2" + resolve "^1.22.8" + sucrase "^3.35.0" + +thenify-all@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" + integrity sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA== + dependencies: + thenify ">= 3.1.0 < 4" + +"thenify@>= 3.1.0 < 4": + version "3.3.1" + resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f" + integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== + dependencies: + any-promise "^1.0.0" + +tinyglobby@^0.2.11: + version "0.2.15" + resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.15.tgz#e228dd1e638cea993d2fdb4fcd2d4602a79951c2" + integrity sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ== + dependencies: + fdir "^6.5.0" + picomatch "^4.0.3" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +ts-api-utils@^1.3.0: + version "1.4.3" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.4.3.tgz#bfc2215fe6528fecab2b0fba570a2e8a4263b064" + integrity sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw== + +ts-interface-checker@^0.1.9: + version "0.1.13" + resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" + integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== + +tsconfck@^3.0.3: + version "3.1.6" + resolved "https://registry.yarnpkg.com/tsconfck/-/tsconfck-3.1.6.tgz#da1f0b10d82237ac23422374b3fce1edb23c3ead" + integrity sha512-ks6Vjr/jEw0P1gmOVwutM3B7fWxoWBL2KRDb1JfqGVawBmO5UsvmWOQFGHBPl5yxYz4eERr19E6L7NMv+Fej4w== + +tslib@^2.4.0, tslib@^2.8.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" + integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + +typed-array-buffer@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz#a72395450a4869ec033fd549371b47af3a2ee536" + integrity sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw== + dependencies: + call-bound "^1.0.3" + es-errors "^1.3.0" + is-typed-array "^1.1.14" + +typed-array-byte-length@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz#8407a04f7d78684f3d252aa1a143d2b77b4160ce" + integrity sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg== + dependencies: + call-bind "^1.0.8" + for-each "^0.3.3" + gopd "^1.2.0" + has-proto "^1.2.0" + is-typed-array "^1.1.14" + +typed-array-byte-offset@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz#ae3698b8ec91a8ab945016108aef00d5bff12355" + integrity sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + for-each "^0.3.3" + gopd "^1.2.0" + has-proto "^1.2.0" + is-typed-array "^1.1.15" + reflect.getprototypeof "^1.0.9" + +typed-array-length@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.7.tgz#ee4deff984b64be1e118b0de8c9c877d5ce73d3d" + integrity sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + is-typed-array "^1.1.13" + possible-typed-array-names "^1.0.0" + reflect.getprototypeof "^1.0.6" + +typescript-eslint@^7.13.1: + version "7.18.0" + resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-7.18.0.tgz#e90d57649b2ad37a7475875fa3e834a6d9f61eb2" + integrity sha512-PonBkP603E3tt05lDkbOMyaxJjvKqQrXsnow72sVeOFINDE/qNmnnd+f9b4N+U7W6MXnnYyrhtmF2t08QWwUbA== + dependencies: + "@typescript-eslint/eslint-plugin" "7.18.0" + "@typescript-eslint/parser" "7.18.0" + "@typescript-eslint/utils" "7.18.0" + +typescript@^5.4.5: + version "5.9.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f" + integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw== + +unbox-primitive@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.1.0.tgz#8d9d2c9edeea8460c7f35033a88867944934d1e2" + integrity sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw== + dependencies: + call-bound "^1.0.3" + has-bigints "^1.0.2" + has-symbols "^1.1.0" + which-boxed-primitive "^1.1.1" + +uncontrollable@^7.2.1: + version "7.2.1" + resolved "https://registry.yarnpkg.com/uncontrollable/-/uncontrollable-7.2.1.tgz#1fa70ba0c57a14d5f78905d533cf63916dc75738" + integrity sha512-svtcfoTADIB0nT9nltgjujTi7BzVmwjZClOmskKu/E8FW9BXzg9os8OLr4f8Dlnk0rYWJIWr4wv9eKUXiQvQwQ== + dependencies: + "@babel/runtime" "^7.6.3" + "@types/react" ">=16.9.11" + invariant "^2.2.4" + react-lifecycles-compat "^3.0.4" + +uncontrollable@^8.0.4: + version "8.0.4" + resolved "https://registry.yarnpkg.com/uncontrollable/-/uncontrollable-8.0.4.tgz#a0a8307f638795162fafd0550f4a1efa0f8c5eb6" + integrity sha512-ulRWYWHvscPFc0QQXvyJjY6LIXU56f0h8pQFvhxiKk5V1fcI8gp9Ht9leVAhrVjzqMw0BgjspBINx9r6oyJUvQ== + +undici-types@~6.21.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" + integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== + +update-browserslist-db@^1.2.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz#64d76db58713136acbeb4c49114366cc6cc2e80d" + integrity sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w== + dependencies: + escalade "^3.2.0" + picocolors "^1.1.1" + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +use-between@^1.3.5: + version "1.4.0" + resolved "https://registry.yarnpkg.com/use-between/-/use-between-1.4.0.tgz#d1e3b95095be2c2305709c15ed5265ee6c692935" + integrity sha512-MpLUnRHxZd3CNa5EeXaMadK1+oSd2Kst57WfU15TQbsLu3vgMcfh4gjAJWKaox02pOf+7Lx1ZHK5tMXHEVH1Qw== + +util-deprecate@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +vite-tsconfig-paths@^4.3.2: + version "4.3.2" + resolved "https://registry.yarnpkg.com/vite-tsconfig-paths/-/vite-tsconfig-paths-4.3.2.tgz#321f02e4b736a90ff62f9086467faf4e2da857a9" + integrity sha512-0Vd/a6po6Q+86rPlntHye7F31zA2URZMbH8M3saAZ/xR9QoGN/L21bxEGfXdWmFdNkqPpRdxFT7nmNe12e9/uA== + dependencies: + debug "^4.1.1" + globrex "^0.1.2" + tsconfck "^3.0.3" + +vite@^5.2.13: + version "5.4.21" + resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.21.tgz#84a4f7c5d860b071676d39ba513c0d598fdc7027" + integrity sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw== + dependencies: + esbuild "^0.21.3" + postcss "^8.4.43" + rollup "^4.20.0" + optionalDependencies: + fsevents "~2.3.3" + +warning@^4.0.0, warning@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3" + integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w== + dependencies: + loose-envify "^1.0.0" + +which-boxed-primitive@^1.1.0, which-boxed-primitive@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz#d76ec27df7fa165f18d5808374a5fe23c29b176e" + integrity sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA== + dependencies: + is-bigint "^1.1.0" + is-boolean-object "^1.2.1" + is-number-object "^1.1.1" + is-string "^1.1.1" + is-symbol "^1.1.1" + +which-builtin-type@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/which-builtin-type/-/which-builtin-type-1.2.1.tgz#89183da1b4907ab089a6b02029cc5d8d6574270e" + integrity sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q== + dependencies: + call-bound "^1.0.2" + function.prototype.name "^1.1.6" + has-tostringtag "^1.0.2" + is-async-function "^2.0.0" + is-date-object "^1.1.0" + is-finalizationregistry "^1.1.0" + is-generator-function "^1.0.10" + is-regex "^1.2.1" + is-weakref "^1.0.2" + isarray "^2.0.5" + which-boxed-primitive "^1.1.0" + which-collection "^1.0.2" + which-typed-array "^1.1.16" + +which-collection@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.2.tgz#627ef76243920a107e7ce8e96191debe4b16c2a0" + integrity sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw== + dependencies: + is-map "^2.0.3" + is-set "^2.0.3" + is-weakmap "^2.0.2" + is-weakset "^2.0.3" + +which-typed-array@^1.1.16, which-typed-array@^1.1.19: + version "1.1.20" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.20.tgz#3fdb7adfafe0ea69157b1509f3a1cd892bd1d122" + integrity sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + call-bound "^1.0.4" + for-each "^0.3.5" + get-proto "^1.0.1" + gopd "^1.2.0" + has-tostringtag "^1.0.2" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +word-wrap@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" + integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== + +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + +youtube-player@5.5.2: + version "5.5.2" + resolved "https://registry.yarnpkg.com/youtube-player/-/youtube-player-5.5.2.tgz#052b86b1eabe21ff331095ffffeae285fa7f7cb5" + integrity sha512-ZGtsemSpXnDky2AUYWgxjaopgB+shFHgXVpiJFeNB5nWEugpW1KWYDaHKuLqh2b67r24GtP6HoSW5swvf0fFIQ== + dependencies: + debug "^2.6.6" + load-script "^1.0.0" + sister "^3.0.0"