⚠️ POSSIBLY BREAKING CHANGE
What's Changed
The biggest change we introduce with this release is the complete rewrite of modules to Typescript. This deprecates the old ./index.d.ts
(manually updated) in favor of ./dist/index.d.ts
(generated from the source).
So there are no real changes to the core API itself if not the new TS declaration file which includes type/interfaces changes in order to bring more naming consistency with the code.
This is how you might have used the import of types in the previous version:
import type grapesjs from 'grapesjs';
// plugin
const plugin: grapesjs.Plugin = function (editor: grapesjs.Editor, opt: ...) {...};
Now you can get types directly without specifying the grapesjs namespace (which is the most common way to import types):
import type { Editor, Plugin } from 'grapesjs';
// plugin
const plugin: Plugin = function (editor: Editor, opt: ...) {...};
Added
- Added new
noCustom
option toComponent.getName()
in order to skip custom name assigned to the component. - Added
rename
method to SelectorManager - Added
fetchOptions
to AssetManager configs - Added options to ExportTemplate command
Fixed
- Clear deferred stuff on editor destroy #4940
- Fixed slider in StyleManager #4965
- Fixed checkbox trait values on undo/redo #4972
- Fixed sorter placeholder with grid elements #4991
- Fixed
showOffsetsSelected
#4998 - Fixed bug with top/left being sticky when resizing from l/t side by @PaulRill00 in #5017
- Fixed for when no implicit type by @wilsonsergio2500 in #4903
- Fixed broken links in the docs by @lexoyo in #4914
- Fixed typing of trigger to include
args
by @Zaxcoding in #4910 - Fixed broken links in the docs by @himansh-gjr in #4963
Other
- TS Types: Extends the type of property that scripts/styles can takes by @estebgonza in #4924
- Convert Trait test into TS by @xQwexx in #4899
- Update Components.md by @jacobisknight in #4952
- docs: Fix a few typos by @timgates42 in #4957
- Module cleanup by @xQwexx in #4985
- improve typing by @Singwai in #5010
New Contributors
- @wilsonsergio2500 made their first contribution in #4903
- @Zaxcoding made their first contribution in #4910
- @estebgonza made their first contribution in #4924
- @jacobisknight made their first contribution in #4952
- @himansh-gjr made their first contribution in #4963
- @PaulRill00 made their first contribution in #5017
Full Changelog: v0.20.4...v0.21.1