@seliseblocks/mailcraft 0.2.12 → 0.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ All notable changes to `@seliseblocks/mailcraft` are documented here.
4
4
 
5
5
  The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.2.13] — 2026-09-03
8
+
9
+ ### Added
10
+ - **The code view's source and preview panes are now inspect-linked, DevTools-style.** Click (or arrow) the caret anywhere in the source and the element it sits in is outlined and scrolled into view in the live preview; click any element in the preview and its open tag is selected in the source, with the line scrolled into view and flashed. The mapping counts same-tag elements on both sides — immune to the parser's inserted `<tbody>`s and to the preview-only `{{#if}}` chips, which now carry a `data-mc-deco` marker and are skipped — and when the counts disagree mid-edit it walks up to the nearest ancestor that still lines up rather than guessing. The outline is injected into the preview document the same way the preview scrollbar chrome is: the source string, Apply and Export stay byte-for-byte untouched. Clicking a link in the preview now inspects it instead of navigating the preview away.
11
+ - **Format** button in the source pane: a conservative pretty-printer (two-space indentation, one structural tag per line) that only moves whitespace the renderer cannot see. It never invents a space between inline or inline-block elements (hybrid email columns survive), keeps `<style>`, `<pre>` and MSO conditional comments byte-identical, gives `{{#if}}`/`{{/each}}` tags their own lines, and is idempotent. Formatting is a pane edit like any other — nothing reaches the canvas until Apply.
12
+ - **Word wrap** toggle in the source pane: wrap off shows one source line per numbered row with a shared horizontal scroll. The preference persists per browser.
13
+ - **Find and replace** (Ctrl+F / Cmd+F): a floating bar over the source pane with case-insensitive matches highlighted in the code, a current-match counter, Enter/Shift+Enter to step, Replace and Replace all, plus a **go-to-line** field (Ctrl+G). Escape closes the bar without closing the modal.
14
+ - **The source pane types like an editor now.** Enter auto-indents to the current line's depth, Tab and Shift+Tab indent and outdent multi-line selections, and the caret's line gets a wash with an accent line number.
15
+
16
+ ### Fixed
17
+ - **Ctrl+Z works in the code editor again.** The old Tab handler reassigned the textarea's value, which silently wiped the browser's native undo stack; every programmatic edit (Tab, Enter, Format, Replace) now goes through `insertText`, so the whole editing session stays undoable.
18
+
7
19
  ## [0.2.12] — 2026-09-03
8
20
 
9
21
  ### Fixed
package/DOCS.md CHANGED
@@ -610,12 +610,20 @@ The complete catalog of UI strings that `.messages` accepts — every key the ed
610
610
  | `blocks.dragHint` | Drag a block onto the canvas |
611
611
  | `canvas.meta` | {rows} rows · {blocks} blocks · {width}px |
612
612
  | `code.applyNote` | Apply parses each top-level table row back into a canvas row you can still select, reorder and delete — hand-written markup survives the round trip. |
613
+ | `code.find` | Find |
614
+ | `code.format` | Format source (indentation only) |
615
+ | `code.goToLine` | Go to line |
613
616
  | `code.liveHtmlPreviewTitle` | Live HTML preview |
614
617
  | `code.livePreview` | Live preview |
615
618
  | `code.meta` | {kb} KB · {lines} lines |
619
+ | `code.nextMatch` | Next match |
620
+ | `code.prevMatch` | Previous match |
621
+ | `code.replace` | Replace |
622
+ | `code.replaceAll` | Replace all |
616
623
  | `code.source` | Source |
617
624
  | `code.statusEdited` | Code view — edited — preview live, not yet applied |
618
625
  | `code.statusSynced` | Code view — in sync with the canvas |
626
+ | `code.wrap` | Word wrap |
619
627
  | `device.desktop` | Desktop |
620
628
  | `device.desktopHint` | Desktop width |
621
629
  | `device.mobile` | Mobile |