efficient-web-builder 69.0.0 → 69.2.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.
Files changed (38) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/editor/components/BlogPostSource.d.ts +2 -8
  3. package/dist/editor/components/BlogPostSource.js +1 -1
  4. package/dist/format/lib/content/box-layout.d.ts +1 -0
  5. package/dist/format/lib/content/box-layout.js +1 -1
  6. package/dist/format/lib/content/post-date.d.ts +1 -0
  7. package/dist/format/lib/content/post-date.js +1 -1
  8. package/dist/format/lib/content/post-snapshot.d.ts +11 -0
  9. package/dist/format/lib/content/post-snapshot.js +1 -0
  10. package/dist/format/lib/source-rules/motion-vars-from-the-shell.js +3 -3
  11. package/dist/format/lib/source-rules/one-alignment-row.js +3 -3
  12. package/dist/format/lib/source-rules/one-block-box-word-map.d.ts +9 -0
  13. package/dist/format/lib/source-rules/one-block-box-word-map.js +13 -0
  14. package/dist/format/lib/source-rules/one-items-align-map.js +4 -7
  15. package/dist/format/lib/source-rules/one-loop-module.js +2 -2
  16. package/dist/format/lib/source-rules/one-page-theme-reader.js +2 -2
  17. package/dist/format/lib/source-rules/support/align-word-rule.d.ts +5 -0
  18. package/dist/format/lib/source-rules/support/align-word-rule.js +4 -0
  19. package/dist/format/lib/source-rules/support/exemptions.d.ts +2 -0
  20. package/dist/format/lib/source-rules/support/exemptions.js +1 -0
  21. package/dist/render/components/FeaturedCover.d.ts +2 -1
  22. package/dist/render/components/FeaturedCover.js +1 -1
  23. package/dist/render/components/LongRead.d.ts +2 -1
  24. package/dist/render/components/LongRead.js +1 -1
  25. package/dist/render/components/PostCard.d.ts +1 -0
  26. package/dist/render/components/PostCard.js +1 -1
  27. package/dist/render/components/PostDate.d.ts +3 -0
  28. package/dist/render/components/PostDate.js +1 -0
  29. package/dist/render/components/Ticker.js +1 -1
  30. package/dist/render/lib/animation/LoopTrack.d.ts +1 -1
  31. package/dist/render/lib/animation/LoopTrack.js +1 -1
  32. package/dist/render/lib/animation/loop-fill.d.ts +9 -0
  33. package/dist/render/lib/animation/loop-fill.js +1 -0
  34. package/dist/render/lib/document/blocks/general/FeaturedCover/render.js +1 -1
  35. package/dist/render/lib/document/blocks/general/LongRead/render.js +1 -1
  36. package/dist/render/lib/document/blocks/general/PostCard/render.js +1 -1
  37. package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
  38. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # Changelog
2
2
 
