efficient-web-builder 52.0.0 → 54.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -0
- package/dist/editor/components/ChatSettingsPanel.js +1 -1
- package/dist/editor/components/DuplicateToPageMenu.d.ts +2 -0
- package/dist/editor/components/DuplicateToPageMenu.js +1 -1
- package/dist/editor/components/MediaUploadField.d.ts +7 -7
- package/dist/editor/components/MediaUploadField.js +1 -1
- package/dist/editor/components/PartSettingsPanel.js +1 -1
- package/dist/editor/components/PartTextBox.js +1 -1
- package/dist/editor/components/PreviewPartAnchors.js +1 -1
- package/dist/editor/components/SectionTextPartBridge.js +1 -1
- package/dist/editor/components/SiteAccentField.js +1 -1
- package/dist/editor/components/SiteTextStylesField.d.ts +3 -3
- package/dist/editor/components/SiteTextStylesField.js +1 -1
- package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
- package/dist/editor/components/storefront-editor.css +70 -20
- package/dist/editor/lib/animation/entrance-fields.js +1 -1
- package/dist/editor/lib/animation/hover-fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Breadcrumb/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Cards/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Chart/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Contents/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Hero/fields.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/ImageBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/IntroBleed/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Mockup/fields.js +2 -2
- package/dist/editor/lib/document/blocks/general/PostCard/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/SectionHeader/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Timeline/fields.js +1 -1
- package/dist/editor/lib/document/blocks/shared-fields.d.ts +5 -0
- package/dist/editor/lib/document/blocks/shared-fields.js +1 -1
- package/dist/editor/lib/document/box-fields.d.ts +23 -2
- package/dist/editor/lib/document/box-fields.js +1 -1
- package/dist/editor/lib/document/box-phone-order-field.d.ts +8 -0
- package/dist/editor/lib/document/box-phone-order-field.js +1 -0
- package/dist/editor/lib/document/card-row-fields.js +1 -1
- package/dist/editor/lib/document/choice-pictures.d.ts +21 -0
- package/dist/editor/lib/document/choice-pictures.js +1 -0
- package/dist/editor/lib/document/controls.d.ts +19 -5
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/hidable-rows-drawn.d.ts +1 -0
- package/dist/editor/lib/document/hidable-rows-drawn.js +1 -1
- package/dist/editor/lib/document/part-panel-rows.d.ts +1 -0
- package/dist/editor/lib/document/part-panel-rows.js +1 -1
- package/dist/editor/lib/document/separator-field.d.ts +9 -1
- package/dist/editor/lib/document/separator-field.js +1 -1
- package/dist/editor/lib/document/shape-picker.d.ts +37 -0
- package/dist/editor/lib/document/shape-picker.js +1 -0
- package/dist/editor/lib/document/show-for-field.d.ts +6 -0
- package/dist/editor/lib/document/show-for-field.js +1 -0
- package/dist/format/lib/animation/hover.d.ts +0 -2
- package/dist/format/lib/animation/hover.js +1 -1
- package/dist/format/lib/content/box-layout.d.ts +21 -6
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/box-phone-place.d.ts +11 -0
- package/dist/format/lib/content/box-phone-place.js +1 -0
- package/dist/format/lib/content/box-shape.d.ts +1 -5
- package/dist/format/lib/content/box-shape.js +1 -1
- package/dist/format/lib/content/box-show-for-choices.d.ts +9 -0
- package/dist/format/lib/content/box-show-for-choices.js +1 -0
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/gallery-card-layout.d.ts +45 -1
- package/dist/format/lib/content/gallery-card-layout.js +1 -1
- package/dist/format/lib/content/image-aspect.d.ts +47 -0
- package/dist/format/lib/content/image-aspect.js +1 -0
- package/dist/format/lib/content/list-number.d.ts +11 -0
- package/dist/format/lib/content/list-number.js +1 -1
- package/dist/format/lib/content/phone-focus.d.ts +4 -1
- package/dist/format/lib/content/phone-focus.js +1 -1
- package/dist/format/lib/content/record-row.d.ts +14 -0
- package/dist/format/lib/content/record-row.js +1 -0
- package/dist/format/lib/content/record-types.d.ts +1 -1
- package/dist/format/lib/content/record-types.js +1 -1
- package/dist/format/lib/content/section-height.d.ts +8 -0
- package/dist/format/lib/content/section-height.js +1 -1
- package/dist/format/lib/document/blocks/block-types.d.ts +1 -1
- package/dist/format/lib/document/blocks/general/Flex/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/text-part-shapes.json +2 -2
- package/dist/format/lib/document/media-manifest.json +5 -2
- package/dist/format/lib/document/mockup-variant-fields.d.ts +1 -0
- package/dist/format/lib/document/mockup-variant-fields.js +1 -1
- package/dist/format/lib/document/section-catalog.js +2 -2
- package/dist/format/lib/document/section-descriptions.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +26 -11
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/fonts.js +1 -1
- package/dist/format/lib/sections/divider-style.d.ts +4 -0
- package/dist/format/lib/sections/divider-style.js +1 -1
- package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
- package/dist/format/lib/sections/section-presets.js +1 -1
- package/dist/format/lib/source-rules/editor-words.js +2 -2
- package/dist/format/lib/source-rules/mirrored-rows-agree.js +4 -4
- package/dist/format/lib/source-rules/shape-rows-use-the-picker.d.ts +7 -0
- package/dist/format/lib/source-rules/shape-rows-use-the-picker.js +2 -0
- package/dist/format/lib/text-styles/site-text-colours.d.ts +2 -9
- package/dist/format/lib/text-styles/site-text-colours.js +1 -1
- package/dist/render/components/Breadcrumb.d.ts +2 -1
- package/dist/render/components/Breadcrumb.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +1 -1
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/ContentsList.d.ts +4 -1
- package/dist/render/components/ContentsList.js +1 -1
- package/dist/render/components/CurrentRecord.d.ts +23 -0
- package/dist/render/components/CurrentRecord.js +1 -0
- package/dist/render/components/Flex.d.ts +3 -2
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/HeroPictures.d.ts +2 -0
- package/dist/render/components/HeroPictures.js +1 -1
- package/dist/render/components/HeroPoster.d.ts +2 -1
- package/dist/render/components/HeroPoster.js +1 -1
- package/dist/render/components/HeroSection.d.ts +2 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.d.ts +3 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.d.ts +3 -1
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/ImageBlock.d.ts +5 -3
- package/dist/render/components/ImageBlock.js +1 -1
- package/dist/render/components/InBoxContext.d.ts +4 -0
- package/dist/render/components/SiteGutterFrame.d.ts +1 -0
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/lib/content/block-size.d.ts +3 -0
- package/dist/render/lib/content/block-size.js +1 -1
- package/dist/render/lib/content/box-show-for.d.ts +14 -0
- package/dist/render/lib/content/box-show-for.js +1 -0
- package/dist/render/lib/content/page-contents.d.ts +1 -0
- package/dist/render/lib/content/page-contents.js +1 -1
- package/dist/render/lib/content/picture-focus-rows.d.ts +13 -0
- package/dist/render/lib/content/picture-focus-rows.js +1 -0
- package/dist/render/lib/document/blocks/general/Breadcrumb/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Contents/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Hero/render.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/ImageBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/part-styles.d.ts +21 -7
- package/dist/render/lib/document/part-styles.js +2 -2
- package/dist/render/lib/document/passes/block-size.js +1 -1
- package/dist/render/lib/document/passes/index.js +1 -1
- package/dist/render/lib/document/passes/show-for.d.ts +2 -0
- package/dist/render/lib/document/passes/show-for.js +1 -0
- package/dist/render/lib/document/passes/slots-start-afresh.js +1 -1
- package/dist/render/lib/document/show-when.js +1 -1
- package/dist/render/lib/text-styles/site-text-styles.js +2 -2
- package/package.json +3 -3
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SlotCell } from "efficient-easel/render";
|
|
2
|
+
export declare const BOX_PHONE_PLACE_CLASS = "max-view-wide:[&>*]:order-[var(--sf-phone-place)]";
|
|
3
|
+
export declare const BOX_PHONE_PLACE_TABLET_CLASS = "max-view-tablet:[&>*]:order-[var(--sf-phone-place)]";
|
|
4
|
+
export declare const BOX_PHONE_PLACE_CANVAS_CLASS = "max-view-wide:order-[var(--sf-phone-place)]";
|
|
5
|
+
export declare const BOX_PHONE_PLACE_CANVAS_TABLET_CLASS = "max-view-tablet:order-[var(--sf-phone-place)]";
|
|
6
|
+
export declare const BOX_CELL_CLASS = "contents [&>*]:grow-[inherit] [&>*]:shrink-[inherit] [&>*]:basis-[inherit] [&>*]:min-w-[inherit]";
|
|
7
|
+
export declare function boxPhoneOrder(value: unknown, ids: readonly string[]): string[] | undefined;
|
|
8
|
+
export declare function boxPhoneCell(order: readonly string[] | undefined, { tabletKeepsRow, editing }: {
|
|
9
|
+
tabletKeepsRow: boolean;
|
|
10
|
+
editing: boolean;
|
|
11
|
+
}): ((id: string) => SlotCell) | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{readPhoneOrderIds as s}from"efficient-easel/data";const a="max-view-wide:[&>*]:order-[var(--sf-phone-place)]",_="max-view-tablet:[&>*]:order-[var(--sf-phone-place)]",c="max-view-wide:order-[var(--sf-phone-place)]",p="max-view-tablet:order-[var(--sf-phone-place)]",A="contents [&>*]:grow-[inherit] [&>*]:shrink-[inherit] [&>*]:basis-[inherit] [&>*]:min-w-[inherit]",h="unnamed:";function d(e,r){const n=Array.isArray(e)?e.filter(t=>!(typeof t=="string"&&t.startsWith(h))):e;return s(n,r)}function f(e,{tabletKeepsRow:r,editing:n}){if(!e)return;const t=n?r?p:c:`${A} ${r?_:a}`;return i=>{const o=e.indexOf(i);return{className:t,style:{"--sf-phone-place":o<0?e.length:o}}}}export{A as BOX_CELL_CLASS,c as BOX_PHONE_PLACE_CANVAS_CLASS,p as BOX_PHONE_PLACE_CANVAS_TABLET_CLASS,a as BOX_PHONE_PLACE_CLASS,_ as BOX_PHONE_PLACE_TABLET_CLASS,f as boxPhoneCell,d as boxPhoneOrder};
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
export declare const BOX_SHAPES: readonly ["auto", "tall", "square", "landscape", "wide"];
|
|
1
|
+
export declare const BOX_SHAPES: readonly ["auto", "tall", "square", "landscape", "video", "wide", "panorama"];
|
|
2
2
|
export type BoxShape = (typeof BOX_SHAPES)[number];
|
|
3
|
-
export declare const BOX_SHAPE_OPTIONS: readonly {
|
|
4
|
-
label: string;
|
|
5
|
-
value: BoxShape;
|
|
6
|
-
}[];
|
|
7
3
|
export declare function boxShapeOf(value: unknown): BoxShape;
|
|
8
4
|
export declare function boxShapeClass(value: unknown): string;
|
|
9
5
|
export declare function boxShapePhoneOf(desktop: unknown, phone: unknown): BoxShape | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{galleryCardRatioClass as
|
|
1
|
+
import{galleryCardRatioClass as u}from"./gallery-card-layout.js";const w=["auto","tall","square","landscape","video","wide","panorama"];function o(e){return w.includes(String(e??""))?e:"auto"}function l(e){const a=o(e);return a==="auto"?"":u(a)}const p={tall:"view-wide:aspect-[3/4]",square:"view-wide:aspect-square",landscape:"view-wide:aspect-[4/3]",video:"view-wide:aspect-[16/9]",wide:"view-wide:aspect-[2/1]",panorama:"view-wide:aspect-[21/9]"},v={auto:"max-view-wide:aspect-auto",tall:"max-view-wide:h-auto max-view-wide:aspect-[3/4]",square:"max-view-wide:h-auto max-view-wide:aspect-square",landscape:"max-view-wide:h-auto max-view-wide:aspect-[4/3]",video:"max-view-wide:h-auto max-view-wide:aspect-[16/9]",wide:"max-view-wide:h-auto max-view-wide:aspect-[2/1]",panorama:"max-view-wide:h-auto max-view-wide:aspect-[21/9]"};function d(e,a){return w.includes(String(a??""))?a===o(e)?null:a:null}const c={auto:"view-tablet:max-view-desktop:aspect-auto!",tall:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[3/4]!",square:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-square!",landscape:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[4/3]!",video:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[16/9]!",wide:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[2/1]!",panorama:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[21/9]!"};function r(e){return w.includes(String(e??""))?e:null}function m(e,a,n){const t=r(n),i=d(e,w.includes(String(a??""))?a:t);if(i===null&&t===null)return l(e);const s=o(e);return[i===null?l(e):s==="auto"?"":p[s],i===null?"":v[i],t===null?"":c[t]].filter(Boolean).join(" ")}export{w as BOX_SHAPES,l as boxShapeClass,m as boxShapeClasses,o as boxShapeOf,d as boxShapePhoneOf,r as boxShapeTabletOf};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const SHOW_FOR_PROP = "showFor";
|
|
2
|
+
export interface ShowForChoice {
|
|
3
|
+
slug: string;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function registerShowForChoices(choices: readonly ShowForChoice[] | null): void;
|
|
7
|
+
export declare function showForChoices(): readonly ShowForChoice[];
|
|
8
|
+
export declare function showForChoicesRevision(): number;
|
|
9
|
+
export declare function showForOf(value: unknown): ShowForChoice | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{globalRegistry as s}from"../global-registry.js";const c="showFor";function e(){return s("efficient.box-show-for-choices",()=>({choices:[],revision:0}))}const i=o=>!!o&&typeof o=="object"&&typeof o.slug=="string"&&o.slug.trim()!==""&&typeof o.name=="string"&&o.name.trim()!=="";function f(o){const r=e();r.choices=(o??[]).filter(i).map(t=>({slug:t.slug,name:t.name})),r.revision+=1}function u(){return e().choices}function h(){return e().revision}function g(o){return i(o)?{slug:o.slug,name:o.name}:void 0}export{c as SHOW_FOR_PROP,f as registerShowForChoices,u as showForChoices,h as showForChoicesRevision,g as showForOf};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{blockSourceSpec as x,declaredBlockSource as g}from"./block-sources.js";import{isNodeList as T}from"efficient-easel/data";import{BOX_TYPE as w}from"../document/container-blocks.js";import{globalRegistry as C}from"../global-registry.js";import{nonEmptyString as p}from"../non-empty-string.js";import{withCardsTemplate as B}from"../document/cards-template-on-read.js";const R="template",j="Card template",A=["Text","ImageBlock","ButtonBlock","Flex"],u="rowField",O="rowLinkField";function K(){return{type:"slot",allow:[...A]}}const h=[{block:"OrderSummary",typedRows:"rows",fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:"Cards",typedRows:"items",fields:[{key:"num",label:"Number"},{key:"since",label:"Corner note"},{key:"label",label:"Label"},{key:"title",label:"Card title"},{key:"value",label:"Value"},{key:"body",label:"Card body",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:"count",label:"Count"},{key:"badge",label:"Highlight badge",everySource:!0}],seed:e=>B("Cards",e)}];function
|
|
1
|
+
import{blockSourceSpec as x,declaredBlockSource as g}from"./block-sources.js";import{isNodeList as T}from"efficient-easel/data";import{BOX_TYPE as w}from"../document/container-blocks.js";import{globalRegistry as C}from"../global-registry.js";import{nonEmptyString as p}from"../non-empty-string.js";import{withCardsTemplate as B}from"../document/cards-template-on-read.js";const R="template",j="Card template",A=["Text","ImageBlock","ButtonBlock","Flex"],u="rowField",O="rowLinkField";function K(){return{type:"slot",allow:[...A]}}const h=[{block:"OrderSummary",typedRows:"rows",fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:"Cards",typedRows:"items",fields:[{key:"num",label:"Number"},{key:"since",label:"Corner note"},{key:"label",label:"Label"},{key:"title",label:"Card title"},{key:"value",label:"Value"},{key:"body",label:"Card body",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:"count",label:"Count"},{key:"badge",label:"Highlight badge",everySource:!0}],seed:e=>B("Cards",e)}];function i(){return C("efficient.card-templates",()=>new Map(h.map(e=>[e.block,e])))}function W(e){for(const t of e){if(typeof t.block!="string"||!t.block)throw new Error("A card template names no block.");const r=[];for(const o of t.blocks??[]){if(typeof o?.type!="string"||!o.type)throw new Error(`The card template of ${t.block} names an empty block.`);r.some(c=>c.type===o.type)||r.push({type:o.type,label:o.label||o.type})}const n=p(t.typedRows);i().set(t.block,{block:t.block,fields:t.fields.map(o=>({...o})),blocks:r,typedRows:n,...t.seed?{seed:t.seed}:{}})}}function _(e,t){const r=e?i().get(e)?.seed:void 0;return r?r(t):t}function U(e,t){if(!(t.template===void 0||Array.isArray(t.template)&&t.template.length===0))return t;const{template:n,...o}=t,c=_(e,o);return c===o?t:c}function H(){for(const e of i().values())if(e.blocks?.length)return!0;return!1}function V(e){return i().get(e)?.blocks??[]}function X(e){for(const t of i().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function Y(e){return typeof e=="string"&&i().get(e)?.typedRows||""}function E(e){return typeof e=="string"&&i().has(e)}function $(e,t){const r=i().get(e)?.fields??[];return t?r.filter(n=>(n.kind??"text")===t):r}function L(e,t){const r=typeof e?.type=="string"?e.type:"";if(!r)return[];const n=i().get(r)?.fields??[],o=x(g(e?.props))?.fields,c=o?.length?[...o.map(l=>({...l})),...n.filter(l=>l.everySource&&!o.some(s=>s.key===l.key))]:n;return t?c.filter(l=>(l.kind??"text")===t):c}function q(e,t,r){return e?r?L(r).find(n=>n.key===t)??null:i().get(e)?.fields.find(n=>n.key===t)??null:null}function y(e,t=u){const r=e?.[t];return typeof r=="string"?r.trim():""}function z(e,t){return e.key||String(t+1)}function G(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[r,n]of Object.entries(e))typeof n=="string"&&(t[r]=n);return t}function J(e,t,r=""){const n=t&&e&&typeof e=="object"?e[t]:void 0;if(!Array.isArray(n))return"";for(const o of n){const c=typeof o=="string"?o:o?.src,l=p(typeof c=="string"?c.trim():void 0);if(l&&l!==r.trim())return l}return""}const m={Text:{text:u},ImageBlock:{src:u},ButtonBlock:{label:u,href:O},Breadcrumb:{currentCrumb:u}};function Q(e,t,r){return P(e,t,r)!==""}function P(e,t,r){const n=m[e]?.[r];return n?y(t,n):""}function S(e,t){return!t||!e?null:e[t]??""}function Z(e,t,r){if(!r)return t;let n=null;for(const[o,c]of Object.entries(m[e]??{})){const l=S(r,y(t,c));l!==null&&(n??={...t},n[o]=l)}return n??t}function f(e,t){const r=e?.data?.content;if(!Array.isArray(r)||typeof t!="string")return;const n=(c,l)=>{for(const s of c){if(s?.props?.id===t)return l;for(const[b,d]of Object.entries(s?.props??{})){if(!T(d))continue;const k=b===R&&E(s.type)?{owner:s,direct:!0,nested:l!==null,underBox:!1}:l&&{owner:l.owner,direct:!1,nested:l.nested,underBox:l.underBox||s.type===w},a=n(d,k);if(a!==void 0)return a}}},o=n(r,null);return o===void 0?null:o}function ee(e,t){const r=f(e,t);return r&&r.owner}function te(e,t){const r=f(e,t);return r&&(r.direct?r.owner:null)}function re(e,t){const r=f(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}export{u as CARD_ROW_FIELD_PROP,O as CARD_ROW_LINK_PROP,A as CARD_TEMPLATE_BLOCKS,j as CARD_TEMPLATE_LABEL,R as CARD_TEMPLATE_SLOT,re as cardCopyPlace,z as cardKeyOf,G as cardRow,V as cardTemplateBlocks,te as cardTemplateCardOwner,q as cardTemplateField,$ as cardTemplateFields,L as cardTemplateFieldsOf,ee as cardTemplateOwner,K as cardTemplateSlot,Y as cardTemplateTypedRows,H as cardTemplatesNameBlocks,E as hasCardTemplate,X as isCardTemplateBlock,y as namedRowField,W as registerCardTemplates,Q as rowBound,P as rowFieldOf,S as rowFieldText,Z as rowFilledProps,J as rowNextPicture,U as templateOnInsert,_ as templateOnRead};
|
|
@@ -1,8 +1,52 @@
|
|
|
1
1
|
import { type HeroGroupPlacement } from "../hero-group-placement.js";
|
|
2
|
-
export declare const GALLERY_CARD_RATIOS: readonly ["square", "tall", "wide", "landscape", "portrait", "auto"];
|
|
2
|
+
export declare const GALLERY_CARD_RATIOS: readonly ["square", "tall", "wide", "landscape", "portrait", "video", "panorama", "auto"];
|
|
3
3
|
export type GalleryCardRatio = (typeof GALLERY_CARD_RATIOS)[number];
|
|
4
4
|
export declare const GALLERY_CARD_RATIO_DEFAULT: GalleryCardRatio;
|
|
5
5
|
export declare function galleryCardRatioClass(ratio?: string): string;
|
|
6
|
+
export interface ShapeLine {
|
|
7
|
+
shape: GalleryCardRatio;
|
|
8
|
+
image: string;
|
|
9
|
+
ratio: readonly [number, number] | null;
|
|
10
|
+
label: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const SHAPE_TABLE: readonly [{
|
|
13
|
+
readonly shape: "auto";
|
|
14
|
+
readonly image: "auto";
|
|
15
|
+
readonly ratio: null;
|
|
16
|
+
readonly label: "Auto";
|
|
17
|
+
}, {
|
|
18
|
+
readonly shape: "tall";
|
|
19
|
+
readonly image: "3/4";
|
|
20
|
+
readonly ratio: readonly [3, 4];
|
|
21
|
+
readonly label: "Tall 3:4";
|
|
22
|
+
}, {
|
|
23
|
+
readonly shape: "square";
|
|
24
|
+
readonly image: "1/1";
|
|
25
|
+
readonly ratio: readonly [1, 1];
|
|
26
|
+
readonly label: "Square 1:1";
|
|
27
|
+
}, {
|
|
28
|
+
readonly shape: "landscape";
|
|
29
|
+
readonly image: "4/3";
|
|
30
|
+
readonly ratio: readonly [4, 3];
|
|
31
|
+
readonly label: "Landscape 4:3";
|
|
32
|
+
}, {
|
|
33
|
+
readonly shape: "video";
|
|
34
|
+
readonly image: "16/9";
|
|
35
|
+
readonly ratio: readonly [16, 9];
|
|
36
|
+
readonly label: "Video 16:9";
|
|
37
|
+
}, {
|
|
38
|
+
readonly shape: "wide";
|
|
39
|
+
readonly image: "2/1";
|
|
40
|
+
readonly ratio: readonly [2, 1];
|
|
41
|
+
readonly label: "Wide 2:1";
|
|
42
|
+
}, {
|
|
43
|
+
readonly shape: "panorama";
|
|
44
|
+
readonly image: "21/9";
|
|
45
|
+
readonly ratio: readonly [21, 9];
|
|
46
|
+
readonly label: "Panorama 21:9";
|
|
47
|
+
}];
|
|
48
|
+
export type ImageShapeValue = (typeof SHAPE_TABLE)[number]["image"];
|
|
49
|
+
export declare function shapeLines(shapes: readonly GalleryCardRatio[]): readonly ShapeLine[];
|
|
6
50
|
export declare const GALLERY_CAPTION_PLACES: readonly ["overlay", "below"];
|
|
7
51
|
export type GalleryCaptionPlace = (typeof GALLERY_CAPTION_PLACES)[number];
|
|
8
52
|
export declare function galleryCaptionIsBelow(place?: string): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{normalisePlacement as
|
|
1
|
+
import{normalisePlacement as n,placementParts as o}from"../hero-group-placement.js";import{scrim as t}from"./scrim.js";const A=["square","tall","wide","landscape","portrait","video","panorama","auto"],g="square";function f(e){switch(e){case"tall":return"aspect-[3/4]";case"wide":return"aspect-[2/1]";case"landscape":return"aspect-[4/3]";case"portrait":return"aspect-[4/5]";case"video":return"aspect-[16/9]";case"panorama":return"aspect-[21/9]";case"auto":return"";default:return"aspect-square"}}const s=[{shape:"auto",image:"auto",ratio:null,label:"Auto"},{shape:"tall",image:"3/4",ratio:[3,4],label:"Tall 3:4"},{shape:"square",image:"1/1",ratio:[1,1],label:"Square 1:1"},{shape:"landscape",image:"4/3",ratio:[4,3],label:"Landscape 4:3"},{shape:"video",image:"16/9",ratio:[16,9],label:"Video 16:9"},{shape:"wide",image:"2/1",ratio:[2,1],label:"Wide 2:1"},{shape:"panorama",image:"21/9",ratio:[21,9],label:"Panorama 21:9"}];function L(e){return s.filter(a=>e.includes(a.shape))}const _=["overlay","below"];function h(e){return e==="below"}const b="bottom-left";function x(e){const{band:a,column:r}=o(n(e));return["justify-start","justify-center","justify-end"][a]+(r==="center"?" text-center":r==="end"?" text-right":"")}const i=`linear-gradient(180deg, transparent 40%, ${t(.85)} 100%)`,l=`linear-gradient(0deg, transparent 40%, ${t(.85)} 100%)`,c=t(.45);function C(e){return[l,c,i][o(n(e)).band]}export{b as GALLERY_CAPTION_ANCHOR_DEFAULT,_ as GALLERY_CAPTION_PLACES,A as GALLERY_CARD_RATIOS,g as GALLERY_CARD_RATIO_DEFAULT,s as SHAPE_TABLE,x as galleryCaptionAnchorClass,h as galleryCaptionIsBelow,C as galleryCaptionWash,f as galleryCardRatioClass,L as shapeLines};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ShowWhenRule } from "efficient-shell/format";
|
|
2
|
+
import { type ImageShapeValue } from "./gallery-card-layout.js";
|
|
3
|
+
type ImageRatio = ImageShapeValue;
|
|
4
|
+
export declare const FILL_ROW = "fill";
|
|
5
|
+
export type ImageAspect = ImageRatio | typeof FILL_ROW;
|
|
6
|
+
export declare const FILL_ROW_OPTION: {
|
|
7
|
+
label: string;
|
|
8
|
+
value: typeof FILL_ROW;
|
|
9
|
+
showWhen: ShowWhenRule;
|
|
10
|
+
};
|
|
11
|
+
declare const FILL_ROW_CLASSES: {
|
|
12
|
+
readonly all: {
|
|
13
|
+
readonly frame: "h-full min-h-[240px]";
|
|
14
|
+
readonly img: "absolute inset-0";
|
|
15
|
+
readonly figure: "h-full";
|
|
16
|
+
};
|
|
17
|
+
readonly wide: {
|
|
18
|
+
readonly frame: "view-wide:h-full view-wide:min-h-[240px]";
|
|
19
|
+
readonly img: "view-wide:absolute view-wide:inset-0";
|
|
20
|
+
readonly figure: "view-wide:h-full";
|
|
21
|
+
};
|
|
22
|
+
readonly tablet: {
|
|
23
|
+
readonly frame: "view-tablet:h-full view-tablet:min-h-[240px] view-tablet:aspect-auto!";
|
|
24
|
+
readonly img: "view-tablet:absolute view-tablet:inset-0";
|
|
25
|
+
readonly figure: "view-tablet:h-full";
|
|
26
|
+
};
|
|
27
|
+
readonly desktop: {
|
|
28
|
+
readonly frame: "view-desktop:h-full view-desktop:min-h-[240px] max-view-desktop:aspect-[4/3]";
|
|
29
|
+
readonly img: "view-desktop:absolute view-desktop:inset-0";
|
|
30
|
+
readonly figure: "view-desktop:h-full";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
type ImageFillFrom = keyof typeof FILL_ROW_CLASSES;
|
|
34
|
+
export declare function imageFillFrom(rowFrom: "tablet" | "desktop" | undefined, phoneRowFills: boolean, phone: unknown): ImageFillFrom;
|
|
35
|
+
export declare function imageFillRowClasses(from: ImageFillFrom): {
|
|
36
|
+
frame: string;
|
|
37
|
+
img: string;
|
|
38
|
+
figure: string;
|
|
39
|
+
};
|
|
40
|
+
export declare function imageAspectDrawn(aspect: unknown, rowGivesHeight: boolean): unknown;
|
|
41
|
+
export declare function imageAspectPhoneRest(desktop: unknown): ImageRatio | undefined;
|
|
42
|
+
export declare function imageAspectPhoneOf(drawn: unknown, phone: unknown): ImageRatio | null;
|
|
43
|
+
export declare function imageAspectDrawsARatio(aspect: unknown, phone: unknown): boolean;
|
|
44
|
+
export declare function imageFocalPointActs(fit: unknown, aspect: unknown, phone: unknown): boolean;
|
|
45
|
+
export declare function imageFocalPointActsIn(view: "desktop" | "tablet" | "mobile", fit: unknown, aspect: unknown, phone: unknown): boolean;
|
|
46
|
+
export declare function imageAspectClasses(drawn: unknown, phone: ImageRatio | null, fillFrom?: ImageFillFrom): string;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{BOX_GIVES_PICTURES_A_HEIGHT as p}from"./box-layout.js";import{imageIsCropped as n,parseImageFit as w}from"./image-fit.js";import{SHAPE_TABLE as m}from"./gallery-card-layout.js";const f=m.map(e=>e.image),a="fill",E={label:"Fill row",value:a,showWhen:p},r="4/3",v={all:{frame:"h-full min-h-[240px]",img:"absolute inset-0",figure:"h-full"},wide:{frame:"view-wide:h-full view-wide:min-h-[240px]",img:"view-wide:absolute view-wide:inset-0",figure:"view-wide:h-full"},tablet:{frame:"view-tablet:h-full view-tablet:min-h-[240px] view-tablet:aspect-auto!",img:"view-tablet:absolute view-tablet:inset-0",figure:"view-tablet:h-full"},desktop:{frame:"view-desktop:h-full view-desktop:min-h-[240px] max-view-desktop:aspect-[4/3]",img:"view-desktop:absolute view-desktop:inset-0",figure:"view-desktop:h-full"}};function R(e,t,i){return t&&!s(i)?"all":e??"wide"}function c(e){return v[e]}const d={auto:"","3/4":"aspect-[3/4]","2/1":"aspect-[2/1]","21/9":"aspect-[21/9]","16/9":"aspect-[16/9]","4/3":"aspect-[4/3]","1/1":"aspect-square"},x={auto:"","3/4":"view-wide:aspect-[3/4]","2/1":"view-wide:aspect-[2/1]","21/9":"view-wide:aspect-[21/9]","16/9":"view-wide:aspect-[16/9]","4/3":"view-wide:aspect-[4/3]","1/1":"view-wide:aspect-square"},_={auto:"","3/4":"max-view-wide:aspect-[3/4]","2/1":"max-view-wide:aspect-[2/1]","21/9":"max-view-wide:aspect-[21/9]","16/9":"max-view-wide:aspect-[16/9]","4/3":"max-view-wide:aspect-[4/3]","1/1":"max-view-wide:aspect-square"},A={auto:"max-view-wide:aspect-auto!","3/4":"max-view-wide:aspect-[3/4]!","2/1":"max-view-wide:aspect-[2/1]!","21/9":"max-view-wide:aspect-[21/9]!","16/9":"max-view-wide:aspect-[16/9]!","4/3":"","1/1":"max-view-wide:aspect-square!"},s=e=>f.includes(e);function F(e,t){return e===a&&!t?r:e}function h(e){return e===a?r:s(e)?e:void 0}function u(e,t){return s(t)?t===e?null:t:e===a?r:null}function g(e,t){const i=u(e,t);return n(e,"cover")||i!==null&&n(i,"cover")}function L(e,t,i){return w(e,"cover")==="cover"&&g(t,i)}function P(e,t,i,o){return e==="desktop"?L(t,i,o):w(t,"cover")!=="cover"?!1:l(e==="tablet"?i:u(i,o)??i)}const l=e=>e===a||s(e)&&e!=="auto";function S(e,t,i="wide"){return e===a&&i==="all"?c("all").frame:t===null?s(e)?d[e]:"":[e===a?c(i).frame:s(e)?x[e]:"",e===a&&i==="desktop"?A[t]:_[t]].filter(Boolean).join(" ")}export{a as FILL_ROW,E as FILL_ROW_OPTION,S as imageAspectClasses,F as imageAspectDrawn,g as imageAspectDrawsARatio,u as imageAspectPhoneOf,h as imageAspectPhoneRest,R as imageFillFrom,c as imageFillRowClasses,L as imageFocalPointActs,P as imageFocalPointActsIn};
|
|
@@ -1 +1,12 @@
|
|
|
1
1
|
export declare const listNumber: (index: number) => string;
|
|
2
|
+
export declare const LIST_NUMBER_FORMS: readonly [{
|
|
3
|
+
readonly label: "01 ·";
|
|
4
|
+
readonly value: "two-digit";
|
|
5
|
+
}, {
|
|
6
|
+
readonly label: "1.";
|
|
7
|
+
readonly value: "plain";
|
|
8
|
+
}];
|
|
9
|
+
export type ListNumberForm = (typeof LIST_NUMBER_FORMS)[number]["value"];
|
|
10
|
+
export declare const LIST_NUMBER_FORM_DEFAULT: ListNumberForm;
|
|
11
|
+
export declare const readListNumberForm: (value: unknown) => ListNumberForm;
|
|
12
|
+
export declare const listNumberIn: (form: ListNumberForm, index: number) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e=t=>String(t+1).padStart(2,"0"),r=[{label:"01 ·",value:"two-digit"},{label:"1.",value:"plain"}],l="two-digit",a=t=>t==="plain"?"plain":l,i=(t,o)=>t==="plain"?`${o+1}.`:e(o);export{r as LIST_NUMBER_FORMS,l as LIST_NUMBER_FORM_DEFAULT,e as listNumber,i as listNumberIn,a as readListNumberForm};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { CSSProperties } from "react";
|
|
2
2
|
export declare const PHONE_FOCUS_CLASS = "sf-focus-phone";
|
|
3
3
|
export declare const PHONE_FOCUS_VAR = "--sf-focus-phone";
|
|
4
|
-
export declare
|
|
4
|
+
export declare const TABLET_FOCUS_CLASS = "sf-focus-tablet";
|
|
5
|
+
export declare const TABLET_FOCUS_VAR = "--sf-focus-tablet";
|
|
6
|
+
export declare const focusPoint: (value: unknown) => string | null;
|
|
7
|
+
export declare function phoneFocus(phone: unknown, tablet?: unknown): {
|
|
5
8
|
className: string;
|
|
6
9
|
style: CSSProperties;
|
|
7
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{formatFocal as
|
|
1
|
+
import{formatFocal as c,parseFocal as r}from"efficient-shell/format";const f="sf-focus-phone",p="--sf-focus-phone",i="sf-focus-tablet",l="--sf-focus-tablet",e=t=>{if(typeof t!="string"||!/^\s*-?\d+(\.\d+)?%\s+-?\d+(\.\d+)?%\s*$/.test(t))return null;const{x:s,y:o}=r(t);return c(s,o)};function a(t,s){const o=e(s),n=e(t)??o;return{className:[o?i:"",n?f:""].filter(Boolean).join(" "),style:{...o?{[l]:o}:{},...n?{[p]:n}:{}}}}export{f as PHONE_FOCUS_CLASS,p as PHONE_FOCUS_VAR,i as TABLET_FOCUS_CLASS,l as TABLET_FOCUS_VAR,e as focusPoint,a as phoneFocus};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SourceRow } from "./block-sources.js";
|
|
2
|
+
import type { CardRowFieldKind, CardRowFieldSpec } from "./card-template.js";
|
|
3
|
+
export declare const RECORD_TITLE_FIELD = "title";
|
|
4
|
+
export declare function recordPictureAlt(key: string): string;
|
|
5
|
+
export interface RecordForRow {
|
|
6
|
+
title?: unknown;
|
|
7
|
+
fields?: Readonly<Record<string, unknown>> | null;
|
|
8
|
+
schema?: readonly {
|
|
9
|
+
key: string;
|
|
10
|
+
kind: string;
|
|
11
|
+
}[] | null;
|
|
12
|
+
}
|
|
13
|
+
export declare function recordRow(record: RecordForRow, dateWords?: (iso: string) => string): SourceRow;
|
|
14
|
+
export declare function recordRowFields(key: string, kind: CardRowFieldKind): readonly CardRowFieldSpec[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{PRODUCT_RECORD_TYPE as c,recordFields as n,recordTypeSpec as p}from"./record-types.js";import{say as y}from"../editor-words.js";const a="title";function s(e){return`${e}Alt`}function m(e){const r=e.find(t=>typeof t?.url=="string");return{url:r?.url??"",alt:typeof r?.alt=="string"?r.alt:""}}function R(e,r){const t={[a]:typeof e.title=="string"?e.title:""};for(const{key:o,kind:l}of e.schema??[]){const i=e.fields?.[o];if(l==="text"&&typeof i=="string")t[o]=i;else if(l==="date"&&typeof i=="string")t[o]=i&&r?r(i):i;else if(l==="images"&&Array.isArray(i)){const{url:f,alt:u}=m(i);t[o]=f,t[s(o)]=u}}return t}function T(e,r){return e===c||!p(e)?[]:r==="image"?n(e,["images"]).map(t=>({key:t.key,label:t.label,kind:"image",alt:s(t.key)})):r!=="text"?[]:[{key:a,label:y("Title")},...n(e,["text","date"]).map(t=>({key:t.key,label:t.label}))]}export{a as RECORD_TITLE_FIELD,s as recordPictureAlt,R as recordRow,T as recordRowFields};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const PRODUCT_RECORD_TYPE = "product";
|
|
2
2
|
export declare const TEMPLATE_RECORD_TYPE_PROP = "recordType";
|
|
3
|
-
export type RecordFieldKind = "text" | "date";
|
|
3
|
+
export type RecordFieldKind = "text" | "date" | "images";
|
|
4
4
|
export interface RecordFieldSpec {
|
|
5
5
|
key: string;
|
|
6
6
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t="product",f="recordType",i={key:t,label:"Product",fields:[]},l=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,a=/^[a-z][A-Za-z0-9]*$/,u=["text","date"],n=new Map;let s=0;function y(e){if(typeof e.key!="string"||!l.test(e.key))throw new Error(`A record type key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(e.key===t)throw new Error("The product record type is the builder's own and is not declared by a host.");if(typeof e.label!="string"||!e.label.trim())throw new Error(`The record type ${e.key} has no label.`);const o=new Set;for(const r of e.fields){if(typeof r.key!="string"||!a.test(r.key)||o.has(r.key))throw new Error(`The record type ${e.key} has a field key it cannot use: ${JSON.stringify(r.key)}.`);if(!u.includes(r.kind))throw new Error(`The field ${r.key} of ${e.key} has no kind ${JSON.stringify(r.kind)}.`);o.add(r.key)}return{key:e.key,label:e.label.trim(),fields:e.fields.map(r=>({...r}))}}function k(e){const o=e.map(y);for(const r of o)n.set(r.key,r);o.length&&(s+=1)}function h(){return[i,...n.values()]}function p(e){return e===t?i:n.get(e)??null}function T(){return s}function c(e){const o=e?.[f];return typeof o!="string"?t:o.trim()||t}function w(e){const o=e?.root;return c(o&&typeof o=="object"?o.props:null)}function E(e){return c(e)===t}function x(e,o){const r=p(e)?.fields??[];return o?r.filter(d=>o.includes(d.kind)):r}export{t as PRODUCT_RECORD_TYPE,f as TEMPLATE_RECORD_TYPE_PROP,c as declaredRecordType,E as drawsProduct,w as layoutRecordType,x as recordFields,p as recordTypeSpec,h as recordTypes,T as recordTypesRevision,k as registerRecordTypes};
|
|
1
|
+
const t="product",f="recordType",i={key:t,label:"Product",fields:[]},l=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,a=/^[a-z][A-Za-z0-9]*$/,u=["text","date","images"],n=new Map;let s=0;function y(e){if(typeof e.key!="string"||!l.test(e.key))throw new Error(`A record type key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(e.key===t)throw new Error("The product record type is the builder's own and is not declared by a host.");if(typeof e.label!="string"||!e.label.trim())throw new Error(`The record type ${e.key} has no label.`);const o=new Set;for(const r of e.fields){if(typeof r.key!="string"||!a.test(r.key)||o.has(r.key))throw new Error(`The record type ${e.key} has a field key it cannot use: ${JSON.stringify(r.key)}.`);if(!u.includes(r.kind))throw new Error(`The field ${r.key} of ${e.key} has no kind ${JSON.stringify(r.kind)}.`);o.add(r.key)}return{key:e.key,label:e.label.trim(),fields:e.fields.map(r=>({...r}))}}function k(e){const o=e.map(y);for(const r of o)n.set(r.key,r);o.length&&(s+=1)}function h(){return[i,...n.values()]}function p(e){return e===t?i:n.get(e)??null}function T(){return s}function c(e){const o=e?.[f];return typeof o!="string"?t:o.trim()||t}function w(e){const o=e?.root;return c(o&&typeof o=="object"?o.props:null)}function E(e){return c(e)===t}function x(e,o){const r=p(e)?.fields??[];return o?r.filter(d=>o.includes(d.kind)):r}export{t as PRODUCT_RECORD_TYPE,f as TEMPLATE_RECORD_TYPE_PROP,c as declaredRecordType,E as drawsProduct,w as layoutRecordType,x as recordFields,p as recordTypeSpec,h as recordTypes,T as recordTypesRevision,k as registerRecordTypes};
|
|
@@ -7,3 +7,11 @@ export declare const SECTION_HEIGHT: {
|
|
|
7
7
|
};
|
|
8
8
|
export declare function resolveSectionHeight(value: number | undefined): string;
|
|
9
9
|
export declare function hasSectionHeight(...values: (number | undefined)[]): boolean;
|
|
10
|
+
export declare function heroHeightBox({ heightDesktop, heightTablet, heightMobile }: {
|
|
11
|
+
heightDesktop?: number;
|
|
12
|
+
heightTablet?: number;
|
|
13
|
+
heightMobile?: number;
|
|
14
|
+
}): {
|
|
15
|
+
className: string;
|
|
16
|
+
style: Record<string, string> | undefined;
|
|
17
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a={min:40,max:100,step:5,fallback:100,unit:"vh"};function o(e){return`${typeof e=="number"?e:a.fallback}${a.unit}`}function f(...e){return e.some(t=>typeof t=="number")}function c({heightDesktop:e,heightTablet:t,heightMobile:h}){const r=f(e,h),n=typeof t=="number",s="view-tablet:max-view-desktop:h-[var(--sf-hero-h-t)]",i=r?n?`h-[var(--sf-hero-h-m)] ${s} view-desktop:h-[var(--sf-hero-h-d)]`:"h-[var(--sf-hero-h-m)] view-tablet:h-[var(--sf-hero-h-d)]":n?`h-screen min-h-[680px] ${s} view-tablet:max-view-desktop:min-h-0`:"h-screen min-h-[680px]";return!r&&!n?{className:i,style:void 0}:{className:i,style:{...r?{"--sf-hero-h-d":o(e)}:{},...n?{"--sf-hero-h-t":o(t)}:{},...r?{"--sf-hero-h-m":o(h)}:{}}}}export{a as SECTION_HEIGHT,f as hasSectionHeight,c as heroHeightBox,o as resolveSectionHeight};
|
|
@@ -6,7 +6,7 @@ export type BlockSlots = Record<string, {
|
|
|
6
6
|
allow?: string[];
|
|
7
7
|
disallow?: string[];
|
|
8
8
|
}>;
|
|
9
|
-
export type BlockRender = Pick<Block, "label" | "defaultProps" | "render" | "inline"> & {
|
|
9
|
+
export type BlockRender = Pick<Block, "label" | "defaultProps" | "render" | "inline" | "phoneOrder"> & {
|
|
10
10
|
fields?: BlockSlots;
|
|
11
11
|
};
|
|
12
12
|
export type BlockMeta = Omit<BlockRender, "render">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
import{phoneKey as t}from"efficient-easel/screen/lib/content/view-tiers";const o={content:{type:"slot"}},r={label:"Box",fields:o,phoneOrder:{prop:t("order"),slot:"content"},defaultProps:{direction:"row",justify:"start",align:"stretch",wrap:!0,content:[],share:"equal",blockSpacing:"gap",padV2:!0,sectionPaddingTop:24,sectionPaddingBottom:24}};export{r as FlexMeta,o as FlexSlots};
|
|
@@ -1230,7 +1230,7 @@
|
|
|
1230
1230
|
"type": "custom",
|
|
1231
1231
|
"__text": {
|
|
1232
1232
|
"control": "text",
|
|
1233
|
-
"label": "
|
|
1233
|
+
"label": "Button",
|
|
1234
1234
|
"placeholder": ""
|
|
1235
1235
|
}
|
|
1236
1236
|
},
|
|
@@ -1238,7 +1238,7 @@
|
|
|
1238
1238
|
"type": "custom",
|
|
1239
1239
|
"__text": {
|
|
1240
1240
|
"control": "text",
|
|
1241
|
-
"label": "
|
|
1241
|
+
"label": "Footnote",
|
|
1242
1242
|
"placeholder": ""
|
|
1243
1243
|
}
|
|
1244
1244
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"contentHash": "
|
|
2
|
+
"contentHash": "b875e85294cc0f21",
|
|
3
3
|
"schema": 1,
|
|
4
4
|
"mediaFields": {
|
|
5
5
|
"ImageBlock": [
|
|
@@ -141,9 +141,12 @@
|
|
|
141
141
|
"technicalStateKeys": [
|
|
142
142
|
"focal",
|
|
143
143
|
"focalPhone",
|
|
144
|
+
"focalTablet",
|
|
144
145
|
"imageFocal",
|
|
145
146
|
"imageFocal2",
|
|
146
147
|
"imageFocal2Phone",
|
|
147
|
-
"
|
|
148
|
+
"imageFocal2Tablet",
|
|
149
|
+
"imageFocalPhone",
|
|
150
|
+
"imageFocalTablet"
|
|
148
151
|
]
|
|
149
152
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { MockupVariant } from "../../../render/components/MockupSection.js";
|
|
2
2
|
export declare const MOCKUP_VARIANT_OPTIONS: readonly {
|
|
3
3
|
label: string;
|
|
4
|
+
hint: string;
|
|
4
5
|
value: MockupVariant;
|
|
5
6
|
}[];
|
|
6
7
|
export declare const MOCKUP_VARIANTS: readonly MockupVariant[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{shownForOption as
|
|
1
|
+
import{shownForOption as l,withRowRules as o}from"./show-when-attach.js";const s=[{label:"Product record",hint:"Product record (spec tiles)",value:"spec-card"},{label:"Selector guide",hint:"Selector guide (pills + results)",value:"fitment"},{label:"Portal card",hint:"Portal card (stock + button + orders)",value:"portal"},{label:"Kanban board",hint:"Kanban board (job columns)",value:"kanban"},{label:"Claims panel",hint:"Claims panel (rows + defect bars)",value:"claims"},{label:"Browser shop",hint:"Browser storefront (hero + tiles)",value:"browser"},{label:"Terminal",hint:"Terminal (CLI session)",value:"terminal"}],e=s.map(a=>a.value),r="spec-card",i={badge:["spec-card","fitment","portal","kanban","claims","browser"],cardTitle:["spec-card","fitment","portal","kanban","claims"],cardSubtitle:["spec-card","fitment","portal","kanban","claims"],rows:["spec-card","fitment","portal","kanban","claims"],button:["spec-card","fitment","portal","kanban","claims"],footnote:["spec-card","fitment","portal","kanban","claims"],pills:["fitment"],tiles:["spec-card","portal","kanban","claims"],_gKanban:["kanban"],col1Title:["kanban"],col1Cards:["kanban"],col2Title:["kanban"],col2Cards:["kanban"],col3Title:["kanban"],col3Cards:["kanban"],col4Title:["kanban"],col4Cards:["kanban"],_gClaims:["claims"],barsHeading:["claims"],bars:["claims"],_gTerminal:["terminal"],termLines:["terminal"],_gBrowser:["browser"],urlText:["browser"],heroTitle:["browser"],heroButton:["browser"],products:["browser"]};function b(a){return e.includes(a)?a:r}function p(a){return o(a,Object.entries(i).map(([t,n])=>[[t],l("variant",e,r,n)]))}export{r as MOCKUP_DEFAULT_VARIANT,e as MOCKUP_VARIANTS,i as MOCKUP_VARIANT_FIELDS,s as MOCKUP_VARIANT_OPTIONS,b as mockupVariantOf,p as withMockupVariantRules};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const h=["general","commerce","service"],o=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero",set:"general"},{type:"HeroSingle",label:"Hero Single",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:"Gallery",label:"Tabbed Gallery",set:"commerce"},{type:"GalleryB",label:"Customer Photo Grid",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"},{type:"TyreFitment",label:"Tyre Fitment Form",set:"commerce"},{type:"EuTyreLabel",label:"EU Tyre Label",set:"commerce"},{type:"RelatedProducts",label:"Related Products",set:"commerce"},{type:"BundleOffer",label:"Bundle Products",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"PaymentBadges",label:"Payment Methods",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:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"Cards",label:"Cards",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"StatsParagraph",label:"Stats with Text",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Testimonials",label:"Testimonials",set:"general"},{type:"Reviews",label:"Reviews",set:"service"},{type:"Logos",label:"Logos",set:"general"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Banner",label:"Banner",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Countdown",label:"Countdown",set:"general"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"Masthead",label:"Issue Header",set:"general"},{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"},{type:"CategoryBar",label:"Category Bar",set:"general"},{type:"DocTabs",label:"Document Tabs",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocMasthead",label:"Document Header",set:"general"},{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:"ContactLocations",label:"Contact / Locations",set:"general"},{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"}]}];function p(){return Object.fromEntries(o.map(e=>[e.key,{title:e.title,components:e.sections.map(t=>t.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}const i={Grid:'Lewis, 2026-09-14: Box and Grid duplicate each other and it feels confusing. 2026-09-15 he chose the order: give Box uneven widths FIRST, then merge Grid into Box. Shown three ways to pick the widths (mockup "Uneven Box Widths"), he chose A — shape pictures on the Box\'s `Block widths` row, the same "a row is a shape, pick a picture of it" rule he set for the photo wall on 2026-09-07.\n\nWHAT REPLACES IT: a Box set to One row, with `Block widths` at Equal or a shape (Big left, Big right, Bigger left, Bigger right) and its own `Columns` in the Phone view. Measured on PRODUCTION 2026-09-16 ~09:28 AEST (database `efficient-system`, all 10 tenant schemas, 128 storefront pages, both `layout` and `published_layout` — 256 documents): 2 Grid nodes, and they are ONE Grid counted twice — the 9DIEM homepage on 9diem.com (`xtreme_mudder` schema), once as draft and once as published. It is top-level, holds three `ImageBlock`s at `columns` 3 — equal thirds — and NO block sets `Positions`. A Box draws that with `Block widths` at Equal.\n\n⚠️ THE COUNT MOVES; THE RULE MUST NOT DEPEND ON IT. This entry has already carried three different readings. A local-clone snapshot said no Grid used `Positions`. A PRODUCTION reading on 2026-09-15 ~13:15 AEST found 6 nodes on two sites, 4 of them spanned — hartesmetal.com.au homepage and about, 4 columns, spans 1 + 3. That one was TRUE when it was taken and stopped being true the same day: those two pages were rebuilt on Box (`Block widths: Bigger right`), and on 2026-09-16 they hold zero Grid nodes and are built from `Flex`. ⛔ So the rule is NOT "there are still N spanned Grids". NEVER delete the Grid component or its `gridSpan` handling, whatever a census says — Grid still renders, still edits, still drags, and a merchant may rebuild a page either way on any day. Re-run the census on production before anyone PROPOSES deleting either, and read any number written here as the reading of its own day, not as the state of the world.\n\nWHAT A MERCHANT LOSES: a new Grid, and with it a fixed "N per row" that wraps by itself past three across, and the per-block `Positions` number. Box wraps with `Wrap`, but by content width, not by a fixed count.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Grid still renders through it and can still be edited, dragged and added to; no document is rewritten and NO MIGRATION RUNS — the owner redoes live sections himself.\n\n⚠️ AND IT STAYS DROPPABLE WHERE IT LIVES. The drop rule in lib/document/config.tsx read the nestable containers off the catalogue\'s `structure` row, so leaving the catalogue would have made every open slot — a Box included — refuse a Grid already stored inside one. `scripts/test-retired-grid-stays-editable.tsx` §3 pins it.',CompatibleTyres:'Lewis, 2026-09-09: "Do not bother counting. Delete Compatible Tyres and use the new one. The new one needs complete settings — it must have every setting our cards have." Shown three ways to finish it, he chose C: retire from the menu now, and take styling the card text as its own card.\n\nWHAT REPLACES IT: `RelatedProducts` with its `Show` dropdown set to "Tyres that fit this product". That block is the GENERIC relationship section from card 1128 — it knows nothing about wheels or tyres, it asks the registry for a relationship by name. The two have rendered through the SAME renderer (`DynamicRelatedProducts`) since that card; this one is the pre-registry one-off that was never removed.\n\n⚠️ THE SWAP WAS NOT SAFE UNTIL #1305, AND SAYING SO IS THE POINT. The first old-versus-new table put in front of the owner was WRONG. `DynamicRelatedProducts` returns EARLY on a tyre answer and draws this component, so the seven card settings, the head split and the Width control all stopped at that call — nine settings, measured NO EFFECT, on precisely the relationship that replaces this block. #1283 gave the new block the card settings, #1299 the head split and its own Width, #1305 carried all of it onto the tyre branch. Only then was the claim true.\n\nWHAT WAS MEASURED BEFORE RETIRING, four ways, because the premise decides the card:\n • settable text kinds (SECTION_TEXT_KINDS): both blocks ABSENT — the map holds only TimelineTrack and Footprint, both AUTHORED lists\n • read-only text regions: neither `components/CompatibleTyres` nor `components/TyreCard` stamps one\n • panel rows through resolveFields: this block 31, `RelatedProducts` 42. This block\'s only style-ish key is `_sStyle`, the bucket HEADER, not a control\n • head text (num/title/description) is authored on both, so `_partStyles` reaches it identically\nSo on the CARD runs the two are zero against zero — neither can style them — and everywhere else the new block is ahead. Styling those runs needs a section-level prop family and a paint path for DERIVED text, which no section has yet: a part is anchored by matching an AUTHORED prop\'s string against the DOM, and `lib/document/source-bound-parts` keeps hydrated copy unreachable on purpose so a merchant cannot type into a copy of a product name and lose it at the next sync. That is its own card, and `lib/sections/text-regions` is the read-only half that already ships.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT, the same contract Subscribe, Split and SubscribeBlogs have. Every page holding a `CompatibleTyres` still renders through it, no published document is rewritten, and NO MIGRATION RUNS — the owner\'s standing ruling of 2026-09-05: he redoes live sections himself and deletes the old ones when he does. He also said explicitly not to count them first.\n\n⚠️ AND THIS COMPONENT IS LOAD-BEARING FOR ITS OWN REPLACEMENT: `DynamicRelatedProducts` draws it for EVERY tyre answer. Deleting it would blank the block that replaces it, not just the pages still holding this one.',Spacer:`Lewis, 2026-10-10 (section-merges.md group 19, approved): one Divider holds space and lines. Style = None (was Spacer) / Line / Stripes; the space above and below as number boxes. Retired by card [MERGE] Spacer Into Divider (2026-10-26).
|
|
1
|
+
const h=["general","commerce","service"],o=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero",set:"general"},{type:"HeroSingle",label:"Hero Single",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:"Gallery",label:"Tabbed Gallery",set:"commerce"},{type:"GalleryB",label:"Customer Photo Grid",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"},{type:"TyreFitment",label:"Tyre Fitment Form",set:"commerce"},{type:"EuTyreLabel",label:"EU Tyre Label",set:"commerce"},{type:"RelatedProducts",label:"Related Products",set:"commerce"},{type:"BundleOffer",label:"Bundle Products",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"PaymentBadges",label:"Payment Methods",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:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"Cards",label:"Cards",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"StatsParagraph",label:"Stats with Text",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Testimonials",label:"Testimonials",set:"general"},{type:"Reviews",label:"Reviews",set:"service"},{type:"Logos",label:"Logos",set:"general"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Banner",label:"Banner",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Countdown",label:"Countdown",set:"general"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"Masthead",label:"Issue Header",set:"general"},{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"},{type:"CategoryBar",label:"Category Bar",set:"general"},{type:"DocTabs",label:"Document Tabs",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocMasthead",label:"Document Header",set:"general"},{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:"ContactLocations",label:"Contact / Locations",set:"general"},{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"}]}];function p(){return Object.fromEntries(o.map(e=>[e.key,{title:e.title,components:e.sections.map(t=>t.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}const i={Grid:'Lewis, 2026-09-14: Box and Grid duplicate each other and it feels confusing. 2026-09-15 he chose the order: give Box uneven widths FIRST, then merge Grid into Box. Shown three ways to pick the widths (mockup "Uneven Box Widths"), he chose A — shape pictures on the Box\'s `Block widths` row, the same "a row is a shape, pick a picture of it" rule he set for the photo wall on 2026-09-07.\n\nWHAT REPLACES IT: a Box set to One row, with `Block widths` at Equal or Custom, and its own `Columns` in the Phone view. Measured on PRODUCTION 2026-09-16 ~09:28 AEST (database `efficient-system`, all 10 tenant schemas, 128 storefront pages, both `layout` and `published_layout` — 256 documents): 2 Grid nodes, and they are ONE Grid counted twice — the 9DIEM homepage on 9diem.com (`xtreme_mudder` schema), once as draft and once as published. It is top-level, holds three `ImageBlock`s at `columns` 3 — equal thirds — and NO block sets `Positions`. A Box draws that with `Block widths` at Equal.\n\n⚠️ THE COUNT MOVES; THE RULE MUST NOT DEPEND ON IT. This entry has already carried three different readings. A local-clone snapshot said no Grid used `Positions`. A PRODUCTION reading on 2026-09-15 ~13:15 AEST found 6 nodes on two sites, 4 of them spanned — hartesmetal.com.au homepage and about, 4 columns, spans 1 + 3. That one was TRUE when it was taken and stopped being true the same day: those two pages were rebuilt on Box (`Block widths: Bigger right`), and on 2026-09-16 they hold zero Grid nodes and are built from `Flex`. ⛔ So the rule is NOT "there are still N spanned Grids". NEVER delete the Grid component or its `gridSpan` handling, whatever a census says — Grid still renders, still edits, still drags, and a merchant may rebuild a page either way on any day. Re-run the census on production before anyone PROPOSES deleting either, and read any number written here as the reading of its own day, not as the state of the world.\n\nWHAT A MERCHANT LOSES: a new Grid, and with it a fixed "N per row" that wraps by itself past three across, and the per-block `Positions` number. Box wraps with `Wrap`, but by content width, not by a fixed count.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Grid still renders through it and can still be edited, dragged and added to; no document is rewritten and NO MIGRATION RUNS — the owner redoes live sections himself.\n\n⚠️ AND IT STAYS DROPPABLE WHERE IT LIVES. The drop rule in lib/document/config.tsx read the nestable containers off the catalogue\'s `structure` row, so leaving the catalogue would have made every open slot — a Box included — refuse a Grid already stored inside one. `scripts/test-retired-grid-stays-editable.tsx` §3 pins it.',CompatibleTyres:'Lewis, 2026-09-09: "Do not bother counting. Delete Compatible Tyres and use the new one. The new one needs complete settings — it must have every setting our cards have." Shown three ways to finish it, he chose C: retire from the menu now, and take styling the card text as its own card.\n\nWHAT REPLACES IT: `RelatedProducts` with its `Show` dropdown set to "Tyres that fit this product". That block is the GENERIC relationship section from card 1128 — it knows nothing about wheels or tyres, it asks the registry for a relationship by name. The two have rendered through the SAME renderer (`DynamicRelatedProducts`) since that card; this one is the pre-registry one-off that was never removed.\n\n⚠️ THE SWAP WAS NOT SAFE UNTIL #1305, AND SAYING SO IS THE POINT. The first old-versus-new table put in front of the owner was WRONG. `DynamicRelatedProducts` returns EARLY on a tyre answer and draws this component, so the seven card settings, the head split and the Width control all stopped at that call — nine settings, measured NO EFFECT, on precisely the relationship that replaces this block. #1283 gave the new block the card settings, #1299 the head split and its own Width, #1305 carried all of it onto the tyre branch. Only then was the claim true.\n\nWHAT WAS MEASURED BEFORE RETIRING, four ways, because the premise decides the card:\n • settable text kinds (SECTION_TEXT_KINDS): both blocks ABSENT — the map holds only TimelineTrack and Footprint, both AUTHORED lists\n • read-only text regions: neither `components/CompatibleTyres` nor `components/TyreCard` stamps one\n • panel rows through resolveFields: this block 31, `RelatedProducts` 42. This block\'s only style-ish key is `_sStyle`, the bucket HEADER, not a control\n • head text (num/title/description) is authored on both, so `_partStyles` reaches it identically\nSo on the CARD runs the two are zero against zero — neither can style them — and everywhere else the new block is ahead. Styling those runs needs a section-level prop family and a paint path for DERIVED text, which no section has yet: a part is anchored by matching an AUTHORED prop\'s string against the DOM, and `lib/document/source-bound-parts` keeps hydrated copy unreachable on purpose so a merchant cannot type into a copy of a product name and lose it at the next sync. That is its own card, and `lib/sections/text-regions` is the read-only half that already ships.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT, the same contract Subscribe, Split and SubscribeBlogs have. Every page holding a `CompatibleTyres` still renders through it, no published document is rewritten, and NO MIGRATION RUNS — the owner\'s standing ruling of 2026-09-05: he redoes live sections himself and deletes the old ones when he does. He also said explicitly not to count them first.\n\n⚠️ AND THIS COMPONENT IS LOAD-BEARING FOR ITS OWN REPLACEMENT: `DynamicRelatedProducts` draws it for EVERY tyre answer. Deleting it would blank the block that replaces it, not just the pages still holding this one.',Spacer:`Lewis, 2026-10-10 (section-merges.md group 19, approved): one Divider holds space and lines. Style = None (was Spacer) / Line / Stripes; the space above and below as number boxes. Retired by card [MERGE] Spacer Into Divider (2026-10-26).
|
|
2
2
|
|
|
3
3
|
WHAT REPLACES IT: a Divider with Style set to None. It draws no line, only its space, and that space is the Divider's Padding row (top and bottom, each with its phone value): the Spacer's 24 / 48 / 96 / 160 px are None with Padding 12 + 12, 24 + 24, 48 + 48, 80 + 80. \`scripts/test-divider-holds-the-spacer.tsx\` §5 holds it.
|
|
4
4
|
|
|
@@ -32,4 +32,4 @@ WHAT REPLACES IT: Cards drawn from its card template, each card a Label, a Value
|
|
|
32
32
|
|
|
33
33
|
WHAT A MERCHANT LOSES (the LOOK GAPS in that file): the grid takes the Cards block's own gaps and breakpoints, not the old 40 (16 on a phone).
|
|
34
34
|
|
|
35
|
-
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Document Detail Cards still renders through it and can still be edited; no document is rewritten.`,SubscribeBlogs:"card 66396 — folded into `Subscribe`, which now chooses its rail's content with a `Type` control (the newsletter's own issues, or live blog posts). The two shared 21 of their fields and rendered THE SAME BYTES from equivalent rows, so offering both asked a merchant to choose between two names for one section. The type key stays because it is stored on published pages, and the component stays because those pages still render through it."},u=["Grid","Spacer"],m=Array.from(new Set([...o.flatMap(e=>e.sections.map(t=>t.type)),...Object.keys(i)])),y=Object.fromEntries(o.flatMap(e=>e.sections.map(t=>[t.type,t.label]))),l={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",LocationMap:"general",Contents:"general",ButtonBlock:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",KeyFeatures:"general",Spacer:"general",Series:"general",DocMetaCards:"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",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",EmailFormBlock:"service",SocialLogosBlock:"service",PaymentLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},r={...l,...Object.fromEntries(o.flatMap(e=>e.sections.map(t=>[t.type,t.set])))};function g(e){return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0}function a(e){return Object.keys(r).filter(t=>r[t]===e).sort()}const b=a("general"),T=a("commerce"),E=a("service"),
|
|
35
|
+
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Document Detail Cards still renders through it and can still be edited; no document is rewritten.`,SubscribeBlogs:"card 66396 — folded into `Subscribe`, which now chooses its rail's content with a `Type` control (the newsletter's own issues, or live blog posts). The two shared 21 of their fields and rendered THE SAME BYTES from equivalent rows, so offering both asked a merchant to choose between two names for one section. The type key stays because it is stored on published pages, and the component stays because those pages still render through it."},u=["Grid","Spacer"],m=Array.from(new Set([...o.flatMap(e=>e.sections.map(t=>t.type)),...Object.keys(i)])),y=Object.fromEntries(o.flatMap(e=>e.sections.map(t=>[t.type,t.label]))),l={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",LocationMap:"general",Contents:"general",ButtonBlock:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",KeyFeatures:"general",Spacer:"general",Series:"general",DocMetaCards:"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",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",EmailFormBlock:"service",SocialLogosBlock:"service",PaymentLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},r={...l,...Object.fromEntries(o.flatMap(e=>e.sections.map(t=>[t.type,t.set])))};function g(e){return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0}function a(e){return Object.keys(r).filter(t=>r[t]===e).sort()}const b=a("general"),T=a("commerce"),E=a("service"),c="Flex",s="Box",S=`${s}es`;function d(e){return e==="section"?"Blank section":s}function w(e,t,n){return e===c?d(t):n}export{m as ALL_SECTION_TYPES,h as BLOCK_SETS,s as BOX_LABEL,S as BOX_LABEL_PLURAL,T as COMMERCE_BLOCKS,b as GENERAL_BLOCKS,c as LEVEL_NAMED_TYPE,u as RETIRED_NESTABLE_SECTIONS,i as RETIRED_SECTIONS,o as SECTION_CATALOG,y as SECTION_LABELS,E as SERVICE_BLOCKS,l as UNLISTED_BLOCK_SETS,g as blockSetOf,a as blocksInSet,p as buildBlockCategories,w as labelAtLevel,d as labelForFlex};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={Hero:"Full-screen opener with rotating slides.",HeroSingle:"Full-screen image or video with a headline.",IntroBleed:"Full-bleed intro image the next section scrolls over.",Collections:"Product collections in a tidy grid.",AlloyWheelsListing:"A full product-listing page: filter rail, sortable card grid and pagination, from the live catalog. Choose which product types it shows.",CatalogFilterBar:"Filters the collection grids below it — a sticky row of Pills (the default), or Columns, one per filter you switch on.",ProductGrid:"Hand-picked products in a tidy grid.",FitmentFinder:"A vehicle picker — make, model, year and trim resolve the OEM stock fitment live.",Gallery:"Two image galleries with tabs and filters.",GalleryB:"Customer photos in a card grid with a click-to-open lightbox.",SpecStrip:"A thin one-line spec strip — small-caps items spread across the width, as a dark band or a bare hairline row.",ProductHero:"A product hero — image beside price, bullets and a buy button.",SpecTable:"A spec sheet — labeled rows of product specifications.",ProcessSteps:"A heading over columns of image, title, blurb and specs.",DetailRows:"Repeating full-width rows — eyebrow, title and copy beside a numbered close-up image, alternating sides each row.",FitmentTable:"A fitment table — per-size bolt patterns, offsets and load ratings, filterable by diameter.",CompatibleTyres:"The current product's compatible tyres — image, size, key specs and price per tyre, with an inquiry link. Display only.",RelatedProducts:"The current product's related items in a tidy row — the product page's built-in 'Pair with' cross-sell.",OrderSummary:"A display order-summary panel — items, totals and a note.",DeliveryOptions:"Delivery tiers as cards — name, window and price, one highlighted.",PaymentBadges:"A payment-methods trust strip with reassurance lines.",CheckoutCTA:"A centered 'ready to order?' headline with the checkout button.",Manifesto:"A bold brand statement beside a full-height image, with a stat strip.",ParagraphsA:"An editorial text panel with a stat strip and founders' note.",StatsParagraph:"An editorial heading and paragraph over a row of
|
|
1
|
+
const e={Hero:"Full-screen opener with rotating slides.",HeroSingle:"Full-screen image or video with a headline.",IntroBleed:"Full-bleed intro image the next section scrolls over.",Collections:"Product collections in a tidy grid.",AlloyWheelsListing:"A full product-listing page: filter rail, sortable card grid and pagination, from the live catalog. Choose which product types it shows.",CatalogFilterBar:"Filters the collection grids below it — a sticky row of Pills (the default), or Columns, one per filter you switch on.",ProductGrid:"Hand-picked products in a tidy grid.",FitmentFinder:"A vehicle picker — make, model, year and trim resolve the OEM stock fitment live.",Gallery:"Two image galleries with tabs and filters.",GalleryB:"Customer photos in a card grid with a click-to-open lightbox.",SpecStrip:"A thin one-line spec strip — small-caps items spread across the width, as a dark band or a bare hairline row.",ProductHero:"A product hero — image beside price, bullets and a buy button.",SpecTable:"A spec sheet — labeled rows of product specifications.",ProcessSteps:"A heading over columns of image, title, blurb and specs.",DetailRows:"Repeating full-width rows — eyebrow, title and copy beside a numbered close-up image, alternating sides each row.",FitmentTable:"A fitment table — per-size bolt patterns, offsets and load ratings, filterable by diameter.",CompatibleTyres:"The current product's compatible tyres — image, size, key specs and price per tyre, with an inquiry link. Display only.",RelatedProducts:"The current product's related items in a tidy row — the product page's built-in 'Pair with' cross-sell.",OrderSummary:"A display order-summary panel — items, totals and a note.",DeliveryOptions:"Delivery tiers as cards — name, window and price, one highlighted.",PaymentBadges:"A payment-methods trust strip with reassurance lines.",CheckoutCTA:"A centered 'ready to order?' headline with the checkout button.",Manifesto:"A bold brand statement beside a full-height image, with a stat strip.",ParagraphsA:"An editorial text panel with a stat strip and founders' note.",StatsParagraph:"An editorial heading and paragraph over a row of stat cards whose units and small labels take the main color.",Chart:"A titled chart — bars, line or donut — drawn from your own labeled data points.",Mockup:"A headline beside a stylized product-UI mockup card — spec sheet, fitment, portal, kanban and more.",Prose:"A plain editorial text section — eyebrow, heading and body copy.",Timeline:"An editorial aside beside a rail-marked timeline of dated entries.",TimelineTrack:"A horizontal year track of milestones — company history or roadmap.",Footprint:"A world map of your locations with a legend — designed here, sold worldwide.",TitleWithButtons:"A big headline beside a stack of call-to-action buttons.",Split:"Side-by-side image and text in two columns.",Cards:"A heading over a grid of free-text title-and-blurb cards.",FAQ:"A frequently-asked-questions accordion with a header.",Testimonials:"Customer quotes in a grid — the quote, a name and a role.",Masthead:"A journal issue header with a lead statement and contents.",Breadcrumb:"A slim trail showing where the reader is (Home / Journal…).",CategoryBar:"A sticky row of category tabs with counts and links.",FeaturedCover:"A featured article — big cover image beside a headline and dek.",LongRead:"A long-form article spread with a pull-quote and cover image.",Series:"A section heading over a grid of column cards.",Subscribe:"A newsletter signup beside a list of recent issues.",SubscribeBlogs:"A newsletter signup beside your latest blog posts, pulled live.",Events:"Latest journal posts in a three-card row.",DocMasthead:"A document header — headline, metadata and standfirst.",DocTabs:"A sticky tab bar to switch between documents.",DocBody:"Long-form document body with an 'On this page' contents list.",DocMetaCards:"A three-up meta strip for the foot of a document.",Banner:"Wide promo strip with background image.",Stats:"Highlight key numbers — years, designs.",Countdown:"Hours, minutes and seconds to a set date and time, then one line.",KeyFeatures:"A theme-color chip and heading over a grid of short feature labels.",Logos:"A row of partner or brand logos.",Ticker:"A scrolling marquee of short phrases, full width.",Reviews:"Approved customer reviews in a star-rated card grid, pulled live.",SubmitBuild:"A 'Show us yours.' headline with a photo-submission form.",ReviewForm:"A write-a-review form — submissions wait for your approval before they show.",ContactRouting:"Pick who to reach, then a form that routes the message.",ContactLocations:"Your locations as a city gallery plus address and map cards.",SectionHeader:"A numbered section title with optional link.",Grid:"Multi-column container for blocks.",Flex:"An empty section. Add whatever you want inside.",Spacer:"Vertical breathing room between sections.",Divider:"A thin horizontal rule between sections.",CustomHTML:"Drop in your own sanitized HTML.",Heading:"A single heading line.",Text:"A paragraph of body copy.",ImageBlock:"A standalone image, at the width you set.",ButtonBlock:"A call-to-action button."};export{e as SECTION_DESCRIPTIONS};
|