efficient-web-builder 34.0.0 → 36.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/dist/editor/components/CanvasPartsBridge.d.ts +4 -0
  3. package/dist/editor/components/CanvasPartsBridge.js +1 -0
  4. package/dist/editor/components/MediaUploadField.d.ts +2 -1
  5. package/dist/editor/components/MediaUploadField.js +1 -1
  6. package/dist/editor/components/PartSettingsPanel.js +1 -1
  7. package/dist/editor/components/PreviewPartAnchors.js +1 -1
  8. package/dist/editor/components/SectionTextPartBridge.js +1 -1
  9. package/dist/editor/components/StandaloneSectionEditor.js +1 -1
  10. package/dist/editor/components/StorefrontEditor.js +1 -1
  11. package/dist/editor/components/WebsiteScreenParts.js +1 -1
  12. package/dist/editor/lib/puck/blocks/general/Cards/fields.js +1 -1
  13. package/dist/editor/lib/puck/blocks/general/Timeline/fields.js +1 -1
  14. package/dist/editor/lib/puck/blocks/general/index.d.ts +2 -2
  15. package/dist/editor/lib/puck/controls.d.ts +2 -1
  16. package/dist/editor/lib/puck/every-page.d.ts +2 -2
  17. package/dist/editor/lib/puck/every-page.js +1 -1
  18. package/dist/editor/lib/puck/part-anchors.d.ts +4 -2
  19. package/dist/editor/lib/puck/part-anchors.js +1 -1
  20. package/dist/editor/lib/site-text-styles.d.ts +3 -2
  21. package/dist/editor/lib/site-text-styles.js +2 -2
  22. package/dist/format/lib/editor-words-catalogue.d.ts +5 -5
  23. package/dist/format/lib/editor-words-catalogue.js +3 -3
  24. package/dist/format/lib/media-value.d.ts +9 -0
  25. package/dist/format/lib/media-value.js +1 -0
  26. package/dist/format/lib/puck/passes/media-values.d.ts +3 -0
  27. package/dist/format/lib/puck/passes/media-values.js +1 -0
  28. package/dist/format/lib/puck/section-catalog.js +7 -1
  29. package/dist/format/lib/puck/templateFields.js +1 -1
  30. package/dist/format/lib/text-style-face.d.ts +3 -0
  31. package/dist/format/lib/text-style-face.js +1 -0
  32. package/dist/render/components/Heading.d.ts +7 -1
  33. package/dist/render/components/Heading.js +1 -1
  34. package/dist/render/components/PartStyledKind.js +1 -1
  35. package/dist/render/components/PartStyledText.js +1 -1
  36. package/dist/render/components/PublishedPartStylesContext.js +1 -1
  37. package/dist/render/components/Text.d.ts +2 -1
  38. package/dist/render/components/Text.js +1 -1
  39. package/dist/render/lib/puck/blocks/general/Cards/render.d.ts +1 -0
  40. package/dist/render/lib/puck/blocks/general/Cards/render.js +1 -1
  41. package/dist/render/lib/puck/blocks/general/KeyFeatures/render.d.ts +2 -0
  42. package/dist/render/lib/puck/blocks/general/KeyFeatures/render.js +1 -1
  43. package/dist/render/lib/puck/blocks/general/Text/render.js +1 -1
  44. package/dist/render/lib/puck/blocks/general/Timeline/render.d.ts +2 -0
  45. package/dist/render/lib/puck/blocks/general/Timeline/render.js +2 -2
  46. package/dist/render/lib/puck/blocks/general/TimelineTrack/render.d.ts +2 -0
  47. package/dist/render/lib/puck/blocks/general/TimelineTrack/render.js +1 -1
  48. package/dist/render/lib/puck/part-styles.d.ts +13 -3
  49. package/dist/render/lib/puck/part-styles.js +2 -2
  50. package/dist/render/lib/puck/passes/index.js +1 -1
  51. package/dist/render/lib/puck/text-parts.d.ts +1 -0
  52. package/dist/render/lib/puck/text-parts.js +1 -1
  53. package/package.json +5 -5
@@ -1 +1 @@
1
- import c from"./media-manifest.json";const p=c.mediaFields,u=c.snapshotObjects,y=c.hydratedLists;function h(r){return typeof r=="string"?"":Array.isArray(r)?[]:r&&typeof r=="object"?null:r}function a(r,o){if(o.length===0)return h(r);const[n,...e]=o,t=n.endsWith("[]"),s=t?n.slice(0,-2):n;if(!r||typeof r!="object"||Array.isArray(r))return r;const i=r;if(!(s in i))return r;const f=i[s];return t?Array.isArray(f)?{...i,[s]:f.map(A=>a(A,e.length?e:[]))}:r:{...i,[s]:a(f,e)}}function d(r,o){if(Array.isArray(r))return r.map(t=>d(t,o));if(!r||typeof r!="object")return r;const n=r,e={};for(const t of o)t in n&&(e[t]=n[t]);return e}function m(r,o){let n=o;for(const t of p[r]??[])n=a(n,t.split("."));const e=u[r];if(e)for(const[t,s]of Object.entries(e))t in n&&(n={...n,[t]:d(n[t],s.keep)});for(const t of y[r]??[])Array.isArray(n[t])&&(n={...n,[t]:[]});return n}function b(r,o){return typeof o!="function"?o:n=>o(m(r,n))}function S(r,o){if(!o)return r;const n=r,e={};for(const[t,s]of Object.entries(n.components)){const i=(p[t]?.length??0)>0||u[t]||y[t];e[t]=i&&s.render?{...s,render:b(t,s.render)}:s}return{...n,components:e}}export{S as withTemplateMediaPlaceholders};
1
+ import{isMediaValueObject as d,mapAtMediaPath as m}from"../media-value.js";import f from"./media-manifest.json";const i=f.mediaFields,c=f.snapshotObjects,a=f.hydratedLists;function y(r){return typeof r=="string"||d(r)?"":Array.isArray(r)?[]:r&&typeof r=="object"?null:r}function p(r,e){if(Array.isArray(r))return r.map(t=>p(t,e));if(!r||typeof r!="object")return r;const n=r,o={};for(const t of e)t in n&&(o[t]=n[t]);return o}function A(r,e){let n=e;for(const t of i[r]??[])n=m(n,t,y);const o=c[r];if(o)for(const[t,s]of Object.entries(o))t in n&&(n={...n,[t]:p(n[t],s.keep)});for(const t of a[r]??[])Array.isArray(n[t])&&(n={...n,[t]:[]});return n}function h(r,e){return typeof e!="function"?e:n=>e(A(r,n))}function j(r,e){if(!e)return r;const n=r,o={};for(const[t,s]of Object.entries(n.components)){const u=(i[t]?.length??0)>0||c[t]||a[t];o[t]=u&&s.render?{...s,render:h(t,s.render)}:s}return{...n,components:o}}export{j as withTemplateMediaPlaceholders};
@@ -0,0 +1,3 @@
1
+ export declare function faceClassOf(style: {
2
+ id: string;
3
+ }): string;
@@ -0,0 +1 @@
1
+ function e(n){switch(n.id){case"heading-1":return"font-display";case"heading-2":return"font-heading2";case"heading-3":return"font-heading3";case"body-1":return"font-body";case"body-5":return"font-mono";default:return`font-${n.id}`}}export{e as faceClassOf};
@@ -1,6 +1,8 @@
1
1
  import type { PadValues } from "../../format/lib/content/section-padding.js";
2
+ import type { CSSProperties } from "react";
2
3
  import type { BlockAlign as Align } from "../../format/lib/content/block-align.js";
