@homepages/concrete 2.0.0 → 3.0.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.
@@ -4,7 +4,7 @@
4
4
  <meta charset="utf-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
6
  <title>Playground</title>
7
- <script type="module" crossorigin src="./assets/index-CW7co-u9.js"></script>
7
+ <script type="module" crossorigin src="./assets/index-B3eNADCe.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="./assets/index-CckS2ONm.css">
9
9
  </head>
10
10
  <body>
@@ -1 +1 @@
1
- var f="data-tr-island",j="data-tr-island-id",T="data-tr-island-props",z="data-tr-island-frameless";var O=class extends Error{name="IslandPropsError"};function B(t){let o;try{o=JSON.parse(t)}catch(e){throw new O(`island props payload is not valid JSON: ${String(e)}`)}if(o===null||typeof o!="object"||Array.isArray(o))throw new O("island props payload must be a JSON object");return o}var J=Symbol.for("homepages.tr-island-editor-instance");function q(t){let o=globalThis,e=o[J];return e||(e=t.createContext(null),o[J]=e),e}var U=Symbol.for("homepages.tr-island-id");function V(t){let o=globalThis,e=o[U];return e||(e=t.createContext(null),o[U]=e),e}var tt="100%";function N(t){let o=t.getBoundingClientRect();return o.width>0||o.height>0}function et(t){if(N(t))return t;let o=t.firstElementChild;if(o&&N(o))return o;for(let e=t.previousElementSibling;e;e=e.previousElementSibling)if(N(e))return e;for(let e=t.parentElement;e;e=e.parentElement)if(N(e))return e;return o??t}function nt(t){let o=t.getBoundingClientRect();return o.bottom>0&&o.right>0&&o.top<window.innerHeight&&o.left<window.innerWidth}function ot(){return navigator.connection?.saveData===!0}function rt(t){typeof requestIdleCallback=="function"?requestIdleCallback(t):setTimeout(t,1)}async function Y(t){let{markers:o,hydrate:e,warm:i,moduleUrl:a}=t,c=n=>n.getAttribute(f)??"",d=new Set,u=n=>d.has(n)?Promise.resolve(null):(d.add(n),e(n)),p=new Map;for(let n of o)p.set(n,et(n));let I=n=>p.get(n)??n,b=[],w=[];for(let n of o)(nt(I(n))?b:w).push(n);if(a&&!ot()){let n=new Set;for(let r of w){let s=a(c(r));if(s==null||s===""||n.has(s))continue;n.add(s);let l=document.createElement("link");l.rel="modulepreload",l.href=s,l.setAttribute("fetchpriority","low"),document.head.appendChild(l)}}for(let n of b)i(c(n));let E=[];for(let n of b){let r=await u(n);r&&E.push(r)}let m=null,h=new Map,R=n=>{let r=u(n),s=I(n),l=h.get(s);return(!l||l.every(L=>d.has(L)))&&m?.unobserve(s),r};if(typeof IntersectionObserver<"u"){m=new IntersectionObserver(n=>{for(let r of n)if(r.isIntersecting)for(let s of h.get(r.target)??[])R(s)},{rootMargin:tt});for(let n of w){let r=I(n),s=h.get(r);s?s.push(n):(h.set(r,[n]),m.observe(r))}}let _=w.slice(),g=()=>{rt(()=>{let n=_.shift();for(;n&&d.has(n);)n=_.shift();if(!n){m?.disconnect();return}R(n).then(g,g)})};return g(),E}var G="data-section-instance-id",C=new WeakMap;async function P(t){let o=t.root??document,e=Array.from(o.querySelectorAll(`[${f}]`)).filter(n=>!C.has(n)&&n.parentElement?.closest(`[${f}]`)==null);if(e.length===0)return[];let i=new Map,a=new Set;for(let n of o.querySelectorAll(`script[${T}]`)){let r=n.getAttribute(T);r!==null&&(i.has(r)&&a.add(r),i.set(r,n.textContent??""))}let[c,{createRoot:d,hydrateRoot:u}]=await Promise.all([import("react"),import("react-dom/client")]),{createElement:p}=c,I=q(c),b=V(c),w=({onMounted:n,children:r})=>{let[s,l]=c.useState(0);return c.useEffect(()=>{s===0?l(1):n()},[s,n]),r},E=new Map,m=n=>{let r=E.get(n);return r||(r=t.load(n),E.set(n,r)),r},h=t.schedule!=="eager",R=h?m:t.load,_=async n=>{let r=n.getAttribute(f)??"",s=n.getAttribute(j)??"",l=()=>{},L=new Promise(S=>{l=S}),y={id:s,key:r,element:n,mounted:L};try{if(a.has(s))throw new Error(`island "${s}" (${r}) shares its id with another ${T} payload \u2014 refusing to hydrate either instance rather than guess whose props belong to which marker`);let S=i.get(s);if(S===void 0)throw new Error(`island "${s}" (${r}) has no ${T} payload`);let Q=B(S),M=await R(r);if(y.editor=M.editor,t.shouldHydrate&&!t.shouldHydrate(y)||C.has(n)||!n.isConnected)return l(),null;let Z=n.closest(`[${G}]`)?.getAttribute(G)??null,k=p(I,{value:Z},p(b,{value:s},p(w,{onMounted:l,children:p(M.default,Q)}))),H={onUncaughtError:D=>{t.onError?.(D,y),l()},onCaughtError:D=>{t.onError?.(D,y),l()}},x;return n.hasAttribute(z)?(x=d(n,H),x.render(k)):x=u(n,k,H),C.set(n,x),t.onHydrated?.(y),y}catch(S){return t.onError?.(S,y),l(),null}};if(h)return Y({markers:e,hydrate:_,warm:n=>{m(n).catch(()=>{})},moduleUrl:t.moduleUrl});let g=[];for(let n of e){let r=await _(n);r&&g.push(r)}return g}function $(t=document){let o=t instanceof Element&&t.matches(`[${f}]`)?[t]:[];for(let e of[...o,...t.querySelectorAll(`[${f}]`)]){let i=C.get(e);i&&(C.delete(e),i.unmount())}}import{createElement as it,useLayoutEffect as at}from"react";var A="we-enh-shield",W="we-enh-shield--item",lt="data-we-live",ct="data-slot-item",dt=window.__TR_ISLAND_MAP||{};function ut(t){let o=dt[t];return o?import(new URL(o,document.baseURI).href):Promise.reject(new Error("playground: no island module for "+t))}var v=new WeakMap;function ft(t,o){return function(i){return at(o,[]),it(t,i)}}function pt(t){return t.__trIslandReal||t.default}async function mt(t){let o=await ut(t),e,i=new Promise(c=>{e=c}),a=o.editor?{...o.editor}:void 0;return a&&v.set(a,{committed:i,signalCommit:e}),{...o,editor:a,default:ft(pt(o),e)}}function ht(t,o){let e=t.createElement("div");return e.className=o?A+" "+W:A,e.setAttribute("aria-hidden","true"),e}function K(t,o){let e=t.ownerDocument,i=e.defaultView,a=i?i.getComputedStyle(t).position:"";(!a||a==="static")&&(t.style.position="relative"),!Array.from(t.children).some(c=>c.classList.contains(A))&&t.appendChild(ht(e,o))}function yt(t){let o=t.editor;if(!o||o.live!==!0)return;let e=t.element;for(let u of Array.from(e.querySelectorAll("["+ct+"]")))K(u,!0);let a=e.ownerDocument.defaultView,d=(a?a.getComputedStyle(e).display:"")==="contents"?Array.from(e.children):[e];for(let u of d)K(u,!1)}var F=!1;function wt(){if(F||document.getElementById("tr-canvas-shield-style"))return;F=!0;let t=document.createElement("style");t.id="tr-canvas-shield-style",t.textContent="."+A+"{position:absolute;inset:0;z-index:1;cursor:pointer;background:transparent;}."+W+"{z-index:2;}["+lt+"] ."+A+"{display:none;}",document.head.appendChild(t)}async function X(t){wt();let o=await P({root:t,load:mt,schedule:"eager",shouldHydrate:e=>e.editor?e.editor.live===!0:!1,onError:(e,i)=>{if(console.error("playground: canvas island failed to hydrate:",i.key,e),i.editor){let a=v.get(i.editor);a&&a.signalCommit()}}});await Promise.all(o.map(e=>e.editor?v.get(e.editor):void 0).filter(e=>e!==void 0).map(e=>e.committed));for(let e of o)yt(e);return o}function gt(t){$(t),t.querySelectorAll("."+A).forEach(o=>o.remove())}window.__trCanvasIslands={hydrateRoot:X,unmountRoot:gt};X(document.body);
1
+ var f="data-tr-island",j="data-tr-island-id",T="data-tr-island-props",z="data-tr-island-frameless";var O=class extends Error{name="IslandPropsError"};function B(t){let o;try{o=JSON.parse(t)}catch(e){throw new O(`island props payload is not valid JSON: ${String(e)}`)}if(o===null||typeof o!="object"||Array.isArray(o))throw new O("island props payload must be a JSON object");return o}var J=Symbol.for("homepages.tr-island-editor-instance");function q(t){let o=globalThis,e=o[J];return e||(e=t.createContext(null),o[J]=e),e}var U=Symbol.for("homepages.tr-island-id");function V(t){let o=globalThis,e=o[U];return e||(e=t.createContext(null),o[U]=e),e}var tt="100%";function N(t){let o=t.getBoundingClientRect();return o.width>0||o.height>0}function et(t){if(N(t))return t;let o=t.firstElementChild;if(o&&N(o))return o;for(let e=t.previousElementSibling;e;e=e.previousElementSibling)if(N(e))return e;for(let e=t.parentElement;e;e=e.parentElement)if(N(e))return e;return o??t}function nt(t){let o=t.getBoundingClientRect();return o.bottom>0&&o.right>0&&o.top<window.innerHeight&&o.left<window.innerWidth}function ot(){return navigator.connection?.saveData===!0}function rt(t){typeof requestIdleCallback=="function"?requestIdleCallback(t):setTimeout(t,1)}async function Y(t){let{markers:o,hydrate:e,warm:i,moduleUrl:a}=t,c=n=>n.getAttribute(f)??"",d=new Set,u=n=>d.has(n)?Promise.resolve(null):(d.add(n),e(n)),p=new Map;for(let n of o)p.set(n,et(n));let I=n=>p.get(n)??n,b=[],w=[];for(let n of o)(nt(I(n))?b:w).push(n);if(a&&!ot()){let n=new Set;for(let r of w){let s=a(c(r));if(s==null||s===""||n.has(s))continue;n.add(s);let l=document.createElement("link");l.rel="modulepreload",l.href=s,l.setAttribute("fetchpriority","low"),document.head.appendChild(l)}}for(let n of b)i(c(n));let E=[];for(let n of b){let r=await u(n);r&&E.push(r)}let m=null,h=new Map,R=n=>{let r=u(n),s=I(n),l=h.get(s);return(!l||l.every(L=>d.has(L)))&&m?.unobserve(s),r};if(typeof IntersectionObserver<"u"){m=new IntersectionObserver(n=>{for(let r of n)if(r.isIntersecting)for(let s of h.get(r.target)??[])R(s)},{rootMargin:tt});for(let n of w){let r=I(n),s=h.get(r);s?s.push(n):(h.set(r,[n]),m.observe(r))}}let _=w.slice(),g=()=>{rt(()=>{let n=_.shift();for(;n&&d.has(n);)n=_.shift();if(!n){m?.disconnect();return}R(n).then(g,g)})};return g(),E}var G="data-section-instance-id",C=new WeakMap;async function P(t){let o=t.root??document,e=Array.from(o.querySelectorAll(`[${f}]`)).filter(n=>!C.has(n)&&n.parentElement?.closest(`[${f}]`)==null);if(e.length===0)return[];let i=new Map,a=new Set;for(let n of o.querySelectorAll(`script[${T}]`)){let r=n.getAttribute(T);r!==null&&(i.has(r)&&a.add(r),i.set(r,n.textContent??""))}let[c,{createRoot:d,hydrateRoot:u}]=await Promise.all([import("react"),import("react-dom/client")]),{createElement:p}=c,I=q(c),b=V(c),w=({onMounted:n,children:r})=>{let[s,l]=c.useState(0);return c.useEffect(()=>{s===0?l(1):n()},[s,n]),r},E=new Map,m=n=>{let r=E.get(n);return r||(r=t.load(n),E.set(n,r)),r},h=t.schedule!=="eager",R=h?m:t.load,_=async n=>{let r=n.getAttribute(f)??"",s=n.getAttribute(j)??"",l=()=>{},L=new Promise(S=>{l=S}),y={id:s,key:r,element:n,mounted:L};try{if(a.has(s))throw new Error(`island "${s}" (${r}) shares its id with another ${T} payload \u2014 refusing to hydrate either instance rather than guess whose props belong to which marker`);let S=i.get(s);if(S===void 0)throw new Error(`island "${s}" (${r}) has no ${T} payload`);let Q=B(S),M=await R(r);if(y.editor=M.editor,t.shouldHydrate&&!t.shouldHydrate(y)||C.has(n)||!n.isConnected)return l(),null;let Z=n.closest(`[${G}]`)?.getAttribute(G)??null,k=p(I,{value:Z},p(b,{value:s},p(w,{onMounted:l,children:p(M.default,Q)}))),H={onUncaughtError:D=>{t.onError?.(D,y),l()},onCaughtError:D=>{t.onError?.(D,y),l()}},x;return n.hasAttribute(z)?(x=d(n,H),x.render(k)):x=u(n,k,H),C.set(n,x),t.onHydrated?.(y),y}catch(S){return t.onError?.(S,y),l(),null}};if(h)return Y({markers:e,hydrate:_,warm:n=>{m(n).catch(()=>{})},moduleUrl:t.moduleUrl});let g=[];for(let n of e){let r=await _(n);r&&g.push(r)}return g}function $(t=document){let o=t instanceof Element&&t.matches(`[${f}]`)?[t]:[];for(let e of[...o,...t.querySelectorAll(`[${f}]`)]){let i=C.get(e);i&&(C.delete(e),i.unmount())}}import{createElement as it,useLayoutEffect as at}from"react";var A="we-enh-shield",W="we-enh-shield--item",lt="data-we-live",ct="data-slot-item",dt=window.__TR_ISLAND_MAP||{};function ut(t){let o=dt[t];return o?import(new URL(o,document.baseURI).href):Promise.reject(new Error("playground: no island module for "+t))}var v=new WeakMap;function ft(t,o){return function(i){return at(o,[]),it(t,i)}}function pt(t){return t.__trIslandReal||t.default}async function mt(t){let o=await ut(t),e,i=new Promise(c=>{e=c}),a=o.editor?{...o.editor}:void 0;return a&&v.set(a,{committed:i,signalCommit:e}),{...o,editor:a,default:ft(pt(o),e)}}function ht(t,o){let e=t.createElement("div");return e.className=o?A+" "+W:A,e.setAttribute("aria-hidden","true"),e}function K(t,o){let e=t.ownerDocument,i=e.defaultView,a=i?i.getComputedStyle(t).position:"";(!a||a==="static")&&(t.style.position="relative"),!Array.from(t.children).some(c=>c.classList.contains(A))&&t.appendChild(ht(e,o))}function yt(t){let o=t.editor;if(!o||o.live!==!0)return;let e=t.element;for(let u of Array.from(e.querySelectorAll("["+ct+"]")))K(u,!0);let a=e.ownerDocument.defaultView,d=(a?a.getComputedStyle(e).display:"")==="contents"?Array.from(e.children):[e];for(let u of d)K(u,!1)}var F=!1;function wt(){if(F||document.getElementById("concrete-canvas-shield-style"))return;F=!0;let t=document.createElement("style");t.id="concrete-canvas-shield-style",t.textContent="."+A+"{position:absolute;inset:0;z-index:1;cursor:pointer;background:transparent;}."+W+"{z-index:2;}["+lt+"] ."+A+"{display:none;}",document.head.appendChild(t)}async function X(t){wt();let o=await P({root:t,load:mt,schedule:"eager",shouldHydrate:e=>e.editor?e.editor.live===!0:!1,onError:(e,i)=>{if(console.error("playground: canvas island failed to hydrate:",i.key,e),i.editor){let a=v.get(i.editor);a&&a.signalCommit()}}});await Promise.all(o.map(e=>e.editor?v.get(e.editor):void 0).filter(e=>e!==void 0).map(e=>e.committed));for(let e of o)yt(e);return o}function gt(t){$(t),t.querySelectorAll("."+A).forEach(o=>o.remove())}window.__trCanvasIslands={hydrateRoot:X,unmountRoot:gt};X(document.body);
package/dist/base.css CHANGED
@@ -21,14 +21,22 @@
21
21
  * shipped defects to live customers twice before anyone went looking. The
