- Eliminated the `sqids` package from the project, simplifying ID generation.
- Updated ID allocation logic to use native methods for generating unique IDs, enhancing performance and maintainability.
- Added `@diffusionstudio/assets` dependency to improve asset management capabilities across applications.
- Adjusted related components to reflect changes in ID handling, ensuring consistent functionality.
- Updated `AssetThumbnail` and `LazyAssetItem` components to improve layout and rendering performance by adjusting CSS classes.
- Refactored audio peak derivation to utilize a dedicated web worker, enhancing responsiveness by offloading processing from the main thread.
- Simplified the `derivePeaks` function to communicate with the new worker, improving code organization and maintainability.
- Added utility functions for managing TCP port listeners in the development environment, ensuring smoother server restarts.
- Introduced `AssetCache` to manage derived data such as thumbnails and audio peaks, stored under a new `cache/` directory.
- Implemented methods for deriving and retrieving thumbnails and audio peaks, enhancing performance by reducing redundant calculations.
- Updated asset management to utilize the cache, ensuring efficient access to derived data during rendering.
- Enhanced the `AssetThumbnail` component to support cached thumbnails, improving loading times and user experience.
- Refactored related components and systems to integrate caching functionality, streamlining asset handling across the application.
- Added support for asset manifests with read and write capabilities, allowing for better organization of project assets.
- Introduced new project channels for manifest reading and writing, enhancing communication between main and renderer processes.
- Improved file system interactions with new methods for listing, statting, and removing project files, streamlining asset management.
- Updated package dependencies to include `yaml` for manifest handling and linked `@diffusionstudio/assets` for asset management.
- Refactored existing code to integrate new asset handling features and improve overall project structure.
- Introduced `TextCase` type for controlling glyph casing during rendering, with options for original, upper, and lower case.
- Added `TextRange` as a sub-entity for `<text>`, allowing style overrides for specific runs of glyphs by character index.
- Updated `TextProps` to include new properties such as `letterSpacing`, `leading`, and `textCase`, enhancing text styling capabilities.
- Enhanced rendering logic to support the new `TextRange` functionality, ensuring proper application of styles and colors.
- Updated migration documentation to reflect the addition of text handling features, detailing their usage and integration within existing structures.
- Introduced `BlendMode` type for composite operations, enhancing visual effects management.
- Added `SurfaceHandle` and `SurfacePaintProps` to support surface rendering, allowing for dynamic canvas handling.
- Updated `CommonProps` to include `CompositeProps`, integrating blend mode and visibility properties.
- Enhanced rendering systems to accommodate new surface and blend mode functionalities, ensuring accurate visual output.
- Updated migration documentation to reflect the addition of blend mode and surface features, detailing their usage and integration within existing structures.
- Removed `PATCH_PROP_KEYS` and `PatchProps`, streamlining property management as the document structure no longer requires patching by prop name.
- Updated type definitions to introduce new internal prop groups (`IdentityProps`, `PositionProps`, `OffsetProps`, `SizeProps`, `TransformProps`, `TimingProps`, `SequenceItemProps`), enhancing clarity and organization of properties.
- Refactored animation and keyframe structures to utilize `<animation>` and `<keyframeTrack>` elements, ensuring consistent handling of animatable properties.
- Updated migration documentation to reflect the removal of obsolete structures and the introduction of new prop groups, detailing their usage in the context of animations and keyframes.
- Introduced `<animation>` as a new sub-entity, enabling the management of animations with properties such as `type`, `phase`, `duration`, and `delay`.
- Updated type definitions to include `AnimationProps` and `AnimationType`, defining properties for various animation effects.
- Enhanced rendering and entity management to accommodate animation entities, ensuring proper handling during rendering.
- Updated migration documentation to reflect the addition of animation features, detailing their usage and integration within existing structures.
- Introduced `<keyframe>` and `<keyframeTrack>` as new sub-entities, enabling the management of animatable properties through keyframes.
- Updated type definitions to include `KeyframeProps`, `KeyframeTrackProps`, and `AnimatableProperty`, defining properties for keyframe animations.
- Enhanced rendering and entity management to accommodate keyframe entities, ensuring proper handling of animations during rendering.
- Updated migration documentation to reflect the addition of keyframe features, detailing their usage and integration within existing structures.
- Introduced `<effect>` as a new sub-entity, allowing for filter effects to be applied to rendered pixels of parent entities.
- Updated type definitions to include `EffectProps` and `EffectType`, defining properties for various filter effects.
- Enhanced rendering and entity management to accommodate effect entities, ensuring proper application of filters during rendering.
- Updated migration documentation to reflect the addition of effect features, detailing their usage and integration within existing structures.
- Introduced `<stroke>` and `<shadow>` as new sub-entities, allowing for enhanced styling options in geometry elements.
- Updated type definitions to include `StrokeProps` and `ShadowProps`, defining properties for stroke styles and shadow effects.
- Enhanced rendering and entity management to accommodate stroke and shadow entities, ensuring proper application of styles during rendering.
- Updated migration documentation to reflect the addition of stroke and shadow features, detailing their usage and integration within existing structures.
- Introduced new `Opacity` and `BlendMode` traits to replace the previous `Appearance` trait, enhancing clarity in managing entity properties.
- Updated rendering systems to utilize the new traits, ensuring accurate application of opacity and blend modes during rendering.
- Enhanced gradient handling to support color stops with opacity, improving visual fidelity in gradient rendering.
- Refactored various systems to streamline the management of color and opacity, ensuring consistent behavior across entities.
- Removed obsolete properties related to color stops, simplifying the data structure and improving maintainability.
- Updated the encoder to exclude geometries from scene fills, ensuring accurate rendering of paint entities.
- Introduced intrinsic paint handling for geometries, allowing them to manage their own paint traits.
- Enhanced the rendering system to support intrinsic media, improving the visual output of image, video, and sequence paints.
- Refactored time management functions to account for asset changes and intrinsic properties, ensuring accurate duration calculations.
- Improved observer functionality to react to asset removals, maintaining consistency in entity state management.
- Implemented `copy` and `paste` methods in `DocumentEditor` to manage entity copying and pasting, allowing users to duplicate entities within the document structure.
- Introduced `copySelection` and `pasteSelection` functions in `shortcuts.ts` to bind the copy and paste actions to keyboard shortcuts (mod + c and mod + v).
- Enhanced clipboard management to store the copied entities and their parent context, ensuring accurate pasting behavior.
- Updated migration documentation to reflect the new copy and paste features and their interaction with the document structure.
- Added a new `duplicate` method in `DocumentEditor` to copy selected entities and their subtrees, ensuring they are inserted correctly in the document structure.
- Introduced `duplicateSelection` function in `shortcuts.ts` to bind the duplication action to the keyboard shortcut (mod + d).
- Enhanced the `authoredTree` function to retrieve the subtree structure for duplication, and implemented `renderAuthored` to build host nodes from the authored tree.
- Updated the migration documentation to reflect the new duplication feature and its behavior regarding entity selection and positioning.
- Implemented handling for `<group>` entities, which now consist of `Group` and `Position` traits, with their size determined by the union of their children's bounds.
- Introduced `<sequence>` entities that utilize the `Sequential` trait, ensuring they maintain spatial traits off and sit at their parent's origin.
- Updated error handling to include new entity types in the unsupported tag message.
- Enhanced property setting logic to prevent spatial properties from being applied to `Sequential` entities, improving entity management and consistency in the document structure.
- Introduced `SourceUnroll` and `LoopIteration` types to support unrolling loop elements into individual iterations, allowing for more granular editing of looped content.
- Updated `DocumentEditor` to manage unroll edits, ensuring that edits to looped entities are handled correctly and reported accurately.
- Enhanced `EditWriter` to process unroll edits first during project writes, ensuring proper management of looped elements.
- Added `LOOP_ATTR` to track the source of loop elements, facilitating the editor's ability to manage and unroll loops effectively.
- Refactored related components and types to improve clarity and maintainability in handling looped entities and their iterations.
- Introduced a new `TextParts` trait to manage text nodes associated with entities, ensuring proper order and state management.
- Replaced the previous Map-based text storage with a Set to maintain insertion order and simplify text node handling.
- Updated methods for inserting, detaching, and synchronizing text nodes, enhancing the overall efficiency and clarity of text management within the document.
- Removed obsolete methods related to text handling, streamlining the codebase and improving maintainability.
- Introduced `nudgeSelection` function to move selected nodes by specified `dx` and `dy` values, allowing for precise adjustments without snapping.
- Updated keyboard shortcuts to include nudge actions for arrow keys, enabling users to nudge selected entities with and without the shift modifier.
- Enhanced the existing shortcut system to improve user interaction and editing capabilities within the document editor.
- Introduced `SourceRemove` and `RemoveEdit` interfaces to support element deletion, allowing for the removal of elements and their descendants from the document structure.
- Updated `DocumentEditor` to handle the removal of entities, ensuring that deleted elements are accurately reported and managed within the editor.
- Enhanced `EditWriter` to track and process removal edits, ensuring proper cleanup of related inserts and moves during project writes.
- Implemented a new `shortcutSystem` to manage keyboard shortcuts, enabling actions like deletion of selected entities via backspace and delete keys.
- Refactored input handling to utilize the updated `Keys` trait, improving responsiveness to key events and maintaining accurate state during interactions.
- Streamlined event handling in the HUD and input systems to reflect changes in key state management, enhancing overall user experience.
- Introduced `SourceMove` interface to facilitate element movement within the JSX structure, allowing elements to be repositioned without altering their content.
- Updated `DocumentEditor` to support reparenting of entities, enabling dynamic changes in the entity hierarchy while maintaining accurate reporting of moves.
- Refactored `EditWriter` to handle move edits alongside insertions, ensuring proper management of element positions during project writes.
- Improved cursor update logic in `CameraController` to reflect the current interaction state, enhancing user experience during editing operations.
- Streamlined event handling in the engine to support new pointer event types, improving responsiveness to user interactions.
- Removed obsolete `use-running` hook to simplify the codebase and improve clarity in engine state management.
- Updated the engine instantiation in `EngineProvider` to use a new `createEngine` function for improved clarity.
- Refactored the `Engine` class to directly manage system execution, replacing the previous `runSystems` function with individual system calls for playback, motion, transform, and rendering.
- Removed the obsolete `schedule` system file to streamline the engine's architecture.
- Enhanced the overall structure and readability of the engine code, aligning with best practices for modular design.
- Replaced `switchActiveScene` with a new `activate` method in `DocumentEditor` to manage the active entity more effectively.
- Updated `DrawOverlay` and `SceneInitOverlay` components to utilize the new `activate` method, streamlining scene selection.
- Introduced `Active` trait to represent the active entity directly, enhancing clarity in entity management.
- Refactored related hooks and actions to align with the new active entity handling, improving overall code consistency and maintainability.
- Introduced `selected` property in `PatchProps` to track entity selection state, allowing for better management of selected elements.
- Enhanced `DocumentEditor` with `select`, `deselect`, and `clearSelection` methods to handle entity selection and deselection, improving user interaction.
- Updated `setProp` function to remove attributes for boolean props when set to false, ensuring cleaner output and accurate representation of selection state.
- Refactored `DrawOverlay` and `SceneInitOverlay` components to utilize the new selection management, streamlining the selection process in the editor.
- Adjusted related types and documentation to reflect the new selection handling capabilities.
- Updated `SourceInsert` and `InsertEdit` interfaces to include `text` for handling literal text content in elements.
- Introduced `jsxText` function for proper text content formatting in JSX.
- Refactored `DrawOverlay` and `SceneInitOverlay` components to utilize the new text handling features and improved tool management.
- Implemented `useTool` hook for reactive access to the current tool, enhancing the toolbar and tool menu functionality.
- Enhanced `DocumentEditor` to manage text node insertion and editing, improving overall document interaction.
- Introduced `TextNode` and `HostNode` types to accommodate text entities alongside scene nodes, improving the document's flexibility.
- Updated `RuntimeDocument` and `DocumentEditor` to handle text node creation, property management, and insertion logic.
- Enhanced methods for text node manipulation, including `createTextNode`, `replaceText`, and `isTextNode`, ensuring proper handling of text within the document structure.
- Refactored entity management to support the new text handling features, improving overall document interaction and editing capabilities.
- Introduced a new `useEditor` hook to streamline document editing operations, replacing the previous `useDocument` hook.
- Updated components (BackgroundSettings, InspectorHeader, CameraController) to utilize the new `useEditor` for managing property edits and reporting changes.
- Enhanced the `DocumentEditor` class to handle property edits and element insertions, improving the connection between the editor and the JSX source.
- Refactored the `EditWriter` class to manage pending edits and ensure accurate write-backs to the project, supporting real-time updates.
- Removed the obsolete `useProject` hook to simplify project management and improve code clarity.
- Replaced references to `DocumentRoot` with `Stage` across the codebase, aligning with the new stage model.
- Updated entity management and hierarchy functions to reflect the transition from document-based to stage-based parenting.
- Adjusted comments and documentation to clarify the role of the stage in the entity structure.
- Enhanced queries and actions to utilize the new stage terminology, ensuring consistency throughout the runtime environment.
- Introduced new time-related traits: `Start`, `End`, `SourceIn`, and `SourceOut`, to better manage authored time values.
- Implemented `toSeconds` function for parsing time inputs, ensuring accurate conversion to project frames based on the `FrameRate` trait.
- Updated entity management to handle the new time traits, allowing for dynamic addition and removal based on user input.
- Streamlined the logic for managing time properties within entities, improving responsiveness to changes in authored time values.
- Replaced the `Delay` and `Trim` traits with four distinct traits: `Start`, `End`, `SourceIn`, and `SourceOut`, to better represent authored time values.
- Updated entity creation and serialization processes to accommodate the new timing traits, ensuring accurate handling of time-related properties.
- Refactored time range computation logic to utilize the new traits, enhancing clarity and consistency in how entities are managed within the timeline.
- Streamlined the propagation of time changes across entities, improving responsiveness to edits in authored time values.
- Replaced direct entity spawning with a new `createEntity` function for improved clarity and consistency.
- Updated the handling of `<scene>` and `<rect>` elements to utilize the new entity creation approach, ensuring proper component addition and resizing.
- Streamlined child entity management by refining the append and remove logic, enhancing overall document interaction.
- Added `ts-morph` as a dependency to facilitate advanced JSX editing capabilities.
- Introduced a new `edit.ts` module to manage JSX element modifications, separating reading and writing logic from the previous `source.ts`.
- Updated imports across the project to reflect the new structure, ensuring consistent usage of the editing functionalities.
- Enhanced the `sourcePlugin` to maintain compatibility with the new editing approach while ensuring accurate JSX element tracking.
- Removed obsolete code from `source.ts` to streamline the module and improve maintainability.
- Removed the `<rect>` element's promotion to a scene, simplifying the element structure.
- Introduced `<scene>` as a new top-level element under `<stage>`, allowing for clipped, playable frames in compositions.
- Updated `RuntimeDocument` to handle `<scene>` creation and management, ensuring proper entity spawning and timeline ownership.
- Enhanced type definitions in the JSX package to include `SceneProps`, improving integration with the new scene functionality.
- Refactored entity management methods to support the new scene structure and ensure correct parent-child relationships in the document.
- Updated camera control functions to utilize the new useDocument hook for reporting camera edits.
- Enhanced CameraController to report camera matrix changes directly to the document, ensuring real-time updates.
- Refactored InspectorHeader and BackgroundSettings to improve clarity and consistency in camera and background management.
- Introduced CameraMatrix type for better type handling in camera-related operations, enhancing overall code quality.
- Added support for writing project edits back to JSX, allowing real-time updates from the editor to the source files.
- Introduced new `writeProject` function to handle edits, ensuring changes are reflected in the project's JSX without triggering a full compile.
- Updated `main-channels` to include a new `PROJECTS_WRITE` channel for handling write requests.
- Enhanced `RuntimeDocument` to manage edits and maintain a connection between the editor and the JSX source.
- Improved type definitions in the JSX package to support new source properties, ensuring better integration with the editing workflow.
- Updated BackgroundSettings to utilize the new useDocument hook for managing background properties.
- Enhanced RuntimeDocument to streamline background color parsing and setting, ensuring consistent handling of background traits.
- Refactored mount function to create RuntimeDocument instances through a dedicated factory method, improving clarity and encapsulation.
- Adjusted color parsing logic to handle both string and number inputs, enhancing flexibility in background color management.
- Revised the description in package.json for @diffusionstudio/jsx to clarify its role in authoring Diffusion Studio compositions.
- Enhanced README.md to better explain the package's purpose and clarify that it carries no renderer.
- Deleted obsolete document.ts, elements.ts, and renderer.ts files to streamline the codebase and remove unused components.
- Updated index.ts to reflect changes in exports and improve clarity on the authoring surface and hooks provided by the package.
- Introduced CameraController to manage camera input and gestures, enhancing user interaction with the canvas.
- Updated Canvas component to include CameraController alongside EngineCanvas for improved functionality.
- Refactored InspectorHeader to utilize new camera scaling and zooming methods, streamlining the zoom management process.
- Enhanced camera-related hooks and actions for better integration with the new camera system.
- Updated documentation and comments to clarify the new camera management approach and its implications for component interactions.
- Updated various components and systems to replace direct world access with the Root entity for managing traits like Camera and Background.
- Enhanced BackgroundSettings and useCamera hooks to reflect the new approach in trait retrieval.
- Simplified entity management in the RuntimeDocument and other systems by ensuring consistent access to the Root entity.
- Removed deprecated getDocument function and adjusted related logic for improved clarity and performance.
- Updated various systems and actions to eliminate checks for the Deleted trait in entity queries, simplifying the logic and improving performance.
- Adjusted the handling of entity collections to ensure proper management of active entities without relying on soft deletion.
- Enhanced documentation to clarify the changes in entity lifecycle management and the implications for system behavior.
- Updated various components to replace direct world access with getDocument for managing Camera and Background traits.
- Enhanced BackgroundSettings and useCamera hooks to reflect changes in trait retrieval.
- Adjusted encoder and rendering systems to ensure consistent access to document-level state.
- Improved documentation comments to clarify the new approach to managing document traits.
- Updated the `RuntimeDocument` class to manage entities directly, removing the `SceneNode` interface for a more straightforward approach.
- Simplified the `createElement` and `insertNode` methods to work with `Entity` types, enhancing clarity and reducing complexity.
- Improved background handling by directly setting the `Background` trait in the world.
- Refactored methods for node management, ensuring better integration with the entity system and removing deprecated code.
- Enhanced the `getParentNode` and child retrieval methods for improved hierarchy management.
- Updated the `setFill` method in `RuntimeDocument` to directly manage the entity's `Color` trait, simplifying fill handling.
- Introduced `renderIntrinsicFill` function to ensure the geometry's solid fill is rendered correctly beneath paint sub-entities.
- Enhanced text rendering to support intrinsic fills, allowing for better visual consistency in text elements.
- Updated comments and documentation for clarity on the role of the `Color` trait in rendering.
- Introduced new JSX_VERSION and SOLID_VERSION constants for better version management in package.json.
- Updated package.json to use @diffusionstudio/jsx for JSX support, ensuring compatibility with the latest features.
- Added jsxImportSource to tsconfig for improved JSX handling.
- Removed outdated TYPES definition and integrated StageProps into the JSX namespace for better type management.
- Commented out the SceneInitOverlay in Canvas component to streamline rendering.
- Integrated useProject hook in EditorPage for improved project context handling.
- Removed ProjectLoader from ProjectPage to simplify project management.
- Updated project exports to include use-project instead of loader.
- Deleted the unused ProjectLoader component to clean up the codebase.
- Renamed the default export function in the starter template from Scene to Project for clarity.
- Updated StageProps interface to include a background property for customizable canvas color.
- Removed redundant project-related UI elements from the dashboard view to streamline the user experience.
- Simplified the ProjectLoader component by eliminating unused camera fitting logic and related comments.
- Enhanced the RuntimeDocument class to better manage the stage and rect entities, including background handling.
- Added new project channels in main-channels.ts for retrieving, renaming, duplicating, and deleting projects.
- Updated main.ts to handle new project-related requests, enhancing the project lifecycle management.
- Improved ProjectInfo type to include displayName and updated related functions for better project metadata handling.
- Enhanced dashboard and file menu components to support new project operations with improved UI interactions.
- Refactored project management logic in projects.ts to streamline package.json handling and ensure consistency across project operations.