3
- type Level = "1" | "2" | "3" | "4" | "5" | "6";
4
+ export type HeadingLevel = "1" | "2" | "3" | "4" | "5" | "6";
5
+ type Level = HeadingLevel;
4
6
  interface HeadingProps {
5
7
  pad?: PadValues;
6
8
  level: Level;
@@ -9,5 +11,9 @@ interface HeadingProps {
9
11
  contained: boolean;
10
12
  hero?: boolean;
11
13
  }
14
+ export declare function headingLook(level: Level, align: Align, face?: string): {
15
+ className: string;
16
+ style: CSSProperties;
17
+ };
12
18
  export default function Heading({ level, text, align, contained, hero, pad }: HeadingProps): import("react").JSX.Element;
13
19
  export {};
@@ -1 +1 @@
1
- import{jsx as n}from"react/jsx-runtime";import{resolveTypeSize as d}from"../../format/lib/content/section-type-size.js";import c from"./BlockFrame.js";import{renderHeadline as l}from"./goldPhrases.js";const z={1:{size:"clamp(48px,7vw,96px)",role:"heading",step:"headingLarge",leading:"leading-[0.95]"},2:{size:"56px",sizeMobile:"36px",role:"heading",step:"headingMedium",rank:2,leading:"leading-none"},3:{size:"40px",sizeMobile:"28px",role:"heading",step:"headingSmall",rank:3,leading:"leading-[1.05]"},4:{size:"28px",role:"heading",step:"headingSmall",rank:3,leading:"leading-[1.1]"},5:{size:"22px",role:"body",step:"body",leading:"leading-[1.2]"},6:{size:"18px",role:"body",step:"body",leading:"leading-[1.3]"}},v="font-display font-medium leading-[0.92] tracking-[-0.04em] text-[length:min(var(--size-headingLarge,clamp(64px,9vw,144px)),var(--sf-heading-max,9999px))] max-[800px]:text-[length:min(var(--size-headingMedium,clamp(48px,12vw,76px)),var(--sf-heading-max,9999px))] max-[800px]:leading-[0.95]",u={left:"text-left",center:"text-center",right:"text-right"};function w({level:a,text:t,align:g,contained:r,hero:o=!1,pad:s}){if(o)return n("h1",{className:v,children:l(t,!1)});const h=`h${a}`,e=z[a],p=d(void 0,e.size,e.role,e.step),i=e.sizeMobile?d(void 0,e.sizeMobile,e.role,e.step):void 0,m={"--heading-size":p,...i?{"--heading-size-m":i}:{}},x=e.rank===2?"[font-weight:var(--sf-heading-2-weight,var(--sf-heading-weight,500))]":e.rank===3?"[font-weight:var(--sf-heading-3-weight,var(--sf-heading-weight,500))]":"[font-weight:var(--sf-heading-weight,500)]",f=["text-[length:var(--heading-size)]",e.leading,i?"max-[800px]:text-[length:var(--heading-size-m)]":""].filter(Boolean).join(" ");return n(c,{contained:r,className:"py-6",pad:s?{values:s,frame:24}:void 0,children:n(h,{className:`font-display ${x} tracking-[-0.03em] text-fg ${f} ${u[g]}`,style:m,children:l(t,!1)})})}export{w as default};
1
+ import{jsx as g}from"react/jsx-runtime";import{resolveTypeSize as r}from"../../format/lib/content/section-type-size.js";import p from"./BlockFrame.js";import{renderHeadline as o}from"./goldPhrases.js";const m={1:{size:"clamp(48px,7vw,96px)",role:"heading",step:"headingLarge",leading:"leading-[0.95]"},2:{size:"56px",sizeMobile:"36px",role:"heading",step:"headingMedium",rank:2,leading:"leading-none"},3:{size:"40px",sizeMobile:"28px",role:"heading",step:"headingSmall",rank:3,leading:"leading-[1.05]"},4:{size:"28px",role:"heading",step:"headingSmall",rank:3,leading:"leading-[1.1]"},5:{size:"22px",role:"body",step:"body",leading:"leading-[1.2]"},6:{size:"18px",role:"body",step:"body",leading:"leading-[1.3]"}},x="font-display font-medium leading-[0.92] tracking-[-0.04em] text-[length:min(var(--size-headingLarge,clamp(64px,9vw,144px)),var(--sf-heading-max,9999px))] max-[800px]:text-[length:min(var(--size-headingMedium,clamp(48px,12vw,76px)),var(--sf-heading-max,9999px))] max-[800px]:leading-[0.95]",f={left:"text-left",center:"text-center",right:"text-right"};function c(n,a,s="font-display"){const e=m[n],l=r(void 0,e.size,e.role,e.step),i=e.sizeMobile?r(void 0,e.sizeMobile,e.role,e.step):void 0,d={"--heading-size":l,...i?{"--heading-size-m":i}:{}},t=e.rank===2?"[font-weight:var(--sf-heading-2-weight,var(--sf-heading-weight,500))]":e.rank===3?"[font-weight:var(--sf-heading-3-weight,var(--sf-heading-weight,500))]":"[font-weight:var(--sf-heading-weight,500)]",h=["text-[length:var(--heading-size)]",e.leading,i?"max-[800px]:text-[length:var(--heading-size-m)]":""].filter(Boolean).join(" ");return{className:`${s} ${t} tracking-[-0.03em] text-fg ${h} ${f[a]}`,style:d}}function z({level:n,text:a,align:s,contained:e,hero:l=!1,pad:i}){if(l)return g("h1",{className:x,children:o(a,!1)});const d=`h${n}`,t=c(n,s);return g(p,{contained:e,className:"py-6",pad:i?{values:i,frame:24}:void 0,children:g(d,{className:t.className,style:t.style,children:o(a,!1)})})}export{z as default,c as headingLook};
@@ -1 +1 @@
1
- "use client";import{Fragment as a,jsx as n}from"react/jsx-runtime";import{usePublishedPartKindRule as i,usePublishedSharedKindRule as l}from"./PublishedPartStylesContext.js";import{PART_STYLED_ATTR as m}from"../lib/puck/part-styles.js";function d({kind:e,shared:s=!1,children:t}){const o=i(e),u=l(e),r=s?u:o;return r?n("span",{[m]:r.stamp,children:t}):n(a,{children:t})}export{d as default};
1
+ "use client";import{Fragment as u,jsx as n}from"react/jsx-runtime";import{usePublishedPartKindRule as a,usePublishedSharedKindRule as i}from"./PublishedPartStylesContext.js";import{PART_STYLED_ATTR as m,TEXT_STYLE_ATTR as T}from"../lib/puck/part-styles.js";function d({kind:e,shared:s=!1,children:r}){const l=a(e),o=i(e),t=s?o:l;return t?n("span",{[m]:t.stamp,...t.textStyle?{[T]:t.textStyle}:{},children:r}):n(u,{children:r})}export{d as default};
@@ -1 +1 @@
1
- "use client";import{Fragment as m,jsx as r}from"react/jsx-runtime";import{ClaimedStamp as s,usePublishedPartRule as n}from"./PublishedPartStylesContext.js";import{PART_STYLED_ATTR as i}from"../lib/puck/part-styles.js";function l({value:a,children:e}){const t=n(a);return t?r(s,{stamp:t.stamp,children:r("span",{[i]:t.stamp,children:e})}):r(m,{children:e})}export{l as default};
1
+ "use client";import{Fragment as m,jsx as e}from"react/jsx-runtime";import{ClaimedStamp as s,usePublishedPartRule as l}from"./PublishedPartStylesContext.js";import{PART_STYLED_ATTR as n,TEXT_STYLE_ATTR as i}from"../lib/puck/part-styles.js";function T({value:a,children:r}){const t=l(a);return t?e(s,{stamp:t.stamp,children:e("span",{[n]:t.stamp,...t.textStyle?{[i]:t.textStyle}:{},children:r})}):e(m,{children:r})}export{T as default};
@@ -1 +1 @@
1
- "use client";import{Fragment as c,jsx as n,jsxs as P}from"react/jsx-runtime";import{createContext as a,useContext as s,useId as f,useMemo as S}from"react";import{partRuleForKind as d,partRuleForText as y,partStyleCss as C,publishedPartStyles as b}from"../lib/puck/part-styles.js";import{styleKeyForPart as v}from"../../format/lib/sections/section-text-kinds.js";const u=a(null),h=a(null),p=a(null);function _({needles:e,styles:t,type:o,children:r}){const i=f(),m=JSON.stringify([i,e,t,o]),l=S(()=>b(e,t,i,x=>v(o,x)),[m]);return l?P(c,{children:[n("style",{"data-sf-part-styles":"",dangerouslySetInnerHTML:{__html:C(l).replace(/</g,"\\3c ")}}),n(u.Provider,{value:l,children:r})]}):n(c,{children:r})}function j(e){const t=s(u),o=s(h),r=y(t,e);return r&&r.stamp!==o?r:null}function I(e){return d(s(u),e)}function M({stamp:e,children:t}){return n(h.Provider,{value:e,children:t})}function T({children:e}){const t=s(u);return n(p.Provider,{value:t,children:e})}function k(e){return d(s(p),e)}export{M as ClaimedStamp,_ as PublishedPartStyles,T as SharedPartKinds,I as usePublishedPartKindRule,j as usePublishedPartRule,k as usePublishedSharedKindRule};
1
+ "use client";import{Fragment as d,jsx as s,jsxs as P}from"react/jsx-runtime";import{createContext as i,useContext as o,useId as f,useMemo as S}from"react";import{blockDrawsTextStyle as y,partRuleForKind as h,partRuleForText as C,partStyleCss as b,publishedPartStyles as v}from"../lib/puck/part-styles.js";import{styleKeyForPart as g}from"../../format/lib/sections/section-text-kinds.js";const l=i(null),m=i(null),p=i(null);function j({needles:e,styles:t,type:n,children:r}){const c=f(),x=JSON.stringify([c,e,t,n]),u=S(()=>v(e,t,c,a=>g(n,a),a=>y(n,a)),[x]);return u?P(d,{children:[s("style",{"data-sf-part-styles":"",dangerouslySetInnerHTML:{__html:b(u).replace(/</g,"\\3c ")}}),s(l.Provider,{value:u,children:r})]}):s(d,{children:r})}function T(e){const t=o(l),n=o(m),r=C(t,e);return r&&r.stamp!==n?r:null}function k(e){return h(o(l),e)}function I({stamp:e,children:t}){return s(m.Provider,{value:e,children:t})}function M({children:e}){const t=o(l);return s(p.Provider,{value:t,children:e})}function w(e){return h(o(p),e)}export{I as ClaimedStamp,j as PublishedPartStyles,M as SharedPartKinds,k as usePublishedPartKindRule,T as usePublishedPartRule,w as usePublishedSharedKindRule};
@@ -7,8 +7,9 @@ interface TextProps {
7
7
  align: Align;
8
8
  tone: Tone;
9
9
  tag?: string;
10
+ textStyle?: string;
10
11
  contained: boolean;
11
12
  hero?: boolean;
12
13
  }
13
- export default function Text({ text, align, tone, contained, hero, pad, tag }: TextProps): import("react").JSX.Element;
14
+ export default function Text({ text, align, tone, contained, hero, pad, tag, textStyle }: TextProps): import("react").JSX.Element;
14
15
  export {};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import f from"./BlockFrame.js";import{renderGold as a,splitParagraphs as g}from"./goldPhrases.js";import{textTagOf as h}from"../../format/lib/content/text-tag.js";const r={bodyUpTo800:"max-[800px]:text-[length:var(--size-body,14px)]",bodySmall:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,17px)]"},y={left:"text-left",center:"text-center mx-auto",right:"text-right ml-auto"},b=`max-w-[380px] ${r.bodySmall} leading-[1.5] opacity-80 ${r.bodyUpTo800}`,u={default:"text-fg",dim:"text-fg-dim"};function T({text:t,align:s,tone:i,contained:m,hero:d=!1,pad:o,tag:p}){if(d)return e("p",{className:b,children:a(t)});const l=`max-w-[680px] whitespace-pre-line ${r.bodyLarge} leading-[1.7] ${y[s]} ${u[i]}`,n=h(p);return e(f,{contained:m,className:"py-4",pad:o?{values:o,frame:16}:void 0,children:n==="p"?g(t).map((c,x)=>e("p",{className:l,children:a(c)},x)):e(n,{className:l,children:a(t.trim())})})}export{T as default};
1
+ import{jsx as t}from"react/jsx-runtime";import p from"./BlockFrame.js";import{renderGold as n,renderHeadline as b,splitParagraphs as u}from"./goldPhrases.js";import{headingLook as N}from"./Heading.js";import{textTagOf as T}from"../../format/lib/content/text-tag.js";import{isTextStyleId as v}from"../lib/puck/part-styles.js";import{faceClassOf as x}from"../../format/lib/text-style-face.js";const s={bodyUpTo800:"max-[800px]:text-[length:var(--size-body,14px)]",bodySmall:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,17px)]",label:"text-[length:var(--size-label,13px)]"},$={left:"text-left",center:"text-center mx-auto",right:"text-right ml-auto"},S=`max-w-[380px] ${s.bodySmall} leading-[1.5] opacity-80 ${s.bodyUpTo800}`,L={default:"text-fg",dim:"text-fg-dim"};function z({text:a,align:d,tone:h,contained:m,hero:g=!1,pad:l,tag:y,textStyle:c}){if(g)return t("p",{className:S,children:n(a)});const e=v(c)?c:void 0,f=`${e?`${x({id:e})} `:""}max-w-[680px] whitespace-pre-line ${e==="body-5"?s.label:s.bodyLarge} leading-[1.7] ${$[d]} ${L[h]}`,o=T(y);if(e?.startsWith("heading-")){const i=String(Math.min(Number(e.slice(8)),6)),r=N(i,d,x({id:e}));return t(p,{contained:m,className:"py-4",pad:l?{values:l,frame:16}:void 0,children:t(o,{className:r.className,style:r.style,children:b(a.trim(),!1)})})}return t(p,{contained:m,className:"py-4",pad:l?{values:l,frame:16}:void 0,children:o==="p"?u(a).map((i,r)=>t("p",{className:f,children:n(i)},r)):t(o,{className:f,children:n(a.trim())})})}export{z as default};
@@ -3,4 +3,5 @@ export declare const CARDS_PH: {
3
3
  eyebrow: string;
4
4
  title: string;
5
5
  };
