Skip to content

v0.64.2

Latest

Choose a tag to compare

@orkhanahmadov orkhanahmadov released this 05 Dec 11:38
Immutable release. Only release title and notes can be modified.
b41d39d

Fixes and improvements

Fix @templatical/editor defects found in a full review of the package.

@templatical/editor

Breaking changes:

  • init() on a container that already has a shadow root the host attached now throws [Templatical] Container shadow root is not owned by the editor. instead of clearing that root. Mount the editor into an element that has no shadow root, such as a child of that host. A second init() on a container the editor itself mounted still reuses its shadow root, including after a Vite HMR reload or with a second copy of the SDK on the page.

Fixes:

  • Re-initialising a container with shadowDom: false after a shadow-DOM mount shows the new editor instead of leaving it hidden behind the old shadow root.
  • A throwing onChange callback no longer stops autosave.
  • The editor instance's render methods exist before the first mount, and setMergeTags reaches later setContent, create and insertBlock calls.
  • The MJML attached to a test email is rendered in the language being edited.
  • The first Backspace or Delete next to a merge-tag or logic-tag chip selects it, and the second deletes it.
  • The HTML sanitizer uses its own DOMPurify instance, so a host's global DOMPurify configuration no longer strips editor markup, and SVG <style> elements are removed from custom block icons.
  • A failed custom block render leaves a fixed comment that no longer includes the block's type name.
  • The AI rewrite preview falls back to plain text when the page's Trusted Types policy blocks the HTML parser, and a rewrite no longer replaces a paragraph that changed while it ran.
  • A class-based templates provider keeps its methods and this under collaboration.
  • Toolbar results that arrive late (an image measurement, a hero measurement, a display-condition picker, a custom block's data-source fetch) are dropped when the language, section, block or template changed in the meantime, including a reload of the same template.
  • A frozen templates provider (Object.freeze({ load, create, save })) works with collaboration instead of throwing on the first load.
  • Display-condition groups named like Object.prototype members (constructor) render as groups.
  • Custom-block number, image and select fields are labelled for screen readers.
  • Retranslation confirmations cancel when the set of fields changed while the dialog was open.
  • Focused controls have a visible outline in forced-colors (high-contrast) mode.

Fix @templatical/import-mjml defects found in a full review of the package:

@templatical/import-mjml

  • An html-fallback holds the HTML its MJML draws instead of mj-* tags the renderer's mj-text prints as nothing. Carousels import as linked images (approximated), and unknown wrappers and a hero, section or wrapper nested in a column keep their images and text visible. The report note names the flattened tags.
  • An mj-button whose label is only markup, such as an image, imports as linked HTML (approximated) instead of being dropped without a report entry.
  • A padding-* attribute overrides its side of the padding shorthand, explicit 0 included; a blank one is ignored. The block's padding and the width used to size its contents now agree.
  • Column percentages inside an mj-group resolve against the group, as MJML computes them.
  • {% if %} / {% endif %} guards around a section or hero inside an mj-wrapper become its display condition instead of being dropped.
  • A span counts as a menu separator only between two links, so leading or trailing prose no longer imports as a separator.
  • An mj-text holding a heading or table beside other content splits into separate blocks in source order instead of dropping the prose or folding a table into a paragraph.
  • An mj-navbar's base-url is prefixed to each link's href, as MJML does, in the menu and in a flattened fallback. A fallback table keeps its role, and a social link with no icon, image or text shows its network name.

Fix @templatical/import-html defects found in a full review of the package:

@templatical/import-html

  • Stylesheets resolve by importance, then selector specificity, then source order. An !important stylesheet rule beats a normal inline style, and resolved values carry no !important marker.
  • An escaped quote inside a CSS string or url() no longer ends the declaration, an @ inside a URL no longer starts an at-rule, and a <!-- … --> wrapper around a stylesheet no longer hides the @media block after it.
  • A px max-width caps a px width when sizing columns.
  • An image's CSS width wins over its HTML width attribute.
  • A container's font styles wrap only real paragraphs and leave every other byte as written (<pre> content, merge tags, entities).
  • A logo beside a call-to-action link keeps its own block, and a link around several images imports each image, sized against its column.
  • A full-width painted band takes the email width from its fixed content table and applies its cell padding once: vertical padding on the wrapper, a dropped side inset reported approximated. A promoted wrapper cell keeps its inset.
  • Content hidden with display: none is reported skipped (the import doesn't apply @media reveals) and no longer sets the email width. The hidden preheader source is still read and isn't reported.
  • A nested painted band keeps the nearer wrapper and reports the outer paint it drops.

Fix @templatical/import-easy-email-pro defects found in a full review of the package:

@templatical/import-easy-email-pro

  • Malformed children or data.variables lists get the importer's invalid-template error or are skipped, instead of throwing a TypeError. A page variable named __proto__ resolves.
  • Non-finite px values (1e309px) and a unit-only % take their fallbacks instead of becoming Infinity or 0%.
  • A padding shorthand expands before side overrides, so padding: "10px 20px" no longer imports as zero padding.
  • A leaf that declares a condition keeps its content and reports the dropped condition, at the top level and inside a column; any node that converts from its own attributes or data (an image, a divider, a table, an unknown type's HTML fallback) converts even with no children.
  • A page band's data.content is validated even when the band has no children.
  • Social platforms match whole domain labels, read before any /, ? or #, so a custom icon on an unrelated host keeps its image and facebook.com?ref=email is still Facebook.
  • An unstyled outer band no longer erases a styled inner wrapper, and each dropped inner wrapper's note stays with its own section; a sole narrower group reports its width loss.
  • Countdown overlays take the countdown's visibility, a tiny percentage image keeps at least 1px, block HTML stays out of a styled <p>, and an html-block-node tag name is validated.
  • A marketing-countdown with no GIF src and no overlay text is reported skipped instead of disappearing without a report entry.

Fix @templatical/import-beefree defects found in a full review of the package:

@templatical/import-beefree

  • A button's link goes through isSafeHtmlUrl, like image and icon URLs. A javascript:, vbscript: or non-image data: link is dropped and the module is reported approximated with a note.
  • A percentage image or video width is a share of the column's content box (after the section border and the column's side padding), so a 50% image in a padded half column no longer comes out wider than half its room.
  • A < in text no longer stops merge-tag decoding unless it starts markup, and a literal < or > inside a merge tag survives when the markup around it is removed.
  • Merge tags in an Icons module's href, src, alt, title and target keep &, < and > decoded, as the sender reads them; text outside merge tags stays escaped, and an escaped label stays text.
  • An unknown module's paragraph or list payload is kept as HTML (html-fallback) instead of being dropped.
  • Markup that splits a merge token in a button label ({{ first<strong>_name</strong> }}) is removed, skipping quoted attribute values, while operators and quoted text inside the token stay.
  • A lone > in a button label or table cell is kept as text, as HTML shows it, instead of being dropped. A label whose bold part sits beside it imports at regular weight, approximated with the partial-bold note.

All 16 @templatical/* packages are published at 0.64.2 — they share one version number.

Full changelog: https://docs.templatical.com/changelog

Templatical is open source (MIT). Sponsor its development.