335 Commits

Author SHA1 Message Date
konstantin-paulus
e6597e394a Enhance entity management with new clipHeight and expanded properties
- Added `clipHeight` and `expanded` properties to the entity model, allowing for more flexible timeline management and UI representation.
- Updated the `index.ts` file to export the new `overlap` functionality, improving modularity.
- Enhanced the `RuntimeDocument` class to handle the new properties, ensuring proper entity state management.
- Improved overall code organization and readability across the affected components, setting the stage for future enhancements.
2026-08-20 13:42:41 +02:00
konstantin-paulus
b748276a26 Add wrap method to DocumentEditor for entity grouping and enhance shortcuts
- Introduced a new `wrap` method in the `DocumentEditor` class to group entities into a single wrapper element, maintaining their original positions and selection.
- Updated the `index.ts` file to export the new `split` functionality.
- Added a keyboard shortcut for the `splitAtPlayhead` action in the `shortcuts.ts` file, enhancing user interaction and editing capabilities.
- Improved overall code organization and readability across the affected components, setting the stage for future enhancements.
2026-08-20 13:23:27 +02:00
konstantin-paulus
c7277c7fb7 Refactor time management in Inspector for improved functionality and code organization
- Removed unused time-related functions and streamlined the `TimeSettings` component to utilize new timing hooks, enhancing performance and readability.
- Updated the handling of time input changes to directly interact with the entity, simplifying the logic and improving user experience.
- Introduced a new `duplicateInPlace` method in the `DocumentEditor` class to facilitate copying entities without disrupting their sequence, enhancing editing capabilities.
- Improved overall code organization and readability across the affected components, setting the stage for future enhancements.
2026-08-20 13:15:02 +02:00
konstantin-paulus
3e071c2929 Refactor ControlScrollArea to support scroll position persistence and enhance Inspector functionality
- Introduced a `scrollKey` prop to `ControlScrollArea` for remembering scroll offsets across component remounts, improving user experience during selection changes.
- Updated the `Inspector` component to utilize the new `scrollKey` feature, ensuring panels reset their state appropriately when selections change.
- Enhanced overall code organization and readability within the affected components, setting the stage for future improvements.
2026-08-20 12:50:55 +02:00
konstantin-paulus
e7ff64686a Enhance InterpolationSettings integration in Inspector for improved keyframe management
- Imported `InterpolationSettings` into the `Inspector` component, allowing users to manage easing for selected keyframes.
- Updated the `InterpolationSettings` component to utilize new hooks and improve state management, transitioning to a more reactive approach with `useEditor`.
- Enhanced the user interface for selecting easing types and presets, ensuring seamless integration with existing inspector functionalities.
- Improved overall code organization and readability across the inspector components, setting the stage for future enhancements.
2026-08-20 10:33:08 +02:00
konstantin-paulus
6734017991 Integrate CaptionSettings into Inspector for enhanced caption management
- Imported `CaptionSettings` into the `Inspector` component, enabling users to manage captions for selected entities.
- Updated the `CaptionSettings` component to utilize new hooks and improve state management, transitioning to a more reactive approach with `useEditor`.
- Enhanced the user interface for selecting caption presets, colors, and vertical alignment, ensuring seamless integration with existing inspector functionalities.
- Improved overall code organization and readability across the inspector components, setting the stage for future enhancements.
2026-08-20 10:25:46 +02:00
konstantin-paulus
df8272a6c4 Add boot splash screen functionality and styling to enhance user experience
- Introduced a new `BootSplash` component that displays a splash screen during the app's loading phase, improving the initial user experience.
- Implemented logic to remove the splash screen once the authentication state is resolved, ensuring a smooth transition.
- Added CSS styles for the splash screen, including animations and responsive design, to enhance visual appeal.
- Updated the main HTML structure to include the splash screen element, ensuring it integrates seamlessly with the existing layout.
2026-08-20 09:59:33 +02:00
konstantin-paulus
85c8585208 Enhance Inspector's Transform Settings for improved functionality and user experience
- Integrated new hooks and refactored components within the Transform Settings panel, transitioning to a more reactive approach with `useWorld` and `useEditor`.
- Updated the handling of transform properties such as position, rotation, offset, scale, skew, and constraints to support entity-based systems, enhancing user interaction.
- Improved keyframe synchronization for transform properties, ensuring accurate representation and editing capabilities.
- Enhanced overall code organization and readability across the inspector components, setting the stage for future enhancements.
2026-08-20 09:59:25 +02:00
konstantin-paulus
1caf194ada Refactor fill management in Inspector for improved functionality and performance
- Updated the `FillPicker`, `FillsSettings`, and related components to utilize new hooks and improve state management, transitioning to a more reactive approach with `useWorld` and `useEditor`.
- Refactored fill handling to support entity-based systems, enhancing user interaction and responsiveness.
- Introduced new gradient stop management functionality, allowing for dynamic editing of gradient fills.
- Improved overall code organization and readability across the inspector components, setting the stage for future enhancements.
2026-08-20 09:33:12 +02:00
konstantin-paulus
aa7929a4a5 Enhance AudioSettings integration in Inspector for improved audio management
- Updated the `AudioSettings` component to utilize new hooks and improve state management, transitioning to a more reactive approach with `useWorld` and `useEditor`.
- Refactored volume, mute, and solo controls to leverage the new entity-based system, enhancing user interaction and responsiveness.
- Improved keyframe synchronization for volume changes, ensuring accurate representation in the audio panel.
- Enhanced overall code organization and readability within the inspector components, setting the stage for future audio-related enhancements.
2026-08-20 09:06:10 +02:00
konstantin-paulus
f5cdb1d287 Integrate MasksSettings into Inspector for enhanced mask management
- Imported `MasksSettings` into the `Inspector` component, allowing users to manage masks for selected entities.
- Updated the `MasksSettings` component to utilize new hooks and improve state management, transitioning to a more reactive approach.
- Enhanced the user interface for adding and editing masks, ensuring seamless integration with existing inspector functionalities.
- Improved overall code organization and readability across the inspector components, setting the stage for future enhancements.
2026-08-20 09:00:01 +02:00
konstantin-paulus
edc79c4173 Integrate TransitionSettings into Inspector for enhanced transition management
- Imported `TransitionSettings` into the `Inspector` component, allowing users to manage transitions for selected entities.
- Updated the `TransitionSettings` component to utilize new hooks and improve state management, transitioning to a more reactive approach.
- Enhanced the user interface for adding and editing transitions, ensuring seamless integration with existing inspector functionalities.
- Improved overall code organization and readability across the inspector components, setting the stage for future enhancements.
2026-08-20 08:54:47 +02:00
konstantin-paulus
0b232ea1c8 Add animation management to Inspector with new animation types integration
- Introduced a new `animation-types.ts` file defining animation options and their properties, including groups and default values.
- Updated `AnimationsSettings` to utilize the new animation types, enhancing the user interface for selecting and managing animations.
- Refactored animation handling in `animations.tsx` to improve state management and reactivity using hooks from `@diffusionstudio/koota-solid`.
- Integrated animation options into the inspector, allowing for seamless addition and editing of animations for selected entities.
- Improved overall code organization and readability across the inspector components, setting the stage for future enhancements.
2026-08-20 08:50:56 +02:00
konstantin-paulus
95d8bc9e34 Add effects management to Inspector with new effect types integration
- Introduced a new `effect-types.ts` file defining effect options and their properties, including units and default values.
- Updated `EffectsInspector` to utilize the new effect types, enhancing the user interface for selecting and managing effects.
- Refactored `EffectsSettings` to support the addition of effects directly, improving the workflow for users.
- Enhanced state management using hooks from `@diffusionstudio/koota-solid`, ensuring better reactivity and performance.
- Improved overall code organization and readability across the inspector components, setting the stage for future enhancements.
2026-08-20 08:37:07 +02:00
konstantin-paulus
77c99430a7 Integrate ShadowsSettings into Inspector and enhance ShadowInspector functionality
- Imported `ShadowsSettings` into the `Inspector` component, allowing for shadow management for selected entities.
- Updated `ShadowInspector` to utilize new hooks and improve state management, transitioning to `useDerived` for reactive properties.
- Enhanced shadow editing capabilities, including color, opacity, offset, and blur adjustments, with proper keyframe synchronization.
- Improved overall code organization and readability across the inspector components, preparing for future enhancements.
2026-08-20 00:14:48 +02:00
konstantin-paulus
6366139e5a Enhance Inspector components with stroke settings integration
- Imported `StrokesSettings` into the `Inspector` component, enabling stroke management for selected entities.
- Updated the `StrokesSettings` component to utilize new hooks and improve state management, transitioning from `Set<number>` to `Entity[]` for better type safety.
- Removed unused keyframe target properties from `SolidFillPicker` and `ShadowInspector`, streamlining their functionality.
- Improved overall code readability and organization across the inspector components, preparing for future enhancements.
2026-08-19 23:59:09 +02:00
konstantin-paulus
3c72a3a011 Refactor TextPanel to improve font selection handling
- Replaced direct style property access with reactive signals for font family and weight in the TextPanel component, enhancing state management.
- Updated font family and weight change handlers to utilize the new signals, ensuring proper updates and preventing unnecessary edits.
- Adjusted the FontDropdown and Select components to reflect the new state management approach, improving user experience during text editing.
- Enhanced migration documentation to clarify the behavior of pickers that preview on hover, ensuring consistency in trait management.
2026-08-19 18:49:05 +02:00
konstantin-paulus
d9384e189b Enhance text editing capabilities in the editor
- Introduced a new `TextEdit` interface to handle changes to `<text>` elements, allowing for direct editing of their content.
- Updated the `DocumentEditor` class with an `editText` method to facilitate text updates, ensuring proper reporting of changes.
- Modified the `EditWriter` to manage text edits separately, integrating them into the overall editing workflow.
- Enhanced the `RuntimeDocument` class with a `setText` method to replace the content of `<text>` elements, maintaining the integrity of text nodes during rendering.
- Refactored the `SourceSet` interface to include a `text` property, enabling the writing of text content alongside element properties.
- Improved the `TextPanel` component to utilize the new text editing functionality, streamlining the user experience for text modifications.
2026-08-19 18:41:16 +02:00
konstantin-paulus
55dd6ab3d0 Refactor LayoutPanel and Inspector integration
- Introduced the `LayoutPanel` component to the `Inspector`, enhancing layout management for selected entities.
- Updated the `LayoutPanel` to utilize new hooks from `@diffusionstudio/koota-solid`, improving state management and interaction with the editor.
- Refactored entity selection handling within `LayoutPanel`, transitioning from `Set<number>` to `Entity[]` for better type safety and clarity.
- Enhanced resizing functionality to maintain aspect ratios and synchronize keyframe updates, improving user experience during layout adjustments.
- Cleaned up commented-out code and improved overall readability across the inspector components.
2026-08-19 18:22:25 +02:00
konstantin-paulus
e821756676 Update project configuration handling and export logic
- Refactored project configuration management to enhance scene-specific export settings, allowing for more granular control over how each scene is exported.
- Updated the `ExportPanel` to utilize the new `exportOf` method for retrieving scene-specific export configurations, improving the user experience.
- Modified the `ProjectConfig` class to support scene-based export settings, ensuring that exports are correctly mapped to their respective scene IDs.
- Improved documentation and comments throughout the code to clarify the structure and purpose of project export configurations.
2026-08-19 18:06:55 +02:00
konstantin-paulus
a2ef63a9eb Update engine to include ProjectConfig in world initialization and modify disposal logic
- Added ProjectConfig to the world initialization in create-engine.ts, enhancing project configuration management.
- Updated the disposal method in project-config.ts to set the ProjectConfigTrait to null instead of removing it, improving resource management and stability.
2026-08-19 17:55:53 +02:00
konstantin-paulus
97b829edcb Add project config read/write channels and implement config handling
- Introduced new channels for reading and writing project configuration from the `diffusion` field in `package.json`, enhancing project management capabilities.
- Implemented `readConfig` and `writeConfig` functions to handle project configuration, allowing for dynamic updates and retrieval of project settings.
- Updated `main-channels.ts` to include new channel definitions for project config operations, ensuring proper integration with the main bridge.
- Refactored related components to utilize the new project config functionality, improving overall state management and user experience in the application.
- Added necessary types and utility functions to support the new project configuration structure, ensuring type safety and maintainability.
2026-08-19 17:50:05 +02:00
konstantin-paulus
838517c191 Refactor Alignment component and integrate world context
- Updated the `Alignment` component to utilize the `useWorld` hook, enhancing state management for alignment and distribution actions.
- Removed unused functions and streamlined the alignment logic, improving code clarity and maintainability.
- Adjusted the `Inspector` component to import the updated `Alignment` component, ensuring proper integration within the UI.
- Exported alignment functions from the engine module for better accessibility across the application.
2026-08-19 17:20:13 +02:00
konstantin-paulus
38bc44805b Refactor AppearanceSettings and update keyframe handling
- Refactored `AppearanceSettings` to utilize new hooks from `@diffusionstudio/koota-solid`, improving state management for opacity, blend modes, visibility, and corner radii.
- Enhanced keyframe handling by integrating `syncKeyframe` and `removeKeyframeTrack` functions, ensuring smoother animations and property edits.
- Updated the `Keyframe` component to support new properties and improve interaction with the editor, enhancing user experience.
- Replaced `Keyframe` imports across various components to use the new `keyframe-bitecs` module, ensuring consistency in keyframe management.
- Documented changes in migration notes to reflect updates in appearance settings and keyframe functionality.
2026-08-19 17:14:17 +02:00
konstantin-paulus
f7bedbb59f Enhance TimeSettings functionality and refactor inspector components
- Integrated `TimeSettings` into the `Inspector` component, allowing for improved time management of selected entities.
- Refactored `time.tsx` to utilize new hooks and streamline time property edits, enhancing performance and maintainability.
- Updated asset actions to support frame rate adjustments for sequences, ensuring accurate playback timing.
- Cleaned up commented-out code and improved readability across related components, preparing for future feature expansions.
- Updated migration documentation to reflect changes in time handling and inspector functionality.
2026-08-19 16:48:33 +02:00
konstantin-paulus
a498cb2192 Refactor asset management and enhance inspector functionality
- Updated `asset-item` and `assets` components to utilize new asset actions for replacing media and inserting assets at the playhead, improving usability and consistency.
- Introduced `useAssetSelection` hook to manage selected assets across the application, streamlining asset handling in the inspector and assets panel.
- Enhanced `AssetInfoPanel` to display asset metadata and support asset replacement, ensuring a cohesive user experience.
- Refactored related components to integrate the new asset selection state, improving maintainability and clarity in asset interactions.
2026-08-19 16:22:57 +02:00
konstantin-paulus
8db55113dc Enhance SceneTemplatePanel functionality and integrate new hooks
- Updated the `SceneTemplatePanel` to utilize the `useWorld` and `useEditor` hooks, improving state management and editor interactions.
- Refactored scene creation logic to center scenes in the viewport and streamline entity insertion, enhancing usability.
- Cleaned up commented-out code and improved readability, preparing for future feature expansions.
2026-08-19 16:03:10 +02:00
konstantin-paulus
077a335b5e Refactor inspector component and introduce selection handling
- Updated the `Inspector` component to utilize the new `useSelection` hook for managing selected nodes and keyframes, improving clarity and maintainability.
- Implemented a classification function to determine the type of selected entity, enhancing the inspector's functionality.
- Commented out unused panel imports as they transition to the new architecture, preparing for future integration.
- Added `useSelection` hook to manage selection state, splitting selected entities into nodes and keyframes for better organization.
- Updated migration documentation to reflect changes in the inspector and selection handling.
2026-08-19 15:56:39 +02:00
konstantin-paulus
c630a75f5d Remove sqids dependency and refactor ID allocation in asset management
- 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.
2026-08-19 15:34:29 +02:00
konstantin-paulus
394d547202 Refactor asset thumbnail rendering and introduce audio peaks worker
- 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.
2026-08-19 15:09:00 +02:00
konstantin-paulus
b7388afa76 Add caching for asset thumbnails and audio peaks
- 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.
2026-08-19 14:22:18 +02:00
konstantin-paulus
ac181f985e Update asset management and enhance project features
- 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.
2026-08-19 11:11:02 +02:00
konstantin-paulus
ce04be1ddc Refactor animation and keyframe handling in JSX and runtime
- 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.
2026-08-18 18:50:18 +02:00
konstantin-paulus
f10ee0486a Add copy and paste functionality to DocumentEditor and keyboard shortcuts
- 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.
2026-08-18 15:32:43 +02:00
konstantin-paulus
ca39447b10 Implement duplicate functionality in DocumentEditor and keyboard shortcuts
- 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.
2026-08-18 15:20:51 +02:00
konstantin-paulus
1bc0d85242 Enhance loop handling and editing capabilities in the editor
- 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.
2026-08-18 14:42:04 +02:00
konstantin-paulus
f1dc768de3 Add nudge functionality to keyboard shortcuts for selected nodes
- 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.
2026-08-18 11:53:11 +02:00
konstantin-paulus
1b8f4ab195 Implement remove functionality for editor and enhance keyboard shortcuts
- 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.
2026-08-18 11:48:12 +02:00
konstantin-paulus
6f26053a9f Enhance editing and movement capabilities in the editor
- 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.
2026-08-18 10:59:13 +02:00
konstantin-paulus
8bc0693a36 Refactor engine creation and system 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.
2026-08-17 19:10:56 +02:00
konstantin-paulus
8e4138a31d Refactor scene activation management in the editor
- 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.
2026-08-17 15:48:08 +02:00
konstantin-paulus
ae004e49aa Implement selection management for entities in the editor
- 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.
2026-08-17 15:33:25 +02:00
konstantin-paulus
19a7639a70 Enhance editing capabilities with text node support and tool integration
- 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.
2026-08-17 15:11:51 +02:00
konstantin-paulus
9b5bf09f32 Refactor document structure to support text nodes and enhance editing capabilities
- 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.
2026-08-17 14:15:59 +02:00
konstantin-paulus
6b0b4d34b7 Refactor editor integration and enhance 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.
2026-08-17 11:53:34 +02:00
konstantin-paulus
81a480610d Integrate ts-morph for JSX editing and refactor source handling
- 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.
2026-08-16 21:21:04 +02:00
konstantin-paulus
0c268bd184 Implement scene support and refactor related components
- 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.
2026-08-16 19:24:42 +02:00
konstantin-paulus
61e1e9a0d2 Refactor camera handling and integrate document reporting
- 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.
2026-08-16 17:52:06 +02:00
konstantin-paulus
b2fc9a9619 Enhance project editing capabilities and integrate new JSX features
- 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.
2026-08-16 17:13:33 +02:00
konstantin-paulus
e21b7bbffd Refactor background handling and document interactions
- 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.
2026-08-16 15:59:31 +02:00