22
22
  * layers are gone; `check` refuses author CSS that declares them.
23
23
  * - The three reset gaps Tailwind's preflight leaves (below)
24
- * - The section box model (.tr-section, emitted by the <Section> primitive)
24
+ * - The section box model (.concrete-section, emitted by the <Section> primitive)
25
25
  * - The frame shell's static half (.tr-frame, emitted by the <FrameShell> primitive)
26
26
  * and the window witness that holds every host to the geometry it owes that shell
27
- * - The <Image>/<Video>/<Tour> box's geometry default (.tr-image-block), layered so
27
+ * - The <Image>/<Video>/<Tour> box's geometry default (.concrete-image-block), layered so
28
28
  * an author's own width utility beats it
29
- * - The <Image>/<Video> frame's placeholder fill (.tr-image-frame)
29
+ * - The <Image>/<Video> frame's placeholder fill (.concrete-image-frame)
30
30
  * - Universal tokens: motion
31
31
  *
32
+ * EVERY NAME THIS FILE OWNS SPELLS `concrete-`, token and class alike, so a template
33
+ * author reading `.concrete-section` or `var(--concrete-window-h)` knows whose it is
34
+ * without a comment. `--concrete-image-frame-bg` is the one token here a template sets;
35
+ * every other `--concrete-*` is declared here and only read. The lone exception is
36
+ * `.tr-frame`, which is the FRAME CONTRACT's class and not concrete's — it is derived
37
+ * in one place and stamped by every capture surface on both runtimes, so it renames
38
+ * with the rest of that contract's names rather than with this file.
39
+ *
32
40
  * REQUIRES A TAILWIND ENTRY ON THE PAGE. Your entry's `@import "tailwindcss"` brings
