efficient-web-builder 38.0.0 → 38.0.1

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
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 38.0.1 - 2026-10-23
6
+
7
+ ### Fixed
8
+
9
+ - **Only a wheel's own page reads back as a Product link.** A saved link is a Product only when it is `/wheels/<slug>` (one segment, `isProductPath` in `lib/links/page-link-rules`). Every path under `/wheels/` used to count, so a menu link onto a collection page (`/wheels/collections/precision-forged`) re-opened in the Product box as "(unavailable)", and picking from that list swapped the link for a wheel and renamed the item after it (Hartes US header, 2026-10-23). A deeper `/wheels/…` path now reads as a Custom URL. `inferLinkKind` and the older `inferKind` share the one rule.
10
+
5
11
  ## 38.0.0 - 2026-10-23
6
12
 
7
13
  **MAJOR for hosts:** the left-panel media view is gone (easel 19 media popup); peers efficient-easel ^19.0.0 and efficient-shell ^8.39.0 (#266). Each general block is meta.ts + render.tsx with GENERAL_METAS (#264; three constants moved, no host imports them). Also the Page / Popup add menu and popup links (#265).
@@ -1 +1 @@
1
- import{say as n}from"../editor-words.js";import{anchorPath as d,linkKindsFor as f,pageAnchors as P,pagePath as m,popupPath as v,popupSlugOf as F,postPath as b}from"./page-link-rules.js";const O=()=>({choosePage:n("Choose a page"),chooseSection:n("Choose a section"),noSections:n("No section anchors yet"),sectionHint:n("Jumps to a section on that page."),choosePost:n("Choose a post"),chooseProduct:n("Choose a product"),choosePopup:n("Choose a popup")});function h(o,s,a){if(!o)return"page";if(F(o))return"popup";if(o.startsWith("/journal/"))return"blog";if(o.startsWith("/wheels/"))return"product";if(o.includes("#")){const r=o.slice(0,o.indexOf("#"));if(r===""||r==="/"||s.includes(r))return"anchor"}return o==="/"||s.includes(o)||a&&a.listingPaths.includes(a.targetOf(o))?"page":"custom"}function w(o,s){const a=O(),r=o.pages.map(e=>({value:m(e.slug),label:e.title})),p=s?.pageOptions?s.pageOptions(r):r,c=p.map(e=>e.value),l=o.pages.map(e=>({label:e.title,options:P(...e.docs).map(t=>({value:d(e.slug,t.slug),label:t.name}))})).filter(e=>e.options.length>0),g=e=>{switch(e){case"page":return{type:"select",options:p,placeholder:a.choosePage};case"anchor":return{type:"groups",groups:l,placeholder:l.length?a.chooseSection:a.noSections};case"blog":return{type:"select",options:o.posts.map(t=>({value:b(t.slug),label:t.title||t.slug})),placeholder:a.choosePost};case"product":return{type:"select",options:o.products.map(t=>({value:t.href,label:t.name||t.href})),placeholder:a.chooseProduct};case"popup":return{type:"select",options:(o.popups??[]).map(t=>({value:v(t.slug),label:t.title||t.slug})),placeholder:a.choosePopup};case"custom":return{type:"text"}}},i=f(o.offers).map(e=>({value:e.value,label:n(e.label),target:g(e.value),...e.value==="anchor"?{hint:a.sectionHint}:{},...e.value==="blog"||e.value==="product"||e.value==="popup"?{hideWhenEmpty:!0}:{}}));if(!s)return{kinds:i,rules:{kindOf:e=>h(e,c),targetOf:e=>e,readFilter:()=>null,withFilter:e=>e}};const u=e=>{const t=s.withFilter(e,null);return s.listingPaths.includes(t)?t:e};return{kinds:i,rules:{kindOf:e=>h(e,c,{listingPaths:s.listingPaths,targetOf:u}),targetOf:u,readFilter:s.readFilter,withFilter:s.withFilter},filtersFor:e=>s.listingPaths.includes(e)?s.filtersFor(e):null}}export{h as inferLinkKind,w as linkPickerSetup};
1
+ import{say as n}from"../editor-words.js";import{anchorPath as d,linkKindsFor as P,isProductPath as f,pageAnchors as m,pagePath as v,popupPath as F,popupSlugOf as b,postPath as O}from"./page-link-rules.js";const y=()=>({choosePage:n("Choose a page"),chooseSection:n("Choose a section"),noSections:n("No section anchors yet"),sectionHint:n("Jumps to a section on that page."),choosePost:n("Choose a post"),chooseProduct:n("Choose a product"),choosePopup:n("Choose a popup")});function h(o,s,a){if(!o)return"page";if(b(o))return"popup";if(o.startsWith("/journal/"))return"blog";if(f(o))return"product";if(o.includes("#")){const r=o.slice(0,o.indexOf("#"));if(r===""||r==="/"||s.includes(r))return"anchor"}return o==="/"||s.includes(o)||a&&a.listingPaths.includes(a.targetOf(o))?"page":"custom"}function w(o,s){const a=y(),r=o.pages.map(e=>({value:v(e.slug),label:e.title})),c=s?.pageOptions?s.pageOptions(r):r,p=c.map(e=>e.value),l=o.pages.map(e=>({label:e.title,options:m(...e.docs).map(t=>({value:d(e.slug,t.slug),label:t.name}))})).filter(e=>e.options.length>0),g=e=>{switch(e){case"page":return{type:"select",options:c,placeholder:a.choosePage};case"anchor":return{type:"groups",groups:l,placeholder:l.length?a.chooseSection:a.noSections};case"blog":return{type:"select",options:o.posts.map(t=>({value:O(t.slug),label:t.title||t.slug})),placeholder:a.choosePost};case"product":return{type:"select",options:o.products.map(t=>({value:t.href,label:t.name||t.href})),placeholder:a.chooseProduct};case"popup":return{type:"select",options:(o.popups??[]).map(t=>({value:F(t.slug),label:t.title||t.slug})),placeholder:a.choosePopup};case"custom":return{type:"text"}}},i=P(o.offers).map(e=>({value:e.value,label:n(e.label),target:g(e.value),...e.value==="anchor"?{hint:a.sectionHint}:{},...e.value==="blog"||e.value==="product"||e.value==="popup"?{hideWhenEmpty:!0}:{}}));if(!s)return{kinds:i,rules:{kindOf:e=>h(e,p),targetOf:e=>e,readFilter:()=>null,withFilter:e=>e}};const u=e=>{const t=s.withFilter(e,null);return s.listingPaths.includes(t)?t:e};return{kinds:i,rules:{kindOf:e=>h(e,p,{listingPaths:s.listingPaths,targetOf:u}),targetOf:u,readFilter:s.readFilter,withFilter:s.withFilter},filtersFor:e=>s.listingPaths.includes(e)?s.filtersFor(e):null}}export{h as inferLinkKind,w as linkPickerSetup};
@@ -21,4 +21,5 @@ export declare function pageAnchors(...docs: unknown[]): {
21
21
  name: string;
22
22
  }[];
23
23
  export declare function linkPagePath(url: string): string;
24
+ export declare function isProductPath(url: string): boolean;
24
25
  export declare function inferKind(url: string, pagePaths: string[]): LinkKind;
@@ -1 +1 @@
1
- import{HOME_PAGE_SLUG as f}from"../puck/home-page.js";import{slugify as p}from"../slugify.js";const i=[{value:"page",label:"Page"},{value:"anchor",label:"Anchor"},{value:"blog",label:"Blog post",needs:"service"},{value:"product",label:"Product",needs:"commerce"},{value:"popup",label:"Popup"},{value:"custom",label:"Custom URL"}];function x(e){return e.offersCommerce&&e.offersService?i:i.filter(t=>!t.needs||(t.needs==="commerce"?e.offersCommerce:e.offersService))}const u="#popup:";function g(e){return`${u}${e}`}function P(e){return e.startsWith(u)&&e.slice(u.length).trim()||null}function a(e){return e===f?"/":`/${e}`}function b(e){return`/journal/${e}`}function A(e){return`/wheels/${e}`}function $(e,t){return`${a(e)}#${t}`}function l(e){return p(e)}function h(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}function y(...e){const t=new Set,n=[];for(const o of e)for(const s of o?.content??[]){const c=h(s?.props?.anchor);if(!c)continue;const r=l(c);!r||t.has(r)||(t.add(r),n.push({slug:r,name:c}))}return n}function O(e){const t=e.indexOf("#"),n=t===-1?e:e.slice(0,t),o=n.indexOf("?");return o===-1?n:n.slice(0,o)}function S(e,t){if(!e)return"page";if(e.startsWith("/journal/"))return"blog";if(e.startsWith("/wheels/"))return"product";if(e.includes("#")){const n=e.slice(0,e.indexOf("#"));if(n===""||n==="/"||t.includes(n))return"anchor"}return e==="/"||t.includes(e)?"page":"custom"}export{i as LINK_KINDS,u as POPUP_LINK_PREFIX,$ as anchorPath,S as inferKind,x as linkKindsFor,O as linkPagePath,y as pageAnchors,a as pagePath,g as popupPath,P as popupSlugOf,b as postPath,l as slugifyAnchor,A as wheelPath};
1
+ import{HOME_PAGE_SLUG as f}from"../puck/home-page.js";import{slugify as p}from"../slugify.js";const i=[{value:"page",label:"Page"},{value:"anchor",label:"Anchor"},{value:"blog",label:"Blog post",needs:"service"},{value:"product",label:"Product",needs:"commerce"},{value:"popup",label:"Popup"},{value:"custom",label:"Custom URL"}];function g(e){return e.offersCommerce&&e.offersService?i:i.filter(t=>!t.needs||(t.needs==="commerce"?e.offersCommerce:e.offersService))}const u="#popup:";function P(e){return`${u}${e}`}function b(e){return e.startsWith(u)&&e.slice(u.length).trim()||null}function a(e){return e===f?"/":`/${e}`}function $(e){return`/journal/${e}`}function A(e){return`/wheels/${e}`}function y(e,t){return`${a(e)}#${t}`}function l(e){return p(e)}function h(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}function O(...e){const t=new Set,n=[];for(const o of e)for(const s of o?.content??[]){const c=h(s?.props?.anchor);if(!c)continue;const r=l(c);!r||t.has(r)||(t.add(r),n.push({slug:r,name:c}))}return n}function S(e){const t=e.indexOf("#"),n=t===-1?e:e.slice(0,t),o=n.indexOf("?");return o===-1?n:n.slice(0,o)}function m(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}function w(e,t){if(!e)return"page";if(e.startsWith("/journal/"))return"blog";if(m(e))return"product";if(e.includes("#")){const n=e.slice(0,e.indexOf("#"));if(n===""||n==="/"||t.includes(n))return"anchor"}return e==="/"||t.includes(e)?"page":"custom"}export{i as LINK_KINDS,u as POPUP_LINK_PREFIX,y as anchorPath,w as inferKind,m as isProductPath,g as linkKindsFor,S as linkPagePath,O as pageAnchors,a as pagePath,P as popupPath,b as popupSlugOf,$ as postPath,l as slugifyAnchor,A as wheelPath};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-web-builder",
3
- "version": "38.0.0",
3
+ "version": "38.0.1",
4
4
  "description": "The EFFICIENT website builder: the website editor, the general sections and the renderer that draws them, compiled. Hostable by any EFFICIENT product; nothing here imports a host.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",