Skip to content

v0.21.1

Compare
Choose a tag to compare
@artf artf released this 03 Apr 11:00
· 540 commits to dev since this release

⚠️ 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 to Component.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

Other

New Contributors

Full Changelog: v0.20.4...v0.21.1