@seliseblocks/mailcraft 0.1.0 → 0.1.1

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/DOCS.md CHANGED
@@ -233,7 +233,7 @@ Templates are host content **and** host UI. The editor ships no catalogue and ha
233
233
  editor.loadTemplate({ name: 'Welcome', html });
234
234
  ```
235
235
 
236
- Applying one is a normal undoable edit with a toast, and your string is never mutated. Ready-made examples live in [`examples/templates/`](https://github.com/SELISEdigitalplatforms/blocks-mailcraft/tree/main/examples/templates) with a working picker in [`examples/vanilla.html`](examples/vanilla.html) — both host-app content, shipped in the package for you to lift but not part of its API.
236
+ Applying one is a normal undoable edit with a toast, and your string is never mutated. Ready-made examples ship in the package under `examples/templates/`, with a working picker in [`examples/vanilla.html`](examples/vanilla.html) — both host-app content, shipped in the package for you to lift but not part of its API.
237
237
 
238
238
  ## Merge variables
239
239
 
@@ -550,7 +550,7 @@ node build.js # rebuild dist/ after any change under src/
550
550
  npm test # storage, export, templates, toolbar, system — no DOM needed
551
551
  ```
552
552
 
553
- Deeper notes for contributors and coding agents live in [AGENTS.md](https://github.com/SELISEdigitalplatforms/blocks-mailcraft/blob/main/AGENTS.md).
553
+ Deeper notes for contributors and coding agents live in `AGENTS.md` in the repository, alongside [CONTRIBUTING](https://mailcraft.seliseblocks.com/CONTRIBUTING.html), which is also on the docs site.
554
554
 
555
555
  ---
556
556
 
@@ -13,6 +13,9 @@
13
13
  palette (src/render/style.js) so the demo reads as one application rather
14
14
  than a widget dropped into a stranger's page. */
15
15
  :root {
16
+ /* Pinned per theme, not left at `light dark`: it is what decides whether
17
+ the browser paints this page a light or a dark scrollbar. */
18
+ color-scheme: light;
16
19
  --brand: #0065b3;
17
20
  --bg: #ffffff;
18
21
  --surface: #f8fafc;
@@ -27,6 +30,7 @@
27
30
  /* One attribute drives both: the same switch that sets the editor's `theme`
28
31
  repaints this page. Host-owned light/dark, demonstrated rather than
29
32
  described. */
33
+ :root:has(body[data-theme="dark"]) { color-scheme: dark; }
30
34
  body[data-theme="dark"] {
31
35
  --bg: #0b1120;
32
36
  --surface: #111827;
@@ -129,7 +133,8 @@
129
133
  <nav class="menu" aria-label="Primary">
130
134
  <a id="docs-link" href="../DOCS.md">Documentation</a>
131
135
  <a id="readme-link" href="../README.md">Overview</a>
132
- <a href="https://github.com/SELISEdigitalplatforms/blocks-mailcraft" rel="noopener">GitHub</a>
136
+ <!-- No GitHub link while the repository is private -- it 404s for anyone
137
+ outside the org. Restore it when the repo goes public. -->
133
138
  <a href="https://www.npmjs.com/package/@seliseblocks/mailcraft" rel="noopener">npm</a>
134
139
  </nav>
135
140
 
@@ -1449,6 +1454,8 @@
1449
1454
  const next = editor.getAttribute('theme') === 'dark' ? 'light' : 'dark';
1450
1455
  editor.setAttribute('theme', next);
1451
1456
  document.body.dataset.theme = next;
1457
+ // :has() covers modern browsers; this covers the rest, and costs one line.
1458
+ document.documentElement.style.colorScheme = next;
1452
1459
  themeBtn.textContent = next === 'dark' ? 'Switch to light' : 'Switch to dark';
1453
1460
  });
1454
1461
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seliseblocks/mailcraft",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Framework-agnostic drag-and-drop email template editor, packaged as a zero-dependency Web Component.",
5
5
  "license": "MIT",
6
6
  "author": "SELISE Digital Platforms",