efficient-web-builder 6.0.0 → 7.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +238 -0
- package/README.md +42 -0
- package/dist/components/ApplyCornersToSiblings.js +1 -1
- package/dist/components/Banner.js +1 -1
- package/dist/components/BlockGapField.js +1 -1
- package/dist/components/BlogPostSource.js +1 -1
- package/dist/components/Breadcrumb.js +1 -1
- package/dist/components/CardShadowField.js +1 -1
- package/dist/components/CategoryBar.js +1 -1
- package/dist/components/ChatSettingsPanel.js +1 -1
- package/dist/components/ClearColoursDialog.js +1 -1
- package/dist/components/CornersField.js +1 -1
- package/dist/components/DocBody.js +5 -5
- package/dist/components/DuplicateToPageMenu.js +1 -1
- package/dist/components/FAQ.js +1 -1
- package/dist/components/Flex.js +1 -1
- package/dist/components/Footprint.js +3 -3
- package/dist/components/HeroImageField.js +1 -1
- package/dist/components/HeroSection.js +2 -2
- package/dist/components/HeroSingle.js +1 -1
- package/dist/components/HeroSlide.js +1 -1
- package/dist/components/HoverEffectField.js +1 -1
- package/dist/components/ImageFocusRow.js +1 -1
- package/dist/components/IntegrationsSection.js +1 -1
- package/dist/components/IntroBleed.js +1 -1
- package/dist/components/KeyFeatures.js +1 -1
- package/dist/components/LocationsGroupedField.js +1 -1
- package/dist/components/MediaUploadField.js +1 -1
- package/dist/components/MultiSelectField.js +1 -1
- package/dist/components/PagesPanel.js +1 -1
- package/dist/components/PartInkControl.js +1 -1
- package/dist/components/PartResetDot.js +1 -1
- package/dist/components/PartSettingsPanel.js +1 -1
- package/dist/components/PartTextBox.js +1 -1
- package/dist/components/PhotographyField.js +1 -1
- package/dist/components/ProcessSteps.js +1 -1
- package/dist/components/SearchSelectField.d.ts +1 -1
- package/dist/components/SearchSelectField.js +1 -1
- package/dist/components/SectionEditor.js +1 -1
- package/dist/components/SectionTextEntries.js +1 -1
- package/dist/components/SectionThemePicker.js +1 -1
- package/dist/components/Series.js +1 -1
- package/dist/components/ShadowColourField.js +1 -1
- package/dist/components/SideSpaceField.js +1 -1
- package/dist/components/SiteFields.js +1 -1
- package/dist/components/SiteWidthField.js +1 -1
- package/dist/components/SlotChildRows.js +1 -1
- package/dist/components/SocialLinksPanel.js +1 -1
- package/dist/components/SourceStatus.js +1 -1
- package/dist/components/SpecStrip.js +1 -1
- package/dist/components/Split.js +1 -1
- package/dist/components/StandaloneSectionEditor.js +1 -1
- package/dist/components/StatsParagraph.js +1 -1
- package/dist/components/StorefrontLinkField.js +1 -1
- package/dist/components/StylesPanel.js +1 -1
- package/dist/components/SwitchToBoxFooter.js +1 -1
- package/dist/components/Testimonials.js +1 -1
- package/dist/components/TextStyleRow.js +1 -1
- package/dist/components/TextStylesField.js +1 -1
- package/dist/components/ThemeCard.js +1 -1
- package/dist/components/ThemeColourField.js +1 -1
- package/dist/components/ThemeField.js +1 -1
- package/dist/components/TickerSection.js +1 -1
- package/dist/components/TickerSettingsPanel.js +1 -1
- package/dist/components/TitleWithButtons.js +1 -1
- package/dist/components/WebsiteScreenParts.js +1 -1
- package/dist/components/WebsiteSettingsPanel.js +1 -1
- package/dist/components/WidthFollowField.js +1 -1
- package/dist/components/preview-devices.js +1 -1
- package/dist/components/storefront-editor.css +93 -123
- package/dist/components/useLocationsTree.js +1 -1
- package/dist/lib/content/ink.d.ts +36 -0
- package/dist/lib/content/ink.js +1 -0
- package/dist/lib/content/section-surface.js +1 -1
- package/dist/lib/editor-words-catalogue.d.ts +1178 -0
- package/dist/lib/editor-words-catalogue.js +11 -0
- package/dist/lib/editor-words.d.ts +15 -0
- package/dist/lib/editor-words.js +1 -0
- package/dist/lib/links/link-picker-setup.js +1 -1
- package/dist/lib/page-rows.d.ts +8 -0
- package/dist/lib/page-rows.js +1 -0
- package/dist/lib/puck/ColourControl.js +1 -1
- package/dist/lib/puck/MarkupToolbar.js +1 -1
- package/dist/lib/puck/apply-card-corners.js +1 -1
- package/dist/lib/puck/blocks/general/Breadcrumb/render.js +1 -1
- package/dist/lib/puck/blocks/general/Cards/render.js +1 -1
- package/dist/lib/puck/blocks/general/CategoryBar/render.js +1 -1
- package/dist/lib/puck/blocks/general/Chart/render.js +2 -2
- package/dist/lib/puck/blocks/general/DocBody/render.js +1 -1
- package/dist/lib/puck/blocks/general/DocMasthead/render.js +1 -1
- package/dist/lib/puck/blocks/general/DocTabs/render.js +1 -1
- package/dist/lib/puck/blocks/general/FAQ/render.js +1 -1
- package/dist/lib/puck/blocks/general/Footprint/render.js +2 -2
- package/dist/lib/puck/blocks/general/KeyFeatures/render.js +1 -1
- package/dist/lib/puck/blocks/general/Logos/render.js +1 -1
- package/dist/lib/puck/blocks/general/Masthead/render.js +1 -1
- package/dist/lib/puck/blocks/general/OrderSummary/render.js +1 -1
- package/dist/lib/puck/blocks/general/PaymentBadges/render.js +1 -1
- package/dist/lib/puck/blocks/general/ProcessSteps/render.js +1 -1
- package/dist/lib/puck/blocks/general/Series/render.js +1 -1
- package/dist/lib/puck/blocks/general/StatsParagraph/render.js +1 -1
- package/dist/lib/puck/blocks/general/Testimonials/render.js +1 -1
- package/dist/lib/puck/blocks/general/Timeline/render.js +2 -2
- package/dist/lib/puck/blocks/general/TimelineTrack/render.js +1 -1
- package/dist/lib/puck/blocks/scaffold.js +1 -1
- package/dist/lib/puck/controls.js +1 -1
- package/dist/lib/puck/footer-block-row-name.js +1 -1
- package/dist/lib/puck/page-root-fields.js +1 -1
- package/dist/lib/puck/theme-swatches.js +1 -1
- package/dist/lib/source-rules/editor-words.d.ts +26 -0
- package/dist/lib/source-rules/editor-words.js +3 -0
- package/dist/lib/source-rules/mirrored-rows-agree.js +1 -1
- package/dist/lib/source-rules/part-style-naming.js +1 -1
- package/dist/lib/source-rules/support/label-extraction.js +2 -2
- package/dist/lib/theme-save-message.js +1 -1
- package/package.json +6 -5
- package/dist/components/HeadingAudit.d.ts +0 -1
- package/dist/components/HeadingAudit.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{jsx as n,jsxs as d,Fragment as v}from"react/jsx-runtime";import{useState as fe}from"react";import{useEasel as ue}from"efficient-easel/easel";import{InspectorHead as he,InspectorIconButton as x}from"efficient-easel/chrome";import{DuplicateIcon as Se,TrashIcon as we}from"efficient-easel/icons";import{panelFieldsOf as be}from"../lib/puck/panel-fields.js";import{TICKER_PART_LABEL as B}from"./PreviewTickerContext.js";import ge from"./SectionIcon.js";import{PanelHideButton as z}from"./SidePanelHead.js";import{useEditorSession as ke}from"../lib/editor-session-context.js";import{say as i}from"../lib/editor-words.js";import ve,{HintsToggle as Pe,SHOW_HINTS_DEFAULT as ye}from"./WebsiteSettingsPanel.js";import Ee from"./ChatSettingsPanel.js";import Ie from"./SocialLinksPanel.js";import Le from"./TickerSettingsPanel.js";import Ne,{PartSourceNote as Oe,partStyleName as Te}from"./PartSettingsPanel.js";import He from"./DuplicateToPageMenu.js";import{useStorefrontDocument as _e}from"./StorefrontDocumentContext.js";import{usePreviewHeader as Re}from"./PreviewHeaderContext.js";import{usePartStyle as Ae}from"./PreviewPartStyleContext.js";import{useSectionOps as Ce}from"../lib/puck/use-section-ops.js";import{SELECTION_MODE as De}from"../lib/editor-screen.js";import{usePreviewParts as Fe}from"./PreviewPartsContext.js";import{SectionTextEntries as xe}from"./SectionTextEntries.js";import{SectionTextSuppressProvider as Be}from"../lib/puck/section-text-suppress.js";import{HEADER_TYPE as ze,ROOT_ZONE as K}from"../lib/puck/content-tree.js";import{duplicateBlocked as Ke}from"../lib/hero-group-placement.js";import{FOOTER_TYPE as P}from"../lib/puck/footer-blocks.js";import Me from"./SwitchToBoxFooter.js";import{SiteFields as M}from"./SiteFields.js";import{SITE_FOOTER_SLUG as We}from"../lib/content/footer.js";import{SettingsSwitch as je}from"efficient-easel/panel";import{foldTopTier as Ue}from"../lib/puck/field-groups.js";import{FoldHeadingScope as Ye}from"../lib/puck/panel-heading-scope.js";import{partRowField as Ge}from"../lib/puck/part-row-field.js";import{decodePartKey as Ze,partRowHeadLabel as $e}from"../lib/puck/part-rows.js";import{encodePartId as W,partHeadLabel as qe,partLabel as Je,sectionTextParts as Qe}from"../lib/puck/text-parts.js";import{partSourceOf as Ve,sourceSlugOf as Xe}from"../lib/puck/source-bound-parts.js";const Yt=De,Gt={kind:"header"},Zt={kind:"website"},$t={kind:"chat"},qt={kind:"social"},g="Part";function j(e){return i("Part of {name}",{name:i(e)})}function et(e,o,r){const c=e.describeNode(o);return{name:r,kindLabel:c?j(c.label):i(g)}}function tt(e){switch(e){case"Header":return{title:i("Header settings belong to a website."),own:i("Each website created from this template sets its own header afterwards.")};case"Appearance":return{title:i("Appearance settings belong to a website."),own:i("Each website created from this template sets its own appearance afterwards.")};case"Live chat":return{title:i("Live chat settings belong to a website."),own:i("Each website created from this template sets its own live chat afterwards.")};case"Social link":return{title:i("Social link settings belong to a website."),own:i("Each website created from this template sets its own social link afterwards.")};default:return{title:i("{what} settings belong to a website.",{what:e}),own:i("Each website created from this template sets its own {what} afterwards.",{what:e.toLowerCase()})}}}function U({what:e}){const o=tt(e);return d("div",{className:"sf-note",children:[n("p",{children:n("strong",{children:o.title})}),d("p",{children:[i("A template is a blueprint — it has no website of its own, so there is nothing here to change.")," ",o.own]})]})}const nt={header:{name:"Header",kindLabel:"Site settings",icon:"header",render:(e,o)=>{const r=o.hostPanels?.header;return r?n(r,{placeholderMode:o.capabilities.placeholderFrames,tokenRef:o.tokenRef,siteId:o.siteId,websiteName:o.websiteName,onOpenWebsiteSettings:o.onOpenWebsiteSettings,onAuthExpired:()=>o.notifyParent("storefront-editor:auth-expired")}):null}},website:{name:"Appearance",kindLabel:"Site settings",icon:"website",render:(e,o)=>n(ve,{themeFromDocument:!o.capabilities.hasSiteTheme,tokenRef:o.tokenRef,siteId:o.siteId,onNotify:o.onNotify})},chat:{name:"Live chat",kindLabel:"Site settings",icon:"chat",render:()=>n(Ee,{})},social:{name:"Social links",kindLabel:"Site settings",icon:"social",render:()=>n(Ie,{unavailable:n(U,{what:"Social link"})})},ticker:{name:B,kindLabel:g,icon:"ticker",head:(e,o)=>e.kind==="ticker"?et(o,e.heroId,i(B)):null,render:e=>n(Le,{heroId:e.kind==="ticker"?e.heroId:""})},part:{name:g,kindLabel:g,icon:"Text",head:(e,o)=>{if(e.kind!=="part")return null;const r=o.describeNode(e.nodeId);if(!r)return null;const{key:c,row:h}=Ze(e.propKey),w=h?Ge(r.fields[c],h):r.fields[c],u=$e(i(qe(Je(w??{},c))),h),p=o.styleNameOfPart(e.nodeId,e.propKey);return{name:p!==null?i(p):u,kindLabel:j(r.label)}},render:(e,o)=>e.kind==="part"?n(Ne,{nodeId:e.nodeId,propKey:e.propKey,onBack:()=>o.onSelectNode(e.nodeId),onEditStyle:o.onOpenSiteStyles}):null}},ot=new Set(["header","website","chat"]);function it(e,o){if(e==="puck")return null;const r=nt[e];return ot.has(e)&&!o.hasSiteSettings?{...r,kindLabel:"Not part of a template",render:()=>n(U,{what:r.name})}:r}function rt({mode:e,onOpenWebsiteSettings:o,onOpenSiteStyles:r,onSelectNode:c,hideNodeActions:h=!1,onNotify:w,onHidePanel:u}){const{capabilities:p,tokenRef:y,notifyParent:Y,currentSlug:E,siteId:I,runAuthed:G,readOnly:Z}=_e(),{websiteName:$,fonts:q}=Re(),{partStyle:L}=Ae(),b=Ce({readOnly:Z}),{select:J}=Fe(),{selectedItem:t,getItemById:N,getSelectorForId:Q,config:m,appState:V}=ue(l=>l),X=be(m,t?{type:t.type,props:t.props}:null),ee=l=>m.components[l]?.label??l,s=t?Q(t.props.id):void 0,a=it(e.kind,p),O=ke(),T=O.chrome?.panels?.chromePage,H={capabilities:p,tokenRef:y,hostPanels:O.chrome?.panels,describeNode:l=>{const f=N(l);if(!f)return null;const S=m.components[f.type];return{type:f.type,label:S?.label??f.type,fields:S?.fields??{}}},styleNameOfPart:(l,f)=>{const S=N(l);if(!S)return null;const de=W(l,f),me=L?.partId===de?L:null;return Te(S.props,f,me,q)},siteId:I,websiteName:$??null,notifyParent:Y,onNotify:w,onOpenWebsiteSettings:o,onOpenSiteStyles:r,onSelectNode:c},_=a?.head?.(e,H)??null,te=_?.name??(a?i(a.name):t?i(ee(t.type)):i("Page settings")),ne=_?.kindLabel??(a?i(a.kindLabel):t?s&&s.zone!==K?i("Block"):i("Section"):i("Page")),oe=a?a.icon:t?t.type:"page",R=a?null:t?m.components[t.type]?.fields??null:m.root?.fields??null,ie=R?Ue(R):2,A=e.kind==="puck"&&t?Ve(t.type):null,re=!!t&&!!s&&s.zone===K&&t.type!==P&&t.type!==ze,k=Ke(V?.data,t),se=()=>{k||s&&b.duplicateComponent(s.zone,s.index)},ae=()=>{s&&(b.removeComponent(s.zone,s.index),b.select(null))},le=t?m.components[t.type]?.defaultProps?.previewHover:void 0,C=e.kind==="puck"&&!!t&&!!s&&le!==void 0,D=C&&t.props.previewHover===!0,ce=()=>{!t||!s||b.replaceComponent(s.zone,s.index,{...t,props:{...t.props,previewHover:!D}})},[F,pe]=fe(ye);return d("div",{className:`es-sidepanel es-sidepanel--right sf-panel sf-panel--right${F||!(!a&&!!t)?"":" sf-hints-folded"}`,children:[n(he,{icon:n(ge,{type:oe,size:15}),name:te,kind:ne,actions:!h&&e.kind==="puck"&&t&&t.type!==P?d(v,{children:[n(x,{label:i("Duplicate section"),title:k??void 0,disabled:k!==null,onClick:se,children:n(Se,{size:15})}),re&&p.hasSiteSettings&&n(He,{node:t,currentSlug:E,siteId:I??void 0,tokenRef:y,runAuthed:G,onNotify:w}),n(x,{label:i("Remove section"),danger:!0,onClick:ae,children:n(we,{size:15})}),u?n(z,{side:"right",onHide:u,divider:!0}):null]}):u?n(z,{side:"right",onHide:u}):void 0}),C&&d("div",{className:"sf-preview-pin",children:[d("div",{className:"sf-preview-pin-text",children:[n("span",{className:"sf-preview-pin-label",children:i("Preview hover state")}),n("span",{className:"sf-preview-pin-hint",children:i("not shown live")})]}),n(je,{checked:D,onChange:ce,ariaLabel:i("Preview hover state")})]}),n(Ye,{tier:ie,children:n("div",{className:"sf-insp-body sf-scroll",children:a?a.render(e,H):t?d(v,{children:[n(Be,{children:n(M,{entries:n(xe,{parts:Qe(X??m.components[t.type]?.fields,t.props),onOpen:l=>J(W(t.props.id,l))})})}),t.type===P&&p.hasSiteSettings&&n(Me,{}),A&&n(Oe,{source:A,slug:Xe(t?.props)}),n(Pe,{shown:F,onChange:pe})]}):d(v,{children:[n(M,{}),E===We&&p.hasSiteSettings&&T&&n(T,{})]})})})]})}export{$t as CHAT_MODE,Gt as HEADER_MODE,Yt as PUCK_MODE,qt as SOCIAL_MODE,Zt as WEBSITE_MODE,rt as default,it as resolvePanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as n,jsxs as
|
|
1
|
+
"use client";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{SettingsDrill as f}from"efficient-easel/panel";import a from"./UiIcon.js";import{say as i}from"../lib/editor-words.js";const l="Not shown on the page";function m({part:e,onOpen:o}){return n(f,{name:i(e.label),preview:e.offPage?i(l):e.preview||i("Empty"),offPage:e.offPage,status:e.hidden?n("span",{className:"sf-entry-eye",role:"img","aria-label":i("Hidden on the page"),children:n(a,{name:"eye-off",size:14})}):void 0,onOpen:()=>o(e.key)})}function u({parts:e,onOpen:o}){const t=e.filter(s=>!s.identifier);return t.length?r("div",{className:"sf-entries",children:[n("h3",{className:"sf-entries-head",children:i("Text")}),t.map(s=>n(m,{part:s,onOpen:o},s.key))]}):null}export{u as SectionTextEntries};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as i,Fragment as
|
|
1
|
+
"use client";import{jsx as e,jsxs as i,Fragment as z}from"react/jsx-runtime";import{useCallback as B,useContext as K,useEffect as W,useId as y,useRef as D,useState as L}from"react";import{ThemeIcon as V}from"efficient-easel/icons";import{SettingsField as q}from"efficient-easel/panel";import{usePreviewHeader as G}from"./PreviewHeaderContext.js";import{StorefrontDocumentContext as J}from"./StorefrontDocumentContext.js";import{ThemeCard as Q,ThemeCardTrigger as U,ThemeColourRows as X,themeName as v}from"./ThemeCard.js";import{useThemeRowPersist as Y}from"../lib/theme-row-persist.js";import{say as u}from"../lib/editor-words.js";import{normalizeTheme as S,normalizeThemeColors as Z,selectedThemeColors as ee}from"../lib/theme.js";import{SECTION_ACCENT_INHERIT as te,resolveSectionAccent as ne}from"../lib/content/section-surface.js";const se="Follow the page",ge="Follow the slideshow",oe=s=>u("Editing {name} changes it everywhere.",{name:s});function ce({colors:s}){if(!s)return e("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});const n=Z(s);return i("span",{className:"sf-secttheme-chip","aria-hidden":"true",children:[e("i",{style:{background:n.background}}),e("i",{className:"sf-secttheme-chip-accent",style:{background:n.accent}})]})}function re({themes:s,value:n,onPick:r,onEdit:f,menuId:l,followLabel:m}){return i("div",{className:"sf-multi-menu sf-secttheme-menu",id:l,role:"listbox",children:[m!==void 0&&i(z,{children:[i("button",{type:"button",role:"option","aria-selected":n===null,className:`sf-secttheme-item${n===null?" is-active":""}`,onClick:()=>r(te),children:[e(ce,{}),e("span",{className:"sf-secttheme-name",children:u(m)})]}),e("div",{className:"sf-secttheme-sep",role:"presentation"})]}),n!==null&&s[n]&&e("p",{className:"sf-secttheme-oncard",role:"presentation",children:u("{name} is on this section",{name:v(n)})}),s.map((N,c)=>c===n?null:e(Q,{role:"option",index:c,colors:N,selected:!1,onPick:()=>r(c),onEdit:()=>f(c)},c))]})}function ie({index:s,colors:n,onChange:r,onDone:f}){const l=v(s),m=y();return i("div",{className:"sf-secttheme-sheet",children:[i("div",{className:"sf-secttheme-sheet-head",children:[e("span",{children:l}),e("button",{type:"button",className:"sf-secttheme-done",onClick:f,children:u("Done")})]}),e("div",{className:"sf-secttheme-rows",children:e(X,{colors:n,onChange:r,idPrefix:m})}),e("p",{className:"sf-secttheme-warn",children:oe(l)})]})}function le({value:s,onChange:n,followLabel:r,hint:f}){const{theme:l,setTheme:m}=G(),N=S(l),c=K(J),R=c?.tokenRef,F=c?.siteId??null,O=!c?.capabilities?.hasSiteTheme,{persist:P,flush:g}=Y({themeFromDocument:O,tokenRef:R,siteId:F}),x=S(N),a=x.themes,d=ne(s),_=d!==null?a[d]:void 0,j=_??(a.length?ee(x):void 0),[p,E]=L(!1),[o,C]=L(null),b=D(null),w=D(null),T=y(),h=B(()=>{E(!1),C(null)},[]);W(()=>{if(!p&&o===null)return;const t=I=>{b.current&&!b.current.contains(I.target)&&(g(),h())};return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[p,o,h,g]);const A=t=>{n(t),h()},H=t=>{if(o===null)return;const I=a.map((M,$)=>$===o?t:M),k={...x,themes:I};m(k),P({selected_preset:k.selected,theme_presets:k.themes})};return i("div",{className:"sf-secttheme",ref:b,children:[e(q,{label:u("Theme"),icon:e(V,{}),labelId:`${T}-label`,hint:f,children:e(U,{colors:j,onEdit:d!==null?()=>{C(d),E(!1)}:void 0,name:_?v(d):u(r??se),nameId:`${T}-value`,labelId:`${T}-label`,open:p,menuId:T,buttonRef:w,onClick:()=>{C(null),E(t=>!t)},onKeyDown:t=>{t.key==="Escape"&&(p||o!==null)&&(t.preventDefault(),h())}})}),p&&o===null&&e("div",{onKeyDown:t=>{t.key==="Escape"&&(t.preventDefault(),h(),w.current?.focus())},children:e(re,{themes:a,value:d,onPick:A,onEdit:t=>{C(t),E(!1)},menuId:T,followLabel:r})}),o!==null&&a[o]&&e(ie,{index:o,colors:a[o],onChange:H,onDone:()=>{g(),h(),w.current?.focus()}})]})}export{ge as BLOCK_THEME_FOLLOW_LABEL,se as SECTION_THEME_FOLLOW_LABEL,ie as SectionThemeEditor,re as SectionThemeMenu,le as default,oe as sectionThemeEditWarning};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as r,Fragment as N}from"react/jsx-runtime";import{sectionRunsFullWidth as j}from"../lib/content/section-width.js";import w from"./EditorialSectionHead.js";import{renderGold as i,renderHeadline as m}from"./goldPhrases.js";function
|
|
1
|
+
import{jsx as t,jsxs as r,Fragment as N}from"react/jsx-runtime";import{sectionRunsFullWidth as j}from"../lib/content/section-width.js";import w from"./EditorialSectionHead.js";import{renderGold as i,renderHeadline as m}from"./goldPhrases.js";import{say as z}from"../lib/editor-words.js";function F({headNum:o,headTitle:p,headDesc:d,cards:c,viewLabel:n,background:a,editing:g=!1,omitHead:s=!1,...f}){const l=(c??[]).filter(e=>(e?.title??"").trim()||(e?.desc??"").trim()||(e?.num??"").trim()),u=l.length>0?l:g?[{title:z("Series title")}]:[],x=!!(a&&a!=="transparent");return r("section",{className:j(f)?s?"border-b border-line px-[var(--sf-site-gutter,40px)] pt-0 pb-[120px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:pt-0 max-[1100px]:pb-20":"border-b border-line px-[var(--sf-site-gutter,40px)] py-[120px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:py-20":s?"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] pt-0 pb-[120px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:pt-0 max-[1100px]:pb-20":"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] py-[120px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:py-20",style:x?{backgroundColor:a}:void 0,children:[s?null:t(w,{num:o,title:p?m(p):void 0,desc:d}),t("div",{className:`grid grid-cols-4 max-[1100px]:grid-cols-2 max-[700px]:grid-cols-1 ${x?"gap-[1px]":"gap-[2px] bg-bg"}`,children:u.map((e,b)=>{const h=!!(e.num?.trim()||e.since?.trim()),v=!!e.title?.trim(),y=!!(e.entries?.trim()||e.entriesLabel?.trim()||n);return r("article",{className:"flex min-h-[340px] flex-col gap-4 bg-bg px-7 pt-9 pb-8",children:[h&&r("div",{className:"flex items-baseline justify-between gap-3 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.3em] text-accent",children:[t("span",{children:e.num?i(e.num):null}),e.since?.trim()?t("span",{children:i(e.since)}):null]}),v&&t("h3",{className:"font-heading3 text-[length:var(--size-headingSmall,28px)] font-medium uppercase leading-[1.04] tracking-[-0.02em]",children:m(e.title??"")}),e.desc?.trim()&&t("p",{className:"font-display text-[length:var(--size-body,14px)] leading-[1.6] text-fg-dim",children:i(e.desc)}),y&&r("div",{className:"mt-auto flex items-center justify-between border-t border-line pt-4 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.22em] text-fg-dim",children:[r("span",{children:[e.entries?.trim()?t("strong",{className:"font-normal text-fg",children:i(e.entries)}):null,e.entriesLabel?.trim()?r(N,{children:[e.entries?.trim()?" ":"",i(e.entriesLabel)]}):null]}),n&&t("span",{className:"text-accent",children:i(n)})]})]},b)})})]})}export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";import{SettingsDefaultReset as d,SettingsField as i}from"efficient-easel/panel";import{ShadowIcon as s}from"efficient-easel/icons";import{say as t,editorEaselWords as f}from"../lib/editor-words.js";import{ColourControl as h}from"../lib/puck/ColourControl.js";import{DEFAULT_SHADOW_COLOR as l}from"../lib/theme.js";const u="Most useful on a dark theme, where a black shadow cannot be seen. Also used by the Lift hover, even with the card shadow off.";function c({value:r,onChange:n,showHint:a=!0}){const o=r===null;return e(i,{label:t("Shadow color"),icon:e(s,{}),changed:!o,action:h({value:r??"",inherited:o?l:void 0,onChange:n,label:"Shadow color",after:e(d,{words:f()?.panel,label:t("Shadow color"),changed:!o,detail:l,onReset:()=>n(null)})}),hint:a?t(u):void 0})}export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e}from"react/jsx-runtime";import{SettingsDefaultReset as d,SettingsField as
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";import{SettingsDefaultReset as d,SettingsField as p}from"efficient-easel/panel";import{PaddingXIcon as m}from"efficient-easel/icons";import{SITE_GUTTER as t}from"../lib/content/page-width.js";import{say as o,editorEaselWords as f}from"../lib/editor-words.js";import{Slider as c}from"../lib/puck/controls.js";const i="Side space",n=t.default,u="The room left at the left and right edge of every page.";function S({value:a,onChange:r,showHint:s=!0}){const l=a===null;return e(p,{label:o(i),labelId:"sf-side-space",icon:e(m,{}),value:`${a??n}px`,changed:!l,action:e(d,{words:f()?.panel,label:o(i),changed:!l,detail:`${n}px`,onReset:()=>r(null)}),hint:s?o(u):void 0,children:e(c,{min:t.min,max:t.max,step:t.step,value:a??n,readout:!1,ariaLabel:o(i),onChange:r})})}export{u as SIDE_SPACE_HINT,i as SIDE_SPACE_LABEL,S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as l}from"react/jsx-runtime";import{useState as b}from"react";import{useSelectedFields as S}from"efficient-easel/easel";import{Inspector as C,planFields as T}from"efficient-easel/fields";import{BUCKET_ICONS as g,entriesHiddenForTab as h}from"../lib/puck/controls.js";import{BUCKETS as x}from"../lib/puck/field-groups.js";const i=new Map,O=Object.fromEntries(x.map(t=>{const e=g[t];return[t,l(e,{},t)]}));function
|
|
1
|
+
"use client";import{jsx as l}from"react/jsx-runtime";import{useState as b}from"react";import{useSelectedFields as S}from"efficient-easel/easel";import{Inspector as C,planFields as T}from"efficient-easel/fields";import{BUCKET_ICONS as g,entriesHiddenForTab as h}from"../lib/puck/controls.js";import{BUCKETS as x}from"../lib/puck/field-groups.js";import{say as y}from"../lib/editor-words.js";const i=new Map,O=Object.fromEntries(x.map(t=>{const e=g[t];return[t,l(e,{},t)]}));function w({entries:t}){const{id:e,fields:a,values:m,readOnly:d,onChange:p}=S(),[s,f]=b(()=>i.get(e)),o=i.get(e),n=T(a).buckets,r=o&&n.includes(o)?o:s&&n.includes(s)?s:n[0],u=r===void 0||h(n,r)!==!0;return l(C,{fields:a,values:m,onChange:p,readOnly:d,tab:r,onTab:c=>{i.set(e,c),f(c)},tabIcons:O,idPrefix:e,ariaLabel:y("Section settings"),children:u?t:null})}export{w as SiteFields,O as TAB_ICONS};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";import{SettingsDefaultReset as l,SettingsField as m}from"efficient-easel/panel";import{WidthIcon as p}from"efficient-easel/icons";import{PAGE_WIDTH as t}from"../lib/content/page-width.js";import{say as i,editorEaselWords as f}from"../lib/editor-words.js";import{Slider as c}from"../lib/puck/controls.js";const o="Content width",r=t.default,u="The standard width every page on this site renders at.";function h({value:n,onChange:s,showHint:d=!0}){const a=n===null;return e(m,{label:i(o),labelId:"sf-site-width",icon:e(p,{}),value:`${n??r}px`,changed:!a,action:e(l,{words:f()?.panel,label:i(o),changed:!a,detail:`${r}px`,onReset:()=>s(null)}),hint:d?i(u):void 0,children:e(c,{min:t.min,max:t.max,step:t.step,value:n??r,readout:!1,ariaLabel:i(o),onChange:s})})}export{u as SITE_WIDTH_HINT,o as SITE_WIDTH_LABEL,h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as s,jsxs as b}from"react/jsx-runtime";import{useEasel as x}from"efficient-easel/easel";import{SettingsDrill as A}from"efficient-easel/panel";import C from"./AddBlockRow.js";import N from"./AddChildRow.js";import{useSlotChildActions as k}from"./SlotChildActionsContext.js";import{HERO_GROUP_TYPE as $,heroGroupNestDepth as j}from"../lib/hero-group-placement.js";import{canAddTo as w}from"../lib/puck/add-target.js";import{GroupLabel as D}from"../lib/puck/controls.js";function
|
|
1
|
+
"use client";import{jsx as s,jsxs as b}from"react/jsx-runtime";import{useEasel as x}from"efficient-easel/easel";import{SettingsDrill as A}from"efficient-easel/panel";import C from"./AddBlockRow.js";import N from"./AddChildRow.js";import{useSlotChildActions as k}from"./SlotChildActionsContext.js";import{HERO_GROUP_TYPE as $,heroGroupNestDepth as j}from"../lib/hero-group-placement.js";import{canAddTo as w}from"../lib/puck/add-target.js";import{GroupLabel as D}from"../lib/puck/controls.js";import{say as _}from"../lib/editor-words.js";function E({parent:o,parentType:t,label:d,rowName:r,onSelectChild:e,onAddChild:m,nestDepth:p=0}){const u=w(t,p);if(!u)return null;const{slot:n,choices:f,spec:i}=u,a=String(o.props.id),h=`${a}:${n}`,l=Array.isArray(o.props[n])?o.props[n]:[],R=i?.addBlocked?.(l)??null,S=i?.notice?.(l)??null;return b("div",{className:"sf-slot-rows",children:[d?s(D,{label:`${_(d)} · ${l.length}`}):null,S?s("p",{className:"sf-note",children:S}):null,l.map((c,g)=>s(A,{name:r(c),onOpen:()=>e(h,g,String(c.props.id),t)},String(c.props.id??`${h}-${g}`))),f?s(C,{choices:f,onPick:c=>m(a,n,c,l.length,t)}):i.fixed?null:s(N,{label:i.addLabel,blocked:R,onAdd:()=>m(a,n,i.childType,l.length,t)})]})}function G(o,t){return w(t)?.source==="footer"?o.blockRowName:o.childRowName}function O({parentType:o,label:t}){const{appState:d,selectedItem:r}=x(p=>p),e=k();if(!e||!r||r.type!==o)return null;const m=o===$?j(d?.data,String(r.props.id)):0;return s(E,{parent:r,parentType:o,label:t,rowName:G(e,o),onSelectChild:e.selectChild,onAddChild:e.addChild,nestDepth:m})}export{E as SlotChildRows,O as default,G as rowNamerFor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,Fragment as l,jsxs as f}from"react/jsx-runtime";import{useEffect as
|
|
1
|
+
"use client";import{jsx as t,Fragment as l,jsxs as f}from"react/jsx-runtime";import{useEffect as w,useId as d,useState as h}from"react";import{SettingsField as L}from"efficient-easel/panel";import{usePreviewSocial as y}from"./PreviewSocialContext.js";import{say as k}from"../lib/editor-words.js";import{SocialMark as v}from"./socialIcons.js";import{SOCIAL_PLATFORMS as x,SOCIAL_PLATFORM_LABELS as A}from"../lib/content/social-links.js";const E={instagram:"instagram.com/yourshop",facebook:"facebook.com/yourshop",tiktok:"tiktok.com/@yourshop",youtube:"youtube.com/@yourshop",x:"x.com/yourshop",linkedin:"linkedin.com/company/yourshop",pinterest:"pinterest.com/yourshop",whatsapp:"wa.me/61400000000",telegram:"t.me/yourshop",line:"line.me/ti/p/~yourshop",wechat:"u.wechat.com/your-qr-code-link"};function F({platform:e}){const{rows:c,saveLink:n}=y(),{value:o,error:i}=c[e],[s,a]=h(o),[g,u]=h(!1),m=d(),p=d();w(()=>a(o),[o]);const S=async()=>{if(s.trim()===o){s!==o&&a(o);return}u(!0),await n(e,s),u(!1)},b=A[e];return f(l,{children:[t(L,{label:k(b),htmlFor:m,icon:t(v,{platform:e,iconStyle:"outline",size:18}),children:t("input",{id:m,type:"text",inputMode:"url",value:s,placeholder:E[e],onChange:r=>a(r.target.value),onBlur:()=>{S()},onKeyDown:r=>{r.key==="Enter"&&r.currentTarget.blur(),r.key==="Escape"&&(a(o),r.currentTarget.blur())},"aria-invalid":i?!0:void 0,"aria-describedby":i?p:void 0,"aria-busy":g||void 0,autoComplete:"off",spellCheck:!1})}),i&&t("p",{id:p,className:"sf-note sf-note--error",role:"alert",children:i})]})}function P({unavailable:e}){const{canSave:c}=y();return!c&&e?t(l,{children:e}):f(l,{children:[t("p",{className:"es-field-hint sf-hint-keep",children:k("Paste a link to each profile. A platform left empty shows nothing on the site.")}),x.map(n=>t(F,{platform:n},n))]})}export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as s,jsxs as t}from"react/jsx-runtime";import{Button as a}from"efficient-shell/ui";function
|
|
1
|
+
"use client";import{jsx as s,jsxs as t}from"react/jsx-runtime";import{Button as a}from"efficient-shell/ui";import{say as u}from"../lib/editor-words.js";function f({status:l,statusText:o,onRefresh:n,busy:r=!1,edit:e,hint:c,spaced:i=!0}){return t("div",{className:"sf-blogsource",style:i?{marginTop:9}:void 0,children:[s("p",{className:"sf-blogsource-status","data-state":l,children:o}),s(a,{variant:"secondary",size:"sm",className:"sf-blogsource-action",onClick:n,disabled:r,children:u("Refresh now")}),e?s(a,{variant:"secondary",size:"sm",className:"sf-blogsource-action",onClick:e.onClick,children:e.label}):null,s("p",{className:"es-field-hint sf-hint-keep",children:c})]})}export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";const
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{say as a}from"../lib/editor-words.js";const o=()=>[{text:a("Spec label"),tone:"normal"},{text:a("Spec value"),tone:"muted"},{text:a("Spec label"),tone:"normal"},{text:a("Spec value"),tone:"muted"}];function d({cells:l,fill:x="dark",editing:i=!1}){const n=(l??[]).filter(e=>(e?.text??"").trim()),r=n.length>0?n:i?o():[];if(r.length===0)return null;const s=x!=="none",p=t("div",{className:"mx-auto flex max-w-[min(var(--sf-page-cap,var(--sf-site-width,1600px)),var(--sf-site-width,1600px))] flex-wrap items-baseline justify-between gap-x-8 gap-y-1 px-[var(--sf-site-gutter,40px)] py-4 text-[length:var(--size-label,12px)] uppercase tracking-[0.1em] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))] max-[800px]:py-3",children:r.map((e,m)=>t("span",{className:s?e.tone==="muted"?"text-plate-band-fg-dim":"text-plate-band-fg":e.tone==="muted"?"text-fg-dim":"text-fg",children:e.text},m))});return t("section",{className:"w-full",children:s?t("div",{className:"bg-plate-band",children:p}):t("div",{className:"border-t border-line",children:p})})}export{d as default};
|
package/dist/components/Split.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{SiteLink as v}from"../lib/site-runtime.js";import
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{SiteLink as v}from"../lib/site-runtime.js";import _ from"./Btn.js";import{resolveImageTreatment as I}from"../lib/content/image-treatment.js";import u from"./Placeholder.js";import{useSitePhotography as E}from"./SitePhotographyContext.js";import M from"./SectionEyebrow.js";import{renderGold as a,renderHeadline as S,splitParagraphs as $}from"./goldPhrases.js";import{ON_MEDIA_INK_STYLE as A}from"../lib/content/ink.js";function C({imageLabel:o,imageSrc:p,imageTint:x=.4,imageObjectPosition:y,eyebrow:c,title:d,body:m,cta:n,reverse:h=!1,uppercase:N=!1,textAlign:j="left",textBgSrc:l,textBgLabel:k,textBgTint:f=.6,textBgObjectPosition:z,featureBar:t,imageButton:i,grayscale:w}){const g=I(w,E()),b={left:{items:"",text:"",cta:"self-start"},center:{items:"items-center",text:"text-center",cta:"self-center"},right:{items:"items-end",text:"text-right",cta:"self-end"}},s=b[j]??b.left;return e("section",{className:"relative z-[2] bg-bg p-0",children:r("div",{className:["grid min-h-[72vh] grid-cols-2 border-t border-b border-line","max-[960px]:grid-cols-1","max-[960px]:min-h-0",h?"min-[961px]:[direction:rtl]":""].join(" "),children:[r("div",{className:"sf-card relative flex items-center justify-center overflow-hidden bg-surface [direction:ltr] max-[960px]:aspect-[4/3] max-[960px]:order-2",style:h?{borderLeft:"1px solid var(--site-line)"}:{borderRight:"1px solid var(--site-line)"},children:[e(u,{label:o,src:p,objectPosition:y,treatment:g}),p&&x>0&&e("div",{className:"absolute inset-0",style:{background:`rgba(0,0,0,${x})`}}),(t||i)&&r("div",{className:"pointer-events-none absolute inset-0 z-[3] flex flex-col items-center justify-center gap-4 px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",children:[t&&r(v,{href:t.href,className:"pointer-events-auto inline-flex items-center justify-center gap-3 border px-7 py-4 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] backdrop-blur-sm transition-colors max-[800px]:gap-2 max-[800px]:px-5 max-[800px]:py-3 max-[800px]:text-[length:var(--size-label,12px)]",style:{borderColor:"rgba(245,241,232,0.3)",color:"rgba(245,241,232,0.85)",background:"rgba(0,0,0,0.45)"},children:[e("span",{children:a(t.wheel)}),e("span",{"aria-hidden":!0,style:{opacity:.55},children:"·"}),e("span",{children:a(t.category)}),e("span",{"aria-hidden":!0,children:"→"}),e("span",{children:a(t.cta??"Shop now")})]}),i&&r(v,{href:i.href,className:"pointer-events-auto inline-flex items-center justify-center gap-2 border px-7 py-4 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] backdrop-blur-sm transition-colors hover:bg-[rgba(245,241,232,0.1)] max-[800px]:gap-2 max-[800px]:px-5 max-[800px]:py-3 max-[800px]:text-[length:var(--size-label,12px)]",style:{borderColor:"rgba(245,241,232,0.5)",color:"rgba(245,241,232,0.95)",background:"transparent"},children:[e("span",{children:a(i.text??"Learn more")}),e("span",{"aria-hidden":!0,children:"→"})]})]})]}),r("div",{className:"relative overflow-hidden [direction:ltr] max-[960px]:order-1",children:[l&&r("div",{className:"absolute inset-0","aria-hidden":!0,children:[e(u,{label:k??o,src:l,objectPosition:z,treatment:g}),f>0&&e("div",{className:"absolute inset-0",style:{background:`rgba(0,0,0,${f})`}})]}),e("div",{className:"relative z-[2] flex h-full min-h-full flex-col px-[60px] py-[100px] max-[960px]:px-6 max-[960px]:py-[60px]",style:l?A:void 0,children:r("div",{className:["flex flex-1 flex-col justify-center gap-6",s.items,s.text].join(" "),children:[c&&e(M,{text:c,size:14}),d&&e("h2",{className:["font-heading2 text-[length:min(var(--size-headingMedium,56px),var(--sf-heading-max,9999px))] font-normal leading-[1.05] tracking-[-0.03em]","max-[800px]:text-[length:var(--size-headingMedium,36px)] max-[800px]:leading-[1]",N?"uppercase":""].join(" "),children:S(d,!1)}),m&&$(m).map((L,P)=>e("p",{className:["max-w-[520px] text-[length:var(--size-body,16px)] leading-[1.7]","text-fg-dim"].join(" "),children:a(L)},P)),n.text&&e("div",{className:`mt-2 ${s.cta}`,children:e(_,{href:n.href,variant:"primary",children:a(n.text)})})]})})]})]})})}export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as o}from"react/jsx-runtime";import{useCallback as R,useEffect as S,useMemo as
|
|
1
|
+
"use client";import{jsx as o}from"react/jsx-runtime";import{useCallback as R,useEffect as S,useMemo as l,useRef as V,useState as u}from"react";import x from"next/dynamic";import"efficient-easel/easel.css";import"efficient-easel/shell.css";import"efficient-easel/rail.css";import"efficient-easel/panel.css";import"efficient-easel/fields.css";import"efficient-easel/pick.css";import"efficient-easel/copy.css";import"efficient-easel/gold.css";import"efficient-easel/text-styles.css";import"efficient-easel/menu.css";import"efficient-easel/chrome.css";import"efficient-easel/tree.css";import"efficient-easel/screen.css";import"./storefront-editor.css";import{buildConfig as X}from"../lib/puck/build-config.js";import{withTemplateMediaPlaceholders as Z}from"../lib/puck/templateFields.js";import{setEditorPageSlug as B}from"../lib/puck/editor-page-context.js";import{StorefrontDocumentContext as $}from"./StorefrontDocumentContext.js";import{PreviewHeaderProvider as ee}from"./PreviewHeaderContext.js";import{PreviewTickerProvider as te}from"./PreviewTickerContext.js";import{PreviewPartsProvider as re}from"./PreviewPartsContext.js";import{PreviewLocationPartProvider as oe}from"./PreviewLocationPartContext.js";import{PreviewPartStyleProvider as ie}from"./PreviewPartStyleContext.js";import{sectionTemplates as O}from"../lib/editor-section-templates.js";import{nodeToDoc as ne,docToNode as F}from"../lib/puck/section-doc.js";import{newNodeId as se}from"../lib/puck/content-tree.js";import{migrateRenamedProps as de}from"../lib/puck/renamed-props.js";import{buildSlotSeedChildren as ae}from"../lib/puck/slot-specs.js";import{FOOTER_TYPE as ce,buildDefaultFooterBlocks as me}from"../lib/puck/footer-blocks.js";import{NO_BRIDGED_CAPABILITIES as le,useAdminBridge as ue}from"../lib/editor-admin-bridge.js";import{useEditorHost as fe}from"../lib/editor-host.js";import{ChromeWrap as pe}from"../lib/editor-chrome.js";import{sessionRegistry as ve}from"../lib/editor-session.js";import{useEditorSession as ge}from"../lib/editor-session-context.js";import{say as H}from"../lib/editor-words.js";import{routeSharedHostMessage as he}from"../lib/editor-host-inbound.js";import{routeWebsiteHostMessage as Se}from"../lib/website-host-inbound.js";import{DEFAULT_THEME_MODE as P,THEME_MODE_KEY as Pe}from"../lib/theme.js";import{makeSitePageAdapter as L}from"../lib/editor-document-adapter.js";import{documentPermissions as Ee}from"efficient-easel/edit-lock";import{useAutosave as ye}from"efficient-easel/autosave";import{saveStatusOf as Te}from"../lib/puck/pinned-seed-gate.js";import{blocksOf as we}from"../lib/website-session.js";const Ne=x(()=>import("./SiteEditorProvider.js"),{ssr:!1}),ke=x(()=>import("./SectionEditorShell.js"),{ssr:!1}),U="HeroSingle",Y="Untitled section";function Ae(i,E){const d=E.components,r=d[i]?i:U,y=d[r]?.defaultProps??{},n=ae(r,f=>d[f]?.defaultProps??{}),s=r===ce?{blocks:me()}:null;return{type:r,props:{id:se(r),...y,...n?{[n.slot]:n.children}:null,...s}}}function Ce(){if(typeof window>"u")return P;try{const i=window.localStorage.getItem(Pe);return i==="light"||i==="dark"||i==="auto"?i:P}catch{return P}}function Ie({id:i,initialType:E,initialName:d=Y}){const[r,y]=u(i),n=V(r);S(()=>{n.current=r},[r]);const s=fe(),[f,j]=u(E),[b,K]=u(d),[a,T]=u(void 0),[W,G]=u(P),{token:w,tokenRef:M}=ue({onMessage:e=>{if(Se(e)||he(e))return;const t=e;if(t?.type==="storefront-editor:navigate"&&t.target?.kind==="section"&&t.target.id){const I=t.target.id;if(I===n.current)return;const J=t.target.type,Q=t.target.name;k().then(()=>{j(J),K(Q||Y),y(I),s.address.show({kind:"section",id:I})})}}}),N=ye({save:e=>O.update(e.id,e.node).then(()=>{}),onFailure:(e,t)=>{t===0&&s.send("storefront-editor:save-failed")}}),{state:p,push:_,flush:k}=N;S(()=>G(Ce()),[]);const c=ge(),v=c.usesBridgedToken?!!w:!0,g=l(()=>X(ve(c),we(c)),[c]);S(()=>{if(!v)return;let e=!1;return T(void 0),O.ensure(r,b,Ae(f??U,g)).then(t=>!e&&T(t.node)).catch(()=>!e&&T(null)),()=>{e=!0}},[r,f,b,v,g]);const A=R(e=>{s.send("storefront-editor:dirty");const t=F(e);t&&_({id:n.current,node:t})},[_,s]),h=s.send,D=R(async e=>{try{return await e(M.current??""),!0}catch{return h("storefront-editor:save-failed"),!1}},[h]),q=l(()=>Z(g,!0),[g]);S(()=>(B(null),()=>B(null)),[]);const m=l(()=>a?de(ne(a)):null,[a]),C=l(()=>({target:{kind:"page",slug:""},adapter:L(void 0),capabilities:L(void 0).capabilities,templateId:null,currentSlug:"",currentKind:null,siteId:null,ready:v,token:w,tokenRef:M,notifyParent:h,runAuthed:D,docId:r,data:m,getLiveData:()=>m,footerOriginSlug:null,error:null,redirecting:!1,saveStatus:Te(p),saveState:p,autoSaveEnabled:!0,autoSaveStoppedByConflict:!1,hasUnsavedEdits:p.pending,toggleAutoSave:()=>{},retrySave:()=>{N.retryNow()},onChange:A,flushSave:k,onPublish:async e=>{const t=F(e);t&&await O.update(n.current,t)},bridgeCapabilities:le,access:{kind:"editing"},readOnly:!1,takeOverEditing:()=>{},viewReadOnly:()=>{},saveConflict:null,reloadFromServer:()=>{},navigate:()=>{},pendingNav:null,cancelPendingNav:()=>{},discardAndNavigate:()=>{},saveAndNavigate:async()=>{}}),[r,v,w,h,D,m,p,A,k,N.retryNow]),z=l(()=>Ee(!C.readOnly),[C.readOnly]);return a===void 0?o("div",{className:"sf-msg",children:H("Loading…")}):a===null||!m?o("div",{className:"sf-msg sf-msg--error",children:H("Couldn’t open this section.")}):o($.Provider,{value:C,children:o(ee,{themeMode:W,chromePlaceholder:!0,children:o(pe,{wrap:c.chrome?.wrap,surface:"section",children:o(te,{children:o(re,{children:o(oe,{children:o(ie,{children:o(Ne,{config:q,data:m,onChange:A,permissions:z,children:o(ke,{})},r)})})})})})})})}export{Ie as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsxs as r,jsx as a,Fragment as
|
|
1
|
+
"use client";import{jsxs as r,jsx as a,Fragment as w}from"react/jsx-runtime";import{sectionRunsFullWidth as k}from"../lib/content/section-width.js";import C from"./EditorialSectionHead.js";import{renderGold as h,renderHeadline as S}from"./goldPhrases.js";import{useCountUp as j}from"./useCountUp.js";import{say as b}from"../lib/editor-words.js";const v="font-normal italic text-accent";function z({value:x,prefix:m,suffix:i,supSuffix:c,emphasizeAll:l,label:t,sub:n}){const s=(x??"").trim(),d=/^\d+$/.test(s),{ref:g,value:u}=j(d?parseInt(s,10):0),p=d?String(u):s,o=m??"";return r("div",{className:"flex min-h-[240px] flex-col gap-3 bg-bg px-8 py-12",children:[r("div",{ref:g,className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(56px,7vw,96px)),var(--sf-heading-max,9999px))] font-medium leading-[0.9] tracking-[-0.04em] tabular-nums",children:[l?r("em",{className:v,children:[o,p]}):r(w,{children:[o,p,i?a("em",{className:v,children:i}):null]}),c?a("sup",{className:"ml-8 inline-block pt-[18px] align-top font-mono text-[length:var(--size-label,13px)] leading-none tracking-[0.18em] text-accent",children:c}):null]}),(t||n)&&r("div",{className:"mt-auto font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.24em] text-fg-dim",children:[t?a("strong",{className:"mb-1 block font-display text-[length:var(--size-body,16px)] font-normal normal-case tracking-[-0.01em] text-fg",children:t}):null,n?h(n):null]})]})}function _({eyebrow:x,title:m,desc:i,stats:c,background:l,padTop:t,padBottom:n,editing:s=!1,omitHead:d=!1,...g}={}){const u=typeof t=="number"?t:120,p=typeof n=="number"?n:120,o=(c??[]).filter(e=>(e.value??"").trim()!==""||(e.label??"").trim()!==""||(e.sub??"").trim()!==""||(e.suffix??"").trim()!==""||(e.supSuffix??"").trim()!==""),f=o.length>0?o:s?[{value:"0",label:b("Stat"),sub:b("Add your numbers.")}]:[],N=!!(l&&l!=="transparent");return r("section",{className:k(g)?"border-b border-line px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]":"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]",style:{paddingTop:u,paddingBottom:p,...N?{backgroundColor:l}:{}},children:[d?null:a(C,{num:x,title:m?S(m):void 0,desc:i?h(i):void 0}),f.length>0&&a("div",{className:"sf-card grid grid-cols-4 gap-[2px] border border-line bg-line max-[1100px]:grid-cols-2 max-[700px]:grid-cols-1",children:f.map((e,y)=>a(z,{...e},y))})]})}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as f,jsxs as C}from"react/jsx-runtime";import{SettingsField as M}from"efficient-easel/panel";import{LinkIcon as D}from"efficient-easel/icons";import{LinkPicker as H}from"efficient-shell/ui";import{useEffect as
|
|
1
|
+
"use client";import{jsx as f,jsxs as C}from"react/jsx-runtime";import{SettingsField as M}from"efficient-easel/panel";import{LinkIcon as D}from"efficient-easel/icons";import{LinkPicker as H}from"efficient-shell/ui";import{useEffect as y,useMemo as P,useRef as O,useState as p}from"react";import{getEditorToken as q}from"../lib/editor-auth.js";import{say as z}from"../lib/editor-words.js";import{currentEditorSession as A}from"../lib/editor-session.js";import{backendOf as R}from"../lib/website-session.js";import{useStorefrontDocument as G}from"./StorefrontDocumentContext.js";import{pagePath as I}from"../lib/links/page-link-rules.js";import{linkPickerSetup as J}from"../lib/links/link-picker-setup.js";import{useEditorSession as K}from"../lib/editor-session-context.js";import{isSystemPageSlug as N}from"../lib/content/subscribe.js";function T(i){const s=new Map;return(n="")=>{const t=q(),o=s.get(n);if(!o||o.token===null&&t!==null){const l=t||!A().usesBridgedToken?i(t??"",n).catch(()=>[]):Promise.resolve([]);return s.set(n,{promise:l,token:t}),l}return o.promise}}const Q=T(async(i,s)=>{const n=s?{siteId:s}:void 0,{pages:t}=R();return t.linkTargets?t.linkTargets(n):(await t.list(n)).map(o=>({id:o.id,slug:o.slug,label:o.label,layout:null}))}),U=T(async(i,s)=>await R().blog?.posts(s?{siteId:s}:void 0)??[]);function V({value:i,onChange:s,label:n="Link",data:t,filters:o}){const l=P(()=>J(t,o),[t,o]),r=z(n);return f(M,{label:r,icon:f(D,{}),children:f(H,{value:i,onChange:u=>s(u),kinds:l.kinds,rules:l.rules,filtersFor:l.filtersFor,label:r})})}function W({value:i,onChange:s,label:n="Link"}){const t=typeof i=="string"?i:"",{siteId:o,capabilities:l}=G(),{offersCommerce:r,hasBlog:u}=l,[g,j]=p([]),[S,E]=p([]),[b,_]=p([]),[k,L]=p(null),h=K().chrome,v=h?.products?.list,m=h?.linkFilters,x=m?void 0:h?.linkRow,a=O(!0);y(()=>(a.current=!0,()=>{a.current=!1}),[]),y(()=>{let e=!0;return Q(o??void 0).then(c=>e&&a.current&&j(c)),u&&U(o??void 0).then(c=>e&&a.current&&E(c)),r&&v?.().then(c=>e&&a.current&&_(c)),r&&m?m.load(o).catch(()=>null).then(c=>e&&a.current&&L(()=>c)):L(null),()=>{e=!1}},[o,r,u,v,m]);const d=P(()=>({pages:g.filter(e=>!N(e.slug)).map(e=>({slug:e.slug,title:e.label,docs:[e.layout]})),posts:u?S.map(e=>({slug:e.slug,title:e.title})):[],products:r?b.map(e=>({href:e.href,name:e.name})):[],offers:{offersCommerce:r,offersService:u}}),[g,S,b,r,u]),w=P(()=>k?k(d.pages):null,[k,d]),B=d.pages.map(e=>I(e.slug)),F=r&&x&&(t==="/"||B.includes(t))?x:void 0;return C("div",{children:[f(V,{value:t,onChange:s,label:n,data:d,filters:w}),F&&f(F,{value:t,onChange:s,pages:g})]})}export{V as StorefrontLinkPicker,W as default,Q as loadPages,U as loadPosts};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import
|
|
1
|
+
"use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import c,{useWebsiteName as f}from"./WebsiteSettingsPanel.js";import d from"./SidePanelHead.js";import{say as s}from"../lib/editor-words.js";import{StylesIcon as p}from"efficient-easel/rail";import{Tooltip as S}from"efficient-shell/ui";function x({tokenRef:n,siteId:o,onClose:i,onNotify:a,tab:l,onTabChange:m}){const t=f();return r("div",{className:"sf-styles",children:[e(d,{icon:e(p,{}),title:s("Site styles"),context:e(S,{content:s("{name} — renamed in the Console: {place}.",{name:t,place:s("Storefront ▸ Sites ▸ Settings")}),className:"sf-name-tip",children:e("span",{className:"sf-name-text",children:t})}),onHide:i}),e("div",{className:"sf-insp-body sf-scroll",children:e(c,{tokenRef:n,siteId:o,onNotify:a,tab:l,onTabChange:m})})]})}export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as
|
|
1
|
+
"use client";import{jsx as e,jsxs as a}from"react/jsx-runtime";import{useState as x}from"react";import{createNode as k,newId as y}from"efficient-easel/data";import{useEasel as g}from"efficient-easel/easel";import{Button as i}from"efficient-shell/ui";import{useStorefrontDocument as S}from"./StorefrontDocumentContext.js";import{boxFooterFromFooter as E}from"../lib/puck/box-footer.js";import{FOOTER_TYPE as F}from"../lib/puck/footer-blocks.js";import{SITE_FOOTER_TYPE as c,withSectionGroup as T}from"../lib/puck/section-groups.js";import{say as r}from"../lib/editor-words.js";function b(){const{appState:m,dispatch:l,config:f}=g(o=>o),{readOnly:p}=S(),[d,s]=x(!1),n=m.data.content;if(p||n.some(o=>o.type===c))return null;const u=n.find(o=>o.type===F)??null,h=(o,t)=>k(f,o,t),w=()=>{const o=E(u,h,y(c));l({type:"setData",data:t=>({...t,content:[...T(t.content,o)]}),recordHistory:!0}),s(!1)};return a("div",{className:"sf-box-footer-switch",children:[e("p",{className:"sf-box-footer-switch-text",children:r("Build this footer out of Boxes and blocks, like a page: the same menus, signup, social links and logo, with the copyright as a Legal Line. Your current footer is kept.")}),d?a("div",{className:"sf-box-footer-switch-row",children:[e(i,{variant:"primary",size:"sm",onClick:w,children:r("Switch now")}),e(i,{variant:"secondary",size:"sm",onClick:()=>s(!1),children:r("Cancel")})]}):e(i,{variant:"secondary",size:"sm",onClick:()=>s(!0),children:r("Switch to Box footer")})]})}export{b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as f,jsxs as a}from"react/jsx-runtime";import u from"./SectionEyebrow.js";import{renderGold as v,renderHeadline as b,splitParagraphs as N}from"./goldPhrases.js";const
|
|
1
|
+
import{jsx as e,Fragment as f,jsxs as a}from"react/jsx-runtime";import u from"./SectionEyebrow.js";import{renderGold as v,renderHeadline as b,splitParagraphs as N}from"./goldPhrases.js";import{say as z}from"../lib/editor-words.js";const M="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] py-[84px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",y="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-0 pb-[84px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]";function _({look:x,eyebrow:r,title:i,items:o,columns:p,omitHead:n=!1,editing:m=!1}={}){const d=Math.min(3,Math.max(1,p??3)),s=(o??[]).filter(t=>m||(t.quote??"").trim()),c=!!(r??"").trim()||!!(i??"").trim();return!m&&!c&&s.length===0?null:e("section",{className:"relative z-[2] border-t border-line bg-surface",children:a("div",{className:n?y:M,children:[n?null:a(f,{children:[(r??"").trim()&&e(u,{text:r??"",look:x,className:"mb-4 block"}),(i??"").trim()&&e("h2",{className:"mb-11 font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.02em] text-fg max-[800px]:mb-8 max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:b(i??"",!1)})]}),s.length>0&&e("div",{className:"sf-card grid grid-cols-1 gap-px border border-line bg-line min-[700px]:[grid-template-columns:repeat(var(--tm-cols),minmax(0,1fr))]",style:{"--tm-cols":String(d)},children:s.map((t,g)=>a("figure",{className:"flex flex-col gap-5 bg-bg p-9 max-[800px]:p-7",children:[e("span",{"aria-hidden":!0,className:"font-heading2 text-[length:var(--size-headingMedium,46px)] leading-none text-accent",children:"“"}),e("blockquote",{className:"flex-1 text-[length:var(--size-body,16px)] leading-[1.6] text-fg-dim",children:N((t.quote??"").trim()||z("A short customer quote goes here.")).map((h,l)=>e("p",{className:l?"mt-3":"",children:v(h)},l))}),a("figcaption",{className:"border-t border-line pt-[18px]",children:[e("div",{className:"font-display text-[length:var(--size-body,15px)] font-medium uppercase tracking-[0.04em] text-fg",children:(t.name??"").trim()||"Customer name"}),(t.role??"").trim()&&e("div",{className:"mt-1 text-[length:var(--size-body,12px)] text-fg-dim",children:t.role})]})]},g))})]})})}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as s,jsxs as i}from"react/jsx-runtime";import{ChevronIcon as f}from"efficient-easel/icons";import{Tooltip as
|
|
1
|
+
"use client";import{jsx as s,jsxs as i}from"react/jsx-runtime";import{ChevronIcon as f}from"efficient-easel/icons";import{Tooltip as m}from"efficient-shell/ui";import{say as p}from"../lib/editor-words.js";function h({styleKey:a,label:r,icon:t,value:e,sampleStyle:l,open:n,onToggle:o,saved:d=!1,children:c}){return i("div",{"data-sf-style-row":a,className:`sf-style-row${n?" is-open":""}`,children:[i("button",{type:"button",className:"sf-style-head","aria-expanded":n,onClick:o,children:[s("span",{className:"sf-style-caret","aria-hidden":"true",children:s(f,{size:13})}),t?s("span",{className:"es-field-icon",children:t}):null,s("span",{className:"sf-style-name",children:p(r)}),e!=null?typeof e=="string"?s(m,{content:e,className:"sf-style-sample-tip",children:s("span",{className:"sf-style-sample",style:l,children:e})}):s("span",{className:"sf-style-sample",style:l,children:e}):null,s("span",{className:`sf-style-slot${d?" is-saved":""}`,children:s(y,{})})]}),n&&s("div",{className:"sf-style-body",children:c})]})}function y(){return s("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:s("polyline",{points:"20 6 9 17 4 12"})})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as
|
|
1
|
+
"use client";import{jsx as t,jsxs as v,Fragment as y}from"react/jsx-runtime";import{FieldSelect as D}from"efficient-easel/fields";import{SettingsField as x}from"efficient-easel/panel";import{Tooltip as L}from"efficient-shell/ui";import{AccentIcon as X,CaseIcon as B,StylesIcon as W,TextLinesIcon as O,TextSizeIcon as p,TextSmallIcon as k,TypeIcon as R,WeightIcon as $}from"efficient-easel/icons";import{PartResetDot as E}from"./PartSettingsPanel.js";import{say as i}from"../lib/editor-words.js";import{Slider as z}from"../lib/puck/controls.js";import K from"./TextStyleRow.js";import{DEFAULT_FONTS as F,FONT_CATEGORY_LABELS as j,fontItalicIsUsable as Z,fontOption as N,fontsByCategory as U,isHeadingRole as b}from"../lib/fonts.js";import{compressionMetrics as V,DEFAULT_HEADING_COMPRESSION as H,HEADING_MAX_PX_MAX as Y,HEADING_MAX_PX_MIN as q,HEADING_WEIGHT_MAX as J,HEADING_WEIGHT_MIN as Q,TEXT_SIZE_MAX as w,TEXT_SIZE_MIN as ee,SIZE_STEPS as P,TEXT_SIZE_STEP as te}from"../lib/theme.js";const le=[{role:"heading",title:"Heading 1",group:"heading",step:"headingLarge",base:17,icon:t(p,{})},{role:"heading2",title:"Heading 2",group:"heading",step:"headingMedium",base:15,icon:t(p,{})},{role:"heading3",title:"Heading 3",group:"heading",step:"headingSmall",base:13,icon:t(p,{})},{role:"accent",title:"Accent",step:"accent",base:15,icon:t(X,{})},{role:"body",title:"Body",group:"body",step:"body",base:14,icon:t(O,{})},{role:"label",title:"Labels",group:"label",step:"label",base:11,icon:t(k,{})}];function Oe(n){return n==="heading"?P.filter(s=>s.startsWith("heading")):P.filter(s=>s===n)}const ne=9,f=500,ae=100,ie=80,se=4,oe=600,ce=700,re=400,ue="0.18em";function de({id:n,value:s,onChange:a}){const c=U().flatMap(([l,r])=>r.map(o=>({label:o.label,value:o.key,group:i(j[l])}))),u=(l,r)=>t("span",{style:{fontFamily:`var(${N(l)?.cssVar??"--font-body"})`},children:r});return t(D,{id:n,value:s,onChange:a,options:c,renderOption:l=>u(l.value,l.label),renderValue:l=>l?u(l.value,l.label):null})}function he({label:n,icon:s,readout:a,min:c,max:u,step:l,value:r,onChange:o,action:h,hint:g}){return t(x,{label:i(n),icon:s,value:a,action:h,hint:g,children:t(z,{min:c,max:u,step:l,value:r,readout:!1,ariaLabel:i(n),onChange:o})})}function C({label:n,icon:s,value:a,fallback:c,min:u,max:l,step:r,suffix:o="",hint:h,onChange:g}){const S=a===null;return t(he,{label:n,icon:s,readout:S?i("Auto"):`${a}${o}`,min:u,max:l,step:r,value:S?c:a,onChange:g,action:S?null:t(E,{label:n,what:"change",onClear:()=>g(null)}),hint:h})}function M({label:n,icon:s,options:a,value:c,onChange:u,hint:l,action:r}){return t(x,{label:i(n),icon:s,value:ge(a.find(o=>o.value===c)?.label),hint:l,action:r,children:t("div",{className:"sf-rungs",children:a.map(o=>t("button",{type:"button","aria-pressed":o.value===c,onClick:()=>u(o.value),className:`sf-rung${o.value===c?" is-active":""}`,children:i(o.label)},o.value))})})}const ge=n=>n===void 0?void 0:i(n),fe=[{value:"authored",label:"As designed"},{value:"sentence",label:"As typed"}],me=[{value:"normal",label:"Normal"},{value:"tight",label:"Tight"},{value:"compressed",label:"Compressed"}];function pe({fontKey:n,weight:s,fallbackWeight:a,onWeight:c}){const l=(s??a)>=oe,r=Z(n),o=N(n)?.label??i("This face");return t(x,{label:i("Style"),icon:t(W,{}),value:l?i("Bold"):i("Normal"),hint:i("Bold is the weight above — one value, two ways to set it."),children:v("div",{className:"sf-rungs",children:[t(L,{content:i("Bold"),className:"sf-rung-tip",children:t("button",{type:"button","aria-pressed":l,"aria-label":i("Bold"),onClick:()=>c(l?re:ce),className:`sf-rung sf-rung--glyph${l?" is-active":""}`,style:{fontWeight:700},children:"B"})}),t(L,{className:"sf-rung-tip",content:r?i("Italic is not saved yet — the theme row has no column for it (card 66162.b)."):i("{face} is loaded without an italic, so it cannot be set in italic. Slanting it would deform the letters rather than style them.",{face:o}),children:t("span",{className:"sf-tip-disabled",tabIndex:0,children:t("button",{type:"button","aria-pressed":!1,"aria-label":i("Italic"),disabled:!0,className:"sf-rung sf-rung--glyph",style:{fontStyle:"italic"},children:"I"})})})]})})}function be({fonts:n,compression:s,headingTypography:a,openRole:c,onOpenRole:u,onFontChange:l,sizes:r,onSizeChange:o,onCompressionChange:h,onHeadingTypographyChange:g,livePx:S,savedRole:G=null}){const m=e=>g({...a,...e}),_=e=>e==="accent"?"weightStrong":e==="heading2"?"weight2":e==="heading3"?"weight3":"weight",I=e=>e==="heading2"?"case2":e==="heading3"?"case3":"case",A=V(s);return t("div",{className:"sf-style-list",children:le.map(e=>{const T=c===e.role;return t(K,{styleKey:e.role,label:e.title,icon:e.icon,value:N(n[e.role])?.label??n[e.role],sampleStyle:Se(e,n,a,A),open:T,onToggle:()=>u(T?null:e.role),saved:G===e.role,children:T&&v(y,{children:[t(x,{label:i("Font"),icon:t(R,{}),htmlFor:`sf-font-${e.role}`,action:n[e.role]===F[e.role]?null:t(E,{label:"Font",what:"change",onClear:()=>l(e.role,F[e.role])}),children:t(de,{id:`sf-font-${e.role}`,value:n[e.role],onChange:d=>l(e.role,d)})}),e.step&&o&&t(C,{label:"Size",icon:t(p,{}),value:r[e.step],fallback:e.base*2,min:ee,max:w,step:te,suffix:"px",hint:r[e.step]===null?i("Auto = this style states no size, and text following it keeps the size its section drew."):i("The size a text takes when you set it to follow this style. Sections keep their own sizes."),onChange:d=>o(e.step,d)}),(b(e.role)||e.role==="accent")&&v(y,{children:[t(C,{label:"Weight",icon:t($,{}),value:a[_(e.role)],fallback:b(e.role)?f:a.weight??f,min:Q,max:J,step:ae,hint:e.role==="accent"?i("Auto = the accent phrase takes the heading's own weight."):void 0,onChange:d=>m({[_(e.role)]:d})}),t(pe,{fontKey:n[e.role],weight:a[_(e.role)],fallbackWeight:b(e.role)?f:a.weight??f,onWeight:d=>m({[_(e.role)]:d})})]}),b(e.role)&&v(y,{children:[t(M,{label:"Line & text gap",icon:t(O,{}),options:me,value:s,onChange:h,hint:A.lineHeight===void 0?i("The built-in spacing."):i("Line gap {line} · text gap {letter}em.",{line:A.lineHeight,letter:String(A.letterSpacing)}),action:s===H?null:t(E,{label:"Line & text gap",what:"change",onClear:()=>h(H)})}),t(M,{label:"Capitals",icon:t(B,{}),options:fe,value:a[I(e.role)],onChange:d=>m({[I(e.role)]:d}),hint:i("The only setting that changes a heading's capitals."),action:a[I(e.role)]==="authored"?null:t(E,{label:"Capitals",what:"change",onClear:()=>m({[I(e.role)]:"authored"})})}),t(C,{label:"Largest size",icon:t(p,{}),value:a.maxPx,fallback:ie,min:q,max:Y,step:se,suffix:"px",hint:i("Caps the biggest heading on the site. Auto = each section's own."),onChange:d=>m({maxPx:d})})]})]})},e.role)})})}function Se(n,s,a,c){const u=Math.max(ne,n.base),l={fontFamily:`var(${N(s[n.role])?.cssVar??"--font-body"})`,fontSize:`${u.toFixed(1)}px`,lineHeight:1.15};return b(n.role)?(l.fontWeight=a.weight??f,l.textTransform=a.case==="sentence"?"none":"uppercase",c.letterSpacing!==void 0&&(l.letterSpacing=`${c.letterSpacing}em`)):n.role==="accent"?(l.fontWeight=a.weightStrong??a.weight??f,c.letterSpacing!==void 0&&(l.letterSpacing=`${c.letterSpacing}em`)):n.role==="label"&&(l.textTransform="uppercase",l.letterSpacing=ue),l}export{be as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as
|
|
1
|
+
"use client";import{jsx as e,jsxs as i,Fragment as _}from"react/jsx-runtime";import{SettingsField as b,SettingsGroupSub as L}from"efficient-easel/panel";import{Button as p}from"efficient-shell/ui";import O from"./ThemeColourField.js";import{say as o}from"../lib/editor-words.js";import{ColourControl as k}from"../lib/puck/ColourControl.js";import{ButtonIcon as A,GroundIcon as D,LayoutIcon as j,SquareIcon as z,TextSmallIcon as P,TypeIcon as B}from"efficient-easel/icons";import{DEFAULT_THEMES as v,GRADE_LABEL as I,contrastRatio as T,gradeContrast as E,normalizeThemeColors as g,resolvedButtonInk as R,themeButtonColour as S,themeButtonInk as w}from"../lib/theme.js";const G=t=>o("Theme {n}",{n:t+1});function $({colors:t}){const n=g(t),r=S(t)??n.accent;return i("span",{className:"sf-theme-page",style:{background:n.background,color:n.text},"aria-hidden":!0,children:[e("span",{className:"sf-theme-eyebrow",style:{color:n.muted},children:o("label")}),i("span",{className:"sf-theme-headline",children:[o("Heading")," ",e("span",{style:{color:n.accent},children:o("accent")})]}),e("span",{className:"sf-theme-body",children:o("body text")}),i("span",{className:"sf-theme-row",children:[e("span",{className:"sf-theme-btn",style:{background:r,color:R(t,n.accent)},children:o("button")}),e("span",{className:"sf-theme-mini",style:{background:n.surface,borderColor:n.line},children:o("card")})]})]})}const y={"Text color":e(B,{}),"Label color":e(P,{}),Background:e(D,{}),"Panels & cards":e(j,{}),Borders:e(z,{}),"Button color":e(A,{}),"Button text color":e(B,{})};function H({label:t,colorKey:n,value:r,onChange:c,idPrefix:a="sf-theme-ink"}){const s=`${a}-${n}`;return e(b,{label:o(t),icon:y[t],htmlFor:s,action:e(k,{id:s,label:o(t),value:r,onChange:l=>c(n,l)})})}function M({value:t,accent:n,onChange:r,idPrefix:c="sf-theme-ink"}){const a=`${c}-button`,s=/^#[0-9a-fA-F]{6}$/.test(t??""),l=s?t:n;return e(b,{label:o("Button color"),icon:y["Button color"],htmlFor:a,action:e(k,{id:a,label:o("Button color"),value:l,caption:s?l:o("Main"),onChange:r})})}function J({colors:t,accent:n,onChange:r,idPrefix:c="sf-theme-ink"}){const a=`${c}-button-ink`,s=w(t),l=R(t,n),d=S(t)??n,u=E(T(l,d)??0);return e(b,{label:o("Button text color"),icon:y["Button text color"],hint:s&&u!=="good"?o("{grade} on the button",{grade:o(I[u])}):void 0,htmlFor:a,action:e(k,{id:a,label:o("Button text color"),value:l,caption:s?l:o("Auto"),onChange:r})})}const U=[{colour:!0},{label:"Text color",key:"text"},{label:"Label color",key:"muted"},{button:!0},{buttonInk:!0},{group:"Surfaces"},{label:"Background",key:"background"},{label:"Panels & cards",key:"surface"},{label:"Borders",key:"line"}];function W({colors:t,onChange:n,idPrefix:r}){const c=g(t);return e(_,{children:U.map(a=>"colour"in a?e(O,{value:t,onChange:n},"colour"):"group"in a?e(L,{title:o(a.group)},a.group):"button"in a?e(M,{value:t.button,accent:c.accent,onChange:s=>n({...t,button:s}),idPrefix:r},"button"):"buttonInk"in a?e(J,{colors:t,accent:c.accent,onChange:s=>n({...t,buttonInk:s}),idPrefix:r},"buttonInk"):e(H,{label:a.label,colorKey:a.key,value:c[a.key],onChange:(s,l)=>n({...t,[s]:l}),idPrefix:r},a.key))})}function te({index:t,colors:n,selected:r,role:c="radio",open:a,editable:s=!0,onPick:l,onEdit:d,onChangeColors:u}){const m=g(n),h=G(t),f=t<v.length&&!n.brandInk?v[t]:null,N=E(T(m.text,m.background)??0),C=f?JSON.stringify(n)!==JSON.stringify(f):!1,x=a!==void 0;return i("div",{className:`sf-theme-card${r?" is-selected":""}`,children:[e("button",{type:"button",role:c,"aria-checked":c==="radio"?r:void 0,"aria-selected":c==="option"?r:void 0,"aria-label":h,className:"sf-theme-pick",onClick:l,children:e($,{colors:n})}),i("div",{className:"sf-theme-foot",children:[e("span",{className:"sf-theme-name",children:h}),N!=="good"&&e("span",{className:"sf-theme-warn",children:o(I[N])}),s&&d&&e(p,{variant:a?"primary":"secondary",size:"sm",className:"sf-theme-edit","aria-expanded":x?a:void 0,"aria-controls":x?`sf-theme-colours-${t}`:void 0,"aria-label":a?o("Done {name}",{name:h}):o("Edit {name}",{name:h}),onClick:d,children:a?o("Done"):o("Edit")})]}),a&&i("div",{id:`sf-theme-colours-${t}`,className:"sf-theme-colours",children:[e(W,{colors:n,onChange:F=>u?.(F)}),f&&e(p,{variant:"link",size:"sm",className:"sf-theme-reset",disabled:!C,onClick:()=>u?.({...f}),children:C?o("Reset {name} to the preset",{name:h}):o("Not changed")})]})]})}function ne({colors:t,name:n,nameId:r,open:c,menuId:a,labelId:s,buttonRef:l,onClick:d,onKeyDown:u,onEdit:m}){return i("div",{className:"sf-secttheme-btn",children:[e("button",{ref:l,type:"button",className:"sf-theme-pick","aria-expanded":c,"aria-controls":a,"aria-labelledby":`${s} ${r}`,onClick:d,onKeyDown:u,children:t?e($,{colors:t}):e("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),i("div",{className:"sf-theme-foot",children:[e("span",{id:r,className:"sf-theme-name",children:n}),m&&e(p,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":o("Edit {name}",{name:n}),onClick:m,children:o("Edit")}),e("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:d,children:e("span",{className:"sf-multi-caret",children:"▾"})})]})]})}export{te as ThemeCard,ne as ThemeCardTrigger,H as ThemeColourRow,W as ThemeColourRows,$ as ThemePreview,G as themeName};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as n,jsxs as
|
|
1
|
+
"use client";import{jsx as n,jsxs as u}from"react/jsx-runtime";import{SettingsField as m}from"efficient-easel/panel";import{AccentIcon as h}from"efficient-easel/icons";import{Tooltip as p}from"efficient-shell/ui";import{GRADE_LABEL as g,contrastRatio as c,darkerAccents as y,gradeContrast as f,normalizeThemeColors as b}from"../lib/theme.js";import{ColourControl as k}from"../lib/puck/ColourControl.js";import{say as a}from"../lib/editor-words.js";function l(r){return b(r).background}function A(r){const e=c(r.accent,l(r));return e===null?null:{ratio:e,grade:f(e)}}function C(r){const e=l(r),o=c(r.accent,e);return o===null?[]:y(r.accent).filter(s=>{const i=c(s,e);return i!==null&&i>o&&f(i)==="good"})}const T={good:"Easy to read","large-only":g["large-only"],hard:g.hard};function E({value:r,onChange:e}){const o=A(r),s=o?.grade,i=o&&o.grade!=="good"?C(r):[];return n(m,{label:a("Main color"),icon:n(h,{}),hint:o?a(T[o.grade]):void 0,action:n(k,{value:r.accent,onChange:t=>e({...r,accent:t}),label:a("Main color")}),children:i.length>0?n("div",{className:"w-full min-w-0",children:u("div",{className:"sf-readability",children:[n("p",{className:"sf-readability-advice",children:N(s,!0)}),n("div",{className:"sf-readability-suggestions",children:i.map(t=>{const d=c(t,l(r));return n(p,{content:a("Use {colour}",{colour:t.toUpperCase()}),children:u("button",{type:"button",className:"sf-readability-suggestion",onClick:()=>e({...r,accent:t}),children:[n("span",{className:"sf-readability-chip",style:{background:t},"aria-hidden":!0}),d?`${d.toFixed(1)}:1`:t.toUpperCase()]})},t)})})]})}):null})}function N(r,e){return r?r==="good"?a("This color reads clearly on your pages."):e?a("This color is hard to read on this theme's page. The buttons below are the same hue, darkened."):a("This color is hard to read on your page background. Pick one further from it — lighter if your pages are dark, deeper if they are light."):a("Pick a color to see how it reads.")}export{E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as n,jsxs as d,Fragment as k}from"react/jsx-runtime";import{useState as f}from"react";import{SettingsDefaultReset as S,SettingsField as L}from"efficient-easel/panel";import{useEaselStrings as j}from"efficient-easel/strings";import{iconOf as v,noGlyph as A}from"../lib/puck/controls.js";import{ThemeCard as B}from"./ThemeCard.js";import{ClearColoursDialog as D}from"./ClearColoursDialog.js";import{say as m}from"../lib/editor-words.js";import{BRAND_INKS as F,brandTheme as G,normalizeTheme as I,normalizeThemeColors as N,selectedThemeColors as O}from"../lib/theme.js";const P=A("the row's whole content is an action; the gutter names a subject and this row has none — the button's label is the name GG, 2026-09-23");function y(){return n("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",children:n("path",{d:"M12 5v14M5 12h14"})})}const M="Reset color",z={selected:0,themes:[]};function H(l){l(z)}function W({value:l,onChange:o}){const a=l?.themes??[],u=a.length===0,t=I(l),[p,c]=f(!1),g=j(),[b,h]=f(null),T=(e,s)=>{o({...t,themes:t.themes.map((r,_)=>_===e?s:r)})},x=O(t).accent,E=new Set(t.themes.map(e=>e.brandInk).filter(Boolean)),C=F.filter(e=>!E.has(e)).map(e=>G(x,e)),i=[...t.themes,...C],w=e=>{if(e<t.themes.length)return o({...t,selected:e});const s=[...t.themes,i[e]];o({...t,themes:s,selected:s.length-1})},R=()=>{const e=[...t.themes,{...N(t.themes[t.selected])}];o({...t,themes:e,selected:e.length-1}),h(e.length-1)};return d(k,{children:[u?null:n(L,{label:m(M),icon:v(P),labelId:"sf-theme-reset",action:n(S,{label:m("all theme colors"),words:g.panel,changed:!0,onReset:()=>c(!0)})}),p&&n(D,{count:a.length,onCancel:()=>c(!1),onConfirm:()=>{c(!1),H(o)}}),n("div",{className:"sf-theme-list",role:"radiogroup","aria-label":m("Theme"),children:i.map((e,s)=>n(B,{index:s,colors:e,selected:s===t.selected,open:b===s&&s<t.themes.length,editable:s<t.themes.length,onPick:()=>w(s),onEdit:()=>h(r=>r===s?null:s),onChangeColors:r=>T(s,r)},s))}),d("button",{type:"button",onClick:R,className:"sf-theme-add",children:[n(y,{}),m("Add new theme")]})]})}export{z as CLEARED_THEME,M as RESET_COLOUR_LABEL,H as commitClearedTheme,W as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as r}from"react/jsx-runtime";import b from"./Ticker.js";import{TICKER_JOIN_BOX_CLASS as x,tickerJoinSide as h,tickerJoinStripClass as S}from"../lib/sections/ticker-join.js";import{say as k}from"../lib/editor-words.js";const v=()=>k("item");function y({items:s,durationSec:l=50,tone:a="scrim",borders:c=!0,size:d,separator:m,scroll:p,join:f,editing:u}){const t=(s??[]).map(n=>n?.text?.trim()?n.text:u?v():"").filter(Boolean);if(t.length===0)return null;const i=a!=="plain",e=h(f),o=r("div",{className:[e?`absolute inset-x-0 ${S(e)}`:"relative z-[2]","py-3.5 max-[800px]:py-3",i?"bg-bg":"",c?"border-y border-line":""].filter(Boolean).join(" "),children:r(b,{items:t,durationSec:l,size:d,separator:m,scroll:p,backdrop:i?"themed-band":"themed-section"})});return e?r("div",{className:x,children:o}):o}export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as o,jsxs as
|
|
1
|
+
"use client";import{jsx as o,jsxs as f}from"react/jsx-runtime";import{useId as T,useMemo as I}from"react";import{useEasel as k}from"efficient-easel/easel";import{SettingsField as x,SettingsSwitch as b}from"efficient-easel/panel";import{EyeIcon as E}from"efficient-easel/icons";import{DEFAULT_TICKER_ITEMS as S}from"./HeroSection.js";import{GroupLabel as g,TextListField as w,TICKER_ITEMS_ROW as a}from"../lib/puck/controls.js";import{say as c}from"../lib/editor-words.js";const _="root:default-zone";function y({heroId:p}){const{appState:l,dispatch:m}=k(e=>e),s=l.data.content??[],r=s.findIndex(e=>e.props.id===p),t=r>=0?s[r]:null,d=t?t.props.showTicker??!0:!0,h=I(()=>{const e=t?.props.tickerItems;return Array.isArray(e)?e:S.map(u=>({text:u}))},[t]),n=T();if(!t)return o("p",{className:"sf-note",children:c("This ticker’s hero is no longer on the page.")});const i=e=>m({type:"replace",destinationZone:_,destinationIndex:r,data:{...t,props:{...t.props,...e}}});return f("div",{children:[o(g,{label:"Ticker"}),o(x,{label:c("Show ticker"),labelId:n,icon:o(E,{}),action:o(b,{checked:d,onChange:e=>i({showTicker:e}),ariaLabelledBy:n})}),o(w,{label:a.label,icon:a.icon,items:h,placeholder:"item",onChange:e=>i({tickerItems:e}),markup:!0})]})}export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as l}from"react/jsx-runtime";import{SiteLink as b}from"../lib/site-runtime.js";import{renderHeadline as v}from"./goldPhrases.js";function
|
|
1
|
+
import{jsx as t,jsxs as l}from"react/jsx-runtime";import{SiteLink as b}from"../lib/site-runtime.js";import{renderHeadline as v}from"./goldPhrases.js";import{say as w}from"../lib/editor-words.js";function y({title:n,buttons:m,padTop:x,padBottom:o,buttonsAlign:a,editing:p=!1}={}){const d=typeof x=="number"?x:140,c=typeof o=="number"?o:140,r=(m??[]).filter(e=>p||(e.label??"").trim()),i=!!(n??"").trim(),s=!i&&(a==="center"||a==="left")?a:null;return!p&&!i&&r.length===0?null:t("section",{className:"relative z-[2] bg-bg",children:l("div",{className:s==="center"?"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-1 items-center justify-items-center gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]":s==="left"?"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-1 items-center justify-items-start gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]":"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[1fr_auto] items-center gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] max-[1100px]:grid-cols-1 max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]",style:{paddingTop:d,paddingBottom:c},children:[s===null&&!i&&r.length>0&&t("div",{"aria-hidden":!0,className:"max-[1100px]:hidden"}),i&&t("h2",{className:"max-w-[1000px] font-display text-[length:min(var(--size-headingLarge,clamp(48px,7vw,108px)),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.94] tracking-[-0.035em] text-fg",children:v(n??"")}),r.length>0&&t("div",{className:"flex min-w-[280px] flex-col gap-3.5 max-[1100px]:min-w-0",children:r.map((e,f)=>{const g=(e.label??"").trim()||w("Button label"),h=e.href||"#",u=e.variant==="primary";return l(b,{href:h,className:["flex items-center justify-between gap-6 px-7 py-5","font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.3em] transition-colors",u?"border border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg":"border border-line text-fg hover:border-accent hover:text-accent"].join(" "),children:[g," ",t("span",{"aria-hidden":!0,children:"→"})]},f)})})]})})}export{y as default};
|