3
+ ## 69.2.0 - 2026-11-15
4
+
5
+ From main at `18a8db55`: #756. A minor: no `!`, no export is removed, the peers stay `efficient-easel` `^34.3.0` and `efficient-shell` `^13.3.0`. New exports only. `postDateLabel` is deprecated (delete by 2026-12-12, in a major).
6
+
7
+ **For hosts:**
8
+ - storefront-blocks and storefront may draw a post's date with `PostDate` / `postDay` (the reader's day) and stop writing the UTC day (`postDateLabel`). No step is required to take this release.
9
+ - Stored data: 8 linked post snapshots on the two US `/journal` pages have no `publishedAt` and `date: ""`, so they draw no day today and need no change to take this release. Adding `publishedAt` to them is a separate CLI move with its own approval.
10
+
11
+ ### Added
12
+
13
+ - **A post's date is the reader's day** (#756): new `render/components/PostDate` draws `<time dateTime>` with the instant; the server draws no day (an invisible stand-in holds the width), and the browser fills in the reader's day, so hydration does not mismatch. New `postDay(iso)` in `lib/content/post-date`, written by efficient-shell `formatDate`. New `lib/content/post-snapshot` (`BlogPostSnapshot`, `postSnapshotOf`), the one blog row -> snapshot mapper: a snapshot stores `publishedAt` and `date: ""`.
14
+
15
+ ### Changed
16
+
17
+ - **Featured cover, Long read and Post card** (#756): a linked post with an instant draws `PostDate`; a hand-typed date or an old snapshot's `date` text draws as before. `BlogPostSource` uses `postSnapshotOf` and re-pulls a stored snapshot without `publishedAt` on its next open. `BlogPostSourceValue` is now `type BlogPostSourceValue = BlogPostSnapshot` (same fields).
18
+
19
+ ### Deprecated
20
+
21
+ - **`postDateLabel`** (the UTC day, `lib/content/post-date`, #756): delete by 2026-12-12, in a major. Nothing in `src/` calls it.
22
+
23
+ ## 69.1.0 - 2026-11-15
24
+
25
+ From main at `2ee511c3`: #755, #757, #758, #759. A minor: no `!`, no export is removed, the peers stay `efficient-easel` `^34.3.0` and `efficient-shell` `^13.3.0`. New exports only. No stored key or value moves.
26
+
27
+ **For hosts:**
28
+ - storefront-blocks and storefront: import `ALIGN_TABLE_WORDS` from `efficient-web-builder/format/lib/content/box-layout` and drop their own copy of the align words (each its own small PR, #758). They can add the new `oneBlockBoxWordMap` source rule to their rule runs; the storefront-blocks `test-items-align-home-import.tsx` §2b check moves into it (#759).
29
+ - No step is required to take this release.
30
+
31
+ ### Added
32
+
33
+ - **One exported list of align-table words** (#758): `ALIGN_TABLE_WORDS` in `lib/content/box-layout`, every key of `BOX_ALIGN_CLASS` and block-align `BLOCK_ALIGN_TEXT`, once each.
34
+ - **One home for a block word's box word** (#759): new source rule `format/lib/source-rules/one-block-box-word-map` (`oneBlockBoxWordMap`, `OneBlockBoxWordMapOptions`) fails a typed block word -> box word pair and a `BOX_ALIGN_CLASS` read by a typed box word. New support modules `source-rules/support/align-word-rule` (`assertPlainWords`, `LEADS`, `findingsWith`, `exemptionChecks`) and `source-rules/support/exemptions` (`checkExemptionsStillHere`). `section-to-box-rows-editorial` `splitItems` reads `BLOCK_ALIGN_BOX_WORD` (same words out for every stored value).
35
+ - **Loop fill exports** (#755): `render/lib/animation/loop-fill` (`loopFillCount`, `loopFillSeconds`, `useLoopFill`, `LOOP_FILL_MAX`).
36
+
37
+ ### Fixed
38
+
39
+ - **A scrolling Box row fills its band with no empty space** (#755): each half of a Loop › Marquee track holds as many copies as cover the band; the run is seconds × copies, so the speed in px/s does not change. The server still draws 2 copies (the same bytes); every copy after the first is `aria-hidden` and `inert`. The old Scrolling Bar (`components/Ticker`) uses the same rule and no longer jumps once a loop; its server bytes do not change.
40
+
41
+ ### Internal
42
+
43
+ - Build and test against efficient-easel 34.3.2 (#757): dev range only; the peer stays `^34.3.0`.
44
+
3
45
  ## 69.0.0 - 2026-11-14
4
46
 
5
47
  From main at `5f8f035a`: #752. A major: #752 carries `!`. The `efficient-shell` peer moves `^13.0.0` -> `^13.3.0`; the `simple-icons` peer is removed. No stored key or value moves; stored Integrations bands draw the same chip as the new Chips look.
@@ -1,11 +1,5 @@
1
- export interface BlogPostSourceValue {
2
- slug: string;
3
- image: string;
4
- title: string;
5
- dek: string;
6
- date: string;
7
- href: string;
8
- }
1
+ import { type BlogPostSnapshot } from "../../format/lib/content/post-snapshot.js";
2
+ export type BlogPostSourceValue = BlogPostSnapshot;
9
3
  interface Props {
10
4
  value?: BlogPostSourceValue | null;
11
5
  onChange: (value: BlogPostSourceValue | null) => void;
@@ -1 +1 @@
1
- "use client";import{jsx as e,Fragment as i,jsxs as B}from"react/jsx-runtime";import{useContext as P}from"react";import{SettingsField as g}from"efficient-easel/panel";import{FieldSelect as f}from"efficient-easel/fields";import{BlogPostIcon as h}from"efficient-easel/icons";import{ScreenDocumentContext as L}from"efficient-easel/screen/components/ScreenDocumentContext";import{loadStorefrontBlogPosts as C}from"./useStorefrontBlogPosts.js";import{useSnapshotSource as F}from"./useSnapshotSource.js";import j from"./SourceStatus.js";import{storedPickRow as w}from"../../format/components/stored-pick-row.js";import{say as t}from"../../format/lib/editor-words.js";import{postDateLabel as N}from"../../format/lib/content/post-date.js";function p(o){return{slug:o.slug,image:o.coverImage,title:o.title,dek:o.excerpt,date:N(o.publishedAt),href:o.href}}function T({value:o,onChange:n}){const r=P(L);return r&&!r.capabilities.hasBlog?o?.slug?e(D,{value:o,onChange:n}):e(i,{}):e(_,{value:o,onChange:n})}function D({value:o,onChange:n}){return e("div",{children:e(g,{label:t("Blog post source"),icon:e(h,{}),hint:e(i,{children:t("Linked to a blog post. This editor has no blog to pick another from; choose “None (manual)” to author the section yourself.")}),children:e(f,{value:o.slug,ariaLabel:t("Blog post source"),onChange:r=>r?void 0:n(null),options:[{label:t("None (manual)"),value:""},{label:o.title||o.slug,value:o.slug}]})})})}function _({value:o,onChange:n}){const{rows:r,loading:m,refreshing:a,errored:d,refresh:b}=F({load:C,resolve:(s,l)=>s.find(c=>c.slug===l.slug),snapshot:p,value:o,onChange:n}),k=s=>{if(!s){n(null);return}const l=(r??[]).find(c=>c.slug===s);l&&n(p(l))},S=o?.slug&&!(r??[]).some(s=>s.slug===o.slug),x=d?"error":a?"loading":"idle",u=t("Storefront → Blog"),y=d?t("Couldn’t reach {place}.",{place:u}):a?t("Syncing from {place}…",{place:u}):t("Linked to “{name}”",{name:o?.title||o?.slug||""});return B("div",{children:[e(g,{label:t("Blog post source"),icon:e(h,{}),hint:o?.slug?void 0:e(i,{children:t("Pick a post from {place} to auto-fill this section, or keep “None (manual)” to author it yourself below.",{place:u})}),children:e(f,{value:o?.slug??"",ariaLabel:t("Blog post source"),onChange:k,readOnly:m,options:[{label:t("None (manual)"),value:""},...S?[w({name:o.title||o.slug,value:o.slug},!m)]:[],...(r??[]).map(s=>({label:s.title,value:s.slug}))]})}),o?.slug?e(j,{status:x,statusText:y,onRefresh:b,busy:a,hint:e(i,{children:t("Auto-fills the cover image, headline, dek, date and link from this post each time you open the editor. Those fields are hidden while a post is linked; the remaining fields stay yours to set.")})}):null]})}export{T as default};
1
+ "use client";import{jsx as e,Fragment as i,jsxs as B}from"react/jsx-runtime";import{useContext as P}from"react";import{SettingsField as p}from"efficient-easel/panel";import{FieldSelect as f}from"efficient-easel/fields";import{BlogPostIcon as g}from"efficient-easel/icons";import{ScreenDocumentContext as L}from"efficient-easel/screen/components/ScreenDocumentContext";import{loadStorefrontBlogPosts as C}from"./useStorefrontBlogPosts.js";import{useSnapshotSource as j}from"./useSnapshotSource.js";import w from"./SourceStatus.js";import{storedPickRow as F}from"../../format/components/stored-pick-row.js";import{say as t}from"../../format/lib/editor-words.js";import{postSnapshotOf as h}from"../../format/lib/content/post-snapshot.js";function N({value:o,onChange:n}){const r=P(L);return r&&!r.capabilities.hasBlog?o?.slug?e(T,{value:o,onChange:n}):e(i,{}):e(O,{value:o,onChange:n})}function T({value:o,onChange:n}){return e("div",{children:e(p,{label:t("Blog post source"),icon:e(g,{}),hint:e(i,{children:t("Linked to a blog post. This editor has no blog to pick another from; choose “None (manual)” to author the section yourself.")}),children:e(f,{value:o.slug,ariaLabel:t("Blog post source"),onChange:r=>r?void 0:n(null),options:[{label:t("None (manual)"),value:""},{label:o.title||o.slug,value:o.slug}]})})})}function O({value:o,onChange:n}){const{rows:r,loading:m,refreshing:a,errored:d,refresh:b}=j({load:C,resolve:(s,l)=>s.find(c=>c.slug===l.slug),snapshot:h,value:o,onChange:n}),k=s=>{if(!s){n(null);return}const l=(r??[]).find(c=>c.slug===s);l&&n(h(l))},S=o?.slug&&!(r??[]).some(s=>s.slug===o.slug),x=d?"error":a?"loading":"idle",u=t("Storefront → Blog"),y=d?t("Couldn’t reach {place}.",{place:u}):a?t("Syncing from {place}…",{place:u}):t("Linked to “{name}”",{name:o?.title||o?.slug||""});return B("div",{children:[e(p,{label:t("Blog post source"),icon:e(g,{}),hint:o?.slug?void 0:e(i,{children:t("Pick a post from {place} to auto-fill this section, or keep “None (manual)” to author it yourself below.",{place:u})}),children:e(f,{value:o?.slug??"",ariaLabel:t("Blog post source"),onChange:k,readOnly:m,options:[{label:t("None (manual)"),value:""},...S?[F({name:o.title||o.slug,value:o.slug},!m)]:[],...(r??[]).map(s=>({label:s.title,value:s.slug}))]})}),o?.slug?e(w,{status:x,statusText:y,onRefresh:b,busy:a,hint:e(i,{children:t("Auto-fills the cover image, headline, dek, date and link from this post each time you open the editor. Those fields are hidden while a post is linked; the remaining fields stay yours to set.")})}):null]})}export{N as default};
@@ -6,6 +6,7 @@ export declare const NESTED_BOX_PADDING: {
6
6
  readonly sectionPaddingBottom: 0;
7
7
  };
8
8
  export declare const BOX_ALIGN_CLASS: Record<BoxAlign, string>;
9
+ export declare const ALIGN_TABLE_WORDS: readonly string[];
9
10
  export declare function boxLayoutClasses(justify: unknown, align: unknown): string;
10
11
  export declare function boxWrapClass(wrap: unknown): string;
11
12
  export declare function boxJustifyViewAnswers(justify: unknown, justifyTablet: unknown, justifyPhone: unknown): ViewOverrides<BoxJustify>;
@@ -1 +1 @@
1
- import{PARENT_BOX_IS_NOT_CARD_RULE as R}from"./box-card-rule.js";import{isStripBox as f}from"./box-separator.js";import{viewOverrides as P}from"./view-overrides.js";import{hasOwnEntry as m}from"../own-entry.js";const re={sectionPaddingTop:0,sectionPaddingBottom:0},c={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},v={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function le(e,i){const s=typeof e=="string"&&m(c,e)?c[e]:"",t=typeof i=="string"&&m(v,i)?v[i]:"";return[s,t].filter(Boolean).join(" ")}function I(e){return e===!0||e==="wrap"?"flex-wrap":""}const H={start:"view-wide:max-view-desktop:justify-start!",center:"view-wide:max-view-desktop:justify-center!",between:"view-wide:max-view-desktop:justify-between!",end:"view-wide:max-view-desktop:justify-end!"},M={start:"max-view-wide:justify-start",center:"max-view-wide:justify-center",between:"max-view-wide:justify-between",end:"max-view-wide:justify-end"},X={start:"view-wide:max-view-desktop:items-start!",center:"view-wide:max-view-desktop:items-center!",end:"view-wide:max-view-desktop:items-end!",stretch:"view-wide:max-view-desktop:items-stretch!"},$={start:"max-view-wide:items-start",center:"max-view-wide:items-center",end:"max-view-wide:items-end",stretch:"max-view-wide:items-stretch"},U={wrap:"view-wide:max-view-desktop:flex-wrap!",nowrap:"view-wide:max-view-desktop:flex-nowrap!"};function o(e,i){return typeof i=="string"&&m(e,i)?i:void 0}function h(e,i,s){const t=P("same",e,i,s),a={};return t.tablet!==void 0&&t.tablet!==e&&(a.tablet=t.tablet),t.phone!==void 0&&t.phone!==e&&(a.phone=t.phone),a}function _(e,i,s){return[e.tablet?i[e.tablet]:"",e.phone?s[e.phone]:""].filter(Boolean).join(" ")}function W(e,i,s){return h(o(c,e)??"start",o(c,i),o(c,s))}function ce(e,i,s){return _(W(e,i,s),H,M)}function ve(e,i,s){const t=o(v,e)??"stretch";if(t==="stretch")return"";const a=h(t,o(v,i),o(v,s));return _(a,X,$)}function b(e){if(e===!0||e==="wrap")return"wrap";if(e===!1||e==="nowrap")return"nowrap"}function xe(e,i){const s=I(e)===""?"nowrap":"wrap",t=b(i);return t&&t!==s?U[t]:""}const pe="Block widths",u=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{value:"bigLeft",weights:[2,1]},{value:"bigRight",weights:[1,2]},{value:"biggerLeft",weights:[3,1]},{value:"biggerRight",weights:[1,3]},{value:"twoThree",weights:[2,3]}],j="data-sf-box-items",F=new RegExp(`[ \\t]+[^\\s"'\`]*\\[${j}\\][^\\s"'\`]*`,"g");function fe(e){return e.replace(F,"")}const me=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Custom",value:"custom",weights:[2,1]}];function he(e){return Array.isArray(e)?"custom":e==="equal"?"equal":typeof e=="string"&&e in p?"custom":"content"}const S=4,k=10;function G(e,i){if(!Number.isInteger(i)||i<2||i>S||e.length!==i-1||!e.every(a=>typeof a=="number"&&Number.isFinite(a)))return;const s=[];let t=0;return e.forEach((a,n)=>{const w=100-t-k*(i-1-n),x=Math.min(w,Math.max(k,Math.round(a)));s.push(x),t+=x}),s}function O(e,i,s){if(!Array.isArray(i))return;const t=G(i,s),a=t?[...t,100-t.reduce((w,x)=>w+x,0)]:[],n={};for(let w=0;w<S;w+=1)n[`--${e}-${w+1}`]=a[w]??1;return n}function _e(e,i,s){const t=O("sf-share",e,s),a=O("sf-share-tablet",i,s);return t||a?{...t,...a}:void 0}function q(e,i){const s=Array.from({length:i},()=>1),t=u.find(w=>w.value===e);if(!t?.weights||i<1)return s;const[a,n]=t.weights;return a>1&&(s[0]=a),n>1&&(s[i-1]=n),s}function be(e,i){if(typeof e!="string"||!(e in p)||e==="equal")return e;const s=q(e,i),t=s.reduce((a,n)=>a+n,0);return s.slice(0,-1).map(a=>Math.round(a/t*100))}const d="[&>*]:min-w-0 [&>[data-sf-box-items]>*]:min-w-0 [&>*]:flex-1 [&>[data-sf-box-items]>*]:flex-1 [&>*]:basis-0 [&>[data-sf-box-items]>*]:basis-0",p={equal:d,bigLeft:`${d} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2]`,bigRight:`${d} [&>*:last-child]:view-wide:grow-[2] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${d} [&>*:first-child]:view-wide:grow-[3] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[3]`,biggerRight:`${d} [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`,twoThree:`${d} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2] [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`},D=`${d} [&>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>[data-sf-box-items]>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>[data-sf-box-items]>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>[data-sf-box-items]>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)] [&>[data-sf-box-items]>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)]`;function V(e){return Array.isArray(e)?D:typeof e=="string"?p[e]??"":""}const ge={all:[{context:"parentType",is:"Flex"},{context:"parent.direction",is:"row"},{any:[{not:{context:"parent.align",set:!0}},{context:"parent.align",is:"stretch"}]},{not:{context:"parent.separator",set:!0}},{not:{context:"parent.loop",is:"scroll"}},{not:{context:"parent.line",is:!0}},R,{any:[{context:"parent.columns",in:[2,3,4,5,6]},{all:[{not:{context:"parent.columns",is:1}},{context:"parent.share",in:Object.keys(p)}]}]}]},A="view-wide:max-view-desktop:flex-row!",r=`${A} [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-0!`,C={content:`${A} [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[content]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[content]!`,equal:r,bigLeft:`${r} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]!`,bigRight:`${r} [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]!`,biggerLeft:`${r} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`,biggerRight:`${r} [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`,twoThree:`${r} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`},K=`${r} [&>*:nth-child(1):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>[data-sf-box-items]>*:nth-child(1):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>*:nth-child(2):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>[data-sf-box-items]>*:nth-child(2):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>*:nth-child(3):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>[data-sf-box-items]>*:nth-child(3):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>*:nth-child(4):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]! [&>[data-sf-box-items]>*:nth-child(4):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]!`;function J(e){return Array.isArray(e)||typeof e=="string"&&e in C?e:null}function ue(e){if(e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0||L(e.columns)!==""||N(e.columnsTablet)!=="")return"";const i=J(e.shareTablet);return i===null?"":typeof i=="string"?C[i]:K}const Y="[&>*]:view-wide:basis-[content] [&>[data-sf-box-items]>*]:view-wide:basis-[content]";function Se(e){return V(e)===""?Y:""}const ke="Columns",Oe=1,Ae=3,g={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},Ce=u.filter(e=>e.value==="content"||e.value==="equal"),Le="equal",Ne=1,Ee=6,l="view-wide:flex-wrap [&>*]:view-wide:min-w-0 [&>[data-sf-box-items]>*]:view-wide:min-w-0 [&>*]:view-wide:grow-0! [&>[data-sf-box-items]>*]:view-wide:grow-0!",Q={1:`${l} [&>*]:view-wide:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc(100%/1)]!`,2:`${l} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${l} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${l} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${l} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${l} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function L(e){return typeof e=="number"?Q[e]??"":""}const z={1:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc(100%/1)]!",2:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function N(e){return typeof e=="number"?z[e]??"":""}function Te(e){return e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":N(e.columnsTablet)}function Be(e){return e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":L(e.columns)}const E={2:"view-wide:grid view-wide:grid-cols-2",3:"view-wide:grid view-wide:grid-cols-3",4:"view-wide:grid view-wide:grid-cols-4",5:"view-wide:grid view-wide:grid-cols-5",6:"view-wide:grid view-wide:grid-cols-6"},T={2:"max-view-wide:grid max-view-wide:grid-cols-2",3:"max-view-wide:grid max-view-wide:grid-cols-3"},ye=Object.keys(E).map(Number),Re=Object.keys(T).map(Number);function Pe(e,i,s=!1){const t=typeof e=="number"?E[e]??"":"",a=T[Number(i)]??"";return!t&&!a?"":[t,a,s?"gap-y-0!":""].filter(Boolean).join(" ")}const Z="max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]",ee={2:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},ie="max-view-wide:flex-nowrap [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]";function te(e,i){return(b(e)??b(i)??"wrap")==="nowrap"}function Ie(e,i,s,t){const a=g[Number(e)];if(!a)return"max-view-wide:flex-col";const n=te(s,t);return B(e,i)?n?ie:Z:n?ee[Number(e)]:a}function He(e,i){return Number(e)in g&&!B(e,i)}function B(e,i){return Number(e)in g&&i==="content"}const Me="Block spacing",Xe=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],se="sf-box-gap-only";function $e(e){return e==="gap"?se:""}const y={each:"sf-box-each-tablet",gap:"sf-box-gap-only-tablet"},ae={each:"sf-box-each-phone",gap:"sf-box-gap-only-phone"};function Ue(e,i,s){const t=n=>o(y,n),a=h(e==="gap"?"gap":"each",t(i),t(s));return _(a,y,ae)}export{ye as ACCORDION_COLUMN_COUNTS,Re as ACCORDION_PHONE_COLUMN_COUNTS,v as BOX_ALIGN_CLASS,Me as BOX_BLOCK_SPACING_LABEL,Xe as BOX_BLOCK_SPACING_POINTS,Ee as BOX_COLUMNS_MAX,Ne as BOX_COLUMNS_MIN,se as BOX_GAP_ONLY_CLASS,ge as BOX_GIVES_PICTURES_A_HEIGHT,j as BOX_ITEMS_ATTR,ke as BOX_PHONE_ROW_LABEL,Ae as BOX_PHONE_ROW_MAX,Oe as BOX_PHONE_ROW_MIN,me as BOX_SHARE_CHOICES,pe as BOX_SHARE_LABEL,Le as BOX_SHARE_PHONE_DEFAULT,Ce as BOX_SHARE_PHONE_POINTS,u as BOX_SHARE_POINTS,re as NESTED_BOX_PADDING,Pe as boxAccordionColumnsClass,ve as boxAlignViewClasses,$e as boxBlockSpacingClass,Ue as boxBlockSpacingViewClasses,L as boxColumnsClass,Se as boxFitContentClass,W as boxJustifyViewAnswers,ce as boxJustifyViewClasses,le as boxLayoutClasses,He as boxPhoneCellsShareLine,Ie as boxPhoneRowClasses,B as boxPhoneRowFits,te as boxPhoneRowOneLine,Be as boxRowColumnsClass,Te as boxRowTabletColumnsClass,ue as boxRowTabletShareClass,he as boxShareChoiceOf,V as boxShareClasses,J as boxShareTabletOf,_e as boxShareVars,be as boxShareWidthsOf,N as boxTabletColumnsClass,I as boxWrapClass,xe as boxWrapTabletClass,b as boxWrapWordOf,fe as withoutBoxItemsHalf};
1
+ import{BLOCK_ALIGN_TEXT as R}from"./block-align.js";import{PARENT_BOX_IS_NOT_CARD_RULE as I}from"./box-card-rule.js";import{isStripBox as f}from"./box-separator.js";import{viewOverrides as P}from"./view-overrides.js";import{hasOwnEntry as m}from"../own-entry.js";const ce={sectionPaddingTop:0,sectionPaddingBottom:0},v={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},l={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},ve=[...new Set([...Object.keys(l),...Object.keys(R)])];function xe(e,i){const s=typeof e=="string"&&m(v,e)?v[e]:"",t=typeof i=="string"&&m(l,i)?l[i]:"";return[s,t].filter(Boolean).join(" ")}function H(e){return e===!0||e==="wrap"?"flex-wrap":""}const X={start:"view-wide:max-view-desktop:justify-start!",center:"view-wide:max-view-desktop:justify-center!",between:"view-wide:max-view-desktop:justify-between!",end:"view-wide:max-view-desktop:justify-end!"},M={start:"max-view-wide:justify-start",center:"max-view-wide:justify-center",between:"max-view-wide:justify-between",end:"max-view-wide:justify-end"},$={start:"view-wide:max-view-desktop:items-start!",center:"view-wide:max-view-desktop:items-center!",end:"view-wide:max-view-desktop:items-end!",stretch:"view-wide:max-view-desktop:items-stretch!"},U={start:"max-view-wide:items-start",center:"max-view-wide:items-center",end:"max-view-wide:items-end",stretch:"max-view-wide:items-stretch"},j={wrap:"view-wide:max-view-desktop:flex-wrap!",nowrap:"view-wide:max-view-desktop:flex-nowrap!"};function o(e,i){return typeof i=="string"&&m(e,i)?i:void 0}function h(e,i,s){const t=P("same",e,i,s),a={};return t.tablet!==void 0&&t.tablet!==e&&(a.tablet=t.tablet),t.phone!==void 0&&t.phone!==e&&(a.phone=t.phone),a}function _(e,i,s){return[e.tablet?i[e.tablet]:"",e.phone?s[e.phone]:""].filter(Boolean).join(" ")}function W(e,i,s){return h(o(v,e)??"start",o(v,i),o(v,s))}function pe(e,i,s){return _(W(e,i,s),X,M)}function fe(e,i,s){const t=o(l,e)??"stretch";if(t==="stretch")return"";const a=h(t,o(l,i),o(l,s));return _(a,$,U)}function b(e){if(e===!0||e==="wrap")return"wrap";if(e===!1||e==="nowrap")return"nowrap"}function me(e,i){const s=H(e)===""?"nowrap":"wrap",t=b(i);return t&&t!==s?j[t]:""}const he="Block widths",u=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{value:"bigLeft",weights:[2,1]},{value:"bigRight",weights:[1,2]},{value:"biggerLeft",weights:[3,1]},{value:"biggerRight",weights:[1,3]},{value:"twoThree",weights:[2,3]}],G="data-sf-box-items",F=new RegExp(`[ \\t]+[^\\s"'\`]*\\[${G}\\][^\\s"'\`]*`,"g");function _e(e){return e.replace(F,"")}const be=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Custom",value:"custom",weights:[2,1]}];function ge(e){return Array.isArray(e)?"custom":e==="equal"?"equal":typeof e=="string"&&e in p?"custom":"content"}const S=4,k=10;function q(e,i){if(!Number.isInteger(i)||i<2||i>S||e.length!==i-1||!e.every(a=>typeof a=="number"&&Number.isFinite(a)))return;const s=[];let t=0;return e.forEach((a,n)=>{const w=100-t-k*(i-1-n),x=Math.min(w,Math.max(k,Math.round(a)));s.push(x),t+=x}),s}function O(e,i,s){if(!Array.isArray(i))return;const t=q(i,s),a=t?[...t,100-t.reduce((w,x)=>w+x,0)]:[],n={};for(let w=0;w<S;w+=1)n[`--${e}-${w+1}`]=a[w]??1;return n}function ue(e,i,s){const t=O("sf-share",e,s),a=O("sf-share-tablet",i,s);return t||a?{...t,...a}:void 0}function D(e,i){const s=Array.from({length:i},()=>1),t=u.find(w=>w.value===e);if(!t?.weights||i<1)return s;const[a,n]=t.weights;return a>1&&(s[0]=a),n>1&&(s[i-1]=n),s}function Se(e,i){if(typeof e!="string"||!(e in p)||e==="equal")return e;const s=D(e,i),t=s.reduce((a,n)=>a+n,0);return s.slice(0,-1).map(a=>Math.round(a/t*100))}const d="[&>*]:min-w-0 [&>[data-sf-box-items]>*]:min-w-0 [&>*]:flex-1 [&>[data-sf-box-items]>*]:flex-1 [&>*]:basis-0 [&>[data-sf-box-items]>*]:basis-0",p={equal:d,bigLeft:`${d} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2]`,bigRight:`${d} [&>*:last-child]:view-wide:grow-[2] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${d} [&>*:first-child]:view-wide:grow-[3] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[3]`,biggerRight:`${d} [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`,twoThree:`${d} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2] [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`},V=`${d} [&>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>[data-sf-box-items]>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>[data-sf-box-items]>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>[data-sf-box-items]>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)] [&>[data-sf-box-items]>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)]`;function K(e){return Array.isArray(e)?V:typeof e=="string"?p[e]??"":""}const ke={all:[{context:"parentType",is:"Flex"},{context:"parent.direction",is:"row"},{any:[{not:{context:"parent.align",set:!0}},{context:"parent.align",is:"stretch"}]},{not:{context:"parent.separator",set:!0}},{not:{context:"parent.loop",is:"scroll"}},{not:{context:"parent.line",is:!0}},I,{any:[{context:"parent.columns",in:[2,3,4,5,6]},{all:[{not:{context:"parent.columns",is:1}},{context:"parent.share",in:Object.keys(p)}]}]}]},A="view-wide:max-view-desktop:flex-row!",r=`${A} [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-0!`,C={content:`${A} [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[content]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[content]!`,equal:r,bigLeft:`${r} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]!`,bigRight:`${r} [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]!`,biggerLeft:`${r} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`,biggerRight:`${r} [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`,twoThree:`${r} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`},J=`${r} [&>*:nth-child(1):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>[data-sf-box-items]>*:nth-child(1):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>*:nth-child(2):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>[data-sf-box-items]>*:nth-child(2):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>*:nth-child(3):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>[data-sf-box-items]>*:nth-child(3):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>*:nth-child(4):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]! [&>[data-sf-box-items]>*:nth-child(4):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]!`;function Y(e){return Array.isArray(e)||typeof e=="string"&&e in C?e:null}function Oe(e){if(e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0||L(e.columns)!==""||N(e.columnsTablet)!=="")return"";const i=Y(e.shareTablet);return i===null?"":typeof i=="string"?C[i]:J}const Q="[&>*]:view-wide:basis-[content] [&>[data-sf-box-items]>*]:view-wide:basis-[content]";function Ae(e){return K(e)===""?Q:""}const Ce="Columns",Le=1,Ne=3,g={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},Ee=u.filter(e=>e.value==="content"||e.value==="equal"),Te="equal",Be=1,ye=6,c="view-wide:flex-wrap [&>*]:view-wide:min-w-0 [&>[data-sf-box-items]>*]:view-wide:min-w-0 [&>*]:view-wide:grow-0! [&>[data-sf-box-items]>*]:view-wide:grow-0!",z={1:`${c} [&>*]:view-wide:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc(100%/1)]!`,2:`${c} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${c} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${c} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${c} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${c} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function L(e){return typeof e=="number"?z[e]??"":""}const Z={1:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc(100%/1)]!",2:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function N(e){return typeof e=="number"?Z[e]??"":""}function Re(e){return e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":N(e.columnsTablet)}function Ie(e){return e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":L(e.columns)}const E={2:"view-wide:grid view-wide:grid-cols-2",3:"view-wide:grid view-wide:grid-cols-3",4:"view-wide:grid view-wide:grid-cols-4",5:"view-wide:grid view-wide:grid-cols-5",6:"view-wide:grid view-wide:grid-cols-6"},T={2:"max-view-wide:grid max-view-wide:grid-cols-2",3:"max-view-wide:grid max-view-wide:grid-cols-3"},Pe=Object.keys(E).map(Number),He=Object.keys(T).map(Number);function Xe(e,i,s=!1){const t=typeof e=="number"?E[e]??"":"",a=T[Number(i)]??"";return!t&&!a?"":[t,a,s?"gap-y-0!":""].filter(Boolean).join(" ")}const ee="max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]",ie={2:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},te="max-view-wide:flex-nowrap [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]";function se(e,i){return(b(e)??b(i)??"wrap")==="nowrap"}function Me(e,i,s,t){const a=g[Number(e)];if(!a)return"max-view-wide:flex-col";const n=se(s,t);return B(e,i)?n?te:ee:n?ie[Number(e)]:a}function $e(e,i){return Number(e)in g&&!B(e,i)}function B(e,i){return Number(e)in g&&i==="content"}const Ue="Block spacing",je=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],ae="sf-box-gap-only";function We(e){return e==="gap"?ae:""}const y={each:"sf-box-each-tablet",gap:"sf-box-gap-only-tablet"},ne={each:"sf-box-each-phone",gap:"sf-box-gap-only-phone"};function Ge(e,i,s){const t=n=>o(y,n),a=h(e==="gap"?"gap":"each",t(i),t(s));return _(a,y,ne)}export{Pe as ACCORDION_COLUMN_COUNTS,He as ACCORDION_PHONE_COLUMN_COUNTS,ve as ALIGN_TABLE_WORDS,l as BOX_ALIGN_CLASS,Ue as BOX_BLOCK_SPACING_LABEL,je as BOX_BLOCK_SPACING_POINTS,ye as BOX_COLUMNS_MAX,Be as BOX_COLUMNS_MIN,ae as BOX_GAP_ONLY_CLASS,ke as BOX_GIVES_PICTURES_A_HEIGHT,G as BOX_ITEMS_ATTR,Ce as BOX_PHONE_ROW_LABEL,Ne as BOX_PHONE_ROW_MAX,Le as BOX_PHONE_ROW_MIN,be as BOX_SHARE_CHOICES,he as BOX_SHARE_LABEL,Te as BOX_SHARE_PHONE_DEFAULT,Ee as BOX_SHARE_PHONE_POINTS,u as BOX_SHARE_POINTS,ce as NESTED_BOX_PADDING,Xe as boxAccordionColumnsClass,fe as boxAlignViewClasses,We as boxBlockSpacingClass,Ge as boxBlockSpacingViewClasses,L as boxColumnsClass,Ae as boxFitContentClass,W as boxJustifyViewAnswers,pe as boxJustifyViewClasses,xe as boxLayoutClasses,$e as boxPhoneCellsShareLine,Me as boxPhoneRowClasses,B as boxPhoneRowFits,se as boxPhoneRowOneLine,Ie as boxRowColumnsClass,Re as boxRowTabletColumnsClass,Oe as boxRowTabletShareClass,ge as boxShareChoiceOf,K as boxShareClasses,Y as boxShareTabletOf,ue as boxShareVars,Se as boxShareWidthsOf,N as boxTabletColumnsClass,H as boxWrapClass,me as boxWrapTabletClass,b as boxWrapWordOf,_e as withoutBoxItemsHalf};
@@ -1 +1,2 @@
1
+ export declare function postDay(iso: string | null | undefined): string;
1
2
  export declare function postDateLabel(iso: string | null | undefined): string;
@@ -1 +1 @@
1
- import{formatDate as t}from"efficient-shell/format";const r={locale:"en-US",style:{year:"numeric",month:"short",day:"2-digit"},timeZone:"UTC"};function a(e){return!e||Number.isNaN(new Date(e).getTime())?"":t(e,r)}export{a as postDateLabel};
1
+ import{formatDate as t}from"efficient-shell/format";const r={year:"numeric",month:"short",day:"2-digit"},n="en-US";function o(e){return!!e&&!Number.isNaN(new Date(e).getTime())}function u(e){return o(e)?t(e,{locale:n,style:r}):""}function i(e){return o(e)?t(e,{locale:n,style:r,timeZone:"UTC"}):""}export{i as postDateLabel,u as postDay};
@@ -0,0 +1,11 @@
1
+ import type { BlogPostRow } from "../web-backend.js";
2
+ export interface BlogPostSnapshot {
3
+ slug: string;
4
+ image: string;
5
+ title: string;
6
+ dek: string;
7
+ publishedAt?: string;
8
+ date: string;
9
+ href: string;
10
+ }
11
+ export declare function postSnapshotOf(p: Pick<BlogPostRow, "slug" | "title" | "excerpt" | "coverImage" | "publishedAt" | "href">): BlogPostSnapshot;
@@ -0,0 +1 @@
1
+ function t(e){return{slug:e.slug,image:e.coverImage,title:e.title,dek:e.excerpt,publishedAt:e.publishedAt??"",date:"",href:e.href}}export{t as postSnapshotOf};
@@ -1,4 +1,4 @@
1
- import{ruleChecks as $}from"./rule.js";import{stripComments as u}from"./support/ts-source.js";import{SOURCE_FILE as v}from"./support/source-file.js";const t=["-","-","motion","-"].join(""),g=new RegExp(`${t}[\\w-]*`,"g");function s(l){return[...u(l).matchAll(g)].map(n=>n[0])}function O(l,n){const{check:o,report:p}=$("motion variables come from efficient-shell"),h=n.allowed??{};{const e=[["a double-quoted name",`const ZOOM = "${t}zoom";`],["a single-quoted name",`style['${t}pin-top'] = "0px";`],["a template name","const v = `"+t+"pin-${view}`;"],["a name in a CSS string",`const css = "a { top: var(${t}pin-top, 0px) }";`]];for(const[m,a]of e)o(`the reader finds ${m}`,s(a).length===1,s(a).join(", ")||"none");const r=[["a line note that names one",`// writes ${t}zoom`],["a block note that names one",`/** the shell's \`${t}pin-stick\` */`],["the shell's name, imported",'import { SCROLL_ZOOM_VAR } from "efficient-shell/format";'],["a host variable",'const v = "--sf-pin-stick";']];for(const[m,a]of r)o(`…and leaves ${m} alone`,s(a).length===0,s(a).join(", "))}const i=l.filter(e=>v.test(e.path));o(`read the source (${i.length} JS/TS files, at least ${n.minFiles})`,i.length>=n.minFiles,"fewer means the walk broke, and every check below is vacuous");const c=i.filter(e=>!(e.path in h)).flatMap(e=>s(e.text).map(r=>`${e.path}: ${r}`));o("no file spells a motion variable by hand",c.length===0,`
2
- ${c.join(`
1
+ import{ruleChecks as p}from"./rule.js";import{stripComments as d}from"./support/ts-source.js";import{SOURCE_FILE as $}from"./support/source-file.js";import{checkExemptionsStillHere as u}from"./support/exemptions.js";const t=["-","-","motion","-"].join(""),v=new RegExp(`${t}[\\w-]*`,"g");function a(l){return[...d(l).matchAll(v)].map(n=>n[0])}function O(l,n){const{check:o,report:f}=p("motion variables come from efficient-shell"),c=n.allowed??{};{const e=[["a double-quoted name",`const ZOOM = "${t}zoom";`],["a single-quoted name",`style['${t}pin-top'] = "0px";`],["a template name","const v = `"+t+"pin-${view}`;"],["a name in a CSS string",`const css = "a { top: var(${t}pin-top, 0px) }";`]];for(const[m,s]of e)o(`the reader finds ${m}`,a(s).length===1,a(s).join(", ")||"none");const r=[["a line note that names one",`// writes ${t}zoom`],["a block note that names one",`/** the shell's \`${t}pin-stick\` */`],["the shell's name, imported",'import { SCROLL_ZOOM_VAR } from "efficient-shell/format";'],["a host variable",'const v = "--sf-pin-stick";']];for(const[m,s]of r)o(`…and leaves ${m} alone`,a(s).length===0,a(s).join(", "))}const i=l.filter(e=>$.test(e.path));o(`read the source (${i.length} JS/TS files, at least ${n.minFiles})`,i.length>=n.minFiles,"fewer means the walk broke, and every check below is vacuous");const h=i.filter(e=>!(e.path in c)).flatMap(e=>a(e.text).map(r=>`${e.path}: ${r}`));return o("no file spells a motion variable by hand",h.length===0,`
2
+ ${h.join(`
3
3
  `)}
4
- Import the variable's name from efficient-shell/format (SCROLL_ZOOM_VAR, PIN_STICK_VAR, …).`);const d=new Set(i.map(e=>e.path)),f=Object.keys(h).filter(e=>!d.has(e));return o("every exemption names a file that is still here",f.length===0,`drop these from \`allowed\`: ${f.join(", ")}`),p()}export{O as motionVarsFromTheShell};
4
+ Import the variable's name from efficient-shell/format (SCROLL_ZOOM_VAR, PIN_STICK_VAR, …).`),u(o,i,Object.keys(c)),f()}export{O as motionVarsFromTheShell};
@@ -1,7 +1,7 @@
1
- import{ruleChecks as x}from"./rule.js";import{stripComments as a}from"./support/ts-source.js";import{SOURCE_FILE as F}from"./support/source-file.js";const $=/\bsegmented\(\s*["']Alignment["']/g,O=/\blabel:\s*["'](?:Left|Right)["']/g,y=/\balignFields?\b/g,d=/\balignmentFields?\s*\(/g,k=/\b(?:blockAlignmentFields?|buttonFieldSet)\s*\(/g;function h(m){const t=a(m),n=[];for(const o of t.matchAll($))n.push(`a hand-built Alignment strip (${o[0]})`);for(const o of t.matchAll(O))n.push(`a table of alignment words (${o[0]})`);for(const o of t.matchAll(y))n.push(`the old builder (${o[0]})`);return n}function S(m,t){const{check:n,report:o}=x("one alignment row"),g=t.allowed??{};{const e=[["a hand-built strip",'align: segmented("Alignment", <AlignLeftIcon />, POINTS, "left"),'],["a table of words",'{ label: "Left", value: "left" },'],["a table of words, single quotes","{ label: 'Right', value: 'right' }"],["the old builder, called",'...alignFields("textAlign"),'],["the old builder, defined","export const alignField = () => 1;"]],s=i=>[...a(i).matchAll(d)].length;n("the text row is found in a spread",s('...alignmentFields("textAlign"),')===1),n("…and the block row is not taken for it",s('...blockAlignmentFields("align"),')===0);for(const[i,r]of e)n(`the reader finds ${i}`,h(r).length>=1,h(r).join(", ")||"none");const c=[["a note that names it",'// segmented("Alignment") was the old strip; label: "Left"'],["the one row, spread",'...alignmentFields("textAlign"),'],["the one row, bound",'export const alignmentField: Rows["alignmentField"] = rows.alignmentField;'],["another strip",'segmented("Justify", <JustifyIcon />, POINTS, "start")']];for(const[i,r]of c)n(`…and leaves ${i} alone`,h(r).length===0,h(r).join(", "))}const l=m.filter(e=>F.test(e.path));n(`read the source (${l.length} JS/TS files, at least ${t.minFiles})`,l.length>=t.minFiles,"fewer means the walk broke, and every check below is vacuous"),n(`the one row is bound (${t.home})`,l.some(e=>e.path===t.home&&/\balignmentFields\b/.test(a(e.text))),"the binding is where a block takes the row from; none found means the file moved");const f=l.filter(e=>e.path!==t.home&&!(e.path in g)).flatMap(e=>h(e.text).map(s=>`${e.path}: ${s}`));n("no file builds an Alignment row of its own",f.length===0,`
1
+ import{ruleChecks as p}from"./rule.js";import{stripComments as i}from"./support/ts-source.js";import{SOURCE_FILE as A}from"./support/source-file.js";import{checkExemptionsStillHere as x}from"./support/exemptions.js";const F=/\bsegmented\(\s*["']Alignment["']/g,O=/\blabel:\s*["'](?:Left|Right)["']/g,$=/\balignFields?\b/g,d=/\balignmentFields?\s*\(/g,k=/\b(?:blockAlignmentFields?|buttonFieldSet)\s*\(/g;function h(m){const t=i(m),n=[];for(const o of t.matchAll(F))n.push(`a hand-built Alignment strip (${o[0]})`);for(const o of t.matchAll(O))n.push(`a table of alignment words (${o[0]})`);for(const o of t.matchAll($))n.push(`the old builder (${o[0]})`);return n}function j(m,t){const{check:n,report:o}=p("one alignment row"),g=t.allowed??{};{const e=[["a hand-built strip",'align: segmented("Alignment", <AlignLeftIcon />, POINTS, "left"),'],["a table of words",'{ label: "Left", value: "left" },'],["a table of words, single quotes","{ label: 'Right', value: 'right' }"],["the old builder, called",'...alignFields("textAlign"),'],["the old builder, defined","export const alignField = () => 1;"]],s=a=>[...i(a).matchAll(d)].length;n("the text row is found in a spread",s('...alignmentFields("textAlign"),')===1),n("…and the block row is not taken for it",s('...blockAlignmentFields("align"),')===0);for(const[a,r]of e)n(`the reader finds ${a}`,h(r).length>=1,h(r).join(", ")||"none");const c=[["a note that names it",'// segmented("Alignment") was the old strip; label: "Left"'],["the one row, spread",'...alignmentFields("textAlign"),'],["the one row, bound",'export const alignmentField: Rows["alignmentField"] = rows.alignmentField;'],["another strip",'segmented("Justify", <JustifyIcon />, POINTS, "start")']];for(const[a,r]of c)n(`…and leaves ${a} alone`,h(r).length===0,h(r).join(", "))}const l=m.filter(e=>A.test(e.path));n(`read the source (${l.length} JS/TS files, at least ${t.minFiles})`,l.length>=t.minFiles,"fewer means the walk broke, and every check below is vacuous"),n(`the one row is bound (${t.home})`,l.some(e=>e.path===t.home&&/\balignmentFields\b/.test(i(e.text))),"the binding is where a block takes the row from; none found means the file moved");const f=l.filter(e=>e.path!==t.home&&!(e.path in g)).flatMap(e=>h(e.text).map(s=>`${e.path}: ${s}`));n("no file builds an Alignment row of its own",f.length===0,`
2
2
  ${f.join(`
3
3
  `)}
4
- An Alignment row is easel's: spread alignmentFields(key) from ${t.home}.`);const b=l.filter(e=>(t.blockOnly??[]).includes(e.path)&&[...a(e.text).matchAll(d)].length>0).map(e=>e.path);n("a block that stands somewhere uses the Block alignment row, not the text row",b.length===0,`
4
+ An Alignment row is easel's: spread alignmentFields(key) from ${t.home}.`);const b=l.filter(e=>(t.blockOnly??[]).includes(e.path)&&[...i(e.text).matchAll(d)].length>0).map(e=>e.path);n("a block that stands somewhere uses the Block alignment row, not the text row",b.length===0,`
5
5
  ${b.join(`
6
6
  `)}
7
- Where a block stands is blockAlignmentFields(key); how words lie is the text part's own.`);const w=(t.blockOnly??[]).filter(e=>{const s=l.find(c=>c.path===e);return!s||[...a(s.text).matchAll(k)].length===0});n("every block that stands somewhere declares its Block alignment row",w.length===0,w.join(", "));const u=l.filter(e=>e.path in(t.noRow??{})&&([...a(e.text).matchAll(d)].length>0||[...a(e.text).matchAll(k)].length>0)).map(e=>e.path);n("a block whose text part owns its alignment declares no alignment row",u.length===0,u.join(", "));const A=new Set(l.map(e=>e.path)),p=[...Object.keys(g),...Object.keys(t.noRow??{}),...t.blockOnly??[]].filter(e=>!A.has(e));return n("every exemption names a file that is still here",p.length===0,`drop these from \`allowed\`: ${p.join(", ")}`),o()}export{S as oneAlignmentRow};
7
+ Where a block stands is blockAlignmentFields(key); how words lie is the text part's own.`);const w=(t.blockOnly??[]).filter(e=>{const s=l.find(c=>c.path===e);return!s||[...i(s.text).matchAll(k)].length===0});n("every block that stands somewhere declares its Block alignment row",w.length===0,w.join(", "));const u=l.filter(e=>e.path in(t.noRow??{})&&([...i(e.text).matchAll(d)].length>0||[...i(e.text).matchAll(k)].length>0)).map(e=>e.path);return n("a block whose text part owns its alignment declares no alignment row",u.length===0,u.join(", ")),x(n,l,[...Object.keys(g),...Object.keys(t.noRow??{}),...t.blockOnly??[]]),o()}export{j as oneAlignmentRow};
@@ -0,0 +1,9 @@
1
+ import { type RuleReport, type SourceFile } from "./rule.js";
2
+ export type OneBlockBoxWordMapOptions = {
3
+ readonly home?: string;
4
+ readonly allowed?: Readonly<Record<string, string>>;
5
+ readonly allowedMatches?: Readonly<Record<string, number>>;
6
+ readonly minFiles: number;
7
+ readonly blockBoxWords: Readonly<Record<string, string>>;
8
+ };
9
+ export declare function oneBlockBoxWordMap(files: readonly SourceFile[], options: OneBlockBoxWordMapOptions): RuleReport;
@@ -0,0 +1,13 @@
1
+ import{ruleChecks as p}from"./rule.js";import{assertPlainWords as S,exemptionChecks as u,findingsWith as f,LEADS as $}from"./support/align-word-rule.js";import{SOURCE_FILE as B}from"./support/source-file.js";const _=String.raw`${$}\(?\s*`,i=o=>String.raw`["'\`]${o}["'\`]`;function m(o){S("one-block-box-word-map",Object.entries(o).flat());const e=Object.entries(o).filter(([s,a])=>s!==a),n=[...new Set(Object.values(o))].join("|");return[...e.flatMap(([s,a])=>[new RegExp(String.raw`(?:^|[\s{,(])(["'\`]?)${s}\1\s*:\s*${i(a)}`,"gm"),new RegExp(String.raw`={2,3}\s*${i(s)}${_}${i(a)}`,"g"),new RegExp(String.raw`${i(s)}\s*={2,3}\s*[\w.$]+${_}${i(a)}`,"g"),new RegExp(String.raw`\bcase\s*${i(s)}\s*:\s*\{?\s*(?:return\b|[\w.$]+\s*\+?=(?!=))\s*\(?\s*${i(a)}`,"g")]),new RegExp(String.raw`\bBOX_ALIGN_CLASS\s*(?:\.\s*(?:${n})\b|\[\s*["'\`](?:${n})["'\`]\s*\])`,"g")]}function C(o,e){const{check:n,report:s}=p("one block-box word map"),a=e.allowed??{},O=e.allowedMatches??{},L=m(e.blockBoxWords),r=t=>f(L,t);{const t=[["a table entry",`const W = {
2
+ right: "end",
3
+ };`],["a quoted key",`const W = { "left": 'start' };`],["a ternary on the block word",'const w = align === "right" ? "end" : "stretch";'],["a chained ternary",'const w = a === "center" ? "center" : a === "right" ? "end" : "stretch";'],["a word-first comparison",'const w = "left" === align && "start";'],["a loose equals",'const w = align == "right" ? "end" : "";'],["an if that returns it",'if (align === "right") return "end";'],["an if with a block",`if (align === "left") {
4
+ return "start";
5
+ }`],["an if that sets it",'if (align === "right") w = "end";'],["a case that returns it",`switch (align) {
6
+ case "right":
7
+ return "end";
8
+ }`],["a case that sets it",`switch (align) {
9
+ case "left": w = "start"; break;
10
+ }`],["a word in backticks",'const w = align === `right` ? `end` : "";'],["a dotted box word on the class table","const c = BOX_ALIGN_CLASS.end;"],["a bracketed box word on the class table",'const c = BOX_ALIGN_CLASS["start"];'],["center on the class table","const c = BOX_ALIGN_CLASS.center;"]];for(const[w,g]of t)n(`the reader finds ${w}`,r(g).length===1,r(g).join(", ")||"none");const d=[["the map read","const w = BLOCK_ALIGN_BOX_WORD[align];"],["the class table keyed by the map","const c = BOX_ALIGN_CLASS[BLOCK_ALIGN_BOX_WORD.right];"],["a box word no block word answers","const c = BOX_ALIGN_CLASS.stretch;"],["a pair with the same word",'const w = align === "center" ? "center" : "";'],["a note that names it",'// right: "end" was the old map'],["a block note that names it",'/** align === "right" ? "end" */'],["a ternary on another word",'const w = side === "top" ? "end" : "";'],["a key that only ends in the word",'const W = { textright: "end" };'],["the class table keyed by a stored box word","const c = BOX_ALIGN_CLASS[cell.align];"]];for(const[w,g]of d)n(`…and leaves ${w} alone`,r(g).length===0,r(g).join(", "));const c=m({...e.blockBoxWords,top:"before"}),l='const w = align === "top" ? "before" : "";';n("a pair the caller's map gains is read with no edit to the rule",f(c,l).length===1&&r(l).length===0,`with it: ${f(c,l).length}, without it: ${r(l).length}`)}const h=o.filter(t=>B.test(t.path));if(n(`read the source (${h.length} JS/TS files, at least ${e.minFiles})`,h.length>=e.minFiles,"fewer means the walk broke, and every check below is vacuous"),e.home){const t=h.find(c=>c.path===e.home),d=Object.entries(e.blockBoxWords).filter(([c,l])=>c!==l).length;n(`the one map is here (${e.home})`,!!t&&/\bBLOCK_ALIGN_BOX_WORD\b/.test(t.text)&&r(t.text).length===d,"the map is what every other file reads; none found means the file moved")}const b=h.filter(t=>t.path!==e.home&&!(t.path in a)).flatMap(t=>r(t.text).map(d=>`${t.path}: ${d}`));return n("no file types a block word's box word of its own",b.length===0,`
11
+ ${b.join(`
12
+ `)}
13
+ Read block-align BLOCK_ALIGN_BOX_WORD (efficient-web-builder/format/lib/content/block-align): BLOCK_ALIGN_BOX_WORD[align], BOX_ALIGN_CLASS[BLOCK_ALIGN_BOX_WORD.right].`),u(n,h,r,a,O,"read BLOCK_ALIGN_BOX_WORD"),s()}export{C as oneBlockBoxWordMap};
@@ -1,4 +1,4 @@
1
- import{ruleChecks as S}from"./rule.js";import{TAILWIND_VARIANT_CHAIN as A}from"./support/tailwind-variant.js";import{stripComments as k}from"./support/ts-source.js";import{SOURCE_FILE as v}from"./support/source-file.js";const h=String.raw`${A}items-[a-z]+\b`,$=String.raw`(?:[\w.$]*\(\s*(?:["'\`][^"'\`\n]*["'\`]\s*,\s*)*)?`,p=String.raw`${$}["'\`](?:[^"'\`\n]*\s)?${h}`,g=String.raw`${$}["'\`]${h}`,x=String.raw`\)?\s*(?:\?|&&|\{?\s*return\b|\{?\s*[\w.$]+\s*\+?=(?!=))\s*`,T=/^[a-z][a-z-]*$/;function L(o){const t=o.filter(i=>!T.test(i));if(t.length)throw new Error(`one-items-align-map: an align word must be a plain word: ${t.join(", ")}`);const n=o.join("|"),s=String.raw`["'\`](?:${n})["'\`]`;return[new RegExp(String.raw`(?:^|[\s{,(])(["'\`]?)(?:${n}|top|bottom|items)\1\s*:\s*${p}`,"gm"),new RegExp(String.raw`(?:^|[\s{,(])(["'\`]?)(?:${n}|top|bottom)\1\s*:\s*\{(?:[^{}]*?[\s,])?\s*(["'\`]?)(?!items\b)[\w$-]+\2\s*:\s*${p}`,"gm"),new RegExp(String.raw`={2,3}\s*${s}${x}${g}`,"g"),new RegExp(String.raw`${s}\s*={2,3}\s*[\w.$]+${x}${g}`,"g"),new RegExp(String.raw`["'\`]${h}["'\`]\s*:\s*(?:[\w.$]+\s*={2,3}\s*${s}|${s}\s*={2,3}\s*[\w.$]+)`,"g"),new RegExp(String.raw`\bcase\s*${s}\s*:\s*\{?\s*(?:return\b|[\w.$]+\s*\+?=(?!=))\s*${g}`,"g"),/(?<![.\w-])items-\$\{/g,/["'`]items-["'`]\s*\+/g]}function I(o,t){const n=k(t);return o.flatMap(s=>[...n.matchAll(s)].map(i=>i[0].trim()))}function N(o,t){const{check:n,report:s}=S("one items-align map"),i=t.allowed??{},d=t.allowedMatches??{},u=L(t.alignWords),r=e=>I(u,e);{const e=[["a plain table",`const A = {
1
+ import{ruleChecks as u}from"./rule.js";import{TAILWIND_VARIANT_CHAIN as p}from"./support/tailwind-variant.js";import{assertPlainWords as A,exemptionChecks as S,findingsWith as y,LEADS as g}from"./support/align-word-rule.js";import{SOURCE_FILE as k}from"./support/source-file.js";const l=String.raw`${p}items-[a-z]+\b`,f=String.raw`(?:[\w.$]*\(\s*(?:["'\`][^"'\`\n]*["'\`]\s*,\s*)*)?`,w=String.raw`${f}["'\`](?:[^"'\`\n]*\s)?${l}`,m=String.raw`${f}["'\`]${l}`;function v(c){A("one-items-align-map",c);const t=c.join("|"),n=String.raw`["'\`](?:${t})["'\`]`;return[new RegExp(String.raw`(?:^|[\s{,(])(["'\`]?)(?:${t}|top|bottom|items)\1\s*:\s*${w}`,"gm"),new RegExp(String.raw`(?:^|[\s{,(])(["'\`]?)(?:${t}|top|bottom)\1\s*:\s*\{(?:[^{}]*?[\s,])?\s*(["'\`]?)(?!items\b)[\w$-]+\2\s*:\s*${w}`,"gm"),new RegExp(String.raw`={2,3}\s*${n}${g}${m}`,"g"),new RegExp(String.raw`${n}\s*={2,3}\s*[\w.$]+${g}${m}`,"g"),new RegExp(String.raw`["'\`]${l}["'\`]\s*:\s*(?:[\w.$]+\s*={2,3}\s*${n}|${n}\s*={2,3}\s*[\w.$]+)`,"g"),new RegExp(String.raw`\bcase\s*${n}\s*:\s*\{?\s*(?:return\b|[\w.$]+\s*\+?=(?!=))\s*${m}`,"g"),/(?<![.\w-])items-\$\{/g,/["'`]items-["'`]\s*\+/g]}function C(c,t){const{check:n,report:b}=u("one items-align map"),d=t.allowed??{},$=t.allowedMatches??{},x=v(t.alignWords),s=e=>y(x,e);{const e=[["a plain table",`const A = {
2
2
  start: "items-start",
3
3
  };`],["a nested table",`const A = {
4
4
  right: { items: "items-end", cta: "self-end" },
@@ -25,10 +25,7 @@ import{ruleChecks as S}from"./rule.js";import{TAILWIND_VARIANT_CHAIN as A}from".
25
25
  case "end": cls = "items-end"; break;
26
26
  }`],["the class in a later argument of a call",'const T = { center: cn("flex", "items-center") };'],["a word in backticks",'const c = align === `end` ? "items-end" : "";'],["a child variant",'const T = { center: "*:items-center" };'],["a descendant variant in a ternary",'const c = align === "end" ? "**:items-end" : "";'],["a nested table under another key",`const A = {
27
27
  right: { flex: "items-end", cta: "self-end" },
28
- };`],["a nested table, class first of two",'const A = { center: { cls: "items-center text-center" } };']];for(const[m,c]of e)n(`the reader finds ${m}`,r(c).length===1,r(c).join(", ")||"none");const a=[["a ternary on a layout flag",'narrow ? (imageLeft ? "items-end" : "items-start") : "",'],["a ternary on another word",'const c = look === "card" ? "items-center" : "";'],["a note that names it",'// center: "items-center" was the old table'],["a block note that names it",'/** right: { items: "items-end" } */'],["a class list",'<div className="flex items-center gap-2">'],["a fixed style under another key",' largeTabs: "items-stretch border-y border-line",'],["the table indexed",' center: { items: BOX_ALIGN_CLASS.center, cta: "self-center" },'],["an inline style",' center: { alignItems: "center" },'],["a CSS selector for the class","const css = `${row}.items-${at}{justify-items:${at}}`;"],["a fixed items-* in every branch of a long class list",'const c = a === "left" ? "grid items-center justify-items-start" : "grid items-center";'],["a prefixed class in a list",'<div className="flex max-view-wide:items-stretch gap-3">']];for(const[m,c]of a)n(`…and leaves ${m} alone`,r(c).length===0,r(c).join(", "))}const l=o.filter(e=>v.test(e.path));if(n(`read the source (${l.length} JS/TS files, at least ${t.minFiles})`,l.length>=t.minFiles,"fewer means the walk broke, and every check below is vacuous"),t.home){const e=l.find(a=>a.path===t.home);n(`the one table is here (${t.home})`,!!e&&/\bBOX_ALIGN_CLASS\b/.test(e.text)&&r(e.text).length>=4,"the table is what every other file indexes; none found means the file moved")}const f=l.filter(e=>e.path!==t.home&&!(e.path in i)).flatMap(e=>r(e.text).map(a=>`${e.path}: ${a}`));n("no file types an items-* table of its own",f.length===0,`
29
- ${f.join(`
28
+ };`],["a nested table, class first of two",'const A = { center: { cls: "items-center text-center" } };']];for(const[o,r]of e)n(`the reader finds ${o}`,s(r).length===1,s(r).join(", ")||"none");const i=[["a ternary on a layout flag",'narrow ? (imageLeft ? "items-end" : "items-start") : "",'],["a ternary on another word",'const c = look === "card" ? "items-center" : "";'],["a note that names it",'// center: "items-center" was the old table'],["a block note that names it",'/** right: { items: "items-end" } */'],["a class list",'<div className="flex items-center gap-2">'],["a fixed style under another key",' largeTabs: "items-stretch border-y border-line",'],["the table indexed",' center: { items: BOX_ALIGN_CLASS.center, cta: "self-center" },'],["an inline style",' center: { alignItems: "center" },'],["a CSS selector for the class","const css = `${row}.items-${at}{justify-items:${at}}`;"],["a fixed items-* in every branch of a long class list",'const c = a === "left" ? "grid items-center justify-items-start" : "grid items-center";'],["a prefixed class in a list",'<div className="flex max-view-wide:items-stretch gap-3">']];for(const[o,r]of i)n(`…and leaves ${o} alone`,s(r).length===0,s(r).join(", "))}const a=c.filter(e=>k.test(e.path));if(n(`read the source (${a.length} JS/TS files, at least ${t.minFiles})`,a.length>=t.minFiles,"fewer means the walk broke, and every check below is vacuous"),t.home){const e=a.find(i=>i.path===t.home);n(`the one table is here (${t.home})`,!!e&&/\bBOX_ALIGN_CLASS\b/.test(e.text)&&s(e.text).length>=4,"the table is what every other file indexes; none found means the file moved")}const h=a.filter(e=>e.path!==t.home&&!(e.path in d)).flatMap(e=>s(e.text).map(i=>`${e.path}: ${i}`));return n("no file types an items-* table of its own",h.length===0,`
29
+ ${h.join(`
30
30
  `)}
31
- Index BOX_ALIGN_CLASS (efficient-web-builder/format/lib/content/box-layout): left -> .start, right -> .end.`);const w=Object.keys(i).map(e=>{const a=l.find(c=>c.path===e),m=a?r(a.text).length:0;return a&&m!==d[e]?`${e}: ${m} matches, \`allowedMatches\` says ${d[e]??"nothing"}`:""}).filter(Boolean);n("an exempt file holds exactly the matches it is exempt for",w.length===0,`
32
- ${w.join(`
33
- `)}
34
- More is a new copy: index BOX_ALIGN_CLASS. Fewer: lower the count.`);const y=new Set(l.map(e=>e.path)),b=[...Object.keys(i),...Object.keys(d)].filter(e=>!y.has(e));return n("every exemption names a file that is still here",b.length===0,`drop these from \`allowed\`: ${b.join(", ")}`),s()}export{N as oneItemsAlignMap};
31
+ Index BOX_ALIGN_CLASS (efficient-web-builder/format/lib/content/box-layout); a block's word by block-align BLOCK_ALIGN_BOX_WORD: BOX_ALIGN_CLASS[BLOCK_ALIGN_BOX_WORD.right].`),S(n,a,s,d,$,"index BOX_ALIGN_CLASS"),b()}export{C as oneItemsAlignMap};
@@ -1,6 +1,6 @@
1
- import{ruleChecks as k}from"./rule.js";import{stripComments as f}from"./support/ts-source.js";import{SOURCE_FILE as b}from"./support/source-file.js";const u=new RegExp(`\\b${["storefront","ticker"].join("-")}(?:-(?:right|up|down))?\\b`,"g"),D=new RegExp("(?<![A-Za-z])infinite(?![A-Za-z])","g"),g=/\bmotionSeconds\(\s*["'`]loop["'`]|\bMOTION_TIMING(?:\.loop\b|\[\s*["'`]loop["'`]\s*\])/g,y=new RegExp(`\\b(?:${["ticker","scroll"].join("-")}|${["ticker","Animation"].join("")}|${["parse","Ticker","Scroll"].join("")}|${["TICKER","SCROLL","OPTIONS"].join("_")})\\b`,"g"),A=/\bparseOption\(\s*LOOP_\w*OPTIONS\b/g,E=/\b(?:loopFields|loopDirectionField|animationDurationField|loopDurationField|loopDelayField)\b/g;function a(s){const e=f(s),t=[];for(const n of e.matchAll(u))t.push(`loop keyframe (${n[0]})`);for(const n of e.matchAll(D))t.push(`endless animation (${n[0]})`);for(const n of e.matchAll(g))t.push(`loop time (${n[0]})`);for(const n of e.matchAll(y))t.push(`the old loop module (${n[0]})`);for(const n of e.matchAll(A))t.push(`loop reader (${n[0]})`);for(const n of e.matchAll(E))t.push(`loop row (${n[0]})`);return t}function x(s,e){const{check:t,report:n}=k("one loop module"),m=e.allowed??{};{const o=["storefront","ticker"].join("-"),r="infinite",O=[["a copied keyframe map",`const K = { left: "${o}" };`],["a direction keyframe",`const k = "${o}-down";`],["a hand-made marquee",`style={{ animation: \`spin 30s linear ${r}\` }}`],["a Tailwind marquee",`className="[animation:mq_40s_linear_${r}]"`],["the loop's time",'const sec = motionSeconds("loop", "duration", v);'],["the loop's time, by key","const r = MOTION_TIMING.loop.duration;"],["the old module's path",`import { x } from "@/lib/sections/${["ticker","scroll"].join("-")}";`],["the old writer",`${["ticker","Animation"].join("")}(dir, 50)`],["a loop reader",'parseOption(LOOP_DIRECTION_OPTIONS, "left", v)'],["a loop row","const f = { dir: loopDirectionField() };"],["the Duration row","const f = animationDurationField();"],["a loop's Duration row","const f = loopDurationField();"],["a loop's Delay row","const f = loopDelayField();"]];for(const[c,l]of O)t(`the reader finds ${c}`,a(l).length===1,a(l).join(", ")||"none");const w=[["a note that names it",`// runs ${o} for ever (${r})`],["the module's own writer, called","style={{ animation: loopAnimation(dir, step) }}"],["the entrance time",'motionSeconds("entrance", "duration", v)'],["a word that starts like one","const infinitely = true;"],["the one builder, called",'const f = animationTabFields("box");']];for(const[c,l]of w)t(`…and leaves ${c} alone`,a(l).length===0,a(l).join(", "))}const i=s.filter(o=>b.test(o.path));t(`read the source (${i.length} JS/TS files, at least ${e.minFiles})`,i.length>=e.minFiles,"fewer means the walk broke, and every check below is vacuous");const d=i.filter(o=>o.path.startsWith(e.moduleDir));t(`the module is there (${e.moduleDir}, ${d.length} files)`,d.some(o=>new RegExp(u.source).test(f(o.text))),"the keyframes are written in the module; none found means the folder moved");const p=i.filter(o=>!o.path.startsWith(e.moduleDir)&&!(o.path in m)).flatMap(o=>a(o.text).map(r=>`${o.path}: ${r}`));t("no file outside the module reads or writes a loop",p.length===0,`
1
+ import{ruleChecks as $}from"./rule.js";import{stripComments as f}from"./support/ts-source.js";import{SOURCE_FILE as w}from"./support/source-file.js";import{checkExemptionsStillHere as k}from"./support/exemptions.js";const h=new RegExp(`\\b${["storefront","ticker"].join("-")}(?:-(?:right|up|down))?\\b`,"g"),b=new RegExp("(?<![A-Za-z])infinite(?![A-Za-z])","g"),D=/\bmotionSeconds\(\s*["'`]loop["'`]|\bMOTION_TIMING(?:\.loop\b|\[\s*["'`]loop["'`]\s*\])/g,g=new RegExp(`\\b(?:${["ticker","scroll"].join("-")}|${["ticker","Animation"].join("")}|${["parse","Ticker","Scroll"].join("")}|${["TICKER","SCROLL","OPTIONS"].join("_")})\\b`,"g"),E=/\bparseOption\(\s*LOOP_\w*OPTIONS\b/g,A=/\b(?:loopFields|loopDirectionField|animationDurationField|loopDurationField|loopDelayField)\b/g;function s(a){const e=f(a),t=[];for(const n of e.matchAll(h))t.push(`loop keyframe (${n[0]})`);for(const n of e.matchAll(b))t.push(`endless animation (${n[0]})`);for(const n of e.matchAll(D))t.push(`loop time (${n[0]})`);for(const n of e.matchAll(g))t.push(`the old loop module (${n[0]})`);for(const n of e.matchAll(E))t.push(`loop reader (${n[0]})`);for(const n of e.matchAll(A))t.push(`loop row (${n[0]})`);return t}function x(a,e){const{check:t,report:n}=$("one loop module"),m=e.allowed??{};{const o=["storefront","ticker"].join("-"),r="infinite",u=[["a copied keyframe map",`const K = { left: "${o}" };`],["a direction keyframe",`const k = "${o}-down";`],["a hand-made marquee",`style={{ animation: \`spin 30s linear ${r}\` }}`],["a Tailwind marquee",`className="[animation:mq_40s_linear_${r}]"`],["the loop's time",'const sec = motionSeconds("loop", "duration", v);'],["the loop's time, by key","const r = MOTION_TIMING.loop.duration;"],["the old module's path",`import { x } from "@/lib/sections/${["ticker","scroll"].join("-")}";`],["the old writer",`${["ticker","Animation"].join("")}(dir, 50)`],["a loop reader",'parseOption(LOOP_DIRECTION_OPTIONS, "left", v)'],["a loop row","const f = { dir: loopDirectionField() };"],["the Duration row","const f = animationDurationField();"],["a loop's Duration row","const f = loopDurationField();"],["a loop's Delay row","const f = loopDelayField();"]];for(const[c,l]of u)t(`the reader finds ${c}`,s(l).length===1,s(l).join(", ")||"none");const O=[["a note that names it",`// runs ${o} for ever (${r})`],["the module's own writer, called","style={{ animation: loopAnimation(dir, step) }}"],["the entrance time",'motionSeconds("entrance", "duration", v)'],["a word that starts like one","const infinitely = true;"],["the one builder, called",'const f = animationTabFields("box");']];for(const[c,l]of O)t(`…and leaves ${c} alone`,s(l).length===0,s(l).join(", "))}const i=a.filter(o=>w.test(o.path));t(`read the source (${i.length} JS/TS files, at least ${e.minFiles})`,i.length>=e.minFiles,"fewer means the walk broke, and every check below is vacuous");const d=i.filter(o=>o.path.startsWith(e.moduleDir));t(`the module is there (${e.moduleDir}, ${d.length} files)`,d.some(o=>new RegExp(h.source).test(f(o.text))),"the keyframes are written in the module; none found means the folder moved");const p=i.filter(o=>!o.path.startsWith(e.moduleDir)&&!(o.path in m)).flatMap(o=>s(o.text).map(r=>`${o.path}: ${r}`));return t("no file outside the module reads or writes a loop",p.length===0,`
2
2
  ${p.join(`
3
3
  `)}
4
4
  A loop is ${e.moduleDir}: loopAnimation for the keyframe, loopSecondsOf and
5
5
  parseLoopDirection for the stored values, LoopTrack for a Box's row,
6
- animationTabFields for the rows on the Animation tab.`);const $=new Set(i.map(o=>o.path)),h=Object.keys(m).filter(o=>!$.has(o));return t("every exemption names a file that is still here",h.length===0,`drop these from \`allowed\`: ${h.join(", ")}`),n()}export{x as oneLoopModule};
6
+ animationTabFields for the rows on the Animation tab.`),k(t,i,Object.keys(m)),n()}export{x as oneLoopModule};
@@ -1,6 +1,6 @@
1
- import{ruleChecks as w}from"./rule.js";import{SOURCE_FILE as b}from"./support/source-file.js";const s=["data","theme"].join("-"),f="dark",p=[["reads data-theme",new RegExp(`getAttribute\\(\\s*["'\`]${s}["'\`]\\s*\\)`,"g")],["tests the dark class",new RegExp(`classList\\.contains\\(\\s*["'\`]${f}["'\`]\\s*\\)`,"g")],["watches data-theme alone",new RegExp(`attributeFilter\\s*:\\s*\\[\\s*["'\`]${s}["'\`]`,"g")],["watches the theme itself",/attributeFilter\s*:\s*ROOT_THEME_ATTRIBUTES\b/g]];function a(h){const o=[];for(const[e,l]of p)for(const n of h.matchAll(l))o.push(`${e} (${n[0]})`);return o}function $(h,o){const{check:e,report:l}=w("one page theme reader"),n=o.allowed??{};{const t=[["a light test",`const light = document.documentElement.getAttribute("${s}") === "light";`],["a dark test on another document",`const dark = doc.documentElement.getAttribute('${s}') !== "light";`],["a class test",`if (root.classList.contains("${f}")) return true;`],["an observer on the attribute",`obs.observe(root, { attributes: true, attributeFilter: ["${s}"] });`],["an observer on the shell's attribute list","obs.observe(root, { attributes: true, attributeFilter: ROOT_THEME_ATTRIBUTES });"]];for(const[u,r]of t)e(`the reader finds ${u}`,a(r).length===1,a(r).join(", "));const c=[["the shell's reader","const dark = rootIsDark({ doc, whenUnset: true });"],["the shell's watcher","return watchRootTheme(update, { doc });"],["the shell's hook","const dark = useRootIsDark({ doc, whenUnset: true });"],["a writer",`root.setAttribute("${s}", "light"); root.removeAttribute("${s}");`],["a writer's echo check by constant","return root.getAttribute(THEME_ATTR) === LIGHT_VALUE;"]];for(const[u,r]of c)e(`…and leaves ${u} alone`,a(r).length===0,a(r).join(", "))}const i=h.filter(t=>b.test(t.path));e(`read the source (${i.length} JS/TS files, at least ${o.minFiles})`,i.length>=o.minFiles,"fewer means the walk broke, and every check below is vacuous");const d=i.filter(t=>!(t.path in n)).flatMap(t=>a(t.text).map(c=>`${t.path}: ${c}`));e("no file reads the page's light/dark mode itself",d.length===0,`
1
+ import{ruleChecks as f}from"./rule.js";import{SOURCE_FILE as g}from"./support/source-file.js";import{checkExemptionsStillHere as b}from"./support/exemptions.js";const s=["data","theme"].join("-"),m="dark",w=[["reads data-theme",new RegExp(`getAttribute\\(\\s*["'\`]${s}["'\`]\\s*\\)`,"g")],["tests the dark class",new RegExp(`classList\\.contains\\(\\s*["'\`]${m}["'\`]\\s*\\)`,"g")],["watches data-theme alone",new RegExp(`attributeFilter\\s*:\\s*\\[\\s*["'\`]${s}["'\`]`,"g")],["watches the theme itself",/attributeFilter\s*:\s*ROOT_THEME_ATTRIBUTES\b/g]];function n(h){const o=[];for(const[e,l]of w)for(const a of h.matchAll(l))o.push(`${e} (${a[0]})`);return o}function E(h,o){const{check:e,report:l}=f("one page theme reader"),a=o.allowed??{};{const t=[["a light test",`const light = document.documentElement.getAttribute("${s}") === "light";`],["a dark test on another document",`const dark = doc.documentElement.getAttribute('${s}') !== "light";`],["a class test",`if (root.classList.contains("${m}")) return true;`],["an observer on the attribute",`obs.observe(root, { attributes: true, attributeFilter: ["${s}"] });`],["an observer on the shell's attribute list","obs.observe(root, { attributes: true, attributeFilter: ROOT_THEME_ATTRIBUTES });"]];for(const[u,r]of t)e(`the reader finds ${u}`,n(r).length===1,n(r).join(", "));const c=[["the shell's reader","const dark = rootIsDark({ doc, whenUnset: true });"],["the shell's watcher","return watchRootTheme(update, { doc });"],["the shell's hook","const dark = useRootIsDark({ doc, whenUnset: true });"],["a writer",`root.setAttribute("${s}", "light"); root.removeAttribute("${s}");`],["a writer's echo check by constant","return root.getAttribute(THEME_ATTR) === LIGHT_VALUE;"]];for(const[u,r]of c)e(`…and leaves ${u} alone`,n(r).length===0,n(r).join(", "))}const i=h.filter(t=>g.test(t.path));e(`read the source (${i.length} JS/TS files, at least ${o.minFiles})`,i.length>=o.minFiles,"fewer means the walk broke, and every check below is vacuous");const d=i.filter(t=>!(t.path in a)).flatMap(t=>n(t.text).map(c=>`${t.path}: ${c}`));return e("no file reads the page's light/dark mode itself",d.length===0,`
2
2
  ${d.join(`
3
3
  `)}
4
4
  Read it with rootIsDark (efficient-shell/format; whenUnset: true where the
5
5
  site sheet is dark unless it says light), and watch it with watchRootTheme
6
- (efficient-shell/format) or follow it with useRootIsDark (efficient-shell/theme).`);const g=new Set(i.map(t=>t.path)),m=Object.keys(n).filter(t=>!g.has(t));return e("every exemption names a file that is still here",m.length===0,`drop these from \`allowed\`: ${m.join(", ")}`),l()}export{$ as onePageThemeReader};
6
+ (efficient-shell/format) or follow it with useRootIsDark (efficient-shell/theme).`),b(e,i,Object.keys(a)),l()}export{E as onePageThemeReader};
@@ -0,0 +1,5 @@
1
+ import type { SourceFile } from "../rule.js";
2
+ export declare function assertPlainWords(rule: string, words: readonly string[]): void;
3
+ export declare const LEADS: string;
4
+ export declare function findingsWith(shapes: readonly RegExp[], source: string): string[];
5
+ export declare function exemptionChecks(check: (name: string, ok: boolean, detail?: string) => boolean, source: readonly SourceFile[], findings: (text: string) => string[], allowed: Readonly<Record<string, string>>, counts: Readonly<Record<string, number>>, more: string): void;
@@ -0,0 +1,4 @@
1
+ import{stripComments as h}from"./ts-source.js";import{checkExemptionsStillHere as f}from"./exemptions.js";const p=/^[a-z][a-z-]*$/;function $(t,e){const n=e.filter(o=>!p.test(o));if(n.length)throw new Error(`${t}: an align word must be a plain word: ${n.join(", ")}`)}const g=String.raw`\)?\s*(?:\?|&&|\{?\s*return\b|\{?\s*[\w.$]+\s*\+?=(?!=))\s*`;function d(t,e){const n=h(e);return t.flatMap(o=>[...n.matchAll(o)].map(r=>r[0].trim()))}function b(t,e,n,o,r,l){const a=Object.keys(o).map(s=>{const i=e.find(m=>m.path===s),c=i?n(i.text).length:0;return i&&c!==r[s]?`${s}: ${c} matches, \`allowedMatches\` says ${r[s]??"nothing"}`:""}).filter(Boolean);t("an exempt file holds exactly the matches it is exempt for",a.length===0,`
2
+ ${a.join(`
3
+ `)}
4
+ More is a new copy: ${l}. Fewer: lower the count.`),f(t,e,[...Object.keys(o),...Object.keys(r)])}export{g as LEADS,$ as assertPlainWords,b as exemptionChecks,d as findingsWith};
@@ -0,0 +1,2 @@
1
+ import type { SourceFile } from "../rule.js";
2
+ export declare function checkExemptionsStillHere(check: (name: string, ok: boolean, detail?: string) => boolean, source: readonly SourceFile[], exempt: readonly string[]): void;
@@ -0,0 +1 @@
1
+ function a(l,n,o){const s=new Set(n.map(e=>e.path)),t=o.filter(e=>!s.has(e));l("every exemption names a file that is still here",t.length===0,`drop these from \`allowed\`: ${t.join(", ")}`)}export{a as checkExemptionsStillHere};
@@ -5,10 +5,11 @@ export interface FeaturedCoverProps {
5
5
  category?: string;
6
6
  readLabel?: string;
7
7
  date?: string;
8
+ dateAt?: string;
8
9
  title?: string;
9
10
  dek?: string;
10
11
  ctaText?: string;
11
12
  ctaHref?: string;
12
13
  omitHead?: boolean;
13
14
  }
14
- export default function FeaturedCover({ image, badge, imageDate, category, readLabel, date, title, dek, ctaText, ctaHref, omitHead, }: FeaturedCoverProps): import("react").JSX.Element;
15
+ export default function FeaturedCover({ image, badge, imageDate, category, readLabel, date, dateAt, title, dek, ctaText, ctaHref, omitHead, }: FeaturedCoverProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- import{jsx as e,jsxs as a}from"react/jsx-runtime";import{EDITORIAL_COLUMN as N}from"../../format/lib/content/page-width.js";import{HideTaker as k}from"./ViewHideRoot.js";import{Fragment as w}from"react";import{SiteLink as y}from"../lib/site-runtime.js";import{stripMarkup as z}from"../../format/lib/markup.js";import $ from"./Placeholder.js";import{renderGold as r,renderHeadline as S,splitParagraphs as j}from"./goldPhrases.js";import{scrim as h}from"../../format/lib/content/scrim.js";const l={body:"text-[length:var(--size-body,20px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"};function L({image:b,badge:i,imageDate:o,category:c,readLabel:p,date:m,title:t,dek:d,ctaText:f,ctaHref:u,omitHead:v=!1}){const x=[c?e("span",{className:"text-accent",children:r(c)}):null,p?e("span",{children:r(p)}):null,m?e("span",{children:r(m)}):null].filter(Boolean),g=a("article",{className:"sf-card relative grid grid-cols-[1.3fr_1fr] border border-line bg-[var(--card-bg)] max-view-desktop:grid-cols-1",children:[a("div",{className:"relative aspect-[5/4] overflow-hidden border-r border-line bg-surface-2 max-view-desktop:border-r-0 max-view-desktop:border-b",children:[e($,{label:"featured-cover",src:b||void 0,alt:z(t||"Cover"),sizes:"(max-width: 1100px) 100vw, 56vw"}),e("div",{className:"pointer-events-none absolute inset-0 z-[1]",style:{background:`linear-gradient(180deg, ${h(.45)} 0%, transparent 30%, transparent 70%, ${h(.55)} 100%)`}}),i&&e("span",{className:`absolute left-6 top-6 z-[2] bg-accent px-3 py-2 font-mono ${l.labelSmall} uppercase tracking-[0.3em] text-bg`,children:r(i)}),o&&e("span",{className:`absolute right-6 bottom-6 z-[2] font-mono ${l.labelSmall} uppercase tracking-[0.24em] text-overlay-fg`,children:r(o)})]}),a("div",{className:"flex flex-col justify-between gap-6 px-12 py-14 max-view-desktop:px-7 max-view-desktop:py-9",children:[x.length>0&&e("div",{className:`flex items-center gap-4 font-mono ${l.labelSmall} uppercase tracking-[0.28em] text-fg-dim`,children:x.map((s,n)=>a(w,{children:[n>0&&e("span",{className:"opacity-40",children:"·"}),s]},n))}),t&&e("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(34px,3.5vw,58px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em]",children:S(t,!0)}),d&&j(d).map((s,n)=>e("p",{className:`max-w-[520px] font-serif ${l.body} italic leading-[1.5] text-fg-dim`,children:r(s,!0)},n)),f&&e("div",{children:a(y,{newTab:"auto",href:u||"#",className:`group inline-flex items-center gap-3.5 py-3.5 font-mono ${l.labelLarge} uppercase tracking-[0.3em] text-accent`,children:[r(f)," ",e("span",{className:"transition-transform group-hover:translate-x-[6px]",children:"→"})]})})]})]});return v?g:e(k,{as:"section",className:"border-b border-line py-20 max-view-desktop:py-[60px]",children:e("div",{className:N,children:g})})}export{L as default};
1
+ import{jsx as e,jsxs as l}from"react/jsx-runtime";import{EDITORIAL_COLUMN as w}from"../../format/lib/content/page-width.js";import{HideTaker as y}from"./ViewHideRoot.js";import{Fragment as z}from"react";import{SiteLink as $}from"../lib/site-runtime.js";import b from"./PostDate.js";import{stripMarkup as S}from"../../format/lib/markup.js";import j from"./Placeholder.js";import{renderGold as r,renderHeadline as L,splitParagraphs as _}from"./goldPhrases.js";import{scrim as u}from"../../format/lib/content/scrim.js";const n={body:"text-[length:var(--size-body,20px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"};function P({image:v,badge:o,imageDate:p,category:c,readLabel:m,date:d,dateAt:a,title:s,dek:f,ctaText:x,ctaHref:N,omitHead:k=!1}){const g=[c?e("span",{className:"text-accent",children:r(c)}):null,m?e("span",{children:r(m)}):null,a?e("span",{children:e(b,{at:a})}):d?e("span",{children:r(d)}):null].filter(Boolean),h=l("article",{className:"sf-card relative grid grid-cols-[1.3fr_1fr] border border-line bg-[var(--card-bg)] max-view-desktop:grid-cols-1",children:[l("div",{className:"relative aspect-[5/4] overflow-hidden border-r border-line bg-surface-2 max-view-desktop:border-r-0 max-view-desktop:border-b",children:[e(j,{label:"featured-cover",src:v||void 0,alt:S(s||"Cover"),sizes:"(max-width: 1100px) 100vw, 56vw"}),e("div",{className:"pointer-events-none absolute inset-0 z-[1]",style:{background:`linear-gradient(180deg, ${u(.45)} 0%, transparent 30%, transparent 70%, ${u(.55)} 100%)`}}),o&&e("span",{className:`absolute left-6 top-6 z-[2] bg-accent px-3 py-2 font-mono ${n.labelSmall} uppercase tracking-[0.3em] text-bg`,children:r(o)}),(a||p)&&e("span",{className:`absolute right-6 bottom-6 z-[2] font-mono ${n.labelSmall} uppercase tracking-[0.24em] text-overlay-fg`,children:a?e(b,{at:a}):r(p)})]}),l("div",{className:"flex flex-col justify-between gap-6 px-12 py-14 max-view-desktop:px-7 max-view-desktop:py-9",children:[g.length>0&&e("div",{className:`flex items-center gap-4 font-mono ${n.labelSmall} uppercase tracking-[0.28em] text-fg-dim`,children:g.map((i,t)=>l(z,{children:[t>0&&e("span",{className:"opacity-40",children:"·"}),i]},t))}),s&&e("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(34px,3.5vw,58px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em]",children:L(s,!0)}),f&&_(f).map((i,t)=>e("p",{className:`max-w-[520px] font-serif ${n.body} italic leading-[1.5] text-fg-dim`,children:r(i,!0)},t)),x&&e("div",{children:l($,{newTab:"auto",href:N||"#",className:`group inline-flex items-center gap-3.5 py-3.5 font-mono ${n.labelLarge} uppercase tracking-[0.3em] text-accent`,children:[r(x)," ",e("span",{className:"transition-transform group-hover:translate-x-[6px]",children:"→"})]})})]})]});return k?h:e(y,{as:"section",className:"border-b border-line py-20 max-view-desktop:py-[60px]",children:e("div",{className:w,children:h})})}export{P as default};
@@ -15,6 +15,7 @@ export interface LongReadProps {
15
15
  image?: string;
16
16
  imageLabel?: string;
17
17
  metaPublished?: string;
18
+ metaPublishedAt?: string;
18
19
  metaReads?: string;
19
20
  }
20
- export default function LongRead({ headNum, headTitle, headDesc, category, metaMiddle, readLabel, title, dek, quote, quoteAttribution, ctaText, ctaHref, image, imageLabel, metaPublished, metaReads, omitHead, }: LongReadProps): import("react").JSX.Element;
21
+ export default function LongRead({ headNum, headTitle, headDesc, category, metaMiddle, readLabel, title, dek, quote, quoteAttribution, ctaText, ctaHref, image, imageLabel, metaPublished, metaPublishedAt, metaReads, omitHead, }: LongReadProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- import{jsx as e,jsxs as r,Fragment as m}from"react/jsx-runtime";import{EDITORIAL_COLUMN as j}from"../../format/lib/content/page-width.js";import{HideTaker as E}from"./ViewHideRoot.js";import{Fragment as N}from"react";import{SiteLink as B}from"../lib/site-runtime.js";import{stripMarkup as F}from"../../format/lib/markup.js";import I from"./EditorialSectionHead.js";import O from"./Placeholder.js";import T from"./SectionEyebrow.js";import{renderGold as a,renderHeadline as w}from"./goldPhrases.js";import{scrim as z}from"../../format/lib/content/scrim.js";const n={bodySmall:"text-[length:var(--size-body,14px)]",body:"text-[length:var(--size-body,17px)]",bodyLarge:"text-[length:var(--size-body,22px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"};function C({headNum:S,headTitle:p,headDesc:x,category:f,metaMiddle:b,readLabel:g,title:t,dek:h,quote:i,quoteAttribution:o,ctaText:v,ctaHref:L,image:$,imageLabel:u,metaPublished:s,metaReads:d,omitHead:k=!1}){const y=[f?e("span",{className:"text-accent",children:a(f)}):null,b?e("span",{children:a(b)}):null,g?e("span",{children:a(g)}):null].filter(Boolean),_=!!s||!!d;return e(E,{as:"section",className:k?"border-b border-line pt-0 pb-[120px] max-view-desktop:pt-0 max-view-desktop:pb-20":"border-b border-line py-[120px] max-view-desktop:py-20",children:r("div",{className:j,children:[k?null:e(I,{num:S,title:p?w(p,!0):void 0,desc:x?a(x):void 0}),r("article",{className:"sf-card grid min-h-[640px] grid-cols-[1fr_1.2fr] border border-line max-view-desktop:grid-cols-1",children:[r("div",{className:"flex flex-col justify-center gap-7 border-r border-line bg-surface px-14 py-16 max-view-desktop:border-r-0 max-view-desktop:border-b max-view-desktop:px-7 max-view-desktop:py-12",children:[y.length>0&&e("div",{className:`flex items-center gap-3.5 font-mono ${n.labelSmall} uppercase tracking-[0.3em] text-fg-dim`,children:y.map((c,l)=>r(N,{children:[l>0&&e("span",{className:"opacity-40",children:"·"}),c]},l))}),t&&e("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(36px,4.2vw,68px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.95] tracking-[-0.035em]",children:w(t,!0)}),h&&e("p",{className:`font-serif ${n.bodyLarge} italic leading-[1.45] text-fg`,children:a(h)}),(i||o)&&r("blockquote",{className:`max-w-[520px] border-l-2 border-accent py-1.5 pl-[22px] font-serif ${n.body} italic leading-[1.6] text-fg-dim`,children:[i&&r(m,{children:["“",a(i),"”"]}),o&&e("strong",{className:`mt-2.5 block font-display ${n.bodySmall} font-normal not-italic uppercase tracking-[0.22em] text-fg`,children:a(o)})]}),v&&r(B,{newTab:"auto",href:L||"#",className:`inline-flex items-center gap-3.5 self-start border border-btn px-7 py-4 font-mono ${n.labelLarge} uppercase tracking-[0.3em] text-btn transition-colors hover:bg-btn hover:text-btn-ink`,children:[a(v)," ",e("span",{children:"→"})]})]}),r("div",{className:"relative overflow-hidden bg-surface-2 max-view-desktop:aspect-[4/3]",children:[e(O,{label:"long-read",src:$||void 0,alt:F(t||"Long read"),sizes:"(max-width: 1100px) 100vw, 56vw"}),e("div",{className:"pointer-events-none absolute inset-0 z-[1]",style:{background:`linear-gradient(180deg, ${z(.55)} 0%, transparent 25%, transparent 60%, ${z(.7)} 100%)`}}),u&&e(T,{text:u,size:12,className:"absolute right-6 top-6 z-[2]"}),_&&e("div",{className:`absolute bottom-6 left-6 z-[2] font-mono ${n.labelSmall} uppercase leading-[1.8] tracking-[0.22em] text-overlay-fg`,children:[s?r(m,{children:[e("strong",{className:"font-normal text-accent",children:"Published"})," ",a(s)]}):null,d?r(m,{children:[e("strong",{className:"font-normal text-accent",children:"Reads in"})," ",a(d)]}):null].filter(Boolean).map((c,l)=>r(N,{children:[l>0&&e("br",{}),c]},l))})]})]})]})})}export{C as default};
1
+ import{jsx as e,jsxs as r,Fragment as m}from"react/jsx-runtime";import{EDITORIAL_COLUMN as E}from"../../format/lib/content/page-width.js";import{HideTaker as B}from"./ViewHideRoot.js";import{Fragment as w}from"react";import{SiteLink as F}from"../lib/site-runtime.js";import I from"./PostDate.js";import{stripMarkup as O}from"../../format/lib/markup.js";import T from"./EditorialSectionHead.js";import C from"./Placeholder.js";import D from"./SectionEyebrow.js";import{renderGold as a,renderHeadline as z}from"./goldPhrases.js";import{scrim as S}from"../../format/lib/content/scrim.js";const n={bodySmall:"text-[length:var(--size-body,14px)]",body:"text-[length:var(--size-body,17px)]",bodyLarge:"text-[length:var(--size-body,22px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"};function H({headNum:L,headTitle:x,headDesc:f,category:g,metaMiddle:b,readLabel:h,title:o,dek:v,quote:i,quoteAttribution:s,ctaText:u,ctaHref:$,image:_,imageLabel:k,metaPublished:d,metaPublishedAt:t,metaReads:c,omitHead:y=!1}){const N=[g?e("span",{className:"text-accent",children:a(g)}):null,b?e("span",{children:a(b)}):null,h?e("span",{children:a(h)}):null].filter(Boolean),j=!!t||!!d||!!c;return e(B,{as:"section",className:y?"border-b border-line pt-0 pb-[120px] max-view-desktop:pt-0 max-view-desktop:pb-20":"border-b border-line py-[120px] max-view-desktop:py-20",children:r("div",{className:E,children:[y?null:e(T,{num:L,title:x?z(x,!0):void 0,desc:f?a(f):void 0}),r("article",{className:"sf-card grid min-h-[640px] grid-cols-[1fr_1.2fr] border border-line max-view-desktop:grid-cols-1",children:[r("div",{className:"flex flex-col justify-center gap-7 border-r border-line bg-surface px-14 py-16 max-view-desktop:border-r-0 max-view-desktop:border-b max-view-desktop:px-7 max-view-desktop:py-12",children:[N.length>0&&e("div",{className:`flex items-center gap-3.5 font-mono ${n.labelSmall} uppercase tracking-[0.3em] text-fg-dim`,children:N.map((p,l)=>r(w,{children:[l>0&&e("span",{className:"opacity-40",children:"·"}),p]},l))}),o&&e("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(36px,4.2vw,68px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.95] tracking-[-0.035em]",children:z(o,!0)}),v&&e("p",{className:`font-serif ${n.bodyLarge} italic leading-[1.45] text-fg`,children:a(v)}),(i||s)&&r("blockquote",{className:`max-w-[520px] border-l-2 border-accent py-1.5 pl-[22px] font-serif ${n.body} italic leading-[1.6] text-fg-dim`,children:[i&&r(m,{children:["“",a(i),"”"]}),s&&e("strong",{className:`mt-2.5 block font-display ${n.bodySmall} font-normal not-italic uppercase tracking-[0.22em] text-fg`,children:a(s)})]}),u&&r(F,{newTab:"auto",href:$||"#",className:`inline-flex items-center gap-3.5 self-start border border-btn px-7 py-4 font-mono ${n.labelLarge} uppercase tracking-[0.3em] text-btn transition-colors hover:bg-btn hover:text-btn-ink`,children:[a(u)," ",e("span",{children:"→"})]})]}),r("div",{className:"relative overflow-hidden bg-surface-2 max-view-desktop:aspect-[4/3]",children:[e(C,{label:"long-read",src:_||void 0,alt:O(o||"Long read"),sizes:"(max-width: 1100px) 100vw, 56vw"}),e("div",{className:"pointer-events-none absolute inset-0 z-[1]",style:{background:`linear-gradient(180deg, ${S(.55)} 0%, transparent 25%, transparent 60%, ${S(.7)} 100%)`}}),k&&e(D,{text:k,size:12,className:"absolute right-6 top-6 z-[2]"}),j&&e("div",{className:`absolute bottom-6 left-6 z-[2] font-mono ${n.labelSmall} uppercase leading-[1.8] tracking-[0.22em] text-overlay-fg`,children:[t||d?r(m,{children:[e("strong",{className:"font-normal text-accent",children:"Published"})," ",t?e(I,{at:t}):a(d)]}):null,c?r(m,{children:[e("strong",{className:"font-normal text-accent",children:"Reads in"})," ",a(c)]}):null].filter(Boolean).map((p,l)=>r(w,{children:[l>0&&e("br",{}),p]},l))})]})]})]})})}export{H as default};
@@ -5,6 +5,7 @@ export interface EventPost {
5
5
  cover: string;
6
6
  meta?: string;
7
7
  dateLabel?: string;
8
+ publishedAt?: string;
8
9
  read?: string;
9
10
  }
10
11
  export interface PostCardProps {
@@ -1 +1 @@
1
- import{jsx as a,jsxs as i}from"react/jsx-runtime";import{NO_HIDE as S,useTakeViewHide as y,withViewHide as c}from"./ViewHideRoot.js";import{SiteLink as s}from"../lib/site-runtime.js";import{boxDarkenStyle as L,boxPlacementClasses as H,CARD_SHADOW_CLASS as _}from"../../format/lib/content/box-background.js";import{POST_CARD_HEIGHT as T}from"../../format/lib/post-card-layout.js";import z from"./PictureWash.js";import m from"./Placeholder.js";import{renderGold as l,renderHeadline as o}from"./goldPhrases.js";const r={body:"text-[length:var(--size-body,14px)]",headingSmall1:"text-[length:var(--size-headingSmall,22px)]",headingSmall2:"text-[length:var(--size-headingSmall,30px)]",label:"text-[length:var(--size-label,13px)]"};function C({post:e,scaffold:n=!1,layout:h,showCover:g=!0,placement:f,darken:x,darkenStyle:b,href:u,minHeight:v,takesViewHide:p=!1}){const N=y(),t=p?N:S,d=u||(n?"#":`/journal/${e.slug}`),w=h==="cover",$=(e.meta||e.dateLabel||e.read)&&i("div",{className:`flex gap-3.5 font-mono ${r.label} uppercase tracking-[0.18em] text-fg-dim`,children:[e.meta&&a("span",{className:"text-accent",children:l(e.meta)}),e.dateLabel&&a("span",{children:l(e.dateLabel)}),e.read&&a("span",{children:l(e.read)})]});if(w){const k=L(x,b);return t.scope(i(s,{newTab:"auto",href:d,className:c(`${_} group relative isolate flex overflow-hidden`,t.className),...t.attrs,style:{minHeight:`${v??T.fallback}px`},"aria-disabled":n||void 0,tabIndex:n?-1:void 0,children:[a("div",{className:"absolute inset-0",children:a(m,{label:`post-${e.slug}`,src:e.cover||void 0,sizes:"(max-width: 800px) 100vw, 56vw"})}),a(z,{wash:k}),i("div",{className:`relative z-[1] flex w-full flex-col gap-2 p-8 text-overlay-fg max-view-wide:p-5 ${H(f??"bottom-left","column")}`,children:[e.meta&&a("div",{className:`font-mono ${r.label} uppercase tracking-[0.18em] text-accent`,children:l(e.meta)}),a("h3",{className:`font-heading3 ${r.headingSmall2} font-medium leading-[1.2] tracking-[-0.02em]`,children:o(e.title,!1)}),e.excerpt&&a("p",{className:`max-w-[46ch] ${r.body} leading-[1.55] opacity-80`,children:l(e.excerpt)}),(e.dateLabel||e.read)&&i("div",{className:`flex gap-3.5 font-mono ${r.label} uppercase tracking-[0.18em] opacity-75`,children:[e.dateLabel&&a("span",{children:l(e.dateLabel)}),e.read&&a("span",{children:l(e.read)})]})]})]}))}return t.scope(i(s,{newTab:"auto",href:d,style:{"--card-bg":"var(--site-surface)","--card-bg-hover":"var(--site-surface-2)"},className:c("sf-card sf-card-fill group block bg-[var(--card-bg)] transition-colors duration-300 hover:bg-[var(--card-bg-hover)]",t.className),...t.attrs,"aria-disabled":n||void 0,tabIndex:n?-1:void 0,children:[g&&(e.cover||n)&&a("div",{className:"sf-card-image relative aspect-[16/10] overflow-hidden bg-bg",children:a(m,{label:`event-${e.slug}`,src:e.cover||void 0})}),i("div",{className:"flex flex-col gap-2.5 px-7 pb-8 pt-6",children:[$,a("h3",{className:`mt-1 font-heading3 ${r.headingSmall1} font-medium leading-[1.2] tracking-[-0.02em]`,children:o(e.title,!1)}),e.excerpt&&a("p",{className:`${r.body} leading-[1.55] text-fg-dim`,children:l(e.excerpt)}),i("span",{className:`mt-1.5 inline-flex items-center gap-2 font-mono ${r.label} uppercase tracking-[0.2em] transition-colors group-hover:text-accent`,children:["Read more",a("span",{"aria-hidden":!0,children:"→"})]})]})]}))}export{C as default};
1
+ import{jsx as a,jsxs as r}from"react/jsx-runtime";import{NO_HIDE as y,useTakeViewHide as H,withViewHide as s}from"./ViewHideRoot.js";import{SiteLink as m}from"../lib/site-runtime.js";import _ from"./PostDate.js";import{boxDarkenStyle as T,boxPlacementClasses as z,CARD_SHADOW_CLASS as A}from"../../format/lib/content/box-background.js";import{POST_CARD_HEIGHT as C}from"../../format/lib/post-card-layout.js";import D from"./PictureWash.js";import o from"./Placeholder.js";import{renderGold as i,renderHeadline as h}from"./goldPhrases.js";const l={body:"text-[length:var(--size-body,14px)]",headingSmall1:"text-[length:var(--size-headingSmall,22px)]",headingSmall2:"text-[length:var(--size-headingSmall,30px)]",label:"text-[length:var(--size-label,13px)]"};function P({post:e,scaffold:n=!1,layout:g,showCover:f=!0,placement:x,darken:u,darkenStyle:b,href:v,minHeight:p,takesViewHide:N=!1}){const w=H(),t=N?w:y,c=v||(n?"#":`/journal/${e.slug}`),$=g==="cover",d=e.publishedAt?a(_,{at:e.publishedAt}):e.dateLabel?i(e.dateLabel):null,k=(e.meta||d||e.read)&&r("div",{className:`flex gap-3.5 font-mono ${l.label} uppercase tracking-[0.18em] text-fg-dim`,children:[e.meta&&a("span",{className:"text-accent",children:i(e.meta)}),d&&a("span",{children:d}),e.read&&a("span",{children:i(e.read)})]});if($){const S=T(u,b);return t.scope(r(m,{newTab:"auto",href:c,className:s(`${A} group relative isolate flex overflow-hidden`,t.className),...t.attrs,style:{minHeight:`${p??C.fallback}px`},"aria-disabled":n||void 0,tabIndex:n?-1:void 0,children:[a("div",{className:"absolute inset-0",children:a(o,{label:`post-${e.slug}`,src:e.cover||void 0,sizes:"(max-width: 800px) 100vw, 56vw"})}),a(D,{wash:S}),r("div",{className:`relative z-[1] flex w-full flex-col gap-2 p-8 text-overlay-fg max-view-wide:p-5 ${z(x??"bottom-left","column")}`,children:[e.meta&&a("div",{className:`font-mono ${l.label} uppercase tracking-[0.18em] text-accent`,children:i(e.meta)}),a("h3",{className:`font-heading3 ${l.headingSmall2} font-medium leading-[1.2] tracking-[-0.02em]`,children:h(e.title,!1)}),e.excerpt&&a("p",{className:`max-w-[46ch] ${l.body} leading-[1.55] opacity-80`,children:i(e.excerpt)}),(d||e.read)&&r("div",{className:`flex gap-3.5 font-mono ${l.label} uppercase tracking-[0.18em] opacity-75`,children:[d&&a("span",{children:d}),e.read&&a("span",{children:i(e.read)})]})]})]}))}return t.scope(r(m,{newTab:"auto",href:c,style:{"--card-bg":"var(--site-surface)","--card-bg-hover":"var(--site-surface-2)"},className:s("sf-card sf-card-fill group block bg-[var(--card-bg)] transition-colors duration-300 hover:bg-[var(--card-bg-hover)]",t.className),...t.attrs,"aria-disabled":n||void 0,tabIndex:n?-1:void 0,children:[f&&(e.cover||n)&&a("div",{className:"sf-card-image relative aspect-[16/10] overflow-hidden bg-bg",children:a(o,{label:`event-${e.slug}`,src:e.cover||void 0})}),r("div",{className:"flex flex-col gap-2.5 px-7 pb-8 pt-6",children:[k,a("h3",{className:`mt-1 font-heading3 ${l.headingSmall1} font-medium leading-[1.2] tracking-[-0.02em]`,children:h(e.title,!1)}),e.excerpt&&a("p",{className:`${l.body} leading-[1.55] text-fg-dim`,children:i(e.excerpt)}),r("span",{className:`mt-1.5 inline-flex items-center gap-2 font-mono ${l.label} uppercase tracking-[0.2em] transition-colors group-hover:text-accent`,children:["Read more",a("span",{"aria-hidden":!0,children:"→"})]})]})]}))}export{P as default};
@@ -0,0 +1,3 @@
1
+ export default function PostDate({ at }: {
2
+ at: string;
3
+ }): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as s,jsxs as i}from"react/jsx-runtime";import{useSyncExternalStore as n}from"react";import{postDay as r}from"../../format/lib/content/post-date.js";const o="MMM 00, 0000",a={display:"inline-grid"},c={gridArea:"1 / 1",visibility:"hidden"},l={gridArea:"1 / 1"},d=()=>()=>{},m=()=>"";function p({at:e}){const t=n(d,()=>r(e),m);return i("time",{dateTime:e,style:a,children:[s("span",{"aria-hidden":"true",style:c,children:o}),s("span",{style:l,children:t})]})}export{p as default};
@@ -1 +1 @@
1
- import{jsx as a,jsxs as c}from"react/jsx-runtime";import{DEFAULT_TICKER_SEPARATOR as O,DEFAULT_TICKER_SIZE as S,SEPARATOR_GLYPH as D,parseTickerSeparator as N,parseTickerSize as R,separatorScaleClass as b,tickerTypeClass as y}from"../../format/lib/sections/ticker-style.js";import{DEFAULT_LOOP_DELAY as I,DEFAULT_LOOP_DIRECTION as P,DEFAULT_LOOP_SECONDS as j,isVerticalLoop as k,loopAnimation as u,parseLoopDirection as F}from"../../format/lib/animation/index.js";import{renderGold as U}from"./goldPhrases.js";const $={"themed-band":"text-fg/70","themed-section":"text-fg-dim","dark-media":"text-overlay-fg/70"};function K({items:p,separator:l=O,size:m=S,seconds:d=j,delay:x=I,scroll:f=P,backdrop:w="themed-band",className:g}){const t=R(m),n=F(f),i=N(l),h=`text-accent ${b(t,i)}`.trim(),o=D[i],T=o===""?a("span",{}):a("span",{className:h,children:o}),s=k(n),_=s?"inline-flex flex-col items-center gap-[60px] pb-[60px] max-view-wide:gap-8 max-view-wide:pb-8":"inline-flex items-center gap-[60px] pr-[60px] max-view-wide:gap-8 max-view-wide:pr-8",E=s?"inline-flex flex-col items-center gap-[60px] max-view-wide:gap-8":"inline-flex items-center gap-[60px] max-view-wide:gap-8",r=L=>a("span",{className:_,children:p.map((e,A)=>{const v=typeof e=="string"?e:e.text,C=typeof e=="object"&&e.gold;return c("span",{className:E,children:[a("span",{className:C?"text-accent":void 0,children:U(v)}),T]},A)})},L);return a("div",{className:`overflow-hidden ${g??""}`,children:c("div",{className:`flex ${s?"flex-col ":""}whitespace-nowrap ${y(t)} ${$[w]}`,style:{animation:u(n,d,x)},children:[r("a"),r("b")]})})}export{K as default};
1
+ import{jsx as t,jsxs as p}from"react/jsx-runtime";import{DEFAULT_TICKER_SEPARATOR as D,DEFAULT_TICKER_SIZE as R,SEPARATOR_GLYPH as b,parseTickerSeparator as y,parseTickerSize as F,separatorScaleClass as k,tickerTypeClass as I}from"../../format/lib/sections/ticker-style.js";import{DEFAULT_LOOP_DELAY as P,DEFAULT_LOOP_DIRECTION as $,DEFAULT_LOOP_SECONDS as j,isVerticalLoop as U,loopAnimation as K,parseLoopDirection as G}from"../../format/lib/animation/index.js";import{loopFillSeconds as Y,useLoopFill as z}from"../lib/animation/loop-fill.js";import{renderGold as H}from"./goldPhrases.js";const V={"themed-band":"text-fg/70","themed-section":"text-fg-dim","dark-media":"text-overlay-fg/70"};function Z({items:d,separator:m=D,size:x=R,seconds:f=j,delay:w=P,scroll:h=$,backdrop:g="themed-band",className:_}){const i=F(x),r=G(h),o=y(m),L=`text-accent ${k(i,o)}`.trim(),c=b[o],T=c===""?t("span",{}):t("span",{className:L,children:c}),a=U(r),{band:A,track:E,count:n,fitted:v}=z(!a),S=a?"inline-flex flex-col items-center gap-[60px] pb-[60px] max-view-wide:gap-8 max-view-wide:pb-8":"inline-flex items-center gap-[60px] pr-[60px] max-view-wide:gap-8 max-view-wide:pr-8",u=a?"inline-flex flex-col items-center gap-[60px] max-view-wide:gap-8":"inline-flex items-center gap-[60px] max-view-wide:gap-8",s=l=>t("span",{className:S,children:d.map((e,C)=>{const N=typeof e=="string"?e:e.text,O=typeof e=="object"&&e.gold;return p("span",{className:u,children:[t("span",{className:O?"text-accent":void 0,children:H(N)}),T]},C)})},l);return t("div",{ref:A,className:`overflow-hidden ${_??""}`,children:p("div",{ref:E,className:`flex ${a?"flex-col ":""}whitespace-nowrap ${I(i)} ${V[g]}`,style:{animation:K(r,Y(f,n),w),...v?{width:"max-content"}:null},children:[s("a"),s("b"),n>1&&t("span",{className:"contents","aria-hidden":!0,inert:!0,children:Array.from({length:2*n-2},(l,e)=>s(`fill-${e}`))})]})})}export{Z as default};
@@ -1,4 +1,4 @@
1
- import type { ReactNode } from "react";
1
+ import { type ReactNode } from "react";
2
2
  import { type LoopDirection } from "../../../format/lib/animation/loop.js";
3
3
  export declare const LOOP_COPY_CLASS: {
4
4
  readonly across: "pr-[var(--sf-gap-len,0px)] max-view-wide:pr-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))]";
@@ -1 +1 @@
1
- import{Fragment as x,jsx as r,jsxs as c}from"react/jsx-runtime";import{isVerticalLoop as n,loopAnimation as f}from"../../../format/lib/animation/loop.js";const s={across:"pr-[var(--sf-gap-len,0px)] max-view-wide:pr-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))]",down:"pb-[var(--sf-gap-len,0px)] max-view-wide:pb-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))]"};function o(a){return n(a)?s.down:s.across}function v({direction:a,seconds:l,delay:p,editing:i,copy:e}){if(i)return r(x,{children:e("")});const t=n(a);return r("div",{className:"overflow-hidden",children:c("div",{className:t?"flex flex-col":"flex w-max",style:{animation:f(a,l,p)},children:[e(o(a)),r("div",{className:"contents","aria-hidden":!0,inert:!0,children:e(o(a))})]})})}export{s as LOOP_COPY_CLASS,v as LoopTrack,o as loopCopyClass};
1
+ import{Fragment as d,jsx as a,jsxs as v}from"react/jsx-runtime";import{Fragment as h}from"react";import{isVerticalLoop as p,loopAnimation as g}from"../../../format/lib/animation/loop.js";import{loopFillSeconds as u,useLoopFill as w}from"./loop-fill.js";const t={across:"pr-[var(--sf-gap-len,0px)] max-view-wide:pr-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))]",down:"pb-[var(--sf-gap-len,0px)] max-view-wide:pb-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))]"};function _(r){return p(r)?t.down:t.across}function A({direction:r,seconds:i,delay:c,editing:o,copy:e}){const n=p(r),{band:f,track:m,count:s}=w(!n&&!o);if(o)return a(d,{children:e("")});const l=_(r);return a("div",{ref:f,className:"overflow-hidden",children:v("div",{ref:m,className:n?"flex flex-col":"flex w-max",style:{animation:g(r,u(i,s),c)},children:[e(l),a("div",{className:"contents","aria-hidden":!0,inert:!0,children:Array.from({length:2*s-1},(C,x)=>a(h,{children:e(l)},x))})]})})}export{t as LOOP_COPY_CLASS,A as LoopTrack,_ as loopCopyClass};
@@ -0,0 +1,9 @@
1
+ export declare const LOOP_FILL_MAX = 256;
2
+ export declare function loopFillCount(band: number, copy: number): number;
3
+ export declare function loopFillSeconds(seconds: number, count: number): number;
4
+ export declare function useLoopFill<B extends HTMLElement = HTMLDivElement, T extends HTMLElement = HTMLDivElement>(across: boolean): {
5
+ band: import("react").RefObject<B | null>;
6
+ track: import("react").RefObject<T | null>;
7
+ count: number;
8
+ fitted: boolean;
9
+ };
@@ -0,0 +1 @@
1
+ import{useEffect as a,useRef as f,useState as d}from"react";const h=256;function y(t,e){return!(t>0)||!(e>0)?1:Math.min(h,Math.max(1,Math.ceil(t/e)))}function F(t,e){return t*e}function b(t,e){const n=e.style.display;e.style.display="none";const r=t.clientWidth;return e.style.display=n,r}function m(t){return t.firstElementChild?.getBoundingClientRect().width??0}function L(t){const e=f(null),n=f(null),[r,u]=d(1),[p,l]=d(!1);return a(()=>{const i=e.current,o=n.current;if(!t||!i||!o||typeof ResizeObserver!="function"){u(1),l(!1);return}const c=()=>{u(y(b(i,o),m(o))),l(!0)},s=new ResizeObserver(c);return s.observe(i),s.observe(o),c(),()=>s.disconnect()},[t]),{band:e,track:n,count:t?r:1,fitted:t&&p}}export{h as LOOP_FILL_MAX,y as loopFillCount,F as loopFillSeconds,L as useLoopFill};
@@ -1 +1 @@
1
- import{jsx as u}from"react/jsx-runtime";import H from"../../../../../components/FeaturedCover.js";import{hidableText as k}from"efficient-easel/draw";import{phHide as a}from"../../scaffold.js";import{parseSectionHeadPlacement as C}from"../../../../../../format/lib/sections/section-head-placement.js";import{FeaturedCoverMeta as F,FEATUREDCOVER_PH as t}from"../../../../../../format/lib/document/blocks/general/FeaturedCover/meta.js";const j={...F,render:({source:o,image:d,badge:i,imageDate:c,category:n,readLabel:g,date:l,title:p,dek:s,ctaText:f,ctaHref:x,headPlacement:b,editor:e})=>{const r=o,m=!!r?.slug;return u(H,{image:m?r.image:d,badge:a(i,t.badge,e),imageDate:m?r.date:a(c,t.imageDate,e),category:a(n,t.category,e),readLabel:a(g,t.readLabel,e),date:m?r.date:a(l,t.date,e),title:m?r.title:a(p,t.title,e),dek:m?r.dek:a(s,t.dek,e),ctaText:a(f,t.ctaText,e),ctaHref:m?r.href:k(x),omitHead:C(b)==="own-box"})}};export{j as FeaturedCoverRender};
1
+ import{jsx as x}from"react/jsx-runtime";import H from"../../../../../components/FeaturedCover.js";import{hidableText as h}from"efficient-easel/draw";import{phHide as a}from"../../scaffold.js";import{parseSectionHeadPlacement as k}from"../../../../../../format/lib/sections/section-head-placement.js";import{FeaturedCoverMeta as C,FEATUREDCOVER_PH as r}from"../../../../../../format/lib/document/blocks/general/FeaturedCover/meta.js";const R={...C,render:({source:m,image:o,badge:i,imageDate:n,category:c,readLabel:f,date:l,title:p,dek:s,ctaText:g,ctaHref:u,headPlacement:b,editor:e})=>{const t=m,d=!!t?.slug;return x(H,{image:d?t.image:o,badge:a(i,r.badge,e),imageDate:d?t.date:a(n,r.imageDate,e),category:a(c,r.category,e),readLabel:a(f,r.readLabel,e),date:d?t.date:a(l,r.date,e),dateAt:d&&t.publishedAt||void 0,title:d?t.title:a(p,r.title,e),dek:d?t.dek:a(s,r.dek,e),ctaText:a(g,r.ctaText,e),ctaHref:d?t.href:h(u),omitHead:k(b)==="own-box"})}};export{R as FeaturedCoverRender};
@@ -1 +1 @@
1
- import{jsx as A}from"react/jsx-runtime";import D from"../../../../../components/LongRead.js";import{hidableText as M}from"efficient-easel/draw";import{parseSectionHeadPlacement as N}from"../../../../../../format/lib/sections/section-head-placement.js";import{phHide as a}from"../../scaffold.js";import{LongReadMeta as j,LONGREAD_PH as t}from"../../../../../../format/lib/document/blocks/general/LongRead/meta.js";const O={...j,render:({source:l,headNum:s,headTitle:i,headDesc:c,category:r,metaMiddle:u,readLabel:h,title:b,dek:g,quote:f,quoteAttribution:p,ctaText:x,ctaHref:L,image:R,imageLabel:H,metaPublished:T,metaReads:k,headPlacement:q,editor:e})=>{const n=N(q)==="own-box",d=P=>n?void 0:P,m=l,o=!!m?.slug;return A(D,{headNum:d(a(s,t.headNum,e)),headTitle:d(a(i,t.headTitle,e)),headDesc:d(a(c,t.headDesc,e)),omitHead:n,category:a(r,t.category,e),metaMiddle:a(u,t.metaMiddle,e),readLabel:a(h,t.readLabel,e),title:o?m.title:a(b,t.title,e),dek:o?m.dek:a(g,t.dek,e),quote:a(f,t.quote,e),quoteAttribution:a(p,t.quoteAttribution,e),ctaText:a(x,t.ctaText,e),ctaHref:o?m.href:M(L),image:o?m.image:R,imageLabel:a(H,t.imageLabel,e),metaPublished:o?m.date:a(T,t.metaPublished,e),metaReads:a(k,t.metaReads,e)})}};export{O as LongReadRender};
1
+ import{jsx as q}from"react/jsx-runtime";import D from"../../../../../components/LongRead.js";import{hidableText as M}from"efficient-easel/draw";import{parseSectionHeadPlacement as N}from"../../../../../../format/lib/sections/section-head-placement.js";import{phHide as a}from"../../scaffold.js";import{LongReadMeta as j,LONGREAD_PH as t}from"../../../../../../format/lib/document/blocks/general/LongRead/meta.js";const O={...j,render:({source:i,headNum:l,headTitle:s,headDesc:u,category:c,metaMiddle:h,readLabel:r,title:b,dek:f,quote:g,quoteAttribution:p,ctaText:x,ctaHref:L,image:R,imageLabel:A,metaPublished:H,metaReads:P,headPlacement:T,editor:e})=>{const o=N(T)==="own-box",n=k=>o?void 0:k,m=i,d=!!m?.slug;return q(D,{headNum:n(a(l,t.headNum,e)),headTitle:n(a(s,t.headTitle,e)),headDesc:n(a(u,t.headDesc,e)),omitHead:o,category:a(c,t.category,e),metaMiddle:a(h,t.metaMiddle,e),readLabel:a(r,t.readLabel,e),title:d?m.title:a(b,t.title,e),dek:d?m.dek:a(f,t.dek,e),quote:a(g,t.quote,e),quoteAttribution:a(p,t.quoteAttribution,e),ctaText:a(x,t.ctaText,e),ctaHref:d?m.href:M(L),image:d?m.image:R,imageLabel:a(A,t.imageLabel,e),metaPublished:d?m.date:a(H,t.metaPublished,e),metaPublishedAt:d&&m.publishedAt||void 0,metaReads:a(P,t.metaReads,e)})}};export{O as LongReadRender};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import n from"../../../../../components/PostCard.js";import{hidableText as l}from"efficient-easel/draw";import{phHide as i}from"../../scaffold.js";import{PostCardMeta as o,POSTCARD_PH as a}from"../../../../../../format/lib/document/blocks/general/PostCard/meta.js";const h={...o,render:e=>{const t=e.source,d=!!t?.slug;return r(n,{takesViewHide:!0,post:{slug:d?t.slug:"post-card",title:(d?t.title:i(e.title,a.title,e.editor))||"",excerpt:(d?t.dek:i(e.excerpt,a.excerpt,e.editor))||"",cover:(d?t.image:e.image)||"",meta:i(e.category,a.category,e.editor)||void 0,dateLabel:(d?t.date:i(e.date,a.date,e.editor))||void 0,read:i(e.readLabel,a.readLabel,e.editor)||void 0},href:(d?t.href:l(e.href))||void 0,layout:e.layout,showCover:e.showCover,placement:e.placement,darken:e.darken,darkenStyle:e.darkenStyle,minHeight:e.minHeight,scaffold:!!e.editor?.isEditing&&!d})}};export{h as PostCardRender};
1
+ import{jsx as n}from"react/jsx-runtime";import r from"../../../../../components/PostCard.js";import{hidableText as l}from"efficient-easel/draw";import{phHide as i}from"../../scaffold.js";import{PostCardMeta as o,POSTCARD_PH as a}from"../../../../../../format/lib/document/blocks/general/PostCard/meta.js";const g={...o,render:e=>{const t=e.source,d=!!t?.slug;return n(r,{takesViewHide:!0,post:{slug:d?t.slug:"post-card",title:(d?t.title:i(e.title,a.title,e.editor))||"",excerpt:(d?t.dek:i(e.excerpt,a.excerpt,e.editor))||"",cover:(d?t.image:e.image)||"",meta:i(e.category,a.category,e.editor)||void 0,dateLabel:(d?t.date:i(e.date,a.date,e.editor))||void 0,publishedAt:(d?t.publishedAt:void 0)||void 0,read:i(e.readLabel,a.readLabel,e.editor)||void 0},href:(d?t.href:l(e.href))||void 0,layout:e.layout,showCover:e.showCover,placement:e.placement,darken:e.darken,darkenStyle:e.darkenStyle,minHeight:e.minHeight,scaffold:!!e.editor?.isEditing&&!d})}};export{g as PostCardRender};
@@ -1 +1 @@
1
- import{phoneKey as K}from"efficient-easel/draw";import{SITE_SIDE as Y}from"efficient-easel/screen/lib/content/length-units";import{finiteNumber as r}from"../../../../../format/lib/finite-number.js";import{splitImageOverlay as x}from"../../../../../format/lib/document/blocks/general/Split/meta.js";import{INTRO_SIZE_UNIT_KEYS as j,introSizeUnitsOf as w}from"../../../../../format/lib/content/section-type-size.js";import{PART_UNIT_KEY_OF as T}from"../../part-styles.js";import{parseIntroBleedLayout as X}from"../../../../../format/lib/sections/intro-bleed-layout.js";import{fluidToken as G,token as n}from"./section-head-looks.js";import{labelStyle as q}from"../../../../../format/lib/document/seed-parts.js";import{BUTTON as c,DIM as B,DROP_COMMON as p,DROP_SIDE_PADDING as H,INNER_BOX as i,NO_PAD as u,NUMBER_TEXT as Z,SAME_KEYS as y,SECTION_BOX as m,TEXT as b,fillFrom as M,lineSides as a,pictureCell as O,siteGutterOf as A,smallText as s,wrapperPad as v,wrapperPadKeys as I}from"./section-to-box-row-parts.js";const _=(e,t,o)=>{const k=r(e),f=r(t),S=(V,g)=>g&&g!=="px"?{[V]:g}:{};return{...k===void 0?{}:{size:k,...S(T.size,o?.desktop)},...f===void 0?{}:{sizePhone:f,...S(T.sizePhone,o?.phone)}}},$=e=>X(e.layout)==="stacked",E=e=>Math.min(Math.max(r(e.overlay)??60,0),100),d=e=>r(e)??100,J={textStyle:"heading-1",sizeToken:{...G("headingLarge",48,7,96).sizeToken,pxPhone:36},weight:500,lineHeight:.95,letterSpacing:-.03},Q=[s("eyebrow",n("label",14)),...[!0,!1].map(e=>({kind:"text",key:"title",role:"heading",props:b,style:{...J,case:e?"upper":"none"},styleFrom:t=>{const o=w(t);return _(t.titleSizeDesktop,t.titleSizeMobile,{desktop:o.titleDesktop,phone:o.titleMobile})},when:t=>t.uppercase===!0===e})),{kind:"text",key:"body",props:{...B,maxWidth:560},style:{textStyle:"body-1",...n("body",17,16),lineHeight:1.6,paragraphSpacing:24},styleFrom:e=>{const t=w(e);return _(e.bodySizeDesktop,e.bodySizeMobile,{desktop:t.bodyDesktop,phone:t.bodyMobile})}},{kind:"group",name:"Button",props:{...i,align:"start",sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:c}]}],D=e=>`${e}: a Button block has no colour of its own (it follows the site Button colour, as the old fallback did); 0 of 3 live US nodes store one (CLI read, 2026-11-03)`,ee=()=>({name:"Scroll-Over Text",skip:e=>$(e)?"the stacked layout: its words row's height floor (`copyShare*`) and the header subtraction have no Box setting; 0 live US nodes":void 0,boxProps:e=>({...m,direction:"column",justify:"center",align:"start",gap:24,gapPhone:24,share:"content",...u,placement:"left",darken:E(e),darkenStyle:"even",sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:d(e.heightDesktop),sectionHeightModePhone:"fixed",sectionHeightUnitPhone:"%",sectionHeightValuePhone:d(e.heightMobile)}),box:[...y.filter(e=>!String(typeof e=="string"?e:e[0]).startsWith("sectionHeight")),["imageSrc","bgImage"],["imageSrcMobile","bgImagePhone"],["overlay","darken",(e,t)=>E(t)],["heightDesktop","sectionHeightValue",e=>d(e)],["heightMobile","sectionHeightValuePhone",e=>d(e)]],parts:Q,drop:{uppercase:"not a value of its own: it picks the heading part — Case Upper when on, None (as typed) when off",layout:"not a value of its own: the overlay layout is this tree; a stacked node is skipped (`skip`)",copyShareDesktop:"the stacked layout's words-row floor, read only there; a stacked node is skipped",copyShareMobile:"the stacked layout's words-row floor, read only there; a stacked node is skipped",sticky:"the old pin key, read as `stickTop` by the section pin's one reader (lib/content/section-sticky); the Box keeps a stored `stickTop` (SAME_KEYS), and this row is switched off until the stored pages hold `stickTop`",titleSizeDesktop:"read by the heading part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",titleSizeMobile:"read by the heading part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",bodySizeDesktop:"read by the words part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",bodySizeMobile:"read by the words part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",...Object.fromEntries(j.map(e=>[e,"read by its part's `styleFrom`: the unit of that view's Size"])),buttonColor:D("Button color"),buttonTextColor:D("Button text color"),...p}}),N={textStyle:"heading-2",...n("headingMedium",56,36),weight:400,lineHeight:1.05,letterSpacing:-.03},te={textStyle:"body-1",...n("body",16),lineHeight:1.7},z=e=>({kind:"text",key:"body",props:{...B,maxWidth:520},style:{...te,paragraphSpacing:e}}),l={top:0,bottom:0,topPhone:0,bottomPhone:0},P=(e,t)=>typeof e.sectionHeightMode=="string"&&e.sectionHeightMode!=="auto"?{}:{sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:t,sectionHeightModePhone:"auto"},oe=(e,t)=>{const o=P(e,t);return Object.keys(o).length?o:{sectionHeightMode:e.sectionHeightMode,...e.sectionHeightValue===void 0?{}:{sectionHeightValue:e.sectionHeightValue},...e.sectionHeightUnit===void 0?{}:{sectionHeightUnit:e.sectionHeightUnit},sectionHeightModePhone:"auto"}},U={boxShapePhone:"landscape"},R="needs a black-and-white setting on a Box picture (the old photograph followed it, else the site's Photography); 0 live US nodes store it (CLI read, 2026-11-03)",ne=(e,t)=>({[e]:t,[K(e)]:t}),ie={textStyle:"heading-2",...n("headingMedium",40),weight:500,case:"none",lineHeight:1,letterSpacing:-.02},F=e=>(Array.isArray(e.stats)?e.stats:[]).filter(t=>t&&(String(t.value??"").trim()!==""||String(t.label??"").trim()!=="")),re=()=>({name:"Brand Text",boxProps:(e,t)=>({...m,...M("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...v(e,l),...P(e,100)}),box:[...y,...I(l)],parts:[{kind:"group",name:"Words",props:()=>({...i,justify:"center",gap:28,gapPhone:28,sectionBorder:a({right:1}),sectionBorderPhone:a({}),...u,sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60,sectionPaddingRight:Y}),parts:[s("eyebrow",n("label",14)),{kind:"text",key:"heading",role:"heading",props:b,style:{...N,case:"none"},mark:"accentItalic"},z(28),{kind:"group",name:"Stats",props:{...i,sectionPaddingTop:16,sectionPaddingTopPhone:16},parts:[{kind:"group",name:"Figures",props:e=>({...i,direction:"row",share:"equal",gap:24,gapPhone:24,maxWidth:520,phoneRow:Math.min(Math.max(F(e).length,1),3),...ne("sectionBorder",a({top:1})),sectionPaddingTop:28,sectionPaddingTopPhone:28}),parts:[{kind:"list",key:"stats",name:"Stat",of:F,props:{...i,gap:4,gapPhone:4},parts:[{kind:"text",key:"value",props:Z,style:ie},s("label",{...n("label",13),color:"labels",letterSpacing:.2})]}]}]}]},O("Picture","imageSrc",U)],drop:{...p,grayscale:R,...H}}),h=e=>{const t=e.textAlign==="center"||e.textAlign==="right"?{align:e.textAlign}:{},o=e.textAlignPhone==="left"||e.textAlignPhone==="center"||e.textAlignPhone==="right"?{alignPhone:e.textAlignPhone}:{};return{...t,...o}},ae=e=>e.textAlign==="center"?"center":e.textAlign==="right"?"end":"stretch",se=e=>Math.min(Math.max(r(e.overlay)??60,0),100),L=e=>typeof e=="string"&&e.trim()!=="",de={...c,align:"center",alignPhone:"center",buttonFillOpacity:0,buttonBorder:{width:1},buttonPaddingTop:16,buttonPaddingRight:28,buttonPaddingBottom:16,buttonPaddingLeft:28,buttonPaddingTopPhone:12,buttonPaddingRightPhone:20,buttonPaddingBottomPhone:12,buttonPaddingLeftPhone:20},C=e=>({...O("Picture","imageSrc",(t,o)=>({...L(t.imageSrc)&&x(t.imageOverlay)>0?{darken:x(t.imageOverlay),darkenStyle:"even"}:{},placement:"center",...U,sectionBorder:a(e?{left:1}:{right:1}),...W(e?"left":"right",A(o))}),[{kind:"button",key:"imageBtnText",href:"imageBtnHref",variant:"ghost",props:de,style:{...q(13,12),letterSpacing:.18}}]),when:t=>t.reverse===!0===e}),W=(e,t)=>{const o=Math.max(60-t,0);return{sectionPaddingLeft:e==="left"?60:o,sectionPaddingRight:e==="right"?60:o}},le={kind:"group",name:"Words",props:(e,t)=>{const o=e.reverse===!0;return{...i,justify:"center",align:ae(e),placement:e.textAlign==="center"?"center":e.textAlign==="right"?"right":"left",...oe(e,72),gap:24,gapPhone:24,...L(e.textBgSrc)?{darken:se(e),darkenStyle:"even"}:{},...u,sectionPaddingTop:100,sectionPaddingBottom:100,...W(o?"right":"left",A(t)),sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60}},box:[["textBgSrc","bgImage"]],parts:[{...s("eyebrow",n("label",14)),styleFrom:h},{kind:"text",key:"title",role:"heading",props:b,style:N,styleFrom:e=>({case:e.uppercase===!0?"upper":"none",...h(e)})},{...z(24),styleFrom:h},{kind:"group",name:"Button",props:{...i,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>{const t=h(e);return{...c,...t.align?{align:t.align}:{},...t.alignPhone?{alignPhone:t.alignPhone}:{}}}}]}]},he=()=>({name:"Image & Text Split",boxProps:(e,t)=>({...m,...M("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...v(e,l),...P(e,72)}),box:[...y,...I(l)],parts:[C(!1),le,C(!0)],drop:{reverse:"not a value of its own: it picks the order — the Picture Box first, or after the Words",uppercase:"not a value of its own: the heading part's Case — Upper when on, None (as typed) when off",textAlign:"read by each words part (its Align) and the Words Box (its Align); left writes nothing, as the old emitted no class",textAlignPhone:"read by each words part as its phone Align",textAlignTablet:"not carried to the words part's own tablet Align (`alignTablet`) yet: no old node stores it (new with the Tablet view's Text alignment row, 0 stored on the US sites 2026-11-06), so nothing moves",overlay:"read by the Words Box: its Darken over the words picture (60 when unset); no picture, no wash",imageOverlay:"read by the Picture Box: its Darken over the image column's picture (40 when unset, none at 0); no picture, no wash",grayscale:R,...p,...H}}),Se={IntroBleed:ee(),Manifesto:re(),Split:he()};export{Se as EDITORIAL_SECTION_TO_BOX};
1
+ import{phoneKey as K}from"efficient-easel/draw";import{SITE_SIDE as X}from"efficient-easel/screen/lib/content/length-units";import{finiteNumber as r}from"../../../../../format/lib/finite-number.js";import{BLOCK_ALIGN_BOX_WORD as Y}from"../../../../../format/lib/content/block-align.js";import{splitImageOverlay as x}from"../../../../../format/lib/document/blocks/general/Split/meta.js";import{INTRO_SIZE_UNIT_KEYS as j,introSizeUnitsOf as w}from"../../../../../format/lib/content/section-type-size.js";import{PART_UNIT_KEY_OF as T}from"../../part-styles.js";import{parseIntroBleedLayout as G}from"../../../../../format/lib/sections/intro-bleed-layout.js";import{fluidToken as q,token as n}from"./section-head-looks.js";import{labelStyle as Z}from"../../../../../format/lib/document/seed-parts.js";import{BUTTON as c,DIM as B,DROP_COMMON as p,DROP_SIDE_PADDING as H,INNER_BOX as i,NO_PAD as u,NUMBER_TEXT as $,SAME_KEYS as m,SECTION_BOX as y,TEXT as b,fillFrom as O,lineSides as a,pictureCell as A,siteGutterOf as M,smallText as s,wrapperPad as v,wrapperPadKeys as _}from"./section-to-box-row-parts.js";const I=(e,t,o)=>{const k=r(e),f=r(t),S=(V,g)=>g&&g!=="px"?{[V]:g}:{};return{...k===void 0?{}:{size:k,...S(T.size,o?.desktop)},...f===void 0?{}:{sizePhone:f,...S(T.sizePhone,o?.phone)}}},J=e=>G(e.layout)==="stacked",E=e=>Math.min(Math.max(r(e.overlay)??60,0),100),d=e=>r(e)??100,Q={textStyle:"heading-1",sizeToken:{...q("headingLarge",48,7,96).sizeToken,pxPhone:36},weight:500,lineHeight:.95,letterSpacing:-.03},ee=[s("eyebrow",n("label",14)),...[!0,!1].map(e=>({kind:"text",key:"title",role:"heading",props:b,style:{...Q,case:e?"upper":"none"},styleFrom:t=>{const o=w(t);return I(t.titleSizeDesktop,t.titleSizeMobile,{desktop:o.titleDesktop,phone:o.titleMobile})},when:t=>t.uppercase===!0===e})),{kind:"text",key:"body",props:{...B,maxWidth:560},style:{textStyle:"body-1",...n("body",17,16),lineHeight:1.6,paragraphSpacing:24},styleFrom:e=>{const t=w(e);return I(e.bodySizeDesktop,e.bodySizeMobile,{desktop:t.bodyDesktop,phone:t.bodyMobile})}},{kind:"group",name:"Button",props:{...i,align:"start",sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:c}]}],D=e=>`${e}: a Button block has no colour of its own (it follows the site Button colour, as the old fallback did); 0 of 3 live US nodes store one (CLI read, 2026-11-03)`,te=()=>({name:"Scroll-Over Text",skip:e=>J(e)?"the stacked layout: its words row's height floor (`copyShare*`) and the header subtraction have no Box setting; 0 live US nodes":void 0,boxProps:e=>({...y,direction:"column",justify:"center",align:"start",gap:24,gapPhone:24,share:"content",...u,placement:"left",darken:E(e),darkenStyle:"even",sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:d(e.heightDesktop),sectionHeightModePhone:"fixed",sectionHeightUnitPhone:"%",sectionHeightValuePhone:d(e.heightMobile)}),box:[...m.filter(e=>!String(typeof e=="string"?e:e[0]).startsWith("sectionHeight")),["imageSrc","bgImage"],["imageSrcMobile","bgImagePhone"],["overlay","darken",(e,t)=>E(t)],["heightDesktop","sectionHeightValue",e=>d(e)],["heightMobile","sectionHeightValuePhone",e=>d(e)]],parts:ee,drop:{uppercase:"not a value of its own: it picks the heading part — Case Upper when on, None (as typed) when off",layout:"not a value of its own: the overlay layout is this tree; a stacked node is skipped (`skip`)",copyShareDesktop:"the stacked layout's words-row floor, read only there; a stacked node is skipped",copyShareMobile:"the stacked layout's words-row floor, read only there; a stacked node is skipped",sticky:"the old pin key, read as `stickTop` by the section pin's one reader (lib/content/section-sticky); the Box keeps a stored `stickTop` (SAME_KEYS), and this row is switched off until the stored pages hold `stickTop`",titleSizeDesktop:"read by the heading part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",titleSizeMobile:"read by the heading part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",bodySizeDesktop:"read by the words part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",bodySizeMobile:"read by the words part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",...Object.fromEntries(j.map(e=>[e,"read by its part's `styleFrom`: the unit of that view's Size"])),buttonColor:D("Button color"),buttonTextColor:D("Button text color"),...p}}),N={textStyle:"heading-2",...n("headingMedium",56,36),weight:400,lineHeight:1.05,letterSpacing:-.03},oe={textStyle:"body-1",...n("body",16),lineHeight:1.7},z=e=>({kind:"text",key:"body",props:{...B,maxWidth:520},style:{...oe,paragraphSpacing:e}}),l={top:0,bottom:0,topPhone:0,bottomPhone:0},P=(e,t)=>typeof e.sectionHeightMode=="string"&&e.sectionHeightMode!=="auto"?{}:{sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:t,sectionHeightModePhone:"auto"},ne=(e,t)=>{const o=P(e,t);return Object.keys(o).length?o:{sectionHeightMode:e.sectionHeightMode,...e.sectionHeightValue===void 0?{}:{sectionHeightValue:e.sectionHeightValue},...e.sectionHeightUnit===void 0?{}:{sectionHeightUnit:e.sectionHeightUnit},sectionHeightModePhone:"auto"}},R={boxShapePhone:"landscape"},U="needs a black-and-white setting on a Box picture (the old photograph followed it, else the site's Photography); 0 live US nodes store it (CLI read, 2026-11-03)",ie=(e,t)=>({[e]:t,[K(e)]:t}),re={textStyle:"heading-2",...n("headingMedium",40),weight:500,case:"none",lineHeight:1,letterSpacing:-.02},F=e=>(Array.isArray(e.stats)?e.stats:[]).filter(t=>t&&(String(t.value??"").trim()!==""||String(t.label??"").trim()!=="")),ae=()=>({name:"Brand Text",boxProps:(e,t)=>({...y,...O("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...v(e,l),...P(e,100)}),box:[...m,..._(l)],parts:[{kind:"group",name:"Words",props:()=>({...i,justify:"center",gap:28,gapPhone:28,sectionBorder:a({right:1}),sectionBorderPhone:a({}),...u,sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60,sectionPaddingRight:X}),parts:[s("eyebrow",n("label",14)),{kind:"text",key:"heading",role:"heading",props:b,style:{...N,case:"none"},mark:"accentItalic"},z(28),{kind:"group",name:"Stats",props:{...i,sectionPaddingTop:16,sectionPaddingTopPhone:16},parts:[{kind:"group",name:"Figures",props:e=>({...i,direction:"row",share:"equal",gap:24,gapPhone:24,maxWidth:520,phoneRow:Math.min(Math.max(F(e).length,1),3),...ie("sectionBorder",a({top:1})),sectionPaddingTop:28,sectionPaddingTopPhone:28}),parts:[{kind:"list",key:"stats",name:"Stat",of:F,props:{...i,gap:4,gapPhone:4},parts:[{kind:"text",key:"value",props:$,style:re},s("label",{...n("label",13),color:"labels",letterSpacing:.2})]}]}]}]},A("Picture","imageSrc",R)],drop:{...p,grayscale:U,...H}}),h=e=>{const t=e.textAlign==="center"||e.textAlign==="right"?{align:e.textAlign}:{},o=e.textAlignPhone==="left"||e.textAlignPhone==="center"||e.textAlignPhone==="right"?{alignPhone:e.textAlignPhone}:{};return{...t,...o}},se=e=>e.textAlign==="center"||e.textAlign==="right"?Y[e.textAlign]:"stretch",de=e=>Math.min(Math.max(r(e.overlay)??60,0),100),L=e=>typeof e=="string"&&e.trim()!=="",le={...c,align:"center",alignPhone:"center",buttonFillOpacity:0,buttonBorder:{width:1},buttonPaddingTop:16,buttonPaddingRight:28,buttonPaddingBottom:16,buttonPaddingLeft:28,buttonPaddingTopPhone:12,buttonPaddingRightPhone:20,buttonPaddingBottomPhone:12,buttonPaddingLeftPhone:20},C=e=>({...A("Picture","imageSrc",(t,o)=>({...L(t.imageSrc)&&x(t.imageOverlay)>0?{darken:x(t.imageOverlay),darkenStyle:"even"}:{},placement:"center",...R,sectionBorder:a(e?{left:1}:{right:1}),...W(e?"left":"right",M(o))}),[{kind:"button",key:"imageBtnText",href:"imageBtnHref",variant:"ghost",props:le,style:{...Z(13,12),letterSpacing:.18}}]),when:t=>t.reverse===!0===e}),W=(e,t)=>{const o=Math.max(60-t,0);return{sectionPaddingLeft:e==="left"?60:o,sectionPaddingRight:e==="right"?60:o}},he={kind:"group",name:"Words",props:(e,t)=>{const o=e.reverse===!0;return{...i,justify:"center",align:se(e),placement:e.textAlign==="center"?"center":e.textAlign==="right"?"right":"left",...ne(e,72),gap:24,gapPhone:24,...L(e.textBgSrc)?{darken:de(e),darkenStyle:"even"}:{},...u,sectionPaddingTop:100,sectionPaddingBottom:100,...W(o?"right":"left",M(t)),sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60}},box:[["textBgSrc","bgImage"]],parts:[{...s("eyebrow",n("label",14)),styleFrom:h},{kind:"text",key:"title",role:"heading",props:b,style:N,styleFrom:e=>({case:e.uppercase===!0?"upper":"none",...h(e)})},{...z(24),styleFrom:h},{kind:"group",name:"Button",props:{...i,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>{const t=h(e);return{...c,...t.align?{align:t.align}:{},...t.alignPhone?{alignPhone:t.alignPhone}:{}}}}]}]},ge=()=>({name:"Image & Text Split",boxProps:(e,t)=>({...y,...O("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...v(e,l),...P(e,72)}),box:[...m,..._(l)],parts:[C(!1),he,C(!0)],drop:{reverse:"not a value of its own: it picks the order — the Picture Box first, or after the Words",uppercase:"not a value of its own: the heading part's Case — Upper when on, None (as typed) when off",textAlign:"read by each words part (its Align) and the Words Box (its Align); left writes nothing, as the old emitted no class",textAlignPhone:"read by each words part as its phone Align",textAlignTablet:"not carried to the words part's own tablet Align (`alignTablet`) yet: no old node stores it (new with the Tablet view's Text alignment row, 0 stored on the US sites 2026-11-06), so nothing moves",overlay:"read by the Words Box: its Darken over the words picture (60 when unset); no picture, no wash",imageOverlay:"read by the Picture Box: its Darken over the image column's picture (40 when unset, none at 0); no picture, no wash",grayscale:U,...p,...H}}),we={IntroBleed:te(),Manifesto:ae(),Split:ge()};export{we as EDITORIAL_SECTION_TO_BOX};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-web-builder",
3
- "version": "69.0.0",
3
+ "version": "69.2.0",
4
4
  "description": "The EFFICIENT website builder: the website editor, the general sections and the renderer that draws them, compiled. Hostable by any EFFICIENT product; nothing here imports a host.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",
@@ -73,7 +73,7 @@
73
73
  "@types/node": "^20",
74
74
  "@types/react": "^19",
75
75
  "@types/react-dom": "^19",
76
- "efficient-easel": "^34.3.0",
76
+ "efficient-easel": "^34.3.2",
77
77
  "efficient-shell": "^13.3.0",
78
78
  "efficient-shell-checker": "npm:efficient-shell@12.37.0",
79
79
  "esbuild": "^0.28.0",