efficient-web-builder 30.1.2 → 31.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 +28 -0
- package/dist/editor/components/ApplyCornersToSiblings.js +1 -1
- package/dist/editor/components/BlogPostSource.js +1 -1
- package/dist/editor/components/DuplicateToPageMenu.js +1 -1
- package/dist/editor/components/LocationsGroupedField.js +1 -1
- package/dist/editor/components/MediaUploadField.js +1 -1
- package/dist/editor/components/PagesPanel.js +1 -1
- package/dist/editor/components/PartSettingsPanel.js +1 -1
- package/dist/editor/components/SectionEditor.d.ts +3 -3
- package/dist/editor/components/SectionEditor.js +1 -1
- package/dist/editor/components/SectionThemePicker.js +1 -1
- package/dist/editor/components/SectionThumbnail.js +1 -1
- package/dist/editor/components/SiteEditorProvider.d.ts +1 -1
- package/dist/editor/components/SiteEditorProvider.js +1 -1
- package/dist/editor/components/SlotChildRows.d.ts +1 -1
- package/dist/editor/components/SlotChildRows.js +1 -1
- package/dist/editor/components/StandaloneSectionEditor.js +1 -1
- package/dist/editor/components/StorefrontEditor.d.ts +1 -1
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/components/StorefrontLinkField.js +1 -1
- package/dist/editor/components/StylesPanel.js +1 -1
- package/dist/editor/components/SwitchToBoxFooter.js +1 -1
- package/dist/editor/components/TemplateFieldRow.js +1 -1
- package/dist/editor/components/WebsiteScreenParts.d.ts +1 -1
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
- package/dist/editor/components/useLocationsTree.d.ts +1 -1
- package/dist/editor/components/usePinnedChromeSeed.d.ts +1 -1
- package/dist/editor/components/usePinnedChromeSeed.js +1 -1
- package/dist/editor/components/usePinnedChromeState.js +1 -1
- package/dist/editor/components/useSocialSettings.js +1 -1
- package/dist/editor/components/useWebsiteMainAction.d.ts +1 -1
- package/dist/editor/components/useWebsiteMainAction.js +1 -1
- package/dist/editor/lib/editor-blocks.d.ts +1 -1
- package/dist/editor/lib/editor-blocks.js +1 -1
- package/dist/editor/lib/editor-document-adapter.d.ts +1 -1
- package/dist/editor/lib/editor-document-adapter.js +1 -1
- package/dist/editor/lib/geocode.js +1 -1
- package/dist/editor/lib/page-live-state.d.ts +1 -1
- package/dist/editor/lib/page-rows.js +1 -1
- package/dist/editor/lib/puck/add-palette.d.ts +2 -2
- package/dist/editor/lib/puck/add-palette.js +1 -1
- package/dist/editor/lib/puck/add-target.d.ts +2 -2
- package/dist/editor/lib/puck/block-offer.d.ts +1 -1
- package/dist/editor/lib/puck/block-offer.js +1 -1
- package/dist/editor/lib/puck/blocks/general/ButtonBlock/fields.js +1 -1
- package/dist/editor/lib/puck/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/puck/blocks/general/Hero/fields.js +1 -1
- package/dist/editor/lib/puck/blocks/general/HeroSingle/fields.js +1 -1
- package/dist/editor/lib/puck/blocks/general/IntroBleed/fields.js +1 -1
- package/dist/editor/lib/puck/blocks/shared-fields.js +1 -1
- package/dist/editor/lib/puck/controls.js +1 -1
- package/dist/editor/lib/puck/field-groups.d.ts +1 -1
- package/dist/editor/lib/puck/field-groups.js +1 -1
- package/dist/editor/lib/puck/footer-blocks.d.ts +2 -2
- package/dist/editor/lib/puck/footer-blocks.js +1 -1
- package/dist/editor/lib/puck/overrides.js +1 -1
- package/dist/editor/lib/puck/panel-drop-empty-headings.js +1 -1
- package/dist/editor/lib/puck/pinned-seed-gate.d.ts +2 -2
- package/dist/editor/lib/puck/pinned-seed-gate.js +1 -1
- package/dist/editor/lib/puck/section-text-suppress.js +1 -1
- package/dist/editor/lib/puck/section-width-fields.js +1 -1
- package/dist/editor/lib/sections/new-section-node.d.ts +1 -1
- package/dist/editor/lib/source-rules/part-slider-fills-row.js +1 -1
- package/dist/editor/lib/theme-row-persist.d.ts +1 -1
- package/dist/editor/lib/theme-row-persist.js +1 -1
- package/dist/editor/lib/use-host-products.d.ts +1 -1
- package/dist/editor/lib/use-host-products.js +1 -1
- package/dist/editor/lib/web-backend.d.ts +5 -5
- package/dist/editor/lib/web-backend.js +1 -1
- package/dist/editor/lib/website-document-addressing.d.ts +1 -1
- package/dist/editor/lib/website-session.d.ts +1 -1
- package/dist/editor/lib/website-session.js +1 -1
- package/dist/format/lib/content/section-width.js +1 -1
- package/dist/format/lib/editor-form-window.d.ts +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +0 -1
- package/dist/format/lib/editor-words-catalogue.js +1 -1
- package/dist/format/lib/links/link-picker-setup.d.ts +1 -1
- package/dist/format/lib/puck/neutralization-contracts.js +1 -1
- package/dist/format/lib/puck/passes/settings-groups.js +1 -1
- package/dist/format/lib/puck/section-catalog.js +1 -1
- package/dist/render/lib/editor-auth.js +1 -1
- package/dist/render/lib/editor-session-loader.js +1 -1
- package/dist/render/lib/editor-site.js +1 -1
- package/dist/render/lib/logo/analyze-logo-client.js +1 -1
- package/dist/render/lib/media.js +1 -1
- package/dist/render/lib/puck/passes/section-width.js +1 -1
- package/dist/render/lib/puck/slot-specs.d.ts +2 -2
- package/package.json +1 -1
- package/dist/editor/components/AddBlockRow.d.ts +0 -1
- package/dist/editor/components/AddBlockRow.js +0 -1
- package/dist/editor/components/AddChildRow.d.ts +0 -1
- package/dist/editor/components/AddChildRow.js +0 -1
- package/dist/editor/components/AddSidePanel.d.ts +0 -2
- package/dist/editor/components/AddSidePanel.js +0 -1
- package/dist/editor/components/EditorScreenMount.d.ts +0 -1
- package/dist/editor/components/EditorScreenMount.js +0 -1
- package/dist/editor/components/EditorStoreProvider.d.ts +0 -1
- package/dist/editor/components/EditorStoreProvider.js +0 -1
- package/dist/editor/components/MediaSidePanel.d.ts +0 -1
- package/dist/editor/components/MediaSidePanel.js +0 -1
- package/dist/editor/components/NodeContextMenu.d.ts +0 -2
- package/dist/editor/components/NodeContextMenu.js +0 -1
- package/dist/editor/components/PageEditGuardNotices.d.ts +0 -1
- package/dist/editor/components/PageEditGuardNotices.js +0 -1
- package/dist/editor/components/PanelToggleIcon.d.ts +0 -1
- package/dist/editor/components/PanelToggleIcon.js +0 -1
- package/dist/editor/components/PreviewPartsContext.d.ts +0 -1
- package/dist/editor/components/PreviewPartsContext.js +0 -1
- package/dist/editor/components/SectionEditorShell.d.ts +0 -1
- package/dist/editor/components/SectionEditorShell.js +0 -1
- package/dist/editor/components/SidePanelHead.d.ts +0 -1
- package/dist/editor/components/SidePanelHead.js +0 -1
- package/dist/editor/components/SlotChildActionsContext.d.ts +0 -2
- package/dist/editor/components/SlotChildActionsContext.js +0 -1
- package/dist/editor/components/StorefrontDocumentContext.d.ts +0 -2
- package/dist/editor/components/StorefrontDocumentContext.js +0 -1
- package/dist/editor/components/StorefrontEditorChrome.d.ts +0 -1
- package/dist/editor/components/StorefrontEditorChrome.js +0 -1
- package/dist/editor/components/panel-widths.d.ts +0 -2
- package/dist/editor/components/panel-widths.js +0 -1
- package/dist/editor/components/usePartBridge.d.ts +0 -1
- package/dist/editor/components/usePartBridge.js +0 -1
- package/dist/editor/lib/client-only.d.ts +0 -1
- package/dist/editor/lib/client-only.js +0 -1
- package/dist/editor/lib/editor-admin-bridge.d.ts +0 -2
- package/dist/editor/lib/editor-admin-bridge.js +0 -1
- package/dist/editor/lib/editor-backend-error.d.ts +0 -2
- package/dist/editor/lib/editor-backend-error.js +0 -1
- package/dist/editor/lib/editor-chrome.d.ts +0 -2
- package/dist/editor/lib/editor-chrome.js +0 -1
- package/dist/editor/lib/editor-document-addressing.d.ts +0 -2
- package/dist/editor/lib/editor-document-addressing.js +0 -1
- package/dist/editor/lib/editor-document-switch.d.ts +0 -2
- package/dist/editor/lib/editor-document-switch.js +0 -1
- package/dist/editor/lib/editor-failure.d.ts +0 -1
- package/dist/editor/lib/editor-failure.js +0 -1
- package/dist/editor/lib/editor-host-inbound.d.ts +0 -1
- package/dist/editor/lib/editor-host-inbound.js +0 -1
- package/dist/editor/lib/editor-host.d.ts +0 -2
- package/dist/editor/lib/editor-host.js +0 -1
- package/dist/editor/lib/editor-key-scope.d.ts +0 -1
- package/dist/editor/lib/editor-key-scope.js +0 -1
- package/dist/editor/lib/editor-load-error.d.ts +0 -1
- package/dist/editor/lib/editor-load-error.js +0 -1
- package/dist/editor/lib/editor-media-panel.d.ts +0 -2
- package/dist/editor/lib/editor-media-panel.js +0 -1
- package/dist/editor/lib/editor-media-picker.d.ts +0 -2
- package/dist/editor/lib/editor-media-picker.js +0 -1
- package/dist/editor/lib/editor-page-lock.d.ts +0 -1
- package/dist/editor/lib/editor-page-lock.js +0 -1
- package/dist/editor/lib/editor-screen.d.ts +0 -2
- package/dist/editor/lib/editor-screen.js +0 -1
- package/dist/editor/lib/editor-section-templates.d.ts +0 -1
- package/dist/editor/lib/editor-section-templates.js +0 -1
- package/dist/editor/lib/editor-session-context.d.ts +0 -1
- package/dist/editor/lib/editor-session-context.js +0 -1
- package/dist/editor/lib/editor-theme.d.ts +0 -1
- package/dist/editor/lib/editor-theme.js +0 -1
- package/dist/editor/lib/puck/block-choice.d.ts +0 -2
- package/dist/editor/lib/puck/block-choice.js +0 -1
- package/dist/editor/lib/puck/block-types-in.d.ts +0 -1
- package/dist/editor/lib/puck/block-types-in.js +0 -1
- package/dist/editor/lib/puck/device-fields.d.ts +0 -2
- package/dist/editor/lib/puck/device-fields.js +0 -1
- package/dist/editor/lib/puck/field-buckets.d.ts +0 -2
- package/dist/editor/lib/puck/field-buckets.js +0 -1
- package/dist/editor/lib/puck/field-markers.d.ts +0 -2
- package/dist/editor/lib/puck/field-markers.js +0 -1
- package/dist/editor/lib/puck/palette-sections.d.ts +0 -2
- package/dist/editor/lib/puck/palette-sections.js +0 -1
- package/dist/editor/lib/puck/panel-fields.d.ts +0 -2
- package/dist/editor/lib/puck/panel-fields.js +0 -1
- package/dist/editor/lib/puck/panel-no-control-mark.d.ts +0 -2
- package/dist/editor/lib/puck/panel-no-control-mark.js +0 -1
- package/dist/editor/lib/puck/preview-click.d.ts +0 -1
- package/dist/editor/lib/puck/preview-click.js +0 -1
- package/dist/editor/lib/puck/preview-dom.d.ts +0 -1
- package/dist/editor/lib/puck/preview-dom.js +0 -1
- package/dist/editor/lib/puck/section-doc.d.ts +0 -1
- package/dist/editor/lib/puck/section-doc.js +0 -1
- package/dist/editor/lib/puck/slot-heal.d.ts +0 -1
- package/dist/editor/lib/puck/slot-heal.js +0 -1
- package/dist/editor/lib/puck/style-clipboard.d.ts +0 -1
- package/dist/editor/lib/puck/style-clipboard.js +0 -1
- package/dist/editor/lib/puck/tree-reveal.d.ts +0 -1
- package/dist/editor/lib/puck/tree-reveal.js +0 -1
- package/dist/editor/lib/puck/use-section-ops.d.ts +0 -2
- package/dist/editor/lib/puck/use-section-ops.js +0 -1
- package/dist/format/lib/editor-document-contract.d.ts +0 -1
- package/dist/format/lib/editor-document-contract.js +0 -0
- package/dist/format/lib/editor-document-hooks.d.ts +0 -1
- package/dist/format/lib/editor-document-hooks.js +0 -0
- package/dist/format/lib/links/link-filters.d.ts +0 -1
- package/dist/format/lib/links/link-filters.js +0 -0
- package/dist/format/lib/puck/add-target-types.d.ts +0 -1
- package/dist/format/lib/puck/add-target-types.js +0 -0
- package/dist/format/lib/puck/slot-section-spec.d.ts +0 -1
- package/dist/format/lib/puck/slot-section-spec.js +0 -0
- package/dist/format/lib/section-template-types.d.ts +0 -1
- package/dist/format/lib/section-template-types.js +0 -0
- package/dist/render/components/PreviewDeviceContext.d.ts +0 -2
- package/dist/render/components/PreviewDeviceContext.js +0 -1
- package/dist/render/components/UiIcon.d.ts +0 -2
- package/dist/render/components/UiIcon.js +0 -1
- package/dist/render/lib/content/view-tiers.d.ts +0 -2
- package/dist/render/lib/content/view-tiers.js +0 -1
- package/dist/render/lib/editor-session.d.ts +0 -2
- package/dist/render/lib/editor-session.js +0 -1
- package/dist/render/lib/puck/content-tree.d.ts +0 -2
- package/dist/render/lib/puck/content-tree.js +0 -1
- package/dist/render/lib/puck/hidable.d.ts +0 -2
- package/dist/render/lib/puck/hidable.js +0 -1
- package/dist/render/lib/puck/slot-child-name.d.ts +0 -2
- package/dist/render/lib/puck/slot-child-name.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as n,jsxs as _,Fragment as w}from"react/jsx-runtime";import{useEasel as N}from"efficient-easel/easel";import{useState as R}from"react";import k from"./ThemeField.js";import L from"./CornersField.js";import O from"./CardShadowField.js";import G from"./ShadowColourField.js";import v from"./BlockGapField.js";import z from"./HoverEffectField.js";import Y from"./PhotographyField.js";import j from"./ShareButtonField.js";import U from"./SideSpaceField.js";import{BackgroundWidthRow as X,ContentWidthRow as $,SITE_BACKGROUND_HINT as K,SITE_CONTENT_HINT as M,WIDTH_GROUP_LABEL as q}from"./SectionWidthRows.js";import J from"./SiteAccentField.js";import Q from"./SiteTextStylesField.js";import{usePreviewHeader as S}from"../../render/components/PreviewHeaderContext.js";import{Tabs as V,Tooltip as Z,tabButtonId as D,tabPanelId as ee}from"efficient-shell/ui";import{ContrastIcon as te,NoteIcon as ne,SettingsIcon as oe,TypeIcon as ie}from"efficient-easel/icons";import{useThemeRowPersist as re}from"../lib/theme-row-persist.js";import{themeSaveNotice as se}from"../../format/lib/theme-save-message.js";import{say as g}from"../../format/lib/editor-words.js";import{NEUTRAL_SITE_NAME as ae}from"../../format/lib/content/site-name.js";import{PAGE_WIDTH as b}from"../../format/lib/content/page-width.js";import{SettingsGroupSub as ce}from"efficient-easel/panel";import{previewFrame as le}from"
|
|
1
|
+
"use client";import{jsx as n,jsxs as _,Fragment as w}from"react/jsx-runtime";import{useEasel as N}from"efficient-easel/easel";import{useState as R}from"react";import k from"./ThemeField.js";import L from"./CornersField.js";import O from"./CardShadowField.js";import G from"./ShadowColourField.js";import v from"./BlockGapField.js";import z from"./HoverEffectField.js";import Y from"./PhotographyField.js";import j from"./ShareButtonField.js";import U from"./SideSpaceField.js";import{BackgroundWidthRow as X,ContentWidthRow as $,SITE_BACKGROUND_HINT as K,SITE_CONTENT_HINT as M,WIDTH_GROUP_LABEL as q}from"./SectionWidthRows.js";import J from"./SiteAccentField.js";import Q from"./SiteTextStylesField.js";import{usePreviewHeader as S}from"../../render/components/PreviewHeaderContext.js";import{Tabs as V,Tooltip as Z,tabButtonId as D,tabPanelId as ee}from"efficient-shell/ui";import{ContrastIcon as te,NoteIcon as ne,SettingsIcon as oe,TypeIcon as ie}from"efficient-easel/icons";import{useThemeRowPersist as re}from"../lib/theme-row-persist.js";import{themeSaveNotice as se}from"../../format/lib/theme-save-message.js";import{say as g}from"../../format/lib/editor-words.js";import{NEUTRAL_SITE_NAME as ae}from"../../format/lib/content/site-name.js";import{PAGE_WIDTH as b}from"../../format/lib/content/page-width.js";import{SettingsGroupSub as ce}from"efficient-easel/panel";import{previewFrame as le}from"efficient-easel/screen/lib/puck/preview-dom";import{useSiteTextStylesWriter as de}from"../lib/site-text-styles-writer.js";import{CORNER_STYLE_TO_PX as ue,normalizeCornerRadius as he,normalizeCornerStyle as pe,normalizeShadowColor as fe,selectedThemeColors as ge}from"../../format/lib/theme.js";const E="sf-site-styles",me="sf-site-styles-tabpanel",Se=!1,Ce="Show hints";function _e({shown:e,onChange:t}){return n("div",{className:"sf-hints",children:_("button",{type:"button","aria-pressed":e,onClick:()=>t(!e),className:`sf-rung sf-hints-toggle${e?" is-active":""}`,children:[n(ne,{size:13}),g(Ce)]})})}const xt="text",P=[{id:"basics",label:"Basics",icon:n(oe,{})},{id:"theme",label:"Theme",icon:n(te,{})},{id:"text",label:"Text",icon:n(ie,{})}];function xe({themeFromDocument:e,persist:t}){const{appState:o,dispatch:s}=N(h=>h),{theme:d,setTheme:a}=S(),c=o.data,p=c.root?.props??{},r=h=>{if(e){const f={...p,theme:h};s({type:"replaceRoot",root:{...c.root,props:f},recordHistory:!0})}else a(h);t({selected_preset:h.selected,theme_presets:h.themes})};return n(k,{value:e?p.theme:d,onChange:r})}function we({themeFromDocument:e,persist:t}){const[o,s]=R(null),{theme:d,setFonts:a,setSizes:c,setHeadingTypography:p}=S(),r=de({themeFromDocument:e,persist:t}),{old:h,saved:f,writeRoot:m}=r,l=r.fonts,u=r.sizes,x=r.typography,y=i=>i.values.size??Re(Te[i.id]??"body")??be[i.kind],T=i=>r.write(i),F=ye(d),I=i=>{const C={...l,accent:i};e?m({fonts:C}):a(C),t({accent_font:i})},B=i=>{c({...u,accent:i}),t({accent_size_px:i})},A=i=>{const C={...x,weightStrong:i};e?m({headingTypography:C}):p(C),t({heading_weight_strong:i})},W=i=>{const C={...x,italicStrong:i};e?m({headingTypography:C}):p(C),t({accent_italic:i})};return _(w,{children:[n(Q,{saved:f,old:h,colours:F,sizeOf:y,onChange:T,openId:o===H?null:o,onOpenChange:s,withoutSize:e}),n(J,{font:l.accent,size:u.accent,weight:x.weightStrong,italic:x.italicStrong,headingWeight:x.weight,open:o===H,onOpenChange:i=>s(i?H:null),onChange:i=>{i.key==="font"?I(i.value):i.key==="size"?B(i.value):i.key==="weight"?A(i.value):W(i.value)},withoutSize:e})]})}const H="accent";function ye(e){const t=ge(e);return[{key:"accent",name:g("Accent"),value:t.accent},{key:"text",name:g("Text"),value:t.text},{key:"labels",name:g("Labels"),value:t.muted??t.text}]}const Te={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},be={heading:32,body:14},Pe={heading:"main h1, main h2",heading2:"main h1, main h2",heading3:"main h1, main h2",accent:"main h1 em, main h2 em",body:"main p",label:"main .mono-eyebrow"};function Re(e){if(typeof document>"u")return null;const o=(le()?.contentDocument??document).querySelector(Pe[e]);if(!o)return null;const s=parseFloat(getComputedStyle(o).fontSize);return Number.isFinite(s)?s:null}function Ee({themeFromDocument:e,persist:t,showHint:o}){const{appState:s,dispatch:d}=N(u=>u),{cornerRadiusPx:a,setCornerRadiusPx:c}=S(),p=s.data,r=p.root?.props??{},h=r.cornerRadiusPx===void 0?ue[pe(r.cornerStyle)]:he(r.cornerRadiusPx),f=e?h:a,m=u=>d({type:"replaceRoot",root:{...p.root,props:{...r,...u}},recordHistory:!0});return n(L,{value:f,onChange:u=>{e?m({cornerRadiusPx:u}):c(u),t({corner_radius_px:u})},showHint:o})}function He(e){return{site_width:e}}function Ne({persist:e,showHint:t}){const{siteWidth:o,setSiteWidth:s,sectionBackgroundWidth:d,setSectionBackgroundWidth:a,sectionContentWidth:c,setSectionContentWidth:p}=S(),r=typeof o=="number"?o:b.default,h=l=>{s(l),e(He(l),l===null)},f=l=>{a(l),e({section_background_width:l},!0)},m=l=>{p(l),e({section_content_width:l},!0)};return _(w,{children:[n(ce,{title:g(q),level:4}),n(X,{value:d??"full",changed:d!==null,detail:g("Full width"),onChange:f,onReset:()=>f(null),hint:t?K:void 0}),n($,{mode:c??"content",px:r,min:b.min,max:b.max,changed:typeof o=="number"||c!==null,detail:`${g("Content width")} ${b.default}px`,onMode:m,onPx:l=>h(l),onReset:()=>{m(null),h(null)},hint:t?M:void 0})]})}function Fe(e){return{block_gap:e}}function Ie(e){return{site_gutter:e}}function Be({persist:e,showHint:t}){const{siteGutter:o,setSiteGutter:s}=S();return n(U,{value:o,onChange:a=>{s(a),e(Ie(a),a===null)},showHint:t})}function Ae({persist:e,showHint:t}){const{blockGap:o,setBlockGap:s}=S();return n(v,{value:o,onChange:a=>{s(a),e(Fe(a),a===null)},showHint:t})}function We({persist:e,showHint:t=!0}){return _(w,{children:[n(Ne,{persist:e,showHint:t}),n(Be,{persist:e,showHint:t}),n(Ae,{persist:e,showHint:t})]})}function ke(e){return{card_shadow:e}}function Le(e){return e===null?{shadow_color:null}:{shadow_color:fe(e)}}function Oe(e){return{hover_effect:e}}function Ge({persist:e,showHint:t=!0}){const{cardShadow:o,setCardShadow:s,shadowColor:d,setShadowColor:a,hoverEffect:c,setHoverEffect:p}=S();return _(w,{children:[n(O,{value:o,onChange:r=>{s(r),e(ke(r),!0)},showHint:t}),n(G,{value:d,onChange:r=>{a(r),e(Le(r),r===null)},showHint:t}),n(z,{value:c,onChange:r=>{p(r),e(Oe(r),!0)},showHint:t})]})}function ve(e){return{photography_grayscale:e}}function ze({persist:e,showHint:t}){const{photographyGrayscale:o,setPhotographyGrayscale:s}=S();return n(Y,{value:o,onChange:a=>{s(a),e(ve(a),!0)},showHint:t})}function Ye({persist:e,showHint:t=!0}){return n(w,{children:n(ze,{persist:e,showHint:t})})}function je(e){return{share_button_on_posts:e}}function Ue({persist:e,showHint:t=!0}){const{shareButtonOnPosts:o,setShareButtonOnPosts:s}=S();return n(j,{value:o,onChange:a=>{s(a),e(je(a),!0)},showHint:t})}function Xe(){const{websiteName:e}=S();return e?.trim()||ae}function wt(){const e=Xe();return n(Z,{content:g("{name} — renamed in the Console: {place}.",{name:e,place:g("Storefront ▸ Sites ▸ Settings")}),className:"sf-name-tip",children:n("span",{className:"sf-panel-site",children:e})})}function $e({themeFromDocument:e=!1,tokenRef:t,siteId:o,onNotify:s,tab:d,onTabChange:a}){const{persist:c}=re({themeFromDocument:e,tokenRef:t,siteId:o,onResult:y=>{const T=se(y);T&&s?.(T.msg,T.tone)}}),[p,r]=R(P[0].id),h=d!==void 0,f=h?d:p,m=h?a??(()=>{}):r,l=P.find(y=>y.id===f)??P[0],[u,x]=R(Se);return _(w,{children:[n(Ke,{activeId:l.id,onSelect:m}),_("div",{id:ee(E,l.id),className:me,role:"tabpanel","aria-labelledby":D(E,l.id),children:[f==="basics"&&_(w,{children:[n(Ee,{themeFromDocument:e,persist:c,showHint:u}),!e&&n(Ge,{persist:c,showHint:u}),!e&&n(We,{persist:c,showHint:u}),!e&&n(Ye,{persist:c,showHint:u}),!e&&n(Ue,{persist:c,showHint:u}),n(_e,{shown:u,onChange:x})]}),f==="theme"&&n(xe,{themeFromDocument:e,persist:c}),f==="text"&&n(we,{themeFromDocument:e,persist:c})]})]})}function Ke({activeId:e,onSelect:t}){return n("div",{className:"es-insp-tabs",children:n(V,{variant:"underline",block:!0,labelsFit:!0,"aria-label":g("Site styles"),idPrefix:E,value:e,onChange:t,items:P.map(o=>{const s=g(o.label);return{id:o.id,icon:o.icon,label:s}})})})}export{Ge as CardLookFields,_e as HintsToggle,We as PageGroupFields,Ye as PhotographyGroupFields,Se as SHOW_HINTS_DEFAULT,E as SITE_STYLES_ID_PREFIX,P as SITE_STYLES_TABS,xt as SITE_STYLES_TEXT_TAB,Ue as ShareButtonRootField,Ke as SiteStylesTabStrip,me as TABPANEL_CLASS,wt as WebsiteNameReadonly,Fe as blockGapPatch,ke as cardShadowPatch,$e as default,Oe as hoverEffectPatch,ve as photographyPatch,Le as shadowColourPatch,je as shareButtonPatch,Ie as siteGutterPatch,He as siteWidthPatch,Xe as useWebsiteName};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ScreenInspector, ScreenNode, ScreenTree, ScreenTreeFolds } from "
|
|
1
|
+
import type { ScreenInspector, ScreenNode, ScreenTree, ScreenTreeFolds } from "efficient-easel/screen/lib/screen-parts";
|
|
2
2
|
export declare const LOCATIONS_TYPE = "ContactLocations";
|
|
3
3
|
export declare function useLocationsTree(inspector: ScreenInspector, tree: ScreenTree): {
|
|
4
4
|
renderLocationTree: (section: ScreenNode, si: number, { rowClick, isCollapsed, toggleCollapse }: ScreenTreeFolds) => import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ScreenDocumentOps } from "
|
|
1
|
+
import type { ScreenDocumentOps } from "efficient-easel/screen/lib/screen-parts";
|
|
2
2
|
export declare function usePinnedChromeSeed(ops: ScreenDocumentOps, config: unknown): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useEffect as G,useRef as L}from"react";import{createNode as x,newId as z}from"efficient-easel/data";import{useEaselApi as U}from"efficient-easel/easel";import{
|
|
1
|
+
"use client";import{useEffect as G,useRef as L}from"react";import{createNode as x,newId as z}from"efficient-easel/data";import{useEaselApi as U}from"efficient-easel/easel";import{useScreenDocument as Z}from"efficient-easel/screen/components/ScreenDocumentContext";import{SITE_FOOTER_SLUG as H}from"../../format/lib/content/footer.js";import{boxFooterFromFooter as B}from"../../format/lib/puck/box-footer.js";import{ROOT_ZONE as l,missingPinnedTypes as j,pinnedDuplicateIds as D}from"efficient-easel/draw";import{FOOTER_TYPE as c,HEADER_TYPE as p,buildDefaultFooterBlocks as P,buildDefaultHeaderNode as E}from"../lib/puck/footer-blocks.js";import{canSeedPinnedChrome as q}from"../lib/puck/pinned-seed-gate.js";import{siteFooterDocChrome as J,SITE_FOOTER_TYPE as f}from"../../format/lib/puck/section-groups.js";import{inPlaceSeedPlan as K}from"../lib/puck/pinned-in-place-seed.js";function se(t,F){const{adapter:k,capabilities:T,currentSlug:O,docId:u,data:y,saveStatus:I}=Z(),{hasSiteSettings:N,hasPinnedChrome:b}=T,C=!!T.editsPinnedInPlace&&O!==H,R=O===H,_=U().getState,v=L(null);G(()=>{if(!q({docId:u,saveStatus:I,seededDocId:v.current})||(v.current=u,!b))return;const m=_().appState.data,o=m.content,a=y?.content??[],d=(e,n)=>e.some(r=>r?.type===n);if(!N){const e=new Set(D(o)),n=e.size?o.filter(s=>!e.has(s.props.id)):o;e.size&&t.setDocument({...m,content:n});const r=j(n,a);if(r.includes(c)){const s=n.length,i=t.insertSection(c,s);t.replaceComponent(l,s,{type:c,props:{id:i,blocks:P()}})}r.includes(p)&&t.insertNode(l,0,E());return}if(R){const e=J(o);if(e!==o&&t.setDocument({...m,content:[...e]}),!e.find(r=>r.type===c)&&!d(a,c)&&!d(e,f)&&!d(a,f)){const r=(i,g)=>x(F,i,g),s={type:c,props:{blocks:P()}};t.insertNode(l,e.length,B(s,r,z(f)))}return}if(C){const e=!!k?.pinnedChrome?.state().docId,n=K(o,{hasChromeDoc:e}),r=new Set([...n.remove,...D(o.filter(i=>!n.remove.includes(String(i.props.id))))]),s=r.size?o.filter(i=>!r.has(String(i.props.id))):o;if(s.length!==o.length&&t.setDocument({...m,content:s}),n.seedFooter&&!d(a,c)&&!d(a,f)){const i=(Y,A)=>x(F,Y,A),g={type:c,props:{blocks:P()}};t.insertNode(l,s.length,B(g,i,z(f)))}if(n.seedHeader&&!d(a,p)){const i=s[0]?.type==="SiteHeader"?1:0;t.insertNode(l,i,E())}return}const h=o.filter(e=>e.type!==c),w=new Set(D(h)),S=w.size?h.filter(e=>!w.has(e.props.id)):h;S.length!==o.length&&t.setDocument({...m,content:S}),!d(S,p)&&!d(a,p)&&t.insertNode(l,0,E())},[u,I,y,_,t,N,b,R,C,k])}export{se as usePinnedChromeSeed};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useSyncExternalStore as t}from"react";import{
|
|
1
|
+
"use client";import{useSyncExternalStore as t}from"react";import{useScreenDocument as o}from"efficient-easel/screen/components/ScreenDocumentContext";const s=()=>()=>{},n=()=>null;function r(e){return t(e?e.subscribe:s,e?e.state:n,e?e.state:n)}function i(){const{adapter:e}=o();return e?.pinnedChrome}export{i as useOpenPinnedChromeReport,r as usePinnedChromeState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useCallback as d,useEffect as p,useMemo as
|
|
1
|
+
"use client";import{useCallback as d,useEffect as p,useMemo as v,useRef as h,useState as A}from"react";import{EMPTY_SOCIAL_ROWS as L}from"../../render/components/PreviewSocialContext.js";import{SOCIAL_PLATFORMS as O,normalizeSocialLinks as C}from"../../format/lib/content/social-links.js";import{refreshSiteLiveState as w}from"../lib/site-live-state.js";import{backendOf as y}from"../lib/website-session.js";import{useEaselSession as _}from"efficient-easel/screen/lib/session-context";import{WebsiteBackendError as g}from"../lib/web-backend.js";const F="Could not save this link. Check your connection and try again.";function R(n,e){if(!(n instanceof g)||n.kind!=="invalid")return null;const s=n.fields?.[e];return typeof s=="string"&&s.trim()?s:null}function T(n){return Object.fromEntries(O.map(e=>[e,{value:n[e]??"",error:null}]))}function D({token:n,siteId:e,enabled:s}){const[i,c]=A(L),m=h(null),a=h(!1),b=_(),t=y(b).social,o=s&&!!n&&!!e&&!!t;p(()=>{if(!o||!n||!e||!t)return;m.current!==e&&(m.current=e,a.current=!1,c(L));let r=!1;return t.get({siteId:e}).then(l=>{!r&&!a.current&&c(T(l))}).catch(()=>{}),()=>{r=!0}},[o,n,e,t]);const S=d(async(r,l)=>{if(!o||!n||!e||!t)return{ok:!1,error:"There is no website to save to."};try{const f=await t.update({[r]:l.trim()},{siteId:e});return a.current=!0,w(),c(u=>({...u,[r]:{value:f[r]??"",error:null}})),{ok:!0}}catch(f){const u=R(f,r)??F;return c(E=>({...E,[r]:{...E[r],error:u}})),{ok:!1,error:u}}},[o,n,e,t]),k=v(()=>C(Object.fromEntries(O.map(r=>[r,i[r].value]))),[i]);return v(()=>({links:k,rows:i,canSave:o,saveLink:S}),[k,i,o,S])}export{F as SOCIAL_SAVE_FAILED,R as socialFieldError,D as useSocialSettings};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ScreenMainAction } from "
|
|
1
|
+
import type { ScreenMainAction } from "efficient-easel/screen/lib/screen-parts";
|
|
2
2
|
export declare function useWebsiteMainAction(data: unknown): ScreenMainAction | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useCallback as b,useEffect as f,useRef as d,useState as P}from"react";import{
|
|
1
|
+
"use client";import{useCallback as b,useEffect as f,useRef as d,useState as P}from"react";import{useScreenDocument as y}from"efficient-easel/screen/components/ScreenDocumentContext";import{useOpenPinnedChromeReport as C,usePinnedChromeState as R}from"./usePinnedChromeState.js";import{effectiveLive as A,goingLiveLines as D,mainActionFor as l,usePageLiveState as E}from"../lib/page-live-state.js";import{readSiteLiveStateWith as m,refreshSiteLiveState as U,useSiteLiveState as W}from"../lib/site-live-state.js";function M(i){const{docId:p,capabilities:v,hasUnsavedEdits:r,onPublish:s,adapter:S}=y(),h=A(E(p??null),r),g=R(C()),e=S.siteLiveState;f(()=>{if(e)return m(e),U(0),()=>m(null)},[e]);const t=W(),[u,o]=P(!1),a=d(i);a.current=i;const n=d(!0);f(()=>(n.current=!0,()=>{n.current=!1}),[]);const c=b(()=>{o(!0),s(a.current).finally(()=>{n.current&&o(!1)})},[s]);if(v.canPublish){if(e){const L=t===void 0?void 0:r||t.state==="changed"?"changed":"live";return l({live:L,onPress:c,busy:u,goingLive:D(t?.changes??[])})}return l({live:h,onPress:c,busy:u,pinnedUnpublished:g?.unpublished??!1})}}export{M as useWebsiteMainAction};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentConfig } from "efficient-easel/blocks";
|
|
2
|
-
import { type EditorSession, type SessionBlocks } from "
|
|
2
|
+
import { type EaselSession as EditorSession, type SessionBlocks } from "efficient-easel/screen/lib/session";
|
|
3
3
|
import { type BlockSet } from "../../format/lib/puck/section-catalog.js";
|
|
4
4
|
export interface EditorBlockCategory {
|
|
5
5
|
key: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{currentEaselSession as o}from"efficient-easel/screen/lib/session";import{BLOCK_SETS as s}from"../../format/lib/puck/section-catalog.js";const n={general:!0,commerce:!0,service:!0};function c(e){const r=e?.sets;return r?Object.fromEntries(s.map(t=>[t,r.includes(t)])):n}function u(e=o()){return c(e.blocks)}export{c as offeredSets,u as offeredSetsOf};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LockHolder, SaveConflict } from "efficient-easel/edit-lock";
|
|
2
2
|
import { type OfferedSets } from "./editor-blocks.js";
|
|
3
|
-
import type { EditorCapabilities, EditorDocument, EditorDocumentAdapter } from "
|
|
3
|
+
import type { EaselCapabilities as EditorCapabilities, EaselDocument as EditorDocument, EaselDocumentAdapter as EditorDocumentAdapter } from "efficient-easel/screen/lib/document-contract";
|
|
4
4
|
import type { EditorPageRow, SiteLiveState, WebsiteBackend } from "./web-backend.js";
|
|
5
5
|
export type { EditorPageRow };
|
|
6
6
|
export type { EditorCapabilities, EditorDocument, EditorDocumentAdapter };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{SITE_FOOTER_SLUG as g}from"../../format/lib/content/footer.js";import{offeredSetsOf as b}from"./editor-blocks.js";import{isBackendError as B}from"
|
|
1
|
+
"use client";import{SITE_FOOTER_SLUG as g}from"../../format/lib/content/footer.js";import{offeredSetsOf as b}from"./editor-blocks.js";import{isBackendError as B}from"efficient-easel/screen/lib/backend-error";import{isEfficientBackend as T}from"efficient-easel/screen/lib/session";import{noteLoaded as O,notePublished as J,noteSaved as j,pageLiveState as _}from"./page-live-state.js";import{noteSiteLiveState as D,refreshSiteLiveState as E}from"./site-live-state.js";import{say as G}from"../../format/lib/editor-words.js";import{sendSiteWrites as M}from"../../format/lib/site-writes.js";import{spliceChrome as U,splitChrome as k}from"./pinned-chrome-doc.js";import{setActivePinnedChrome as N}from"../../format/lib/pinned-chrome-lock.js";import{backendOf as R}from"./website-session.js";function x(t){return!!(t?.publish&&t.liveState)}function V(t,o){return async(s,r)=>{try{await M()}catch(e){throw new Error(G("A change waiting to go live could not be saved."),{cause:e})}return(await t.publish(o)).state==="live"?D({state:"live",changes:[]}):E(0),{version:r??null}}}function F(t,o,s){const r=o?{siteId:o}:void 0;return{resolve:i=>t.load({slug:i,...r}).then(e=>(e&&O(e.id,e.live),e)),saveLayout:(i,e,u,m)=>t.save(i,{layout:e},{version:u,clientId:m??""}).then(f=>(j(i,f.live),E(),f)),rereadVersion:t.version?i=>t.version(i):void 0,publish:x(s)?V(s,r):t.publish?(i,e)=>t.publish(i,e?{version:e}:void 0).then(u=>(J(i,u.live),u)):void 0,listPages:()=>t.list(r),createPage:t.create?i=>t.create({...i,...r}):void 0,deletePage:t.remove?(i,e)=>t.remove(i,e):void 0}}function W(t,o,s,r,i=!1){let e=null;const u=new Set;let m=!1,f={docId:null,lockHolder:null,conflict:null,saveFailed:!1,unpublished:!1,loadFailed:!1};const P=new Set,p=()=>{if(!e)return!1;const n=_(e.id);return n==="changed"||n==="never"||n===void 0&&m},h=n=>{f={...f,...n,docId:e?.id??null,unpublished:p()};for(const c of P)c()},y=n=>n&&typeof n=="object"&&!Array.isArray(n)?n:{},S=n=>!!e&&u.has(n),C={state:()=>f,subscribe:n=>(P.add(n),()=>{P.delete(n)})};return{resolve:async n=>{if(N(n===g?null:C),n===g)return s.resolve(n);let c=!1;const[d,a]=await Promise.all([s.resolve(n),t.load({slug:g,...o}).catch(()=>(c=!0,null))]);if(a){O(a.id,a.live);const v=y(a.layout);e={id:a.id,layout:v,version:a.version,savedJson:""}}else e=null;if(m=!1,!d||!e)return h({conflict:null,saveFailed:!1,loadFailed:c}),d;const l=U(y(d.layout),e.layout);return e.savedJson=JSON.stringify(k(l,e.layout).chrome),u.add(d.id),h({conflict:null,saveFailed:!1,loadFailed:!1}),{...d,layout:l}},saveLayout:async(n,c,d,a)=>{if(!e||!S(n))return s.saveLayout(n,c,d,a);const l=e,v=k(c,l.layout),H=await s.saveLayout(n,v.page,d,a),A=JSON.stringify(v.chrome);if(!v.chrome||A===l.savedJson||f.lockHolder)return H;try{const w=await t.save(l.id,{layout:v.chrome},{version:l.version,clientId:a??""});j(l.id,w.live),E(),l.layout=v.chrome,l.version=w.version,l.savedJson=A,m=!0,h({conflict:null,saveFailed:!1})}catch(w){B(w,"changed-elsewhere")?h({conflict:w.conflict??{savedBy:"",savedByYou:!1,secondsAgo:0}}):B(w,"lock-taken")?h({lockHolder:w.holder??{name:"",secondsSinceSeen:0,secondsSinceHeld:0}}):h({saveFailed:!0})}return H},publish:s.publish?async(n,c)=>{const d=await s.publish(n,c),a=e;if(a&&S(n)&&!i&&t.publish&&p()&&!f.lockHolder){const l=await t.publish(a.id,a.version?{version:a.version}:void 0);J(a.id,l.live),l.version!==null&&(a.version=l.version),m=!1,h({})}return d}:void 0,lock:r?{claim:async(n,c,d)=>{const a=await r.claim(n,c,d),l=e;if(l&&S(n))try{await r.claim(l.id,c,!1),f.lockHolder&&h({lockHolder:null})}catch(v){B(v,"lock-taken")&&h({lockHolder:v.holder??{name:"",secondsSinceSeen:0,secondsSinceHeld:0}})}return a},release:async(n,c)=>{await r.release(n,c);const d=e;d&&S(n)&&!f.lockHolder&&await r.release(d.id,c).catch(()=>{})}}:void 0,pinnedChrome:C}}function oe(t,o=R(),s=b(),r={}){const i=T(o),e=t?{siteId:t}:void 0,u=i?!!t:!0,m=o.site.update,f=i&&s.commerce&&s.service,P=!!r.editsPinnedInPlace&&f,p=x(o.site)?o.site:void 0,h=F(o.pages,t,p),y=P?W(o.pages,e,h,o.lock,!!p):null;return{capabilities:{canPublish:!!p||!!o.pages.publish,hasSiteSettings:i,hasSiteTheme:!!o.theme,placeholderFrames:!1,mediaEditing:!0,pageCreationInAdminForm:!o.pages.create,canDeletePagesInline:!!o.pages.remove,hasEditLock:!!o.lock,hasEditGuard:!0,hasPinnedChrome:f,editsPinnedInPlace:P,explainsSiteSettings:!1,hasSiteRecord:u,canEditSiteRecord:u&&!!m,hasPreviewLink:i||!!o.preview,hasCatalog:i&&s.commerce,hasForms:i&&s.service,hasBlog:!!o.blog&&s.service,offersCommerce:s.commerce,offersService:s.service},...h,...I(h.resolve),lock:o.lock,...y,site:u?()=>o.site.get(e):void 0,siteLiveState:p?()=>p.liveState(e):void 0,updateSite:u&&m?S=>m(S,e):void 0,previewHref:o.preview?S=>o.preview.href(S):void 0}}function ie(t,o=R(),s=b()){const r=T(o),i=o.templates,e=i?i.pages(t):{list:()=>Promise.reject(new Error(L)),load:()=>Promise.reject(new Error(L)),save:()=>Promise.reject(new Error(L))};return{capabilities:{canPublish:!1,hasSiteSettings:!1,hasSiteTheme:!1,placeholderFrames:!0,mediaEditing:!1,pageCreationInAdminForm:!e.create,canDeletePagesInline:!!e.remove,hasEditLock:!1,hasEditGuard:!1,hasPinnedChrome:r&&s.commerce&&s.service,editsPinnedInPlace:!1,explainsSiteSettings:r,hasSiteRecord:!1,canEditSiteRecord:!1,hasPreviewLink:!1,hasCatalog:r&&s.commerce,hasForms:r&&s.service,hasBlog:!!o.blog&&s.service,offersCommerce:s.commerce,offersService:s.service},...F(e,void 0),...I(F(e,void 0).resolve),publish:void 0,templateName:i?()=>i.get(t).then(u=>u.name):void 0}}function I(t){return{resolve:o=>(N(null),t(o))}}const L="This editor's backend has no website templates.";export{oe as makeSitePageAdapter,ie as makeTemplatePageAdapter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{efficientClientOpen as a}from"
|
|
1
|
+
import{efficientClientOpen as a}from"efficient-easel/screen/lib/session";import{shopRouteBase as u}from"../../format/lib/web-runtime.js";const f="/geocode.json";async function b(i){const o=i.trim();if(!o)return null;if(!a())throw new Error("geocode_unavailable");const e=await fetch(`${u()}${f}?q=${encodeURIComponent(o)}`,{headers:{Accept:"application/json"}});if(!e.ok)throw new Error(`geocode_http_${e.status}`);const t=await e.json();if(!t||typeof t!="object")return null;const{lat:s,lng:c,label:l}=t,n=Number(s),r=Number(c);return!Number.isFinite(n)||!Number.isFinite(r)?null:{lat:n,lng:r,label:String(l??"")}}export{b as geocodeAddress};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ScreenMainAction } from "
|
|
1
|
+
import type { ScreenMainAction } from "efficient-easel/screen/lib/screen-parts";
|
|
2
2
|
import type { PageLiveState, SiteChange } from "./web-backend.js";
|
|
3
3
|
export type { PageLiveState };
|
|
4
4
|
export declare function noteLoaded(id: string, live: PageLiveState | undefined): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useCallback as l,useEffect as
|
|
1
|
+
"use client";import{useCallback as l,useEffect as p,useSyncExternalStore as b}from"react";import{useScreenDocument as f}from"efficient-easel/screen/components/ScreenDocumentContext";const d=new WeakMap;function r(e){let n=d.get(e);return n||(n={rows:null,loading:null,listeners:new Set},d.set(e,n)),n}function u(e,n){e.rows=n;for(const t of e.listeners)t()}const i=new Set;function x(e,n){n?i.add(e):i.delete(e)}function g(e){const n=r(e),t=e.listPages().then(o=>u(n,i.size?o.filter(c=>!i.has(c.id)):o),()=>u(n,[])).finally(()=>{n.loading===t&&(n.loading=null)});return n.loading=t,t}const w=()=>null,O=()=>()=>{};function P(){const{adapter:e,ready:n}=f(),t=l(s=>{const{listeners:a}=r(e);return a.add(s),()=>a.delete(s)},[e]),o=l(()=>r(e).rows,[e]),c=b(n?t:O,n?o:w,w);p(()=>{if(!n)return;const s=r(e);s.rows===null&&!s.loading&&g(e)},[e,n]);const m=l(()=>n?g(e):Promise.resolve(),[e,n]),S=l(s=>u(r(e),s),[e]);return{rows:c,reload:m,setRows:S,getRows:o}}function R(e,n){return e?.find(o=>o.slug===n)?.label?.trim()||`/${n}`}function N(){const{currentSlug:e}=f(),{rows:n}=P();return R(n,e)}export{x as holdPageRow,R as pageNameOf,N as useOpenPageName,P as usePageRows};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Config } from "efficient-easel/blocks";
|
|
2
|
-
import { type PaletteSection } from "
|
|
3
|
-
export { matchesQuery, type PaletteSection } from "
|
|
2
|
+
import { type PaletteSection } from "efficient-easel/screen/lib/puck/palette-sections";
|
|
3
|
+
export { matchesQuery, type PaletteSection } from "efficient-easel/screen/lib/puck/palette-sections";
|
|
4
4
|
export declare const CATEGORY_META: Record<string, {
|
|
5
5
|
label: string;
|
|
6
6
|
icon: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buildPaletteSections as r,categoryLabel as l,paletteWithoutPinned as i,pinnedSection as c}from"
|
|
1
|
+
import{buildPaletteSections as r,categoryLabel as l,paletteWithoutPinned as i,pinnedSection as c}from"efficient-easel/screen/lib/puck/palette-sections";import{labelAtLevel as b,LEVEL_NAMED_TYPE as u}from"../../../format/lib/puck/section-catalog.js";import{matchesQuery as S}from"efficient-easel/screen/lib/puck/palette-sections";const t={openers:{label:"Hero & intros",icon:"image"},shop:{label:"Shop & galleries",icon:"bag"},product:{label:"Product page",icon:"box"},checkout:{label:"Checkout & ordering",icon:"bag"},about:{label:"About & brand story",icon:"book"},content:{label:"Text & content",icon:"type"},proof:{label:"Stats & social proof",icon:"star"},promo:{label:"Promotions & sign-ups",icon:"sparkles"},blog:{label:"Blog & journal",icon:"newspaper"},navigation:{label:"Navigation & wayfinding",icon:"bookmark"},legal:{label:"Legal & documents",icon:"file"},contact:{label:"Contact, FAQ & forms",icon:"mail"},structure:{label:"Layout, structure & embeds",icon:"grid"}};function n(o){return t[o]?.label}function d(o,e={}){return r(o,{labelAtLevel:b,categoryLabel:n,descriptions:e})}function f(o,e){return l(o,e,n)}function m(o){return t[o]?.icon??"layers"}const a=u;function y(o){return c(o,a)}function x(o){return i(o,a)}export{t as CATEGORY_META,a as PINNED_SECTION_TYPE,d as buildPaletteSections,m as categoryIcon,f as categoryLabel,n as categoryShortLabel,S as matchesQuery,x as paletteWithoutPinned,y as pinnedSection};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { AddTarget } from "
|
|
2
|
-
export type { AddTarget, AddTargetSource } from "
|
|
1
|
+
import type { AddTarget } from "efficient-easel/screen/lib/puck/add-target-types";
|
|
2
|
+
export type { AddTarget, AddTargetSource } from "efficient-easel/screen/lib/puck/add-target-types";
|
|
3
3
|
export declare function canAddTo(nodeType: string, nestDepth?: number): AddTarget | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type EditorBlocks, type OfferedSets } from "../editor-blocks.js";
|
|
2
|
-
import { type EditorSession } from "
|
|
2
|
+
import { type EaselSession as EditorSession } from "efficient-easel/screen/lib/session";
|
|
3
3
|
export interface BlockOffer {
|
|
4
4
|
readonly sets: OfferedSets;
|
|
5
5
|
offers(type: string): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{offeredSets as S}from"../editor-blocks.js";import{
|
|
1
|
+
import{offeredSets as S}from"../editor-blocks.js";import{currentEaselSession as l}from"efficient-easel/screen/lib/session";import{blocksOf as p}from"../website-session.js";import{presetFor as O}from"../../../format/lib/sections/section-presets.js";import{blockTypesIn as a}from"efficient-easel/screen/lib/puck/block-types-in";import{blockSetOf as h}from"../../../format/lib/puck/section-catalog.js";import{SLOT_SECTION_SPECS as E}from"../../../render/lib/puck/slot-specs.js";const w=()=>({}),m=new Map;function T(e){const r=m.get(e);if(r)return r;const n=new Set,f=E[e];if(f)for(const t of f.seeds(w))for(const s of a({type:f.childType,props:t}))n.add(s);const i=O(e);if(i){let t=0;for(const s of a(i(w,o=>`${o}-${t+=1}`)))n.add(s)}n.delete(e);const u=[...n].sort();return m.set(e,u),u}function x(e){if(!e||!e.sets&&!e.allow&&!e.deny?.length)return null;const r=S(e),n=e.allow?new Set(e.allow):null,f=new Set(e.deny??[]),i=new Set(Object.keys(e.host??{})),u=o=>{if(f.has(o))return!1;if(i.has(o))return!0;const c=h(o);return!c||!r[c]?!1:n?n.has(o):!0},t=new Map,s=o=>{const c=t.get(o);if(c!==void 0)return c;t.set(o,!1);const d=u(o)&&T(o).every(s);return t.set(o,d),d};return{sets:r,offers:s}}const F="block-offer";function _(e=l()){return e.cache(F,()=>x(p(e)))}function C(e,r=l()){const n=_(r);return n?n.offers(e):!0}export{C as blockIsOffered,_ as blockOfferOf,T as blocksLaidDownBy,x as resolveBlockOffer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as I}from"react/jsx-runtime";import{ButtonIcon as d,ButtonIconIcon as h,GroundIcon as g,IconAfterTextIcon as x,IconBeforeTextIcon as y,StylesIcon as b,TextColorIcon as C,WidthIcon as S}from"efficient-easel/icons";import*as T from"efficient-easel/icons";import{SettingsField as _}from"efficient-easel/panel";import{useSelectedFields as s}from"efficient-easel/easel";import{IconPicker as B,Segmented as F}from"efficient-shell/ui";import{StorefrontTextLinkField as O}from"../../../../../components/StorefrontLinkField.js";import{BUTTON_ICONS as v,buttonIconChoice as N,buttonIconSide as k}from"../../../../../../format/lib/content/button-icon.js";import{say as l}from"../../../../../../format/lib/editor-words.js";import{FOLLOWS_SITE_BUTTON as L,FOLLOWS_SITE_BUTTON_INK as z,colorInput as m,group as w,inOwnBox as j,linkField as P,plainText as U,section as u,segmented as f}from"../../../controls.js";import{NoControlMark as W,noControlField as A}from"
|
|
1
|
+
import{jsx as e,jsxs as I}from"react/jsx-runtime";import{ButtonIcon as d,ButtonIconIcon as h,GroundIcon as g,IconAfterTextIcon as x,IconBeforeTextIcon as y,StylesIcon as b,TextColorIcon as C,WidthIcon as S}from"efficient-easel/icons";import*as T from"efficient-easel/icons";import{SettingsField as _}from"efficient-easel/panel";import{useSelectedFields as s}from"efficient-easel/easel";import{IconPicker as B,Segmented as F}from"efficient-shell/ui";import{StorefrontTextLinkField as O}from"../../../../../components/StorefrontLinkField.js";import{BUTTON_ICONS as v,buttonIconChoice as N,buttonIconSide as k}from"../../../../../../format/lib/content/button-icon.js";import{say as l}from"../../../../../../format/lib/editor-words.js";import{FOLLOWS_SITE_BUTTON as L,FOLLOWS_SITE_BUTTON_INK as z,colorInput as m,group as w,inOwnBox as j,linkField as P,plainText as U,section as u,segmented as f}from"../../../controls.js";import{NoControlMark as W,noControlField as A}from"efficient-easel/screen/lib/puck/panel-no-control-mark";import{alignField as E}from"../../shared-fields.js";const a=o=>({...A({type:"custom",render:()=>e(W,{})},"always"),reachedBy:o});function G(o){const n=(o==="none"?"no-symbol":o).replace(/(^|-)([a-z])/g,(r,c,p)=>p.toUpperCase()),t=T[`${n}Icon`];return t?e(t,{size:16}):null}const K=v.map(o=>({value:o,icon:G(o)}));function M({value:o,onChange:i}){const n=s(),t=n.values.href,r=typeof o=="string"?o:o&&typeof o=="object"&&"text"in o?String(o.text??""):"";return e(O,{label:"Button",icon:e(d,{size:18}),text:r,onTextChange:i,link:typeof t=="string"?t:"",onLinkChange:c=>n.onChange("href",c)})}function R({value:o,onChange:i}){const n=s(),t=N(o,n.values.arrow),r=k(n.values.iconPosition);return e(_,{label:l("Icon"),icon:e(h,{size:18}),children:I("div",{className:"flex items-center gap-2",children:[e(B,{label:l("Icon"),value:t,emptyValue:"none",options:K,onChange:i}),t!=="none"&&e(F,{label:l("Icon position"),value:r,onChange:c=>n.onChange("iconPosition",c),options:[{value:"before",icon:e(y,{size:16}),label:e("span",{className:"sr-only",children:l("Icon before text")}),title:l("Icon before text")},{value:"after",icon:e(x,{size:16}),label:e("span",{className:"sr-only",children:l("Icon after text")}),title:l("Icon after text")}]})]})})}const eo={fields:{label:j(U("Button"),o=>e(M,{value:o.value,onChange:o.onChange})),href:{...P("Button link"),...a("label")},_dSize:u("Size"),widthFit:f("Width",e(S,{}),[{label:"Fit content",value:"fit"},{label:"Fill",value:"fill"}],"fit"),_gStyle:w("Style"),variant:f("Style",e(b,{}),[{label:"Filled",value:"primary"},{label:"Outline",value:"ghost"}],"primary"),icon:{type:"custom",render:o=>e(R,{value:o.value,onChange:o.onChange})},iconPosition:a("icon"),arrow:a("icon"),buttonColor:m("Fill color",L,e(g,{})),buttonTextColor:m("Text color",z,e(C,{})),_dLayout:u("Layout"),align:E()}};export{eo as ButtonBlockFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as s}from"react/jsx-runtime";import{BOX_CARD_PAD as l,BOX_DARKEN as t,BOX_DARKEN_STYLES as p,isBackgroundBox as b}from"../../../../../../format/lib/content/box-background.js";import{containerDirectionPoints as u}from"../../../../../../format/lib/content/container-direction.js";import{deviceField as c}from"
|
|
1
|
+
import{jsx as s}from"react/jsx-runtime";import{BOX_CARD_PAD as l,BOX_DARKEN as t,BOX_DARKEN_STYLES as p,isBackgroundBox as b}from"../../../../../../format/lib/content/box-background.js";import{containerDirectionPoints as u}from"../../../../../../format/lib/content/container-direction.js";import{deviceField as c}from"efficient-easel/screen/lib/puck/device-fields";import{OpacityIcon as k,StylesIcon as x}from"efficient-easel/icons";import{boxAlignField as F,boxBlockSpacingField as y,boxJustifyField as S,boxPhoneRowField as _,boxShareField as B,boxWrapField as O,gapField as h,group as r,placementField as D,plainText as I,select as R,sidesPaddingFields as d,slider as w,upload as m,withPanelOnly as A}from"../../../controls.js";import{withRowRules as P}from"../../../../../../render/lib/puck/show-when.js";import{FlexSlots as j}from"../../../../../../render/lib/puck/blocks/general/Flex/render.js";const C={field:"bgImage",set:!0},H={fields:P({_gContent:r("Content"),content:j.content,_gLayout:r("Layout"),direction:{type:"radio",options:u("Flex")},label:A(I("Tab name")),gap:h("Flex"),justify:S(),align:F(),wrap:O(),share:B(),phoneRow:_(),blockSpacing:y(),_gBackground:r("Background image"),bgImage:c("desktop",m("Image","image/*")),bgImagePhone:c("mobile",m("Image","image/*")),darken:w("Darken",s(k,{}),t.min,t.max,t.step,t.fallback,t.unit),darkenStyle:R("Darken style",s(x,{}),p,p[0].value),placement:D("Content position",{stacking:!1})},[[["darken","darkenStyle","placement"],C]]),resolveFields:(i,{fields:e})=>{const o=i.props;if(b(o.bgImage)){const a=d({fallback:{top:l.desktop,bottom:l.desktop,left:l.side,right:l.side}});return g(e,a)}return i.props.padV2!==!0?g(e,d({fallback:{top:24,bottom:24}})):e}};function g(i,e){const o={};let n=!1;for(const[a,f]of Object.entries(i)){if(a in e){n||Object.assign(o,e),n=!0;continue}o[a]=f}return n||Object.assign(o,e),o}export{H as FlexFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{REEL_PLACEMENT_DEFAULT as S,REEL_SHAPE_DEFAULT as p,HERO_REEL_SHAPES as d,REEL_SHAPE_LABELS as A,REEL_SHOWN_DEFAULT as m}from"../../../../../../format/lib/reel.js";import{HERO_TEXTURE_COLOUR_DEFAULT as R,HERO_TEXTURE_SHOWN_DEFAULT as O}from"../../../../../../format/lib/hero-texture.js";import{HERO_ARROW_SHAPE_DEFAULT as P,HERO_ARROW_SHAPE_LABELS as L,HERO_ARROW_SHAPES as H,HERO_ARROWS_PLACEMENT_DEFAULT as u,HERO_ARROWS_SHOWN_DEFAULT as h}from"../../../../../../format/lib/hero-arrows.js";import{ClockIcon as T,EyeIcon as l,OpacityIcon as w,PhoneIcon as E,PlayIcon as I,SlideArrowsBareIcon as k,SlideArrowsRoundIcon as g,SlideArrowsSquareIcon as D,SlidePickerBarIcon as U,SlidePickerCardsIcon as f,SlidePickerDotsIcon as F,SlidePickerNumbersIcon as y,SlidePickerSquaresIcon as b,SquareIcon as c}from"efficient-easel/icons";import{SlideArrowsRoundSolidIcon as N}from"efficient-shell/icons/efficient-looks";const W=N,x={cards:e(f,{}),dots:e(F,{}),numbers:e(y,{}),bar:e(U,{}),squares:e(b,{})},C={outline:e(g,{}),solid:e(W,{}),square:e(D,{}),bare:e(k,{})};import{colorInput as B,group as o,placementField as n,segmented as i,slider as _,toggle as t}from"../../../controls.js";import{deviceField as s,deviceNote as q}from"
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{REEL_PLACEMENT_DEFAULT as S,REEL_SHAPE_DEFAULT as p,HERO_REEL_SHAPES as d,REEL_SHAPE_LABELS as A,REEL_SHOWN_DEFAULT as m}from"../../../../../../format/lib/reel.js";import{HERO_TEXTURE_COLOUR_DEFAULT as R,HERO_TEXTURE_SHOWN_DEFAULT as O}from"../../../../../../format/lib/hero-texture.js";import{HERO_ARROW_SHAPE_DEFAULT as P,HERO_ARROW_SHAPE_LABELS as L,HERO_ARROW_SHAPES as H,HERO_ARROWS_PLACEMENT_DEFAULT as u,HERO_ARROWS_SHOWN_DEFAULT as h}from"../../../../../../format/lib/hero-arrows.js";import{ClockIcon as T,EyeIcon as l,OpacityIcon as w,PhoneIcon as E,PlayIcon as I,SlideArrowsBareIcon as k,SlideArrowsRoundIcon as g,SlideArrowsSquareIcon as D,SlidePickerBarIcon as U,SlidePickerCardsIcon as f,SlidePickerDotsIcon as F,SlidePickerNumbersIcon as y,SlidePickerSquaresIcon as b,SquareIcon as c}from"efficient-easel/icons";import{SlideArrowsRoundSolidIcon as N}from"efficient-shell/icons/efficient-looks";const W=N,x={cards:e(f,{}),dots:e(F,{}),numbers:e(y,{}),bar:e(U,{}),squares:e(b,{})},C={outline:e(g,{}),solid:e(W,{}),square:e(D,{}),bare:e(k,{})};import{colorInput as B,group as o,placementField as n,segmented as i,slider as _,toggle as t}from"../../../controls.js";import{deviceField as s,deviceNote as q}from"efficient-easel/screen/lib/puck/device-fields";import{HERO_PHONE_SIDEWAYS_DEFAULT as M,HERO_PHONE_SIDEWAYS_LABEL as j,HERO_PHONE_UPDOWN_DEFAULT as X,HERO_PHONE_UPDOWN_LABEL as Y,phoneSidewaysPoints as v,phoneUpDownPoints as K}from"../../../../../../format/lib/hero-phone-stack.js";import{heightField as a,alignField as z}from"../../shared-fields.js";import{HeroSlots as G}from"../../../../../../render/lib/puck/blocks/general/Hero/render.js";const se={fields:{_dDevice:q(),_gContent:o("Content"),slides:G.slides,_gStyle:o("Style"),alignment:z(),_gTexture:o("Texture"),showTexture:t("Show texture",O,e(l,{})),textureColor:B("Texture color",R),textureOpacity:_("Texture opacity",e(w,{}),0,100,1,40,"%"),_gLayout:o("Layout"),heightDesktop:a("desktop"),heightMobile:a("mobile"),_gAutoplay:o("Auto-slide"),autoplay:t("Auto-advance slides",!1,e(I,{})),autoplayInterval:_("Still time per slide",e(T,{}),2,15,1,6,"s"),_gPicker:o("Slide picker"),showPicker:t("Show slide picker",m,e(l,{})),pickerShape:i("Slide picker shape",e(c,{}),d.map(r=>({label:A[r],value:r,picture:x[r]})),p),pickerPlacement:n("Slide picker placement",{stacking:!1,fallback:S}),_gArrows:o("Arrows"),showArrows:t("Show arrows",h,e(l,{})),arrowsShape:i("Arrows shape",e(c,{}),H.map(r=>({label:L[r],value:r,picture:C[r]})),P),arrowsPlacement:n("Arrows placement",{stacking:!1,fallback:u}),_gPhone:s("mobile",o("On a phone")),phoneUpDown:s("mobile",i(Y,e(E,{}),K(),X)),phoneSideways:s("mobile",i(j,e(E,{}),v(),M))}};export{se as HeroFields};
|
|
@@ -1 +1 @@
|
|
|
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"../../../../../../format/lib/hero-media-layout.js";import{deviceNote as v}from"
|
|
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"../../../../../../format/lib/hero-media-layout.js";import{deviceNote as v}from"efficient-easel/screen/lib/puck/device-fields";import{DEFAULT_OVERLAY_COLOR as C,DEFAULT_OVERLAY_POSITION as V,OVERLAY_POSITION_OPTIONS as k}from"../../../../../../format/lib/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"../../../../../../render/lib/puck/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"../../../../../../format/lib/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/lib/puck/blocks/general/HeroSingle/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 t}from"react/jsx-runtime";import{CaseIcon as g,OpacityIcon as b,PlacementIcon as y,StickyIcon as u,TextLinesIcon as a}from"efficient-easel/icons";import{colorInput as d,group as i,select as k,sizeField as l,slider as r,text as h,textarea as s,toggle as m,upload as p}from"../../../controls.js";import{NoControlMark as _,noControlField as x}from"
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{CaseIcon as g,OpacityIcon as b,PlacementIcon as y,StickyIcon as u,TextLinesIcon as a}from"efficient-easel/icons";import{colorInput as d,group as i,select as k,sizeField as l,slider as r,text as h,textarea as s,toggle as m,upload as p}from"../../../controls.js";import{NoControlMark as _,noControlField as x}from"efficient-easel/screen/lib/puck/panel-no-control-mark";import{deviceField as e,deviceNote as T}from"efficient-easel/screen/lib/puck/device-fields";import{DEFAULT_INTRO_BLEED_LAYOUT as f,INTRO_BLEED_COPY_SHARE as o,INTRO_BLEED_LAYOUT_OPTIONS as S}from"../../../../../../format/lib/sections/intro-bleed-layout.js";import{heightField as c,ctaField as B}from"../../shared-fields.js";import{INTRO_PH as n}from"../../../../../../render/lib/puck/blocks/general/IntroBleed/render.js";const M={fields:{_dDevice:T(),_gContent:i("Content"),eyebrow:h("Eyebrow",n.eyebrow),title:s("Heading",n.title),body:s("Subtitle",n.body),uppercase:m("Uppercase heading",!1,t(g,{})),_gBackground:i("Background images"),imageSrc:e("desktop",p("Background image","image/*")),imageSrcMobile:e("mobile",p("Background image","image/*")),_gLayout:i("Layout"),layout:k("Text position",t(y,{}),S,f),heightDesktop:c("desktop"),heightMobile:c("mobile"),copyShareDesktop:e("desktop",r("Text height",t(a,{}),o.min,o.max,o.step,o.desktop,"%")),copyShareMobile:e("mobile",r("Text height",t(a,{}),o.min,o.max,o.step,o.mobile,"%")),sticky:m("Stick to top",!0,t(u,{})),fullWidth:{...x({type:"custom",render:()=>t(_,{})},"always"),reachedBy:"contentWidth"},overlay:r("Overlay",t(b,{}),0,100,5,60,"%"),_gTextDesktop:e("desktop",i("Text style")),titleSizeDesktop:e("desktop",l("Heading font size",32,120,1,96,"heading")),bodySizeDesktop:e("desktop",l("Subtitle font size",12,28,1,17,"body")),_gTextMobile:e("mobile",i("Text style")),titleSizeMobile:e("mobile",l("Heading font size",24,72,1,44,"heading")),bodySizeMobile:e("mobile",l("Subtitle font size",12,22,1,16,"body")),_gButton:i("Button"),...B,buttonColor:d("Button color","#C9A461"),buttonTextColor:d("Button text color","#000000")}};export{M as IntroBleedFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{SECTION_WIDTH_FIELD_KEYS as n}from"../section-width-fields.js";import{SECTION_PAD_INNER_DEFAULTS as i}from"../../../../render/lib/puck/passes/section-padding.js";import p,{SlotNoticeField as a}from"../../../components/SlotChildRows.js";import{SECTION_HEIGHT as r}from"../../../../format/lib/content/section-height.js";import{usePreviewHeader as m}from"../../../../render/components/PreviewHeaderContext.js";import{IMAGE_GRAYSCALE_LABEL as c}from"../../../../format/lib/content/image-treatment.js";import{AlignLeftIcon as d,BlackAndWhiteIcon as s,ContrastIcon as f,HeightIcon as u,TypeIcon as g}from"efficient-easel/icons";import{linkField as h,segmented as l,slider as x,spacingFields as F,text as T,toggle as y,widthField as I}from"../controls.js";import{deviceField as _}from"
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{SECTION_WIDTH_FIELD_KEYS as n}from"../section-width-fields.js";import{SECTION_PAD_INNER_DEFAULTS as i}from"../../../../render/lib/puck/passes/section-padding.js";import p,{SlotNoticeField as a}from"../../../components/SlotChildRows.js";import{SECTION_HEIGHT as r}from"../../../../format/lib/content/section-height.js";import{usePreviewHeader as m}from"../../../../render/components/PreviewHeaderContext.js";import{IMAGE_GRAYSCALE_LABEL as c}from"../../../../format/lib/content/image-treatment.js";import{AlignLeftIcon as d,BlackAndWhiteIcon as s,ContrastIcon as f,HeightIcon as u,TypeIcon as g}from"efficient-easel/icons";import{linkField as h,segmented as l,slider as x,spacingFields as F,text as T,toggle as y,widthField as I}from"../controls.js";import{deviceField as _}from"efficient-easel/screen/lib/puck/device-fields";import{FieldGlyph as E}from"../../../components/FieldGlyph.js";import{fieldNoun as S}from"../../../../format/lib/puck/field-noun.js";import{CTA_PH as A}from"../../../../format/lib/puck/blocks/placeholders.js";const W=e=>_(e,x("Height",t(u,{}),r.min,r.max,r.step,r.fallback,r.unit)),j={ctaText:T("Button",A.text),ctaHref:h("Button link")},K=()=>l("Alignment",t(d,{}),[{label:"Left",value:"left"},{label:"Center",value:"center"},{label:"Right",value:"right"}],"left"),Y=()=>l("Tone",t(f,{}),[{label:"Default",value:"default"},{label:"Muted",value:"dim"}],"default"),M=e=>F({...i[e],keys:{top:"padTop",bottom:"padBottom"},group:!1}),U=(e,o)=>({type:"custom",render:()=>t(p,{parentType:e,label:o})}),q=e=>({type:"custom",render:()=>t(a,{parentType:e})});function b(e){const{photographyGrayscale:o}=m();return y(c,o===!0,t(s,{})).render(e)}function z(){return{type:"custom",render:e=>t(b,{...e})}}const J=[...new Set([...Object.keys(I("full")),...n])];function Q(e){const o=S(e);return o?t(E,{noun:o}):t(g,{})}export{J as WIDTH_ROW_KEYS,K as alignField,j as ctaField,W as heightField,M as innerSpacingFields,z as photographyToggle,q as slotNoticeField,U as slotRowsField,Q as textKindGlyph,Y as toneField};
|