efficient-storefront-blocks 0.125.1 → 0.125.2

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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.125.2 — 2026-11-23 — Option reads use parseOption; the headline name reads the view tiers
4
+
5
+ **For hosts:** no peer change. The storefront re-vendors `src/` with
6
+ `node scripts/sync-storefront-blocks.mjs`, then runs `just check`.
7
+
8
+ - **Hand-written option reads move to `parseOption`:** Search's phone `Show as`, a
9
+ served field's kind and a linked hero's kind. A stored value reads the same as before.
10
+ - **The card headline name takes its view tiers from easel** (`VIEW_TIERS`), not a typed list.
11
+
3
12
  ## 0.125.1 — 2026-11-22 — Accept efficient-shell 15; take efficient-web-builder 74.6 and efficient-easel 37.4
4
13
 
5
14
  **For hosts:** the `efficient-shell` peer widens to `^14.5.1 || ^15.0.0`, so a
@@ -1 +1 @@
1
- import{registerBlockSources as u}from"efficient-web-builder/format/lib/content/block-sources";import{cardTemplateFields as y,hasCardTemplate as k}from"efficient-web-builder/format/lib/content/card-template";import{say as e}from"efficient-web-builder/format/lib/editor-words";import{OPENING_SAMPLE_WEEK as S}from"../../render/lib/sections/opening-hours.js";import{PRODUCT_REVIEWS_SOURCE as E}from"../../render/lib/sections/reviews.js";import{MENU_BLOG_CATEGORIES_SOURCE as b,MENU_COUNT_FIELD as l}from"../../render/lib/content/menu-card-seed.js";import{MENU_BLOCK_TYPE as g}from"../../render/lib/document/document-nodes.js";const O=[{key:"group-offices",label:"Group offices",blocks:["Footprint"]},{key:E,label:"Product reviews",blocks:["Reviews"]}];u(O);const m="+00 000 0000",h={rooms:()=>[{key:"sample-1",title:e("First room"),excerpt:e("What this room has.")},{key:"sample-2",title:e("Second room"),excerpt:e("What this room has.")},{key:"sample-3",title:e("Third room"),excerpt:e("What this room has.")}],"location-contact":()=>[{key:"location",name:e("Location name"),address:e("Street address"),state:e("State"),country:e("Country"),phone:m,hours:e("Opening hours")}],"location-cards":()=>[{key:"where",name:e("Address"),note:e("Street address")},{key:"hours",name:e("Opening hours"),note:e("A line about it appears here.")},{key:"call",name:e("Phone"),note:m}],"location-footer":()=>[{text:e("Street address")},{text:m},{text:e("Opening hours")}],"location-rate-table":()=>{const o=t=>JSON.stringify([{column:e("Standard"),amount:"$000",standard:!1},{column:e("VIP"),amount:"$000",standard:t}]);return[{group:e("In-house"),label:e("Session · 60 min"),cells:o(!1)},{group:e("In-house"),label:e("Session · 60 min · Night"),cells:o(!0)},{group:e("Away"),label:e("Session · 60 min"),cells:o(!1)}]},"location-opening":()=>[{week:S,zone:"Australia/Sydney",hours:""}],"site-messaging":()=>[{app:"wechat",name:"WeChat",handle:"yourvenue",href:"",qr:"https://u.wechat.com/yourvenue"},{app:"telegram",name:"Telegram",handle:"@yourvenue",href:"https://t.me/yourvenue",qr:"https://t.me/yourvenue"},{app:"whatsapp",name:"WhatsApp",handle:"0400 000 000",href:"https://wa.me/61400000000",qr:"https://wa.me/61400000000"},{app:"line",name:"LINE",handle:"yourvenue",href:"https://line.me/ti/p/~yourvenue",qr:"https://line.me/ti/p/~yourvenue"}],[b]:()=>[{label:e("First category"),href:"/journal",[l]:"12"},{label:e("Second category"),href:"/journal",[l]:"8"},{label:e("Third category"),href:"/journal",[l]:"3"}],"location-payment-methods":()=>[{label:e("Cash"),kind:"cash"},{label:e("Card"),kind:"card"}],"shop-payment-methods":()=>[{label:"Visa / Mastercard / American Express",kind:"card"},{label:"PayPal",kind:""},{label:e("Bank transfer"),kind:"wire"}]},d=new Set(["Cards",g]),f={[l]:()=>e("Count"),name:()=>e("Name"),note:()=>e("Note"),price:()=>e("Price"),time:()=>e("Time")},_=o=>o.replace(/_([a-z0-9])/g,(t,s)=>s.toUpperCase());function C(o){const t=Array.isArray(o.blocks)?o.blocks:[];if(!t.some(r=>d.has(r))||t.some(r=>!d.has(r)&&k(r))||!Array.isArray(o.fields))return;const s=t.filter(r=>d.has(r)).flatMap(r=>y(r)),n=[];for(const r of o.fields){if(typeof r!="string"||!r.trim())continue;const a=_(r.trim());if(a==="key"||n.some(c=>c.key===a))continue;const i=s.find(c=>c.key===a),p=i?.kind==="image"||i?.kind==="link"?i.kind:void 0;n.push({key:a,label:i?.label??(Object.hasOwn(f,a)?f[a]():void 0)??a,...p?{kind:p}:{}})}return n.length?n:void 0}function T(o){if(Array.isArray(o))for(const t of o){const s=typeof t?.key=="string"&&Object.hasOwn(h,t.key)?h[t.key]():void 0;try{const n=C(t);u([{key:t.key,label:t.label,blocks:t.blocks,...s?{sample:s}:{},...n?{fields:n}:{}}])}catch{}}}export{O as EFFICIENT_BLOCK_SOURCES,T as registerServedBlockSources};
1
+ import{parseOption as y}from"efficient-shell/format";import{registerBlockSources as u}from"efficient-web-builder/format/lib/content/block-sources";import{cardTemplateFields as k,hasCardTemplate as S}from"efficient-web-builder/format/lib/content/card-template";import{say as e}from"efficient-web-builder/format/lib/editor-words";import{OPENING_SAMPLE_WEEK as E}from"../../render/lib/sections/opening-hours.js";import{PRODUCT_REVIEWS_SOURCE as b}from"../../render/lib/sections/reviews.js";import{MENU_BLOG_CATEGORIES_SOURCE as g,MENU_COUNT_FIELD as i}from"../../render/lib/content/menu-card-seed.js";import{MENU_BLOCK_TYPE as O}from"../../render/lib/document/document-nodes.js";const _=[{key:"group-offices",label:"Group offices",blocks:["Footprint"]},{key:b,label:"Product reviews",blocks:["Reviews"]}];u(_);const c="+00 000 0000",h={rooms:()=>[{key:"sample-1",title:e("First room"),excerpt:e("What this room has.")},{key:"sample-2",title:e("Second room"),excerpt:e("What this room has.")},{key:"sample-3",title:e("Third room"),excerpt:e("What this room has.")}],"location-contact":()=>[{key:"location",name:e("Location name"),address:e("Street address"),state:e("State"),country:e("Country"),phone:c,hours:e("Opening hours")}],"location-cards":()=>[{key:"where",name:e("Address"),note:e("Street address")},{key:"hours",name:e("Opening hours"),note:e("A line about it appears here.")},{key:"call",name:e("Phone"),note:c}],"location-footer":()=>[{text:e("Street address")},{text:c},{text:e("Opening hours")}],"location-rate-table":()=>{const o=t=>JSON.stringify([{column:e("Standard"),amount:"$000",standard:!1},{column:e("VIP"),amount:"$000",standard:t}]);return[{group:e("In-house"),label:e("Session · 60 min"),cells:o(!1)},{group:e("In-house"),label:e("Session · 60 min · Night"),cells:o(!0)},{group:e("Away"),label:e("Session · 60 min"),cells:o(!1)}]},"location-opening":()=>[{week:E,zone:"Australia/Sydney",hours:""}],"site-messaging":()=>[{app:"wechat",name:"WeChat",handle:"yourvenue",href:"",qr:"https://u.wechat.com/yourvenue"},{app:"telegram",name:"Telegram",handle:"@yourvenue",href:"https://t.me/yourvenue",qr:"https://t.me/yourvenue"},{app:"whatsapp",name:"WhatsApp",handle:"0400 000 000",href:"https://wa.me/61400000000",qr:"https://wa.me/61400000000"},{app:"line",name:"LINE",handle:"yourvenue",href:"https://line.me/ti/p/~yourvenue",qr:"https://line.me/ti/p/~yourvenue"}],[g]:()=>[{label:e("First category"),href:"/journal",[i]:"12"},{label:e("Second category"),href:"/journal",[i]:"8"},{label:e("Third category"),href:"/journal",[i]:"3"}],"location-payment-methods":()=>[{label:e("Cash"),kind:"cash"},{label:e("Card"),kind:"card"}],"shop-payment-methods":()=>[{label:"Visa / Mastercard / American Express",kind:"card"},{label:"PayPal",kind:""},{label:e("Bank transfer"),kind:"wire"}]},m=new Set(["Cards",O]),f={[i]:()=>e("Count"),name:()=>e("Name"),note:()=>e("Note"),price:()=>e("Price"),time:()=>e("Time")},C=o=>o.replace(/_([a-z0-9])/g,(t,s)=>s.toUpperCase());function w(o){const t=Array.isArray(o.blocks)?o.blocks:[];if(!t.some(r=>m.has(r))||t.some(r=>!m.has(r)&&S(r))||!Array.isArray(o.fields))return;const s=t.filter(r=>m.has(r)).flatMap(r=>k(r)),n=[];for(const r of o.fields){if(typeof r!="string"||!r.trim())continue;const a=C(r.trim());if(a==="key"||n.some(l=>l.key===a))continue;const p=s.find(l=>l.key===a),d=y(["image","link"],"",p?.kind)||void 0;n.push({key:a,label:p?.label??(Object.hasOwn(f,a)?f[a]():void 0)??a,...d?{kind:d}:{}})}return n.length?n:void 0}function R(o){if(Array.isArray(o))for(const t of o){const s=typeof t?.key=="string"&&Object.hasOwn(h,t.key)?h[t.key]():void 0;try{const n=w(t);u([{key:t.key,label:t.label,blocks:t.blocks,...s?{sample:s}:{},...n?{fields:n}:{}}])}catch{}}}export{_ as EFFICIENT_BLOCK_SOURCES,R as registerServedBlockSources};