efficient-web-builder 32.2.0 → 33.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 (34) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/editor/components/SectionIcon.js +1 -1
  3. package/dist/editor/components/SiteRestoreNotice.d.ts +1 -0
  4. package/dist/editor/components/SiteRestoreNotice.js +1 -0
  5. package/dist/editor/components/VersionHistoryDrawer.d.ts +21 -0
  6. package/dist/editor/components/VersionHistoryDrawer.js +1 -0
  7. package/dist/editor/components/WebsiteScreenParts.js +1 -1
  8. package/dist/editor/components/storefront-editor.css +17 -1
  9. package/dist/editor/components/useWebsiteMainAction.js +1 -1
  10. package/dist/editor/lib/editor-document-adapter.d.ts +2 -0
  11. package/dist/editor/lib/editor-document-adapter.js +1 -1
  12. package/dist/editor/lib/puck/blocks/general/Text/fields.js +1 -1
  13. package/dist/editor/lib/puck/heading-outline.js +1 -1
  14. package/dist/editor/lib/puck/overrides.js +1 -1
  15. package/dist/editor/lib/site-versions.d.ts +43 -0
  16. package/dist/editor/lib/site-versions.js +1 -0
  17. package/dist/format/lib/content/text-tag.d.ts +4 -0
  18. package/dist/format/lib/content/text-tag.js +1 -0
  19. package/dist/format/lib/editor-words-catalogue.d.ts +58 -0
  20. package/dist/format/lib/editor-words-catalogue.js +5 -5
  21. package/dist/format/lib/puck/container-blocks.js +1 -1
  22. package/dist/format/lib/puck/passes/settings-groups.js +1 -1
  23. package/dist/format/lib/sections/section-head-style.d.ts +1 -0
  24. package/dist/format/lib/source-rules/flat-theme-palette.d.ts +1 -0
  25. package/dist/format/lib/source-rules/flat-theme-palette.js +5 -5
  26. package/dist/format/lib/source-rules/panel-rows-use-the-shared-row.d.ts +1 -0
  27. package/dist/format/lib/source-rules/panel-rows-use-the-shared-row.js +18 -18
  28. package/dist/format/lib/web-backend.d.ts +29 -0
  29. package/dist/render/components/SectionHeader.d.ts +30 -3
  30. package/dist/render/components/SectionHeader.js +1 -1
  31. package/dist/render/components/Text.d.ts +2 -1
  32. package/dist/render/components/Text.js +1 -1
  33. package/dist/render/lib/puck/blocks/general/Text/render.js +1 -1
  34. package/package.json +5 -5
@@ -81,11 +81,40 @@ export interface SitePublishAnswer {
81
81
  state: "live" | "changed";
82
82
  published: SiteChange[];
83
83
  }