6
+ export type CardStyle = "cards" | "label-only";
6
7
  export declare const CardsRender: BlockRender;
@@ -1 +1 @@
1
- import{jsx as n}from"react/jsx-runtime";import l from"../../../../../components/Cards.js";import{parseSectionHeadPlacement as s}from"../../../../../../format/lib/sections/section-head-placement.js";import{parseSectionEyebrowLook as c}from"../../../../../../format/lib/sections/section-eyebrow-look.js";import{phRows as m,phHide as r}from"../../scaffold.js";import{say as t}from"../../../../../../format/lib/editor-words.js";const a={eyebrow:"Label",title:"Section *heading.*"},b=()=>[{title:t("Card title one"),body:t("A short line about this card.")},{title:t("Card title two"),body:t("A short line about this card.")},{title:t("Card title three"),body:t("A short line about this card.")}],k={label:"Cards",defaultProps:{eyebrow:"",title:"",items:[],columns:3},render:e=>{const o=s(e.headPlacement)==="own-box",i=d=>o?void 0:d;return n(l,{look:c(e.eyebrowLook,"Cards"),eyebrow:i(r(e.eyebrow,a.eyebrow,e.puck)),title:i(r(e.title,a.title,e.puck)),omitHead:o,items:m(e.items,b(),e.puck),columns:e.columns,editing:e.puck?.isEditing})}};export{a as CARDS_PH,k as CardsRender};
1
+ import{jsx as n}from"react/jsx-runtime";import u from"../../../../../components/Cards.js";import b from"../../../../../components/KeyFeatures.js";import{hidableText as y}from"efficient-easel/draw";import{KEY_FEATURES_PH as d,keyFeaturesScaffoldItems as f}from"../KeyFeatures/render.js";import{parseSectionHeadPlacement as h}from"../../../../../../format/lib/sections/section-head-placement.js";import{parseSectionEyebrowLook as m}from"../../../../../../format/lib/sections/section-eyebrow-look.js";import{phRows as c,phHide as i}from"../../scaffold.js";import{say as t}from"../../../../../../format/lib/editor-words.js";const s={eyebrow:"Label",title:"Section *heading.*"},w=()=>[{title:t("Card title one"),body:t("A short line about this card.")},{title:t("Card title two"),body:t("A short line about this card.")},{title:t("Card title three"),body:t("A short line about this card.")}],F={label:"Cards",defaultProps:{eyebrow:"",title:"",items:[],columns:3},render:e=>{const a=h(e.headPlacement)==="own-box",o=r=>a?void 0:r;if(e.cardStyle==="label-only"){const r=Array.isArray(e.items)?e.items.map(l=>({label:y(l.title)??"",href:typeof l.href=="string"?l.href:void 0})):[];return n(b,{look:m(e.eyebrowLook,"KeyFeatures"),eyebrow:o(i(e.eyebrow,d.eyebrow,e.puck)),title:o(i(e.title,d.title,e.puck)),items:c(r,f(),e.puck),columns:e.columns,editing:e.puck?.isEditing})}return n(u,{look:m(e.eyebrowLook,"Cards"),eyebrow:o(i(e.eyebrow,s.eyebrow,e.puck)),title:o(i(e.title,s.title,e.puck)),omitHead:a,items:c(e.items,w(),e.puck),columns:e.columns,editing:e.puck?.isEditing})}};export{s as CARDS_PH,F as CardsRender};
@@ -1,6 +1,8 @@
1
+ import { type KeyFeatureItem } from "../../../../../components/KeyFeatures.js";
1
2
  import type { BlockRender } from "../../../../../../format/lib/puck/blocks/block-types.js";
2
3
  export declare const KEY_FEATURES_PH: {
3
4
  eyebrow: string;
4
5
  title: string;
5
6
  };
7
+ export declare const keyFeaturesScaffoldItems: () => KeyFeatureItem[];
6
8
  export declare const KeyFeaturesRender: BlockRender;
@@ -1 +1 @@
1
- import{jsx as m}from"react/jsx-runtime";import u from"../../../../../components/KeyFeatures.js";import{parseSectionEyebrowLook as y}from"../../../../../../format/lib/sections/section-eyebrow-look.js";import{phRows as F,phHide as l}from"../../scaffold.js";import{say as e}from"../../../../../../format/lib/editor-words.js";const r={eyebrow:"Highlight",title:"Key *features.*"},f=()=>[{label:e("Feature label one")},{label:e("Feature label two")},{label:e("Feature label three")},{label:e("Feature label four")},{label:e("Feature label five")},{label:e("Feature label six")}],h={label:"Key Features",defaultProps:{eyebrow:"",title:"",items:[],columns:3},render:({eyebrow:o,title:a,items:s,columns:i,eyebrowLook:b,puck:t})=>m(u,{look:y(b,"KeyFeatures"),eyebrow:l(o,r.eyebrow,t),title:l(a,r.title,t),items:F(s,f(),t),columns:i,editing:t?.isEditing})};export{r as KEY_FEATURES_PH,h as KeyFeaturesRender};
1
+ import{jsx as m}from"react/jsx-runtime";import u from"../../../../../components/KeyFeatures.js";import{parseSectionEyebrowLook as y}from"../../../../../../format/lib/sections/section-eyebrow-look.js";import{phRows as F,phHide as r}from"../../scaffold.js";import{say as e}from"../../../../../../format/lib/editor-words.js";const l={eyebrow:"Highlight",title:"Key *features.*"},f=()=>[{label:e("Feature label one")},{label:e("Feature label two")},{label:e("Feature label three")},{label:e("Feature label four")},{label:e("Feature label five")},{label:e("Feature label six")}],K={label:"Key Features",defaultProps:{eyebrow:"",title:"",items:[],columns:3},render:({eyebrow:o,title:a,items:s,columns:i,eyebrowLook:b,puck:t})=>m(u,{look:y(b,"KeyFeatures"),eyebrow:r(o,l.eyebrow,t),title:r(a,l.title,t),items:F(s,f(),t),columns:i,editing:t?.isEditing})};export{l as KEY_FEATURES_PH,K as KeyFeaturesRender,f as keyFeaturesScaffoldItems};
@@ -1 +1 @@
1
- import{Fragment as m,jsx as r}from"react/jsx-runtime";import{padValuesOf as f}from"../../../../../../format/lib/content/section-padding.js";import l from"../../../../../components/Text.js";import{hidableText as p,readHidable as x}from"efficient-easel/draw";import{PH as g}from"../../../../../../format/lib/puck/blocks/placeholders.js";import{phPrev as s}from"../../scaffold.js";const j={label:"Text",defaultProps:{text:"",align:"left",tone:"default",tag:"p",contained:!0},render:t=>{const{text:e,align:a,tone:o,tag:n,contained:i,puck:d}=t;return x(e).hidden?r(m,{}):r(l,{text:s(p(e),g.body,d)??"",align:a,tone:o,tag:n,contained:i,pad:f(t)})}};export{j as TextRender};
1
+ import{Fragment as m,jsx as r}from"react/jsx-runtime";import{padValuesOf as l}from"../../../../../../format/lib/content/section-padding.js";import x from"../../../../../components/Text.js";import{hidableText as f,readHidable as p}from"efficient-easel/draw";import{PH as g}from"../../../../../../format/lib/puck/blocks/placeholders.js";import{phPrev as u}from"../../scaffold.js";import{readPartStyle as c}from"../../../part-styles.js";const j={label:"Text",defaultProps:{text:"",align:"left",tone:"default",tag:"p",contained:!0},render:t=>{const{text:e,align:a,tone:o,tag:n,contained:i,puck:d}=t;return p(e).hidden?r(m,{}):r(x,{text:u(f(e),g.body,d)??"",align:a,tone:o,tag:n,textStyle:c(t,"text").textStyle,contained:i,pad:l(t)})}};export{j as TextRender};
@@ -1,3 +1,4 @@
1
+ import { type TimelineLayout } from "../../../../../components/Timeline.js";
1
2
  import type { BlockRender } from "../../../../../../format/lib/puck/blocks/block-types.js";
