Releases: craftile/editor
@craftile/types@1.0.1
@craftile/types@1.0.1
@craftile/types@1.0.0
Minor Changes
-
668c3d9Thanks @eldomagan! - feat: add region id support with name as display labelThis release adds support for optional
idfield on regions, allowing regions to have a unique identifier separate from their display name.Breaking Changes
- @craftile/core: Renamed
regionNametoregionIdin all engine events (block:insert,block:move,block:duplicate,block:remove) - @craftile/core: Engine methods now use
regionIdparameter instead ofregionName - @craftile/types:
EngineEventsinterfaces now useregionIdandsourceRegionIdfields
New Features
- @craftile/types: Added optional
idfield toRegioninterface - @craftile/core: Added
getRegionId()helper function that returnsregion.id || region.name - Regions now support both
id(unique identifier) andname(display label) - Automatic fallback to
namewhenidis not provided for backward compatibility
Migration Guide
If you have custom code using the engine API:
// Before engine.insertBlock(block, { regionName: 'main' }); // After engine.insertBlock(block, { regionId: 'main' });
If you're listening to engine events:
// Before engine.on('block:insert', ({ regionName }) => { console.log(regionName); }); // After engine.on('block:insert', ({ regionId }) => { console.log(regionId); });
If you're defining regions in your page data:
// Before (still works) regions: [{ name: 'main', blocks: [] }]; // After (recommended) regions: [{ id: 'main', name: 'Main Content', blocks: [] }];
- @craftile/core: Renamed
@craftile/preview-client@1.0.1
@craftile/preview-client@1.0.1
@craftile/preview-client@1.0.0
@craftile/preview-client@1.0.0
@craftile/preview-client-html@1.0.1
@craftile/preview-client-html@1.0.1
@craftile/preview-client-html@1.0.0
Patch Changes
-
668c3d9Thanks @eldomagan! - feat: add region id support with name as display labelThis release adds support for optional
idfield on regions, allowing regions to have a unique identifier separate from their display name.Breaking Changes
- @craftile/core: Renamed
regionNametoregionIdin all engine events (block:insert,block:move,block:duplicate,block:remove) - @craftile/core: Engine methods now use
regionIdparameter instead ofregionName - @craftile/types:
EngineEventsinterfaces now useregionIdandsourceRegionIdfields
New Features
- @craftile/types: Added optional
idfield toRegioninterface - @craftile/core: Added
getRegionId()helper function that returnsregion.id || region.name - Regions now support both
id(unique identifier) andname(display label) - Automatic fallback to
namewhenidis not provided for backward compatibility
Migration Guide
If you have custom code using the engine API:
// Before engine.insertBlock(block, { regionName: 'main' }); // After engine.insertBlock(block, { regionId: 'main' });
If you're listening to engine events:
// Before engine.on('block:insert', ({ regionName }) => { console.log(regionName); }); // After engine.on('block:insert', ({ regionId }) => { console.log(regionId); });
If you're defining regions in your page data:
// Before (still works) regions: [{ name: 'main', blocks: [] }]; // After (recommended) regions: [{ id: 'main', name: 'Main Content', blocks: [] }];
- @craftile/core: Renamed
@craftile/plugin-static-blocks-renderer@1.0.1
@craftile/plugin-static-blocks-renderer@1.0.1
@craftile/plugin-static-blocks-renderer@1.0.0
Patch Changes
-
668c3d9Thanks @eldomagan! - feat: add region id support with name as display labelThis release adds support for optional
idfield on regions, allowing regions to have a unique identifier separate from their display name.Breaking Changes
- @craftile/core: Renamed
regionNametoregionIdin all engine events (block:insert,block:move,block:duplicate,block:remove) - @craftile/core: Engine methods now use
regionIdparameter instead ofregionName - @craftile/types:
EngineEventsinterfaces now useregionIdandsourceRegionIdfields
New Features
- @craftile/types: Added optional
idfield toRegioninterface - @craftile/core: Added
getRegionId()helper function that returnsregion.id || region.name - Regions now support both
id(unique identifier) andname(display label) - Automatic fallback to
namewhenidis not provided for backward compatibility
Migration Guide
If you have custom code using the engine API:
// Before engine.insertBlock(block, { regionName: 'main' }); // After engine.insertBlock(block, { regionId: 'main' });
If you're listening to engine events:
// Before engine.on('block:insert', ({ regionName }) => { console.log(regionName); }); // After engine.on('block:insert', ({ regionId }) => { console.log(regionId); });
If you're defining regions in your page data:
// Before (still works) regions: [{ name: 'main', blocks: [] }]; // After (recommended) regions: [{ id: 'main', name: 'Main Content', blocks: [] }];
- @craftile/core: Renamed
@craftile/plugin-common-properties@1.0.1
@craftile/plugin-common-properties@1.0.1
@craftile/plugin-common-properties@1.0.0
@craftile/plugin-common-properties@1.0.0