efficient-web-builder 21.0.0 → 22.1.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.
- package/CHANGELOG.md +196 -0
- package/dist/components/AnimatedStat.js +1 -1
- package/dist/components/Banner.js +1 -1
- package/dist/components/Cards.js +1 -1
- package/dist/components/CategoryBar.js +1 -1
- package/dist/components/ChartSection.js +1 -1
- package/dist/components/Countdown.js +1 -1
- package/dist/components/DealerFinder.d.ts +12 -0
- package/dist/components/DealerFinder.js +1 -0
- package/dist/components/DocMasthead.js +1 -1
- package/dist/components/DocMetaCards.js +1 -1
- package/dist/components/DocTabs.js +1 -1
- package/dist/components/FeaturedCover.js +1 -1
- package/dist/components/Footprint.d.ts +8 -1
- package/dist/components/Footprint.js +5 -5
- package/dist/components/HeroPoster.d.ts +2 -1
- package/dist/components/HeroPoster.js +1 -1
- package/dist/components/HeroSingle.d.ts +3 -1
- package/dist/components/HeroSingle.js +4 -4
- package/dist/components/HeroSlide.d.ts +2 -1
- package/dist/components/HeroSlide.js +1 -1
- package/dist/components/ImageBlock.d.ts +2 -1
- package/dist/components/ImageBlock.js +1 -1
- package/dist/components/KeyFeatures.js +1 -1
- package/dist/components/LocationGroupHeader.js +1 -1
- package/dist/components/Logos.js +1 -1
- package/dist/components/LongRead.js +1 -1
- package/dist/components/Manifesto.js +1 -1
- package/dist/components/Masthead.js +1 -1
- package/dist/components/MediaUploadField.d.ts +3 -1
- package/dist/components/MediaUploadField.js +1 -1
- package/dist/components/MockupSection.js +1 -1
- package/dist/components/OrderSummary.js +1 -1
- package/dist/components/PagesPanel.js +1 -1
- package/dist/components/ParagraphsA.js +1 -1
- package/dist/components/PartSettingsPanel.d.ts +2 -1
- package/dist/components/PartSettingsPanel.js +1 -1
- package/dist/components/PinnedChromeLoadNotice.d.ts +12 -2
- package/dist/components/PinnedChromeLoadNotice.js +1 -1
- package/dist/components/PostCard.js +1 -1
- package/dist/components/ProcessSteps.js +1 -1
- package/dist/components/Prose.js +1 -1
- package/dist/components/SectionEditor.js +1 -1
- package/dist/components/SectionEyebrow.js +1 -1
- package/dist/components/SectionHeader.js +1 -1
- package/dist/components/Series.js +1 -1
- package/dist/components/SiteTextStylesField.js +1 -1
- package/dist/components/Split.js +1 -1
- package/dist/components/Stats.js +1 -1
- package/dist/components/StatsParagraph.js +1 -1
- package/dist/components/Testimonials.js +1 -1
- package/dist/components/Text.js +1 -1
- package/dist/components/ThemeField.js +1 -1
- package/dist/components/Timeline.js +1 -1
- package/dist/components/TimelineTrack.js +1 -1
- package/dist/components/WebsiteScreenParts.js +1 -1
- package/dist/components/storefront-editor.css +96 -271
- package/dist/components/useLocationsTree.js +1 -1
- package/dist/components/usePinnedChromeState.d.ts +3 -0
- package/dist/components/usePinnedChromeState.js +1 -0
- package/dist/components/useWebsiteMainAction.js +1 -1
- package/dist/lib/content/phone-focus.d.ts +7 -0
- package/dist/lib/content/phone-focus.js +1 -0
- package/dist/lib/dealer-source.d.ts +34 -0
- package/dist/lib/dealer-source.js +1 -0
- package/dist/lib/editor-words-catalogue.d.ts +14 -5
- package/dist/lib/editor-words-catalogue.js +4 -4
- package/dist/lib/page-live-state.d.ts +2 -1
- package/dist/lib/page-live-state.js +1 -1
- package/dist/lib/puck/MarkupToolbar.d.ts +1 -1
- package/dist/lib/puck/MarkupToolbar.js +1 -1
- package/dist/lib/puck/blocks/general/Footprint/fields.js +1 -1
- package/dist/lib/puck/blocks/general/Footprint/render.js +2 -2
- package/dist/lib/puck/blocks/general/HeroSingle/fields.js +1 -1
- package/dist/lib/puck/blocks/general/HeroSingle/render.js +1 -1
- package/dist/lib/puck/blocks/general/HeroSlide/fields.js +1 -1
- package/dist/lib/puck/blocks/general/HeroSlide/render.js +1 -1
- package/dist/lib/puck/blocks/general/ImageBlock/fields.js +1 -1
- package/dist/lib/puck/blocks/general/ImageBlock/render.js +1 -1
- package/dist/lib/puck/blocks/general/text-part-shapes.json +2162 -0
- package/dist/lib/puck/controls.d.ts +5 -2
- package/dist/lib/puck/controls.js +1 -1
- package/dist/lib/puck/field-groups.js +1 -1
- package/dist/lib/puck/media-manifest.json +7 -2
- package/dist/lib/puck/passes/clickable-parts.js +1 -1
- package/dist/lib/puck/passes/inspector.js +1 -1
- package/dist/lib/puck/passes/section-width.js +1 -1
- package/dist/lib/puck/passes/types.d.ts +3 -1
- package/dist/lib/puck/registry.d.ts +1 -1
- package/dist/lib/puck/registry.js +1 -1
- package/dist/lib/puck/render-registry.d.ts +3 -0
- package/dist/lib/puck/render-registry.js +1 -0
- package/dist/lib/puck/source-bound-parts.d.ts +2 -0
- package/dist/lib/puck/source-bound-parts.js +1 -1
- package/dist/lib/puck/text-part-shape.d.ts +18 -0
- package/dist/lib/puck/text-part-shape.js +2 -0
- package/dist/lib/sections/collection-card-text-regions.d.ts +9 -1
- package/dist/lib/sections/collection-card-text-regions.js +1 -1
- package/dist/lib/sections/text-regions.d.ts +1 -0
- package/dist/lib/sections/text-regions.js +1 -1
- package/dist/lib/site-text-styles.d.ts +1 -0
- package/dist/lib/site-text-styles.js +2 -2
- package/dist/lib/source-rules/heading-ceiling-sweep.js +3 -3
- package/dist/lib/source-rules/part-style-naming.js +2 -2
- package/dist/lib/source-rules/rule.d.ts +1 -0
- package/dist/lib/source-rules/rule.js +3 -1
- package/dist/lib/source-rules/size-token-paints.js +4 -4
- package/dist/lib/source-rules/style-face-matches-size.js +3 -3
- package/dist/lib/source-rules/support/registry-source.d.ts +1 -1
- package/dist/lib/source-rules/support/registry-source.js +3 -3
- package/package.json +9 -6
- package/dist/components/ImageFocusRow.d.ts +0 -7
- package/dist/components/ImageFocusRow.js +0 -1
- package/dist/components/TemplateGlyph.d.ts +0 -6
- package/dist/components/TemplateGlyph.js +0 -1
- package/dist/components/TextStyleRow.d.ts +0 -13
- package/dist/components/TextStyleRow.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useSyncExternalStore as
|
|
1
|
+
import{useSyncExternalStore as l}from"react";import{say as n}from"./editor-words.js";const r=new Map,s=new Set;function i(e,t){if(!(r.has(e)&&r.get(e)===t)){r.set(e,t);for(const o of s)o()}}function h(e,t){i(e,t)}function p(e,t){const o=r.get(e);i(e,t??(o==="live"?"changed":o))}function d(e,t){i(e,t??"live")}function y(e){return r.get(e)}function f(e){return s.add(e),()=>{s.delete(e)}}function b(e){const t=()=>e?r.get(e):void 0;return l(f,t,t)}function x(e,t){return e==="live"&&t?"changed":e}function P({live:e,onPress:t,busy:o=!1,pinnedUnpublished:u=!1}){const a=e==="live"&&!u,c=e==="changed"?n("Changes not live yet"):e==="never"?n("Never published"):u?n("Header and footer not live yet"):e==="live"?n("Everything is live"):null;return{label:n("Publish"),tooltip:e==="never"?n("Put this page on your site"):n("Put your changes on your site"),status:c,quiet:a?{label:n("Published"),reason:n("Everything is live")}:null,onPress:t,busy:o}}export{x as effectiveLive,P as mainActionFor,h as noteLoaded,d as notePublished,p as noteSaved,y as pageLiveState,b as usePageLiveState};
|
|
@@ -2,7 +2,7 @@ import { type RefObject } from "react";
|
|
|
2
2
|
import { type SelectionSource } from "efficient-easel/copy";
|
|
3
3
|
import { type MarkStyle } from "../markup.js";
|
|
4
4
|
export type Selectable = SelectionSource;
|
|
5
|
-
export declare function markSelection(value: string, style: MarkStyle, el: Selectable): import("efficient-
|
|
5
|
+
export declare function markSelection(value: string, style: MarkStyle, el: Selectable): import("efficient-shell/markup").WrapResult;
|
|
6
6
|
export declare function MarkupToolbar({ target, value, onChange, disabled, label, }: {
|
|
7
7
|
target: RefObject<HTMLInputElement | HTMLTextAreaElement | null>;
|
|
8
8
|
value: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import{useEffect as E,useState as T}from"react";import{markSelection as x,useCaretEdit as y}from"efficient-easel/copy";import{RevertIcon as M}from"efficient-easel/icons";import{IconButton as b,TextToolbar as v,Tooltip as L}from"efficient-shell/ui";import{say as u}from"../editor-words.js";import{applyShopMark as C,shopMarkedAt as D,shopMarkupTools as I,stripMarkup as g}from"../markup.js";const S="Clear formatting";function j(t,n,o){return x(t,n,o,C)}function z(t){const[n,o]=T(null);return E(()=>{const r=t.current?.ownerDocument??(typeof document>"u"?null:document);if(!r)return;const i=()=>{const s=t.current;if(!s||r.activeElement!==s)return;const c=s.selectionStart??s.value.length,m=s.selectionEnd??c;o(a=>a&&a.start===c&&a.end===m?a:{start:c,end:m})};return r.addEventListener("selectionchange",i),()=>r.removeEventListener("selectionchange",i)},[t]),[n,o]}function A({target:t,value:n,onChange:o,disabled:r=!1,label:i="Formatting"}){const s=y({target:t,onChange:o}),[c,m]=z(t),a=e=>s(h=>{const p=j(n,e,h);return m({start:p.selectionStart,end:p.selectionEnd}),p}),d=I(),f={};if(c)for(const e of d)f[e.style]=D(n,c.start,c.end,e.style);const k=g(n);return l(v,{offered:new Set(d.map(e=>e.style)),onMark:e=>a(e),pressed:f,disabled:r,"aria-label":u(i),className:"sf-markup-bar",last:l("span",{className:"sf-markup-clear",children:l(L,{content:u(S),children:l(b,{size:"sm",onMouseDown:e=>e.preventDefault(),onClick:()=>o(k),disabled:r||k===n,"aria-label":u(S),children:l(M,{size:14})})})})})}var w=A;export{A as MarkupToolbar,w as default,j as markSelection};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{FOOTPRINT_DEFAULTS as g}from"../../../../content/footprint.js";import{HeadquartersIcon as S,LayoutIcon as T,LocationIcon as b,SearchIcon as F,StoreIcon as I,ThemeIcon as L}from"efficient-easel/icons";import{CoordsField as v,copyText as _,group as i,plainText as s,section as w,segmented as c,sourceField as D,text as d,textarea as u,toggle as p}from"../../../controls.js";import{withShowWhen as t}from"../../../show-when.js";import{needsGeocodeWork as P,resolveGeocodeRows as R}from"../../../geocode-resolve.js";import{SPLITTABLE_SECTIONS as E,headFieldsForPlacement as O,widthFieldsForParent as x}from"../../../../sections/section-head-placement.js";import{innerSpacingFields as C,WIDTH_ROW_KEYS as H}from"../../shared-fields.js";import{FOOTPRINT_PH as f}from"./render.js";const A={field:"source",is:"typed",default:"typed"},l={field:"source",is:"dealers",default:"typed"},m={all:[l,{field:"search",is:!0,default:!1}]},K={fields:{_gContent:i("Section"),sectionNumber:d("Section number",f.sectionNumber),heading:u("Heading",f.heading),tagline:u("Body",f.tagline),_gOffices:i("Offices"),source:c("Source",o(I,{}),[{label:"Typed in",value:"typed"},{label:"Dealers",value:"dealers"}],"typed"),offices:t({type:"array",label:"Offices",arrayFields:{role:s("Role"),city:s("City"),country:s("Region · country"),address:_("Address"),group:s("Group"),hq:p("HQ",!1,o(S,{})),geocode:D(v,{label:"Coordinates"})},defaultItemProps:{role:"Sales & Distribution",city:"City",country:"Country",address:"",group:"",hq:!1,lat:0,lng:0},getItemSummary:e=>e?.city||"Office"},A),mapTheme:c("Map theme",o(L,{}),[{label:"Auto",value:"auto"},{label:"Dark",value:"dark"},{label:"Light",value:"light"}],g.mapTheme),_gSearch:i("Search"),search:t(p("Show",!1,o(F,{})),l),searchHint:t(d("Hint","Type a postcode or address"),m),noMatchText:t(d("No match","No place found. Try another postcode."),m),_gList:i("List"),listPosition:t(c("Position",o(T,{}),[{label:"Left",value:"left"},{label:"Right",value:"right"},{label:"Below",value:"below"}],"below"),l),showDistance:t(p("Distance",!0,o(b,{})),l),_dLayout:w("Layout"),...C("Footprint")},resolveData:async e=>{const r=e.props,a=r.offices??[];if(!P(a))return e;const h=await R(a,n=>[n.address,n.city,n.country].map(y=>String(y??"").replace(/\*/g,"").trim()).filter(Boolean).join(", "));return{...e,props:{...r,offices:h}}},resolveFields:(e,{fields:r,parent:a})=>O(x(r,a,H),e.props.headPlacement,E.Footprint.headRows)};export{K as FootprintFields};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
2
|
-
*${o.accent}*`,tagline:o.body},
|
|
1
|
+
import{jsx as s}from"react/jsx-runtime";import h from"../../../../../components/Footprint.js";import{FOOTPRINT_DEFAULTS as a}from"../../../../content/footprint.js";import{parseDealerListPosition as f,parseFootprintSource as u}from"../../../../dealer-source.js";import{hidableText as i}from"../../../hidable.js";import{parseSectionHeadPlacement as l}from"../../../../sections/section-head-placement.js";import{PH as o}from"../../placeholders.js";import{phRows as T,phHide as m}from"../../scaffold.js";import{say as t}from"../../../../editor-words.js";const r={sectionNumber:o.sectionNumber,heading:`${o.heading}
|
|
2
|
+
*${o.accent}*`,tagline:o.body},y=()=>[{role:t("Headquarters"),city:t("City"),country:t("Country"),address:t("Street address"),lat:0,lng:0,hq:!0},{role:t("Office"),city:t("City"),country:t("Country"),address:t("Street address"),lat:0,lng:0,hq:!1}],I={label:"Locations Map",defaultProps:{sectionNumber:"",heading:"",tagline:"",offices:[],apiKey:a.apiKey,mapId:a.mapId,mapTheme:a.mapTheme,padTop:120,padBottom:120,source:"typed",search:!1,searchHint:"",noMatchText:"",listPosition:"below",showDistance:!0},render:e=>{const n=l(e.headPlacement)==="own-box",c=d=>n?void 0:d;return s(h,{sectionNumber:c(m(e.sectionNumber,r.sectionNumber,e.puck)),heading:c(m(e.heading,r.heading,e.puck)),tagline:c(m(e.tagline,r.tagline,e.puck)),omitHead:n,offices:T(e.offices,y(),e.puck),apiKey:i(e.apiKey),mapId:i(e.mapId),mapTheme:e.mapTheme??a.mapTheme,padTop:n?0:typeof e.padTop=="number"?e.padTop:120,padBottom:typeof e.padBottom=="number"?e.padBottom:120,editing:e.puck?.isEditing,source:u(e.source),search:e.search===!0,searchHint:i(e.searchHint),noMatchText:i(e.noMatchText),listPosition:f(e.listPosition),showDistance:e.showDistance!==!1})}};export{r as FOOTPRINT_PH,I as FootprintRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{ImageIcon as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{ImageIcon as O,ImagesIcon as n,MediaIcon as _,MediaLayoutSideBySideIcon as E,MediaLayoutStackedIcon as P,OpacityIcon as m,PlacementIcon as S,PlayIcon as A,UploadIcon as F}from"efficient-easel/icons";import{colorInput as d,edgePad as T,focusKeptField as i,group as a,MEDIA_TYPE_OPTIONS as b,phoneChoiceField as h,plainText as f,segmented as t,slider as c,upload as l}from"../../../controls.js";import{MEDIA_LAYOUT_DEFAULT as D,MEDIA_LAYOUT_LABELS as g,MEDIA_LAYOUTS as p,resolvePhoneLayout as U}from"../../../../hero-media-layout.js";import{deviceNote as v}from"../../../device-fields.js";import{DEFAULT_OVERLAY_COLOR as C,DEFAULT_OVERLAY_POSITION as V,OVERLAY_POSITION_OPTIONS as k}from"../../../../sections/hero-overlay.js";import{heightField as y,slotNoticeField as M}from"../../shared-fields.js";import{forMediaType as s,heroMediaFields as Y,VIDEO_FILE_LABEL as B,VIDEO_FILE_PROMPT as x}from"../../../hero-media-parts.js";import{VIDEO_PLAYBACK_DEFAULT as N,VIDEO_PLAYBACK_LABELS as R,VIDEO_PLAYBACKS as K,VIDEO_SOURCE_DEFAULT as r,VIDEO_SOURCE_LABELS as w,VIDEO_SOURCES as H}from"../../../../hero-video.js";const u=s("video","image"),I=s("image","image"),L={one:o(O,{}),side:o(E,{}),stacked:o(P,{})};import{HeroSingleSlots as j}from"./render.js";const oe={fields:Y({_dDevice:v(),boxNotice:M("HeroSingle"),boxes:j.boxes,_gStyle:a("Style"),overlay:c("Overlay",o(m,{}),0,100,5,100,"%"),overlayColor:d("Overlay color",C),overlayPosition:T("Overlay position",k,V,"A corner would need a diagonal ramp, which this overlay does not draw.",o(S,{})),_gLayout:a("Layout"),heightDesktop:y("desktop"),heightMobile:y("mobile"),_gMedia:a("Media"),mediaType:t("Type",o(_,{}),b,"image"),mediaLayout:t("Layout",o(n,{}),p.map(e=>({label:g[e],value:e,picture:L[e]})),D),mediaLayoutPhone:h({label:"Layout",icon:o(n,{}),options:p.map(e=>({label:g[e],value:e,picture:L[e]})),desktopKey:"mediaLayout",resolve:U}),mediaImage:l("Background image","image/*","Upload a background image",{focus:"imageFocal"}),imageFocal:i(),imageFocalPhone:i(),videoSource:t("Source",o(F,{}),H.map(e=>({label:w[e],value:e})),r),mediaVideo:l(B,"video/*",x),youtubeUrl:f("YouTube link","https://youtu.be/…"),videoPlayback:t("Playback",o(A,{}),K.map(e=>({label:R[e],value:e})),N),poster:l("Video poster","image/*","Upload a poster still"),_gTint:a("Image tint"),tintColor:d("Tint color","#000000"),tintOpacity:c("Tint opacity",o(m,{}),0,100,5,0,"%"),mediaImage2:l("Background image","image/*","Upload a background image",{focus:"imageFocal2"}),imageFocal2:i(),imageFocal2Phone:i(),tintColor2:d("Tint color","#000000"),tintOpacity2:c("Tint opacity",o(m,{}),0,100,5,0,"%")},{parts:{media:["mediaType","mediaLayout","mediaLayoutPhone","videoSource","mediaVideo","youtubeUrl","videoPlayback","poster"],image:["mediaImage","imageFocal","imageFocalPhone","tintColor","tintOpacity"],image2:["mediaImage2","imageFocal2","imageFocal2Phone","tintColor2","tintOpacity2"]},onlyFor:{image:["mediaImage","imageFocal","imageFocalPhone","_gTint","tintColor","tintOpacity","mediaImage2","imageFocal2","imageFocal2Phone","tintColor2","tintOpacity2"],video:["videoSource","videoPlayback","poster"]},rules:{mediaVideo:{all:[u,{field:"videoSource",is:"upload",default:r}]},youtubeUrl:{all:[u,{field:"videoSource",is:"youtube",default:r}]},mediaLayout:{all:[I,{not:{context:"device",is:"mobile"}}]},mediaLayoutPhone:{all:[I,{context:"device",is:"mobile"}]}},fallback:"image"})};export{oe as HeroSingleFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as x}from"react/jsx-runtime";import A from"../../../../../components/HeroSingle.js";import{FOCAL_DEFAULT as E}from"efficient-shell/format";import{DEFAULT_OVERLAY_COLOR as _,DEFAULT_OVERLAY_POSITION as h}from"../../../../sections/hero-overlay.js";const H={boxes:{type:"slot",allow:["HeroGroup"]}},I={label:"Hero",fields:H,defaultProps:{mediaType:"image",imageFocal:E,tintColor:"#000000",tintOpacity:0,overlay:100,overlayColor:_,overlayPosition:h},render:({mediaType:o,mediaImage:t,mediaVideo:n,poster:r,imageFocal:d,tintColor:l,tintOpacity:a,overlay:s,overlayColor:f,overlayPosition:m,heightDesktop:u,heightMobile:g,boxes:p,videoSource:y,youtubeUrl:c,videoPlayback:b,mediaLayout:O,mediaLayoutPhone:P,mediaImage2:L,imageFocal2:v,imageFocalPhone:e,imageFocal2Phone:i,tintColor2:C,tintOpacity2:S,puck:j})=>x(A,{mediaType:o,videoSource:y,youtubeUrl:c,videoPlayback:b,mediaLayout:O,mediaLayoutPhone:P,mediaImage2:L||void 0,objectPosition2:v||void 0,objectPosition2Phone:typeof i=="string"?i:void 0,tintColor2:C,tintOpacity2:S,mediaSrc:(o==="image"?t:n)||void 0,poster:r||void 0,objectPosition:o==="image"&&d||void 0,objectPositionPhone:o==="image"&&typeof e=="string"?e:void 0,tintColor:l,tintOpacity:o==="image"?a:0,overlay:s,overlayColor:f,overlayPosition:m,heightDesktop:u,heightMobile:g,boxes:p,editing:j?.isEditing})};export{I as HeroSingleRender,H as HeroSingleSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{MediaIcon as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{MediaIcon as r,OpacityIcon as d,PlayIcon as m}from"efficient-easel/icons";import{colorInput as p,focusKeptField as a,group as o,MEDIA_TYPE_OPTIONS as n,plainText as g,segmented as s,slider as l,text as c,upload as i,withIdentifier as I,withPanelOnly as t}from"../../../controls.js";import{PH as f}from"../../placeholders.js";import{slotNoticeField as F}from"../../shared-fields.js";import{heroMediaFields as _,VIDEO_FILE_LABEL as u,VIDEO_FILE_PROMPT as y}from"../../../hero-media-parts.js";import{HeroSlideSlots as P}from"./render.js";const h={fields:_({_gContent:o("Content"),name:t(I(g("Slide name",f.slideName))),process:t(c("Reel label","Label")),groupNotice:F("HeroSlide"),groups:P.groups,_gMedia:o("Media"),mediaType:s("Type",e(r,{}),n,"video"),mediaVideo:i(u,"video/*",y),videoSpeed:l("Playback speed",e(m,{}),25,100,5,100,"%"),mediaImage:i("Background image","image/*","Upload a background image",{focus:"imageFocal"}),imageFocal:a(),imageFocalPhone:a(),poster:i("Video poster","image/*","Upload a poster still"),_gTint:o("Image tint"),tintColor:p("Tint color","#000000"),overlay:l("Overlay",e(d,{}),0,100,5,0,"%")},{onlyFor:{image:["mediaImage","imageFocal","imageFocalPhone","_gTint","tintColor","overlay"],video:["mediaVideo","videoSpeed","poster"]},fallback:"video"})};export{h as HeroSlideFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as S}from"react/jsx-runtime";import H from"../../../../../components/HeroSlide.js";import{FOCAL_DEFAULT as b}from"efficient-shell/format";import{nestedAccentValue as h,sectionThemeWrap as y}from"../../../../content/section-surface.js";import{phHide as A}from"../../scaffold.js";const j={groups:{type:"slot",allow:["HeroGroup"]}},E={label:"Hero Slide",fields:j,defaultProps:{mediaType:"video",videoSpeed:100,imageFocal:b,tintColor:"#000000",overlay:0},render:({name:d,process:s,mediaType:e,mediaVideo:l,mediaImage:m,poster:a,mediaSrc:c,videoSpeed:o,imageFocal:p,imageFocalPhone:t,tintColor:f,overlay:u,groups:g,puck:i,...n})=>{const r=y({...n,sectionAccent:h(n.sectionAccent)});return S(H,{themeClassName:r?.className,themeStyle:r?.style,name:d||void 0,process:A(s,"Label",i),mediaType:e,mediaSrc:(e==="image"?m:l||c)||void 0,videoSpeed:typeof o=="number"?o:void 0,poster:a||void 0,objectPosition:e==="image"&&p||void 0,objectPositionPhone:e==="image"&&typeof t=="string"?t:void 0,tintColor:f,tintOpacity:e==="image"?u:0,groups:g,editing:i?.isEditing})}};export{E as HeroSlideRender,j as HeroSlideSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{IMAGE_FIT_ROW_LABEL as t,imageFitOptions as i,imageIsCropped as r,parseImageFit as s}from"../../../../content/image-fit.js";import{ImageIcon as c}from"efficient-easel/icons";import{focusKeptField as a,group as e,imageCornersField as p,linkField as m,plainText as g,cornerSidesField as n,select as f,upload as u,withPanelOnly as d}from"../../../controls.js";import{photographyToggle as I}from"../../shared-fields.js";const y={fields:{_gImage:e("Image"),src:u("Image","image/*",void 0,{focus:"focal",focusWhen:l=>r(l.aspect,s(l.fit,"cover"))}),alt:d(g("Alt text")),aspect:{type:"select",label:"Aspect ratio",options:[{label:"Auto",value:"auto"},{label:"21 : 9",value:"21/9"},{label:"16 : 9",value:"16/9"},{label:"4 : 3",value:"4/3"},{label:"1 : 1",value:"1/1"}]},fit:f(t,o(c,{}),i(),"cover"),focal:a(),focalPhone:a(),href:m("Link"),_gStyle:e("Style"),grayscale:I(),_gShape:e("Shape"),corners:p(),cornerSides:n()}};export{y as ImageBlockFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as m}from"react/jsx-runtime";import p from"../../../../../components/ImageBlock.js";const I={label:"Image",defaultProps:{src:"",alt:"",aspect:"16/9",contained:!1},render:({src:r,alt:a,aspect:o,contained:t,grayscale:s,href:c,width:n,fit:l,focal:d,focalPhone:e,corners:f,cornerSides:i})=>m(p,{src:r,alt:a,aspect:o,contained:t,grayscale:s,href:c,width:n,fit:l,focal:d,focalPhone:typeof e=="string"?e:void 0,corners:f,cornerSides:i})};export{I as ImageBlockRender};
|