2
3
  export declare const TIMELINE_PH: {
3
4
  eyebrow: string;
@@ -7,4 +8,5 @@ export declare const TIMELINE_PH: {
7
8
  imageMeta: string;
8
9
  cta: string;
9
10
  };
11
+ export type StoryTimelineDisplay = TimelineLayout | "track";
10
12
  export declare const TimelineRender: BlockRender;
@@ -1,2 +1,2 @@
1
- import{jsx as o}from"react/jsx-runtime";import m from"../../../../../components/Timeline.js";import{CTA_PH as c,PH as n}from"../../../../../../format/lib/puck/blocks/placeholders.js";import{phRows as d,phHide as i,ctaHide as l}from"../../scaffold.js";import{say as t}from"../../../../../../format/lib/editor-words.js";const a={eyebrow:n.eyebrow,title:`Section heading
2
- *Highlight line*`,intro:n.body,imageCaption:n.imageCaption,imageMeta:n.imageMeta,cta:c.text},r=()=>[{date:t("Year"),title:t("Milestone title."),body:t("Describe what happened, in a sentence or two.")},{date:t("Year"),title:t("Milestone title."),body:t("Describe what happened, in a sentence or two.")},{date:t("Year"),title:t("Milestone title."),body:t("Describe what happened, in a sentence or two.")}],w={label:"Story Timeline",defaultProps:{layout:"split",eyebrow:"",title:"",intro:"",imageSrc:"",imageCaption:"",imageMeta:"",ctaText:"",ctaHref:"",entries:[],padTop:120,padBottom:120},render:e=>o(m,{layout:e.layout||"split",eyebrow:i(e.eyebrow,a.eyebrow,e.puck),title:i(e.title,a.title,e.puck),intro:i(e.intro,a.intro,e.puck),imageSrc:e.imageSrc||void 0,imageCaption:i(e.imageCaption,a.imageCaption,e.puck),imageMeta:i(e.imageMeta,a.imageMeta,e.puck),cta:l(e.ctaText,e.ctaHref,e.puck),entries:d(e.entries,r(),e.puck),padTop:typeof e.padTop=="number"?e.padTop:120,padBottom:typeof e.padBottom=="number"?e.padBottom:120,editing:e.puck?.isEditing})};export{a as TIMELINE_PH,w as TimelineRender};
1
+ import{jsx as m}from"react/jsx-runtime";import d from"../../../../../components/Timeline.js";import l from"../../../../../components/TimelineTrack.js";import{resolveSectionBackground as u}from"../../../../../../format/lib/content/section-background.js";import{SECTION_BG_BUILT_IN as b}from"../../../../../../format/lib/puck/blocks/general/section-bg-built-in.js";import{TIMELINE_TRACK_PH as o,timelineTrackScaffoldEntries as f}from"../TimelineTrack/render.js";import{CTA_PH as g,PH as n}from"../../../../../../format/lib/puck/blocks/placeholders.js";import{phRows as c,phHide as i,ctaHide as r}from"../../scaffold.js";import{say as t}from"../../../../../../format/lib/editor-words.js";const a={eyebrow:n.eyebrow,title:`Section heading
2
+ *Highlight line*`,intro:n.body,imageCaption:n.imageCaption,imageMeta:n.imageMeta,cta:g.text},y=()=>[{date:t("Year"),title:t("Milestone title."),body:t("Describe what happened, in a sentence or two.")},{date:t("Year"),title:t("Milestone title."),body:t("Describe what happened, in a sentence or two.")},{date:t("Year"),title:t("Milestone title."),body:t("Describe what happened, in a sentence or two.")}];function T(e){return{date:e.date,title:e.title,blurb:e.body,future:e.future}}const x={label:"Story Timeline",defaultProps:{layout:"split",eyebrow:"",title:"",intro:"",imageSrc:"",imageCaption:"",imageMeta:"",ctaText:"",ctaHref:"",entries:[],padTop:120,padBottom:120},render:e=>e.layout==="track"?m(l,{eyebrow:i(e.eyebrow,o.eyebrow,e.puck),title:i(e.title,o.title,e.puck),intro:i(e.intro,o.intro,e.puck),entries:c(Array.isArray(e.entries)?e.entries.map(T):[],f(),e.puck),cta:r(e.ctaText,e.ctaHref,e.puck),background:u(e.background,b.TimelineTrack),padTop:typeof e.padTop=="number"?e.padTop:120,padBottom:typeof e.padBottom=="number"?e.padBottom:120,editing:e.puck?.isEditing}):m(d,{layout:e.layout||"split",eyebrow:i(e.eyebrow,a.eyebrow,e.puck),title:i(e.title,a.title,e.puck),intro:i(e.intro,a.intro,e.puck),imageSrc:e.imageSrc||void 0,imageCaption:i(e.imageCaption,a.imageCaption,e.puck),imageMeta:i(e.imageMeta,a.imageMeta,e.puck),cta:r(e.ctaText,e.ctaHref,e.puck),entries:c(e.entries,y(),e.puck),padTop:typeof e.padTop=="number"?e.padTop:120,padBottom:typeof e.padBottom=="number"?e.padBottom:120,editing:e.puck?.isEditing})};export{a as TIMELINE_PH,x as TimelineRender};
@@ -1,3 +1,4 @@
1
+ import { type TimelineTrackEntry } from "../../../../../components/TimelineTrack.js";
1
2
  import type { BlockRender } from "../../../../../../format/lib/puck/blocks/block-types.js";
2
3
  export declare const TIMELINE_TRACK_PH: {
3
4
  eyebrow: string;
@@ -5,4 +6,5 @@ export declare const TIMELINE_TRACK_PH: {
5
6
  intro: string;
6
7
  cta: string;
7
8
  };
9
+ export declare const timelineTrackScaffoldEntries: () => TimelineTrackEntry[];
8
10
  export declare const TimelineTrackRender: BlockRender;
@@ -1 +1 @@
1
- import{jsx as m}from"react/jsx-runtime";import c from"../../../../../components/TimelineTrack.js";import{SECTION_BG_INHERIT as d,resolveSectionBackground as u}from"../../../../../../format/lib/content/section-background.js";import{parseSectionHeadPlacement as b}from"../../../../../../format/lib/sections/section-head-placement.js";import{CTA_PH as f,PH as n}from"../../../../../../format/lib/puck/blocks/placeholders.js";import{phRows as T,phHide as r,ctaHide as s}from"../../scaffold.js";import{SECTION_BG_BUILT_IN as k}from"../../../../../../format/lib/puck/blocks/general/section-bg-built-in.js";import{say as t}from"../../../../../../format/lib/editor-words.js";const a={eyebrow:n.eyebrow,title:n.headingAccent,intro:n.body,cta:f.text},h=()=>[{date:t("Year"),title:t("Milestone"),blurb:t("A short line about this milestone."),future:!1},{date:t("Year"),title:t("Milestone"),blurb:t("A short line about this milestone."),future:!1},{date:t("Year"),title:t("Milestone"),blurb:t("A short line about this milestone."),future:!1},{date:t("Year →"),title:t("Upcoming"),blurb:t("A milestone still to come."),future:!0}],A={label:"Milestone Timeline",defaultProps:{eyebrow:"",title:"",intro:"",entries:[],ctaText:"",ctaHref:"",background:d,padTop:120,padBottom:120},render:e=>{const i=b(e.headPlacement)==="own-box",o=l=>i?void 0:l;return m(c,{eyebrow:o(r(e.eyebrow,a.eyebrow,e.puck)),title:o(r(e.title,a.title,e.puck)),intro:o(r(e.intro,a.intro,e.puck)),omitHead:i,entries:T(e.entries,h(),e.puck),cta:s(e.ctaText,e.ctaHref,e.puck),background:u(e.background,k.TimelineTrack),padTop:i?0:typeof e.padTop=="number"?e.padTop:120,padBottom:typeof e.padBottom=="number"?e.padBottom:120,editing:e.puck?.isEditing})}};export{a as TIMELINE_TRACK_PH,A as TimelineTrackRender};
1
+ import{jsx as m}from"react/jsx-runtime";import c from"../../../../../components/TimelineTrack.js";import{SECTION_BG_INHERIT as d,resolveSectionBackground as u}from"../../../../../../format/lib/content/section-background.js";import{parseSectionHeadPlacement as b}from"../../../../../../format/lib/sections/section-head-placement.js";import{CTA_PH as f,PH as r}from"../../../../../../format/lib/puck/blocks/placeholders.js";import{phRows as T,phHide as n,ctaHide as s}from"../../scaffold.js";import{SECTION_BG_BUILT_IN as k}from"../../../../../../format/lib/puck/blocks/general/section-bg-built-in.js";import{say as t}from"../../../../../../format/lib/editor-words.js";const a={eyebrow:r.eyebrow,title:r.headingAccent,intro:r.body,cta:f.text},h=()=>[{date:t("Year"),title:t("Milestone"),blurb:t("A short line about this milestone."),future:!1},{date:t("Year"),title:t("Milestone"),blurb:t("A short line about this milestone."),future:!1},{date:t("Year"),title:t("Milestone"),blurb:t("A short line about this milestone."),future:!1},{date:t("Year →"),title:t("Upcoming"),blurb:t("A milestone still to come."),future:!0}],A={label:"Milestone Timeline",defaultProps:{eyebrow:"",title:"",intro:"",entries:[],ctaText:"",ctaHref:"",background:d,padTop:120,padBottom:120},render:e=>{const o=b(e.headPlacement)==="own-box",i=l=>o?void 0:l;return m(c,{eyebrow:i(n(e.eyebrow,a.eyebrow,e.puck)),title:i(n(e.title,a.title,e.puck)),intro:i(n(e.intro,a.intro,e.puck)),omitHead:o,entries:T(e.entries,h(),e.puck),cta:s(e.ctaText,e.ctaHref,e.puck),background:u(e.background,k.TimelineTrack),padTop:o?0:typeof e.padTop=="number"?e.padTop:120,padBottom:typeof e.padBottom=="number"?e.padBottom:120,editing:e.puck?.isEditing})}};export{a as TIMELINE_TRACK_PH,A as TimelineTrackRender,h as timelineTrackScaffoldEntries};
@@ -4,6 +4,10 @@ import type { PartEl } from "../../../editor/lib/puck/part-anchors.js";
4
4
  import { type PartNeedle } from "./text-parts.js";
5
5
  export declare const PART_STYLES_PROP = "_partStyles";
6
6
  export declare const PART_STYLED_ATTR = "data-sf-part-styled";
7
+ export declare const TEXT_STYLE_ATTR = "data-sf-text-style";
8
+ export declare function isTextStyleId(value: unknown): value is string;
9
+ export declare const STYLE_ID_OF_ROLE: Readonly<Partial<Record<FontRole, string>>>;
10
+ export declare function followedStyleOf(style: PartStyle): string | undefined;
7
11
  export declare const PART_WEIGHTS: readonly [400, 500, 600, 700];
8
12
  export type PartWeight = (typeof PART_WEIGHTS)[number];
9
13
  export declare const PART_ALIGNS: readonly ["left", "center", "right", "justify"];
@@ -54,6 +58,7 @@ export declare const PART_PARAGRAPH_MAX = 400;
54
58
  export type PartStyle = {
55
59
  font?: string;
56
60
  role?: FontRole;
61
+ textStyle?: string;
57
62
  weight?: PartWeight;
58
63
  size?: number;
59
64
  line?: number;
@@ -96,6 +101,10 @@ export declare function propsWithPartStyleValue<K extends keyof PartStyle>(props
96
101
  export declare function propsWithoutPartStyle(props: Record<string, unknown>, partKey: string): Record<string, unknown>;
97
102
  export declare function partCaseOfTransform(transform: string | null | undefined): TextStyleCase;
98
103
  export declare function partCaseTransform(value: TextStyleCase | undefined): string;
104
+ export type PartDeclarationOptions = {
105
+ blockDrawsStyle?: boolean;
106
+ };
107
+ export declare function blockDrawsTextStyle(type: string | undefined, partKey: string): boolean;
99
108
  export declare function partSpacingOf(style: PartStyle): {
100
109
  lineHeight?: number;
101
110
  letterSpacingEm?: number;
@@ -104,7 +113,7 @@ export declare const PART_PARAGRAPH_VAR = "--sf-part-para";
104
113
  export declare const PART_PHONE_MAX_CSS = "(max-width: 719.98px)";
105
114
  export declare function partPhoneDeclarations(style: PartStyle): Record<string, string>;
106
115
  export declare function partStyleForScreen(style: PartStyle, phone: boolean): PartStyle;
107
- export declare function partStyleDeclarations(style: PartStyle, base: PartStyleBase): Record<string, string>;
116
+ export declare function partStyleDeclarations(style: PartStyle, base: PartStyleBase, options?: PartDeclarationOptions): Record<string, string>;
108
117
  export declare function isHexColour(value: string): boolean;
109
118
  export type MeasuredPartStyle = {
110
119
  fontSize: string;
@@ -121,12 +130,13 @@ export declare function partFontKeyOf(family: string, resolve: (cssVar: string)
121
130
  export declare function partStyleSource<E extends {
122
131
  getAttribute(name: string): string | null;
123
132
  }>(nodeId: string, selectedPartId: string | null, selectedElements: readonly E[], declaresStyle: (className: string | null) => boolean): E | null;
124
- export declare function applyPartStyles(stamps: readonly StyledPartStamp[], styles: PartStyles, baseOf?: (element: StyledPartEl) => PartStyleBase, styleKeyOf?: (partKey: string) => string, isInline?: (element: StyledPartEl) => boolean, phone?: boolean): number;
133
+ export declare function applyPartStyles(stamps: readonly StyledPartStamp[], styles: PartStyles, baseOf?: (element: StyledPartEl) => PartStyleBase, styleKeyOf?: (partKey: string) => string, isInline?: (element: StyledPartEl) => boolean, phone?: boolean, drawsStyle?: (partKey: string) => boolean): number;
125
134
  export declare const PART_PARAGRAPH_ATTR = "data-sf-part-para";
126
135
  export declare const PART_STYLE_PROPERTIES: readonly string[];
127
136
  export declare const SHARED_PART_PROPERTIES: readonly string[];
128
137
  export type PublishedPartRule = {
129
138
  stamp: string;
139
+ textStyle?: string;
130
140
  declarations: Record<string, string>;
131
141
  phone?: Record<string, string>;
132
142
  };
@@ -135,7 +145,7 @@ export type PublishedPartSheet = {
135
145
  kindRules: ReadonlyMap<string, PublishedPartRule>;
136
146
  drawn: ReadonlySet<string>;
137
147
  };
138
- export declare function publishedPartStyles(needles: readonly PartNeedle[], styles: PartStyles, scope: string, styleKeyOf?: (partKey: string) => string): PublishedPartSheet | null;
148
+ export declare function publishedPartStyles(needles: readonly PartNeedle[], styles: PartStyles, scope: string, styleKeyOf?: (partKey: string) => string, drawsStyle?: (partKey: string) => boolean): PublishedPartSheet | null;
139
149
  export declare function isPartKindKey(key: string): boolean;
140
150
  export declare function partRuleForKind(sheet: PublishedPartSheet | null, kind: string): PublishedPartRule | null;
141
151
  export declare function partStyleCss(sheet: PublishedPartSheet): string;
@@ -1,2 +1,2 @@
1
- import{textStyleCaseCss as B,textStyleCaseOfCss as V}from"efficient-easel/draw";import{FONT_OPTIONS as Y,FONT_ROLES as I,fontOption as Z,SIZE_STEP_OF_ROLE as v}from"../../../format/lib/fonts.js";import{encodePartKey as q}from"../../../format/lib/puck/part-key.js";import{decodePartId as $,normalizePartText as b}from"./text-parts.js";import{COLOUR_TOKEN as M}from"../../../format/lib/word-styles.js";const E="_partStyles",J="data-sf-part-styled",Q=[400,500,600,700],H=["left","center","right","justify"],F=5,z=1e3,tt=-5,et=10,nt=0,rt=64,ot=2,it=120,T=1280,st=10,L={size:{min:F,max:z,step:1},sizePhone:{min:F,max:z,step:1},padding:{min:nt,max:rt,step:ot},width:{min:it,max:T,step:st}},at=.05,ct=.01,lt=["line","letter"],ft=.5,ut=2.5,pt=-1,dt=1,xt=0,ht=400;function g(t){return!t||typeof t!="object"||Array.isArray(t)?null:t}function j(t){return g(t?.[E])??{}}function k(t,e){const n=j(t);return Object.hasOwn(n,e)?g(n[e])??{}:{}}function vt(t,e){return Object.values(k(t,e)).filter(n=>n!==void 0).length}function C(t,e,n){const r={...j(t)};if(mt(n).length?r[e]=n:delete r[e],!Object.keys(r).length){const{[E]:o,...s}=t;return s}return{...t,[E]:r}}function mt(t){return Object.entries(t).filter(([,e])=>e!==void 0)}function Pt(t){return lt.includes(t)}const _=(t,e,n)=>Math.min(n,Math.max(e,t));function gt(t,e){if(Pt(t)){const n=Math.round(Number(e));return!Number.isFinite(n)||n===0?null:_(n,tt,et)}if(t==="lineHeight"){const n=Number(e);return Number.isFinite(n)?m(_(n,ft,ut),3):null}if(t==="letterSpacing"){const n=Number(e);return Number.isFinite(n)?m(_(n,pt,dt),4):null}if(t==="paragraphSpacing"){const n=Math.round(Number(e));return!Number.isFinite(n)||n<=0?null:_(n,xt,ht)}if(Object.hasOwn(L,t)){const{min:n,max:r}=L[t],o=Math.round(Number(e));return Number.isFinite(o)?_(o,n,r):null}return t==="italic"?typeof e=="boolean"?e:null:t==="role"?I.includes(String(e))?e:null:e}const _t=["weight","size","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding","width"];function W(t){let e=null;const n=r=>{e??={...t},delete e[r]};for(const r of _t){const o=t[r];o!==void 0&&!(typeof o=="number"&&Number.isFinite(o))&&n(r)}return t.align!==void 0&&!H.includes(t.align)&&n("align"),e??t}const St=[["font","role"],["line","lineHeight"],["letter","letterSpacing"]];function At(t){const e=[];for(const[n,r]of St)n===t?e.push(r):r===t&&e.push(n);return e}function qt(t,e,n,r){const o={...k(t,e)},s=r==null?null:gt(n,r);if(s===null)delete o[n];else{o[n]=s;for(const i of At(n))delete o[i]}return C(t,e,o)}function Jt(t,e){return C(t,e,{})}function Tt(t){return V(t)??"none"}function Rt(t){return B(t)??""}const bt={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function Et(t){const e=t.role;return e&&I.includes(e)?e:null}const Nt={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function Ot(t){const e=v[t],n=Nt[e];return n?`var(--size-${e}, ${n})`:`var(--size-${e})`}function wt(t){const e={};return typeof t.lineHeight=="number"?e.lineHeight=t.lineHeight:t.line&&(e.lineHeight=m(yt+t.line*at,3)),typeof t.letterSpacing=="number"?e.letterSpacingEm=t.letterSpacing:t.letter&&(e.letterSpacingEm=m(t.letter*ct,4)),e}const yt=1,S="--sf-part-para",It="(max-width: 719.98px)";function D(t){return t=W(t),typeof t.sizePhone=="number"&&t.sizePhone>0?{fontSize:`${t.sizePhone}px`}:{}}function $t(t,e){return e&&typeof t.sizePhone=="number"&&t.sizePhone>0?{...t,size:t.sizePhone}:t}function R(t,e){t=W(t);const n=Et(t),r=wt(t),o=t.size?`${t.size}px`:n?Ot(n):"";return{fontFamily:t.font?zt(t.font):n?`var(${bt[n]})`:"",fontWeight:t.weight?String(t.weight):"",fontSize:o,minWidth:o?"0":"",overflowWrap:o?"break-word":"",lineHeight:r.lineHeight!==void 0?String(r.lineHeight):"",letterSpacing:r.letterSpacingEm!==void 0?`${r.letterSpacingEm}em`:"",[S]:t.paragraphSpacing?`${t.paragraphSpacing}px`:"",textTransform:Rt(t.case),textAlign:t.align??"",paddingTop:N(t.padding),paddingBottom:N(t.padding),maxWidth:N(t.width),color:Mt(t.color),fontStyle:t.italic===!0?"italic":t.italic===!1?"normal":""}}const Mt=t=>t===void 0||t===""?"":Object.hasOwn(M,t)?M[t]:K.test(t)?t:"",K=/^#[0-9a-fA-F]{6}$/;function Qt(t){return K.test(t)}const N=t=>t===void 0?"":`${t}px`,m=(t,e)=>Number(t.toFixed(e));function te(t,e){const n=Number.parseFloat(t.fontSize)||16,r=Number.parseFloat(t.lineHeight),o=Number.parseFloat(t.letterSpacing),s=Number.parseFloat(t.paddingTop),i=Number.parseFloat(t.maxWidth);return{fontKey:e,sizePx:n,weight:Ht(Number.parseInt(t.fontWeight,10)),lineRatio:Number.isFinite(r)?m(r/n,3):1.2,letterEm:Number.isFinite(o)?m(o/n,4):0,align:Ft(t.textAlign),case:Tt(t.textTransform),paddingPx:Number.isFinite(s)?Math.round(s):0,widthPx:Number.isFinite(i)&&i<T?Math.round(i):T}}function Ht(t){return Number.isFinite(t)?Q.reduce((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e):400}function Ft(t){for(const e of H)if(e===t)return e;return t==="end"?"right":"left"}function ee(t,e){const n=G(t);if(!n)return"";for(const r of Y)if(G(e(r.cssVar))===n)return r.key;return""}const G=t=>(t.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function zt(t){const e=Z(t);return e?`var(${e.cssVar})`:""}function ne(t,e,n,r){return!e||$(e)?.nodeId!==t?null:n.find(s=>r(s.getAttribute("class")))??n[0]??null}function re(t,e,n=()=>A,r=i=>i,o=kt,s=!1){let i=0;for(const{element:a,partId:f}of t){const c=$(f)?.propKey;if(!c)continue;const l=r(c),x=Object.hasOwn(e,l)?g(e[l])??{}:{},p=R($t(x,s),A),u=w.some(h=>a.style[h]);let d=!1;for(const[h,P]of Object.entries(p))Ct(a,h,P),P&&(d=!0);if(u||w.some(h=>p[h]))for(const h of Lt(a,o))for(const P of w)h.style[P]=p[P]??"";d&&(i+=1)}return i}function Lt(t,e){const n=b(t.textContent??""),r=[];let o=t;for(let s=0;s<jt&&e(o);s+=1){const i=o.parentElement;if(!i||b(i.textContent??"")!==n)break;r.push(i),o=i}return r}const jt=8;function kt(t){const e=t;return typeof window>"u"||!e?.ownerDocument?!1:window.getComputedStyle(e).display==="inline"}const A={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:T};function Ct(t,e,n){if(!e.startsWith("--")){t.style[e]=n;return}const r=t.style;typeof r.setProperty=="function"?n?r.setProperty(e,n):r.removeProperty?.(e):r[e]=n;const o=t;e===S&&(n?o.setAttribute?.(X,""):o.removeAttribute?.(X))}const X="data-sf-part-para",Wt=Object.keys(R({},A)),O=new Set(["color","overflowWrap",S,"fontStyle"]),w=Wt.filter(t=>!O.has(t));function oe(t,e,n,r=o=>o){const o=new Map;for(const a of t){const f=q(a.key,a.row);for(const c of a.texts){const l=o.get(c);l?(l.keys.add(a.key),l.partKeys.add(f)):o.set(c,{keys:new Set([a.key]),partKeys:new Set([f])})}}const s=new Map;for(const a of Object.keys(e)){if(!Dt(a))continue;const f=g(e[a])??{},c=R(f,A),l=D(f);!Object.values(c).some(Boolean)&&!Object.keys(l).length||s.set(a,{stamp:U(n,a),declarations:c,...Object.keys(l).length?{phone:l}:{}})}const i=new Map;for(const[a,{keys:f,partKeys:c}]of o){const l=c.size===1?[...c][0]:f.size===1?[...f][0]:null;if(!l)continue;const x=r(l);if(!Object.hasOwn(e,x))continue;const p=g(e[x])??{},u=R(p,A),d=D(p);!Object.values(u).some(Boolean)&&!Object.keys(d).length||i.set(a,{stamp:U(n,l),declarations:u,...Object.keys(d).length?{phone:d}:{}})}return i.size||s.size?{rules:i,kindRules:s,drawn:new Set(o.keys())}:null}function Dt(t){return t.startsWith("@")}function ie(t,e){return t?.kindRules.get(e)??null}function U(t,e){const n=r=>r.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(t)}~${n(e)}`}function se(t){const e=[],n=new Set,r=o=>{const{stamp:s,declarations:i}=o;if(n.has(s))return;n.add(s);const a=Object.entries(i).filter(([,u])=>u!==""),f=u=>u.map(([d,y])=>`${Gt(d)}: ${y}`).join("; "),c=`[${J}="${s}"]`,l=a.filter(([u])=>!O.has(u)),x=a.filter(([u])=>O.has(u));l.length&&e.push(`${c}, *:has(> ${c}) { ${f(l)} }`),x.length&&e.push(`${c} { ${f(x)} }`),i[S]&&e.push(...Kt(c));const p=Object.entries(o.phone??{}).filter(([,u])=>u!=="");p.length&&e.push(`@media ${It} { ${c}, *:has(> ${c}) { ${f(p)} } }`)};for(const o of t.rules.values())r(o);for(const o of t.kindRules.values())r(o);return e.join(`
2
- `)}function Kt(t){const e=`var(${S})`,n=":is([data-sf-bullet], [data-sf-number])";return[`${t} br:not(br + br) { display: block; content: ""; margin-top: ${e} }`,`${t} ${n}:not(:first-child) { margin-top: ${e} }`,`${t} ${n}:not(:last-child) { margin-bottom: ${e} }`]}const Gt=t=>t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`);function ae(t,e){if(!t)return null;const n=b(e),r=t.rules.get(n);if(r)return r;if(n.length<Xt||t.drawn.has(n))return null;let o=null;for(const[s,i]of t.rules)if(s.includes(n)){if(o&&o.stamp!==i.stamp)return null;o=i}return o}const Xt=8;export{H as PART_ALIGNS,dt as PART_LETTER_EM_MAX,pt as PART_LETTER_EM_MIN,ct as PART_LETTER_STEP,ut as PART_LINE_HEIGHT_MAX,ft as PART_LINE_HEIGHT_MIN,at as PART_LINE_STEP,L as PART_MEASURED_TRACKS,et as PART_NUDGE_MAX,tt as PART_NUDGE_MIN,rt as PART_PADDING_MAX,nt as PART_PADDING_MIN,ot as PART_PADDING_STEP,X as PART_PARAGRAPH_ATTR,ht as PART_PARAGRAPH_MAX,xt as PART_PARAGRAPH_MIN,S as PART_PARAGRAPH_VAR,It as PART_PHONE_MAX_CSS,lt as PART_RELATIVE_PROPS,z as PART_SIZE_MAX,F as PART_SIZE_MIN,J as PART_STYLED_ATTR,E as PART_STYLES_PROP,Wt as PART_STYLE_PROPERTIES,Q as PART_WEIGHTS,T as PART_WIDTH_MAX,it as PART_WIDTH_MIN,st as PART_WIDTH_STEP,w as SHARED_PART_PROPERTIES,re as applyPartStyles,Qt as isHexColour,Dt as isPartKindKey,Kt as paragraphRules,Tt as partCaseOfTransform,Rt as partCaseTransform,ee as partFontKeyOf,D as partPhoneDeclarations,ie as partRuleForKind,ae as partRuleForText,wt as partSpacingOf,te as partStyleBase,vt as partStyleCount,se as partStyleCss,R as partStyleDeclarations,$t as partStyleForScreen,ne as partStyleSource,qt as propsWithPartStyleValue,Jt as propsWithoutPartStyle,oe as publishedPartStyles,k as readPartStyle,j as readPartStyles};
1
+ import{textStyleCaseCss as q,textStyleCaseOfCss as J}from"efficient-easel/draw";import{FONT_OPTIONS as Q,FONT_ROLES as O,fontOption as v,SIZE_STEP_OF_ROLE as tt}from"../../../format/lib/fonts.js";import{encodePartKey as et}from"../../../format/lib/puck/part-key.js";import{decodePartId as H,normalizePartText as N}from"./text-parts.js";import{COLOUR_TOKEN as F}from"../../../format/lib/word-styles.js";const w="_partStyles",nt="data-sf-part-styled",L="data-sf-text-style",rt=/^(heading|body)-[1-7]$/;function g(t){return typeof t=="string"&&rt.test(t)}const z={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function ot(t){if(!t)return null;for(const[e,n]of Object.entries(z))if(n===t)return e;return null}function ne(t){if(g(t.textStyle))return t.textStyle;const e=t.role&&O.includes(t.role)?t.role:null;return e?z[e]:void 0}const it=[400,500,600,700],k=["left","center","right","justify"],j=5,D=1e3,st=-5,at=10,ct=0,lt=64,ft=2,ut=120,E=1280,pt=10,C={size:{min:j,max:D,step:1},sizePhone:{min:j,max:D,step:1},padding:{min:ct,max:lt,step:ft},width:{min:ut,max:E,step:pt}},dt=.05,xt=.01,ht=["line","letter"],St=.5,gt=2.5,mt=-1,Pt=1,Tt=0,_t=400;function T(t){return!t||typeof t!="object"||Array.isArray(t)?null:t}function W(t){return T(t?.[w])??{}}function K(t,e){const n=W(t);return Object.hasOwn(n,e)?T(n[e])??{}:{}}function re(t,e){return Object.values(K(t,e)).filter(n=>n!==void 0).length}function G(t,e,n){const r={...W(t)};if(At(n).length?r[e]=n:delete r[e],!Object.keys(r).length){const{[w]:o,...i}=t;return i}return{...t,[w]:r}}function At(t){return Object.entries(t).filter(([,e])=>e!==void 0)}function bt(t){return ht.includes(t)}const _=(t,e,n)=>Math.min(n,Math.max(e,t));function Rt(t,e){if(bt(t)){const n=Math.round(Number(e));return!Number.isFinite(n)||n===0?null:_(n,st,at)}if(t==="lineHeight"){const n=Number(e);return Number.isFinite(n)?m(_(n,St,gt),3):null}if(t==="letterSpacing"){const n=Number(e);return Number.isFinite(n)?m(_(n,mt,Pt),4):null}if(t==="paragraphSpacing"){const n=Math.round(Number(e));return!Number.isFinite(n)||n<=0?null:_(n,Tt,_t)}if(Object.hasOwn(C,t)){const{min:n,max:r}=C[t],o=Math.round(Number(e));return Number.isFinite(o)?_(o,n,r):null}return t==="italic"?typeof e=="boolean"?e:null:t==="role"?O.includes(String(e))?e:null:t==="textStyle"?g(e)?e:null:e}const Et=["weight","size","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding","width"];function X(t){let e=null;const n=r=>{e??={...t},delete e[r]};for(const r of Et){const o=t[r];o!==void 0&&!(typeof o=="number"&&Number.isFinite(o))&&n(r)}return t.align!==void 0&&!k.includes(t.align)&&n("align"),t.textStyle!==void 0&&!g(t.textStyle)&&n("textStyle"),e??t}const yt=[["font","role"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function Ot(t){const e=[];for(const[n,r]of yt)n===t?e.push(r):r===t&&e.push(n);return e}function oe(t,e,n,r){const o={...K(t,e)},i=r==null?null:Rt(n,r);if(i===null)delete o[n];else{o[n]=i;for(const s of Ot(n))delete o[s]}return G(t,e,o)}function ie(t,e){return G(t,e,{})}function Nt(t){return J(t)??"none"}function wt(t){return q(t)??""}const It={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function $t(t,e){const n=t.role;return n&&O.includes(n)?n:e?.blockDrawsStyle?null:ot(t.textStyle)}function se(t,e){return t==="Text"&&e==="text"}const Mt={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function Ht(t){const e=tt[t],n=Mt[e];return n?`var(--size-${e}, ${n})`:`var(--size-${e})`}function Ft(t){const e={};return typeof t.lineHeight=="number"?e.lineHeight=t.lineHeight:t.line&&(e.lineHeight=m(Lt+t.line*dt,3)),typeof t.letterSpacing=="number"?e.letterSpacingEm=t.letterSpacing:t.letter&&(e.letterSpacingEm=m(t.letter*xt,4)),e}const Lt=1,A="--sf-part-para",zt="(max-width: 719.98px)";function U(t){return t=X(t),typeof t.sizePhone=="number"&&t.sizePhone>0?{fontSize:`${t.sizePhone}px`}:{}}function kt(t,e){return e&&typeof t.sizePhone=="number"&&t.sizePhone>0?{...t,size:t.sizePhone}:t}function y(t,e,n){t=X(t);const r=$t(t,n),o=Ft(t),i=t.size?`${t.size}px`:r?Ht(r):"";return{fontFamily:t.font?Wt(t.font):r?`var(${It[r]})`:"",fontWeight:t.weight?String(t.weight):"",fontSize:i,minWidth:i?"0":"",overflowWrap:i?"break-word":"",lineHeight:o.lineHeight!==void 0?String(o.lineHeight):"",letterSpacing:o.letterSpacingEm!==void 0?`${o.letterSpacingEm}em`:"",[A]:t.paragraphSpacing?`${t.paragraphSpacing}px`:"",textTransform:wt(t.case),textAlign:t.align??"",paddingTop:I(t.padding),paddingBottom:I(t.padding),maxWidth:I(t.width),color:jt(t.color),fontStyle:t.italic===!0?"italic":t.italic===!1?"normal":""}}const jt=t=>t===void 0||t===""?"":Object.hasOwn(F,t)?F[t]:B.test(t)?t:"",B=/^#[0-9a-fA-F]{6}$/;function ae(t){return B.test(t)}const I=t=>t===void 0?"":`${t}px`,m=(t,e)=>Number(t.toFixed(e));function ce(t,e){const n=Number.parseFloat(t.fontSize)||16,r=Number.parseFloat(t.lineHeight),o=Number.parseFloat(t.letterSpacing),i=Number.parseFloat(t.paddingTop),s=Number.parseFloat(t.maxWidth);return{fontKey:e,sizePx:n,weight:Dt(Number.parseInt(t.fontWeight,10)),lineRatio:Number.isFinite(r)?m(r/n,3):1.2,letterEm:Number.isFinite(o)?m(o/n,4):0,align:Ct(t.textAlign),case:Nt(t.textTransform),paddingPx:Number.isFinite(i)?Math.round(i):0,widthPx:Number.isFinite(s)&&s<E?Math.round(s):E}}function Dt(t){return Number.isFinite(t)?it.reduce((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e):400}function Ct(t){for(const e of k)if(e===t)return e;return t==="end"?"right":"left"}function le(t,e){const n=V(t);if(!n)return"";for(const r of Q)if(V(e(r.cssVar))===n)return r.key;return""}const V=t=>(t.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function Wt(t){const e=v(t);return e?`var(${e.cssVar})`:""}function fe(t,e,n,r){return!e||H(e)?.nodeId!==t?null:n.find(i=>r(i.getAttribute("class")))??n[0]??null}function ue(t,e,n=()=>b,r=d=>d,o=Xt,i=!1,s=()=>!1){let d=0;for(const{element:a,partId:c}of t){const u=H(c)?.propKey;if(!u)continue;const l=r(u),p=Object.hasOwn(e,l)?T(e[l])??{}:{},f=y(kt(p,i),b,{blockDrawsStyle:s(u)});g(p.textStyle)?a.setAttribute?.(L,p.textStyle):a.removeAttribute?.(L);const S=M.some(h=>a.style[h]);let x=!1;for(const[h,P]of Object.entries(f))Ut(a,h,P),P&&(x=!0);if(S||M.some(h=>f[h]))for(const h of Kt(a,o))for(const P of M)h.style[P]=f[P]??"";x&&(d+=1)}return d}function Kt(t,e){const n=N(t.textContent??""),r=[];let o=t;for(let i=0;i<Gt&&e(o);i+=1){const s=o.parentElement;if(!s||N(s.textContent??"")!==n)break;r.push(s),o=s}return r}const Gt=8;function Xt(t){const e=t;return typeof window>"u"||!e?.ownerDocument?!1:window.getComputedStyle(e).display==="inline"}const b={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:E};function Ut(t,e,n){if(!e.startsWith("--")){t.style[e]=n;return}const r=t.style;typeof r.setProperty=="function"?n?r.setProperty(e,n):r.removeProperty?.(e):r[e]=n;const o=t;e===A&&(n?o.setAttribute?.(Y,""):o.removeAttribute?.(Y))}const Y="data-sf-part-para",Bt=Object.keys(y({},b)),$=new Set(["color","overflowWrap",A,"fontStyle"]),M=Bt.filter(t=>!$.has(t));function pe(t,e,n,r=i=>i,o=()=>!1){const i=new Map;for(const a of t){const c=et(a.key,a.row);for(const u of a.texts){const l=i.get(u);l?(l.keys.add(a.key),l.partKeys.add(c)):i.set(u,{keys:new Set([a.key]),partKeys:new Set([c])})}}const s=new Map;for(const a of Object.keys(e)){if(!Vt(a))continue;const c=T(e[a])??{},u=y(c,b),l=U(c),p=g(c.textStyle)?c.textStyle:void 0;!Object.values(u).some(Boolean)&&!Object.keys(l).length&&!p||s.set(a,{stamp:Z(n,a),declarations:u,...Object.keys(l).length?{phone:l}:{},...p?{textStyle:p}:{}})}const d=new Map;for(const[a,{keys:c,partKeys:u}]of i){const l=u.size===1?[...u][0]:c.size===1?[...c][0]:null;if(!l)continue;const p=r(l);if(!Object.hasOwn(e,p))continue;const f=T(e[p])??{},S=y(f,b,{blockDrawsStyle:o(l)}),x=U(f),R=g(f.textStyle)?f.textStyle:void 0;!Object.values(S).some(Boolean)&&!Object.keys(x).length&&!R||d.set(a,{stamp:Z(n,l),declarations:S,...Object.keys(x).length?{phone:x}:{},...R?{textStyle:R}:{}})}return d.size||s.size?{rules:d,kindRules:s,drawn:new Set(i.keys())}:null}function Vt(t){return t.startsWith("@")}function de(t,e){return t?.kindRules.get(e)??null}function Z(t,e){const n=r=>r.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(t)}~${n(e)}`}function xe(t){const e=[],n=new Set,r=o=>{const{stamp:i,declarations:s}=o;if(n.has(i))return;n.add(i);const d=Object.entries(s).filter(([,f])=>f!==""),a=f=>f.map(([S,x])=>`${Zt(S)}: ${x}`).join("; "),c=`[${nt}="${i}"]`,u=d.filter(([f])=>!$.has(f)),l=d.filter(([f])=>$.has(f));u.length&&e.push(`${c}, *:has(> ${c}) { ${a(u)} }`),l.length&&e.push(`${c} { ${a(l)} }`),s[A]&&e.push(...Yt(c));const p=Object.entries(o.phone??{}).filter(([,f])=>f!=="");p.length&&e.push(`@media ${zt} { ${c}, *:has(> ${c}) { ${a(p)} } }`)};for(const o of t.rules.values())r(o);for(const o of t.kindRules.values())r(o);return e.join(`
2
+ `)}function Yt(t){const e=`var(${A})`,n=":is([data-sf-bullet], [data-sf-number])";return[`${t} br:not(br + br) { display: block; content: ""; margin-top: ${e} }`,`${t} ${n}:not(:first-child) { margin-top: ${e} }`,`${t} ${n}:not(:last-child) { margin-bottom: ${e} }`]}const Zt=t=>t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`);function he(t,e){if(!t)return null;const n=N(e),r=t.rules.get(n);if(r)return r;if(n.length<qt||t.drawn.has(n))return null;let o=null;for(const[i,s]of t.rules)if(i.includes(n)){if(o&&o.stamp!==s.stamp)return null;o=s}return o}const qt=8;export{k as PART_ALIGNS,Pt as PART_LETTER_EM_MAX,mt as PART_LETTER_EM_MIN,xt as PART_LETTER_STEP,gt as PART_LINE_HEIGHT_MAX,St as PART_LINE_HEIGHT_MIN,dt as PART_LINE_STEP,C as PART_MEASURED_TRACKS,at as PART_NUDGE_MAX,st as PART_NUDGE_MIN,lt as PART_PADDING_MAX,ct as PART_PADDING_MIN,ft as PART_PADDING_STEP,Y as PART_PARAGRAPH_ATTR,_t as PART_PARAGRAPH_MAX,Tt as PART_PARAGRAPH_MIN,A as PART_PARAGRAPH_VAR,zt as PART_PHONE_MAX_CSS,ht as PART_RELATIVE_PROPS,D as PART_SIZE_MAX,j as PART_SIZE_MIN,nt as PART_STYLED_ATTR,w as PART_STYLES_PROP,Bt as PART_STYLE_PROPERTIES,it as PART_WEIGHTS,E as PART_WIDTH_MAX,ut as PART_WIDTH_MIN,pt as PART_WIDTH_STEP,M as SHARED_PART_PROPERTIES,z as STYLE_ID_OF_ROLE,L as TEXT_STYLE_ATTR,ue as applyPartStyles,se as blockDrawsTextStyle,ne as followedStyleOf,ae as isHexColour,Vt as isPartKindKey,g as isTextStyleId,Yt as paragraphRules,Nt as partCaseOfTransform,wt as partCaseTransform,le as partFontKeyOf,U as partPhoneDeclarations,de as partRuleForKind,he as partRuleForText,Ft as partSpacingOf,ce as partStyleBase,re as partStyleCount,xe as partStyleCss,y as partStyleDeclarations,kt as partStyleForScreen,fe as partStyleSource,oe as propsWithPartStyleValue,ie as propsWithoutPartStyle,pe as publishedPartStyles,K as readPartStyle,W as readPartStyles};
@@ -1 +1 @@
1
- import{catalogueLabel as m}from"../../../../format/lib/puck/passes/catalogue-labels.js";import{cellWidth as n}from"./cell-width.js";import{clickableParts as s}from"./clickable-parts.js";import{cardCorners as p,sectionCorners as c}from"./corners.js";import{emptyHeadings as f}from"../../../../format/lib/puck/passes/empty-headings.js";import{showWhenRows as a}from"../../../../format/lib/puck/passes/show-when-rows.js";import{hiddenNodes as d}from"../../../../format/lib/puck/passes/hidden-nodes.js";import{sectionAnchor as l}from"./section-anchor.js";import{sectionAnimation as h}from"./section-animation.js";import{sectionHeight as g}from"./section-height.js";import{cardSticky as u,sectionSticky as w}from"./section-sticky.js";import{sectionBorder as P}from"./borders.js";import{blockPadding as S,sectionPadding as A}from"./section-padding.js";import{sectionTheme as W,slideTheme as b}from"./section-theme.js";import{buttonAlignInRow as C,containedWidth as k,imageWidth as y,sectionWidth as B}from"./section-width.js";import{blockGroups as G,sectionGroups as H}from"../../../../format/lib/puck/passes/settings-groups.js";import{openSlotDisallow as L,sectionGroupAllow as R}from"../../../../format/lib/puck/passes/slot-rules.js";import{registryPassContext as Z}from"../../../../format/lib/puck/passes/registry-context.js";const T=[R,L,A,c,P,p,S,n,B,k,C,y,g,l,W,h,w,u,b,H,G,a,f,s,d,m];function V(r,e,o){const i=e;for(const t of T)t.applies(r,o,i)&&(o.inspector&&t.panel?.(i,r,o.inspector,o),t.draw?.(i,r,o));return e}export{T as BLOCK_PASSES,V as applyBlockPasses,Z as registryPassContext};
1
+ import{catalogueLabel as m}from"../../../../format/lib/puck/passes/catalogue-labels.js";import{cellWidth as n}from"./cell-width.js";import{clickableParts as s}from"./clickable-parts.js";import{cardCorners as p,sectionCorners as c}from"./corners.js";import{emptyHeadings as f}from"../../../../format/lib/puck/passes/empty-headings.js";import{showWhenRows as a}from"../../../../format/lib/puck/passes/show-when-rows.js";import{hiddenNodes as d}from"../../../../format/lib/puck/passes/hidden-nodes.js";import{mediaValues as l}from"../../../../format/lib/puck/passes/media-values.js";import{sectionAnchor as h}from"./section-anchor.js";import{sectionAnimation as u}from"./section-animation.js";import{sectionHeight as g}from"./section-height.js";import{cardSticky as w,sectionSticky as P}from"./section-sticky.js";import{sectionBorder as S}from"./borders.js";import{blockPadding as A,sectionPadding as W}from"./section-padding.js";import{sectionTheme as b,slideTheme as C}from"./section-theme.js";import{buttonAlignInRow as k,containedWidth as y,imageWidth as B,sectionWidth as G}from"./section-width.js";import{blockGroups as H,sectionGroups as L}from"../../../../format/lib/puck/passes/settings-groups.js";import{openSlotDisallow as R,sectionGroupAllow as T}from"../../../../format/lib/puck/passes/slot-rules.js";import{registryPassContext as oo}from"../../../../format/lib/puck/passes/registry-context.js";const D=[l,T,R,W,c,S,p,A,n,G,y,k,B,g,h,b,u,P,w,C,L,H,a,f,s,d,m];function Y(r,e,o){const i=e;for(const t of D)t.applies(r,o,i)&&(o.inspector&&t.panel?.(i,r,o.inspector,o),t.draw?.(i,r,o));return e}export{D as BLOCK_PASSES,Y as applyBlockPasses,oo as registryPassContext};
@@ -2,6 +2,7 @@ import { decodePartId, encodePartId } from "efficient-easel/draw";
2
2
  import { type TextFieldMeta } from "efficient-easel/draw";
3
3
  import { type PartRow } from "./part-rows.js";
4
4
  export declare const PART_ATTR = "data-sf-part";
5
+ export declare const REGION_PART_ATTR = "data-sf-region-part";
5
6
  export declare const PART_SELECTED_ATTR = "data-sf-part-selected";
6
7
  export declare const PART_KIND_ATTR = "data-sf-part-kind";
7
8
  export declare const PART_STYLE_OWNER_ATTR = "data-sf-part-style-owner";
@@ -1 +1 @@
1
- import{decodePartId as m,encodePartId as g}from"efficient-easel/draw";import{stripMarkup as y}from"../../../format/lib/markup.js";import{LINK_FIELD_MARKER as A,SCAFFOLD_FIELD_MARKER as R,TEXT_FIELD_MARKER as u}from"efficient-easel/draw";import{readHidable as b}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as L}from"efficient-easel/draw";import{isStructuralTextProp as _}from"../../../format/lib/puck/neutralization-contracts.js";import{fieldInOwnBox as P}from"../../../format/lib/puck/own-box.js";import{partRowTexts as S}from"./part-rows.js";const B="data-sf-part",H="data-sf-part-selected",W="data-sf-part-kind",j="data-sf-part-style-owner",I="data-sf-part-style-kind";function q(e){for(let t=e;t;t=t.parentElement){const r=t.getAttribute(j),n=t.getAttribute(I);if(r&&n)return{owner:r,kind:n};if(t.getAttribute("data-puck-component"))return null}return null}const h=2;function G(e,t){if(!e)return!1;const r=m(e);return!!r?.propKey&&r.nodeId===t}function E(e){return y(e).replace(/\s+/gu,"")}function l(e,t,r){const n=e[u];if(n){if(n.control==="textList"){const o=n.itemKey??"text";if(!Array.isArray(t))return;for(const i of t){const c=i?.[o];typeof c=="string"&&r.push(c)}return}const{text:s}=b(t);s?r.push(s):n.placeholder&&r.push(n.placeholder);return}if(!e[A]){if(e.type==="text"||e.type==="textarea"){typeof t=="string"&&t&&r.push(t);return}if(e.arrayFields&&Array.isArray(t)){for(const s of t)for(const[o,i]of Object.entries(e.arrayFields))l(i,s?.[o],r);return}if(e.objectFields&&t&&typeof t=="object")for(const[s,o]of Object.entries(e.objectFields))l(o,t[s],r)}}function J(e){if(!e||typeof e!="object")return!1;const t=e;return t[A]?!1:!!t[u]||t.type==="text"||t.type==="textarea"}function w(e,t){const r=e[u];return r?.label?r.label:typeof e.label=="string"?e.label:t}function F(e){const t=e.indexOf(" (");return(t>0?e.slice(0,t):e).trim()}function Q(e,t){if(!e)return[];const r=[];for(const[n,s]of Object.entries(e)){if(!s||typeof s!="object"||_(n))continue;const o=s,i=[];l(o,t?.[n],i),!i.length&&o[R]!==void 0&&l(o,o[R],i);const c=w(o,n),a=new Set;for(const{row:d,text:f}of S(o,t?.[n])){const T=E(f);T.length<h||(a.add(T),r.push({key:n,label:c,texts:[T],row:d}))}const p=new Set(a),x=[];for(const d of i){const f=E(d);f.length<h||p.has(f)||(p.add(f),x.push(f))}x.length&&r.push({key:n,label:c,texts:x})}return r}const K=L;function O(e,t){if(!t||typeof t!="object"||_(e)||P(t))return null;const r=t[u];return!r||!K.includes(r.control)?null:r}function U(e,t){const r=O(e,t);return r!==null&&r.identifier!==!0}function V(e,t){if(!e)return[];const r=[];for(const[n,s]of Object.entries(e)){const o=O(n,s);if(!o)continue;const{text:i,hidden:c}=b(t?.[n]),a=i||o.placeholder||"",p=y(a).replace(/\s+/gu," ").trim();r.push({key:n,label:F(w(s,n)),preview:p,offPage:o.offPage===!0,identifier:o.identifier===!0,hidden:!!c})}return r}export{B as PART_ATTR,W as PART_KIND_ATTR,H as PART_SELECTED_ATTR,I as PART_STYLE_KIND_ATTR,j as PART_STYLE_OWNER_ATTR,m as decodePartId,g as encodePartId,O as entryPartMetaOf,U as fieldDrawsEntryRow,J as holdsAuthoredText,E as normalizePartText,F as partHeadLabel,w as partLabel,Q as partNeedles,G as partOpenOn,q as partStyleOwnerOf,V as sectionTextParts};
1
+ import{decodePartId as m,encodePartId as g}from"efficient-easel/draw";import{stripMarkup as y}from"../../../format/lib/markup.js";import{LINK_FIELD_MARKER as A,SCAFFOLD_FIELD_MARKER as R,TEXT_FIELD_MARKER as u}from"efficient-easel/draw";import{readHidable as _}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as L}from"efficient-easel/draw";import{isStructuralTextProp as b}from"../../../format/lib/puck/neutralization-contracts.js";import{fieldInOwnBox as P}from"../../../format/lib/puck/own-box.js";import{partRowTexts as I}from"./part-rows.js";const B="data-sf-part",H="data-sf-region-part",G="data-sf-part-selected",W="data-sf-part-kind",S="data-sf-part-style-owner",j="data-sf-part-style-kind";function q(e){for(let t=e;t;t=t.parentElement){const r=t.getAttribute(S),n=t.getAttribute(j);if(r&&n)return{owner:r,kind:n};if(t.getAttribute("data-puck-component"))return null}return null}const h=2;function J(e,t){if(!e)return!1;const r=m(e);return!!r?.propKey&&r.nodeId===t}function E(e){return y(e).replace(/\s+/gu,"")}function l(e,t,r){const n=e[u];if(n){if(n.control==="textList"){const o=n.itemKey??"text";if(!Array.isArray(t))return;for(const i of t){const c=i?.[o];typeof c=="string"&&r.push(c)}return}const{text:s}=_(t);s?r.push(s):n.placeholder&&r.push(n.placeholder);return}if(!e[A]){if(e.type==="text"||e.type==="textarea"){typeof t=="string"&&t&&r.push(t);return}if(e.arrayFields&&Array.isArray(t)){for(const s of t)for(const[o,i]of Object.entries(e.arrayFields))l(i,s?.[o],r);return}if(e.objectFields&&t&&typeof t=="object")for(const[s,o]of Object.entries(e.objectFields))l(o,t[s],r)}}function Q(e){if(!e||typeof e!="object")return!1;const t=e;return t[A]?!1:!!t[u]||t.type==="text"||t.type==="textarea"}function O(e,t){const r=e[u];return r?.label?r.label:typeof e.label=="string"?e.label:t}function N(e){const t=e.indexOf(" (");return(t>0?e.slice(0,t):e).trim()}function U(e,t){if(!e)return[];const r=[];for(const[n,s]of Object.entries(e)){if(!s||typeof s!="object"||b(n))continue;const o=s,i=[];l(o,t?.[n],i),!i.length&&o[R]!==void 0&&l(o,o[R],i);const c=O(o,n),a=new Set;for(const{row:T,text:f}of I(o,t?.[n])){const d=E(f);d.length<h||(a.add(d),r.push({key:n,label:c,texts:[d],row:T}))}const p=new Set(a),x=[];for(const T of i){const f=E(T);f.length<h||p.has(f)||(p.add(f),x.push(f))}x.length&&r.push({key:n,label:c,texts:x})}return r}const F=L;function w(e,t){if(!t||typeof t!="object"||b(e)||P(t))return null;const r=t[u];return!r||!F.includes(r.control)?null:r}function V(e,t){const r=w(e,t);return r!==null&&r.identifier!==!0}function Z(e,t){if(!e)return[];const r=[];for(const[n,s]of Object.entries(e)){const o=w(n,s);if(!o)continue;const{text:i,hidden:c}=_(t?.[n]),a=i||o.placeholder||"",p=y(a).replace(/\s+/gu," ").trim();r.push({key:n,label:N(O(s,n)),preview:p,offPage:o.offPage===!0,identifier:o.identifier===!0,hidden:!!c})}return r}export{B as PART_ATTR,W as PART_KIND_ATTR,G as PART_SELECTED_ATTR,j as PART_STYLE_KIND_ATTR,S as PART_STYLE_OWNER_ATTR,H as REGION_PART_ATTR,m as decodePartId,g as encodePartId,w as entryPartMetaOf,V as fieldDrawsEntryRow,Q as holdsAuthoredText,E as normalizePartText,N as partHeadLabel,O as partLabel,U as partNeedles,J as partOpenOn,q as partStyleOwnerOf,Z as sectionTextParts};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-web-builder",
3
- "version": "34.0.0",
3
+ "version": "36.0.0",
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",
@@ -53,8 +53,8 @@
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@tabler/icons-react": "^3.46.0",
56
- "efficient-easel": "^16.1.0",
57
- "efficient-shell": "^8.18.0",
56
+ "efficient-easel": "^18.0.0",
57
+ "efficient-shell": "^8.20.0",
58
58
  "isomorphic-dompurify": "^3.18.0",
59
59
  "next": ">=16",
60
60
  "react": ">=19",
@@ -72,8 +72,8 @@
72
72
  "@types/node": "^20",
73
73
  "@types/react": "^19",
74
74
  "@types/react-dom": "^19",
75
- "efficient-easel": "^16.1.0",
76
- "efficient-shell": "^8.18.0",
75
+ "efficient-easel": "^18.0.0",
76
+ "efficient-shell": "^8.20.0",
77
77
  "esbuild": "^0.28.0",
78
78
  "happy-dom": "^20.14.5",
79
79
  "isomorphic-dompurify": "^3.18.0",