@contentstack/studio-internal
v1.1.5
Published
This is core package which is a flavour of slate js and consist of all editor functionality
Readme
Studio Internal
Core editor engine for the Studio visual builder platform
Overview
studio-internal is the foundational editor engine that powers the Studio. It's a custom implementation inspired by Slate.js, specifically designed for page building and component composition.
What it does
This package provides a complete editor system for managing hierarchical component structures, responsive styles, and interactive editing operations. It serves as the core data model and transformation engine for visual page builders.
Key Features
Editor Core
- Custom Slate.js-inspired editor implementation
- Hierarchical node management with parent-child relationships
- Slot-based component system for flexible layouts
- Operation-based state management with history tracking
Visual Builder Capabilities
- Responsive Styles: Manage breakpoint-specific styling
- CSS Classes: Dynamic class assignment and management
- Component Properties: Flexible prop system for component configuration
- Slot Management: Insert and manage component slots for dynamic content
Node Transformations
- Insert/Remove: Add and delete components from the page
- Move/Lift: Reposition components within the hierarchy
- Wrap/Unwrap: Group and ungroup components
- Selection Management: Track and manage user selections
- Path References: Maintain stable references during operations
Operation System
- Operation Serialization: Transfer operations between contexts
- History Management: Undo/redo functionality
- Batch Operations: Efficient bulk transformations
- Change Detection: Optimized re-rendering
Architecture
The editor follows a plugin-based architecture with:
- Core Engine: Base editor functionality and state management
- Transform Plugins: Node manipulation operations
- Interface Layer: Type-safe API definitions
- Utility Functions: Helper functions for common operations
Use Cases
- Visual Page Builders: Drag-and-drop page composition
- Component Editors: Nested component editing
- Style Management: Responsive design tools
- Content Management: Dynamic content insertion and editing
Integration
This package is designed to be consumed by higher-level packages like:
studio-react- React integration layerstudio-client- Client-side SDKstudio-registry- Component registry system
