efficient-web-builder 69.3.0 → 69.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/dist/editor/components/StandaloneSectionEditor.js +1 -1
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +19 -0
- package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +9 -1
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/host-document-bridge.js +1 -1
- package/dist/editor/lib/sections/city-presets.d.ts +1 -1
- package/dist/editor/lib/sections/city-presets.js +1 -1
- package/dist/editor/lib/sections/hero-ticker-to-strip.js +1 -1
- package/dist/editor/lib/sections/insert-box-path.d.ts +8 -0
- package/dist/editor/lib/sections/insert-box-path.js +1 -0
- package/dist/editor/lib/sections/menu-presets.d.ts +2 -0
- package/dist/editor/lib/sections/menu-presets.js +1 -0
- package/dist/format/lib/content/card-row-keys.d.ts +5 -0
- package/dist/format/lib/content/card-row-keys.js +1 -0
- package/dist/format/lib/content/card-template.d.ts +1 -6
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/picture-focus-rows.js +1 -1
- package/dist/format/lib/document/article-body-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/CardList/item-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/Cards/card-seed.d.ts +2 -1
- package/dist/format/lib/document/blocks/general/Cards/card-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/FAQ/card-seed.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/FAQ/card-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/Footprint/card-seed.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/Footprint/card-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/HeroSingle/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/HeroSlide/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Logos/card-seed.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/Logos/card-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/OrderSummary/block-type.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/OrderSummary/block-type.js +1 -0
- package/dist/format/lib/document/blocks/general/ProcessSteps/row-seed.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/ProcessSteps/row-seed.js +1 -1
- package/dist/format/lib/document/cap-hero-groups.js +1 -1
- package/dist/format/lib/document/card-content-switch.js +1 -1
- package/dist/format/lib/document/cards-template-on-read.js +1 -1
- package/dist/format/lib/document/media-manifest.json +2 -1
- package/dist/format/lib/document/node-lists.d.ts +1 -0
- package/dist/format/lib/document/node-lists.js +1 -1
- package/dist/format/lib/document/renamed-props.js +1 -1
- package/dist/format/lib/document/section-catalog.js +19 -3
- package/dist/format/lib/document/seed-parts.d.ts +3 -0
- package/dist/format/lib/document/seed-parts.js +1 -1
- package/dist/format/lib/editor-words-kept.js +1 -1
- package/dist/format/lib/hero-media-layout.d.ts +12 -0
- package/dist/format/lib/hero-media-layout.js +1 -1
- package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
- package/dist/format/lib/source-rules/editor-words.js +1 -1
- package/dist/format/lib/source-rules/no-glyph-rows.js +4 -4
- package/dist/format/lib/source-rules/one-node-list-loop.d.ts +6 -0
- package/dist/format/lib/source-rules/one-node-list-loop.js +1 -0
- package/dist/format/lib/source-rules/one-node-list.js +1 -1
- package/dist/format/lib/source-rules/one-seed-id-home.d.ts +6 -0
- package/dist/format/lib/source-rules/one-seed-id-home.js +1 -0
- package/dist/format/lib/source-rules/page-picture-place.js +3 -3
- package/dist/format/lib/source-rules/reduced-motion.js +8 -8
- package/dist/format/lib/source-rules/support/css-length.js +1 -1
- package/dist/format/lib/source-rules/support/css-rules.js +1 -1
- package/dist/format/lib/source-rules/support/label-extraction.js +5 -5
- package/dist/format/lib/source-rules/support/ts-source.js +3 -3
- package/dist/render/components/HeroSingle.d.ts +2 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.d.ts +2 -1
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/hero-media-parts.d.ts +6 -4
- package/dist/render/lib/document/hero-media-parts.js +1 -1
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BOX_TYPE as
|
|
1
|
+
import{BOX_TYPE as a,CONTAINER_BLOCKS_SLOT as l}from"../../../container-blocks.js";import{DIM as h,INNER_BOX as s,TEXT as c,boxPadding as p,labelLook as N,seedNodes as E,token as u,seedNodeId as L}from"../../../seed-parts.js";import{listBesideMap as D}from"../../../../content/list-position.js";import{shapeKeyOf as d}from"../../../seed-shape.js";import{rowFieldTextSeed as r}from"../Cards/card-seed.js";import{BOX_HIDE_WHEN_ROW_EMPTY as B,CARD_ROW_FIELD_PROP as C,CARD_ROW_LINK_PROP as R,CARD_TEMPLATE_SLOT as o}from"../../../../content/card-row-keys.js";import{DEALERS_SOURCE as K,declaredBlockSource as k}from"../../../../content/block-sources.js";const P="Footprint",F=e=>k(e)===K,g=N(11),H={textStyle:"body-1",...u("body",18),weight:500,lineHeight:1.2},V=()=>({type:a,props:{...s,gap:8,gapPhone:8,...p(20,24,20,20),name:"Office"},slots:{[l]:[r("badge",{...c,tag:"p",widthFit:"fill"},g,!0),r("role",{...c,tag:"p",widthFit:"fill"},g,!0),r("city",{...c,tag:"p",widthFit:"fill"},H),r("country",{...h,tag:"p",widthFit:"fill"},g),r("address",{...h,tag:"p",widthFit:"fill"},g),{type:"ButtonBlock",props:{variant:"link",label:"",href:"",[C]:"linkLabel",[R]:"href"}}]}}),b={textStyle:"body-1",fontRole:"heading",...u("body",16),weight:500,lineHeight:1.25},O={textStyle:"body-1",...u("body",14),lineHeight:1.5},$=()=>({type:a,props:{...s,gap:4,gapPhone:4,...p(16,4),sectionBorder:{bottom:1},name:"Office"},slots:{[l]:[r("city",{...c,tag:"p",widthFit:"fill"},b),r("address",{...h,tag:"p",widthFit:"fill"},O),r("phone",{...h,tag:"p",widthFit:"fill"},O)]}});function S(e){const t=L(e,P);let n=0;return E([$()],i=>i===a?`${t}~office`:`${t}~office.${n++}`)}function T(e){return Array.isArray(e[o])&&e[o].length>0&&d(e[o])===d(S(e))}const x=e=>e===void 0||Array.isArray(e)&&e.length===0;function A(e){return D(e.listPosition)?!x(e[o])||F(e)?e:{...e,[o]:S(e)}:T(e)?{...e,[o]:[]}:e}const M=b,Y=O,W={textFit:"line"},y=(e,t,n="",i={},w={})=>{const f=r(e,{...t?h:c,tag:"p",...i},{...Y,...w});return n?{...f,props:{...f.props,[R]:n}}:f},m=(e,t,n,i)=>({type:a,props:{...s,gap:0,gapPhone:0,[B]:[e],name:i},slots:{[l]:[y(e,t,n,W,{align:"right"})]}}),X=e=>({type:a,props:{...s,direction:"row",justify:"between",share:"content",phoneRow:2,sharePhone:"content",wrapPhone:"nowrap",gap:12,gapPhone:12,...e?p(20,24):{...p(16,4),sectionBorder:{bottom:1}},name:"Dealer"},slots:{[l]:[{type:a,props:{...s,justify:"center",gap:0,gapPhone:0,widthFit:"fill",name:"Dealer words"},slots:{[l]:[{type:a,props:{...s,gap:4,gapPhone:4,widthFit:"fill",name:"Dealer name"},slots:{[l]:[r("name",{...c,tag:"p",widthFit:"fill"},M),y("address",!0)]}},y("place",!0,"",{widthFit:"fill"})]}},{type:a,props:{...s,align:"end",gap:4,gapPhone:4,name:"Dealer contact"},slots:{[l]:[m("distance",!0,"","Dealer distance"),m("phone",!1,"phoneHref","Dealer phone"),m("website",!1,"websiteHref","Dealer website")]}}]}}),U=e=>{const t=X(e),n={type:a,props:{...s,...p(0,12),name:"Dealer"},slots:{[l]:[{...t,props:{...t.props,name:"Dealer row"}}]}};return e?t:n};function _(e,t){const n=L(e,P);let i=0;return E([U(t)],(w,f)=>f==="0"?`${n}~dealer`:`${n}~dealer.${i++}`)}function I(e){if(!Array.isArray(e[o])||e[o].length===0)return!1;const t=d(e[o]);return t===d(_(e,!0))||t===d(_(e,!1))}function Z(e){if(F(e)){const i=_(e,!D(e.listPosition));return!(x(e[o])||T(e)||I(e))||d(e[o]??[])===d(i)?e:{...e,[o]:i}}if(!I(e))return A(e);const t={...e,[o]:[]};return A(t)}export{P as FOOTPRINT_TYPE,V as footprintCardSeed,U as footprintDealerCardSeed,$ as footprintSideCardSeed,T as isUntouchedFootprintSideRow,Z as withFootprintListTemplate,A as withFootprintSideTemplate};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FOCAL_DEFAULT as e}from"efficient-shell/format";import{DEFAULT_OVERLAY_POSITION as r}from"../../../../sections/hero-overlay.js";import{DEFAULT_TINT as o}from"../../../../content/tint.js";const
|
|
1
|
+
import{FOCAL_DEFAULT as e}from"efficient-shell/format";import{DEFAULT_OVERLAY_POSITION as r}from"../../../../sections/hero-overlay.js";import{DEFAULT_TINT as o}from"../../../../content/tint.js";import{HERO_ABSENT_MEDIA_TYPE as t,HERO_FOCUS as i}from"../../../../hero-media-layout.js";const l={boxes:{type:"slot",allow:["HeroGroup"]}},n={label:"Hero Single",drawsPictures:!0,fields:l,defaultProps:{mediaType:t.HeroSingle,[i.image]:e,tintColor:o,tintOpacity:0,overlay:100,overlayColor:o,overlayPosition:r}};export{n as HeroSingleMeta,l as HeroSingleSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FOCAL_DEFAULT as o}from"efficient-shell/format";import{DEFAULT_TINT as e}from"../../../../content/tint.js";const
|
|
1
|
+
import{FOCAL_DEFAULT as o}from"efficient-shell/format";import{DEFAULT_TINT as e}from"../../../../content/tint.js";import{HERO_ABSENT_MEDIA_TYPE as r,HERO_FOCUS as l}from"../../../../hero-media-layout.js";const t={groups:{type:"slot",allow:["HeroGroup"]}},m={label:"Hero Slide",fields:t,defaultProps:{mediaType:r.HeroSlide,videoSpeed:100,[l.image]:o,tintColor:e,overlay:0}};export{m as HeroSlideMeta,t as HeroSlideSlots};
|
|
@@ -2,6 +2,7 @@ import { type BlockSeed } from "../../../seed-parts.js";
|
|
|
2
2
|
type Props = Record<string, unknown>;
|
|
3
3
|
export declare const LOGOS_CARD_FIELD = "label";
|
|
4
4
|
export declare const logosCardSeed: () => BlockSeed;
|
|
5
|
+
export declare const LOGOS_TYPE = "Logos";
|
|
5
6
|
export declare function withLogosTemplate(props: Props): Props;
|
|
6
7
|
export declare function seedLogosTemplate(props: Props): Props;
|
|
7
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{declaredBlockSource as
|
|
1
|
+
import{declaredBlockSource as r}from"../../../../content/block-sources.js";import{CARD_ROW_FIELD_PROP as l,CARD_TEMPLATE_SLOT as t}from"../../../../content/card-row-keys.js";import{seedNodes as i,seedNodeId as c,withSeededSlot as m}from"../../../seed-parts.js";const L="label",a=()=>({type:"LogoBlock",props:{[l]:L}}),n="Logos",d=e=>i([a()],()=>`${e}~logo`);function _(e){return r(e)?m(e,t,n,d):e}function g(e){if(!r(e))return e;const o=e[t];return o!==void 0&&!(Array.isArray(o)&&o.length===0)?e:{...e,[t]:d(c(e,n))}}export{L as LOGOS_CARD_FIELD,n as LOGOS_TYPE,a as logosCardSeed,g as seedLogosTemplate,_ as withLogosTemplate};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ORDER_SUMMARY_TYPE = "OrderSummary";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const r="OrderSummary";export{r as ORDER_SUMMARY_TYPE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CARD_LIST_TYPE as c,CARD_ROW_FIELD_PROP as m}from"../../../../content/card-
|
|
1
|
+
import{CARD_LIST_TYPE as c,CARD_ROW_FIELD_PROP as m}from"../../../../content/card-row-keys.js";import{BOX_TYPE as r,CONTAINER_BLOCKS_SLOT as s}from"../../../container-blocks.js";import{DIM as l,INNER_BOX as a,TEXT as g,labelStyle as d,seedNodes as P,token as T,slotSeedIds as _}from"../../../seed-parts.js";import{rowFieldTextSeed as p}from"../Cards/card-seed.js";import{withCardListTemplate as f}from"../CardList/item-seed.js";import{isNodeList as E}from"efficient-easel/data";const b="ProcessSteps",u={eyebrow:"eyebrow",title:"title",copy:"copy",image:"image",tag:"tag",specs:"specs"},e=u,w=()=>({type:r,props:{...a,name:"Row",direction:"row",share:"equal",align:"center",gap:48,sectionPaddingTop:60,sectionPaddingBottom:60,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60},slots:{[s]:[{type:r,props:{...a,name:"Picture",direction:"column",gap:12},slots:{[s]:[{type:"ImageBlock",props:{[m]:e.image,aspect:"1/1",fit:"contain"}},p(e.tag,{...l,tag:"p"},d(11))]}},{type:r,props:{...a,name:"Words",direction:"column",gap:16},slots:{[s]:[p(e.eyebrow,{...g,tag:"p"},{...d(13),color:"accent"}),p(e.title,{...g,tag:"h2"},{textStyle:"heading-2",...T("headingMedium",42,28),lineHeight:1.1,letterSpacing:-.02}),p(e.copy,{...l,tag:"p"},{textStyle:"body-1",...T("body",15),lineHeight:1.6}),{type:c,props:{[m]:e.specs}}]}}]}});function y(i){return i.map(o=>{let t=o.props;for(const[S,n]of Object.entries(t))E(n)&&(t={...t,[S]:y(n)});return o.type===c?{...o,props:f(t)}:{...o,props:t}})}function B(i){return y(P([w()],_(i,"row")))}export{u as IMAGE_TEXT_ROW_FIELDS,b as PROCESS_STEPS_TYPE,w as imageTextRowSeed,B as imageTextRowTemplate};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{HERO_GROUP_TYPE as
|
|
1
|
+
import{HERO_GROUP_TYPE as m,HERO_SLIDE_TYPE as a,publishableGroups as u}from"../hero-group-placement.js";import{mapEachNode as n,mapNodeLists as E,mapPageLists as f}from"./node-lists.js";function c(p){return p.props?E(p,r=>{const t=n(r,c),o=p.type===a&&t.every(e=>e.type===m)?u(t):t;return o.length!==r.length||o.some((e,i)=>e!==r[i])?o:r}):p}function _(p){return f(p,s=>n(s,c))}export{_ as capHeroGroups};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DELIVERY_OPTIONS_SOURCE as R,declaredBlockSource as d}from"../content/block-sources.js";import{nonEmptyString as
|
|
1
|
+
import{DELIVERY_OPTIONS_SOURCE as R,declaredBlockSource as d}from"../content/block-sources.js";import{nonEmptyString as v}from"../non-empty-string.js";import{CARD_LIST_TYPE as C,CARD_TEMPLATE_SLOT as f}from"../content/card-template.js";import{find as b,walk as E}from"efficient-easel/data";import{BOX_TYPE as Y,CONTAINER_BLOCKS_SLOT as F}from"./container-blocks.js";import{seedNodes as p,seedNodeId as _}from"./seed-parts.js";import{CARDS_TYPE as P,SERVED_CARD_FIELDS as a,TYPED_CARD_FIELDS as l,cardIdOf as D,cardsCardSeed as y,labelOnlyCardSeed as S}from"./blocks/general/Cards/card-seed.js";import{GRID_LOOK_KEYS as k,cardListCardSeed as m,cardsGridLook as L,deliveryCardSeed as g,deliveryGridLook as h}from"./blocks/general/Cards/card-list-seed.js";import{finiteNumber as G}from"../finite-number.js";import{shapeKeyOf as A}from"./seed-shape.js";const j=()=>"",B=t=>A(p([t],j));function I(t,r,e){if(!Array.isArray(t)||t.length!==1)return null;const o=e.keys??=Object.fromEntries(Object.entries(r()).map(([n,i])=>[n,new Set(i.map(B))])),s=A(t);return Object.keys(o).find(n=>o[n].has(s))??null}const M=()=>({press:[m(l),m(a)],delivery:[g()]}),J={},O=t=>I(t,M,J),V=t=>d(t)===R?"delivery":"press";function st(t,r){if(!r||d(t)===d(r))return t;const e=O(t[f]),o=V(t);if(!e||e===o)return t;const s=_(t,C),n=o==="delivery"?g():m(d(t)?a:l),i=p([n],D(s));return{...t,[f]:i}}const z=()=>({cards:[y(l),y(a)],label:[S(!1),S(!0)]}),H={},U=t=>I(t,z,H);function it(t,r){if(!r||t.cardStyle==="label-only"==(r.cardStyle==="label-only"))return t;const e=U(t[f]),o=t.cardStyle==="label-only"?"label":"cards";if(!e||e===o)return t;const s=_(t,P),n=Array.isArray(t.items)&&t.items.some(K=>v(K?.href)!==void 0),i=o==="label"?S(n):y(d(t)?a:l),c=p([i],D(s));return{...t,[f]:c}}const T=(t,r)=>k.every(e=>JSON.stringify(t[e])===JSON.stringify(r[e]));function N(t,r){const e={...t};for(const o of k)delete e[o];return{...e,...structuredClone(r)}}function w(t){const r=t?.[F];if(!Array.isArray(r)||r.length!==1)return null;const e=r[0];return e?.type===C&&e.props?e:null}function W(t,r){const e=w(t),o=w(r);if(!e?.props||!o?.props||o.props.id!==e.props.id||d(e.props)===d(o.props))return t;const s=O(e.props[f]);if(!s||s===O(o.props[f]))return t;const n=G(t.columns);return n===void 0?t:s==="delivery"&&T(t,L(n))?N(t,h(n)):s==="press"&&T(t,h(n))?N(t,L(n)):t}function ct(t){const r=u.get(t);r?r.count+=1:u.set(t,{count:1,stop:X(t)});let e=!1;return()=>{const o=u.get(t);e||!o||(e=!0,o.count-=1,!(o.count>0)&&(o.stop(),u.delete(t)))}}const u=new WeakMap;function X(t){let r=t.getState().appState.data;return t.subscribe(()=>{const e=t.getState().appState.data;if(e===r)return;const o=r;if(r=e,e===t.loaded)return;const s=new Map;E(e,t.config,n=>{if(n.type!==Y||!w(n.props))return;const i=b(o,t.config,n.props.id);if(!i||i.node===n)return;const c=W(n.props,i.node.props);c!==n.props&&s.set(n.props.id,c)}),s.size&&t.dispatch({type:"setData",recordHistory:!1,data:n=>E(n,t.config,i=>{const c=s.get(i.props.id);return c?{...i,props:{...c,id:i.props.id}}:void 0})})})}export{st as cardFollowsContentSwitch,it as cardsFollowCardStyle,W as cardsGridFollowsContent,ct as followCardContentSwitches};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{declaredBlockSource as
|
|
1
|
+
import{declaredBlockSource as s}from"../content/block-sources.js";import{nonEmptyString as D}from"../non-empty-string.js";import{CARD_ROW_FIELD_PROP as y,CARD_TEMPLATE_SLOT as l}from"../content/card-row-keys.js";import{CONTAINER_BLOCKS_SLOT as A}from"./container-blocks.js";import{CARDS_TYPE as E,SERVED_CARD_FIELDS as d,TYPED_CARD_FIELDS as m,cardIdOf as S,cardsTemplateNodes as C,labelOnlyTemplateNodes as O}from"./blocks/general/Cards/card-seed.js";import{seedNodeId as R}from"./seed-parts.js";function h(e,t){if(e!==E)return t;if(t[l]!==void 0)return T(t);const n=R(t,E),i=S(n);if(t.cardStyle==="label-only"){const o=Array.isArray(t.items)&&t.items.some(r=>D(r?.href)!==void 0);return T({...t,[l]:O(i,o)})}const f=s(t)?d:m;return{...t,[l]:C(i,f)}}const L=e=>{const[t,n]=e?[m,d]:[d,m];return new Map([[t.title,n.title],[t.body,n.body]])};function _(e,t){let n=null;return e.forEach((i,f)=>{const o=i?.props;if(!o)return;let r=o;const c=o[y];i.type==="Text"&&typeof c=="string"&&t.has(c)&&(r={...r,[y]:t.get(c)});const a=o[A];if(Array.isArray(a)){const u=_(a,t);u!==a&&(r={...r,[A]:u})}r!==o&&(n??=[...e],n[f]={...i,props:r})}),n??e}function T(e,t){if(!Array.isArray(e[l]))return e;const n=L(!!s(e)),i=t?new Map([...n].filter(([o,r])=>t(r)&&!t(o))):n;if(!i.size)return e;const f=_(e[l],i);return f===e[l]?e:{...e,[l]:f}}export{T as cardsFieldsFollowContent,h as withCardsTemplate};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"contentHash": "
|
|
2
|
+
"contentHash": "be784d74fee5062d",
|
|
3
3
|
"schema": 1,
|
|
4
4
|
"mediaFields": {
|
|
5
5
|
"ImageBlock": [
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
],
|
|
40
40
|
"HeroSlide": [
|
|
41
41
|
"mediaImage",
|
|
42
|
+
"mediaImage2",
|
|
42
43
|
"mediaVideo",
|
|
43
44
|
"mediaVideoAv1",
|
|
44
45
|
"mediaVideoAv1Phone",
|
|
@@ -6,4 +6,5 @@ export type ListNode = {
|
|
|
6
6
|
export declare function mapEachNode<N>(list: readonly N[], fn: (node: N, index: number) => N): N[];
|
|
7
7
|
export declare function mapNodeLists<N extends ListNode>(node: N, fn: (list: ListNode[], key: string) => ListNode[]): N;
|
|
8
8
|
export declare function mapPageContent<T>(data: T, fn: (content: ListNode[]) => ListNode[]): T;
|
|
9
|
+
export declare function mapPageLists<T>(data: T, fn: (list: ListNode[]) => ListNode[]): T;
|
|
9
10
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isNodeList as p}from"efficient-easel/data";function
|
|
1
|
+
import{isNodeList as p}from"efficient-easel/data";function l(n,r){let t=null;return n.forEach((e,o)=>{const c=r(e,o);c!==e&&((t??=n.slice())[o]=c)}),t??n}function a(n,r){let t=null;for(const[e,o]of Object.entries(n.props??{})){if(!p(o))continue;const c=r(o,e);c!==o&&((t??={...n.props})[e]=c)}return t?{...n,props:t}:n}function f(n,r){const t=n;if(!t||!Array.isArray(t.content))return n;const e=r(t.content);return e===t.content?n:{...t,content:e}}function m(n,r){const t=f(n,r),e=n?.zones;if(!e||typeof e!="object")return t;let o=null;for(const[c,s]of Object.entries(e)){if(!Array.isArray(s))continue;const i=r(s);i!==s&&((o??={...e})[c]=i)}return o?{...t,zones:o}:t}export{l as mapEachNode,a as mapNodeLists,f as mapPageContent,m as mapPageLists};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mapEachNode as
|
|
1
|
+
import{mapEachNode as a,mapNodeLists as d,mapPageLists as m}from"./node-lists.js";import{templateOnRead as u}from"../content/card-template.js";import{BLOCK_SOURCE_PROP as y,declaredBlockSource as O,isBlockSourceKey as P}from"../content/block-sources.js";const R={"Logos.logosPerRow":"columns","HeroSlide.tintOpacity":"overlay","Split.textBgTint":"overlay"},g={"Footprint.source":"typed"};function l(o){let t=o.props,n=!1;if(o.type&&t)for(const[e,r]of Object.entries(R)){const p=e.indexOf("."),i=e.slice(0,p),s=e.slice(p+1);if(i!==o.type||!(s in t))continue;const c=t[s],f={...t};delete f[s],(!(r in f)||f[r]===void 0)&&(f[r]=c),t=f,n=!0}if(o.type&&t)for(const[e,r]of Object.entries(g)){const p=e.indexOf("."),i=e.slice(p+1);if(e.slice(0,p)!==o.type||!(i in t))continue;const s=typeof t[i]=="string"?t[i].trim():"",c={...t};delete c[i],P(s)&&s!==r&&!O(c)&&(c[y]=s),t=c,n=!0}if(o.type&&t){const e=u(o.type,t);e!==t&&(t=e,n=!0)}if(t){const e=d({props:t},r=>a(r,l));e.props!==t&&(t=e.props,n=!0)}return n?{...o,props:t}:o}function _(o){return m(o,t=>a(t,l))}export{R as RENAMED_PROPS,g as SOURCE_PROPS_MOVED,_ as migrateRenamedProps};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ownEntry as
|
|
1
|
+
import{ownEntry as s}from"../own-entry.js";const T=["general","commerce","service"],o=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"AlloyWheelsListing",label:"List",set:"commerce"},{type:"CatalogFilterBar",label:"Catalog Filter Bar",set:"commerce"},{type:"ProductGrid",label:"Product Grid",set:"commerce"},{type:"FitmentFinder",label:"Fitment Form",set:"commerce"},{type:"GalleryB",label:"Gallery",set:"commerce"}]},{key:"product",title:"Product page",templateable:!0,sections:[{type:"ProductHero",label:"Product Hero",set:"commerce"},{type:"SpecTable",label:"Spec Table",set:"commerce"},{type:"ProcessSteps",label:"Image & Text Columns",set:"general"},{type:"DetailRows",label:"Feature Rows",set:"commerce"},{type:"FitmentTable",label:"Fitment Table",set:"commerce"},{type:"TyreSizes",label:"Tyre Sizes",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"CheckoutCTA",label:"Ready-to-Order Banner",set:"commerce"}]},{key:"about",title:"About & brand story",templateable:!0,sections:[{type:"Footprint",label:"Locations Map",set:"general"}]},{key:"content",title:"Text & content",templateable:!0,sections:[{type:"Cards",label:"Cards",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Reviews",label:"Reviews",set:"service"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Countdown",label:"Countdown",set:"general"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"ArticleBody",label:"Article Body",set:"service"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocBody",label:"Document Text",set:"general"}]},{key:"contact",title:"Contact, FAQ & forms",templateable:!0,sections:[{type:"FAQ",label:"Q&A",set:"general"},{type:"ContactRouting",label:"Contact Form",set:"service"},{type:"SubmitBuild",label:"Photo Submission Form",set:"service"},{type:"ReviewForm",label:"Review Form",set:"service"},{type:"Form",label:"Form",set:"service"},{type:"AppointmentBooking",label:"Booking Form",set:"service"}]},{key:"structure",title:"Layout, structure & embeds",templateable:!1,sections:[{type:"SectionHeader",label:"Section Header",set:"general"},{type:"Flex",label:"Box",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]},{key:"layouts",title:"Layouts",templateable:!0,sections:[{type:"Manifesto",label:"Brand Text",set:"general"},{type:"Split",label:"Image & Text Split",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"SpecStrip",label:"Spec Strip",set:"general"},{type:"TimelineTrack",label:"Milestone Timeline",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"},{type:"Logos",label:"Logos",set:"general"},{type:"DocMasthead",label:"Page Header",set:"general"},{type:"DocTabs",label:"Tab Bar",set:"general"},{type:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Banner",label:"Banner",set:"general"}]}];function E(){return Object.fromEntries(o.map(e=>[e.key,{title:e.title,components:e.sections.map(t=>t.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}const h="2027-02-05",c="2027-02-14",l={CategoryBar:{label:"Category bar",note:`The reviewer, 2026-11-06 (the page headers and the tab bars become TWO Layouts rows, Page Header and Tab Bar): Category Bar folds into the Tab Bar. Retired from the Add menu with no second preset.
|
|
2
2
|
|
|
3
3
|
WHAT REPLACES IT: Tab Bar, a Box pinned under the header that stays above the sections after it, with a line below, holding the Menu block (One row, Menu style Tabs, Current page). Set the Menu's content to Blog categories: the blog's own categories, most posts first, each with its count in its cell (the host seeds the count card, Count on). Its converter row (\`section-to-box-rows-tabbar\` \`categoryBar\`, OFF) draws that bar for a stored page that moves later.
|
|
4
4
|
|
|
@@ -28,7 +28,7 @@ WHAT REPLACES IT: a Cards section with Card style set to Label only. Every cell
|
|
|
28
28
|
|
|
29
29
|
WHAT A MERCHANT LOSES on a NEW Label only section: nothing this section had. It GAINS the Cards head split (its head can move into a box of its own), which Key Features never had: that head draws the shared \`simple\` head, eyebrow ABOVE the heading, where Key Features drew it beside.
|
|
30
30
|
|
|
31
|
-
THE TYPE KEY STAYS AND SO DOES THE COMPONENT, until the stored nodes move (delete date ${
|
|
31
|
+
THE TYPE KEY STAYS AND SO DOES THE COMPONENT, until the stored nodes move (delete date ${h}). Every page holding a Key Features still renders through it and can still be edited; no document is rewritten and NO MIGRATION RUNS.`},DeliveryOptions:{label:"Delivery Options",note:"Lewis, 2026-10-10 (section-merges.md group 4, approved): one Cards section holds the five card grids — Cards, Key Features, Document Detail Cards, Recurring Columns and Delivery Options. Card content = Manual / Delivery options; the card's parts are Display chips; one Highlighted card row with its Highlight badge. Retired by card [MERGE] Delivery Options, Detail Cards And Recurring Columns Into Cards (M3, 2026-11-04).\n\nWHAT REPLACES IT: Cards with Card content set to Delivery options, drawn from its card template: the backend's `delivery-options` rows (name, price, time, note), one card each, in the website's own currency. The one Highlighted card row and the Highlight badge replace the per-option Highlight switch.\n\nWHAT A MERCHANT LOSES: more than one highlighted option (Lewis approved ONE Highlighted card row, 2026-10-10). No stored node held two.\n\nNO CONVERTER ROW: 0 DeliveryOptions nodes on the US sites, draft or published (read only, 2026-11-04). This entry is its reason in the guard (`scripts/test-section-to-box.tsx` §5).\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT (efficient-storefront-blocks). A Delivery Options anywhere still renders through it and can still be edited; no document is rewritten.\n\nDELETE DATE 2026-12-18: the retired component in efficient-storefront-blocks (`components/DeliveryOptions`, `DeliveryOptionsSource`, `blocks/commerce/DeliveryOptions`) goes then, in a storefront-blocks follow-up. 0 stored DeliveryOptions nodes on the 34 US pages, draft or published (read only, 2026-11-08), and no converter row is coming."},Series:{label:"Recurring Columns",note:`Lewis, 2026-10-10 (section-merges.md group 4, approved): one Cards section holds the five card grids — Cards, Key Features, Document Detail Cards, Recurring Columns and Delivery Options. Card content = Manual / Delivery options; the card's parts are Display chips; one Highlighted card row with its Highlight badge. Retired by card [MERGE] Delivery Options, Detail Cards And Recurring Columns Into Cards (M3, 2026-11-04).
|
|
32
32
|
|
|
33
33
|
WHAT REPLACES IT: Cards drawn from its card template. A column's number is Number, its "Right Top Text" Corner note, its title Card title, its words Card body, its count and label one Count, and the one \`viewLabel\` a plain Text typed once in the template, so every card shows it; the background is the Box's. The converter row (\`section-to-box-rows-cards.ts\`, OFF) lays down that Cards inside a Box.
|
|
34
34
|
|
|
@@ -76,4 +76,20 @@ WHAT REPLACES IT: a Box. \`eyebrow\`, \`title\` and \`body\` are Text blocks; ea
|
|
|
76
76
|
|
|
77
77
|
0 Integrations nodes are stored on the US sites (76 pages, read only, 2026-11-14). Old sites stay as they are (owner, 2026-11-06).
|
|
78
78
|
|
|
79
|
-
THE TYPE KEY STAYS AND SO DOES THE COMPONENT, until ${
|
|
79
|
+
THE TYPE KEY STAYS AND SO DOES THE COMPONENT, until ${c}. A stored Integrations node still renders through it and can still be edited; no document is rewritten.`},HeroSingle:{label:"Hero Single",note:`Owner, 2026-10-10: three heroes into one, the Hero (the slideshow) is the base; a single hero is a Hero with one slide. Every row the single Hero has is a slide row now: the picture is Media › Image, Image 2 on the slide as it was on the single Hero (lib/document/hero-media-parts), with the same rows from one home (blocks/hero-shared-fields: the two-picture Layout, Image 2 and its tint); the height, corners, border, stick, anchor, entrance, scroll, width and hide are the Hero's own section rows.
|
|
80
|
+
|
|
81
|
+
WHAT REPLACES IT: a Hero with one slide (Hero › Slide › Box). The words are Boxes on the slide, as they were Boxes on the single Hero.
|
|
82
|
+
|
|
83
|
+
WHAT A MERCHANT LOSES: nothing a row sets. The single Hero's own copy rows (eyebrow, title, level, alignment) were deleted on 2026-09-09; their words were already Box blocks.
|
|
84
|
+
|
|
85
|
+
Old sites stay as they are; moving a stored page (lib/sections/hero-single-to-hero) is a separate write that needs the owner's word.
|
|
86
|
+
|
|
87
|
+
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. A stored Hero Single still renders through it and can still be edited; no document is rewritten.`},ContactLocations:{label:"Contact / Locations",note:`Owner, 2026-10-27/30: Contact / Locations is TWO sections, each with its own look, the city photo wall and the city cards with their own map. Its row (\`section-to-box-rows-locations\`) makes two Boxes, so the old row leaves the Add menu and each Box is a preset of its own (lib/sections/city-presets). A press of this type lays down that row (SECTION_TO_BOX_PRESS).
|
|
88
|
+
|
|
89
|
+
WHAT REPLACES IT: City maps, a Box with one Box per region group (its head: key, name, "N locations"), and in it one City Box per city: Words (name, state and country, time zone, address, a Directions button, hours) and a Map block (LocationMap); then the OpenStreetMap credit. City pictures, the head (number, heading, tagline) over the photo wall, comes back to the menu when the wall is redone: the owner, 2026-11-02, hid the photo groups until then (\`CITY_PHOTO_WALL_HIDDEN\`).
|
|
90
|
+
|
|
91
|
+
WHAT A MERCHANT LOSES until the wall is redone: the photo wall and the section head on a new insert (a Text section gives a heading). The look gaps of the Boxes are listed in the row.
|
|
92
|
+
|
|
93
|
+
Old sites stay as they are (owner, 2026-11-06); moving a stored page is a separate write that needs the owner's word.
|
|
94
|
+
|
|
95
|
+
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. A stored Contact / Locations node still renders through it and can still be edited; no document is rewritten.`},PaymentBadges:{label:"Payment Methods",note:"Owner, 2026-10-10: Logos and Payment Methods are one block, and a payment wall is a Logos block with the payment chip for its look. 2026-11-07: the dot before each line is a Mark Box at full strength (approved).\n\nWHAT REPLACES IT: the Logos row (Layouts group), Logo style Cards. Field by field, as its converter row (`section-to-box-rows-logos`) moves it: `heading` is a Text block; each of `badges` is a Logo block in the wall, its name the Logo's name and its `src` the Logo's picture; `dataSource` is the wall's own Logo content row (\"Ways to pay here\" or \"Ways to pay at checkout\", served by the backend to Logos too), and the wall draws ONE Logo card template per served method, the same chip; `assurances` are a Reassurance Box of lines, each a Mark Box (an empty Box, 4 x 4, Corners 2, Fill main) before a Text; `contained` is the Box's site frame. A press of this type lays down that Box (SECTION_TO_BOX_PRESS).\n\nWHAT A MERCHANT LOSES: the 60% and 70% opacity of the old dot and words (a Box and a Text have no opacity: the dot is the main colour, the words the label ink) and the 4px gap between wrapped lines (a Box has one Gap). No field is lost.\n\n4 Payment Methods nodes are stored on the US sites, all on template pages, draft only, all fed by a source; 0 on pages (read only, 2026-11-07). Old sites stay as they are (owner, 2026-11-06); moving a page is a separate write.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. A stored Payment Methods node still renders through it, its dot included, and can still be edited; no document is rewritten."},Gallery:{label:"Tabbed Gallery",note:'Owner, 2026-10-10 (approved): the Tabbed Gallery goes into the Customer Photo Grid, and the one that is left is called Gallery; its vehicle / wheel / others halves become a Tabs list, and its wall becomes one of the photo layouts. Retired from the Add menu with no preset row and no migration.\n\nWHAT REPLACES IT, field by field: the Gallery (`GalleryB`). `mode` both = a Box in Tabs mode with one Gallery per panel; one mode = one Gallery, no Tabs Box. `vehicleTabLabel` / `wheelTabLabel` = the Box\'s panel names, Tab shape "Large tabs" (this strip is the Tabbed Gallery\'s own, class for class); `showTabs` off = the Box Stacked. `source` (one product, or All products and a `category`) = each Gallery\'s `dataSource: "product-pictures"`, with `product`, `designCode`, `mediaZone` (lifestyle = the vehicle half, photos = the wheel half, others) and `category`; it reads live on every view, nothing is baked. `kicker`, the titles, `*Body1` / `*Body2` = Text blocks in the panel\'s Box (Heading N, Body N); `showIntro` off = the Layers eye. `*Stats` = a Stats block; `breadcrumbLabel` = a Breadcrumb block; `showFilters`, `showCount`, `showSort` = a Filter chips block over the Gallery (`showCount`, `showSort`). A card\'s `image`, `photos`, `href`, `name`, `meta`, `process` (the Tag) and `eyebrow` (the caption line over the title) = a Gallery Item\'s, or the served row\'s. The wall (two half, then thirds, 4:3, one across on a phone) = layout "Two, then threes" (`twoThenThreesPhoto`), the default for product pictures. Words at rest, the tile number, the hover zoom and the lightbox\'s "View product" are the Gallery card\'s. `previewTab` = the Box Tabs pane switch; `previewHover` = the Gallery\'s own. `anchor`, `sectionAccent` and `_partStyles` are the same injected keys on the Box and the Gallery.\n\nWHAT A MERCHANT LOSES: the per-tab note under each tab ("N items · Community photos" / "Featured photos", desktop only): Large tabs draws the letter and the name only. Accepted only because nothing stored moves now. ⛔ A "Tab note" Box setting MUST exist before the /gallery move: a moved page with no home for it loses a line the shopper sees. Also lost: the empty line ("No items in this gallery yet." / "No items match this filter."); an empty Gallery draws nothing, and the chips come from the tiles, so "no match" cannot happen.\n\nNO CONVERTER ROW: no stored node is rewritten and SECTION_TO_BOX_ON stays without it (owner, 2026-11-06: old sites stay as they are). 2 Tabbed Gallery nodes are stored on the US sites, both top level, draft equal to published (read only, 2026-11-08): `Gallery-f1eb706a` (inovit.com /gallery: mode both, every show flag on, All products, 10 + 10 cards, 20 of 20 with a caption, 3 + 3 stats) and `Gallery-ce49eb98` (hartesmetal.com /gallery: mode vehicles, count and stats on, All products, 49 cards, 0 with a caption, 2 stats).\n\nTHE MOVE RECIPE, for the day the owner orders the /gallery move (a live write, his word): a Box in Tabs mode (inovit) or one Gallery (hartes); each Gallery `dataSource: "product-pictures"`, `mediaZone` lifestyle / photos, and `displayPhone: {tag:true}` (a new Gallery stores `{tag:false}`, and the Tabbed Gallery drew its Tag at every width). The captions: the stored ones are frozen copies that live only in the page; a product-pictures row serves its media group\'s `vehicle` as `eyebrow`, and that is empty on every group today (the editor\'s product binding clears `eyebrow` and reads only `vehicle`). So carry them as typed Gallery Items with the stored `eyebrow` copies, OR fill each media group\'s `vehicle` first (a data write). It needs efficient-storefront-blocks 0.91.0 (the photo layout default and the stored cards kept on open) and the backend\'s product-pictures source (106.0.0).\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT (efficient-storefront-blocks GalleryShowcase). A stored Tabbed Gallery still renders through it and can still be edited, its source row, cover, width, heading level and settings groups included; in Layers it keeps its block\'s own label, "Tabbed Gallery". Delete the component only when the last stored `Gallery` node is gone.'}},p=Object.fromEntries(Object.entries(l).map(([e,t])=>[e,t.note])),S=["Grid","Spacer","TyreFitment"],f=Array.from(new Set([...o.flatMap(e=>e.sections.map(t=>t.type)),...Object.keys(p)])),u=Object.fromEntries(Object.entries(l).map(([e,t])=>[e,t.label])),O={...u,...Object.fromEntries(o.flatMap(e=>e.sections.map(t=>[t.type,t.label])))},m={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",LocationMap:"general",Contents:"general",ListSearch:"general",ButtonBlock:"general",CardList:"general",HostPart:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",KeyFeatures:"general",Spacer:"general",Series:"general",DocMetaCards:"general",StatsParagraph:"general",Testimonials:"general",Masthead:"general",CategoryBar:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",DeliveryOptions:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"commerce",AccountBlock:"commerce",ThemeSwitchBlock:"commerce",ProductGallery:"commerce",EuTyreLabelBlock:"commerce",WheelDiagram:"commerce",SubmitBox:"service",BookingBox:"service",SubscribeBlogs:"service",RatingBlock:"service",Footer:"service",FooterLogo:"service",FooterMenu:"service",FooterDivider:"service",FooterGroup:"service",FooterText:"service",FooterEmailSignup:"service",FooterSocial:"service",FooterPayment:"service",MenuBlock:"service",MenuLinkBlock:"service",ProductPrice:"commerce",ProductSize:"commerce",ProductColour:"commerce",ProductPicture:"commerce",ProductEyebrow:"commerce",ProductName:"commerce",ProductSpecs:"commerce",ProductBuy:"commerce",FitmentPicker:"commerce",StockFitment:"commerce",RelatedProducts:"commerce",BundleOffer:"commerce",TyreFitment:"commerce",EuTyreLabel:"commerce",PaymentBadges:"general",ContactLocations:"general",HeroSingle:"general",Gallery:"commerce",EmailFormBlock:"service",SocialLogosBlock:"service",PaymentLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},r={...m,...Object.fromEntries(o.flatMap(e=>e.sections.map(t=>[t.type,t.set])))},b={DocTabs:{set:"service",blocks:["MenuBlock"],reason:"the Tab Bar press holds the Menu block, whose only source is a Console menu; a stored bar's typed tabs need nothing, so the Tab Bar stays general"}};function A(e,t,a=b){const i=s(a,e);return i!==void 0&&!t.includes(i.set)}function v(e){return s(r,e)}function n(e){return Object.keys(r).filter(t=>s(r,t)===e).sort()}const C=n("general"),k=n("commerce"),x=n("service"),y="Flex",d="Box",B=`${d}es`;function g(e){return e==="section"?"Blank section":d}function N(e,t,a){return e===y?g(t):a}export{f as ALL_SECTION_TYPES,T as BLOCK_SETS,d as BOX_LABEL,B as BOX_LABEL_PLURAL,k as COMMERCE_BLOCKS,C as GENERAL_BLOCKS,c as INTEGRATIONS_DELETE_BY,h as KEY_FEATURES_DELETE_BY,y as LEVEL_NAMED_TYPE,b as PRESS_NEEDS_SET,S as RETIRED_NESTABLE_SECTIONS,p as RETIRED_SECTIONS,u as RETIRED_SECTION_LABELS,o as SECTION_CATALOG,O as SECTION_LABELS,x as SERVICE_BLOCKS,m as UNLISTED_BLOCK_SETS,v as blockSetOf,n as blocksInSet,E as buildBlockCategories,N as labelAtLevel,g as labelForFlex,A as pressWithheld};
|
|
@@ -22,4 +22,7 @@ export type SeededNode = {
|
|
|
22
22
|
props: Props;
|
|
23
23
|
};
|
|
24
24
|
export declare function seedNodes(seeds: readonly BlockSeed[], idOf: (type: string, at: string) => string, at?: string): SeededNode[];
|
|
25
|
+
export declare function seedNodeId(props: Props, fallback: string): string;
|
|
26
|
+
export declare const slotSeedIds: (nodeId: string, tag: string) => (_type: string, at: string) => string;
|
|
27
|
+
export declare function withSeededSlot(props: Props, slot: string, fallback: string, seed: (nodeId: string) => SeededNode[]): Props;
|
|
25
28
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{NESTED_BOX_PADDING as l}from"../content/box-layout.js";import{TextMeta as
|
|
1
|
+
import{NESTED_BOX_PADDING as l}from"../content/box-layout.js";import{TextMeta as x}from"./blocks/general/Text/meta.js";const{text:L,tag:_,...g}=x.defaultProps,f=g,T={...f,tone:"dim"},u={justify:"start",align:"stretch",wrap:!1,blockSpacing:"gap",padV2:!0},S={...u,direction:"column",...l},$=(t,e=t,n=t,o=e)=>({sectionPaddingTop:t,sectionPaddingRight:e,sectionPaddingBottom:t,sectionPaddingLeft:e,sectionPaddingTopPhone:n,sectionPaddingRightPhone:o,sectionPaddingBottomPhone:n,sectionPaddingLeftPhone:o}),m=t=>({fillColor:t}),k=(t,e,n={})=>({...S,widthFit:"fixed",width:t,minWidth:t,sectionHeightMode:"fixed",sectionHeightValue:t,sectionHeightUnit:"px",...e?m(e):{},...n}),c=(t,e,n,o)=>({sizeToken:{step:t,px:e,...o?{stepPhone:o}:{},...n?{pxPhone:n}:{}}}),N=t=>({textStyle:"body-1",...c("body",t),lineHeight:1.625}),s={case:"upper"},P={textStyle:"body-5",...s},h=(t,e)=>({...c("label",t,e),letterSpacing:.2,...s}),w=(t,e)=>({...P,...h(t,e)});function b(t,e,n=""){return t.map((o,i)=>{const d=n?`${n}.${i}`:String(i),r={...o.props??{}};for(const[p,a]of Object.entries(o.slots??{}))r[p]=b(a,e,d);return{type:o.type,props:{...r,id:e(o.type,d)}}})}function y(t,e){return typeof t.id=="string"&&t.id.trim()?t.id:e}const A=(t,e)=>(n,o)=>o==="0"?`${t}~${e}`:`${t}~${e}.${o.slice(2)}`;function D(t,e,n,o){return t[e]!==void 0?t:{...t,[e]:o(y(t,n))}}export{u as BOX,T as DIM,S as INNER_BOX,P as LABEL_FACE,f as TEXT,$ as boxPadding,m as fillSlot,h as labelLook,w as labelStyle,k as markBoxProps,N as relaxedBodyLook,y as seedNodeId,b as seedNodes,A as slotSeedIds,c as token,D as withSeededSlot};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t={cellWidth:"Cell width",rowsFirstImageLeft:"Rows, first image on the left",rowsFirstImageRight:"Rows, first image on the right",relatedProducts:"Related Products",bundleProducts:"Bundle Products",documentHeader:"Document Header",documentHeaderBlurb:"A document header — headline, metadata and standfirst.",shrinkToFit:"Shrink to fit",dividerPhoneHide:"Hide",tyreFitmentForm:"Tyre Fitment Form",tabbedGallery:"Tabbed Gallery",customerPhotoGrid:"Customer Photo Grid",footprintTypedIn:"Typed in",locationsSearchShow:"Show",customerPhotoGridBlurb:"Customer photos in a card grid with a click-to-open lightbox.",cardHoverHint:"What each card does when a shopper points at it, or taps it on a phone. Rotate turns the wheel picture.",nextPictureHoverHint:"What this picture does when a shopper points at the card. Show next image fades to the card's next photo. Black and white shows it in grey until then. A phone shows the first photo in colour.",renderings:"Renderings",documentTabs:"Document Tabs",documentTabsBlurb:"A sticky tab bar to switch between documents.",categoryBar:"Category Bar"};export{t as KEPT_EDITOR_PHRASES};
|
|
1
|
+
const t={"Tint opacity":"Tint opacity",cellWidth:"Cell width",rowsFirstImageLeft:"Rows, first image on the left",rowsFirstImageRight:"Rows, first image on the right",relatedProducts:"Related Products",bundleProducts:"Bundle Products",documentHeader:"Document Header",documentHeaderBlurb:"A document header — headline, metadata and standfirst.",shrinkToFit:"Shrink to fit",dividerPhoneHide:"Hide",tyreFitmentForm:"Tyre Fitment Form",tabbedGallery:"Tabbed Gallery",customerPhotoGrid:"Customer Photo Grid",footprintTypedIn:"Typed in",locationsSearchShow:"Show",customerPhotoGridBlurb:"Customer photos in a card grid with a click-to-open lightbox.",cardHoverHint:"What each card does when a shopper points at it, or taps it on a phone. Rotate turns the wheel picture.",nextPictureHoverHint:"What this picture does when a shopper points at the card. Show next image fades to the card's next photo. Black and white shows it in grey until then. A phone shows the first photo in colour.",renderings:"Renderings",documentTabs:"Document Tabs",documentTabsBlurb:"A sticky tab bar to switch between documents.",categoryBar:"Category Bar"};export{t as KEPT_EDITOR_PHRASES};
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
export declare const HERO_MEDIA_TYPES: readonly ["image", "video"];
|
|
2
|
+
export type HeroMediaType = (typeof HERO_MEDIA_TYPES)[number];
|
|
3
|
+
export declare const HERO_FOCUS: {
|
|
4
|
+
readonly image: "imageFocal";
|
|
5
|
+
readonly image2: "imageFocal2";
|
|
6
|
+
};
|
|
7
|
+
export declare const HERO_ABSENT_MEDIA_TYPE: {
|
|
8
|
+
readonly HeroSingle: "image";
|
|
9
|
+
readonly HeroSlide: "video";
|
|
10
|
+
};
|
|
11
|
+
export type HeroMediaNodeType = keyof typeof HERO_ABSENT_MEDIA_TYPE;
|
|
12
|
+
export declare function heroMediaType(nodeType: HeroMediaNodeType, stored: unknown): HeroMediaType;
|
|
1
13
|
export declare const MEDIA_LAYOUTS: readonly ["one", "side", "stacked"];
|
|
2
14
|
export type MediaLayout = (typeof MEDIA_LAYOUTS)[number];
|
|
3
15
|
export declare const MEDIA_LAYOUT_DEFAULT: MediaLayout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const n=["one","side","stacked"],
|
|
1
|
+
const a=["image","video"],s={image:"imageFocal",image2:"imageFocal2"},c={HeroSingle:"image",HeroSlide:"video"};function E(e,o){return a.includes(o)?o:c[e]}const n=["one","side","stacked"],u="one",x={one:"One",side:"Side by side",stacked:"Stacked"};function i(e){return n.includes(e)?e:u}function r(e){return e==="one"?1:2}function d(e,o){if(n.includes(e))return e;const t=i(o);return t==="side"?"stacked":t}function m(e){const o=i(e.mediaLayout);return Math.max(r(o),r(d(e.mediaLayoutPhone,o)))}export{c as HERO_ABSENT_MEDIA_TYPE,s as HERO_FOCUS,a as HERO_MEDIA_TYPES,n as MEDIA_LAYOUTS,u as MEDIA_LAYOUT_DEFAULT,x as MEDIA_LAYOUT_LABELS,E as heroMediaType,m as heroPictureCount,r as mediaLayoutPictures,i as normaliseMediaLayout,d as resolvePhoneLayout};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ENTRANCE_STORE_KEYS as
|
|
1
|
+
import{ENTRANCE_STORE_KEYS as m,LEGACY_ENTRANCE_KEY as S}from"../animation/entrance-keys.js";import{SCROLL_STORE_KEYS as f}from"../animation/scroll.js";import{PICTURE_DOTS as E,viewFocusKeys as u}from"../content/picture-focus-rows.js";import{SECTION_PIN_KEYS as T}from"../content/section-sticky.js";import{SECTION_CORNERS_ROW as _}from"../content/section-corners.js";import{SECTION_BORDER_UNIT_KEYS as v}from"../content/borders.js";import{SECTION_WIDTH_KEYS as O}from"../content/section-width.js";import{DEFAULT_TINT as b}from"../content/tint.js";import{finiteNumber as w}from"../finite-number.js";import{nonEmptyString as d}from"../non-empty-string.js";import{DEFAULT_OVERLAY_POSITION as g}from"./hero-overlay.js";import{normaliseVideoSource as H}from"../hero-video.js";import{heroMediaType as x}from"../hero-media-layout.js";import{VIEW_HIDE_KEYS as C}from"../content/view-hide-class.js";import{ownEntry as I}from"../own-entry.js";import{seedNodeId as k}from"../document/seed-parts.js";const N=50,h=["mediaImage","mediaVideo","poster","tintColor","mediaLayout","mediaLayoutPhone","mediaImage2","tintColor2","tintOpacity2","videoSource","youtubeUrl","videoPlayback","_partMotion",...E.filter(r=>r.block==="HeroSingle").flatMap(r=>u(r.focus))],R=["heightDesktop","heightMobile","heightFixed","heightFixedTablet","heightFixedMobile","sectionCorners",_.unitKey,"sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone",...v,"sectionAccent",...T,"anchor",...m,S,...f,...Object.values(O),...C],P=new Set(R),A="the Hero does not read this key as a section setting (only the section pass rows both heroes share carry), so it is not copied",D={eyebrow:"the single Hero stopped drawing its own copy on 2026-09-09 (owner: delete the old text); the words are blocks in its boxes, which the slide keeps",titleTop:"the single Hero stopped drawing its own copy on 2026-09-09 (owner: delete the old text); the words are blocks in its boxes, which the slide keeps",titleLevel:"it set the level of the copy the single Hero stopped drawing on 2026-09-09; a Text block in a box sets its own level",alignment:"its row was deleted on 2026-09-09 with the copy it placed; a box places itself on nine anchors, and the value was drawn by nothing"};function X(r){const e=r.props,a=k(e,"HeroSingle"),i=[],n=[],t={id:`${a}~slide`},s={id:`${a}~hero`},p=x("HeroSingle",e.mediaType);t.mediaType=p,"mediaType"in e&&i.push({key:"mediaType",home:"HeroSlide.mediaType"}),p==="video"&&H(e.videoSource)==="upload"&&(t.videoSpeed=N);for(const o of h)o in e&&(t[o]=e[o],i.push({key:o,home:`HeroSlide.${o}`}));"tintOpacity"in e&&(t.overlay=e.tintOpacity,i.push({key:"tintOpacity",home:"HeroSlide.overlay (Image tint)"})),t.overlayColor=d(e.overlayColor)??b,t.overlayPosition=d(e.overlayPosition)??g,"overlayColor"in e&&i.push({key:"overlayColor",home:"HeroSlide.overlayColor"}),"overlayPosition"in e&&i.push({key:"overlayPosition",home:"HeroSlide.overlayPosition"}),Array.isArray(e.boxes)?(t.groups=e.boxes,i.push({key:"boxes",home:"HeroSlide.groups (the same HeroGroup boxes)"})):"boxes"in e&&i.push({key:"boxes",home:"HeroSlide.groups (none stored)"}),s.textureOpacity=w(e.overlay)??100,"overlay"in e&&i.push({key:"overlay",home:"Hero.textureOpacity (the ramp's opacity)"}),s.showTicker=!1;const c=new Set(["id","mediaType","tintOpacity","overlay","overlayColor","overlayPosition","boxes",...h]);for(const[o,y]of Object.entries(e)){if(c.has(o))continue;const l=I(D,o);if(l!==void 0){n.push({key:o,why:l});continue}if(!P.has(o)){n.push({key:o,why:A});continue}s[o]=y,i.push({key:o,home:`Hero.${o} (section pass)`})}return s.slides=[{type:"HeroSlide",props:t}],{node:{type:"Hero",props:s},carried:i,dropped:n}}export{R as HERO_SECTION_PASS_KEYS,X as heroSingleToHero};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{ruleChecks as A}from"./rule.js";import{hasOwnEntry as b}from"../own-entry.js";const E={text:[0,1,2],textarea:[0,1,2],plainText:[0,1,2],copyText:[0,1,2],plainTextarea:[0,1,2],linkField:[0],textList:[0,2],upload:[0,2],toggle:[0,3],select:[0,4],searchSelect:[0,3],segmented:[0],iconPickerRow:[0],shapePickerRow:[0],multiSelect:[0,2],slider:[0],colorInput:[0],focalPicker:[0],sizeField:[0],backgroundField:[0],cardImageBackgroundField:[0],placementField:[0],pxField:[0],dateTime:[0,2],edgePad:[0,3],blockSourceField:[0,1],cardRowField:[0],phPrev:[1],phHide:[1],phHideDefault:[1],group:[0],section:[0],panelNote:[0]},N=new Set(["value","render","defaultProps","fields","type","arrayFields","icon","shape"]),O=/(^|_)(PH|LABELS?|HINTS?|NOTES?|TITLES?|SWATCH_NAMES|GROUP|REASON|ROWS|PANELS|TABS|LINES)$/,$=new Set(["key","value","id","type","href","slug","kind","cell","set","icon","token","unit","path","url","src","className","variant","mode","side","align","role"]),R=new Set(["hint","coverHint","unsetLabel","emptyLabel","addLabel"]),_=new Set(["say","sayCount"]);function C(t){return/\p{L}/u.test(t)&&t.trim()===t&&t.length>0&&!/^[a-z0-9]+(?:-[a-z0-9]+)+$/.test(t)}const P=/(?:Key|Id|Slug|Href|Url|ClassName)$/;function w(t,p,s={}){const a=new Map,k=new Set(s.skip??[]),d=new Map((s.dataFiles??[]).map(e=>[e.path,e.keys])),u=(e,l)=>{if(!C(e))return;let S=a.get(e);S||a.set(e,S=new Set),S.add(l)},f=e=>e&&(t.isStringLiteral(e)||t.isNoSubstitutionTemplateLiteral(e))?e.text:null,o=e=>{if(!e)return[];const l=f(e);return l!==null?[l]:t.isParenthesizedExpression(e)?o(e.expression):t.isConditionalExpression(e)?[...o(e.whenTrue),...o(e.whenFalse)]:t.isBinaryExpression(e)&&(e.operatorToken.kind===t.SyntaxKind.QuestionQuestionToken||e.operatorToken.kind===t.SyntaxKind.BarBarToken)?[...o(e.left),...o(e.right)]:[]},y=e=>{const l=e.expression;return t.isIdentifier(l)?l.text:t.isPropertyAccessExpression(l)?l.name.text:null},g=e=>e.name&&(t.isIdentifier(e.name)||t.isStringLiteral(e.name))?e.name.text:null;for(const e of p){if(!/\.tsx?$/.test(e.path)||k.has(e.path))continue;const l=d.get(e.path),S=t.createSourceFile(e.path,e.text,t.ScriptTarget.Latest,!0,e.path.endsWith(".tsx")?t.ScriptKind.TSX:t.ScriptKind.TS),T=n=>{if(t.isCallExpression(n)){const r=y(n);if(r&&_.has(r))for(const c of n.arguments){const i=f(c);i!==null&&u(i,e.path)}else if(r&&t.isIdentifier(n.expression)&&b(E,r)){for(const c of E[r])for(const i of o(n.arguments[c]))u(i,e.path);if(r==="segmented"){const c=n.arguments[2];if(c&&t.isArrayLiteralExpression(c))for(const i of c.elements){const h=f(i);h!==null&&u(h,e.path)}}}}else if(t.isJsxAttribute(n)&&n.name.getText(S)==="label"&&n.initializer&&t.isStringLiteral(n.initializer)&&/^[A-Z]/.test(n.parent.parent.tagName.getText(S).split(".").pop()??""))u(n.initializer.text,e.path);else if(t.isObjectLiteralExpression(n)){const r=n.properties.filter(t.isPropertyAssignment),c=r.find(i=>g(i)==="label");if(c&&r.some(i=>N.has(g(i)??""))){const i=f(c.initializer);i!==null&&u(i,e.path)}for(const i of r){const h=g(i);if(h!==null&&R.has(h))for(const x of o(i.initializer))u(x,e.path)}if(l)for(const i of r){const h=g(i);if(h!==null&&(l==="*"||l.includes(h))){const x=f(i.initializer);x!==null&&u(x,e.path)}}}else if(t.isVariableDeclaration(n)&&t.isIdentifier(n.name)&&O.test(n.name.text)&&n.initializer&&!/CSSProperties|Style\b/.test(n.type?.getText(S)??"")){const r=f(n.initializer);r!==null&&!/^[a-z0-9_]+$/.test(r)&&u(r,e.path);const c=i=>{const h=t.isPropertyAssignment(i)?g(i)??"":"";if(t.isPropertyAssignment(i)&&!$.has(h)&&!P.test(h)){const x=f(i.initializer);x!==null&&u(x,e.path)}t.forEachChild(i,c)};c(n.initializer)}t.forEachChild(n,T)};T(S)}const m=new Map;for(const e of[...a.keys()].sort(L))s.known?.has(e)||m.set(e,[...a.get(e)].sort());return m}function L(t,p){return t<p?-1:t>p?1:0}function z(t,p){return["/**",...p.header.map(a=>a?` * ${a}`:" *")," */",`export const ${p.constant} = {`,...[...t].map(a=>` ${JSON.stringify(a)}: ${JSON.stringify(a)},`),"} as const;","",`/** Every phrase of {@link ${p.constant}}: what a host's words are keyed by. */`,`export type ${p.phraseType} = keyof typeof ${p.constant};`,""].join(`
|
|
1
|
+
import{ruleChecks as A}from"./rule.js";import{hasOwnEntry as b}from"../own-entry.js";const E={text:[0,1,2],textarea:[0,1,2],plainText:[0,1,2],copyText:[0,1,2],plainTextarea:[0,1,2],linkField:[0],textList:[0,2],upload:[0,2],toggle:[0,3],select:[0,4],searchSelect:[0,3],segmented:[0],iconPickerRow:[0],shapePickerRow:[0],multiSelect:[0,2],slider:[0],colorInput:[0],focalPicker:[0],sizeField:[0],backgroundField:[0],cardImageBackgroundField:[0],placementField:[0],pxField:[0],dateTime:[0,2],edgePad:[0,3],blockSourceField:[0,1],cardRowField:[0],phPrev:[1],phHide:[1],phHideDefault:[1],group:[0],section:[0],panelNote:[0]},N=new Set(["value","render","defaultProps","fields","type","arrayFields","icon","shape"]),O=/(^|_)(PH|LABELS?|HINTS?|NOTES?|TITLES?|SWATCH_NAMES|GROUP|REASON|ROWS|PANELS|TABS|LINES)$/,$=new Set(["key","value","id","type","href","slug","kind","cell","set","icon","token","unit","path","url","src","className","variant","mode","side","align","role","focus"]),R=new Set(["hint","coverHint","unsetLabel","emptyLabel","addLabel"]),_=new Set(["say","sayCount"]);function C(t){return/\p{L}/u.test(t)&&t.trim()===t&&t.length>0&&!/^[a-z0-9]+(?:-[a-z0-9]+)+$/.test(t)}const P=/(?:Key|Id|Slug|Href|Url|ClassName)$/;function w(t,p,s={}){const a=new Map,k=new Set(s.skip??[]),d=new Map((s.dataFiles??[]).map(e=>[e.path,e.keys])),u=(e,l)=>{if(!C(e))return;let S=a.get(e);S||a.set(e,S=new Set),S.add(l)},f=e=>e&&(t.isStringLiteral(e)||t.isNoSubstitutionTemplateLiteral(e))?e.text:null,o=e=>{if(!e)return[];const l=f(e);return l!==null?[l]:t.isParenthesizedExpression(e)?o(e.expression):t.isConditionalExpression(e)?[...o(e.whenTrue),...o(e.whenFalse)]:t.isBinaryExpression(e)&&(e.operatorToken.kind===t.SyntaxKind.QuestionQuestionToken||e.operatorToken.kind===t.SyntaxKind.BarBarToken)?[...o(e.left),...o(e.right)]:[]},y=e=>{const l=e.expression;return t.isIdentifier(l)?l.text:t.isPropertyAccessExpression(l)?l.name.text:null},g=e=>e.name&&(t.isIdentifier(e.name)||t.isStringLiteral(e.name))?e.name.text:null;for(const e of p){if(!/\.tsx?$/.test(e.path)||k.has(e.path))continue;const l=d.get(e.path),S=t.createSourceFile(e.path,e.text,t.ScriptTarget.Latest,!0,e.path.endsWith(".tsx")?t.ScriptKind.TSX:t.ScriptKind.TS),T=n=>{if(t.isCallExpression(n)){const r=y(n);if(r&&_.has(r))for(const c of n.arguments){const i=f(c);i!==null&&u(i,e.path)}else if(r&&t.isIdentifier(n.expression)&&b(E,r)){for(const c of E[r])for(const i of o(n.arguments[c]))u(i,e.path);if(r==="segmented"){const c=n.arguments[2];if(c&&t.isArrayLiteralExpression(c))for(const i of c.elements){const h=f(i);h!==null&&u(h,e.path)}}}}else if(t.isJsxAttribute(n)&&n.name.getText(S)==="label"&&n.initializer&&t.isStringLiteral(n.initializer)&&/^[A-Z]/.test(n.parent.parent.tagName.getText(S).split(".").pop()??""))u(n.initializer.text,e.path);else if(t.isObjectLiteralExpression(n)){const r=n.properties.filter(t.isPropertyAssignment),c=r.find(i=>g(i)==="label");if(c&&r.some(i=>N.has(g(i)??""))){const i=f(c.initializer);i!==null&&u(i,e.path)}for(const i of r){const h=g(i);if(h!==null&&R.has(h))for(const x of o(i.initializer))u(x,e.path)}if(l)for(const i of r){const h=g(i);if(h!==null&&(l==="*"||l.includes(h))){const x=f(i.initializer);x!==null&&u(x,e.path)}}}else if(t.isVariableDeclaration(n)&&t.isIdentifier(n.name)&&O.test(n.name.text)&&n.initializer&&!/CSSProperties|Style\b/.test(n.type?.getText(S)??"")){const r=f(n.initializer);r!==null&&!/^[a-z0-9_]+$/.test(r)&&u(r,e.path);const c=i=>{const h=t.isPropertyAssignment(i)?g(i)??"":"";if(t.isPropertyAssignment(i)&&!$.has(h)&&!P.test(h)){const x=f(i.initializer);x!==null&&u(x,e.path)}t.forEachChild(i,c)};c(n.initializer)}t.forEachChild(n,T)};T(S)}const m=new Map;for(const e of[...a.keys()].sort(L))s.known?.has(e)||m.set(e,[...a.get(e)].sort());return m}function L(t,p){return t<p?-1:t>p?1:0}function z(t,p){return["/**",...p.header.map(a=>a?` * ${a}`:" *")," */",`export const ${p.constant} = {`,...[...t].map(a=>` ${JSON.stringify(a)}: ${JSON.stringify(a)},`),"} as const;","",`/** Every phrase of {@link ${p.constant}}: what a host's words are keyed by. */`,`export type ${p.phraseType} = keyof typeof ${p.constant};`,""].join(`
|
|
2
2
|
`)}function F(t,p,s){const{check:a,report:k}=A("editor words");{const f=[{path:"fixture.tsx",text:['const a = say("Delete {name}", { name });','const b = sayCount("{n} page", "{n} pages", n);','const c = text("Heading", "Main heading", "A hint");','const d = select("Align", icon, [{ label: "Left", value: "left" }], "left", "A note");','const e = segmented("Size", icon, ["Small", "Large"], "Small");','const SERIES_PH = { headTitle: "Section heading", link: "#" };','export const CORNER_SIDES_LABEL = "Corner sides";','const VIEW_TIER_LABEL = { desktop: "Desktop" };',"const DEFAULT_LABEL_KEY = 12;",'const FOCUS_HINT: CSSProperties = { display: "flex" };','const LAYOUT_TABS = "tabs";','const TEMPLATE_GROUP = { group: "Template pages", groupKey: "template" };','const a4 = <MenuLink label="text-fg" />;','const THEME_COLOUR_ROWS = [{ key: "fg", label: "Text color" }, { group: "Borders" }];','const a1 = <GroupLabel label="Wording" />;','const a2 = <input label="raw" />;','const a3 = say("Already listed");','const f = toggle("Show", false, "not-a-word");','const i = pxField("Corners", { min: 0, unsetLabel: on ? "Square" : "Round", hint: opts?.hint ?? "Rounds it." });','const g = { label: "Content", href: "/" };',"const h = say(`${x} colour`);"].join(`
|
|
3
3
|
`)},{path:"names.ts",text:'export const N = [{ key: "openers", title: "Hero & intros", sections: [{ type: "Hero", label: "Hero Slideshow" }] }];'},{path:"block.tsx",text:'export const B = { label: "Banner", fields: {}, defaultProps: { cta: { label: "Shop now", href: "/" } } };'}],o=[...w(t,f,{dataFiles:[{path:"names.ts",keys:["title"]}],known:new Set(["Already listed"])}).keys()],y=["A hint","A note","Align","Banner","Borders","Corner sides","Corners","Round","Rounds it.","Square","Template pages","Text color","Wording","Desktop","Delete {name}","Heading","Hero & intros","Hero Slideshow","Large","Left","Main heading","Section heading","Show","Size","Small","{n} page","{n} pages"].sort(L);a("the reader reads every shape on a fixture, and no value, link or built phrase",JSON.stringify(o)===JSON.stringify(y),`read ${JSON.stringify(o)}`)}const d=w(t,p,s);a(`the source says at least ${s.floor} phrases`,d.size>=s.floor,`read ${d.size}: the reader broke, or the editor stopped saying its words through it`);const u=z(d.keys(),s.shape);if(!s.catalogue)a("the catalogue exists",!1,`run ${s.write}`);else{const f=s.catalogue.text===u;let o;if(!f){const y=new Set([...s.catalogue.text.matchAll(/^ {2}("(?:[^"\\]|\\.)*"): /gm)].map(e=>JSON.parse(e[1]))),g=[...d.keys()].filter(e=>!y.has(e)),m=[...y].filter(e=>!d.has(e));o=`${s.catalogue.path} is not what the source says — run ${s.write}. Missing ${g.length}${g.length?` (${g.slice(0,5).map(e=>JSON.stringify(e)).join(", ")}…)`:""}; no longer said ${m.length}${m.length?` (${m.slice(0,5).map(e=>JSON.stringify(e)).join(", ")}…)`:""}.`}a(`${s.catalogue.path} lists exactly the ${d.size} phrases the source says`,f,o)}return k()}export{E as BUILDER_WORDS,w as editorPhrases,F as editorWordsCatalogue,z as editorWordsCatalogueText,C as isPhrase};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{isRegistryPath as
|
|
2
|
-
`,e.index)+1,r=n.slice(h,e.index);if(/^\s*(\/\/|\*|\/\*)/.test(r)||(r.match(/"/g)??[]).length%2===1||/\bfunction\s+$/.test(r))continue;
|
|
3
|
-
`).length;o.push({at:`${s.path}:${
|
|
4
|
-
`)});o("the reader finds the two calls, and neither the docblock, the declaration, the string nor the comment",t.length===2&&t[0].at==="fixture.tsx:7"&&t[1].at==="fixture.tsx:12",JSON.stringify(t)),o("…reads a concatenated reason whole, so it can be checked for a source",t[0]?.reason==="A facet's options grow out of the CATALOGUE — owner, 2026-08-29."&&
|
|
1
|
+
import{isRegistryPath as u,registryFiles as m}from"./support/registry-source.js";import{ruleChecks as g}from"./rule.js";import{blockEnd as x}from"./support/css-rules.js";import{isDocumentPath as y}from"./support/document-folder.js";const w=s=>y(s,"controls.tsx"),p=/doc\/naming\.md|N10\.\d|owner|GG|SS seat|editor-shell|\d{4}-\d{2}-\d{2}/;function G(s){const n=m(s),o=s.filter(e=>w(e.path)&&!u(e.path)),c=s.filter(e=>/^components\/[^/]+\.tsx$/.test(e.path));return[...n,...o,...c]}function d(s){const n=s.text,o=[],c=/noGlyph\(/g;let e;for(;e=c.exec(n);){const h=n.lastIndexOf(`
|
|
2
|
+
`,e.index)+1,r=n.slice(h,e.index);if(/^\s*(\/\/|\*|\/\*)/.test(r)||(r.match(/"/g)??[]).length%2===1||/\bfunction\s+$/.test(r))continue;const i=e.index+e[0].length-1,t=[...n.slice(i+1,x(n,i)).matchAll(/"((?:[^"\\]|\\.)*)"/g)].map(f=>f[1]).join(""),a=n.slice(0,e.index).split(`
|
|
3
|
+
`).length;o.push({at:`${s.path}:${a}`,reason:t})}return o}function O(s,n){const{check:o,report:c}=g("no-glyph rows");{const t=d({path:"fixture.tsx",text:["/**"," * `noGlyph(reason)` — the docblock names it; that is not a use."," */","export function noGlyph(reason: string) {",' if (!reason) throw new Error("noGlyph() needs a reason");',"}",'const a = select("Process", noGlyph(',` "A facet's options grow out of the CATALOGUE — owner, " +`,' "2026-08-29.",',"));",'// noGlyph("in a comment") is not a use','const b = noGlyph("");'].join(`
|
|
4
|
+
`)});o("the reader finds the two calls, and neither the docblock, the declaration, the string nor the comment",t.length===2&&t[0].at==="fixture.tsx:7"&&t[1].at==="fixture.tsx:12",JSON.stringify(t)),o("…reads a concatenated reason whole, so it can be checked for a source",t[0]?.reason==="A facet's options grow out of the CATALOGUE — owner, 2026-08-29."&&p.test(t[0].reason),JSON.stringify(t[0])),o("…and reads a bare call as no reason",t[1]?.reason==="",JSON.stringify(t[1]));const a=d({path:"open.tsx",text:'const c = noGlyph("cut off, owner 2026-11-16."'});o("…and reads a call left open at the end to the end",a[0]?.reason==="cut off, owner 2026-11-16.",JSON.stringify(a))}const e=G(s),h=e.reduce((t,a)=>t+a.text.length,0);o(`the scan read the files it meant to (${e.length} files, ${h} characters, at least ${n.minChars})`,h>=n.minChars,"the registry, lib/document/controls.tsx or components/ moved — a scan that reads nothing finds no exceptions");const r=e.flatMap(d),i=r.filter(t=>!t.reason.trim());o("every noGlyph() states a reason",i.length===0,i.map(t=>t.at).join(" · "));const l=r.filter(t=>t.reason.trim()&&!p.test(t.reason));return o("…and every reason names a source that can be checked",l.length===0,l.map(t=>`${t.at} — "${t.reason.slice(0,60)}"`).join(" · ")),o(`the no-glyph rows still number ${n.expected} (found ${r.length}${r.length?`: ${r.map(t=>t.at).join(", ")}`:""})`,r.length===n.expected,"a ruling was added or lost — move the number, with the ruling, in the guard that counts it"),c()}export{O as noGlyphRows,d as noGlyphRowsIn};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type RuleReport, type SourceFile } from "./rule.js";
|
|
2
|
+
export type OneNodeListLoopOptions = {
|
|
3
|
+
readonly allowed?: Readonly<Record<string, readonly string[]>>;
|
|
4
|
+
readonly minFiles?: number;
|
|
5
|
+
};
|
|
6
|
+
export declare function oneNodeListLoop(files: readonly SourceFile[], options?: OneNodeListLoopOptions): RuleReport;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ruleChecks as h}from"./rule.js";import{blockEnd as d}from"./support/css-rules.js";import{stripComments as m}from"./support/ts-source.js";import{checkExemptionsStillHere as p}from"./support/exemptions.js";import{SOURCE_FILE as w}from"./support/source-file.js";const u=[{head:/for \((?:const|let) \[\w+, (\w+)\] of Object\.entries\(/g,by:"value"},{head:/for \((?:const|let) (\w+) of Object\.values\(/g,by:"value"},{head:/for \((?:const|let) (\w+) of Object\.keys\(/g,by:"key"},{head:/for \((?:const|let) (\w+) in /g,by:"key"},{head:/Object\.entries\([^\n]*?\)\.(?:map|forEach)\(\(\[\w+, (\w+)\](?:\s*:[^)]*)?\)\s*=>/g,by:"value"},{head:/Object\.values\([^\n]*?\)\.(?:map|forEach)\(\(?(\w+)(?:\s*:[^)=]*)?\)?\s*=>/g,by:"value"},{head:/Object\.keys\([^\n]*?\)\.(?:map|forEach)\(\(?(\w+)(?:\s*:[^)=]*)?\)?\s*=>/g,by:"key"}],g=[/(?:const|let)\s+(\w+)\s*=\s*\(\s*(\w+)[^)]*\)[^=\n]*=>\s*isNodeList\(\s*\2\s*\)/g,/function\s+(\w+)\s*\(\s*(\w+)[^)]*\)[^{]*\{\s*return\s+isNodeList\(\s*\2\s*\)/g];function b(e,o){const s=o[0];if(s.startsWith("for")){let t=d(e,o.index+s.indexOf("("))+1;for(;/\s/.test(e[t]??"");)t++;if(e[t]==="{")return e.slice(t,d(e,t)+1);const a=e.indexOf(";",t);return e.slice(t,a<0?e.length:a+1)}const n=o.index+Math.max(s.lastIndexOf(".map("),s.lastIndexOf(".forEach("))+s.slice(Math.max(s.lastIndexOf(".map("),s.lastIndexOf(".forEach("))).indexOf("(");return e.slice(n,d(e,n)+1)}const y=(e,o)=>new RegExp(String.raw`(?:\b(?:${o.join("|")})\(\s*${e}\s*\)`+String.raw`|Array\.isArray\(\s*${e}\s*\)\s*&&[^;]{0,80}?${e}\.(?:some|every)\(`+String.raw`|!Array\.isArray\(\s*${e}\s*\)\s*\|\|\s*!${e}\.(?:some|every)\()`);function x(e){const o=["isNodeList",...g.flatMap(n=>[...e.matchAll(n)].map(l=>l[1]))],s=[];for(const{head:n,by:l}of u){n.lastIndex=0;for(let t=n.exec(e);t;t=n.exec(e)){const a=b(e,t),i=t[1];if(!(l==="value"?[i]:[String.raw`[\w$.]+\[${i}\]`,...[...a.matchAll(new RegExp(String.raw`(?:const|let)\s+(\w+)\s*=\s*[^;]*\[${i}\]`,"g"))].map(f=>f[1])]).some(f=>y(f,o).test(a)))continue;const c=[...e.slice(0,t.index).matchAll(/function (\w+)|const (\w+) = (?:\([^)]*\)|\w+)[^=\n]*=>/g)].pop();s.push(c?c[1]??c[2]:"(top level)")}}return s}function L(e,o={}){const{check:s,report:n}=h("one walk over a node's lists"),l=o.allowed??{},t=e.filter(i=>w.test(i.path));s("the read found the source",t.length>=(o.minFiles??1),`read ${t.length} files, floor ${o.minFiles??1}`),p(s,t,Object.keys(l));const a=t.flatMap(i=>x(m(i.text)).filter(r=>!(l[i.path]??[]).includes(r)).map(r=>`${i.path} (${r})`));return s("no file keeps its own loop over a node's lists (use lib/document/node-lists)",a.length===0,a.length?`own loops: ${a.join(", ")}`:void 0),n()}export{L as oneNodeListLoop};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ruleChecks as
|
|
1
|
+
import{ruleChecks as y}from"./rule.js";import{SOURCE_FILE as S}from"./support/source-file.js";const f=/\b(?:function|const|let)\s+isNode(?:List|Array)?\b/,d=/Array\.isArray\(([\w.$]+)\)\s*(?:&&|\|\|)[^;]{0,240}?(?:\1\.every\(|\1\[0\])[^;]{0,240}?\btype\b/,n=String.raw`([\w$]+(?:\??\.[\w$]+|(?:\?\.)?\[[\w$]+\])*)`,h=/\(\s*([\w$]+)\s+as\s+[\w$.<>[\]|{}:?;, ]+?\)/g,w=s=>String.raw`${s}(?:\??\.type\b|\[["']type["']\])`,g=s=>String.raw`(?:${s}(?:\??\.props\b|\[["']props["']\])|["']props["']\s+in\s+${s}\b|Object\.hasOwn\(\s*${s}\s*,\s*["']props["']\s*\))`,e=String.raw`\s*[!=]==?\s*`,a=s=>String.raw`(?:typeof\s+${w(s)}${e}["']string["']|["']string["']${e}typeof\s+${w(s)})`,r=String.raw`[^;]{0,200}?`,l=[new RegExp(String.raw`typeof\s+${n}(?:\??\.type\b|\[["']type["']\])${e}["']string["']${r}${g("\\1")}`),new RegExp(String.raw`["']string["']${e}typeof\s+${n}(?:\??\.type\b|\[["']type["']\])${r}${g("\\1")}`),new RegExp(String.raw`${n}(?:\??\.props\b|\[["']props["']\])${r}${a("\\1")}`),new RegExp(String.raw`["']props["']\s+in\s+${n}${r}${a("\\1")}`),new RegExp(String.raw`Object\.hasOwn\(\s*${n}\s*,\s*["']props["']\s*\)${r}${a("\\1")}`),new RegExp(String.raw`\{\s*(?:type\s*:\s*(\w+)\s*,\s*props\s*:\s*\w+|props\s*:\s*\w+\s*,\s*type\s*:\s*(\w+))[^}]*\}${r}(?:typeof\s+(?:\1|\2)${e}["']string["']|["']string["']${e}typeof\s+(?:\1|\2)\b)`),new RegExp(String.raw`\{\s*(?:type\s*,\s*props|props\s*,\s*type)\b[^}]*\}${r}(?:typeof\s+type${e}["']string["']|["']string["']${e}typeof\s+type\b)`),new RegExp(String.raw`(?:const|let)\s+(\w+)\s*=\s*([\w$]+(?:\??\.[\w$]+)*)\??\.type\s*;\s*${r}(?:typeof\s+\1${e}["']string["']|["']string["']${e}typeof\s+\1\b)${r}\2\??\.props\b`)],E=s=>{const p=s.replace(h,"$1");return l.some(o=>o.test(p))},b=/Array\.isArray\(([\w$.]+)\)\s*&&[^;]{0,80}?\1\.every\(\s*isNode\s*\)/;function A(s){const{check:p,report:o}=y("one node-list check"),c=s.filter(t=>S.test(t.path)),i=c.filter(t=>f.test(t.text)).map(t=>t.path);p("no file declares isNode / isNodeList / isNodeArray (import them from efficient-easel/data)",i.length===0,i.length?`a local node check: ${i.join(", ")}`:void 0);const $=c.filter(t=>d.test(t.text)||b.test(t.text)||E(t.text)).map(t=>t.path);return p("no file writes the node check under another name",$.length===0,$.length?`a renamed node check: ${$.join(", ")}`:void 0),o()}export{A as oneNodeList};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type RuleReport, type SourceFile } from "./rule.js";
|
|
2
|
+
export type OneSeedIdHomeOptions = {
|
|
3
|
+
readonly home?: string;
|
|
4
|
+
readonly minFiles: number;
|
|
5
|
+
};
|
|
6
|
+
export declare function oneSeedIdHome(files: readonly SourceFile[], options: OneSeedIdHomeOptions): RuleReport;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ruleChecks as a}from"./rule.js";import{SOURCE_FILE as c}from"./support/source-file.js";import{stripComments as l}from"./support/ts-source.js";const h=[{name:"the id function",re:/~(?:[\w-]+|\$\{[^}]+\})\.\$\{\s*[\w$]+\.slice\(\s*2\s*\)\s*\}/},{name:"the node id read",re:/\bnonEmptyString\(\s*[\w$.]+\.id\s*\)\s*\?\?/},{name:"the node id read",re:/typeof\s+([\w$.]+)\.id\s*===\s*["'`]string["'`]\s*&&\s*\1\.id\.trim\(\s*\)/},{name:"the node id read",re:/\bString\(\s*[\w$.]+\.id\s*\?\?\s*["'`][A-Za-z]/}];function u(o,t){const{check:i,report:d}=a("one seed-id home"),s=o.filter(e=>c.test(e.path));i(`at least ${t.minFiles} source files read`,s.length>=t.minFiles,`${s.length} read`);const n=s.filter(e=>e.path!==t.home).flatMap(e=>{const m=l(e.text);return h.filter(r=>r.re.test(m)).map(r=>`${e.path} (${r.name})`)});return i("no file writes a seed id function or node id read of its own (import seedNodeId / slotSeedIds / withSeededSlot from lib/document/seed-parts)",n.length===0,n.length?`a copy: ${n.join(", ")}`:void 0),d()}export{u as oneSeedIdHome};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ruleChecks as y}from"./rule.js";const
|
|
2
|
-
${
|
|
1
|
+
import{ruleChecks as y}from"./rule.js";import{blockEnd as $}from"./support/css-rules.js";const f="<img",o="<Image",b=/createElement\(\s*["']img["']/g,w=/(^|\s)loading=(?:"lazy"|\{(?!\s*["'`]eager))|\{\s*loading:\s*"lazy"/,k=/\.\.\.\s*\(?\s*(?:deferred\b|useDeferredPicture\b)/,P=/\spriority(?=[\s/>]|=\{true\})|\sloading=(?:"eager"|\{\s*["'`]eager)/;function u(r,t){const n=[];let a=r.indexOf(t);for(;a!==-1;){const l=r[a+t.length];if(l===void 0||/\s|\/|>/.test(l)){let s=a;for(;s<r.length&&r[s]!==">";)s=r[s]==="{"?$(r,s)+1:s+1;n.push(r.slice(a,s+1))}a=r.indexOf(t,a+1)}return n}function d(r){const t=r.replace(/\/\*[\s\S]*?\*\/|(^|\s)\/\/.*$/gm,"$1"),n=/\buseDeferredPicture\(/.test(t);return[...u(t,f).filter(a=>!w.test(a)&&!(n&&k.test(a))),...u(t,o).filter(a=>P.test(a)),...t.match(b)??[]]}function x(r,t){const{check:n,report:a}=y("page picture place"),l=t.allowed??{};{const e=i=>`${f} ${i} />`,c=[["a bare tag",e('src={a} alt=""')],["a tag with an arrow in a handler",e("src={a} onError={() => fail()}")],["an eager tag",e('src={a} loading="eager"')],["an eager tag in braces",e('src={a} loading={"eager"}')],["a look-alike attribute",e('src={a} data-loading="x"')],["the word in a handler",e("src={a} onLoad={() => { state.loading = false; }}")],["a spread of `deferred` from anywhere",e("src={a} {...deferred}")],["a created tag",'createElement("img", { src: a })'],["a next image asked first",`${o} src={a} priority />`],["a next image made eager",`${o} src={a} loading="eager" />`],["a next image made eager in braces",`${o} src={a} loading={"eager"} />`],["a bare tag with a stray } before a lazy tag",`${e("src={a} }")} <p loading="lazy">x</p>`]];for(const[i,g]of c)n(`the reader finds ${i}`,d(g).length===1);const p=[["a lazy tag",e('src={a} loading="lazy"')],["a lazy tag in braces",e('src={a} loading={"lazy"}')],["a loading chosen in code",e('src={a} loading={far ? "lazy" : "eager"}')],["a conditional lazy tag",e('src={a} {...(far ? { loading: "lazy" as const } : {})}')],["a spread from the page's place",`const deferred = useDeferredPicture(); ${e("src={a} {...deferred}")}`],["a next image",`${o} src={a} />`],["a next image chosen by place",`${o} src={a} {...(far ? {} : { priority: true })} />`],["a lookalike block",`${o}Block src={a} priority />`],["another element that starts the same",`${f}Row src={a} />`]];for(const[i,g]of p)n(`…and leaves ${i} alone`,d(g).length===0)}const s=r.filter(e=>e.path.endsWith(".tsx"));n(`read the source (${s.length} .tsx files, at least ${t.minFiles})`,s.length>=t.minFiles,"fewer means the walk broke, and every check below is vacuous");const h=s.filter(e=>!(e.path in l)).flatMap(e=>d(e.text).map(()=>e.path));n("every plain picture says how it loads",h.length===0,`
|
|
2
|
+
${h.join(`
|
|
3
3
|
`)}
|
|
4
|
-
Draw a PagePicture, or spread useDeferredPicture (lib/first-screen).`);const m=Object.keys(
|
|
4
|
+
Draw a PagePicture, or spread useDeferredPicture (lib/first-screen).`);const m=Object.keys(l).filter(e=>!s.some(c=>c.path===e&&d(c.text).length>0));return n("every exemption still draws a silent picture",m.length===0,`drop these from \`allowed\`: ${m.join(", ")}`),a()}export{x as pagePicturePlace};
|