efficient-web-builder 69.4.0 → 70.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 +34 -0
- package/dist/editor/components/SiteFields.js +1 -1
- package/dist/editor/components/StandaloneSectionEditor.js +1 -1
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/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/ProcessSteps/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Prose/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Timeline/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/TimelineTrack/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/box-fields.d.ts +1 -1
- package/dist/editor/lib/document/box-footer-rows.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/document/field-groups.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/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/build/module-specifiers.d.ts +11 -0
- package/dist/format/lib/build/module-specifiers.js +1 -1
- package/dist/format/lib/content/box-background.d.ts +1 -7
- package/dist/format/lib/content/box-background.js +1 -1
- package/dist/format/lib/content/box-darken-styles.d.ts +7 -0
- package/dist/format/lib/content/box-darken-styles.js +1 -0
- package/dist/format/lib/content/box-shape.d.ts +1 -1
- package/dist/format/lib/content/card-row-keys.d.ts +10 -0
- package/dist/format/lib/content/card-row-keys.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +1 -11
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/count-numbers.js +1 -1
- package/dist/format/lib/content/picture-focus-rows.js +1 -1
- package/dist/format/lib/content/section-sticky.d.ts +3 -3
- package/dist/format/lib/content/site-gutter.js +1 -1
- package/dist/format/lib/document/blocks/general/CardList/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Cards/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/FAQ/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Footprint/meta.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/OrderSummary/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/PostCard/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/ProcessSteps/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/ProcessSteps/row-seed.js +1 -1
- package/dist/format/lib/document/box-footer.js +1 -1
- package/dist/format/lib/document/media-manifest.json +2 -1
- package/dist/format/lib/document/node-lists.d.ts +4 -0
- package/dist/format/lib/document/node-lists.js +1 -1
- package/dist/format/lib/document/passes/document-position.js +1 -1
- package/dist/format/lib/document/section-catalog.js +19 -3
- 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/panel-one-arrow.js +1 -1
- package/dist/format/lib/source-rules/support/panel-select-cascade.d.ts +1 -1
- package/dist/format/lib/source-rules/support/panel-select-cascade.js +1 -1
- 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/content/page-contents.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/document/slot-counts.js +1 -1
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/package.json +5 -5
- package/dist/format/lib/document/panel-bands.d.ts +0 -15
- package/dist/format/lib/document/panel-bands.js +0 -1
|
@@ -3,3 +3,13 @@ export declare const CARD_ROW_LINK_PROP = "rowLinkField";
|
|
|
3
3
|
export declare const CARD_TEMPLATE_SLOT = "template";
|
|
4
4
|
export declare const CARD_LIST_TYPE = "CardList";
|
|
5
5
|
export declare const BOX_HIDE_WHEN_ROW_EMPTY = "hideWhenRowEmpty";
|
|
6
|
+
export declare const CARD_TEMPLATE_BLOCKS: readonly ["Text", "ImageBlock", "ButtonBlock", "Flex"];
|
|
7
|
+
export declare function cardTemplateSlot(): {
|
|
8
|
+
type: "slot";
|
|
9
|
+
allow: string[];
|
|
10
|
+
};
|
|
11
|
+
export declare const CARD_LIST_ITEM_BLOCKS: ("Flex" | "Text" | "ImageBlock")[];
|
|
12
|
+
export declare function cardListItemSlot(): {
|
|
13
|
+
type: "slot";
|
|
14
|
+
allow: string[];
|
|
15
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const r="rowField",_="rowLinkField",l="template",n="CardList",c="hideWhenRowEmpty",t=["Text","ImageBlock","ButtonBlock","Flex"];function p(){return{type:"slot",allow:[...t]}}const e=t.filter(o=>o!=="ButtonBlock");function L(){return{type:"slot",allow:[...e]}}export{c as BOX_HIDE_WHEN_ROW_EMPTY,e as CARD_LIST_ITEM_BLOCKS,n as CARD_LIST_TYPE,r as CARD_ROW_FIELD_PROP,_ as CARD_ROW_LINK_PROP,t as CARD_TEMPLATE_BLOCKS,l as CARD_TEMPLATE_SLOT,L as cardListItemSlot,p as cardTemplateSlot};
|
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
import { type SourceRow } from "./block-sources.js";
|
|
2
2
|
import type { CardCopyPlace } from "./mirror-cards.js";
|
|
3
3
|
export declare const CARD_TEMPLATE_LABEL = "Card template";
|
|
4
|
-
export
|
|
5
|
-
export { BOX_HIDE_WHEN_ROW_EMPTY, CARD_LIST_TYPE, CARD_ROW_FIELD_PROP, CARD_ROW_LINK_PROP, CARD_TEMPLATE_SLOT } from "./card-row-keys.js";
|
|
6
|
-
export declare function cardTemplateSlot(): {
|
|
7
|
-
type: "slot";
|
|
8
|
-
allow: string[];
|
|
9
|
-
};
|
|
10
|
-
export declare const CARD_LIST_ITEM_BLOCKS: ("Flex" | "Text" | "ImageBlock")[];
|
|
4
|
+
export { BOX_HIDE_WHEN_ROW_EMPTY, CARD_LIST_TYPE, CARD_ROW_FIELD_PROP, CARD_ROW_LINK_PROP, CARD_LIST_ITEM_BLOCKS, CARD_TEMPLATE_BLOCKS, CARD_TEMPLATE_SLOT, cardListItemSlot, cardTemplateSlot } from "./card-row-keys.js";
|
|
11
5
|
export declare const CARD_LIST_ROWS = "items";
|
|
12
6
|
export declare const CARD_LIST_FIELDS = "itemFields";
|
|
13
|
-
export declare function cardListItemSlot(): {
|
|
14
|
-
type: "slot";
|
|
15
|
-
allow: string[];
|
|
16
|
-
};
|
|
17
7
|
export type CardRowFieldKind = "text" | "image" | "link" | "list" | "colour" | "date";
|
|
18
8
|
export type CardRowFieldKinds = CardRowFieldKind | readonly CardRowFieldKind[];
|
|
19
9
|
export declare function fieldsOfKind(fields: readonly CardRowFieldSpec[], kind?: CardRowFieldKinds): readonly CardRowFieldSpec[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{blockSources as Y,blockSourceSpec as O,declaredBlockSource as R}from"./block-sources.js";import{slotFieldBlocks as h}from"./slot-field-blocks.js";import{isNodeList as v}from"efficient-easel/data";import{BOX_TYPE as W}from"../document/container-blocks.js";import{globalRegistry as M}from"../global-registry.js";import{nonEmptyString as S}from"../non-empty-string.js";import{accentItalicRuns as N}from"../markup.js";import{BOX_HIDE_WHEN_ROW_EMPTY as K,CARD_LIST_TYPE as k,CARD_ROW_FIELD_PROP as p,CARD_ROW_LINK_PROP as y,CARD_TEMPLATE_SLOT as B}from"./card-row-keys.js";import{withCardsTemplate as H}from"../document/cards-template-on-read.js";import{CARDS_TYPE as L}from"../document/blocks/general/Cards/card-seed.js";import{ORDER_SUMMARY_TYPE as $}from"../document/blocks/general/OrderSummary/block-type.js";import{PROCESS_STEPS_TYPE as j}from"../document/blocks/general/ProcessSteps/row-seed.js";import{withCardListTemplate as U}from"../document/blocks/general/CardList/item-seed.js";import{ARTICLE_BODY_BLOCK as Q,withArticleBodyTemplate as X}from"../document/article-body-seed.js";import{LOGOS_TYPE as q,withLogosTemplate as V}from"../document/blocks/general/Logos/card-seed.js";import{FAQ_TYPE as G,withFaqTemplate as z}from"../document/blocks/general/FAQ/card-seed.js";import{FOOTPRINT_TYPE as J,withFootprintListTemplate as Z}from"../document/blocks/general/Footprint/card-seed.js";const ee="Card template",E=["Text","ImageBlock","ButtonBlock","Flex"];import{BOX_HIDE_WHEN_ROW_EMPTY as st,CARD_LIST_TYPE as it,CARD_ROW_FIELD_PROP as at,CARD_ROW_LINK_PROP as ct,CARD_TEMPLATE_SLOT as ft}from"./card-row-keys.js";function Fe(){return{type:"slot",allow:[...E]}}const te=E.filter(e=>e!=="ButtonBlock"),A="items",P="itemFields";function Ye(){return{type:"slot",allow:[...te]}}function m(e,t){if(!t)return e;const r=typeof t=="string"?[t]:t;return e.filter(n=>r.includes(n.kind??"text"))}const re=[{block:$,typedRows:"rows",linesBetween:!0,fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:G,typedRows:"items",fields:[{key:"question",label:"Question"},{key:"answer",label:"Answer",multiline:!0}],seedOnInsert:e=>z(e)},{block:J,typedRows:"offices",fields:[{key:"badge",label:"HQ",plain:!0},{key:"role",label:"Role"},{key:"city",label:"City"},{key:"country",label:"Region · country"},{key:"address",label:"Address"},{key:"phone",label:"Phone"},{key:"linkLabel",label:"Button"},{key:"href",label:"Link",kind:"link"}],seed:e=>Z(e)},{block:L,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,plain:!0}],seed:e=>H(L,e)},{block:j,fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title",mark:"accentItalic"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"},{key:"specs",label:"Specs",kind:"list",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]}],blocks:[{type:k,label:"Card list"}]},{block:q,fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>V(e)},{block:k,fields:[{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],typedRows:A,seed:e=>U(e)},{block:Q,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>X(e)}];function f(){return M("efficient.card-templates",()=>new Map(re.map(e=>[e.block,e])))}function ve(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.`);if(o.type===D)throw new Error(`The card template of ${t.block} names "${D}" in its blocks. Only a host's seed puts a host part in a card template; a merchant never adds one. Take it out.`);r.some(l=>l.type===o.type)||r.push({type:o.type,label:o.label||o.type})}const n=[];for(const o of t.slots??[]){if(typeof o?.slot!="string"||!o.slot)throw new Error(`The card template of ${t.block} names an empty slot.`);const l=S(o.label),c=Array.isArray(o.fields)?{fields:o.fields.map(a=>({...a}))}:null;n.some(a=>a.slot===o.slot)||n.push({slot:o.slot,...l?{label:l}:null,...c})}const s=n.some(o=>o.fields);if(s&&(t.fields.some(o=>o.everySource)||Y(t.block).length))throw new Error(`The card template of ${t.block} declares slot fields, but the block reads a source: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);s?h().add(t.block):h().delete(t.block);const i=S(t.typedRows);f().set(t.block,{block:t.block,...n.length?{slots:n}:{},fields:t.fields.map(o=>({...o})),blocks:r,typedRows:i,...t.seed?{seed:t.seed}:{},...t.seedOnInsert?{seedOnInsert:t.seedOnInsert}:{},...t.linesBetween===!0?{linesBetween:!0}:{}})}}function oe(e,t){const r=e?f().get(e)?.seed:void 0;return r?r(t):t}function We(e,t){const r=le(e),n=(r.length?r:[B]).filter(l=>t[l]===void 0||Array.isArray(t[l])&&t[l].length===0);if(!n.length)return t;const s={...t};for(const l of n)delete s[l];const i=e?f().get(e)?.seedOnInsert:void 0,o=i?i(s):oe(e,s);return o===s?t:o}function Me(){for(const e of f().values())if(e.blocks?.length)return!0;return!1}function Ne(e){return f().get(e)?.blocks??[]}function Ke(e){for(const t of f().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function He(e){return typeof e=="string"&&f().get(e)?.typedRows||""}function $e(e){return typeof e=="string"&&f().get(e)?.linesBetween===!0}function je(e){return typeof e=="string"&&f().has(e)}const ne=[{slot:B}];function b(e){if(typeof e!="string")return[];const t=f().get(e);return t?t.slots??ne:[]}function le(e){return b(e).map(t=>t.slot)}function se(e,t){return b(e).some(r=>r.slot===t)}function Ue(e,t){const r=b(e).find(n=>n.slot===t);return r?r.label??ee:null}function g(e,t){return t?b(e).find(r=>r.slot===t)?.fields:void 0}function ie(e,t){const r=f().get(e)?.fields??[];return m(r,t)}function ae(e,t){if(typeof e!="string")return"";const r=g(e,t);return(r?m(r,"list"):ie(e,"list"))[0]?.key??""}function ce(e,t,r){return _(e)||ae(t,r)}function C(e,t,r){const n=typeof e?.type=="string"?e.type:"";if(!n)return[];const s=g(n,r);if(s)return m(s,t);const i=f().get(n)?.fields??[],o=O(R(e?.props))?.fields,l=o?.length?[...o.map(c=>({...c})),...i.filter(c=>c.everySource&&!o.some(a=>a.key===c.key))]:i;return m(l,t)}function fe(e,t,r,n){if(!e)return null;const s=g(e,n);return s?s.find(i=>i.key===t)??null:r?C(r).find(i=>i.key===t)??null:f().get(e)?.fields.find(i=>i.key===t)??null}function x(e,t){return!e||!t?null:e.fields?.find(r=>r.key===t)??fe(e.ownerType,t,e.owner,e.slot)}function Qe(e,t){return x(e,t)?.plain===!0}function Xe(e,t){return x(e,t)?.kind==="date"}function _(e,t=p){const r=e?.[t];return typeof r=="string"?r.trim():""}function qe(e,t){return e.key||String(t+1)}function Ve(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 Ge(e,t){const r=e[K];return!t||!Array.isArray(r)||!r.length?!1:r.every(n=>typeof n!="string"||!t[n]?.trim())}const w={Text:{text:p,href:y},ImageBlock:{src:p,href:y},ButtonBlock:{label:p,href:y},LogoBlock:{alt:p,href:y},Breadcrumb:{currentCrumb:p}},ze=w,ue=new Set(["ButtonBlock.label","LogoBlock.alt"]);function Je(e,t,r){return de(e,t,r)&&!ue.has(`${e}.${r}`)}function de(e,t,r){return pe(e,t,r)!==""}function pe(e,t,r){const n=w[e]?.[r];return n?_(t,n):""}function I(e,t){return!t||!e?null:e[t]??""}function me(e,t){return I(e,t)?.trim()||void 0}function Ze(e,t,r,n,s,i){if(!r)return t;let o=null;for(const[l,c]of Object.entries(w[e]??{})){const a=_(t,c),u=I(r,a);if(u!==null){if(o??={...t},c===y){o[l]=me(r,a);continue}o[l]=x({ownerType:n,fields:s,slot:i},a)?.mark==="accentItalic"?N(u):u}}return o??t}function T(e,t){const r=e?.data?.content;if(!Array.isArray(r)||typeof t!="string")return;const n=(i,o)=>{for(const l of i){if(l?.props?.id===t)return o;for(const[c,a]of Object.entries(l?.props??{})){if(!v(a))continue;const u=se(l.type,c)?{owner:l,slot:c,direct:!0,nested:o!==null,underBox:!1}:o&&{owner:o.owner,slot:o.slot,direct:!1,nested:o.nested,underBox:o.underBox||l.type===W},d=n(a,u);if(d!==void 0)return d}}},s=n(r,null);return s===void 0?null:s}function ye(e,t){const r=T(e,t);return r&&r.owner}function ke(e,t){const r=T(e,t);return r&&r.slot}function et(e,t){const r=T(e,t);return r&&(r.direct?r.owner:null)}function tt(e,t){const r=T(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}function rt(e,t,r){if(t?.type!==k)return[];const n=ye(e,t.props?.id);if(!n){const l=O(R(t.props))?.fields,c=l?.length?l.map(d=>({...d})):be(t.props),a=(f().get(k)?.fields??[]).filter(d=>d.everySource&&!c.some(F=>F.key===d.key)),u=[...c,...a];return m(u,r)}const s=ke(e,t.props?.id)??void 0,i=ce(t.props,n.type,s),o=i&&C(n,"list",s).find(l=>l.key===i)?.fields||[];return m(o,r)}function ot(e,t){return{[p]:"",[A]:e.map(r=>({...r})),[P]:t.map(r=>({...r}))}}function be(e,t){const r=e?.[P];if(!Array.isArray(r))return[];const n=r.flatMap(s=>{if(!s||typeof s!="object")return[];const{key:i,label:o,kind:l,multiline:c,alt:a,next:u}=s;if(typeof i!="string"||!i||typeof o!="string")return[];const d=l==="image"||l==="link"||l==="colour"||l==="date"?l:void 0;return[{key:i,label:o,...d?{kind:d}:{},...c===!0?{multiline:!0}:{},...typeof a=="string"&&a?{alt:a}:{},...typeof u=="string"&&u?{next:u}:{}}]});return m(n,t)}const D="HostPart";export{st as BOX_HIDE_WHEN_ROW_EMPTY,P as CARD_LIST_FIELDS,te as CARD_LIST_ITEM_BLOCKS,A as CARD_LIST_ROWS,it as CARD_LIST_TYPE,at as CARD_ROW_FIELD_PROP,ct as CARD_ROW_LINK_PROP,E as CARD_TEMPLATE_BLOCKS,ee as CARD_TEMPLATE_LABEL,ft as CARD_TEMPLATE_SLOT,D as HOST_PART_TYPE,ze as ROW_BOUND_PROPS,ue as ROW_PART_BY_WORDS,tt as cardCopyPlace,qe as cardKeyOf,rt as cardListFieldsOf,Ye as cardListItemSlot,ot as cardListProps,ce as cardListShows,Ve as cardRow,Ne as cardTemplateBlocks,et as cardTemplateCardOwner,fe as cardTemplateField,ie as cardTemplateFields,C as cardTemplateFieldsOf,$e as cardTemplateLinesBetween,ye as cardTemplateOwner,Fe as cardTemplateSlot,Ue as cardTemplateSlotLabel,le as cardTemplateSlotNames,ke as cardTemplateSlotOf,He as cardTemplateTypedRows,Me as cardTemplatesNameBlocks,ae as defaultListField,m as fieldsOfKind,je as hasCardTemplate,Ke as isCardTemplateBlock,se as isCardTemplateSlot,_ as namedRowField,ve as registerCardTemplates,de as rowBound,Xe as rowFieldIsDate,pe as rowFieldOf,x as rowFieldSpec,I as rowFieldText,Qe as rowFieldWordsArePlain,Ze as rowFilledProps,me as rowLinkText,Je as rowPartByKey,Ge as templateBoxIsEmpty,We as templateOnInsert,oe as templateOnRead};
|
|
1
|
+
import{blockSources as F,blockSourceSpec as O,declaredBlockSource as R}from"./block-sources.js";import{slotFieldBlocks as h}from"./slot-field-blocks.js";import{nodeListKeys as Y}from"../document/node-lists.js";import{BOX_TYPE as v}from"../document/container-blocks.js";import{globalRegistry as W}from"../global-registry.js";import{nonEmptyString as S}from"../non-empty-string.js";import{accentItalicRuns as M}from"../markup.js";import{BOX_HIDE_WHEN_ROW_EMPTY as K,CARD_LIST_TYPE as b,CARD_ROW_FIELD_PROP as p,CARD_ROW_LINK_PROP as y,CARD_TEMPLATE_SLOT as L}from"./card-row-keys.js";import{withCardsTemplate as N}from"../document/cards-template-on-read.js";import{CARDS_TYPE as E}from"../document/blocks/general/Cards/card-seed.js";import{ORDER_SUMMARY_TYPE as H}from"../document/blocks/general/OrderSummary/block-type.js";import{PROCESS_STEPS_TYPE as $}from"../document/blocks/general/ProcessSteps/row-seed.js";import{withCardListTemplate as U}from"../document/blocks/general/CardList/item-seed.js";import{ARTICLE_BODY_BLOCK as j,withArticleBodyTemplate as Q}from"../document/article-body-seed.js";import{LOGOS_TYPE as X,withLogosTemplate as q}from"../document/blocks/general/Logos/card-seed.js";import{FAQ_TYPE as V,withFaqTemplate as G}from"../document/blocks/general/FAQ/card-seed.js";import{FOOTPRINT_TYPE as z,withFootprintListTemplate as J}from"../document/blocks/general/Footprint/card-seed.js";const Z="Card template";import{BOX_HIDE_WHEN_ROW_EMPTY as rt,CARD_LIST_TYPE as ot,CARD_ROW_FIELD_PROP as nt,CARD_ROW_LINK_PROP as lt,CARD_LIST_ITEM_BLOCKS as st,CARD_TEMPLATE_BLOCKS as it,CARD_TEMPLATE_SLOT as at,cardListItemSlot as ct,cardTemplateSlot as ft}from"./card-row-keys.js";const A="items",B="itemFields";function m(e,t){if(!t)return e;const r=typeof t=="string"?[t]:t;return e.filter(n=>r.includes(n.kind??"text"))}const ee=[{block:H,typedRows:"rows",linesBetween:!0,fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:V,typedRows:"items",fields:[{key:"question",label:"Question"},{key:"answer",label:"Answer",multiline:!0}],seedOnInsert:e=>G(e)},{block:z,typedRows:"offices",fields:[{key:"badge",label:"HQ",plain:!0},{key:"role",label:"Role"},{key:"city",label:"City"},{key:"country",label:"Region · country"},{key:"address",label:"Address"},{key:"phone",label:"Phone"},{key:"linkLabel",label:"Button"},{key:"href",label:"Link",kind:"link"}],seed:e=>J(e)},{block:E,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,plain:!0}],seed:e=>N(E,e)},{block:$,fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title",mark:"accentItalic"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"},{key:"specs",label:"Specs",kind:"list",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]}],blocks:[{type:b,label:"Card list"}]},{block:X,fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>q(e)},{block:b,fields:[{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],typedRows:A,seed:e=>U(e)},{block:j,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>Q(e)}];function f(){return W("efficient.card-templates",()=>new Map(ee.map(e=>[e.block,e])))}function Ie(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.`);if(o.type===I)throw new Error(`The card template of ${t.block} names "${I}" in its blocks. Only a host's seed puts a host part in a card template; a merchant never adds one. Take it out.`);r.some(l=>l.type===o.type)||r.push({type:o.type,label:o.label||o.type})}const n=[];for(const o of t.slots??[]){if(typeof o?.slot!="string"||!o.slot)throw new Error(`The card template of ${t.block} names an empty slot.`);const l=S(o.label),a=Array.isArray(o.fields)?{fields:o.fields.map(c=>({...c}))}:null;n.some(c=>c.slot===o.slot)||n.push({slot:o.slot,...l?{label:l}:null,...a})}const s=n.some(o=>o.fields);if(s&&(t.fields.some(o=>o.everySource)||F(t.block).length))throw new Error(`The card template of ${t.block} declares slot fields, but the block reads a source: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);s?h().add(t.block):h().delete(t.block);const i=S(t.typedRows);f().set(t.block,{block:t.block,...n.length?{slots:n}:{},fields:t.fields.map(o=>({...o})),blocks:r,typedRows:i,...t.seed?{seed:t.seed}:{},...t.seedOnInsert?{seedOnInsert:t.seedOnInsert}:{},...t.linesBetween===!0?{linesBetween:!0}:{}})}}function te(e,t){const r=e?f().get(e)?.seed:void 0;return r?r(t):t}function De(e,t){const r=oe(e),n=(r.length?r:[L]).filter(l=>t[l]===void 0||Array.isArray(t[l])&&t[l].length===0);if(!n.length)return t;const s={...t};for(const l of n)delete s[l];const i=e?f().get(e)?.seedOnInsert:void 0,o=i?i(s):te(e,s);return o===s?t:o}function Fe(){for(const e of f().values())if(e.blocks?.length)return!0;return!1}function Ye(e){return f().get(e)?.blocks??[]}function ve(e){for(const t of f().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function We(e){return typeof e=="string"&&f().get(e)?.typedRows||""}function Me(e){return typeof e=="string"&&f().get(e)?.linesBetween===!0}function Ke(e){return typeof e=="string"&&f().has(e)}const re=[{slot:L}];function k(e){if(typeof e!="string")return[];const t=f().get(e);return t?t.slots??re:[]}function oe(e){return k(e).map(t=>t.slot)}function ne(e,t){return k(e).some(r=>r.slot===t)}function Ne(e,t){const r=k(e).find(n=>n.slot===t);return r?r.label??Z:null}function g(e,t){return t?k(e).find(r=>r.slot===t)?.fields:void 0}function le(e,t){const r=f().get(e)?.fields??[];return m(r,t)}function se(e,t){if(typeof e!="string")return"";const r=g(e,t);return(r?m(r,"list"):le(e,"list"))[0]?.key??""}function ie(e,t,r){return x(e)||se(t,r)}function P(e,t,r){const n=typeof e?.type=="string"?e.type:"";if(!n)return[];const s=g(n,r);if(s)return m(s,t);const i=f().get(n)?.fields??[],o=O(R(e?.props))?.fields,l=o?.length?[...o.map(a=>({...a})),...i.filter(a=>a.everySource&&!o.some(c=>c.key===a.key))]:i;return m(l,t)}function ae(e,t,r,n){if(!e)return null;const s=g(e,n);return s?s.find(i=>i.key===t)??null:r?P(r).find(i=>i.key===t)??null:f().get(e)?.fields.find(i=>i.key===t)??null}function _(e,t){return!e||!t?null:e.fields?.find(r=>r.key===t)??ae(e.ownerType,t,e.owner,e.slot)}function He(e,t){return _(e,t)?.plain===!0}function $e(e,t){return _(e,t)?.kind==="date"}function x(e,t=p){const r=e?.[t];return typeof r=="string"?r.trim():""}function Ue(e,t){return e.key||String(t+1)}function je(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 Qe(e,t){const r=e[K];return!t||!Array.isArray(r)||!r.length?!1:r.every(n=>typeof n!="string"||!t[n]?.trim())}const w={Text:{text:p,href:y},ImageBlock:{src:p,href:y},ButtonBlock:{label:p,href:y},LogoBlock:{alt:p,href:y},Breadcrumb:{currentCrumb:p}},Xe=w,ce=new Set(["ButtonBlock.label","LogoBlock.alt"]);function qe(e,t,r){return fe(e,t,r)&&!ce.has(`${e}.${r}`)}function fe(e,t,r){return ue(e,t,r)!==""}function ue(e,t,r){const n=w[e]?.[r];return n?x(t,n):""}function C(e,t){return!t||!e?null:e[t]??""}function de(e,t){return C(e,t)?.trim()||void 0}function Ve(e,t,r,n,s,i){if(!r)return t;let o=null;for(const[l,a]of Object.entries(w[e]??{})){const c=x(t,a),u=C(r,c);if(u!==null){if(o??={...t},a===y){o[l]=de(r,c);continue}o[l]=_({ownerType:n,fields:s,slot:i},c)?.mark==="accentItalic"?M(u):u}}return o??t}function T(e,t){const r=e?.data?.content;if(!Array.isArray(r)||typeof t!="string")return;const n=(i,o)=>{for(const l of i){if(l?.props?.id===t)return o;for(const a of Y(l??{})){const c=l.props[a],u=ne(l.type,a)?{owner:l,slot:a,direct:!0,nested:o!==null,underBox:!1}:o&&{owner:o.owner,slot:o.slot,direct:!1,nested:o.nested,underBox:o.underBox||l.type===v},d=n(c,u);if(d!==void 0)return d}}},s=n(r,null);return s===void 0?null:s}function pe(e,t){const r=T(e,t);return r&&r.owner}function me(e,t){const r=T(e,t);return r&&r.slot}function Ge(e,t){const r=T(e,t);return r&&(r.direct?r.owner:null)}function ze(e,t){const r=T(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}function Je(e,t,r){if(t?.type!==b)return[];const n=pe(e,t.props?.id);if(!n){const l=O(R(t.props))?.fields,a=l?.length?l.map(d=>({...d})):ye(t.props),c=(f().get(b)?.fields??[]).filter(d=>d.everySource&&!a.some(D=>D.key===d.key)),u=[...a,...c];return m(u,r)}const s=me(e,t.props?.id)??void 0,i=ie(t.props,n.type,s),o=i&&P(n,"list",s).find(l=>l.key===i)?.fields||[];return m(o,r)}function Ze(e,t){return{[p]:"",[A]:e.map(r=>({...r})),[B]:t.map(r=>({...r}))}}function ye(e,t){const r=e?.[B];if(!Array.isArray(r))return[];const n=r.flatMap(s=>{if(!s||typeof s!="object")return[];const{key:i,label:o,kind:l,multiline:a,alt:c,next:u}=s;if(typeof i!="string"||!i||typeof o!="string")return[];const d=l==="image"||l==="link"||l==="colour"||l==="date"?l:void 0;return[{key:i,label:o,...d?{kind:d}:{},...a===!0?{multiline:!0}:{},...typeof c=="string"&&c?{alt:c}:{},...typeof u=="string"&&u?{next:u}:{}}]});return m(n,t)}const I="HostPart";export{rt as BOX_HIDE_WHEN_ROW_EMPTY,B as CARD_LIST_FIELDS,st as CARD_LIST_ITEM_BLOCKS,A as CARD_LIST_ROWS,ot as CARD_LIST_TYPE,nt as CARD_ROW_FIELD_PROP,lt as CARD_ROW_LINK_PROP,it as CARD_TEMPLATE_BLOCKS,Z as CARD_TEMPLATE_LABEL,at as CARD_TEMPLATE_SLOT,I as HOST_PART_TYPE,Xe as ROW_BOUND_PROPS,ce as ROW_PART_BY_WORDS,ze as cardCopyPlace,Ue as cardKeyOf,Je as cardListFieldsOf,ct as cardListItemSlot,Ze as cardListProps,ie as cardListShows,je as cardRow,Ye as cardTemplateBlocks,Ge as cardTemplateCardOwner,ae as cardTemplateField,le as cardTemplateFields,P as cardTemplateFieldsOf,Me as cardTemplateLinesBetween,pe as cardTemplateOwner,ft as cardTemplateSlot,Ne as cardTemplateSlotLabel,oe as cardTemplateSlotNames,me as cardTemplateSlotOf,We as cardTemplateTypedRows,Fe as cardTemplatesNameBlocks,se as defaultListField,m as fieldsOfKind,Ke as hasCardTemplate,ve as isCardTemplateBlock,ne as isCardTemplateSlot,x as namedRowField,Ie as registerCardTemplates,fe as rowBound,$e as rowFieldIsDate,ue as rowFieldOf,_ as rowFieldSpec,C as rowFieldText,He as rowFieldWordsArePlain,Ve as rowFilledProps,de as rowLinkText,qe as rowPartByKey,Qe as templateBoxIsEmpty,De as templateOnInsert,te as templateOnRead};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isNodeList as
|
|
1
|
+
import{isNodeList as l}from"efficient-easel/data";import{mapEachNode as S,mapNodeLists as T,nodeListsOf as E}from"../document/node-lists.js";import{CARD_LIST_ROWS as _,CARD_LIST_TYPE as y,namedRowField as L}from"./card-template.js";import{BLOCK_SOURCE_PROP as N,COUNT_KEY_PROP as u,COUNTS_SOURCE as i,declaredBlockSource as O,sourceChoices as U}from"./block-sources.js";const C="Flex";function x(t,n){return L(t)?typeof t?.[u]=="string"?c(n?.[u]):"":c(t?.[u])}const c=t=>typeof t=="string"?t.trim():"",P=t=>t.type===y&&Array.isArray(t.props?.[_])&&t.props[_].some(n=>c(n?.[u])!==""),A=new Intl.NumberFormat("en-US");function B(t){return/^\d+$/.test(t)?A.format(Number(t)):t}function F(t,n){const r=n?n.find(e=>e.key===t)?.value:U(i).find(e=>e.key===t)?.value;return r===void 0?null:B(r)}const W={[u]:"any"};function p(t,n=!1){const r=t.props;if(!r)return{node:t,names:!1};let e=t.type==="Text"&&(x(r)!==""||n&&x(r,W)!=="");const s=n||P(t);let o=T(t,a=>S(a,f=>{const d=p(f,s);return d.names&&(e=!0),d.node})).props;if(t.type!==C)return{node:o===r?t:{...t,props:o},names:e};const m=O(o);if(e&&!m&&(o={...o,[N]:i}),!e&&m===i){const{[N]:a,...f}=o;o=f}return{node:o===r?t:{...t,props:o},names:!1}}function R(t,n,r){for(const e of t){if(e?.props?.id===n)return r;for(const s of E(e??{})){const o=R(s,n,e.type===C?e:r);if(o!==void 0)return o}}}function I(t,n){if(!l(t))return!0;const r=R(t,n,null);if(r===void 0)return!0;if(r===null)return!1;const e=O(r.props);return!e||e===i}function k(t){const n=t?.content;if(!l(n))return t;const r=n.map(e=>p(e));return r.every((e,s)=>e.node===n[s])?t:{...t,content:r.map(e=>e.node)}}function v(t){return p(t).node}export{F as countNumber,B as countWords,I as countsReachText,x as linkedCount,v as settleCountNode,k as settleCountSources};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{phoneKey as
|
|
1
|
+
import{phoneKey as d,tabletKey as n}from"efficient-easel/screen/lib/content/view-tiers";import{HERO_FOCUS as o}from"../hero-media-layout.js";const r=[{block:"HeroSlide",upload:"mediaImage",focus:o.image},{block:"HeroSlide",upload:"mediaImage2",focus:o.image2},{block:"HeroSingle",upload:"mediaImage",focus:o.image},{block:"HeroSingle",upload:"mediaImage2",focus:o.image2},{block:"ImageBlock",upload:"src",focus:"focal"}],t=e=>[e,n(e),d(e)],s=[...new Set(r.flatMap(e=>t(e.focus)))].sort();function g(e,l){const[c,i,m]=t(l).map(a=>typeof e[a]=="string"&&e[a]?e[a]:void 0);return{desktop:c,tablet:i,phone:m}}export{r as PICTURE_DOTS,s as PICTURE_FOCUS_KEYS,t as viewFocusKeys,g as viewFocusValues};
|
|
@@ -70,16 +70,16 @@ export declare function resolveSectionStick(props: SectionStickProps, opts?: {
|
|
|
70
70
|
}): {
|
|
71
71
|
desktop: boolean;
|
|
72
72
|
desktopDistance: number;
|
|
73
|
-
desktopUnit: "
|
|
73
|
+
desktopUnit: "%" | "px" | "vw";
|
|
74
74
|
desktopScreens: number;
|
|
75
75
|
tablet: boolean;
|
|
76
76
|
tabletDistance: number;
|
|
77
|
-
tabletUnit: "
|
|
77
|
+
tabletUnit: "%" | "px" | "vw";
|
|
78
78
|
tabletScreens: number;
|
|
79
79
|
ownTablet: boolean;
|
|
80
80
|
phone: boolean;
|
|
81
81
|
phoneDistance: number;
|
|
82
|
-
phoneUnit: "
|
|
82
|
+
phoneUnit: "%" | "px" | "vw";
|
|
83
83
|
phoneScreens: number;
|
|
84
84
|
ownPhone: boolean;
|
|
85
85
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{nodeListKeys as g}from"../document/node-lists.js";import{isVerticalLoop as h}from"../animation/loop.js";import{boxCardProps as l,boxIsCard as B}from"./box-background.js";import"./box-card-rule.js";import{isCardTemplateSlot as R}from"./card-template.js";import{SECTION_WIDTH_FAMILY as y,hasWidthFamily as A,ownSectionWidth as x,siteWidthsOf as C}from"./section-width.js";const F=new Set(["Flex","Grid"]);function m(t){return typeof t=="string"&&F.has(t)}const W="contentWidth",I="full",S="content";function k(t){const n=t?.[W];return n===I?!1:n===S?!0:void 0}function K(t,n){return t&&!n}function O(t){return t.loop==="scroll"&&t.direction!=="tabs"&&t.direction!=="accordion"&&!B(t)&&!h(t.scrollDirection)}function u(t,n){return m(t)&&O(l(n,!1))?x({}):x(n)}function Y(t,n){return typeof t!="string"||!A(t)||y[t]==="rawMarkup"?u(t,n).background??"full":u(t,n).background??C(n).background}function H(t){return t!=="full"}function V(t,n,G){if(!Array.isArray(t)||typeof n!="string")return;const f=(_,e,b,p,c)=>{for(const r of _){const o=r?.props??{};if(o.id===n)return e;const i=m(r?.type),s=(p?u(r?.type,o).content:null)==="content"?!0:b,w=i&&(e.inBox?k(o)??s:s),T={insideGutter:e.insideGutter||w||i&&O(l(o,c)),inBox:e.inBox||i};for(const d of g({type:r?.type,props:o})){const E=o[d],a=f(E,T,s,!1,c||R(r?.type,d));if(a!==void 0)return a}}};return f(t,{insideGutter:!1,inBox:!1},G,!0,!1)}export{W as BOX_GUTTER_KEY,I as BOX_GUTTER_OFF,S as BOX_GUTTER_ON,k as boxGutterOf,V as boxPlaceOf,O as boxRunsEdgeToEdge,K as drawsSiteGutter,m as isFrameContainer,u as ownNodeWidth,Y as sectionGroundAnswer,H as siteDrawsGutter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cardListItemSlot as t}from"../../../../content/card-
|
|
1
|
+
import{cardListItemSlot as t}from"../../../../content/card-row-keys.js";const e={template:t()},l={label:"Card list",inline:!0,fields:e,defaultProps:{rowField:""}};export{l as CardListMeta,e as CardListSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cardTemplateSlot as e}from"../../../../content/card-
|
|
1
|
+
import{cardTemplateSlot as e}from"../../../../content/card-row-keys.js";const l={eyebrow:"Label",title:"Section *heading.*"},t={template:e()},r={label:"Cards",fields:t,defaultProps:{eyebrow:"",title:"",items:[],columns:3}};export{l as CARDS_PH,r as CardsMeta,t as CardsSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PH as e}from"../../placeholders.js";import{cardTemplateSlot as t}from"../../../../content/card-
|
|
1
|
+
import{PH as e}from"../../placeholders.js";import{cardTemplateSlot as t}from"../../../../content/card-row-keys.js";const n={num:e.sectionNumber,title:"Frequently *asked.*",link:"View all questions"},l={template:t()},r={label:"Q&A",inline:!0,fields:l,defaultProps:{num:"",title:"",linkText:"",linkHref:"/faq",defaultOpen:!0,items:[]}};export{r as FAQMeta,l as FAQSlots,n as FAQ_PH};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{FOOTPRINT_DEFAULTS as e}from"../../../../content/footprint.js";import{PH as t}from"../../placeholders.js";import{cardTemplateSlot as o}from"../../../../content/card-
|
|
1
|
+
import{FOOTPRINT_DEFAULTS as e}from"../../../../content/footprint.js";import{PH as t}from"../../placeholders.js";import{cardTemplateSlot as o}from"../../../../content/card-row-keys.js";const s={sectionNumber:t.sectionNumber,heading:`${t.heading}
|
|
2
2
|
*${t.accent}*`,tagline:t.body},a={template:o()},p={label:"Locations Map",fields:a,defaultProps:{sectionNumber:"",heading:"",tagline:"",offices:[],mapTheme:e.mapTheme,padTop:120,padBottom:120,search:!1,searchHint:"",noMatchText:"",listPosition:"below",showDistance:!0}};export{s as FOOTPRINT_PH,p as FootprintMeta,a as FootprintSlots};
|
|
@@ -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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cardTemplateSlot as t}from"../../../../content/card-
|
|
1
|
+
import{cardTemplateSlot as t}from"../../../../content/card-row-keys.js";const o={title:"Order summary",note:"A short reassurance note under the total."},e={template:t()},a={label:"Order Table",fields:e,defaultProps:{eyebrow:"",title:"",rows:[],subRows:[],totalLabel:"",totalAmount:"",note:"",contained:!0}};export{o as ORDER_SUMMARY_PH,a as OrderSummaryMeta,e as OrderSummarySlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BOX_DARKEN_STYLES as t}from"../../../../content/box-
|
|
1
|
+
import{BOX_DARKEN_STYLES as t}from"../../../../content/box-darken-styles.js";import{POST_CARD_HEIGHT as r,POST_CARD_LAYOUT_FALLBACK as o}from"../../../../post-card-layout.js";import{PH as e}from"../../placeholders.js";const d={title:"Add a *headline* for this post.",excerpt:"A short summary of the post — one or two sentences.",category:e.category,date:e.date,readLabel:"0 min read"},m={label:"Post Card",drawsPictures:!0,defaultProps:{source:null,image:"",title:"",excerpt:"",href:"",category:"",date:"",readLabel:"",layout:o,showCover:!0,placement:"bottom-left",darken:55,darkenStyle:t[0].value,minHeight:r.fallback}};export{d as POSTCARD_PH,m as PostCardMeta};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PH as t}from"../../placeholders.js";import{cardTemplateSlot as e}from"../../../../content/card-
|
|
1
|
+
import{PH as t}from"../../placeholders.js";import{cardTemplateSlot as e}from"../../../../content/card-row-keys.js";import{PROCESS_COLUMNS_SLOT as o}from"./column-seed.js";const m={num:t.sectionNumber,title:t.headingAccent,description:t.body,cta:t.viewAll},s={[o]:{type:"slot"},template:e()},c={label:"Image & Text Columns",drawsPictures:!0,fields:s,defaultProps:{num:"",title:"",description:"",columns:3,padTop:120,padBottom:120}};export{m as PROCESS_PH,c as ProcessStepsMeta,s as ProcessStepsSlots};
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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 g,INNER_BOX as a,TEXT as l,labelStyle as d,seedNodes as S,token as y,slotSeedIds as P}from"../../../seed-parts.js";import{rowFieldTextSeed as p}from"../Cards/card-seed.js";import{withCardListTemplate as _}from"../CardList/item-seed.js";import{nodeListKeys as E}from"../../../node-lists.js";const L="ProcessSteps",f={eyebrow:"eyebrow",title:"title",copy:"copy",image:"image",tag:"tag",specs:"specs"},e=f,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,{...g,tag:"p"},d(11))]}},{type:r,props:{...a,name:"Words",direction:"column",gap:16},slots:{[s]:[p(e.eyebrow,{...l,tag:"p"},{...d(13),color:"accent"}),p(e.title,{...l,tag:"h2"},{textStyle:"heading-2",...y("headingMedium",42,28),lineHeight:1.1,letterSpacing:-.02}),p(e.copy,{...g,tag:"p"},{textStyle:"body-1",...y("body",15),lineHeight:1.6}),{type:c,props:{[m]:e.specs}}]}}]}});function T(i){return i.map(t=>{let o=t.props;for(const n of E(t))o={...o,[n]:T(o[n])};return t.type===c?{...t,props:_(o)}:{...t,props:o}})}function b(i){return T(S([w()],P(i,"row")))}export{f as IMAGE_TEXT_ROW_FIELDS,L as PROCESS_STEPS_TYPE,w as imageTextRowSeed,b as imageTextRowTemplate};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FOOTER_LOGO_PX as _}from"../logo/logo-size.js";import{resolveContainerGap as y}from"../content/container-gap.js";import{NESTED_BOX_PADDING as m}from"../content/box-layout.js";import{finiteNumber as u}from"../finite-number.js";import{
|
|
1
|
+
import{FOOTER_LOGO_PX as _}from"../logo/logo-size.js";import{resolveContainerGap as y}from"../content/container-gap.js";import{NESTED_BOX_PADDING as m}from"../content/box-layout.js";import{finiteNumber as u}from"../finite-number.js";import{nodeListKeys as P}from"./node-lists.js";import{hiddenKeyOf as L}from"efficient-easel/screen/lib/content/view-hide";import{templateOnInsert as x}from"../content/card-template.js";import{buildSectionGroup as w,SITE_FOOTER_TYPE as A}from"./section-groups.js";import{hasOwnEntry as S,ownEntry as h}from"../own-entry.js";const d="Flex",I={FooterMenu:"MenuBlock",FooterEmailSignup:"EmailFormBlock",FooterSocial:"SocialLogosBlock"},B={FooterPayment:"PaymentLogosBlock"},b=o=>{const{id:e,...s}=o;return s},E=o=>typeof o=="string"?o:"",g={sm:12,md:13,lg:15},q={sm:{mark:16,words:g.sm},md:{mark:20,words:g.md}},G="md",T=1.5,N={size:13,lineHeight:T,width:280},R=14,D=40,k=o=>o==="center"||o==="right"?o:"left";function M(o){const e={},s=[["padTop","sectionPaddingTop"],["padRight","sectionPaddingRight"],["padBottom","sectionPaddingBottom"],["padLeft","sectionPaddingLeft"]];for(const[t,i]of s){const c=u(o[t]);c&&(e[i]=c)}return e}function X(o,e,s){const t=s(o,b(e));if(Array.isArray(e.template))return{...t,props:{...t.props,template:F(e.template,String(t.props.id))}};if(e.template!==void 0)return t;const i=x(o,t.props);return i===t.props?t:{...t,props:i}}function F(o,e,s={at:0}){return o.map(t=>{const i={...t.props,id:`${e}~t${s.at++}`};for(const c of P(t))i[c]=F(i[c],e,s);return{...t,props:i}})}function O(o,e,s){const t=o.props??{},i=s?.(o,e);if(i)return i;const c=h(I,o.type)??h(B,o.type);if(c)return[X(c,t,e)];switch(o.type){case"FooterLogo":{const r=k(t.align),n=e("LogoBlock",{...t.reverse?{reverse:t.reverse}:{},...typeof t.customColor=="string"&&t.customColor?{customColor:t.customColor}:{},heightPx:Math.round(_*((u(t.widthPct)??100)/100)),href:"/",align:r,...M(t)}),p=E(t.tagline).trim();return p?[n,e("Text",{text:p,tone:"dim",align:r,_partStyles:{text:{...N}}})]:[n]}case"FooterText":{const r=typeof t.size=="string"&&S(g,t.size)?t.size:G;return[e("Text",{text:E(t.text),tone:typeof t.tone=="string"?t.tone:"default",_partStyles:{text:{size:g[r],lineHeight:T}}})]}case"FooterDivider":{const r=u(t.thickness),n=u(t.lengthPct);return[e("Divider",{...r!==void 0?{thickness:r}:{},...n!==void 0?{lengthPct:n}:{},...t.hideOnMobile===!0?{[L("mobile")]:!0}:{}})]}case"FooterGroup":{const r=Array.isArray(t.blocks)?t.blocks:[];return[e(d,{direction:t.direction==="horizontal"?"row":"column",gap:y("FooterGroup",t.gap),align:t.align==="center"||t.align==="end"||t.align==="stretch"?t.align:"start",...m,content:r.flatMap(n=>O(n,e,s))})]}default:return[]}}function V(o,e,s,t){const i=o&&Array.isArray(o.props?.blocks)?o.props.blocks:[],c=l=>e(d,{direction:"row",wrap:!0,share:"equal",gap:D,content:l}),r=[];let n=[];for(const l of i){const a=O(l,e,t);if(l.type==="FooterDivider"){n.length&&r.push(c(n)),n=[],r.push(...a);continue}a.length<=1?n.push(...a):n.push(e(d,{direction:"column",gap:R,align:"stretch",...m,content:a}))}(n.length||!r.length)&&r.push(c(n));const p=e(d,{direction:"column",content:[e("LegalLineBlock")]}),f=w(A,s,[...r,p]);return{...f,props:{...f.props,...o?.props?.width==="full"?{fullWidth:!0}:{}}}}export{q as FOOTER_MARK_SIZES,g as FOOTER_TEXT_PX,V as boxFooterFromFooter,O as pageBlocksFromFooterBlock};
|
|
@@ -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",
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import type { BlockMeta } from "./blocks/block-types.js";
|
|
1
2
|
type Props = Record<string, unknown>;
|
|
2
3
|
export type ListNode = {
|
|
3
4
|
type?: unknown;
|
|
4
5
|
props?: Props;
|
|
5
6
|
};
|
|
7
|
+
export declare function registerDeclaredSlots(metas: Readonly<Record<string, Pick<BlockMeta, "fields">>>): void;
|
|
8
|
+
export declare function nodeListKeys(node: ListNode): string[];
|
|
9
|
+
export declare function nodeListsOf<N extends ListNode = ListNode>(node: ListNode): N[][];
|
|
6
10
|
export declare function mapEachNode<N>(list: readonly N[], fn: (node: N, index: number) => N): N[];
|
|
7
11
|
export declare function mapNodeLists<N extends ListNode>(node: N, fn: (list: ListNode[], key: string) => ListNode[]): N;
|
|
8
12
|
export declare function mapPageContent<T>(data: T, fn: (content: ListNode[]) => ListNode[]): T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isNodeList as
|
|
1
|
+
import{isNodeList as f,slotsOf as y,storedKeyOrder as m}from"efficient-easel/data";import{GENERAL_METAS as d}from"./blocks/general/metas.js";const l={};let O=null;function u(){return O??={components:{...d,...l}}}function h(o){const n=u().components;for(const[t,e]of Object.entries(o)){const r=Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0;if(r&&r.fields!==e.fields)throw new Error(`lib/document/node-lists: "${t}" already declares its slots`);l[t]=e,n[t]=e}}function a(o){const n=o.props??{},t=typeof o.type=="string"?o.type:"",e=u(),s=t!==""&&Object.prototype.hasOwnProperty.call(e.components,t)?y({type:t,props:n},e).map(c=>c.slot).filter(c=>!c.includes(".")):[],p=s.filter(c=>f(n[c])),i=m(Object.keys(n).filter(c=>!s.includes(c)&&f(n[c])));return[...p,...i]}function w(o){const n=o.props??{};return a(o).map(t=>n[t])}function A(o,n){let t=null;return o.forEach((e,r)=>{const s=n(e,r);s!==e&&((t??=o.slice())[r]=s)}),t??o}function L(o,n){let t=null;for(const e of a(o)){const r=o.props[e],s=n(r,e);s!==r&&((t??={...o.props})[e]=s)}return t?{...o,props:t}:o}function x(o,n){const t=o;if(!t||!Array.isArray(t.content))return o;const e=n(t.content);return e===t.content?o:{...t,content:e}}function g(o,n){const t=x(o,n),e=o?.zones;if(!e||typeof e!="object")return t;let r=null;for(const[s,p]of Object.entries(e)){if(!Array.isArray(p))continue;const i=n(p);i!==p&&((r??={...e})[s]=i)}return r?{...t,zones:r}:t}export{A as mapEachNode,L as mapNodeLists,x as mapPageContent,g as mapPageLists,a as nodeListKeys,w as nodeListsOf,h as registerDeclaredSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{nodeListsOf as u}from"../node-lists.js";function a(n,t){const o=n.props?.id,e=t.appState?.data?.content;return!Array.isArray(e)||typeof o!="string"?!0:!e.some(r=>r?.props?.id===o)}const l={not:{context:"heldByANode",is:!0}};function y(n,t){return"parent"in t?t.parent!=null:!!p(t.appState,n.props?.id)}function p(n,t){const o=n?.data?.content;if(!Array.isArray(o)||typeof t!="string")return;const e=(r,s)=>{for(const i of r){if(i?.props?.id===t)return s;for(const f of u(i??{})){const d=e(f,i);if(d!==void 0)return d}}};return e(o,null)}export{l as NOT_HELD_BY_A_NODE,p as findParentNode,y as heldByANode,a as isNestedNode};
|
|
@@ -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};
|
|
@@ -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 +1 @@
|
|
|
1
|
-
import{isRuleSource as
|
|
1
|
+
import{isRuleSource as N,ruleChecks as G}from"./rule.js";import{readRules as _}from"./support/css-rules.js";import{stripComments as T}from"./support/css-source.js";import{applicable as V,census as J,deriveShapes as L,derefVars as Q,readVars as U,resolve as D,splitDecls as O}from"./support/panel-select-cascade.js";import{importsOf as q}from"../build/module-specifiers.js";const y="--sf-select-arrow",z=["background-image","background-size","background-repeat","background-position"],B=l=>/(^|[\s,>+~(])select(?![\w-])/.test(l);function X(l,a){return typeof a!="string"?{sheet:a,ours:!1}:{sheet:l.find(o=>o.path===a),ours:!0}}const Y=l=>l.filter(a=>/\.(tsx?|mts)$/.test(a.path)&&!N(a.path)),R=(l,a)=>l===`@/${a}`||l.endsWith(`/${a}`)||l===`./${a.split("/").pop()}`;function oe(l,a,o,n){const k=new Set;for(const S of o){const $=a.find(r=>r.path===S);if($)for(const r of q(l,$.path,$.text))r.endsWith(".css")&&!R(r,n)&&!r.startsWith("@/")&&!r.startsWith(".")&&k.add(r)}return[...k].sort()}function ae(l,a,o){const{check:n,report:k}=G("panel one arrow"),{sheet:S,ours:$}=X(a,o.panelSheet),r=S?.path??(typeof o.panelSheet=="string"?o.panelSheet:o.panelSheet.path),{population:m,helperDeclared:I}=J(l,Y(a),o.selectHelper),K=m.filter(e=>e.engineDrawn),p=m.filter(e=>!e.engineDrawn);a.some(e=>e.path===o.selectHelper.file)&&n(`${o.selectHelper.file} declares the house \`select\` helper`,I,"the census has no helper to resolve (B) against"),n(`the panel draws house-drawn selects (${p.length}, at least ${o.houseDrawnFloor})`,p.length>=o.houseDrawnFloor&&(p.length>0||o.houseDrawnFloor===0),`${p.length} found: ${p.map(e=>`${e.file}:${e.line}`).join(", ")||"(none)"} — with none, this card's rows do not exist and §3 passes empty`);const b=T(S?.text??""),w=U(b);n(`${r} was read`,b.length>1e4,`${b.length} bytes`);const x=_(b),i=L(m,b),W=i.reduce((e,t)=>e+t.rows,0);n(`every house-drawn select is in exactly one shape, and no engine-drawn field is in any (${i.map(e=>e.name).join(", ")})`,W===p.length,`shapes hold ${W} row(s), the census found ${p.length} house-drawn`);const u=new Map,F=new Map,v=[],E=[];for(const e of i){const t=V(x,e,r,0,"rest"),s=V(x,e,r,0,"hover");v.push(...t.unreadable,...s.unreadable),E.push(...s.undecided);const c={appearance:D(t.applied,"appearance",w).value};for(const d of z)c[d]=D(t.applied,d,w).value;c["@from"]=D(t.applied,"background-image",w).from,u.set(e.name,c);const g={};for(const d of z)g[d]=D(s.applied,d,w).value;F.set(e.name,g)}const f=(e,t)=>e.get(t.name);n("every rule that can reach a panel select was understood",v.length===0,`could not parse: ${[...new Set(v)].slice(0,4).join(" · ")}${v.length>4?` (+${v.length-4} more)`:""} — a rule this model skips is a rule it lies about`);for(const e of i){const t=f(u,e);n(`${e.name}: the browser draws no arrow of its own (appearance: none)`,t.appearance==="none",`appearance resolves to \`${t.appearance}\` on ${e.rows} row(s) — the platform arrow is still painted, so an added image would sit beside it`)}for(const e of i){const t=f(u,e);n(`${e.name}: an arrow IS drawn`,/url\(/.test(t["background-image"]),`background-image resolves to \`${t["background-image"]}\` on ${e.rows} row(s) — a row with no arrow reads as a stylesheet that failed to load, and taking the arrow away undoes the owner's 2026-09-01 ruling`)}const M=f(u,i[0]);for(const e of["appearance",...z]){const t=i.filter(s=>f(u,s)[e]!==M[e]);n(`every shape resolves the same \`${e}\``,t.length===0,`${i[0].name} (${i[0].rows} row(s)) says \`${M[e].slice(0,44)}\`, but `+t.map(s=>`${s.name} (${s.rows} row(s)) says \`${f(u,s)[e].slice(0,44)}\``).join("; "))}const A=e=>e["background-repeat"]!=="no-repeat"||e["background-size"]==="auto";for(const e of i){const t=f(u,e);n(`${e.name}: the arrow is never tiled (66397)`,!A(t),`repeat=${t["background-repeat"]} size=${t["background-size"]} — a full-size tile repeats ~2.5x across a 248px row and draws a bar of triangles`)}for(const e of i){const t=f(F,e);n(`${e.name}: the arrow is never tiled under the pointer either (66397)`,/url\(/.test(t["background-image"])&&!A(t),`hovered image=${t["background-image"].slice(0,40)} repeat=${t["background-repeat"]} size=${t["background-size"]} — this is the dark bar with three triangles, in the state it was filed in`)}const H=E.filter(e=>O(e.decls).some(t=>t.prop==="background"||z.includes(t.prop)));if(n("no rule this model cannot judge decides a hovered arrow property",H.length===0,`${[...new Set(H.map(e=>`@media ${e.media} { ${e.selector} }`))].join(" · ")} — an unjudged media query holding one of these properties makes (e) a guess`),$){const e=x.flatMap(t=>t.selector.split(",").map(s=>s.trim()).filter(s=>B(s)).filter(()=>O(t.decls).some(s=>s.prop==="background")).map(s=>t.media?`${t.media} { ${s} }`:s));n("no rule that names the `select` element uses the `background` shorthand",e.length===0,`${e.join(" · ")} — a shorthand resets background-size/-repeat/-position/-image; set \`background-color\` instead (card 66397)`)}if(o.editorEntries!==void 0){const e=new Set;for(const c of o.editorEntries){const g=a.find(h=>h.path===c),d=g?q(l,g.path,g.text):[];n(`${c} loads ${r}`,d.some(h=>R(h,r)),g?"§3 resolves the panel stylesheet's cascade, and this editor does not load it":"the entry is not among the files");for(const h of d)h.endsWith(".css")&&!R(h,r)&&e.add(h)}const t=[],s=[];for(const c of e){const d=(c.startsWith("@/")?a.find(h=>h.path===c.slice(2))?.text:void 0)??o.loadedSheets?.[c]??null;if(d===null){s.push(c);continue}for(const h of _(T(d)))for(const C of h.selector.split(","))B(C)&&t.push(`${c}: ${C.trim()}`)}n(`every other stylesheet the editors load was read (${e.size})`,s.length===0,`could not resolve ${s.join(", ")} — a sheet this rule cannot open is a cascade it cannot rule out`),n("no other stylesheet the editors load has a rule naming the `select` element",t.length===0,`${t.slice(0,4).join(" · ")}${t.length>4?` (+${t.length-4} more)`:""} — §3 resolves ${r} alone, so this rule is invisible to every answer above`)}const j=Q(w.get(y)??"",w);if($){const e=x.flatMap(t=>O(t.decls)).filter(t=>t.prop===y);n(`${r} declares \`${y}\` exactly once, as an image`,e.length===1&&/^url\(/.test(j),`${e.length} declaration(s), value \`${j.slice(0,60)||"(none)"}\` — the one arrow needs one definition`)}for(const e of i){const t=f(u,e)["background-image"];n(`${e.name}: the arrow it draws is \`var(${y})\`, glyph for glyph`,j!==""&&t===j,`resolves \`${t.slice(0,60)}\` — a redrawn arrow is the SS seat's call, made once in \`${y}\`, not in a rule of its own`)}const P=p.flatMap(e=>e.classes.filter(t=>/^(appearance-|bg-(none|\[|gradient|linear|radial|conic))/.test(t)).map(t=>`${e.file}:${e.line} \`${t}\``));return n("no panel select decides its arrow with a utility class",P.length===0,`${P.join(", ")} — §3 reads only ${r}`),n(`the population came from the program, not from a number typed here (${m.length}, at least ${o.populationFloor})`,m.length>=o.populationFloor&&m.length>0,`${m.length} dropdowns found (${p.length} house-drawn, ${K.length} engine-drawn) — a census that collapses to a handful means the walk stopped reading`),k()}export{Y as censusFiles,oe as editorPackageSheets,B as namesSelectElement,ae as panelOneArrow,X as panelSheetOf};
|