84
+ export interface SiteVersion {
85
+ id: string;
86
+ number: number;
87
+ name: string;
88
+ kind: "publish" | "draft_before_restore";
89
+ createdAt: string;
90
+ createdBy: string;
91
+ changes: SiteChange[];
92
+ live: boolean;
93
+ pages: {
94
+ id: string;
95
+ name: string;
96
+ }[];
97
+ deletedPictures?: number;
98
+ }
99
+ export interface SiteRestoreAnswer {
100
+ liveState: SiteLiveState;
101
+ undo: string | null;
102
+ }
103
+ export interface SiteVersionPreview {
104
+ url: string;
105
+ expiresAt?: string;
106
+ }
84
107
  export interface WebsiteSite {
85
108
  get(scope?: SiteScope): Promise<SiteRecord>;
86
109
  update?(patch: SiteRecordPatch, scope?: SiteScope): Promise<SiteRecord>;
87
110
  publish?(scope?: SiteScope): Promise<SitePublishAnswer>;
88
111
  liveState?(scope?: SiteScope): Promise<SiteLiveState>;
112
+ versions?(scope?: SiteScope): Promise<SiteVersion[]>;
113
+ nameVersion?(id: string, name: string, scope?: SiteScope): Promise<SiteVersion>;
114
+ restoreVersion?(id: string, options?: {
115
+ page?: string;
116
+ }, scope?: SiteScope): Promise<SiteRestoreAnswer>;
117
+ previewVersion?(id: string, scope?: SiteScope): Promise<SiteVersionPreview>;
89
118
  languages?(): Promise<{
90
119
  base: string;
91
120
  others: string[];
@@ -1,6 +1,30 @@
1
+ import type { ReactNode } from "react";
1
2
  import { type SectionNumberStyle } from "../../format/lib/sections/section-number-style.js";
2
3
  import { type SectionEyebrowLook } from "../../format/lib/sections/section-eyebrow-look.js";
3
- import type { SectionHeadStyle } from "../../format/lib/sections/section-head-style.js";
4
+ import type { SectionHeaderLook } from "../../format/lib/sections/section-head-style.js";
5
+ export declare const SHELF_TITLE_SIZES: readonly [{
6
+ readonly value: "para";
7
+ readonly label: "Paragraph size — 13px";
8
+ readonly cls: "font-mono font-normal uppercase tracking-[0.22em] text-[length:var(--size-label,13px)]";
9
+ }, {
10
+ readonly value: "sm";
11
+ readonly label: "Small — 40px";
12
+ readonly cls: "font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,40px)] max-[800px]:text-[length:var(--size-headingMedium,28px)]";
13
+ }, {
14
+ readonly value: "md";
15
+ readonly label: "Medium — 48px";
16
+ readonly cls: "font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,48px)] max-[800px]:text-[length:var(--size-headingMedium,32px)]";
17
+ }, {
18
+ readonly value: "lg";
19
+ readonly label: "Large — 56px";
20
+ readonly cls: "font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,56px)] max-[800px]:text-[length:var(--size-headingMedium,36px)]";
21
+ }, {
22
+ readonly value: "xl";
23
+ readonly label: "Extra large — 64px";
24
+ readonly cls: "font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,64px)] max-[800px]:text-[length:var(--size-headingMedium,40px)]";
25
+ }];
26
+ export type ShelfTitleSize = (typeof SHELF_TITLE_SIZES)[number]["value"];
27
+ export declare const DEFAULT_SHELF_TITLE_SIZE: ShelfTitleSize;
4
28
  interface Props {
5
29
  num?: React.ReactNode;
6
30
  title?: React.ReactNode;
@@ -16,7 +40,7 @@ interface Props {
16
40
  accent?: boolean;
17
41
  accentNum?: boolean;
18
42
  numStyle?: SectionNumberStyle;
19
- look?: SectionHeadStyle;
43
+ look?: SectionHeaderLook;
20
44
  titleAccent?: string;
21
45
  accentTracking?: string;
22
46
  spaceBelow?: string;
@@ -24,6 +48,9 @@ interface Props {
24
48
  descriptionSize?: string;
25
49
  className?: string;
26
50
  eyebrowLook?: SectionEyebrowLook;
51
+ titleSize?: string;
52
+ count?: ReactNode;
53
+ capped?: boolean;
27
54
  }
28
- export default function SectionHeader({ num, title, link, logo, description, accent, accentNum, numStyle, look, titleAccent, accentTracking, spaceBelow, rowGap, descriptionSize, className, eyebrowLook, }: Props): import("react").JSX.Element;
55
+ export default function SectionHeader({ num, title, link, logo, description, accent, accentNum, numStyle, look, titleAccent, accentTracking, spaceBelow, rowGap, descriptionSize, className, eyebrowLook, titleSize, count, capped, }: Props): import("react").JSX.Element | null;
29
56
  export {};
@@ -1 +1 @@
1
- import{jsx as a,Fragment as L,jsxs as s}from"react/jsx-runtime";import{SiteLink as k}from"../lib/site-runtime.js";import{media as O}from"../lib/media.js";import{sizedImage as I}from"../../format/lib/sized-image.js";import{DEFAULT_SECTION_NUMBER_STYLE as B,OUTLINED_NUMBER_CLASS as R,OUTLINED_NUMBER_CSS as j,OUTLINED_NUMBER_LAYOUT as D,parseSectionNumberStyle as C}from"../../format/lib/sections/section-number-style.js";import{DEFAULT_SECTION_EYEBROW_LOOK as F}from"../../format/lib/sections/section-eyebrow-look.js";import{renderGold as A,renderHeadline as H}from"./goldPhrases.js";import c from"./SectionEyebrow.js";const n={headingMediumUpTo800Small:"max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",headingMediumUpTo800Large:"max-[800px]:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))]",headingSmallUpTo800:"max-[800px]:text-[length:var(--size-headingSmall,28px)]",headingMedium2:"text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))]",headingMedium3:"text-[length:min(var(--size-headingMedium,56px),var(--sf-heading-max,9999px))]",headingMedium1:"text-[length:var(--sf-heading-max,var(--size-headingMedium,38px))]",bodySmall:"text-[length:var(--size-body,14px)]",bodyLarge:"text-[length:var(--size-body,16px)]",label:"text-[length:var(--size-label,14px)]"},h=(e,i=!1)=>typeof e=="string"?H(e,i):e,l=(e,i=!1)=>typeof e=="string"?A(e,i):e;function W({num:e,title:i,link:o,logo:f,description:r,accent:N,accentNum:S,numStyle:M=B,look:d="standard",titleAccent:b,accentTracking:_="-0.02em",spaceBelow:w,rowGap:y,descriptionSize:T,className:m="",eyebrowLook:x=F}){const g=w??(d==="editorial"?"mb-[60px]":"");if(d==="editorial"){const t=!!i||!!b;return s("header",{className:`${g} grid grid-cols-[auto_1fr_auto] items-end gap-10 border-b border-line pb-8 max-[1100px]:grid-cols-1 max-[1100px]:gap-3.5 ${m}`.trim(),children:[e&&(typeof e=="string"?a(c,{text:e,className:"pb-2"}):a("span",{className:"pb-2",children:e})),t&&s("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5.5vw,80px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em]",children:[i,b&&s(L,{children:[" ",a("em",{className:"font-serif font-normal italic text-accent",style:{letterSpacing:_},children:b})]})]}),r&&a("p",{className:`max-w-[360px] pb-1 text-right font-display ${n.bodySmall} leading-[1.5] text-fg-dim max-[1100px]:max-w-full max-[1100px]:text-left`,children:r})]})}if(d==="simple"){const t=`${g} ${m}`.trim();return s("div",{className:t||void 0,children:[e&&(typeof e=="string"?a(c,{text:e,look:x,className:"mb-4 block"}):a("span",{className:"mb-4 block",children:e})),i&&a("h2",{className:`font-heading2 ${n.headingMedium2} font-medium uppercase leading-none tracking-[-0.02em] text-fg ${n.headingMediumUpTo800Small}`,children:h(i)})]})}if(d==="statement"){const t=`${g} ${m}`.trim();return s("div",{className:t||void 0,children:[e&&(typeof e=="string"?a(c,{text:e,look:x,className:"mb-4 block"}):a("span",{className:"mb-4 block",children:e})),i&&a("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5vw,72px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em] text-fg",children:h(i,!0)})]})}if(d==="natural"){const t=`flex max-w-[680px] flex-col ${y??"gap-5"} ${g} ${m}`.replace(/\s+/g," ").trim();return s("div",{className:t,children:[e&&(typeof e=="string"?a(c,{text:e,look:x}):a("span",{children:e})),i&&a("h2",{className:`font-heading2 ${n.headingMedium2} font-medium leading-[1.05] tracking-[-0.03em] ${n.headingMediumUpTo800Small}`,children:h(i)}),r&&a("p",{className:`${T??`${n.bodyLarge}`} leading-[1.6] opacity-85`,children:r})]})}if(d==="essay"){const t=`${g} ${m}`.trim();return s("div",{className:t||void 0,children:[e&&(typeof e=="string"?a(c,{text:e,look:x,className:"mb-4 block"}):a("span",{className:"mb-4 block",children:e})),i&&a("h2",{className:`font-heading2 ${n.headingMedium1} [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-none tracking-[-0.02em] text-fg ${n.headingSmallUpTo800}`,children:h(i)})]})}const E=!!r||!!o,U=!!i,v=C(M)==="outlined",u=`font-mono ${n.label} uppercase tracking-[0.3em]`;let p=null;if(e)if(v)p=a("span",{className:`${D} text-fg-dim ${R}`,children:l(e)});else if(S&&!N&&typeof e=="string"){const t=e.indexOf("/"),z=t===-1?e:e.slice(0,t),$=t===-1?"":e.slice(t);p=s("span",{className:u,children:[a("span",{className:"text-accent",children:l(z)}),$&&a("span",{className:"text-fg-dim",children:l($)})]})}else p=a("span",{className:`${u} ${N?"text-accent":"text-fg-dim"}`,children:l(e)});return s("div",{className:"mb-16 grid grid-cols-[auto_1fr_auto] items-end gap-10 border-b border-line pb-6 max-[800px]:mb-9 max-[800px]:grid-cols-1 max-[800px]:gap-3 max-[800px]:pb-5",children:[v&&e&&a("style",{children:j}),s("div",{className:"flex flex-col items-start gap-3",children:[f?.src&&a("img",{...Y(O(f.src)),alt:f.alt,className:"h-8 w-auto object-contain"}),p]}),U&&a("h2",{className:N?"font-heading2 text-[length:min(var(--size-headingMedium,clamp(36px,5vw,64px)),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-[0.95] tracking-[-0.025em]":`font-heading2 ${n.headingMedium3} [font-weight:var(--sf-heading-weight,500)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-none tracking-[-0.03em] whitespace-pre-line ${n.headingMediumUpTo800Large} max-[800px]:leading-[1]`,children:h(i)}),E&&s("div",{className:"flex flex-col items-end gap-3 max-[800px]:items-start",children:[r&&a("p",{className:`max-w-[340px] font-display ${n.bodySmall} leading-[1.5] text-fg-dim text-right max-[800px]:max-w-full max-[800px]:text-left`,children:l(r)}),o&&s(k,{href:o.href,className:`inline-flex items-center gap-2 whitespace-nowrap font-mono ${n.label} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,children:[l(o.text),a("span",{"aria-hidden":!0,children:"→"})]})]})]})}function Y(e){const i=I(e,{fallbackWidth:640,maxWidth:960});return i.srcSet?{src:i.src,srcSet:i.srcSet,sizes:"240px"}:{src:e}}export{W as default};
1
+ import{jsx as a,jsxs as n,Fragment as B}from"react/jsx-runtime";import{SiteLink as T}from"../lib/site-runtime.js";import{media as D}from"../lib/media.js";import{sizedImage as R}from"../../format/lib/sized-image.js";import{DEFAULT_SECTION_NUMBER_STYLE as j,OUTLINED_NUMBER_CLASS as C,OUTLINED_NUMBER_CSS as F,OUTLINED_NUMBER_LAYOUT as A,parseSectionNumberStyle as X}from"../../format/lib/sections/section-number-style.js";import{DEFAULT_SECTION_EYEBROW_LOOK as Y}from"../../format/lib/sections/section-eyebrow-look.js";import{STICKY_UNDERHEADER_CLASS as W}from"../lib/puck/header-clearance.js";import{renderGold as Z,renderHeadline as K}from"./goldPhrases.js";import p from"./SectionEyebrow.js";const t={headingMediumUpTo800Small:"max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",headingMediumUpTo800Large:"max-[800px]:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))]",headingSmallUpTo800:"max-[800px]:text-[length:var(--size-headingSmall,28px)]",headingMedium2:"text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))]",headingMedium3:"text-[length:min(var(--size-headingMedium,56px),var(--sf-heading-max,9999px))]",headingMedium1:"text-[length:var(--sf-heading-max,var(--size-headingMedium,38px))]",bodySmall:"text-[length:var(--size-body,14px)]",bodyLarge:"text-[length:var(--size-body,16px)]",label:"text-[length:var(--size-label,14px)]",shelfLabel:"text-[length:var(--size-label,13px)]",shelfLabelSmall:"text-[length:var(--size-label,12px)]",shelfBody:"text-[length:var(--size-body,13px)]",shelfHeadingUpTo800Xs:"max-[800px]:text-[length:var(--size-headingMedium,28px)]",shelfHeadingUpTo800Small:"max-[800px]:text-[length:var(--size-headingMedium,32px)]",shelfHeadingUpTo800Large:"max-[800px]:text-[length:var(--size-headingMedium,36px)]",shelfHeadingUpTo800Xl:"max-[800px]:text-[length:var(--size-headingMedium,40px)]",shelfHeading1:"text-[length:var(--size-headingMedium,40px)]",shelfHeading2:"text-[length:var(--size-headingMedium,48px)]",shelfHeading3:"text-[length:var(--size-headingMedium,56px)]",shelfHeading4:"text-[length:var(--size-headingMedium,64px)]"},w=[{value:"para",label:"Paragraph size — 13px",cls:`font-mono font-normal uppercase tracking-[0.22em] ${t.shelfLabel}`},{value:"sm",label:"Small — 40px",cls:`font-heading2 font-medium tracking-[-0.03em] ${t.shelfHeading1} ${t.shelfHeadingUpTo800Xs}`},{value:"md",label:"Medium — 48px",cls:`font-heading2 font-medium tracking-[-0.03em] ${t.shelfHeading2} ${t.shelfHeadingUpTo800Small}`},{value:"lg",label:"Large — 56px",cls:`font-heading2 font-medium tracking-[-0.03em] ${t.shelfHeading3} ${t.shelfHeadingUpTo800Large}`},{value:"xl",label:"Extra large — 64px",cls:`font-heading2 font-medium tracking-[-0.03em] ${t.shelfHeading4} ${t.shelfHeadingUpTo800Xl}`}],G="lg";function P(e){return(w.find(i=>i.value===e)??w.find(i=>i.value===G)).cls}const g=(e,i=!1)=>typeof e=="string"?K(e,i):e,d=(e,i=!1)=>typeof e=="string"?Z(e,i):e;function q({num:e,title:i,link:r,logo:f,description:l,accent:u,accentNum:M,numStyle:E=j,look:m="standard",titleAccent:b,accentTracking:_="-0.02em",spaceBelow:y,rowGap:z,descriptionSize:L,className:x="",eyebrowLook:c=Y,titleSize:U,count:v,capped:H=!1}){const h=y??(m==="editorial"?"mb-[60px]":"");if(m==="shelf")return e||i||l||r?n("div",{className:`${W} sticky top-[var(--sf-header-h,88px)] z-30 mb-5 flex items-center justify-between gap-4 max-[800px]:flex-wrap max-[800px]:gap-y-2 border-b border-line bg-bg/95 py-3 backdrop-blur-md ${H?"":"-mx-[var(--sf-site-gutter,40px)] px-[var(--sf-site-gutter,40px)] max-[800px]:-mx-[min(20px,var(--sf-site-gutter,40px))] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]"}`,children:[n("div",{className:"flex min-w-0 items-end gap-6 max-[800px]:flex-col max-[800px]:items-stretch max-[800px]:gap-3",children:[e&&a("span",{className:`font-mono ${t.shelfLabel} leading-none uppercase tracking-[0.22em] text-fg-dim`,children:d(e)}),i&&a("h2",{className:`${P(U)} leading-none text-fg max-[800px]:leading-[1] [&>span]:block`,children:g(i)})]}),(l||r||v)&&n("div",{className:"flex items-center gap-5 max-[800px]:gap-3 min-[800px]:grow min-[800px]:justify-end",children:[l&&a("span",{className:`max-w-[340px] truncate font-display ${t.shelfBody} leading-[1.4] text-fg-dim max-[800px]:hidden min-[800px]:w-0 min-[800px]:grow min-[800px]:text-right`,children:d(l)}),r&&n(T,{href:r.href,className:`inline-flex items-center gap-2 whitespace-nowrap font-mono ${t.shelfLabel} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,children:[d(r.text),a("span",{"aria-hidden":!0,children:"→"})]}),v&&a("span",{className:`whitespace-nowrap font-mono ${t.shelfLabelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:v})]})]}):null;if(m==="editorial"){const s=!!i||!!b;return n("header",{className:`${h} grid grid-cols-[auto_1fr_auto] items-end gap-10 border-b border-line pb-8 max-[1100px]:grid-cols-1 max-[1100px]:gap-3.5 ${x}`.trim(),children:[e&&(typeof e=="string"?a(p,{text:e,className:"pb-2"}):a("span",{className:"pb-2",children:e})),s&&n("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5.5vw,80px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em]",children:[i,b&&n(B,{children:[" ",a("em",{className:"font-serif font-normal italic text-accent",style:{letterSpacing:_},children:b})]})]}),l&&a("p",{className:`max-w-[360px] pb-1 text-right font-display ${t.bodySmall} leading-[1.5] text-fg-dim max-[1100px]:max-w-full max-[1100px]:text-left`,children:l})]})}if(m==="simple"){const s=`${h} ${x}`.trim();return n("div",{className:s||void 0,children:[e&&(typeof e=="string"?a(p,{text:e,look:c,className:"mb-4 block"}):a("span",{className:"mb-4 block",children:e})),i&&a("h2",{className:`font-heading2 ${t.headingMedium2} font-medium uppercase leading-none tracking-[-0.02em] text-fg ${t.headingMediumUpTo800Small}`,children:g(i)})]})}if(m==="statement"){const s=`${h} ${x}`.trim();return n("div",{className:s||void 0,children:[e&&(typeof e=="string"?a(p,{text:e,look:c,className:"mb-4 block"}):a("span",{className:"mb-4 block",children:e})),i&&a("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5vw,72px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em] text-fg",children:g(i,!0)})]})}if(m==="natural"){const s=`flex max-w-[680px] flex-col ${z??"gap-5"} ${h} ${x}`.replace(/\s+/g," ").trim();return n("div",{className:s,children:[e&&(typeof e=="string"?a(p,{text:e,look:c}):a("span",{children:e})),i&&a("h2",{className:`font-heading2 ${t.headingMedium2} font-medium leading-[1.05] tracking-[-0.03em] ${t.headingMediumUpTo800Small}`,children:g(i)}),l&&a("p",{className:`${L??`${t.bodyLarge}`} leading-[1.6] opacity-85`,children:l})]})}if(m==="essay"){const s=`${h} ${x}`.trim();return n("div",{className:s||void 0,children:[e&&(typeof e=="string"?a(p,{text:e,look:c,className:"mb-4 block"}):a("span",{className:"mb-4 block",children:e})),i&&a("h2",{className:`font-heading2 ${t.headingMedium1} [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-none tracking-[-0.02em] text-fg ${t.headingSmallUpTo800}`,children:g(i)})]})}const k=!!l||!!r,I=!!i,N=X(E)==="outlined",$=`font-mono ${t.label} uppercase tracking-[0.3em]`;let o=null;if(e)if(N)o=a("span",{className:`${A} text-fg-dim ${C}`,children:d(e)});else if(M&&!u&&typeof e=="string"){const s=e.indexOf("/"),O=s===-1?e:e.slice(0,s),S=s===-1?"":e.slice(s);o=n("span",{className:$,children:[a("span",{className:"text-accent",children:d(O)}),S&&a("span",{className:"text-fg-dim",children:d(S)})]})}else o=a("span",{className:`${$} ${u?"text-accent":"text-fg-dim"}`,children:d(e)});return n("div",{className:"mb-16 grid grid-cols-[auto_1fr_auto] items-end gap-10 border-b border-line pb-6 max-[800px]:mb-9 max-[800px]:grid-cols-1 max-[800px]:gap-3 max-[800px]:pb-5",children:[N&&e&&a("style",{children:F}),n("div",{className:"flex flex-col items-start gap-3",children:[f?.src&&a("img",{...J(D(f.src)),alt:f.alt,className:"h-8 w-auto object-contain"}),o]}),I&&a("h2",{className:u?"font-heading2 text-[length:min(var(--size-headingMedium,clamp(36px,5vw,64px)),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-[0.95] tracking-[-0.025em]":`font-heading2 ${t.headingMedium3} [font-weight:var(--sf-heading-weight,500)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-none tracking-[-0.03em] whitespace-pre-line ${t.headingMediumUpTo800Large} max-[800px]:leading-[1]`,children:g(i)}),k&&n("div",{className:"flex flex-col items-end gap-3 max-[800px]:items-start",children:[l&&a("p",{className:`max-w-[340px] font-display ${t.bodySmall} leading-[1.5] text-fg-dim text-right max-[800px]:max-w-full max-[800px]:text-left`,children:d(l)}),r&&n(T,{href:r.href,className:`inline-flex items-center gap-2 whitespace-nowrap font-mono ${t.label} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,children:[d(r.text),a("span",{"aria-hidden":!0,children:"→"})]})]})]})}function J(e){const i=R(e,{fallbackWidth:640,maxWidth:960});return i.srcSet?{src:i.src,srcSet:i.srcSet,sizes:"240px"}:{src:e}}export{G as DEFAULT_SHELF_TITLE_SIZE,w as SHELF_TITLE_SIZES,q as default};
@@ -6,8 +6,9 @@ interface TextProps {
6
6
  text: string;
7
7
  align: Align;
8
8
  tone: Tone;
9
+ tag?: string;
9
10
  contained: boolean;
10
11
  hero?: boolean;
11
12
  }
12
- export default function Text({ text, align, tone, contained, hero, pad }: TextProps): import("react").JSX.Element;
13
+ export default function Text({ text, align, tone, contained, hero, pad, tag }: TextProps): import("react").JSX.Element;
13
14
  export {};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import x from"./BlockFrame.js";import{renderGold as r,splitParagraphs as c}from"./goldPhrases.js";const t={bodyUpTo800:"max-[800px]:text-[length:var(--size-body,14px)]",bodySmall:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,17px)]"},f={left:"text-left",center:"text-center mx-auto",right:"text-right ml-auto"},g=`max-w-[380px] ${t.bodySmall} leading-[1.5] opacity-80 ${t.bodyUpTo800}`,y={default:"text-fg",dim:"text-fg-dim"};function h({text:a,align:l,tone:n,contained:s,hero:d=!1,pad:o}){if(d)return e("p",{className:g,children:r(a)});const i=`max-w-[680px] whitespace-pre-line ${t.bodyLarge} leading-[1.7] ${f[l]} ${y[n]}`;return e(x,{contained:s,className:"py-4",pad:o?{values:o,frame:16}:void 0,children:c(a).map((p,m)=>e("p",{className:i,children:r(p)},m))})}export{h as default};
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 +1 @@
1
- import{Fragment as d,jsx as r}from"react/jsx-runtime";import{padValuesOf as m}from"../../../../../../format/lib/content/section-padding.js";import f from"../../../../../components/Text.js";import{hidableText as l,readHidable as p}from"efficient-easel/draw";import{PH as x}from"../../../../../../format/lib/puck/blocks/placeholders.js";import{phPrev as s}from"../../scaffold.js";const P={label:"Text",defaultProps:{text:"",align:"left",tone:"default",contained:!0},render:e=>{const{text:t,align:o,tone:n,contained:a,puck:i}=e;return p(t).hidden?r(d,{}):r(f,{text:s(l(t),x.body,i)??"",align:o,tone:n,contained:a,pad:m(e)})}};export{P as TextRender};
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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-web-builder",
3
- "version": "32.2.0",
3
+ "version": "33.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": "^15.0.0",
57
- "efficient-shell": "^8.13.0",
56
+ "efficient-easel": "^16.1.0",
57
+ "efficient-shell": "^8.18.0",
58
58
  "isomorphic-dompurify": "^3.18.0",
59
59
  "next": ">=16",
60
60
  "react": ">=19",
@@ -73,8 +73,8 @@
73
73
  "@types/node": "^20",
74
74
  "@types/react": "^19",
75
75
  "@types/react-dom": "^19",
76
- "efficient-easel": "^15.0.0",
77
- "efficient-shell": "^8.13.0",
76
+ "efficient-easel": "^16.1.0",
77
+ "efficient-shell": "^8.18.0",
78
78
  "esbuild": "^0.28.0",
79
79
  "happy-dom": "^20.14.5",
80
80
  "isomorphic-dompurify": "^3.18.0",