Skip to content

10.2.0

Choose a tag to compare

@github-actions github-actions released this 26 Aug 14:48
· 48 commits to main since this release
c30eaa9

@dextinity/cms-admin@10.2.0

Minor Changes

  • 7f9e1f7: Add createDamVideoBlock factory

    The factory allows restricting what the editor can set on a video, for sites that don't use all of it.
    Pass what the site supports via supports — anything left out isn't shown in the block's admin component anymore.
    Values that are already stored stay untouched, the editor just can't change them anymore.
    The preview image remains part of the block's data in any case, leaving it out only hides it from the editor.

    supports takes "controls" (the playback options autoplay, loop and show controls, offered together since autoplay and show controls depend on each other) and "previewImage" (the poster image).

    DamVideoBlock is now created with the factory and is still exported, so nothing needs to be changed in existing applications.

    Example

    A site that renders no poster image:

    import { createDamVideoBlock } from "@dextinity/cms-admin";
    
    export const DamVideoBlock = createDamVideoBlock({ supports: ["controls"] });

    A site that only reads the video file's URL, so the editor is left with just the file to choose:

    export const DamVideoBlock = createDamVideoBlock({ supports: [] });
  • edf2027: Allow restricting selectable heading levels in the TipTap rich text block via a new headingLevels option

    createTipTapRichTextBlock accepts a new headingLevels?: number[] option to limit which heading levels (1-6) are selectable. Defaults to [1, 2, 3, 4, 5, 6], so existing usages are unaffected. Must be a non-empty array of unique integers between 1 and 6, otherwise an error is thrown.

    createTipTapRichTextBlock({
        supports: ["heading"],
        headingLevels: [2, 3, 4],
    });

Patch Changes

  • 30fad2a: Make the TipTap rich text block's toolbar sticky

    The toolbar now stays fixed at the top of the editor while scrolling through longer text content, matching the previous Draft.js-based rich text editor's behavior.

@dextinity/cms-api@10.2.0

Minor Changes

  • a4ec0fe: Make the DAM's scope-based access control optional

    The DAM controllers required an AccessControlService, so DamFilesModule couldn't be registered without UserPermissionsModule. The service is optional now. A DAM that has neither the service nor the option below refuses to start, because its GraphQL resolvers would serve requests unguarded.

    Pass disableScopeAccessControl to run the DAM behind your own authentication guard, without any scope checks:

    DamFilesModule.register({
        damConfig,
        Scope: DamScope,
        File: DamFile,
        Folder: DamFolder,
        disableScopeAccessControl: true,
    });

    The option is only available on DamFilesModule, not on DamModule, which always runs with UserPermissionsModule.

    Applications using DamModule together with UserPermissionsModule are unaffected: the endpoints keep using the registered AccessControlService.

  • edf2027: Allow restricting selectable heading levels in the TipTap rich text block via a new headingLevels option

    createTipTapRichTextBlock accepts a new headingLevels?: number[] option to limit which heading levels (1-6) are allowed, mirroring the same option added to @dextinity/cms-admin. Content with a heading level outside this set is rejected during validation. Defaults to [1, 2, 3, 4, 5, 6], so existing usages are unaffected. Must be a non-empty array of unique integers between 1 and 6, otherwise an error is thrown.

    createTipTapRichTextBlock({
        supports: ["heading"],
        headingLevels: [2, 3, 4],
    });

@dextinity/mail-react@10.2.0

Minor Changes

  • bdd62e9: Add a borderRadius prop to MjmlImage, HtmlImage, MjmlPixelImageBlock and HtmlPixelImageBlock

    Example

    <MjmlImage src="https://example.com/image.jpg" alt="Example" width={520} borderRadius={16} />

    A style prop passed by the caller wins over borderRadius.

Patch Changes

  • f3e81aa: Round images in classic Outlook

    borderRadius on MjmlImage, HtmlImage, MjmlPixelImageBlock and HtmlPixelImageBlock now also rounds the image in classic Outlook.

    Classic Outlook rounds the image only when width and height are given in pixels, and the radius is given in pixels or as "50%". In every other case the image stays square in that client.

  • c980b75: Fix the MjmlButton background image not reaching clients that drop <style> blocks