33
41
  * Tailwind's preflight, and preflight does the reset: box-sizing, margin/padding,
34
42
  * list-style, the button and anchor resets, display:block on replaced elements. This
@@ -80,15 +88,23 @@
80
88
  * the contract that lets adjacent sections butt edge-to-edge, so a page composes as
81
89
  * a vertical stack with no framework-injected whitespace; padding is the author's —
82
90
  * on this root or a child, the background still paints edge-to-edge under it. */
83
- .tr-section {
91
+ .concrete-section {
84
92
  display: block;
85
93
  width: 100%;
86
94
  padding: 0;
87
95
  margin: 0;
88
96
  }
89
97
 
90
- /* The frame shell's static half, emitted by the <FrameShell> primitive. The frame
91
- * is a viewport: every host owes a frame document a window that is exactly the
98
+ /* The frame shell's static half, emitted by the <FrameShell> primitive.
99
+ *
100
+ * `.tr-frame` is the one `tr-` name left in this file, and it is not concrete's: it
101
+ * is FRAME_ROOT_CLASS, derived once and stamped by every capture surface — the
102
+ * published page shell, the render worker, the editing canvas and both runtimes'
103
+ * <FrameShell>. Renaming it here alone would strand every one of them, so it moves
104
+ * with `.tr-root` and `#tr-site-config` in one change of its own. The private custom
105
+ * properties and counters below ARE concrete's, so they already spell `concrete-`.
106
+ *
107
+ * The frame is a viewport: every host owes a frame document a window that is exactly the
92
108
  * format's BLEED box, and the root fills it — viewport units and geometry @media in
93
109
  * sections read the window and get frame geometry by construction. No size
94
110
  * container here: containers inside sections are ordinary component styling. The
@@ -109,22 +125,22 @@
109
125
 
110
126
  /* The window the host owes this document: the bleed box, i.e. the trim box
111
127
  * extended symmetrically by the bleed. */
112
- --tr-frame-window-w: calc(var(--frame-w) + 2 * var(--frame-bleed));
113
- --tr-frame-window-h: calc(var(--frame-h) + 2 * var(--frame-bleed));
128
+ --concrete-frame-window-w: calc(var(--frame-w) + 2 * var(--frame-bleed));
129
+ --concrete-frame-window-h: calc(var(--frame-h) + 2 * var(--frame-bleed));
114
130
 
115
131
  /* 1 when the real window misses the owed one on either axis, 0 when it does not.
116
132
  * max(d, -d) is an absolute difference and `/ 1px` makes it a plain number. The
117
133
  * -1 is the tolerance: a browser window is whole CSS px while a physical format's
118
134
  * box is fractional, so a capturer rounds and is right to. Multiplying past the
119
135
  * tolerance saturates the clamp, so the witness is on or off, never faded. */
120
- --tr-frame-window-mismatch: clamp(
136
+ --concrete-frame-window-mismatch: clamp(
121
137
  0,
122
138
  (
123
139
  max(
124
- (100vw - var(--tr-frame-window-w)) / 1px,
125
- (var(--tr-frame-window-w) - 100vw) / 1px,
126
- (100vh - var(--tr-frame-window-h)) / 1px,
127
- (var(--tr-frame-window-h) - 100vh) / 1px
140
+ (100vw - var(--concrete-frame-window-w)) / 1px,
141
+ (var(--concrete-frame-window-w) - 100vw) / 1px,
142
+ (100vh - var(--concrete-frame-window-h)) / 1px,
143
+ (var(--concrete-frame-window-h) - 100vh) / 1px
128
144
  ) - 1
129
145
  ) * 10000,
130
146
  1
@@ -144,13 +160,13 @@
144
160
  * box is not a preview of anything and must not read as one. */
145
161
  .tr-frame::after {
146
162
  counter-reset:
147
- tr-frame-owed-w calc(var(--tr-frame-window-w) / 1px)
148
- tr-frame-owed-h calc(var(--tr-frame-window-h) / 1px)
149
- tr-frame-got-w calc(100vw / 1px)
150
- tr-frame-got-h calc(100vh / 1px);
163
+ concrete-frame-owed-w calc(var(--concrete-frame-window-w) / 1px)
164
+ concrete-frame-owed-h calc(var(--concrete-frame-window-h) / 1px)
165
+ concrete-frame-got-w calc(100vw / 1px)
166
+ concrete-frame-got-h calc(100vh / 1px);
151
167
  content: "FRAME WINDOW MISMATCH — this format declares a "
152
- counter(tr-frame-owed-w) "×" counter(tr-frame-owed-h)
153
- " window; the host gave " counter(tr-frame-got-w) "×" counter(tr-frame-got-h)
168
+ counter(concrete-frame-owed-w) "×" counter(concrete-frame-owed-h)
169
+ " window; the host gave " counter(concrete-frame-got-w) "×" counter(concrete-frame-got-h)
154
170
  ". Every viewport unit and geometry query in this frame is resolving against the wrong box.";
155
171
  position: absolute;
156
172
  inset: 0;
@@ -163,7 +179,7 @@
163
179
  background: #b3261e;
164
180
  color: #ffffff;
165
181
  font: 700 clamp(11px, 2.2vw, 26px)/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
166
- opacity: var(--tr-frame-window-mismatch);
182
+ opacity: var(--concrete-frame-window-mismatch);
167
183
  pointer-events: none;
168
184
  }
169
185
 
@@ -184,14 +200,14 @@
184
200
  * were each fixed by hand with an `!`. Layered, an authored width wins outright and
185
201
  * needs none.
186
202
  *
187
- * Deliberately separate from .tr-image-frame below, which templates apply by hand to
203
+ * Deliberately separate from .concrete-image-frame below, which templates apply by hand to
188
204
  * boxes of their own — flex items, a rail card, a button. Those want the fill and not
189
205
  * this geometry, so the two must not be one class.
190
206
  *
191
207
  * Nothing else belongs here: the box is the caller's. `relative` and `overflow-hidden`
192
208
  * stay utilities on the framed wrapper, where the <img> absolutely fills it — those are
193
209
  * the frame's contract, not a default an author may replace. */
194
- .tr-image-block {
210
+ .concrete-image-block {
195
211
  display: block;
196
212
  width: 100%;
197
213
  }
@@ -202,9 +218,10 @@
202
218
  * exists. Both frames share this one class (and one token) deliberately: the fill is the
203
219
  * same neutral rect, so a template retints it once. Templates also apply it by hand to
204
220
  * their own gallery boxes for that fill alone, so it carries no geometry.
205
- * Retint it by setting --tr-image-frame-bg in your theme's layout tokens. */
206
- .tr-image-frame {
207
- background-color: var(--tr-image-frame-bg, oklch(0.97 0 0));
221
+ * Retint it by setting --concrete-image-frame-bg in your theme's layout tokens — the
222
+ * one framework token a template declares rather than only reads. */
223
+ .concrete-image-frame {
224
+ background-color: var(--concrete-image-frame-bg, oklch(0.97 0 0));
208
225
  }
209
226
  }
210
227
 
@@ -212,9 +229,9 @@
212
229
 
213
230
  :root {
214
231
  /* Motion */
215
- --tr-duration-fast: 150ms;
216
- --tr-duration-base: 250ms;
217
- --tr-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
232
+ --concrete-duration-fast: 150ms;
233
+ --concrete-duration-base: 250ms;
234
+ --concrete-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
218
235
 
219
236
  /* The height of the window this page is being viewed in — what `100svh` means
220
237
  * on a published page, which is what this resolves to there and in a frame
@@ -229,5 +246,5 @@
229
246
  * — and a box sized from the window therefore writes ONE thing and is honest on
230
247
  * both surfaces. Spell it as a floor (`min-height`), never a fixed height, so
231
248
  * content taller than a screen still grows the box instead of overflowing it. */
232
- --tr-window-h: 100svh;
249
+ --concrete-window-h: 100svh;
233
250
  }
@@ -1,5 +1,5 @@
1
1
  //#region src/cli/check/render/class-conflicts.ts
2
- const SECTION_ROOT_CLASS = "tr-section";
2
+ const SECTION_ROOT_CLASS = "concrete-section";
3
3
  const MARGIN_UTILITY = /^-?m(?:[trblxyse])?-/;
4
4
  const MARGIN_ARBITRARY = /^\[margin(?:-[a-z-]+)?:/;
5
5
  function utilityOf(token) {
@@ -300,10 +300,10 @@ function shieldHandle(handle) {
300
300
 
301
301
  let styleInstalled = false;
302
302
  function ensureShieldStyle() {
303
- if (styleInstalled || document.getElementById("tr-canvas-shield-style")) return;
303
+ if (styleInstalled || document.getElementById("concrete-canvas-shield-style")) return;
304
304
  styleInstalled = true;
305
305
  const style = document.createElement("style");
306
- style.id = "tr-canvas-shield-style";
306
+ style.id = "concrete-canvas-shield-style";
307
307
  style.textContent =
308
308
  "." + SHIELD_CLASS + "{position:absolute;inset:0;z-index:1;cursor:pointer;background:transparent;}" +
309
309
  "." + SHIELD_ITEM_CLASS + "{z-index:2;}" +
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "2.0.0";
2
+ var version = "3.0.0";
3
3
 
4
4
  //#endregion
5
5
  export { version };
@@ -10,7 +10,7 @@ type Props = {
10
10
  * The frame shell — the rendered-class page root, the frame analog of the
11
11
  * website page shell. The frame is a viewport: every host owes a frame
12
12
  * document a window that is exactly the format's bleed box, and the static
13
- * half of the contract (`.tr-frame`, from the kit's base stylesheet) fills
13
+ * half of the contract (`.tr-frame`, from the framework's base stylesheet) fills
14
14
  * that window, clips at the shell's own edge, and lays sections out as a
15
15
  * rigid flex column (`flex-shrink: 0` on every direct child, so an
16
16
  * overflowing stack overflows measurably instead of being silently
@@ -7,7 +7,7 @@ import { jsx } from "react/jsx-runtime";
7
7
  * The frame shell — the rendered-class page root, the frame analog of the
8
8
  * website page shell. The frame is a viewport: every host owes a frame
9
9
  * document a window that is exactly the format's bleed box, and the static
10
- * half of the contract (`.tr-frame`, from the kit's base stylesheet) fills
10
+ * half of the contract (`.tr-frame`, from the framework's base stylesheet) fills
11
11
  * that window, clips at the shell's own edge, and lays sections out as a
12
12
  * rigid flex column (`flex-shrink: 0` on every direct child, so an
13
13
  * overflowing stack overflows measurably instead of being silently
@@ -66,7 +66,7 @@ type Props = (ImageOptions & {
66
66
  * Whatever box your classes establish is the box, and `object-position` on the `<img>`
67
67
  * is yours to set where a design wants the cover nudged.
68
68
  *
69
- * **Framed** (default): a wrapper — `relative`, clipped, tinted via `.tr-image-frame`
69
+ * **Framed** (default): a wrapper — `relative`, clipped, tinted via `.concrete-image-frame`
70
70
  * when the value is absent — that your `className` lands on and the `<img>` absolutely
71
71
  * fills as an `object-cover`. Size the wrapper with your own classes (an aspect utility,
72
72
  * a height, an absolute inset) and the image covers it. `className` is the ONLY prop that
@@ -32,7 +32,7 @@ function resolveRendition(value, rendition) {
32
32
  * Whatever box your classes establish is the box, and `object-position` on the `<img>`
33
33
  * is yours to set where a design wants the cover nudged.
34
34
  *
35
- * **Framed** (default): a wrapper — `relative`, clipped, tinted via `.tr-image-frame`
35
+ * **Framed** (default): a wrapper — `relative`, clipped, tinted via `.concrete-image-frame`
36
36
  * when the value is absent — that your `className` lands on and the `<img>` absolutely
37
37
  * fills as an `object-cover`. Size the wrapper with your own classes (an aspect utility,
38
38
  * a height, an absolute inset) and the image covers it. `className` is the ONLY prop that
@@ -125,7 +125,7 @@ function Image({ value, alt, frame, fit, sizes, maxRungWidth, mobileBreakpoint,
125
125
  }
126
126
  if (frame === false) {
127
127
  const cls = [
128
- "tr-image-block",
128
+ "concrete-image-block",
129
129
  fit ? objectFitClass(fit) : null,
130
130
  className
131
131
  ].filter(Boolean).join(" ");
@@ -147,7 +147,7 @@ function Image({ value, alt, frame, fit, sizes, maxRungWidth, mobileBreakpoint,
147
147
  ...responsiveImgAttrs
148
148
  }));
149
149
  }
150
- const containerCls = ["tr-image-frame tr-image-block relative overflow-hidden", className].filter(Boolean).join(" ");
150
+ const containerCls = ["concrete-image-frame concrete-image-block relative overflow-hidden", className].filter(Boolean).join(" ");
151
151
  if (!src) return /* @__PURE__ */ jsx("div", {
152
152
  className: containerCls,
153
153
  role: "img",
@@ -7,15 +7,15 @@ type Props = HTMLAttributes<HTMLElement> & {
7
7
  /**
8
8
  * The section root. Every section renderer roots at exactly one `<Section>`.
9
9
  *
10
- * Full-bleed by contract: 100% width with zero margin (`.tr-section`, from the kit's
11
- * base stylesheet), so consecutive sections butt edge-to-edge and a page composes as
10
+ * Full-bleed by contract: 100% width with zero margin (`.concrete-section`, from the
11
+ * framework's base stylesheet), so consecutive sections butt edge-to-edge and a page composes as
12
12
  * a vertical stack with no framework-injected whitespace. A margin utility on this
13
13
  * root would re-open those gaps — `concrete check` reports it
14
14
  * (section-root-margin). Padding is yours: on this root or on a child, the section's
15
15
  * background still paints edge-to-edge under it.
16
16
  *
17
17
  * When content needs a centered, max-width well, write it as JSX on a child:
18
- * `w-full max-w-[var(--tr-container-max)] mx-auto px-[var(--tr-container-pad)]`.
18
+ * `w-full max-w-page mx-auto px-gutter`, spending tokens your own `@theme` declares.
19
19
  */
20
20
  declare function Section({ as, children, className, ...rest }: Props): import("react").JSX.Element;
21
21
  //#endregion
@@ -4,19 +4,19 @@ import { jsx } from "react/jsx-runtime";
4
4
  /**
5
5
  * The section root. Every section renderer roots at exactly one `<Section>`.
6
6
  *
7
- * Full-bleed by contract: 100% width with zero margin (`.tr-section`, from the kit's
8
- * base stylesheet), so consecutive sections butt edge-to-edge and a page composes as
7
+ * Full-bleed by contract: 100% width with zero margin (`.concrete-section`, from the
8
+ * framework's base stylesheet), so consecutive sections butt edge-to-edge and a page composes as
9
9
  * a vertical stack with no framework-injected whitespace. A margin utility on this
10
10
  * root would re-open those gaps — `concrete check` reports it
11
11
  * (section-root-margin). Padding is yours: on this root or on a child, the section's
12
12
  * background still paints edge-to-edge under it.
13
13
  *
14
14
  * When content needs a centered, max-width well, write it as JSX on a child:
15
- * `w-full max-w-[var(--tr-container-max)] mx-auto px-[var(--tr-container-pad)]`.
15
+ * `w-full max-w-page mx-auto px-gutter`, spending tokens your own `@theme` declares.
16
16
  */
17
17
  function Section({ as = "section", children, className, ...rest }) {
18
18
  return /* @__PURE__ */ jsx(as, {
19
- className: ["tr-section", className].filter(Boolean).join(" "),
19
+ className: ["concrete-section", className].filter(Boolean).join(" "),
20
20
  ...rest,
21
21
  children
22
22
  });
@@ -21,7 +21,7 @@ type Props = Omit<HTMLAttributes<HTMLElement>, "title"> & {
21
21
  * dimensions — gone rather than left inert. `url` is the FINISHED embed src, rewritten
22
22
  * once at resolve by `tourEmbedUrl`, so this component is a pure read.
23
23
  *
24
- * **Framed** (default): a wrapper — `relative`, clipped, tinted via `.tr-image-frame` —
24
+ * **Framed** (default): a wrapper — `relative`, clipped, tinted via `.concrete-image-frame` —
25
25
  * that your `className` lands on and the iframe absolutely fills. The kit paints no
26
26
  * geometry: size the wrapper with your own classes and the embed fills it, same as
27
27
  * `<Image>`/`<Video>`.
@@ -11,7 +11,7 @@ import { jsx } from "react/jsx-runtime";
11
11
  * dimensions — gone rather than left inert. `url` is the FINISHED embed src, rewritten
12
12
  * once at resolve by `tourEmbedUrl`, so this component is a pure read.
13
13
  *
14
- * **Framed** (default): a wrapper — `relative`, clipped, tinted via `.tr-image-frame` —
14
+ * **Framed** (default): a wrapper — `relative`, clipped, tinted via `.concrete-image-frame` —
15
15
  * that your `className` lands on and the iframe absolutely fills. The kit paints no
16
16
  * geometry: size the wrapper with your own classes and the embed fills it, same as
17
17
  * `<Image>`/`<Video>`.
@@ -32,7 +32,7 @@ function Tour({ value, alt, frame, className, ...rest }) {
32
32
  const { markerAttrs, rest: hostAttrs } = splitMarkerAttrs(rest);
33
33
  const src = value?.url ? value.url : null;
34
34
  const altText = alt ?? value?.alt ?? "";
35
- const unframedCls = ["tr-image-block", className].filter(Boolean).join(" ");
35
+ const unframedCls = ["concrete-image-block", className].filter(Boolean).join(" ");
36
36
  const iframeEl = src === null ? null : /* @__PURE__ */ jsx("iframe", {
37
37
  src,
38
38
  title: altText || "3D tour",
@@ -57,7 +57,7 @@ function Tour({ value, alt, frame, className, ...rest }) {
57
57
  });
58
58
  }
59
59
  return /* @__PURE__ */ jsx("div", {
60
- className: ["tr-image-frame tr-image-block relative overflow-hidden", className].filter(Boolean).join(" "),
60
+ className: ["concrete-image-frame concrete-image-block relative overflow-hidden", className].filter(Boolean).join(" "),
61
61
  ...iframeEl ? {} : {
62
62
  role: "img",
63
63
  "aria-label": altText || void 0
@@ -32,7 +32,7 @@ type Props = Omit<VideoHTMLAttributes<HTMLVideoElement>, "src" | "poster" | "aut
32
32
  * an embed src the resolver already finished. Absent `source` is an upload. Both share
33
33
  * one frame container, one poster-only fallback, and one marker spread.
34
34
  *
35
- * **Framed** (default): a wrapper — `relative`, clipped, tinted via `.tr-image-frame` —
35
+ * **Framed** (default): a wrapper — `relative`, clipped, tinted via `.concrete-image-frame` —
36
36
  * that your `className` lands on and the player absolutely fills. The kit paints no
37
37
  * geometry: size the wrapper with your own classes (an aspect utility, a height) and the
38
38
  * player covers it. `frame={false}` hands your classes to the media element itself.
@@ -25,7 +25,7 @@ const PREVIEW_PLAYBACK = {
25
25
  * an embed src the resolver already finished. Absent `source` is an upload. Both share
26
26
  * one frame container, one poster-only fallback, and one marker spread.
27
27
  *
28
- * **Framed** (default): a wrapper — `relative`, clipped, tinted via `.tr-image-frame` —
28
+ * **Framed** (default): a wrapper — `relative`, clipped, tinted via `.concrete-image-frame` —
29
29
  * that your `className` lands on and the player absolutely fills. The kit paints no
30
30
  * geometry: size the wrapper with your own classes (an aspect utility, a height) and the
31
31
  * player covers it. `frame={false}` hands your classes to the media element itself.
@@ -53,7 +53,7 @@ function Video({ value, alt, frame, fit, playback, preview, className, ...rest }
53
53
  const p = preview ? PREVIEW_PLAYBACK : playback ?? DEFAULT_PLAYBACK;
54
54
  const objectFit = objectFitClass(fit ?? "cover");
55
55
  const unframedCls = [
56
- "tr-image-block",
56
+ "concrete-image-block",
57
57
  fit ? objectFitClass(fit) : null,
58
58
  className
59
59
  ].filter(Boolean).join(" ");
@@ -91,7 +91,7 @@ function Video({ value, alt, frame, fit, playback, preview, className, ...rest }
91
91
  ...markerAttrs
92
92
  });
93
93
  }
94
- const containerCls = ["tr-image-frame tr-image-block relative overflow-hidden", className].filter(Boolean).join(" ");
94
+ const containerCls = ["concrete-image-frame concrete-image-block relative overflow-hidden", className].filter(Boolean).join(" ");
95
95
  if (!mediaEl) return /* @__PURE__ */ jsx("div", {
96
96
  className: containerCls,
97
97
  role: "img",
package/dist/styles.css CHANGED
@@ -54,7 +54,8 @@
54
54
  --spacing: 0.25rem; /* v4 base unit; Tailwind multiplies (e.g. p-4 = 1rem) */
55
55
 
56
56
  /* ---------- Motion ----------
57
- * The --tr-* values these read are defined in base.css, which every page loads. */
58
- --default-transition-duration: var(--tr-duration-fast);
59
- --default-transition-timing-function: var(--tr-ease);
57
+ * The --concrete-* values these read are defined in base.css, which every page
58
+ * loads — the framework's own namespace, never a template's. */
59
+ --default-transition-duration: var(--concrete-duration-fast);
60
+ --default-transition-timing-function: var(--concrete-ease);
60
61
  }
@@ -3,7 +3,7 @@ purpose: Every `concrete` command, with its full flag surface, exit codes and co
3
3
  mode: reference
4
4
  status: generated
5
5
  generated_from: the concrete command table
6
- applies_to: "@homepages/concrete >=2.0.0 <3.0.0"
6
+ applies_to: "@homepages/concrete >=3.0.0 <4.0.0"
7
7
  related: [INDEX.md]
8
8
  ---
9
9
  # Command reference
@@ -73,7 +73,7 @@ of its flags.
73
73
 
74
74
  ## Versions
75
75
 
76
- These pages describe `@homepages/concrete` **>=2.0.0 <3.0.0**. The range, rather than
76
+ These pages describe `@homepages/concrete` **>=3.0.0 <4.0.0**. The range, rather than
77
77
  the exact version they were generated from: this reference is committed build output,
78
78
  so a page stamped with a patch version would be stale the day it shipped.
79
79
  `concrete --version` prints the installed one.
@@ -3,7 +3,7 @@ purpose: The `concrete build` command — its flags, exit codes and constraints.
3
3
  mode: reference
4
4
  status: generated
5
5
  generated_from: the concrete command table
6
- applies_to: "@homepages/concrete >=2.0.0 <3.0.0"
6
+ applies_to: "@homepages/concrete >=3.0.0 <4.0.0"
7
7
  related: [reference/cli/INDEX.md]
8
8
  ---
9
9
  # concrete build
@@ -3,7 +3,7 @@ purpose: The `concrete check` command — its flags, exit codes and constraints.
3
3
  mode: reference
4
4
  status: generated
5
5
  generated_from: the concrete command table
6
- applies_to: "@homepages/concrete >=2.0.0 <3.0.0"
6
+ applies_to: "@homepages/concrete >=3.0.0 <4.0.0"
7
7
  related: [reference/cli/INDEX.md]
8
8
  ---
9
9
  # concrete check
@@ -3,7 +3,7 @@ purpose: The `concrete dev` command — its flags, exit codes and constraints.
3
3
  mode: reference
4
4
  status: generated
5
5
  generated_from: the concrete command table
6
- applies_to: "@homepages/concrete >=2.0.0 <3.0.0"
6
+ applies_to: "@homepages/concrete >=3.0.0 <4.0.0"
7
7
  related: [reference/cli/INDEX.md]
8
8
  ---
9
9
  # concrete dev
@@ -3,7 +3,7 @@ purpose: The `concrete property add` command — its flags, exit codes and const
3
3
  mode: reference
4
4
  status: generated
5
5
  generated_from: the concrete command table
6
- applies_to: "@homepages/concrete >=2.0.0 <3.0.0"
6
+ applies_to: "@homepages/concrete >=3.0.0 <4.0.0"
7
7
  related: [reference/cli/INDEX.md]
8
8
  ---
9
9
  # concrete property add
@@ -3,7 +3,7 @@ purpose: The `concrete property list` command — its flags, exit codes and cons
3
3
  mode: reference
4
4
  status: generated
5
5
  generated_from: the concrete command table
6
- applies_to: "@homepages/concrete >=2.0.0 <3.0.0"
6
+ applies_to: "@homepages/concrete >=3.0.0 <4.0.0"
7
7
  related: [reference/cli/INDEX.md]
8
8
  ---
9
9
  # concrete property list
@@ -3,7 +3,7 @@ purpose: The `concrete publish` command — its flags, exit codes and constraint
3
3
  mode: reference
4
4
  status: generated
5
5
  generated_from: the concrete command table
6
- applies_to: "@homepages/concrete >=2.0.0 <3.0.0"
6
+ applies_to: "@homepages/concrete >=3.0.0 <4.0.0"
7
7
  related: [reference/cli/INDEX.md]
8
8
  ---
9
9
  # concrete publish
@@ -3,7 +3,7 @@ purpose: The `concrete upgrade` command — its flags, exit codes and constraint
3
3
  mode: reference
4
4
  status: generated
5
5
  generated_from: the concrete command table
6
- applies_to: "@homepages/concrete >=2.0.0 <3.0.0"
6
+ applies_to: "@homepages/concrete >=3.0.0 <4.0.0"
7
7
  related: [reference/cli/INDEX.md]
8
8
  ---
9
9
  # concrete upgrade
@@ -3,7 +3,7 @@ purpose: Every rule `concrete check` grades, by the stage that grades it, in the
3
3
  mode: reference
4
4
  status: generated
5
5
  generated_from: the concrete rule registry
6
- applies_to: "@homepages/concrete >=2.0.0 <3.0.0"
6
+ applies_to: "@homepages/concrete >=3.0.0 <4.0.0"
7
7
  related: [reference/cli/check.md]
8
8
  ---
9
9
  # Rule reference
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homepages/concrete",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "Concrete, the HomePages template framework: the authoring API, the contract primitives, the styles, the lint preset and the `concrete` command in one package that owns its whole toolchain.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",