diff --git a/frontend/libs/common/enums/src/index.ts b/frontend/libs/common/enums/src/index.ts index 1bed25247f..c56d15c4e9 100644 --- a/frontend/libs/common/enums/src/index.ts +++ b/frontend/libs/common/enums/src/index.ts @@ -2,3 +2,4 @@ export * from "./lib/EditorState"; export * from "./lib/Queue"; export * from "./lib/UploaderStates"; export * from "./lib/Hotkeys"; +export * from "./lib/Toaster"; diff --git a/frontend/libs/common/enums/src/lib/Queue/AssetType.ts b/frontend/libs/common/enums/src/lib/Queue/AssetType.ts new file mode 100644 index 0000000000..ebc3d2f3e8 --- /dev/null +++ b/frontend/libs/common/enums/src/lib/Queue/AssetType.ts @@ -0,0 +1,10 @@ +export enum AssetType { + ANIMATION = "animation", + AUDIO = "audio", + CAMERA = "camera", + CHARACTER = "character", + EXPRESSION = "expression", + OBJECT = "object", + SKYBOX = "skybox", + SHAPE = "shape", +} diff --git a/frontend/libs/common/enums/src/lib/Queue/ClipGroup.ts b/frontend/libs/common/enums/src/lib/Queue/ClipGroup.ts new file mode 100644 index 0000000000..bae91bc0ba --- /dev/null +++ b/frontend/libs/common/enums/src/lib/Queue/ClipGroup.ts @@ -0,0 +1,7 @@ +export enum ClipGroup { + CHARACTER = "character", + CAMERA = "camera", + GLOBAL_AUDIO = "global_audio", + OBJECT = "object", + PROMPT_TRAVEL = "prompt", +} diff --git a/frontend/libs/common/enums/src/lib/Queue/ClipType.ts b/frontend/libs/common/enums/src/lib/Queue/ClipType.ts new file mode 100644 index 0000000000..14fb06e986 --- /dev/null +++ b/frontend/libs/common/enums/src/lib/Queue/ClipType.ts @@ -0,0 +1,8 @@ +export enum ClipType { + TRANSFORM = "transform", + AUDIO = "audio", + ANIMATION = "animation", + EXPRESSION = "expression", + FAKE = "fake", + PROMPT_TRAVEL = "prompt", +} diff --git a/frontend/libs/common/enums/src/lib/Queue/FromEngineActions.ts b/frontend/libs/common/enums/src/lib/Queue/FromEngineActions.ts new file mode 100644 index 0000000000..093d913bff --- /dev/null +++ b/frontend/libs/common/enums/src/lib/Queue/FromEngineActions.ts @@ -0,0 +1,14 @@ +export enum fromEngineActions { + ADD_OBJECT = "add_object", + CAMERA_ASPECT_RATIO_CHANGED = "camera_aspect_ratio_changed", + // data = CameraAspectRatio + DELETE_OBJECT = "delete_object", + DESELECT_OBJECT = "deselect_object", + RESET_TIMELINE = "reset_timeline", + SELECT_OBJECT = "select_object", + UPDATE_CHARACTER_ID = "update_character_id", + UPDATE_TIME = "update_time", + UPDATE_TIME_LINE = "update_timeline", + POP_A_TOAST = "pop_a_toast", + // data={currentTime: number} +} diff --git a/frontend/libs/common/enums/src/lib/Queue/ToEngineActions.ts b/frontend/libs/common/enums/src/lib/Queue/ToEngineActions.ts new file mode 100644 index 0000000000..7a601329f4 --- /dev/null +++ b/frontend/libs/common/enums/src/lib/Queue/ToEngineActions.ts @@ -0,0 +1,47 @@ +export enum toEngineActions { + ADD_CLIP = "add_clip", + // data=QueueClip + ADD_KEYFRAME = "add_keyframe", + + ADD_CHARACTER = "add_character", + + ADD_OBJECT = "add_object", + + ADD_SHAPE = "add_shape", + + // data= QueueKeyframe + DELETE_CLIP = "delete_clip", + // data=QueueClip + DELETE_KEYFRAME = "delete_keyframe", + // data=QueueKeyframe + ENTER_EDIT_STATE = "enter_edit", + // data=null + ENTER_PREVIEW_STATE = "enter_preview", + // data=null + GENERATE_VIDEO = "generate_video", + // data=null + MUTE = "mute", + // data={version, type, group, object_uuid} if lipsync + // data={version, type, group} if global_audio + REFRESH_PREVIEW = "refresh_preview", + // data=QueueClip + TOGGLE_CAMERA_STATE = "toggle_camera", + // data=null + TOGGLE_REPEATING = "toggle_repeating", + // data=null + + CHANGE_CAMERA_ASPECT_RATIO = "change_camera_aspect_ratio", + // data=CamperaAspectRatio + + CAMERA_CHANGED = "camera_changed", + + UNMUTE = "unmute", + // data={version, type, group, object_uuid} if lipsync + // data={version, type, group} if global_audio + UPDATE_CLIP = "update_clip", + // data=QueueClip + UPDATE_KEYFRAME = "update_keyframe", + // data=QueueKeyframe + UPDATE_TIME = "update_time", + // data={currentTime: number} +} diff --git a/frontend/libs/common/enums/src/lib/Queue/ToTimelineActions.ts b/frontend/libs/common/enums/src/lib/Queue/ToTimelineActions.ts new file mode 100644 index 0000000000..1602a15177 --- /dev/null +++ b/frontend/libs/common/enums/src/lib/Queue/ToTimelineActions.ts @@ -0,0 +1,4 @@ +export enum toTimelineActions { + ADD_KEYFRAME = "add_keyframe", + GENERATE_PROGRESS = "generate_progress", +} diff --git a/frontend/libs/common/enums/src/lib/Queue/index.ts b/frontend/libs/common/enums/src/lib/Queue/index.ts index aa1b1585af..c75ea81a29 100644 --- a/frontend/libs/common/enums/src/lib/Queue/index.ts +++ b/frontend/libs/common/enums/src/lib/Queue/index.ts @@ -1 +1,7 @@ +export * from "./AssetType"; export * from "./QueueNames"; +export * from "./FromEngineActions"; +export * from "./ToEngineActions"; +export * from "./ToTimelineActions"; +export * from "./ClipType"; +export * from "./ClipGroup"; diff --git a/frontend/libs/common/enums/src/lib/Toaster/ToastTypes.ts b/frontend/libs/common/enums/src/lib/Toaster/ToastTypes.ts new file mode 100644 index 0000000000..4842721240 --- /dev/null +++ b/frontend/libs/common/enums/src/lib/Toaster/ToastTypes.ts @@ -0,0 +1,5 @@ +export enum ToastTypes { + SUCCESS, + WARNING, + ERROR, +} diff --git a/frontend/libs/common/enums/src/lib/Toaster/index.ts b/frontend/libs/common/enums/src/lib/Toaster/index.ts new file mode 100644 index 0000000000..2fbb3ab45f --- /dev/null +++ b/frontend/libs/common/enums/src/lib/Toaster/index.ts @@ -0,0 +1 @@ +export * from "./ToastTypes"; diff --git a/frontend/libs/common/interfaces/src/index.ts b/frontend/libs/common/interfaces/src/index.ts index 88a937379d..3f8dd40a52 100644 --- a/frontend/libs/common/interfaces/src/index.ts +++ b/frontend/libs/common/interfaces/src/index.ts @@ -1,2 +1,8 @@ export * from "./lib/Camera"; export * from "./lib/UploadImage"; +export * from "./lib/IGenerationOptions"; +export * from "./lib/UpdateTime"; +export * from "./lib/Queue"; +export * from "./lib/MediaItem"; +export * from "./lib/UploadImage"; +export * from "./lib/UploadedState"; diff --git a/frontend/libs/common/interfaces/src/lib/IGenerationOptions.ts b/frontend/libs/common/interfaces/src/lib/IGenerationOptions.ts new file mode 100644 index 0000000000..5b2772a376 --- /dev/null +++ b/frontend/libs/common/interfaces/src/lib/IGenerationOptions.ts @@ -0,0 +1,9 @@ +export interface IGenerationOptions { + upscale: boolean; + faceDetail: boolean; + styleStrength: number; + lipSync: boolean; + cinematic: boolean; + globalIpAdapterImageMediaToken: string | null; + enginePreProcessing: boolean; +} diff --git a/frontend/libs/common/interfaces/src/lib/MediaItem.ts b/frontend/libs/common/interfaces/src/lib/MediaItem.ts new file mode 100644 index 0000000000..4ab432ecc5 --- /dev/null +++ b/frontend/libs/common/interfaces/src/lib/MediaItem.ts @@ -0,0 +1,18 @@ +import { AssetType } from "@storyteller/enums"; + +export interface MediaItem { + version: number; + type: AssetType; + maybe_animation_type?: string; + media_type?: string; + media_id: string; + object_uuid?: string; + name: string; + description?: string; + publicBucketPath?: string; + length?: number; + thumbnail?: string; + isMine?: boolean; + isBookmarked?: boolean; + imageIndex?: number; +} diff --git a/frontend/libs/common/interfaces/src/lib/Queue.ts b/frontend/libs/common/interfaces/src/lib/Queue.ts new file mode 100644 index 0000000000..8c11beccc3 --- /dev/null +++ b/frontend/libs/common/interfaces/src/lib/Queue.ts @@ -0,0 +1,28 @@ +import { ClipGroup, ClipType } from "@storyteller/enums"; +import { XYZ } from "@storyteller/types"; + +export interface QueueClip { + version: number; + type: ClipType; + group: ClipGroup; + object_uuid?: string; + clip_uuid?: string; + media_id?: string; + name?: string; + offset?: number; + length?: number; + selected?: boolean; +} + +export interface QueueKeyframe { + version: number; + keyframe_uuid?: string; + group: ClipGroup; + object_uuid: string; + object_name?: string; + offset?: number; + position: XYZ; + rotation: XYZ; + scale: XYZ; + selected?: boolean; +} diff --git a/frontend/libs/common/interfaces/src/lib/UpdateTime.ts b/frontend/libs/common/interfaces/src/lib/UpdateTime.ts new file mode 100644 index 0000000000..b60c91c770 --- /dev/null +++ b/frontend/libs/common/interfaces/src/lib/UpdateTime.ts @@ -0,0 +1,3 @@ +export interface UpdateTime { + currentTime: number; +} diff --git a/frontend/libs/common/types/.babelrc b/frontend/libs/common/types/.babelrc new file mode 100644 index 0000000000..1ea870ead4 --- /dev/null +++ b/frontend/libs/common/types/.babelrc @@ -0,0 +1,12 @@ +{ + "presets": [ + [ + "@nx/react/babel", + { + "runtime": "automatic", + "useBuiltIns": "usage" + } + ] + ], + "plugins": [] +} diff --git a/frontend/libs/common/types/README.md b/frontend/libs/common/types/README.md new file mode 100644 index 0000000000..83d4bda351 --- /dev/null +++ b/frontend/libs/common/types/README.md @@ -0,0 +1,7 @@ +# @storyteller/types + +This library was generated with [Nx](https://nx.dev). + +## Running unit tests + +Run `nx test @storyteller/types` to execute the unit tests via [Vitest](https://vitest.dev/). diff --git a/frontend/libs/common/types/package.json b/frontend/libs/common/types/package.json new file mode 100644 index 0000000000..b38d944e26 --- /dev/null +++ b/frontend/libs/common/types/package.json @@ -0,0 +1,17 @@ +{ + "name": "@storyteller/types", + "version": "0.0.1", + "type": "module", + "main": "./dist/index.js", + "module": "./dist/index.js", + "types": "./dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "development": "./src/index.ts", + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.js" + } + } +} diff --git a/frontend/libs/common/types/src/index.ts b/frontend/libs/common/types/src/index.ts new file mode 100644 index 0000000000..f41a696fd2 --- /dev/null +++ b/frontend/libs/common/types/src/index.ts @@ -0,0 +1 @@ +export * from './lib'; diff --git a/frontend/libs/common/types/src/lib/index.ts b/frontend/libs/common/types/src/lib/index.ts new file mode 100644 index 0000000000..143146ee5b --- /dev/null +++ b/frontend/libs/common/types/src/lib/index.ts @@ -0,0 +1,3 @@ +export * from './queue'; +export * from './toast'; +export * from './xyz'; diff --git a/frontend/libs/common/types/src/lib/queue.ts b/frontend/libs/common/types/src/lib/queue.ts new file mode 100644 index 0000000000..a16587b384 --- /dev/null +++ b/frontend/libs/common/types/src/lib/queue.ts @@ -0,0 +1,114 @@ +import { QueueNames, toTimelineActions, CameraAspectRatio, fromEngineActions, toEngineActions } from "@storyteller/enums"; + +import { IGenerationOptions, UpdateTime, QueueClip, QueueKeyframe, MediaItem } from "@storyteller/interfaces"; +import { ToastDataType } from "@storyteller/types"; + +export type UnionedActionTypes = + | fromEngineActions + | toEngineActions + | toTimelineActions; + +export type UnionedDataTypes = + | QueueClip + | UpdateTime + | QueueKeyframe + | MediaItem + | ToastDataType + | IGenerationOptions + | CameraAspectRatio + | null; + +export type QueueSubscribeType = { + action: UnionedActionTypes; + data: UnionedDataTypes; +}; + +export type SubscribeHandler = (entry: { + action: UnionedActionTypes; + data: UnionedDataTypes; +}) => void; + +class Queue { + private _queues: Record< + QueueNames, + Array<{ + action: UnionedActionTypes; + data: UnionedDataTypes; + }> + > = { + [QueueNames.FROM_ENGINE]: [], + [QueueNames.TO_ENGINE]: [], + [QueueNames.TO_TIMELINE]: [] + }; + + private _subscribers: Record< + QueueNames, + Map< + string, + SubscribeHandler + > + > = { + [QueueNames.FROM_ENGINE]: new Map(), + [QueueNames.TO_ENGINE]: new Map(), + [QueueNames.TO_TIMELINE]: new Map(), + }; + + // Enqueues actions to a specified queue + public publish({ + queueName, + action, + data, + }: { + queueName: QueueNames; + action: UnionedActionTypes; + data: UnionedDataTypes; + }) { + // Queues for all QueueNames should be initialized above but this is a safeguard for future enum additions + // Make sure the queue exists + if (!this._queues[queueName]) { + this._queues[queueName] = []; + } + + // Queue the task in the right queue + this._queues[queueName].push({ action, data }); + + // TODO: Ideally the publisher shouldn't deal at all with the subscribers + // It should only publish the events to the right queue + // It also doesn't make sense to fire an event on publish because the operations are then dispersed + // leading to potential race conditions + // FIXME: Add some sort of queue loop using internal event and add queue locks using promises to serialize queue publishes + if (this._subscribers[queueName]) { + this._subscribers[queueName].forEach((subcribeHandler) => + subcribeHandler(this._queues[queueName][0]), + ); + this._queues[queueName].shift(); + } + } + + public subscribe( + queueName: QueueNames, + id: string, + onMessage: (entry: QueueSubscribeType) => void, + ) { + + // Queues for all QueueNames should be initialized above but this is a safeguard for future enum additions + // Make sure the queue exists + if (!this._subscribers[queueName]) { + this._subscribers[queueName] = new Map(); + } + + // Set the handler mapped to the ID + this._subscribers[queueName].set(id, onMessage); + + while (this._queues[queueName]?.length) { + this._subscribers[queueName].forEach((subscribeHandler) => + subscribeHandler(this._queues[queueName][0]), + ); + this._queues[queueName].shift(); + } + } +} + +const queue = new Queue(); + +export default queue; diff --git a/frontend/libs/common/types/src/lib/toast.ts b/frontend/libs/common/types/src/lib/toast.ts new file mode 100644 index 0000000000..855fa60e9d --- /dev/null +++ b/frontend/libs/common/types/src/lib/toast.ts @@ -0,0 +1,6 @@ +import { ToastTypes } from "@storyteller/enums"; + +export type ToastDataType = { + type: ToastTypes; + message: string; +}; diff --git a/frontend/libs/common/types/src/lib/xyz.ts b/frontend/libs/common/types/src/lib/xyz.ts new file mode 100644 index 0000000000..85ba007300 --- /dev/null +++ b/frontend/libs/common/types/src/lib/xyz.ts @@ -0,0 +1,11 @@ +export type XYZ = { + x: number; + y: number; + z: number; +}; + +export type Simple3DVector = { + position: XYZ; + rotation: XYZ; + scale: XYZ; +}; diff --git a/frontend/libs/common/types/tsconfig.json b/frontend/libs/common/types/tsconfig.json new file mode 100644 index 0000000000..b3d19d8f5e --- /dev/null +++ b/frontend/libs/common/types/tsconfig.json @@ -0,0 +1,13 @@ +{ + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ], + "extends": "../../../tsconfig.base.json" +} diff --git a/frontend/libs/common/types/tsconfig.lib.json b/frontend/libs/common/types/tsconfig.lib.json new file mode 100644 index 0000000000..f0782e3dd8 --- /dev/null +++ b/frontend/libs/common/types/tsconfig.lib.json @@ -0,0 +1,45 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "dist", + "types": [ + "node", + "@nx/react/typings/cssmodule.d.ts", + "@nx/react/typings/image.d.ts", + "vite/client" + ], + "rootDir": "src", + "jsx": "react-jsx", + "tsBuildInfoFile": "dist/tsconfig.lib.tsbuildinfo" + }, + "exclude": [ + "out-tsc", + "dist", + "**/*.spec.ts", + "**/*.test.ts", + "**/*.spec.tsx", + "**/*.test.tsx", + "**/*.spec.js", + "**/*.test.js", + "**/*.spec.jsx", + "**/*.test.jsx", + "vite.config.ts", + "vite.config.mts", + "vitest.config.ts", + "vitest.config.mts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.test.tsx", + "src/**/*.spec.tsx", + "src/**/*.test.js", + "src/**/*.spec.js", + "src/**/*.test.jsx", + "src/**/*.spec.jsx" + ], + "include": [ + "src/**/*.js", + "src/**/*.jsx", + "src/**/*.ts", + "src/**/*.tsx" + ] +} diff --git a/frontend/libs/common/types/tsconfig.spec.json b/frontend/libs/common/types/tsconfig.spec.json new file mode 100644 index 0000000000..18b7de51b8 --- /dev/null +++ b/frontend/libs/common/types/tsconfig.spec.json @@ -0,0 +1,34 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./out-tsc/vitest", + "types": [ + "vitest/globals", + "vitest/importMeta", + "vite/client", + "node", + "vitest" + ], + "jsx": "react-jsx" + }, + "include": [ + "vite.config.ts", + "vite.config.mts", + "vitest.config.ts", + "vitest.config.mts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.test.tsx", + "src/**/*.spec.tsx", + "src/**/*.test.js", + "src/**/*.spec.js", + "src/**/*.test.jsx", + "src/**/*.spec.jsx", + "src/**/*.d.ts" + ], + "references": [ + { + "path": "./tsconfig.lib.json" + } + ] +} diff --git a/frontend/libs/common/types/vite.config.ts b/frontend/libs/common/types/vite.config.ts new file mode 100644 index 0000000000..2fca647531 --- /dev/null +++ b/frontend/libs/common/types/vite.config.ts @@ -0,0 +1,49 @@ +/// +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; +import dts from 'vite-plugin-dts'; +import * as path from 'path'; + +export default defineConfig(() => ({ + root: __dirname, + cacheDir: '../../../node_modules/.vite/libs/common/types', + plugins: [react(), dts({ entryRoot: 'src', tsconfigPath: path.join(__dirname, 'tsconfig.lib.json') })], + // Uncomment this if you are using workers. + // worker: { + // plugins: [ nxViteTsPaths() ], + // }, + // Configuration for building your library. + // See: https://vitejs.dev/guide/build.html#library-mode + build: { + outDir: './dist', + emptyOutDir: true, + reportCompressedSize: true, + commonjsOptions: { + transformMixedEsModules: true, + }, + lib: { + // Could also be a dictionary or array of multiple entry points. + entry: 'src/index.ts', + name: '@storyteller/types', + fileName: 'index', + // Change this to the formats you want to support. + // Don't forget to update your package.json as well. + formats: ['es' as const] + }, + rollupOptions: { + // External packages that should not be bundled into your library. + external: ['react','react-dom','react/jsx-runtime'] + }, + }, + test: { + watch: false, + globals: true, + environment: 'jsdom', + include: ['{src,tests}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], + reporters: ['default'], + coverage: { + reportsDirectory: './test-output/vitest/coverage', + provider: 'v8' as const, + } + }, +})); diff --git a/frontend/libs/components/camera-settings-modal/.babelrc b/frontend/libs/components/camera-settings-modal/.babelrc new file mode 100644 index 0000000000..1ea870ead4 --- /dev/null +++ b/frontend/libs/components/camera-settings-modal/.babelrc @@ -0,0 +1,12 @@ +{ + "presets": [ + [ + "@nx/react/babel", + { + "runtime": "automatic", + "useBuiltIns": "usage" + } + ] + ], + "plugins": [] +} diff --git a/frontend/libs/components/camera-settings-modal/README.md b/frontend/libs/components/camera-settings-modal/README.md new file mode 100644 index 0000000000..a9384e594c --- /dev/null +++ b/frontend/libs/components/camera-settings-modal/README.md @@ -0,0 +1,7 @@ +# @storyteller/ui-camera-settings-modal + +This library was generated with [Nx](https://nx.dev). + +## Running unit tests + +Run `nx test @storyteller/ui-camera-settings-modal` to execute the unit tests via [Vitest](https://vitest.dev/). diff --git a/frontend/libs/components/camera-settings-modal/package.json b/frontend/libs/components/camera-settings-modal/package.json new file mode 100644 index 0000000000..919163a3ae --- /dev/null +++ b/frontend/libs/components/camera-settings-modal/package.json @@ -0,0 +1,17 @@ +{ + "name": "@storyteller/ui-camera-settings-modal", + "version": "0.0.1", + "type": "module", + "main": "./dist/index.js", + "module": "./dist/index.js", + "types": "./dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "development": "./src/index.ts", + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.js" + } + } +} diff --git a/frontend/libs/components/camera-settings-modal/src/index.ts b/frontend/libs/components/camera-settings-modal/src/index.ts new file mode 100644 index 0000000000..7275bbdb23 --- /dev/null +++ b/frontend/libs/components/camera-settings-modal/src/index.ts @@ -0,0 +1,2 @@ + +export * from './lib/camera-settings-modal'; diff --git a/frontend/libs/components/camera-settings-modal/src/lib/camera-settings-modal.tsx b/frontend/libs/components/camera-settings-modal/src/lib/camera-settings-modal.tsx new file mode 100644 index 0000000000..6442833d71 --- /dev/null +++ b/frontend/libs/components/camera-settings-modal/src/lib/camera-settings-modal.tsx @@ -0,0 +1,236 @@ +import { TransitionDialogue } from "@storyteller/ui-transition-dialogue"; +import { faPlus, faTrashAlt } from "@fortawesome/pro-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { PopoverItem } from "@storyteller/ui-popover" +import { Button } from "@storyteller/ui-button"; +import { Input } from "@storyteller/ui-input"; +import { Label } from "@storyteller/ui-label"; +import { Tooltip } from "@storyteller/ui-tooltip"; +import { SliderV2 } from "@storyteller/ui-sliderv2"; +import { useState, useEffect } from "react"; +import { twMerge } from "tailwind-merge"; +import { Signal } from "@preact/signals-react"; + +interface ExtendedPopoverItem extends PopoverItem { + id: string; + focalLength: number; + position: { x: number; y: number; z: number }; + rotation: { x: number; y: number; z: number }; + lookAt: { x: number; y: number; z: number }; +} + +interface CameraSettingsModalProps { + isOpen: boolean; + onClose: () => void; + cameras: ExtendedPopoverItem[]; + onCameraNameChange: (id: string, newName: string) => void; + onCameraFocalLengthChange: (id: string, value: number) => void; + onAddCamera: () => void; + selectedCameraId: string; + handleCameraSelect: (selectedItem: PopoverItem) => void; + onDeleteCamera: (id: string) => void; + focalLengthDragging: Signal; + disableHotkeyInput: (level: number) => void; + enableHotkeyInput: (level: number) => void; +} + +export const CameraSettingsModal = ({ + isOpen, + onClose, + cameras, + onCameraNameChange, + onCameraFocalLengthChange, + onAddCamera, + selectedCameraId, + handleCameraSelect, + onDeleteCamera, + focalLengthDragging, + disableHotkeyInput, + enableHotkeyInput, +}: CameraSettingsModalProps) => { + const selectedCamera = cameras.find((cam) => cam.id === selectedCameraId); + const [isDragging, setIsDragging] = useState(false); + const [tempCameraName, setTempCameraName] = useState(""); + const [editingCameraId, setEditingCameraId] = useState(null); + + useEffect(() => { + if (selectedCamera) { + setTempCameraName(selectedCamera.label); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [selectedCamera?.id]); + + useEffect(() => { + const handlePointerUp = () => { + setIsDragging(false); + focalLengthDragging.value = { + isDragging: false, + focalLength: selectedCamera?.focalLength || 35, + }; + }; + document.addEventListener("pointerup", handlePointerUp); + return () => document.removeEventListener("pointerup", handlePointerUp); + }, [selectedCamera?.focalLength]); + + const handlePointerDown = () => { + setIsDragging(true); + focalLengthDragging.value = { + isDragging: true, + focalLength: selectedCamera?.focalLength || 35, + }; + }; + + const handleFocalLengthChange = (id: string, value: number) => { + focalLengthDragging.value = { isDragging: true, focalLength: value }; + onCameraFocalLengthChange(id, value); + }; + + const handleNameBlur = () => { + if (selectedCamera && tempCameraName.trim() !== "") { + onCameraNameChange(selectedCamera.id, tempCameraName); + } else if (selectedCamera) { + setTempCameraName(selectedCamera.label); + } + setEditingCameraId(null); + }; + + const handleNameFocus = (id: string) => { + setEditingCameraId(id); + }; + + return ( + +
+
+
+

Camera

+ + + +
+
+
+ {cameras.map((camera) => ( + + ))} +
+
+
+
+
+
+

+ {selectedCamera?.label || "Camera"} +

+ + + +
+
+
+
+ + setTempCameraName(e.target.value)} + onBlur={handleNameBlur} + onFocus={() => + selectedCamera && handleNameFocus(selectedCamera.id) + } + className="text-sm" + /> +
+
+ +
+ + selectedCamera && + handleFocalLengthChange(selectedCamera.id, value) + } + step={1} + suffix="mm" + showDecrement={true} + showIncrement={true} + className="w-full" + /> + + {selectedCamera?.focalLength || 35}mm + +
+
+
+
+
+ +
+
+
+
+
+ ); +}; diff --git a/frontend/libs/components/camera-settings-modal/tsconfig.json b/frontend/libs/components/camera-settings-modal/tsconfig.json new file mode 100644 index 0000000000..b3d19d8f5e --- /dev/null +++ b/frontend/libs/components/camera-settings-modal/tsconfig.json @@ -0,0 +1,13 @@ +{ + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ], + "extends": "../../../tsconfig.base.json" +} diff --git a/frontend/libs/components/camera-settings-modal/tsconfig.lib.json b/frontend/libs/components/camera-settings-modal/tsconfig.lib.json new file mode 100644 index 0000000000..f0782e3dd8 --- /dev/null +++ b/frontend/libs/components/camera-settings-modal/tsconfig.lib.json @@ -0,0 +1,45 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "dist", + "types": [ + "node", + "@nx/react/typings/cssmodule.d.ts", + "@nx/react/typings/image.d.ts", + "vite/client" + ], + "rootDir": "src", + "jsx": "react-jsx", + "tsBuildInfoFile": "dist/tsconfig.lib.tsbuildinfo" + }, + "exclude": [ + "out-tsc", + "dist", + "**/*.spec.ts", + "**/*.test.ts", + "**/*.spec.tsx", + "**/*.test.tsx", + "**/*.spec.js", + "**/*.test.js", + "**/*.spec.jsx", + "**/*.test.jsx", + "vite.config.ts", + "vite.config.mts", + "vitest.config.ts", + "vitest.config.mts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.test.tsx", + "src/**/*.spec.tsx", + "src/**/*.test.js", + "src/**/*.spec.js", + "src/**/*.test.jsx", + "src/**/*.spec.jsx" + ], + "include": [ + "src/**/*.js", + "src/**/*.jsx", + "src/**/*.ts", + "src/**/*.tsx" + ] +} diff --git a/frontend/libs/components/camera-settings-modal/tsconfig.spec.json b/frontend/libs/components/camera-settings-modal/tsconfig.spec.json new file mode 100644 index 0000000000..18b7de51b8 --- /dev/null +++ b/frontend/libs/components/camera-settings-modal/tsconfig.spec.json @@ -0,0 +1,34 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./out-tsc/vitest", + "types": [ + "vitest/globals", + "vitest/importMeta", + "vite/client", + "node", + "vitest" + ], + "jsx": "react-jsx" + }, + "include": [ + "vite.config.ts", + "vite.config.mts", + "vitest.config.ts", + "vitest.config.mts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.test.tsx", + "src/**/*.spec.tsx", + "src/**/*.test.js", + "src/**/*.spec.js", + "src/**/*.test.jsx", + "src/**/*.spec.jsx", + "src/**/*.d.ts" + ], + "references": [ + { + "path": "./tsconfig.lib.json" + } + ] +} diff --git a/frontend/libs/components/camera-settings-modal/vite.config.ts b/frontend/libs/components/camera-settings-modal/vite.config.ts new file mode 100644 index 0000000000..9c81344ed3 --- /dev/null +++ b/frontend/libs/components/camera-settings-modal/vite.config.ts @@ -0,0 +1,49 @@ +/// +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; +import dts from 'vite-plugin-dts'; +import * as path from 'path'; + +export default defineConfig(() => ({ + root: __dirname, + cacheDir: '../../../node_modules/.vite/libs/components/camera-settings-modal', + plugins: [react(), dts({ entryRoot: 'src', tsconfigPath: path.join(__dirname, 'tsconfig.lib.json') })], + // Uncomment this if you are using workers. + // worker: { + // plugins: [ nxViteTsPaths() ], + // }, + // Configuration for building your library. + // See: https://vitejs.dev/guide/build.html#library-mode + build: { + outDir: './dist', + emptyOutDir: true, + reportCompressedSize: true, + commonjsOptions: { + transformMixedEsModules: true, + }, + lib: { + // Could also be a dictionary or array of multiple entry points. + entry: 'src/index.ts', + name: '@storyteller/ui-camera-settings-modal', + fileName: 'index', + // Change this to the formats you want to support. + // Don't forget to update your package.json as well. + formats: ['es' as const] + }, + rollupOptions: { + // External packages that should not be bundled into your library. + external: ['react','react-dom','react/jsx-runtime'] + }, + }, + test: { + watch: false, + globals: true, + environment: 'jsdom', + include: ['{src,tests}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], + reporters: ['default'], + coverage: { + reportsDirectory: './test-output/vitest/coverage', + provider: 'v8' as const, + } + }, +})); diff --git a/frontend/libs/components/promptbox/src/index.ts b/frontend/libs/components/promptbox/src/index.ts index 246338d20f..f3150d83a8 100644 --- a/frontend/libs/components/promptbox/src/index.ts +++ b/frontend/libs/components/promptbox/src/index.ts @@ -1 +1 @@ -export * from "./lib/PromptBox"; +export * from "./lib/PromptBox3D"; diff --git a/frontend/libs/components/promptbox/src/lib/PromptBox.tsx b/frontend/libs/components/promptbox/src/lib/PromptBox.tsx deleted file mode 100644 index 8bc6e7a428..0000000000 --- a/frontend/libs/components/promptbox/src/lib/PromptBox.tsx +++ /dev/null @@ -1,11 +0,0 @@ -interface PromptBoxProps { - is3D: boolean; -} - -export const PromptBox = ({ - is3D -}: PromptBoxProps) => { - return ( - {is3D ?? PromptBox3D : PromptBox2D} - ); -}; diff --git a/frontend/libs/components/promptbox/src/lib/PromptBox3D.tsx b/frontend/libs/components/promptbox/src/lib/PromptBox3D.tsx index b7f29d4ac0..70665580d6 100644 --- a/frontend/libs/components/promptbox/src/lib/PromptBox3D.tsx +++ b/frontend/libs/components/promptbox/src/lib/PromptBox3D.tsx @@ -52,7 +52,7 @@ import { UploadImageArgs, } from "@storyteller/interfaces"; import { EngineApi } from "@storyteller/api"; -import { CameraSettingsModal } from "../CameraSettingsModal"; +import { CameraSettingsModal } from "@storyteller/ui-camera-settings-modal"; import { twMerge } from "tailwind-merge"; import { GalleryModal, GalleryItem } from "@storyteller/ui-gallery-modal"; import { Modal } from "@storyteller/ui-modal"; @@ -66,22 +66,20 @@ interface PromptBox3DProps { gridVisibility: Signal; setGridVisibility: (isVisible: boolean) => void; selectedCameraId: Signal; - addCamera: (cam: Camera) => void; - updateCamera: (id: string, updates: Partial) => void; deleteCamera: (id: string) => void; focalLengthDragging: Signal; isPromptBoxFocused: Signal; uploadImage: (arg: UploadImageArgs) => Promise; handleCameraSelect: (item: PopoverItem) => void; handleAddCamera: () => void; - handleCameraNameChange: (name: string) => void; + handleCameraNameChange: (id: string, newName: string) => void; handleCameraFocalLengthChange: (id: string, value: number) => void; - handleAspectRatioSelect: (selectedItem: PopoverItem) => void; + onAspectRatioSelect: (newRatio: CameraAspectRatio) => void; setEnginePrompt: (prompt: string) => void; - snapshotCurrentFrame: (shouldDownload?: boolean) => { + snapshotCurrentFrame: ((shouldDownload?: boolean) => { base64Snapshot: string; file: File; - } | null; + } | null) | undefined; } export const PromptBox3D = ({ @@ -92,8 +90,6 @@ export const PromptBox3D = ({ gridVisibility, setGridVisibility, selectedCameraId, - addCamera, - updateCamera, deleteCamera, focalLengthDragging, isPromptBoxFocused, @@ -102,7 +98,7 @@ export const PromptBox3D = ({ handleAddCamera, handleCameraNameChange, handleCameraFocalLengthChange, - handleAspectRatioSelect, + onAspectRatioSelect, setEnginePrompt, snapshotCurrentFrame, }: PromptBox3DProps) => { @@ -169,6 +165,37 @@ export const PromptBox3D = ({ // eslint-disable-next-line react-hooks/exhaustive-deps }, [cameraAspectRatio.value]); + const handleAspectRatioSelect = (selectedItem: PopoverItem) => { + setAspectRatioList((prev) => + prev.map((item) => ({ + ...item, + selected: item.label === selectedItem.label, + })), + ); + + // Map the selected label to the corresponding CameraAspectRatio enum value + let newRatio: CameraAspectRatio; + switch (selectedItem.label) { + case "16:9": + newRatio = CameraAspectRatio.HORIZONTAL_16_9; + break; + case "3:2": + newRatio = CameraAspectRatio.HORIZONTAL_3_2; + break; + case "2:3": + newRatio = CameraAspectRatio.VERTICAL_2_3; + break; + case "1:1": + newRatio = CameraAspectRatio.SQUARE_1_1; + break; + default: + newRatio = CameraAspectRatio.HORIZONTAL_16_9; + } + + onAspectRatioSelect(newRatio); + }; + + const handleFileUpload = (event: React.ChangeEvent) => { const files = event.target.files; if (files) { @@ -314,44 +341,46 @@ export const PromptBox3D = ({ //const engineApi = new EngineApi(); const promptsApi = new PromptsApi(); - const snapshot = snapshotCurrentFrame(false); + if (snapshotCurrentFrame) { + const snapshot = snapshotCurrentFrame(false); - if (snapshot) { - const snapshotResult = await promptsApi.uploadSceneSnapshot({ - screenshot: snapshot.file, - sceneMediaToken: "", - }); + if (snapshot) { + const snapshotResult = await promptsApi.uploadSceneSnapshot({ + screenshot: snapshot.file, + sceneMediaToken: "", + }); - console.log("useSystemPrompt", useSystemPrompt); + console.log("useSystemPrompt", useSystemPrompt); - const response = await promptsApi.enqueueImageGeneration({ - disableSystemPrompt: !useSystemPrompt, - prompt: prompt, - snapshotMediaToken: snapshotResult.data || "", - additionalImages: referenceImages.map((image) => image.mediaToken), - }); + const response = await promptsApi.enqueueImageGeneration({ + disableSystemPrompt: !useSystemPrompt, + prompt: prompt, + snapshotMediaToken: snapshotResult.data || "", + additionalImages: referenceImages.map((image) => image.mediaToken), + }); - console.log("response", response); + console.log("response", response); - if (response.errorMessage) { - handleError(response.errorMessage); - setisEnqueueing(false); - return; + if (response.errorMessage) { + handleError(response.errorMessage); + setisEnqueueing(false); + return; + } } - } - try { - // Here we would pass both the prompt and reference images to the generation - console.log( - "Enqueuing with prompt:", - prompt, - "and reference images:", - referenceImages - ); - await new Promise((resolve) => setTimeout(resolve, 2000)); - } finally { - setisEnqueueing(false); - toast.success("Image added to queue"); + try { + // Here we would pass both the prompt and reference images to the generation + console.log( + "Enqueuing with prompt:", + prompt, + "and reference images:", + referenceImages + ); + await new Promise((resolve) => setTimeout(resolve, 2000)); + } finally { + setisEnqueueing(false); + toast.success("Image added to queue"); + } } setisEnqueueing(false); }; @@ -365,47 +394,49 @@ export const PromptBox3D = ({ const promptsApi = new PromptsApi(); - const snapshot = snapshotCurrentFrame(false); + if (snapshotCurrentFrame) { + const snapshot = snapshotCurrentFrame(false); - if (snapshot) { - const snapshotResult = await promptsApi.uploadSceneSnapshot({ - screenshot: snapshot.file, - //sceneMediaToken: "", - }); + if (snapshot) { + const snapshotResult = await promptsApi.uploadSceneSnapshot({ + screenshot: snapshot.file, + //sceneMediaToken: "", + }); - const generateResponse = await invoke("sora_image_remix_command", { - request: { - snapshot_media_token: snapshotResult.data!, - disable_system_prompt: !useSystemPrompt, - prompt: prompt, - maybe_additional_images: referenceImages.map( - (image) => image.mediaToken - ), - maybe_number_of_samples: 1, - }, - }); + const generateResponse = await invoke("sora_image_remix_command", { + request: { + snapshot_media_token: snapshotResult.data!, + disable_system_prompt: !useSystemPrompt, + prompt: prompt, + maybe_additional_images: referenceImages.map( + (image) => image.mediaToken + ), + maybe_number_of_samples: 1, + }, + }); - console.log("response", generateResponse); + console.log("response", generateResponse); - //if (generateResponse.errorMessage) { - // handleError(response.errorMessage); - // setisEnqueueing(false); - // return; - //} - } + //if (generateResponse.errorMessage) { + // handleError(response.errorMessage); + // setisEnqueueing(false); + // return; + //} + } - try { - // Here we would pass both the prompt and reference images to the generation - console.log( - "Enqueuing with prompt:", - prompt, - "and reference images:", - referenceImages - ); - await new Promise((resolve) => setTimeout(resolve, 2000)); - } finally { - setisEnqueueing(false); - toast.success("Image added to queue"); + try { + // Here we would pass both the prompt and reference images to the generation + console.log( + "Enqueuing with prompt:", + prompt, + "and reference images:", + referenceImages + ); + await new Promise((resolve) => setTimeout(resolve, 2000)); + } finally { + setisEnqueueing(false); + toast.success("Image added to queue"); + } } setisEnqueueing(false); @@ -435,6 +466,10 @@ export const PromptBox3D = ({ }; const handleSaveFrame = async () => { + if (!snapshotCurrentFrame) { + return; + } + const snapshot = snapshotCurrentFrame(false); if (snapshot) { const engineApi = new EngineApi(); @@ -446,6 +481,9 @@ export const PromptBox3D = ({ }; const handleDownloadFrame = () => { + if (!snapshotCurrentFrame) { + return; + } snapshotCurrentFrame(true); }; @@ -704,6 +742,7 @@ export const PromptBox3D = ({ selected: cam.id === selectedCameraId.value, icon: , focalLength: cam.focalLength, + focalLengthDragging: focalLengthDragging, position: cam.position, rotation: cam.rotation, lookAt: cam.lookAt, @@ -714,6 +753,9 @@ export const PromptBox3D = ({ selectedCameraId={selectedCameraId.value} handleCameraSelect={handleCameraSelect} onDeleteCamera={deleteCamera} + disableHotkeyInput={disableHotkeyInput} + enableHotkeyInput={enableHotkeyInput} + focalLengthDragging={focalLengthDragging} /> void; + step: number; + className?: string; + showTooltip?: boolean; + tooltipContent?: ReactNode; + suffix?: string; + innerLabel?: string; + showDecrement?: boolean; + showIncrement?: boolean; +} + +export const SliderV2 = ({ + min, + max, + value, + onChange, + step, + className, + showTooltip, + tooltipContent, + suffix, + innerLabel, + showDecrement, + showIncrement, +}: SliderProps) => { + const [localValue, setLocalValue] = useState(value); + const sliderRef = useRef(null); + const [isDragging, setIsDragging] = useState(false); + const [showHandleTooltip, setShowHandleTooltip] = useState(false); + + useEffect(() => { + setLocalValue(value); + }, [value]); + + const setClampedValue = (value: number) => { + const roundedValue = Math.round(value / step) * step; + const clampedValue = Math.min(Math.max(roundedValue, min), max); + setLocalValue(clampedValue); + onChange(clampedValue); + }; + + const updatePosition = (x: number) => { + if (!sliderRef.current) return; + const rect = sliderRef.current.getBoundingClientRect(); + const fraction = (x - rect.left) / rect.width; + const newValue = fraction * (max - min) + min; + setClampedValue(newValue); + }; + + const handleMouseDown = (e: React.MouseEvent) => { + e.preventDefault(); + setIsDragging(true); + setShowHandleTooltip(true); + document.addEventListener("mousemove", handleMouseMove); + document.addEventListener("mouseup", handleMouseUp); + updatePosition(e.clientX); + }; + + const handleMouseMove = (e: MouseEvent) => { + e.preventDefault(); + updatePosition(e.clientX); + }; + + const handleMouseUp = (e: MouseEvent) => { + e.preventDefault(); + setIsDragging(false); + setShowHandleTooltip(false); + document.removeEventListener("mousemove", handleMouseMove); + document.removeEventListener("mouseup", handleMouseUp); + }; + + const handleMouseEnter = () => { + if (!isDragging) { + setShowHandleTooltip(true); + } + }; + + const handleMouseLeave = () => { + if (!isDragging) { + setShowHandleTooltip(false); + } + }; + + const handleDecrement = () => { + setClampedValue(localValue - step); + }; + + const handleIncrement = () => { + setClampedValue(localValue + step); + }; + + const percentage = ((localValue - min) / (max - min)) * 100; + const displayValue = + localValue.toFixed(step.toString().split(".")[1]?.length || 0) + + (suffix || ""); + + return ( +
+ {showDecrement && ( +
+ ); +}; diff --git a/frontend/libs/components/slider-v2/tsconfig.json b/frontend/libs/components/slider-v2/tsconfig.json new file mode 100644 index 0000000000..b3d19d8f5e --- /dev/null +++ b/frontend/libs/components/slider-v2/tsconfig.json @@ -0,0 +1,13 @@ +{ + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ], + "extends": "../../../tsconfig.base.json" +} diff --git a/frontend/libs/components/slider-v2/tsconfig.lib.json b/frontend/libs/components/slider-v2/tsconfig.lib.json new file mode 100644 index 0000000000..f0782e3dd8 --- /dev/null +++ b/frontend/libs/components/slider-v2/tsconfig.lib.json @@ -0,0 +1,45 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "dist", + "types": [ + "node", + "@nx/react/typings/cssmodule.d.ts", + "@nx/react/typings/image.d.ts", + "vite/client" + ], + "rootDir": "src", + "jsx": "react-jsx", + "tsBuildInfoFile": "dist/tsconfig.lib.tsbuildinfo" + }, + "exclude": [ + "out-tsc", + "dist", + "**/*.spec.ts", + "**/*.test.ts", + "**/*.spec.tsx", + "**/*.test.tsx", + "**/*.spec.js", + "**/*.test.js", + "**/*.spec.jsx", + "**/*.test.jsx", + "vite.config.ts", + "vite.config.mts", + "vitest.config.ts", + "vitest.config.mts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.test.tsx", + "src/**/*.spec.tsx", + "src/**/*.test.js", + "src/**/*.spec.js", + "src/**/*.test.jsx", + "src/**/*.spec.jsx" + ], + "include": [ + "src/**/*.js", + "src/**/*.jsx", + "src/**/*.ts", + "src/**/*.tsx" + ] +} diff --git a/frontend/libs/components/slider-v2/tsconfig.spec.json b/frontend/libs/components/slider-v2/tsconfig.spec.json new file mode 100644 index 0000000000..18b7de51b8 --- /dev/null +++ b/frontend/libs/components/slider-v2/tsconfig.spec.json @@ -0,0 +1,34 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./out-tsc/vitest", + "types": [ + "vitest/globals", + "vitest/importMeta", + "vite/client", + "node", + "vitest" + ], + "jsx": "react-jsx" + }, + "include": [ + "vite.config.ts", + "vite.config.mts", + "vitest.config.ts", + "vitest.config.mts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.test.tsx", + "src/**/*.spec.tsx", + "src/**/*.test.js", + "src/**/*.spec.js", + "src/**/*.test.jsx", + "src/**/*.spec.jsx", + "src/**/*.d.ts" + ], + "references": [ + { + "path": "./tsconfig.lib.json" + } + ] +} diff --git a/frontend/libs/components/slider-v2/vite.config.ts b/frontend/libs/components/slider-v2/vite.config.ts new file mode 100644 index 0000000000..a0b7ba82a6 --- /dev/null +++ b/frontend/libs/components/slider-v2/vite.config.ts @@ -0,0 +1,49 @@ +/// +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; +import dts from 'vite-plugin-dts'; +import * as path from 'path'; + +export default defineConfig(() => ({ + root: __dirname, + cacheDir: '../../../node_modules/.vite/libs/components/slider-v2', + plugins: [react(), dts({ entryRoot: 'src', tsconfigPath: path.join(__dirname, 'tsconfig.lib.json') })], + // Uncomment this if you are using workers. + // worker: { + // plugins: [ nxViteTsPaths() ], + // }, + // Configuration for building your library. + // See: https://vitejs.dev/guide/build.html#library-mode + build: { + outDir: './dist', + emptyOutDir: true, + reportCompressedSize: true, + commonjsOptions: { + transformMixedEsModules: true, + }, + lib: { + // Could also be a dictionary or array of multiple entry points. + entry: 'src/index.ts', + name: '@storyteller/ui-sliderv2', + fileName: 'index', + // Change this to the formats you want to support. + // Don't forget to update your package.json as well. + formats: ['es' as const] + }, + rollupOptions: { + // External packages that should not be bundled into your library. + external: ['react','react-dom','react/jsx-runtime'] + }, + }, + test: { + watch: false, + globals: true, + environment: 'jsdom', + include: ['{src,tests}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], + reporters: ['default'], + coverage: { + reportsDirectory: './test-output/vitest/coverage', + provider: 'v8' as const, + } + }, +})); diff --git a/frontend/libs/components/transition-dialogue/.babelrc b/frontend/libs/components/transition-dialogue/.babelrc new file mode 100644 index 0000000000..1ea870ead4 --- /dev/null +++ b/frontend/libs/components/transition-dialogue/.babelrc @@ -0,0 +1,12 @@ +{ + "presets": [ + [ + "@nx/react/babel", + { + "runtime": "automatic", + "useBuiltIns": "usage" + } + ] + ], + "plugins": [] +} diff --git a/frontend/libs/components/transition-dialogue/README.md b/frontend/libs/components/transition-dialogue/README.md new file mode 100644 index 0000000000..f89ca7e5bf --- /dev/null +++ b/frontend/libs/components/transition-dialogue/README.md @@ -0,0 +1,7 @@ +# @storyteller/ui-transition-dialogue + +This library was generated with [Nx](https://nx.dev). + +## Running unit tests + +Run `nx test @storyteller/ui-transition-dialogue` to execute the unit tests via [Vitest](https://vitest.dev/). diff --git a/frontend/libs/components/transition-dialogue/package.json b/frontend/libs/components/transition-dialogue/package.json new file mode 100644 index 0000000000..784e1e8644 --- /dev/null +++ b/frontend/libs/components/transition-dialogue/package.json @@ -0,0 +1,17 @@ +{ + "name": "@storyteller/ui-transition-dialogue", + "version": "0.0.1", + "type": "module", + "main": "./dist/index.js", + "module": "./dist/index.js", + "types": "./dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "development": "./src/index.ts", + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.js" + } + } +} diff --git a/frontend/libs/components/transition-dialogue/src/index.ts b/frontend/libs/components/transition-dialogue/src/index.ts new file mode 100644 index 0000000000..3137562278 --- /dev/null +++ b/frontend/libs/components/transition-dialogue/src/index.ts @@ -0,0 +1,2 @@ + +export * from './lib/transition-dialogue'; diff --git a/frontend/libs/components/transition-dialogue/src/lib/transition-dialogue.tsx b/frontend/libs/components/transition-dialogue/src/lib/transition-dialogue.tsx new file mode 100644 index 0000000000..750975df06 --- /dev/null +++ b/frontend/libs/components/transition-dialogue/src/lib/transition-dialogue.tsx @@ -0,0 +1,165 @@ +import { useEffect, Fragment, ReactNode } from "react"; +import { Dialog, Transition } from "@headlessui/react"; +import { twMerge } from "tailwind-merge"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { + IconDefinition, + faDownLeftAndUpRightToCenter, +} from "@fortawesome/pro-solid-svg-icons"; +import { Tooltip } from "@storyteller/ui-tooltip"; +import { DomLevels } from "@storyteller/enums"; + +const DialogBackdrop = ({ + className, + disableHotkeyInput, + enableHotkeyInput, +}: { + className?: string; + disableHotkeyInput: (level: number) => void; + enableHotkeyInput: (level: number) => void; +}) => { + useEffect(() => { + disableHotkeyInput(DomLevels.DIALOGUE); + return () => { + enableHotkeyInput(DomLevels.DIALOGUE); + }; + }, []); + + return ( + +
{ + e.preventDefault(); + e.stopPropagation(); + }} + /> + + ); +}; + +export const TransitionDialogue = ({ + isOpen, + title, + titleIcon, + onTitleIconClick, + onClose, + className, + backdropClassName, + width, + children, + childPadding = true, + titleIconClassName, + showClose = true, + disableHotkeyInput = () => { }, + enableHotkeyInput = () => { }, +}: { + isOpen: boolean; + title?: ReactNode; + titleIcon?: IconDefinition; + onTitleIconClick?: () => void; + titleIconClassName?: string; + onClose: () => void; + className?: string; + backdropClassName?: string; + width?: number; + children: ReactNode; + childPadding?: boolean; + showClose?: boolean; + disableHotkeyInput: (level: number) => void; + enableHotkeyInput: (level: number) => void; +}) => { + return ( + + + +
+
+ + { + e.preventDefault(); + e.stopPropagation(); + }} + > + {title && ( + + <> + {onTitleIconClick ? ( + + ) : ( +
+ {titleIcon && ( + + )} + {title} +
+ )} + + {showClose && ( + + + + )} +
+ )} +
+ {children} +
+
+
+
+
+
+
+ ); +}; diff --git a/frontend/libs/components/transition-dialogue/tsconfig.json b/frontend/libs/components/transition-dialogue/tsconfig.json new file mode 100644 index 0000000000..b3d19d8f5e --- /dev/null +++ b/frontend/libs/components/transition-dialogue/tsconfig.json @@ -0,0 +1,13 @@ +{ + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ], + "extends": "../../../tsconfig.base.json" +} diff --git a/frontend/libs/components/transition-dialogue/tsconfig.lib.json b/frontend/libs/components/transition-dialogue/tsconfig.lib.json new file mode 100644 index 0000000000..f0782e3dd8 --- /dev/null +++ b/frontend/libs/components/transition-dialogue/tsconfig.lib.json @@ -0,0 +1,45 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "dist", + "types": [ + "node", + "@nx/react/typings/cssmodule.d.ts", + "@nx/react/typings/image.d.ts", + "vite/client" + ], + "rootDir": "src", + "jsx": "react-jsx", + "tsBuildInfoFile": "dist/tsconfig.lib.tsbuildinfo" + }, + "exclude": [ + "out-tsc", + "dist", + "**/*.spec.ts", + "**/*.test.ts", + "**/*.spec.tsx", + "**/*.test.tsx", + "**/*.spec.js", + "**/*.test.js", + "**/*.spec.jsx", + "**/*.test.jsx", + "vite.config.ts", + "vite.config.mts", + "vitest.config.ts", + "vitest.config.mts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.test.tsx", + "src/**/*.spec.tsx", + "src/**/*.test.js", + "src/**/*.spec.js", + "src/**/*.test.jsx", + "src/**/*.spec.jsx" + ], + "include": [ + "src/**/*.js", + "src/**/*.jsx", + "src/**/*.ts", + "src/**/*.tsx" + ] +} diff --git a/frontend/libs/components/transition-dialogue/tsconfig.spec.json b/frontend/libs/components/transition-dialogue/tsconfig.spec.json new file mode 100644 index 0000000000..18b7de51b8 --- /dev/null +++ b/frontend/libs/components/transition-dialogue/tsconfig.spec.json @@ -0,0 +1,34 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./out-tsc/vitest", + "types": [ + "vitest/globals", + "vitest/importMeta", + "vite/client", + "node", + "vitest" + ], + "jsx": "react-jsx" + }, + "include": [ + "vite.config.ts", + "vite.config.mts", + "vitest.config.ts", + "vitest.config.mts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.test.tsx", + "src/**/*.spec.tsx", + "src/**/*.test.js", + "src/**/*.spec.js", + "src/**/*.test.jsx", + "src/**/*.spec.jsx", + "src/**/*.d.ts" + ], + "references": [ + { + "path": "./tsconfig.lib.json" + } + ] +} diff --git a/frontend/libs/components/transition-dialogue/vite.config.ts b/frontend/libs/components/transition-dialogue/vite.config.ts new file mode 100644 index 0000000000..6772b2eea5 --- /dev/null +++ b/frontend/libs/components/transition-dialogue/vite.config.ts @@ -0,0 +1,49 @@ +/// +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; +import dts from 'vite-plugin-dts'; +import * as path from 'path'; + +export default defineConfig(() => ({ + root: __dirname, + cacheDir: '../../../node_modules/.vite/libs/components/transition-dialogue', + plugins: [react(), dts({ entryRoot: 'src', tsconfigPath: path.join(__dirname, 'tsconfig.lib.json') })], + // Uncomment this if you are using workers. + // worker: { + // plugins: [ nxViteTsPaths() ], + // }, + // Configuration for building your library. + // See: https://vitejs.dev/guide/build.html#library-mode + build: { + outDir: './dist', + emptyOutDir: true, + reportCompressedSize: true, + commonjsOptions: { + transformMixedEsModules: true, + }, + lib: { + // Could also be a dictionary or array of multiple entry points. + entry: 'src/index.ts', + name: '@storyteller/ui-transition-dialogue', + fileName: 'index', + // Change this to the formats you want to support. + // Don't forget to update your package.json as well. + formats: ['es' as const] + }, + rollupOptions: { + // External packages that should not be bundled into your library. + external: ['react','react-dom','react/jsx-runtime'] + }, + }, + test: { + watch: false, + globals: true, + environment: 'jsdom', + include: ['{src,tests}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], + reporters: ['default'], + coverage: { + reportsDirectory: './test-output/vitest/coverage', + provider: 'v8' as const, + } + }, +})); diff --git a/frontend/package-lock.json b/frontend/package-lock.json index bfa9082d3e..b230f22bc0 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1353,7 +1353,9 @@ "node": ">=18.0.0" } }, - "apps/editor3d/common": {}, + "apps/editor3d/common": { + "extraneous": true + }, "apps/editor3d/node_modules/@esbuild/aix-ppc64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", @@ -2150,6 +2152,7 @@ }, "apps/editor3d/proxy": { "version": "1.0.0", + "extraneous": true, "license": "ISC", "dependencies": { "canvas": "^2.11.2", @@ -2191,10 +2194,18 @@ "name": "@storyteller/interfaces", "version": "0.0.1" }, + "libs/common/types": { + "name": "@storyteller/types", + "version": "0.0.1" + }, "libs/components/button": { "name": "@storyteller/ui-button", "version": "0.0.1" }, + "libs/components/camera-settings-modal": { + "name": "@storyteller/ui-camera-settings-modal", + "version": "0.0.1" + }, "libs/components/close-button": { "name": "@storyteller/ui-close-button", "version": "0.0.1" @@ -2243,6 +2254,10 @@ "name": "@storyteller/ui-settings-modal", "version": "0.0.1" }, + "libs/components/slider-v2": { + "name": "@storyteller/ui-sliderv2", + "version": "0.0.1" + }, "libs/components/tab-selector": { "name": "@storyteller/ui-tab-selector", "version": "0.0.1" @@ -2255,6 +2270,10 @@ "name": "@storyteller/ui-tooltip", "version": "0.0.1" }, + "libs/components/transition-dialogue": { + "name": "@storyteller/ui-transition-dialogue", + "version": "0.0.1" + }, "libs/login": { "name": "@frontend/login", "version": "0.0.1" @@ -4155,21 +4174,6 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/@derhuerst/http-basic": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@derhuerst/http-basic/-/http-basic-8.2.4.tgz", - "integrity": "sha512-F9rL9k9Xjf5blCz8HsJRO4diy111cayL2vkY2XE4r4t3n0yPXVYy3KD3nJ1qbrSn9743UWSXH4IwuCa/HWlGFw==", - "license": "MIT", - "dependencies": { - "caseless": "^0.12.0", - "concat-stream": "^2.0.0", - "http-response-object": "^3.0.1", - "parse-cache-control": "^1.0.1" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@emnapi/core": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.4.0.tgz", @@ -5373,50 +5377,6 @@ "integrity": "sha512-3sRl+pkyFY/kLmHl0cgHiFp2xEqErA8N3ECjMs7serSUBmoJ70lBa0PG5t0IM6WJgdZNyyI0R8YFfi5wM8+mzg==", "license": "Apache-2.0" }, - "node_modules/@mapbox/node-pre-gyp": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", - "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", - "license": "BSD-3-Clause", - "dependencies": { - "detect-libc": "^2.0.0", - "https-proxy-agent": "^5.0.0", - "make-dir": "^3.1.0", - "node-fetch": "^2.6.7", - "nopt": "^5.0.0", - "npmlog": "^5.0.1", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.11" - }, - "bin": { - "node-pre-gyp": "bin/node-pre-gyp" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "license": "MIT", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/make-dir/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/@mdx-js/mdx": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-2.3.0.tgz", @@ -10295,10 +10255,18 @@ "resolved": "libs/tauri-utils", "link": true }, + "node_modules/@storyteller/types": { + "resolved": "libs/common/types", + "link": true + }, "node_modules/@storyteller/ui-button": { "resolved": "libs/components/button", "link": true }, + "node_modules/@storyteller/ui-camera-settings-modal": { + "resolved": "libs/components/camera-settings-modal", + "link": true + }, "node_modules/@storyteller/ui-close-button": { "resolved": "libs/components/close-button", "link": true @@ -10347,6 +10315,10 @@ "resolved": "libs/components/settings-modal", "link": true }, + "node_modules/@storyteller/ui-sliderv2": { + "resolved": "libs/components/slider-v2", + "link": true + }, "node_modules/@storyteller/ui-tab-selector": { "resolved": "libs/components/tab-selector", "link": true @@ -10359,6 +10331,10 @@ "resolved": "libs/components/tooltip", "link": true }, + "node_modules/@storyteller/ui-transition-dialogue": { + "resolved": "libs/components/transition-dialogue", + "link": true + }, "node_modules/@svgr/babel-plugin-add-jsx-attribute": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-8.0.0.tgz", @@ -11480,16 +11456,6 @@ "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==", "license": "MIT" }, - "node_modules/@types/cors": { - "version": "2.8.17", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz", - "integrity": "sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/debug": { "version": "4.1.12", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", @@ -11550,23 +11516,6 @@ "@types/estree": "*" } }, - "node_modules/@types/ffmpeg-static": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/ffmpeg-static/-/ffmpeg-static-3.0.3.tgz", - "integrity": "sha512-wmjANN0CiYs5clQESK+xE6plet0y9ndqaNBdQx4IIw7ZbPBMQw+14Lq4ky2WqMqGlpFJ9ZUxU0O43TvVZziyyA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/fluent-ffmpeg": { - "version": "2.1.27", - "resolved": "https://registry.npmjs.org/@types/fluent-ffmpeg/-/fluent-ffmpeg-2.1.27.tgz", - "integrity": "sha512-QiDWjihpUhriISNoBi2hJBRUUmoj/BMTYcfz+F+ZM9hHWBYABFAE6hjP/TbCZC0GWwlpa3FzvHH9RzFeRusZ7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/hast": { "version": "2.3.10", "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.10.tgz", @@ -13737,12 +13686,6 @@ "dev": true, "license": "BSD-3-Clause" }, - "node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "license": "ISC" - }, "node_modules/abort-controller": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", @@ -13813,6 +13756,7 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, "license": "MIT", "dependencies": { "debug": "4" @@ -13969,26 +13913,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", - "license": "ISC" - }, - "node_modules/are-we-there-yet": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", - "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", - "deprecated": "This package is no longer supported.", - "license": "ISC", - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/arg": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", @@ -14913,27 +14837,6 @@ ], "license": "CC-BY-4.0" }, - "node_modules/canvas": { - "version": "2.11.2", - "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.11.2.tgz", - "integrity": "sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==", - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "@mapbox/node-pre-gyp": "^1.0.0", - "nan": "^2.17.0", - "simple-get": "^3.0.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", - "license": "Apache-2.0" - }, "node_modules/ccapture.js": { "version": "1.0.8", "resolved": "git+ssh://git@github.com/aceslowman/ccapture.js.git#98b8046970c2bfbb25f749e732f196e15c3486fd", @@ -15281,15 +15184,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "license": "MIT" }, - "node_modules/color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "license": "ISC", - "bin": { - "color-support": "bin.js" - } - }, "node_modules/colorette": { "version": "2.0.20", "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", @@ -15344,10 +15238,6 @@ "node": ">= 10" } }, - "node_modules/common": { - "resolved": "apps/editor3d/common", - "link": true - }, "node_modules/compare-versions": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.1.tgz", @@ -15413,23 +15303,9 @@ "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, "license": "MIT" }, - "node_modules/concat-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", - "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", - "engines": [ - "node >= 6.0" - ], - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.0.2", - "typedarray": "^0.0.6" - } - }, "node_modules/confbox": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.2.2.tgz", @@ -15443,12 +15319,6 @@ "dev": true, "license": "MIT" }, - "node_modules/console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", - "license": "ISC" - }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -15545,19 +15415,6 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "license": "MIT" }, - "node_modules/cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "license": "MIT", - "dependencies": { - "object-assign": "^4", - "vary": "^1" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/corser": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz", @@ -15956,18 +15813,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/decompress-response": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", - "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", - "license": "MIT", - "dependencies": { - "mimic-response": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/dedent": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", @@ -16091,6 +15936,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "dev": true, "license": "MIT" }, "node_modules/depd": { @@ -16130,15 +15976,6 @@ "webgl-constants": "^1.1.1" } }, - "node_modules/detect-libc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", - "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, "node_modules/detect-port": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.6.1.tgz", @@ -16537,15 +16374,6 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/environment": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", @@ -18418,22 +18246,6 @@ "dev": true, "license": "MIT" }, - "node_modules/ffmpeg-static": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ffmpeg-static/-/ffmpeg-static-5.2.0.tgz", - "integrity": "sha512-WrM7kLW+do9HLr+H6tk7LzQ7kPqbAgLjdzNE32+u3Ff11gXt9Kkkd2nusGFrlWMIe+XaA97t+I8JS7sZIrvRgA==", - "hasInstallScript": true, - "license": "GPL-3.0-or-later", - "dependencies": { - "@derhuerst/http-basic": "^8.2.0", - "env-paths": "^2.2.0", - "https-proxy-agent": "^5.0.0", - "progress": "^2.0.3" - }, - "engines": { - "node": ">=16" - } - }, "node_modules/figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -18642,24 +18454,6 @@ "dev": true, "license": "ISC" }, - "node_modules/fluent-ffmpeg": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fluent-ffmpeg/-/fluent-ffmpeg-2.1.3.tgz", - "integrity": "sha512-Be3narBNt2s6bsaqP6Jzq91heDgOEaDCJAXcE3qcma/EJBSy5FB4cvO31XBInuAuKBx8Kptf8dkhjK0IOru39Q==", - "license": "MIT", - "dependencies": { - "async": "^0.2.9", - "which": "^1.1.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/fluent-ffmpeg/node_modules/async": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "integrity": "sha512-eAkdoKxU6/LkKDBzLpT+t6Ff5EtfSF4wx1WfJiPEEV7WNLnDaRXk0oVysiEPm262roaachGexwUv94WhSgN5TQ==" - }, "node_modules/follow-redirects": { "version": "1.15.9", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", @@ -18856,6 +18650,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, "license": "ISC" }, "node_modules/fsevents": { @@ -18911,27 +18706,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/gauge": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", - "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", - "deprecated": "This package is no longer supported.", - "license": "ISC", - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.1", - "object-assign": "^4.1.1", - "signal-exit": "^3.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/generic-names": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/generic-names/-/generic-names-4.0.0.tgz", @@ -19347,12 +19121,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", - "license": "ISC" - }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -19584,21 +19352,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/http-response-object": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", - "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", - "license": "MIT", - "dependencies": { - "@types/node": "^10.0.3" - } - }, - "node_modules/http-response-object/node_modules/@types/node": { - "version": "10.17.60", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", - "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==", - "license": "MIT" - }, "node_modules/http-server": { "version": "14.1.1", "resolved": "https://registry.npmjs.org/http-server/-/http-server-14.1.1.tgz", @@ -19631,6 +19384,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, "license": "MIT", "dependencies": { "agent-base": "6", @@ -19779,6 +19533,7 @@ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, "license": "ISC", "dependencies": { "once": "^1.3.0", @@ -22931,18 +22686,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mimic-response": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", - "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", @@ -23247,12 +22990,6 @@ "thenify-all": "^1.0.0" } }, - "node_modules/nan": { - "version": "2.22.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.2.tgz", - "integrity": "sha512-DANghxFkS1plDdRsX0X9pm0Z6SJNN6gBdtXfanwoZ8hooC5gosGFSBGRYHUVPz1asKA/kMRqDRdHrluZ61SpBQ==", - "license": "MIT" - }, "node_modules/nanoid": { "version": "3.3.11", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", @@ -23309,6 +23046,7 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, "license": "MIT", "dependencies": { "whatwg-url": "^5.0.0" @@ -23353,21 +23091,6 @@ "node": ">=6" } }, - "node_modules/nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "license": "ISC", - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/normalize-package-data": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz", @@ -26290,19 +26013,6 @@ "inBundle": true, "license": "ISC" }, - "node_modules/npmlog": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", - "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", - "deprecated": "This package is no longer supported.", - "license": "ISC", - "dependencies": { - "are-we-there-yet": "^2.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^3.0.0", - "set-blocking": "^2.0.0" - } - }, "node_modules/nth-check": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", @@ -26774,11 +26484,6 @@ "node": ">=6" } }, - "node_modules/parse-cache-control": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", - "integrity": "sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==" - }, "node_modules/parse-entities": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.2.tgz", @@ -26885,6 +26590,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -27573,15 +27279,6 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "license": "MIT" }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/promise-inflight": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", @@ -27652,10 +27349,6 @@ "node": ">=12.0.0" } }, - "node_modules/proxy": { - "resolved": "apps/editor3d/proxy", - "link": true - }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -28578,6 +28271,7 @@ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, "license": "ISC", "dependencies": { "glob": "^7.1.3" @@ -28593,6 +28287,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -28604,6 +28299,7 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -28624,6 +28320,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -28977,12 +28674,6 @@ "node": ">= 0.8.0" } }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "license": "ISC" - }, "node_modules/set-cookie-parser": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", @@ -29154,37 +28845,6 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "license": "ISC" }, - "node_modules/simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/simple-get": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz", - "integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==", - "license": "MIT", - "dependencies": { - "decompress-response": "^4.2.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, "node_modules/sirv": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.1.tgz", @@ -30522,6 +30182,7 @@ "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true, "license": "MIT" }, "node_modules/trim-lines": { @@ -30711,441 +30372,6 @@ "dev": true, "license": "0BSD" }, - "node_modules/tsx": { - "version": "4.19.3", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.3.tgz", - "integrity": "sha512-4H8vUNGNjQ4V2EOoGw005+c+dGuPSnhpPBPHBtsZdGZBk/iJb4kguGlPWaZTZ3q5nMtFOEsY0nRDlh9PJyd6SQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "~0.25.0", - "get-tsconfig": "^4.7.5" - }, - "bin": { - "tsx": "dist/cli.mjs" - }, - "engines": { - "node": ">=18.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - } - }, - "node_modules/tsx/node_modules/@esbuild/android-arm": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.2.tgz", - "integrity": "sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/@esbuild/android-arm64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.2.tgz", - "integrity": "sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/@esbuild/android-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.2.tgz", - "integrity": "sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/@esbuild/darwin-arm64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.2.tgz", - "integrity": "sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/@esbuild/darwin-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.2.tgz", - "integrity": "sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.2.tgz", - "integrity": "sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/@esbuild/freebsd-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.2.tgz", - "integrity": "sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/@esbuild/linux-arm": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.2.tgz", - "integrity": "sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/@esbuild/linux-arm64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.2.tgz", - "integrity": "sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/@esbuild/linux-ia32": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.2.tgz", - "integrity": "sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/@esbuild/linux-loong64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.2.tgz", - "integrity": "sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/@esbuild/linux-mips64el": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.2.tgz", - "integrity": "sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/@esbuild/linux-ppc64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.2.tgz", - "integrity": "sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/@esbuild/linux-riscv64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.2.tgz", - "integrity": "sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/@esbuild/linux-s390x": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.2.tgz", - "integrity": "sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/@esbuild/linux-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.2.tgz", - "integrity": "sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/@esbuild/netbsd-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.2.tgz", - "integrity": "sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/@esbuild/openbsd-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.2.tgz", - "integrity": "sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/@esbuild/sunos-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.2.tgz", - "integrity": "sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/@esbuild/win32-arm64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.2.tgz", - "integrity": "sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/@esbuild/win32-ia32": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.2.tgz", - "integrity": "sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/@esbuild/win32-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.2.tgz", - "integrity": "sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsx/node_modules/esbuild": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.2.tgz", - "integrity": "sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.2", - "@esbuild/android-arm": "0.25.2", - "@esbuild/android-arm64": "0.25.2", - "@esbuild/android-x64": "0.25.2", - "@esbuild/darwin-arm64": "0.25.2", - "@esbuild/darwin-x64": "0.25.2", - "@esbuild/freebsd-arm64": "0.25.2", - "@esbuild/freebsd-x64": "0.25.2", - "@esbuild/linux-arm": "0.25.2", - "@esbuild/linux-arm64": "0.25.2", - "@esbuild/linux-ia32": "0.25.2", - "@esbuild/linux-loong64": "0.25.2", - "@esbuild/linux-mips64el": "0.25.2", - "@esbuild/linux-ppc64": "0.25.2", - "@esbuild/linux-riscv64": "0.25.2", - "@esbuild/linux-s390x": "0.25.2", - "@esbuild/linux-x64": "0.25.2", - "@esbuild/netbsd-arm64": "0.25.2", - "@esbuild/netbsd-x64": "0.25.2", - "@esbuild/openbsd-arm64": "0.25.2", - "@esbuild/openbsd-x64": "0.25.2", - "@esbuild/sunos-x64": "0.25.2", - "@esbuild/win32-arm64": "0.25.2", - "@esbuild/win32-ia32": "0.25.2", - "@esbuild/win32-x64": "0.25.2" - } - }, "node_modules/turbo-stream": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/turbo-stream/-/turbo-stream-2.4.0.tgz", @@ -31263,12 +30489,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "license": "MIT" - }, "node_modules/typescript": { "version": "5.7.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", @@ -32848,6 +32068,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true, "license": "BSD-2-Clause" }, "node_modules/webm-writer": { @@ -32980,6 +32201,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, "license": "MIT", "dependencies": { "tr46": "~0.0.3", @@ -32990,6 +32212,7 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, "license": "ISC", "dependencies": { "isexe": "^2.0.0" @@ -33108,15 +32331,6 @@ "node": ">=8" } }, - "node_modules/wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "license": "ISC", - "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index 8841168015..b46fc49a05 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -74,6 +74,18 @@ }, { "path": "./libs/common/interfaces" + }, + { + "path": "./libs/components/camera-settings-modal" + }, + { + "path": "./libs/components/transition-dialogue" + }, + { + "path": "./libs/components/slider-v2" + }, + { + "path": "./libs/common/types" } ] }