@zvndev/darkmown 0.15.0 → 0.16.0

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
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to Darkmown are documented here. Versions follow [semver](https://semver.org); pre-1.0 minor versions may contain breaking changes.
4
4
 
5
+ ## 0.16.0 — 2026-06-23
6
+
7
+ Cross-document **view transitions** return as a per-page opt-in.
8
+
9
+ - **`transitions: true` frontmatter** emits the CSS-only `@view-transition { navigation: auto; }` rule, giving a smooth same-origin cross-fade on navigation with zero JavaScript. It only animates between same-origin pages that both opt in, and browsers without support silently skip the fade (no hang, no layout change). Default-off; opt out explicitly with `transitions: false`. Re-enabled after the original cross-document render-blocking regression (stalled rAF / hanging navigation on deployed pages) was verified resolved on modern Chrome. Compile-time only — no change to the shipped runtime size.
10
+
11
+ ## 0.15.0 — 2026-06-23
12
+
13
+ Form controls and inline styling reach the authoring layer.
14
+
15
+ - **`:textarea` and `:select` field directives.** Forms gain a multi-line `:textarea name [rows=N]` and a `:select name` (with `- Label` option lines). Both capture into `:form into` state exactly like `:input`, and derive a non-visual accessible name from their placeholder or humanized field name.
16
+ - **Inline attributes.** A trailing `{.class .class #id}` (no leading space) attaches classes / an id to the inline element directly before it — link, image, emphasis, or inline code — most often to style a link as a button without a wrapping container. It never collides with `{ name }` interpolation, which always begins with a name.
17
+ - **Interpolated link destinations.** `{ name }` now resolves inside markdown link and image destinations, so `@loop` / state values can data-drive an `href` or `src`.
18
+
5
19
  ## 0.14.1 — 2026-06-19
6
20
 
7
21
  Patch-release hardening for page assets, form actions, and release metadata.
package/README.md CHANGED
@@ -82,6 +82,8 @@ tags: [sales, revenue, "q1, q2"]
82
82
 
83
83
  Three keys also drive the document `<head>`: `title` sets `<title>`, `description` adds the meta description plus Open Graph / Twitter tags, and `image` (an absolute URL) sets the social-share preview (`og:image` / `twitter:image` and a `summary_large_image` card).
84
84
 
85
+ `transitions: true` opts a page into **cross-document view transitions** — a smooth same-origin cross-fade on navigation, emitted as the CSS-only `@view-transition { navigation: auto; }` rule. It ships zero JavaScript, only animates between same-origin pages that both opt in, and is silently ignored by browsers without support (the navigation just doesn't fade). Off by default; opt out explicitly with `transitions: false`.
86
+
85
87
  ## Static assets
86
88
 
87
89
  Images, fonts, icons, and other non-page files live on the include shelf at `site/_/` and are copied into the build untouched:
@@ -33,7 +33,7 @@ This audit compares the current Darkmown implementation with the original MARROW
33
33
 
34
34
  ## Stage 4 additions (2026-06-11, same day)
35
35
 
36
- - **View transitions (currently disabled):** `transitions: true` in frontmatter was wired to emit `@view-transition { navigation: auto; }` — the original doc's zero-JS MPA navigation polish. **This is turned off as of now:** cross-document `@view-transition` render-blocked deployed pages (stalled rAF, hanging navigation), so `transitions` is hardcoded to `""` in `src/compiler.js`. The frontmatter key is accepted but has no effect today. Reintroduction is tracked pending proper activation fallbacks (see "Still missing from the full vision").
36
+ - **View transitions (re-enabled in 0.16.0, opt-in):** `transitions: true` in frontmatter emits `@view-transition { navigation: auto; }` — the original doc's zero-JS MPA navigation polish (a same-origin cross-fade on navigation). Previously pulled back because cross-document `@view-transition` render-blocked deployed pages (stalled rAF, hanging navigation); verified resolved on modern Chrome (CSS-only, same-origin, graceful no-support fallback, no nav hang), so it returns as a per-page opt-in. Default-off; opt out with `transitions: false`.
37
37
  - **Lazy loading:** `:fetch … when=visible` defers the request until the marker scrolls into view (IntersectionObserver) — the adapted form of `:lazy`.
38
38
  - **Computed state:** `:computed name = expr` with a compile-time-validated grammar (state refs, numbers, strings, arithmetic, comparisons; assignment, calls, and prototype walks rejected). Initial values are evaluated at build time.
39
39
  - **Dev self-reload:** `darkmown dev` rebuilds in a child process, so changes to the framework's own `src/` always compile with fresh modules.
@@ -103,7 +103,7 @@ The compiler recognizes three directives — `:note`, `:try`, and `:sprint` —
103
103
  ## Still missing from the full vision
104
104
 
105
105
  - First-party server runtime (`site/api/`), HTML-fragment `swap` semantics, and cart server sync — parked behind the adapter decision until a real project needs them.
106
- - **View transitions:** re-enabling `transitions: true` with proper activation fallbacks (disabled today — see Stage 4), plus `@starting-style` emission and browser fallbacks for older engines.
106
+ - **View transitions:** named/typed transitions (`view-transition-name`, per-element morphs) and `@starting-style` emission on top of the opt-in cross-document fade shipped in 0.16.0 (see Stage 4).
107
107
  - Richer diagnostics and package-consumer QA in regular CI. Editor tooling exists as a source-installable VS Code extension; public Marketplace/Open VSX distribution remains a launch/distribution follow-up.
108
108
 
109
109
  ## Current claim
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zvndev/darkmown",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
package/src/compiler.js CHANGED
@@ -134,10 +134,13 @@ export function compilePage(file, context) {
134
134
  const cssLinks = [...compiled.assets.skins].map((href) => `<link rel="stylesheet" href="${href}">`).join("\n");
135
135
  const scriptSrcs = compiled.assets.runtime ? ["/__wd/runtime.js", ...compiled.assets.scripts] : [...compiled.assets.scripts];
136
136
  const scripts = scriptSrcs.map((src) => `<script type="module" src="${src}"></script>`).join("\n");
137
- // View transitions are temporarily disabled: cross-document @view-transition
138
- // render-blocked deployed pages (rAF stalled, navigation hangs). Tracked for
139
- // reintroduction with proper activation fallbacks.
140
- const transitions = "";
137
+ // Cross-document view transitions: opt in per page with `transitions: true` in
138
+ // frontmatter to emit the CSS-only @view-transition rule — a smooth same-origin
139
+ // cross-fade on navigation, with zero JavaScript. Ignored by browsers without
140
+ // support (graceful fade-free fallback) and only applies to same-origin
141
+ // navigations where both the outgoing and incoming page opt in.
142
+ const wantTransitions = compiled.meta.transitions === true || compiled.meta.transitions === "true";
143
+ const transitions = wantTransitions ? `\n <style>@view-transition { navigation: auto; }</style>` : "";
141
144
 
142
145
  return {
143
146
  meta: compiled.meta,