efficient-web-builder 57.0.0 → 58.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -0
- package/dist/editor/components/SectionIcon.js +1 -1
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/components/storefront-editor.css +30 -0
- package/dist/editor/lib/animation/hover-fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Contents/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/FAQ/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ListSearch/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/general/ListSearch/fields.js +1 -0
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/blocks/general/index.js +1 -1
- package/dist/editor/lib/document/box-fields.d.ts +1 -0
- package/dist/editor/lib/document/box-fields.js +1 -1
- package/dist/editor/lib/document/card-display-chips.d.ts +7 -5
- package/dist/editor/lib/document/card-display-chips.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +6 -0
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/panel-drop-empty-headings.js +1 -1
- package/dist/editor/lib/sections/text-layouts.js +1 -1
- package/dist/format/lib/animation/hover.js +1 -1
- package/dist/format/lib/content/accordion-row-style.d.ts +10 -0
- package/dist/format/lib/content/accordion-row-style.js +1 -0
- package/dist/format/lib/content/box-angle.d.ts +9 -0
- package/dist/format/lib/content/box-angle.js +1 -0
- package/dist/format/lib/content/box-background.d.ts +3 -0
- package/dist/format/lib/content/box-background.js +1 -1
- package/dist/format/lib/content/box-layout.d.ts +3 -0
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/card-place.d.ts +4 -0
- package/dist/format/lib/content/card-place.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +3 -0
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/copies-in-box.d.ts +2 -0
- package/dist/format/lib/content/copies-in-box.js +1 -0
- package/dist/format/lib/content/list-query.d.ts +7 -0
- package/dist/format/lib/content/list-query.js +1 -0
- package/dist/format/lib/content/part-display.js +1 -1
- package/dist/format/lib/content/view-hide-class.d.ts +11 -0
- package/dist/format/lib/content/view-hide-class.js +1 -0
- package/dist/format/lib/document/blocks/general/FAQ/card-seed.d.ts +7 -0
- package/dist/format/lib/document/blocks/general/FAQ/card-seed.js +1 -0
- package/dist/format/lib/document/blocks/general/FAQ/meta.d.ts +6 -0
- package/dist/format/lib/document/blocks/general/FAQ/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/ListSearch/meta.d.ts +6 -0
- package/dist/format/lib/document/blocks/general/ListSearch/meta.js +1 -0
- package/dist/format/lib/document/blocks/general/PaymentBadges/meta.d.ts +6 -0
- package/dist/format/lib/document/blocks/general/PaymentBadges/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/metas.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/metas.js +1 -1
- package/dist/format/lib/document/blocks/general/text-part-shapes.json +18 -0
- package/dist/format/lib/document/box-footer.js +1 -1
- package/dist/format/lib/document/container-blocks.js +1 -1
- package/dist/format/lib/document/general-order.d.ts +1 -1
- package/dist/format/lib/document/general-order.js +1 -1
- package/dist/format/lib/document/list-search-scopes.d.ts +4 -0
- package/dist/format/lib/document/list-search-scopes.js +1 -0
- package/dist/format/lib/document/part-inks.d.ts +2 -1
- package/dist/format/lib/document/part-inks.js +1 -1
- package/dist/format/lib/document/section-catalog.d.ts +1 -1
- package/dist/format/lib/document/section-catalog.js +10 -2
- package/dist/format/lib/editor-words-catalogue.d.ts +7 -0
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/editor-words-kept.js +1 -1
- package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
- package/dist/render/components/BoxAccordionRow.d.ts +3 -1
- package/dist/render/components/BoxAccordionRow.js +1 -1
- package/dist/render/components/BoxTabPaneContext.d.ts +5 -0
- package/dist/render/components/BoxTabPaneContext.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +3 -1
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/Cards.js +1 -1
- package/dist/render/components/CategoryBar.d.ts +1 -1
- package/dist/render/components/CategoryBar.js +1 -1
- package/dist/render/components/ChartSection.js +1 -1
- package/dist/render/components/ContactLocations.js +2 -2
- package/dist/render/components/ContentsList.d.ts +3 -3
- package/dist/render/components/ContentsList.js +1 -1
- package/dist/render/components/Countdown.js +1 -1
- package/dist/render/components/Divider.d.ts +1 -2
- package/dist/render/components/Divider.js +1 -1
- package/dist/render/components/DocBody.js +5 -5
- package/dist/render/components/DocMasthead.js +1 -1
- package/dist/render/components/DocMetaCards.js +1 -1
- package/dist/render/components/DocTabs.js +1 -1
- package/dist/render/components/Eyebrow.d.ts +2 -1
- package/dist/render/components/Eyebrow.js +1 -1
- package/dist/render/components/FAQ.d.ts +6 -1
- package/dist/render/components/FAQ.js +1 -1
- package/dist/render/components/FeaturedCover.js +1 -1
- package/dist/render/components/Flex.d.ts +3 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Footprint.js +1 -1
- package/dist/render/components/HeroGroup.d.ts +1 -1
- package/dist/render/components/HeroGroup.js +1 -1
- package/dist/render/components/HeroPictures.js +1 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.d.ts +1 -1
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/InBoxContext.d.ts +1 -1
- package/dist/render/components/InBoxContext.js +1 -1
- package/dist/render/components/IntegrationsSection.js +1 -1
- package/dist/render/components/IntroBleed.js +1 -1
- package/dist/render/components/JoinBox.js +1 -1
- package/dist/render/components/KeyFeatures.js +1 -1
- package/dist/render/components/ListSearchBox.d.ts +7 -0
- package/dist/render/components/ListSearchBox.js +1 -0
- package/dist/render/components/LocationMap.d.ts +2 -1
- package/dist/render/components/LocationMap.js +1 -1
- package/dist/render/components/Logo.d.ts +3 -1
- package/dist/render/components/Logo.js +1 -1
- package/dist/render/components/LogoBlock.js +1 -1
- package/dist/render/components/LongRead.js +1 -1
- package/dist/render/components/Manifesto.js +1 -1
- package/dist/render/components/Masthead.js +1 -1
- package/dist/render/components/MockupSection.js +1 -1
- package/dist/render/components/ParagraphsA.d.ts +2 -1
- package/dist/render/components/ParagraphsA.js +1 -1
- package/dist/render/components/PostCard.d.ts +2 -1
- package/dist/render/components/PostCard.js +1 -1
- package/dist/render/components/ProcessSteps.js +1 -1
- package/dist/render/components/Prose.js +1 -1
- package/dist/render/components/SectionAnimation.d.ts +3 -2
- package/dist/render/components/SectionAnimation.js +1 -1
- package/dist/render/components/SectionEyebrow.d.ts +2 -1
- package/dist/render/components/SectionEyebrow.js +1 -1
- package/dist/render/components/Series.js +1 -1
- package/dist/render/components/SiteGutterFrame.d.ts +2 -2
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/components/Spacer.js +1 -1
- package/dist/render/components/SpecStrip.js +1 -1
- package/dist/render/components/StatsParagraph.js +1 -1
- package/dist/render/components/Testimonials.js +1 -1
- package/dist/render/components/TickerSection.js +1 -1
- package/dist/render/components/Timeline.js +1 -1
- package/dist/render/components/TimelineTrack.js +1 -1
- package/dist/render/components/TitleWithButtons.js +1 -1
- package/dist/render/components/ViewHideRoot.d.ts +23 -0
- package/dist/render/components/ViewHideRoot.js +1 -0
- package/dist/render/lib/content/block-size.d.ts +0 -2
- package/dist/render/lib/content/block-size.js +1 -1
- package/dist/render/lib/content/page-contents.js +1 -1
- package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Contents/render.js +1 -1
- package/dist/render/lib/document/blocks/general/CustomHTML/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Divider/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Eyebrow/render.js +1 -1
- package/dist/render/lib/document/blocks/general/FAQ/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ListSearch/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/ListSearch/render.js +1 -0
- package/dist/render/lib/document/blocks/general/LocationMap/render.js +1 -1
- package/dist/render/lib/document/blocks/general/OrderSummary/card-seed.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/OrderSummary/card-seed.js +1 -0
- package/dist/render/lib/document/blocks/general/ParagraphsA/render.js +1 -1
- package/dist/render/lib/document/blocks/general/PaymentBadges/render.js +1 -1
- package/dist/render/lib/document/blocks/general/PostCard/render.js +1 -1
- package/dist/render/lib/document/blocks/general/SectionHeader/render.js +1 -1
- package/dist/render/lib/document/blocks/general/renders.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/renders.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-checkout.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-checkout.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-docbody.js +2 -2
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.d.ts +12 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/page-render.js +1 -1
- package/dist/render/lib/document/passes/block-size.js +1 -1
- package/dist/render/lib/document/passes/borders.js +1 -1
- package/dist/render/lib/document/passes/box-join.js +1 -1
- package/dist/render/lib/document/passes/cell-width.js +1 -1
- package/dist/render/lib/document/passes/corners.js +1 -1
- package/dist/render/lib/document/passes/head-core.js +1 -1
- package/dist/render/lib/document/passes/hidden-nodes.d.ts +2 -0
- package/dist/render/lib/document/passes/hidden-nodes.js +1 -0
- package/dist/render/lib/document/passes/index.js +1 -1
- package/dist/render/lib/document/passes/section-anchor.js +1 -1
- package/dist/render/lib/document/passes/section-animation.js +1 -1
- package/dist/render/lib/document/passes/section-height.js +1 -1
- package/dist/render/lib/document/passes/section-padding.js +1 -1
- package/dist/render/lib/document/passes/section-sticky.js +1 -1
- package/dist/render/lib/document/passes/section-theme.js +1 -1
- package/dist/render/lib/document/passes/section-width.js +1 -1
- package/dist/render/lib/document/slot-counts.js +1 -1
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/package.json +1 -1
- package/dist/format/lib/document/passes/hidden-nodes.d.ts +0 -2
- package/dist/format/lib/document/passes/hidden-nodes.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 58.0.0 - 2026-11-08
|
|
4
|
+
|
|
5
|
+
From main at `c5488050`: #597, #589, #601, #604, #605, #607, #606, #603. A major: #589 has `!` in its title and removes exports. The peers do not change: `efficient-easel` `^29.0.0` and `efficient-shell` `^12.16.0`. No stored key or value moves (0 stored nodes hold a view-hide key or the two removed phone rows).
|
|
6
|
+
|
|
7
|
+
**For hosts:**
|
|
8
|
+
- A host that imports `blockPhoneHideClass` or `BLOCK_SHOW_KEY` (from `lib/content/block-size`) stops: a node hidden in one view is hidden by the view-hide helper `lib/content/view-hide-class`. `ContentsList` loses its `hideClass` prop and the `Divider` component loses its `hideOnMobile` prop. `cardDisplayField(view)` (`lib/document/card-display-chips`) now takes the view. No host imports any of these today (storefront-blocks, storefront and admin-portal searched: 0) (#589).
|
|
9
|
+
- `lib/document/passes/hidden-nodes` moves from `format/` to `render/`: it provides a React context now. No host imports it (#589).
|
|
10
|
+
- storefront-blocks, on its bump: give each block root the take (`HideTaker` from `render/components/ViewHideRoot`), add a `ListSearch` lazy draw and add `"ListSearch"` to its page-only list (#589, #597). The Divider's old phone Hide row goes, the eye takes its place.
|
|
11
|
+
- A host with `sectionToBoxRow("ProductGrid")` must register its own Product Grid row: `ProductGrid` leaves the builder's head-only rows and joins `HOST_ROW_HEAD_TYPES` and `SECTION_TO_BOX_PRESS`. With the builder alone the dry run plans no ProductGrid conversion (#607).
|
|
12
|
+
|
|
13
|
+
### Removed (BREAKING)
|
|
14
|
+
|
|
15
|
+
- **`blockPhoneHideClass` and `BLOCK_SHOW_KEY`**, the `ContentsList` `hideClass` prop and the `Divider` `hideOnMobile` prop (#589). Two old phone rows go: Contents `Show` (phone) and Divider `Hide` (phone); the eye in the Phone view does their job. The footer Divider's phone line moves from width < 800 to the Phone view line, width < 720.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **A block hides in one view, Tablet or Phone** (#589): the Layers eye and the canvas menu Hide hide in the view you are in (Desktop hides in every view, as before). Card Display chips take one row per view. The hero's phone line moves from width < 719 to the Phone view line, width < 720.
|
|
20
|
+
- **The Product grid row is the host's** (#607): see the host note above.
|
|
21
|
+
- **An unmapped colour slot paints nothing and is not offered** (#604): new `inkTokenOf`; `slotFill` is exported for its guard; `partThemeColors` takes an optional `slots` argument.
|
|
22
|
+
- **Payment Methods leaves the Add menu** (#605): the Logos Box takes its job. New `paymentScaffoldBadges`, `paymentScaffoldAssurances` and `paymentPressStarter`. Stored nodes still draw.
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- **A Box takes an Angle, a theme Fill, and the Payment dot as a Mark Box** (#601): optional Box value `angle` (degrees 0 to 360); new `ANGLE_RANGE`, `BOX_ANGLE_PROP`, `boxAngleStyle`, `boxPaintOf`.
|
|
27
|
+
- **A question search that reads the rows** (#597): a new List search block, with `components/ListSearchBox`, `lib/content/list-query`, `lib/document/list-search-scopes` and a FAQ `listKey` prop.
|
|
28
|
+
- **A new Q&A is an accordion Box of its rows** (#603): accordion `rowStyle`, a FAQ card template and seed, `seedOnInsert` on the card template spec, `copyAttrs` on `CardTemplateRows`; FAQ exports `faqRows` and `faqPageJsonLd`.
|
|
29
|
+
- **An Order Table press lays down a Box of its item rows** (#606): the Order Table's row and card seed, `cardLineBetween`, `linesBetween` on `CardTemplateSpec` and `CardRow`.
|
|
30
|
+
|
|
31
|
+
## 57.1.0 - 2026-11-07
|
|
32
|
+
|
|
33
|
+
From main at `316e1bb7`: #596, #599. A minor: no `!` in either title, no declared export is removed, the peers stay `efficient-easel` `^29.0.0` and `efficient-shell` `^12.16.0`. No stored key or value moves.
|
|
34
|
+
|
|
35
|
+
**For hosts:**
|
|
36
|
+
- efficient-storefront-blocks: a later blocks bump takes `^57.1.0`; its guard `test-panel-no-empty-headings` passes on 57.1.0 and is red on 57.0.0 (#599).
|
|
37
|
+
- A host that stores a Tyre Fitment Form node draws it as before. The type key stays registered; the Fitment Form's answer part draws one verdict per size on a tyre product page (blocks 0.87.0 or later) (#596).
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
|
|
41
|
+
- **The Tyre Fitment Form leaves the Add menu** (#596): the Fitment Form takes its job. `TyreFitment` moves to the retired list with its reason and stays in `UNLISTED_BLOCK_SETS` as `commerce`, so a stored node still draws. "Tyre Fitment Form" stays in the kept editor phrases until the next major. No visible change other than the Add-menu row going away.
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
|
|
45
|
+
- **A band whose rows are all hidden no longer keeps its heading because of the Animation tab's Customize marker** (#599): the Booking and Submit boxes drew an empty Animation tab.
|
|
46
|
+
|
|
3
47
|
## 57.0.0 - 2026-11-07
|
|
4
48
|
|
|
5
49
|
From main at `4fe1b314`: #585, #587, #584, #588, #591, #590, #594, #595. A major: #584, #594 and #595 have `!` in their titles, the peers narrow, and three exports are removed. The peers move to `efficient-easel` `^29.0.0` (was `^28.4.0`) and `efficient-shell` `^12.16.0` (was `^12.13.0`) (#594). No stored key or value moves.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as h,Fragment as t,jsxs as e}from"react/jsx-runtime";import{BlockBannerIcon as
|
|
1
|
+
import{jsx as h,Fragment as t,jsxs as e}from"react/jsx-runtime";import{BlockBannerIcon as M,BlockBoxIcon as n,BlockButtonIcon as g,BlockDividerIcon as a,BlockFooterIcon as x,BlockHeadingIcon as y,BlockProductIcon as p,BlockSocialIcon as w,BlockTextIcon as s,CardPaymentIcon as B,ChatIcon as k,AccountIcon as u,GlobeIcon as I,GridIcon as m,ImageIcon as c,MapIcon as S,MediaIcon as L,PageIcon as F}from"efficient-easel/icons";import{CART_GLYPH as v}from"../../render/components/cartGlyph.js";const H={header:e(t,{children:[h("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),h("path",{d:"M3 9.5h18"})]}),social:e(t,{children:[h("circle",{cx:"6",cy:"12",r:"2.5"}),h("circle",{cx:"18",cy:"6",r:"2.5"}),h("circle",{cx:"18",cy:"18",r:"2.5"}),h("path",{d:"M8.2 10.8l7.6-3.6M8.2 13.2l7.6 3.6"})]}),ticker:e(t,{children:[h("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),h("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),FooterLogo:e(t,{children:[h("path",{d:"M4 15.5h6M4 18h4"}),h("path",{d:"M14 8.5l3 7 3-7"})]}),FooterMenu:h("path",{d:"M6 7h12M6 11h12M6 15h8M6 19h8"}),FooterGroup:e(t,{children:[h("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",strokeDasharray:"3 2.5"}),h("path",{d:"M8 9h8M8 13h8M8 16h5"})]}),FooterText:h("path",{d:"M5 7h14M5 12h14M5 17h9"}),FooterEmailSignup:e(t,{children:[h("rect",{x:"3",y:"6",width:"18",height:"12",rx:"2"}),h("path",{d:"M3.5 7l8.5 6 8.5-6"})]}),SearchBlock:e(t,{children:[h("circle",{cx:"11",cy:"11",r:"6"}),h("path",{d:"M20 20l-4.2-4.2"})]}),CartBlock:v,CountrySwitchBlock:e(t,{children:[h("circle",{cx:"12",cy:"12",r:"8.5"}),h("path",{d:"M3.5 12h17M12 3.5c2.6 2.4 3.6 5.2 3.6 8.5s-1 6.1-3.6 8.5M12 3.5c-2.6 2.4-3.6 5.2-3.6 8.5s1 6.1 3.6 8.5"})]}),ThemeSwitchBlock:e(t,{children:[h("circle",{cx:"12",cy:"12",r:"8.5"}),h("path",{d:"M12 3.5v17M12 5.5l6 6M12 10.5l5.2 5.2M12 15.5l2.8 2.8"})]}),LegalLineBlock:e(t,{children:[h("path",{d:"M3 9h18"}),h("path",{d:"M3 14h8M14 14h2M18 14h3"})]}),Hero:e(t,{children:[h("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),h("path",{d:"M7 13.5h7M7 16.5h10"})]}),HeroSlide:e(t,{children:[h("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),h("path",{d:"M7 15h6M16 9.5h.01M9.5 12l-2.5 3"})]}),HeroSingle:e(t,{children:[h("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),h("path",{d:"M10.5 8.5l4 2.5-4 2.5z"}),h("path",{d:"M7 17h7"})]}),Collections:e(t,{children:[h("rect",{x:"3",y:"5",width:"4.6",height:"14",rx:"1.3"}),h("rect",{x:"9.7",y:"5",width:"4.6",height:"14",rx:"1.3"}),h("rect",{x:"16.4",y:"5",width:"4.6",height:"14",rx:"1.3"})]}),CollectionCard:e(t,{children:[h("rect",{x:"6",y:"4",width:"12",height:"16",rx:"2"}),h("path",{d:"M9 15h6M9 17.5h4"})]}),AlloyWheelsListing:e(t,{children:[h("path",{d:"M3 5h5M3 9h5M3 13h5M3 17h5"}),h("rect",{x:"11.5",y:"5",width:"4.2",height:"5",rx:"1"}),h("rect",{x:"17.3",y:"5",width:"4.2",height:"5",rx:"1"}),h("rect",{x:"11.5",y:"12",width:"4.2",height:"5",rx:"1"}),h("rect",{x:"17.3",y:"12",width:"4.2",height:"5",rx:"1"})]}),CatalogFilterBar:e(t,{children:[h("path",{d:"M3 7h9M15.5 7H21"}),h("circle",{cx:"13.5",cy:"7",r:"1.7"}),h("path",{d:"M3 12h4M10.5 12H21"}),h("circle",{cx:"8.5",cy:"12",r:"1.7"}),h("path",{d:"M3 17h9M15.5 17H21"}),h("circle",{cx:"13.5",cy:"17",r:"1.7"})]}),ProductGrid:e(t,{children:[h("rect",{x:"3",y:"5",width:"4.8",height:"6",rx:"1"}),h("rect",{x:"9.6",y:"5",width:"4.8",height:"6",rx:"1"}),h("rect",{x:"16.2",y:"5",width:"4.8",height:"6",rx:"1"}),h("rect",{x:"3",y:"13",width:"4.8",height:"6",rx:"1"}),h("rect",{x:"9.6",y:"13",width:"4.8",height:"6",rx:"1"}),h("rect",{x:"16.2",y:"13",width:"4.8",height:"6",rx:"1"})]}),RelatedProducts:e(t,{children:[h("path",{d:"M3 5h10"}),h("rect",{x:"3",y:"9.5",width:"5",height:"9",rx:"1"}),h("rect",{x:"9.5",y:"9.5",width:"5",height:"9",rx:"1"}),h("rect",{x:"16",y:"9.5",width:"5",height:"9",rx:"1"})]}),Gallery:e(t,{children:[h("rect",{x:"3",y:"4",width:"11",height:"16",rx:"2"}),h("rect",{x:"15.5",y:"4",width:"5.5",height:"7.5",rx:"1.5"}),h("rect",{x:"15.5",y:"12.5",width:"5.5",height:"7.5",rx:"1.5"})]}),GalleryB:e(t,{children:[h("rect",{x:"3.5",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),h("rect",{x:"13",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),h("rect",{x:"3.5",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"}),h("rect",{x:"13",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"})]}),GalleryItem:e(t,{children:[h("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"}),h("circle",{cx:"9",cy:"10",r:"1.6"}),h("path",{d:"M20 15.5l-4.5-4L7 19"})]}),Events:e(t,{children:[h("rect",{x:"4",y:"5",width:"16",height:"15",rx:"2"}),h("path",{d:"M4 9.5h16M8.5 3v4M15.5 3v4M8 14h2M14 14h2"})]}),PostCard:e(t,{children:[h("rect",{x:"4",y:"3.5",width:"16",height:"17",rx:"2"}),h("rect",{x:"6.5",y:"6",width:"11",height:"6",rx:"1"}),h("path",{d:"M6.5 14.5h11M6.5 17.5h7"})]}),Manifesto:e(t,{children:[h("path",{d:"M7 8h3.2v4c0 1.6-1 2.6-3 3.2"}),h("path",{d:"M14 8h3.2v4c0 1.6-1 2.6-3 3.2"})]}),Stats:e(t,{children:[h("path",{d:"M3.5 20h17"}),h("path",{d:"M6 20v-7M11 20V7M16 20v-5M20.5 20v-9"})]}),Logos:e(t,{children:[h("circle",{cx:"6",cy:"12",r:"2.6"}),h("rect",{x:"10",y:"9.4",width:"5.2",height:"5.2",rx:"1.2"}),h("path",{d:"M19 9.2l2.4 5h-4.8z"})]}),Ticker:e(t,{children:[h("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),h("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),SectionHeader:e(t,{children:[h("rect",{x:"3.5",y:"6",width:"5",height:"5",rx:"1.2"}),h("path",{d:"M11 8.5h9M3.5 15.5h17"})]}),IntroBleed:e(t,{children:[h("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),h("path",{d:"M3 13.5h18M7 16.8h6"})]}),Split:e(t,{children:[h("rect",{x:"3",y:"5",width:"8",height:"14",rx:"1.5"}),h("path",{d:"M14 8.5h6M14 12h6M14 15.5h4"})]}),Eyebrow:e(t,{children:[h("path",{d:"M4 8.5h4.5M11 8.5h9"}),h("path",{d:"M4 14.5h16"})]}),HeroGroup:e(t,{children:[h("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2"}),h("path",{d:"M7 9h8M7 12.5h10M7 16h6"})]}),Form:e(t,{children:[h("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),h("path",{d:"M6.5 9h11M6.5 12.5h11"}),h("rect",{x:"6.5",y:"15",width:"6.5",height:"2.6",rx:"1.3"})]}),LogoBlock:h(t,{children:h("path",{d:"M12 3.5l7.5 3.2v5.1c0 4.2-3.2 7.1-7.5 8.7-4.3-1.6-7.5-4.5-7.5-8.7V6.7z"})}),Spacer:e(t,{children:[h("path",{d:"M12 4v6M9.5 6.5L12 4l2.5 2.5M12 20v-6M9.5 17.5L12 20l2.5-2.5"}),h("path",{d:"M5 13h14",strokeDasharray:"2 2.5"})]}),ContactRouting:e(t,{children:[h("rect",{x:"3",y:"4",width:"5",height:"5",rx:"1"}),h("rect",{x:"9.5",y:"4",width:"5",height:"5",rx:"1"}),h("rect",{x:"16",y:"4",width:"5",height:"5",rx:"1"}),h("path",{d:"M4 13.5h11M4 17.5h7"}),h("path",{d:"M17 15l3 2-3 2"})]}),Contents:e(t,{children:[h("path",{d:"M4 7h2M4 12h2M4 17h2"}),h("path",{d:"M9 7h11M9 12h9M9 17h10"})]}),ListSearch:e(t,{children:[h("path",{d:"M4 6h9M4 11h5M4 16h5"}),h("circle",{cx:"15",cy:"15",r:"4"}),h("path",{d:"M20.5 20.5l-2.7-2.7"})]}),CustomHTML:h("path",{d:"M9 8l-4 4 4 4M15 8l4 4-4 4"})},C=h("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2.5"}),P={footer:x,Footer:x,Divider:a,FooterDivider:a,Banner:M,Flex:n,FooterSocial:w,FooterPayment:B,page:F,website:I,AccountBlock:u,chat:k,Heading:y,Text:s,ImageBlock:c,ButtonBlock:g,LocationMap:S,Grid:m,ProductRef:p,heroMedia:L,heroImage:c,heroImage2:c},G={MenuBlock:"FooterMenu",EmailFormBlock:"FooterEmailSignup",SocialLogosBlock:"FooterSocial",PaymentLogosBlock:"FooterPayment",SiteHeader:"header",SiteFooter:"footer"};function f({type:i,size:r=16,className:d}){const o=G[i]??i,l=P[o];return l?h(l,{size:r,className:d}):h("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",className:d,"aria-hidden":"true",children:H[o]??C})}export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as a,Fragment as y,jsxs as R}from"react/jsx-runtime";import{useCallback as v,useEffect as g,useRef as te,useState as B}from"react";import{SettingsSwitch as oe}from"efficient-easel/panel";import{PagesIcon as re,StylesIcon as ne}from"efficient-easel/rail";import{PaletteIcon as ie}from"efficient-shell/icons/efficient";import{Subtree as se,TreeRow as D}from"efficient-easel/tree";import{useEasel as N}from"efficient-easel/easel";import{useEaselStrings as H}from"efficient-easel/strings";import{LocationsTreeContext as ae}from"./LocationsTreeContext.js";import{usePartTypingDeps as ce}from"./usePartTypingDeps.js";import{copyItemWrite as de}from"../lib/document/card-copy-rows.js";import le from"./PagesPanel.js";import{usePreviewChat as pe}from"./PreviewChatContext.js";import{PREVIEW_DEVICES as me}from"./preview-devices.js";import{PreviewDeviceContext as ue}from"efficient-easel/draw/client";import{usePreviewSocial as fe}from"../../render/components/PreviewSocialContext.js";import{usePreviewSurface as Se}from"./PreviewSurfaceContext.js";import{TICKER_PART_LABEL as Ee,usePreviewTicker as Pe}from"../../render/components/PreviewTickerContext.js";import{heroStoresLegacyTicker as he}from"../../format/lib/hero-ticker.js";import{usePreviewHeroPart as Te}from"../../render/components/PreviewHeroPartContext.js";import{HERO_MEDIA_PARTS as we,HERO_PART_MODE as W,heroMediaRows as ge,heroPartId as M,readHeroPartId as Ie}from"../../render/lib/document/hero-media-parts.js";import be,{CHAT_MODE as ve,HEADER_MODE as _e,SOCIAL_MODE as ke,WEBSITE_MODE as V,WEBSITE_PAGE_MODE as Re}from"./SectionEditor.js";import C from"./SectionIcon.js";import Ce from"./SectionThumbnail.js";import{useScreenDocument as L}from"efficient-easel/screen/components/ScreenDocumentContext";import Le from"./StylesPanel.js";import{LOCATIONS_TYPE as Oe,useLocationsTree as Ae}from"./useLocationsTree.js";import{usePinnedChromeSeed as ye}from"./usePinnedChromeSeed.js";import{useHostDocumentBridge as Be}from"./useHostDocumentBridge.js";import{usePreviewHref as De}from"./usePreviewHref.js";import{WebsitePreviewButton as Ne}from"./WebsitePreviewButton.js";import{SITE_STYLES_BASICS_TAB as He,SITE_STYLES_TABS as We,SITE_STYLES_TEXT_TAB as Me,useWebsiteName as Ve}from"./WebsiteSettingsPanel.js";import{useWebsiteMainAction as xe}from"./useWebsiteMainAction.js";import{VersionHistory as Ge}from"./VersionHistoryDrawer.js";import{useEaselSession as x}from"efficient-easel/screen/lib/session-context";import{useOpenPageName as Ye}from"../lib/page-rows.js";import{HERO_GROUP_TYPE as Fe,heroGroupNestDepth as Ke}from"../../format/lib/hero-group-placement.js";import{stripMarkup as je}from"../../format/lib/markup.js";import{categoryShortLabel as ze,PINNED_SECTION_TYPE as Ue}from"../lib/document/add-palette.js";import{canAddTo as Ze}from"../lib/document/add-target.js";import{cardTemplateSlotsOf as qe}from"../../format/lib/document/card-template-layers.js";import{blockIsOffered as Xe}from"../lib/document/block-offer.js";import{sectionIdOfBoxZone as Je,setBookingPreview as Qe}from"../../render/lib/document/booking-preview.js";import{footerBlockRowName as $e}from"../../format/lib/document/footer-block-row-name.js";import{sourceRowName as et}from"../../format/lib/document/source-row-name.js";import{FOOTER_TYPE as tt,HEADER_TYPE as G}from"../lib/document/footer-blocks.js";import{leftViewForSelection as ot,readLeftView as rt,resolveLeftView as nt,writeLeftView as it}from"../../format/lib/document/left-view.js";import{websiteNodeIsLocked as st}from"../lib/document/locked-blocks.js";import{everyPageNotice as at,noOwnTab as ct,pinnedReach as Y,websiteDuplicateBlocked as dt}from"../lib/document/every-page.js";import{sharedSectionReach as lt,WEBSITE_SHARED_SECTIONS as pt}from"../lib/shared-sections-layer.js";import{activeSharedSections as O,setSharedEditor as F}from"../../format/lib/shared-sections-active.js";import{sharedSectionsOf as mt}from"efficient-easel/screen/lib/shared-sections";import{pinnedChromeInPlace as _}from"../../format/lib/pinned-chrome-lock.js";import{scrollPreviewToSection as ut,scrollPreviewToTop as K}from"efficient-easel/screen/lib/document/preview-dom";import{SiteCanvas as ft}from"../lib/document/overrides.js";import{labelAtLevel as St}from"../../format/lib/document/section-catalog.js";import{WEBSITE_MEDIA_DROP as Et}from"../../format/lib/document/media-drop.js";import{editorWords as Pt,say as u}from"../../format/lib/editor-words.js";import{SECTION_DESCRIPTIONS as ht}from"../../format/lib/document/section-descriptions.js";import{groupAccepts as Tt,isSectionGroupType as wt,sectionGroupZone as gt,SITE_FOOTER_TYPE as j,SITE_HEADER_TYPE as It}from"../../format/lib/document/section-groups.js";import{SaveAsTemplateButton as bt}from"./SaveAsTemplateButton.js";import{resolveSaveAsTemplateAction as vt,SAVE_AS_TEMPLATE_EVENT as _t}from"../../format/lib/save-as-template-action.js";import{cityPalettePresets as kt}from"../lib/sections/city-presets.js";import{newSectionNode as Rt}from"../lib/sections/new-section-node.js";import{useHostProducts as Ct}from"../lib/use-host-products.js";import{backendOf as Lt}from"../lib/website-session.js";function z({mode:e,open:t}){const{setSelectedHeroId:o,setSelectHandler:r}=Pe(),c=H().tree,l=e,n=l.kind==="ticker"?l.heroId:null,s=v(i=>{if(!i)return;t({kind:"ticker",heroId:i}),ut(i)},[t]);return g(()=>{o(n)},[n,o]),g(()=>{r(s)},[r,s]),{partRows:(i,{rowClick:m})=>{const f=String(i.props.id);return i.type==="Hero"&&he(i.props)&&a(D,{icon:a(C,{type:"ticker",size:13}),name:u(Ee),onSelect:()=>s(f),selected:n===f,rowProps:{onClick:m(()=>s(f))},words:c})}}}function U({mode:e,select:t}){const{setSelectedHeroPart:o,setSelectHandler:r}=Te(),c=H().tree,{appState:l}=N(p=>p),n=l.data.content??[],s=te(n);s.current=n;const i=e,m=we.find(p=>W[p]===i.kind),f=m&&"nodeId"in i?M(String(i.nodeId),m):null,E=v(p=>{const d=Ie(p);if(!d)return;const P=s.current.findIndex(T=>String(T.props.id)===d.nodeId);if(P<0)return;const h={kind:W[d.part],nodeId:d.nodeId};t({index:P},h)},[t]);return g(()=>{o(f)},[f,o]),g(()=>{r(E)},[r,E]),{partRows:(p,{rowClick:d})=>{const P=String(p.props.id),h=ge(p);if(h.length===0)return null;const T=S=>{const w=M(P,S.part);return a(D,{icon:a(C,{type:S.part==="media"?"heroMedia":"heroImage",size:13}),name:u(S.label),onSelect:()=>E(w),selected:f===w,rowProps:{onClick:d(()=>E(w))},words:c},w)},[b,...I]=h;return R(y,{children:[T(b),I.length>0&&a(se,{children:I.map(T)})]})}}}function Z(e,t){return{partRows:(o,r)=>R(y,{children:[e.partRows?.(o,r),t.partRows?.(o,r)]})}}function Ot(e){const{adapter:t,capabilities:o,currentSlug:r,siteId:c,docId:l,hasUnsavedEdits:n,bridgeCapabilities:s,notifyParent:i,token:m}=L(),{hasPreviewLink:f}=o,E=Lt(x()).preview?.draftLink,p=xe(e.data),d=vt({hasTrustedConsole:!!m,canCreatePlatformTemplate:s.canCreatePlatformTemplate,capabilities:o,siteId:c,hasUnsavedEdits:n}),P=v(()=>{!c||!r||i(_t,{siteId:c,slug:r})},[i,c,r]),h=De({pageSlug:r,siteId:c,token:m}),T=t.previewHref?.(r)??h;return{barLead:()=>d.visible&&a(bt,{enabled:d.enabled,reason:d.enabled?"":d.disabledReason,onSaved:P}),barView:()=>f&&r&&a(Ne,{liveHref:T,pageId:l??null,draftLink:E}),mainAction:p}}function At(e,t){const{capabilities:o,templateId:r,siteId:c,tokenRef:l,navigate:n}=L(),{hasSiteTheme:s,explainsSiteSettings:i}=o,m=S=>t.setView(S),[f,E]=B(We[0].id),[p,d]=B(!1),{surface:P,setSurface:h}=Se(),T=()=>{if(s){m("styles"),t.reveal(),K();return}e.show(V),e.reveal(),K()},b={id:"pages",label:u("Pages"),icon:a(re,{}),panel:({onHide:S})=>a(le,{activeSurface:P,onPreviewSurface:h,onNavigate:w=>{h(null),n(r?{kind:"template",id:r,pageSlug:w}:{kind:"page",slug:w,siteId:c??void 0})},onClose:S})},I=[];return!s&&i&&I.push({id:"appearance",label:u("Appearance"),icon:a(ie,{}),active:e.kind==="website",onSelect:T}),s&&I.push({id:"styles",label:u("Styles"),icon:a(ne,{}),panel:({onHide:S,notify:w})=>a(Le,{tokenRef:l,siteId:c??void 0,onClose:S,onNotify:w,tab:f,onTabChange:E,revealPageGroup:p,onPageGroupRevealed:()=>d(!1)})}),{railLead:[b],railTrail:I,resolveLeftView:S=>nt(S,s),openSettings:T,openStyles:()=>{E(Me),m("styles")},openPageStyles:s?()=>{E(He),d(!0),m("styles"),t.reveal()}:i?()=>{e.show(Re),e.reveal()}:void 0}}function yt(){const{navigate:e,siteId:t,reloadFromServer:o,docId:r}=L(),c=N(n=>n.config),l=x();g(()=>(F({openPage:n=>e({kind:"page",slug:n.slug,siteId:t??void 0}),reload:()=>{o()},config:c}),()=>F(null)),[e,t,o,c]),g(()=>{const n=O();if(!n||!r)return;let s=!1;return mt(l).list().then(i=>{s||n.learn(i)}).catch(()=>{}),()=>{s=!0}},[r,l])}function q(){const e=ce();return v(t=>{de(t,e)},[e])}function Bt(e,t,o,r){const{kind:c,open:l}=e,{selected:n,zoneOf:s}=t;g(()=>{Qe(n?.type==="BookingBox"&&n.props.region==="confirm"?Je(s(String(n.props.id))):null)},[n?.props.id]);const i=Ae(e,t),{capabilities:{hasSiteSettings:m}}=L();yt();const{chat:f,setChat:E,setSelected:p,setSelectHandler:d}=pe(),P=v(()=>l(ve),[l]),h=c==="chat";g(()=>{p(h)},[h,p]),g(()=>{d(P)},[d,P]);const{setOpenHandler:T}=fe(),b=v(()=>l(ke),[l]);g(()=>{T(b)},[T,b]);const I=Z(z(e),U(e)),S=Ot(t),w=At(e,r),Q=o.device,$=q();return{...I,...S,...w,hasOwnRows:k=>k.type===Oe,ownRows:i.renderLocationTree,sectionPressed:i.sectionPressed,onCopyItem:$,wrap:k=>a(ae.Provider,{value:!0,children:R(ue.Provider,{value:Q,children:[k,a(Ge,{})]})}),addPanelRow:k=>m?R("div",{className:"sf-addside-sitewide",children:[a("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:a(C,{type:"chat",size:16})}),R("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{k(),P()},children:[u("Live chat"),a("span",{className:"sf-addside-sitewide-desc",children:u("A chat bubble on every page")})]}),a(oe,{checked:f.enabled,onChange:ee=>E({enabled:ee}),ariaLabel:u("Show the chat bubble on the whole site")})]}):void 0}}let X=null,A=new WeakMap;function Dt(e){const t=Pt();if(!e||!t)return e;X!==t&&(X=t,A=new WeakMap);let o=A.get(e);return o||(o={...e,choices:e.choices?e.choices.map(r=>({...r,label:u(r.label)})):null,spec:e.spec?{...e.spec,addLabel:u(e.spec.addLabel),...e.spec.childLabel?{childLabel:u(e.spec.childLabel)}:{}}:null},A.set(e,o)),o}const Nt={isLockedBlock:(e,t)=>st(e,t)||!!(t&&O()?.heldElsewhere(t.props.id)),duplicateBlocked:dt,nestDepth:(e,t,o)=>t===Fe?Ke(e,o):0,newSectionNode:Rt,canAddTo:(e,t,o,r)=>Dt(Ze(e,t,r,o)),blockIsOffered:Xe,slotsOf:qe,resolveOnInsert:!0},Ht=new Proxy(ht,{get:(e,t)=>{const o=Reflect.get(e,t);return typeof o=="string"?u(o):o}}),Wt={labelAtLevel:(e,t,o)=>u(St(e,t,o)),descriptions:Ht,categoryLabel:e=>{const t=ze(e);return t===void 0?void 0:u(t)},firstSection:Ue,blockRowName:$e,rowName:et,plainText:je,Icon:C,Thumbnail:Ce,useProducts:Ct,presets:kt()},Mt={desktop:2e3,tablet:800,mobile:390},J="desktop",Vt={options:me,initial:J,fluid:J,widths:Mt},xt={read:rt,write:e=>it(e),forSelection:(e,t)=>ot(e,t)},Gt={first:G,last:tt,firstGroup:It,lastGroup:j,isSectionGroup:wt,sectionGroupZone:gt,panelOf:e=>e===G?_e:null,get sharedReach(){return _()?Ft:void 0},get shared(){return O()?pt:void 0},get groupTab(){return _()?ct:void 0},get groupBadge(){return _()?Y({type:j})??void 0:void 0},get changeNotice(){return _()?at():void 0},get band(){return _()?Yt:void 0},get groupAccepts(){return _()?Tt:void 0}},Yt={foldable:!0},Ft=e=>Y(e)??lt(e);function Kt(e){return{...Z(z(e),U(e)),onCopyItem:q(),openSettings:()=>e.show(V)}}function jt(e,t){ye(e,t),Be()}const ir={useOwnerName:Ve,useDocumentLabel:Ye,useBridges:Bt,useStandaloneBridges:Kt,useDocumentPass:jt,blockRules:Nt,blockLook:Wt,devices:Vt,leftView:xt,pinned:Gt,Canvas:ft,canvasDrag:{media:Et},Inspector:be};export{ir as WEBSITE_SCREEN};
|
|
1
|
+
"use client";import{jsx as a,Fragment as y,jsxs as R}from"react/jsx-runtime";import{useCallback as v,useEffect as g,useRef as te,useState as B}from"react";import{SettingsSwitch as oe}from"efficient-easel/panel";import{PagesIcon as re,StylesIcon as ne}from"efficient-easel/rail";import{PaletteIcon as ie}from"efficient-shell/icons/efficient";import{Subtree as se,TreeRow as D}from"efficient-easel/tree";import{useEasel as N}from"efficient-easel/easel";import{useEaselStrings as H}from"efficient-easel/strings";import{LocationsTreeContext as ae}from"./LocationsTreeContext.js";import{usePartTypingDeps as ce}from"./usePartTypingDeps.js";import{copyItemWrite as de}from"../lib/document/card-copy-rows.js";import le from"./PagesPanel.js";import{usePreviewChat as pe}from"./PreviewChatContext.js";import{PREVIEW_DEVICES as me}from"./preview-devices.js";import{PreviewDeviceContext as ue}from"efficient-easel/draw/client";import{usePreviewSocial as fe}from"../../render/components/PreviewSocialContext.js";import{usePreviewSurface as Se}from"./PreviewSurfaceContext.js";import{TICKER_PART_LABEL as Ee,usePreviewTicker as Pe}from"../../render/components/PreviewTickerContext.js";import{heroStoresLegacyTicker as he}from"../../format/lib/hero-ticker.js";import{usePreviewHeroPart as Te}from"../../render/components/PreviewHeroPartContext.js";import{HERO_MEDIA_PARTS as we,HERO_PART_MODE as W,heroMediaRows as ge,heroPartId as V,readHeroPartId as Ie}from"../../render/lib/document/hero-media-parts.js";import be,{CHAT_MODE as ve,HEADER_MODE as _e,SOCIAL_MODE as ke,WEBSITE_MODE as M,WEBSITE_PAGE_MODE as Re}from"./SectionEditor.js";import C from"./SectionIcon.js";import Ce from"./SectionThumbnail.js";import{useScreenDocument as L}from"efficient-easel/screen/components/ScreenDocumentContext";import Le from"./StylesPanel.js";import{LOCATIONS_TYPE as Oe,useLocationsTree as Ae}from"./useLocationsTree.js";import{usePinnedChromeSeed as ye}from"./usePinnedChromeSeed.js";import{useHostDocumentBridge as Be}from"./useHostDocumentBridge.js";import{usePreviewHref as De}from"./usePreviewHref.js";import{WebsitePreviewButton as Ne}from"./WebsitePreviewButton.js";import{SITE_STYLES_BASICS_TAB as He,SITE_STYLES_TABS as We,SITE_STYLES_TEXT_TAB as Ve,useWebsiteName as Me}from"./WebsiteSettingsPanel.js";import{useWebsiteMainAction as xe}from"./useWebsiteMainAction.js";import{VersionHistory as Ge}from"./VersionHistoryDrawer.js";import{useEaselSession as x}from"efficient-easel/screen/lib/session-context";import{useOpenPageName as Ye}from"../lib/page-rows.js";import{HERO_GROUP_TYPE as Fe,heroGroupNestDepth as Ke}from"../../format/lib/hero-group-placement.js";import{stripMarkup as je}from"../../format/lib/markup.js";import{categoryShortLabel as ze,PINNED_SECTION_TYPE as Ue}from"../lib/document/add-palette.js";import{canAddTo as Ze}from"../lib/document/add-target.js";import{cardTemplateSlotsOf as qe}from"../../format/lib/document/card-template-layers.js";import{blockIsOffered as Xe}from"../lib/document/block-offer.js";import{sectionIdOfBoxZone as Je,setBookingPreview as Qe}from"../../render/lib/document/booking-preview.js";import{footerBlockRowName as $e}from"../../format/lib/document/footer-block-row-name.js";import{sourceRowName as et}from"../../format/lib/document/source-row-name.js";import{FOOTER_TYPE as tt,HEADER_TYPE as G}from"../lib/document/footer-blocks.js";import{leftViewForSelection as ot,readLeftView as rt,resolveLeftView as nt,writeLeftView as it}from"../../format/lib/document/left-view.js";import{websiteNodeIsLocked as st}from"../lib/document/locked-blocks.js";import{everyPageNotice as at,noOwnTab as ct,pinnedReach as Y,websiteDuplicateBlocked as dt}from"../lib/document/every-page.js";import{sharedSectionReach as lt,WEBSITE_SHARED_SECTIONS as pt}from"../lib/shared-sections-layer.js";import{activeSharedSections as O,setSharedEditor as F}from"../../format/lib/shared-sections-active.js";import{sharedSectionsOf as mt}from"efficient-easel/screen/lib/shared-sections";import{pinnedChromeInPlace as _}from"../../format/lib/pinned-chrome-lock.js";import{scrollPreviewToSection as ut,scrollPreviewToTop as K}from"efficient-easel/screen/lib/document/preview-dom";import{SiteCanvas as ft}from"../lib/document/overrides.js";import{labelAtLevel as St}from"../../format/lib/document/section-catalog.js";import{WEBSITE_MEDIA_DROP as Et}from"../../format/lib/document/media-drop.js";import{editorWords as Pt,say as u}from"../../format/lib/editor-words.js";import{SECTION_DESCRIPTIONS as ht}from"../../format/lib/document/section-descriptions.js";import{groupAccepts as Tt,isSectionGroupType as wt,sectionGroupZone as gt,SITE_FOOTER_TYPE as j,SITE_HEADER_TYPE as It}from"../../format/lib/document/section-groups.js";import{SaveAsTemplateButton as bt}from"./SaveAsTemplateButton.js";import{resolveSaveAsTemplateAction as vt,SAVE_AS_TEMPLATE_EVENT as _t}from"../../format/lib/save-as-template-action.js";import{cityPalettePresets as kt}from"../lib/sections/city-presets.js";import{newSectionNode as Rt}from"../lib/sections/new-section-node.js";import{useHostProducts as Ct}from"../lib/use-host-products.js";import{backendOf as Lt}from"../lib/website-session.js";function z({mode:e,open:t}){const{setSelectedHeroId:o,setSelectHandler:r}=Pe(),c=H().tree,l=e,n=l.kind==="ticker"?l.heroId:null,s=v(i=>{if(!i)return;t({kind:"ticker",heroId:i}),ut(i)},[t]);return g(()=>{o(n)},[n,o]),g(()=>{r(s)},[r,s]),{partRows:(i,{rowClick:m})=>{const f=String(i.props.id);return i.type==="Hero"&&he(i.props)&&a(D,{icon:a(C,{type:"ticker",size:13}),name:u(Ee),onSelect:()=>s(f),selected:n===f,rowProps:{onClick:m(()=>s(f))},words:c})}}}function U({mode:e,select:t}){const{setSelectedHeroPart:o,setSelectHandler:r}=Te(),c=H().tree,{appState:l}=N(p=>p),n=l.data.content??[],s=te(n);s.current=n;const i=e,m=we.find(p=>W[p]===i.kind),f=m&&"nodeId"in i?V(String(i.nodeId),m):null,E=v(p=>{const d=Ie(p);if(!d)return;const P=s.current.findIndex(T=>String(T.props.id)===d.nodeId);if(P<0)return;const h={kind:W[d.part],nodeId:d.nodeId};t({index:P},h)},[t]);return g(()=>{o(f)},[f,o]),g(()=>{r(E)},[r,E]),{partRows:(p,{rowClick:d})=>{const P=String(p.props.id),h=ge(p);if(h.length===0)return null;const T=S=>{const w=V(P,S.part);return a(D,{icon:a(C,{type:S.part==="media"?"heroMedia":"heroImage",size:13}),name:u(S.label),onSelect:()=>E(w),selected:f===w,rowProps:{onClick:d(()=>E(w))},words:c},w)},[b,...I]=h;return R(y,{children:[T(b),I.length>0&&a(se,{children:I.map(T)})]})}}}function Z(e,t){return{partRows:(o,r)=>R(y,{children:[e.partRows?.(o,r),t.partRows?.(o,r)]})}}function Ot(e){const{adapter:t,capabilities:o,currentSlug:r,siteId:c,docId:l,hasUnsavedEdits:n,bridgeCapabilities:s,notifyParent:i,token:m}=L(),{hasPreviewLink:f}=o,E=Lt(x()).preview?.draftLink,p=xe(e.data),d=vt({hasTrustedConsole:!!m,canCreatePlatformTemplate:s.canCreatePlatformTemplate,capabilities:o,siteId:c,hasUnsavedEdits:n}),P=v(()=>{!c||!r||i(_t,{siteId:c,slug:r})},[i,c,r]),h=De({pageSlug:r,siteId:c,token:m}),T=t.previewHref?.(r)??h;return{barLead:()=>d.visible&&a(bt,{enabled:d.enabled,reason:d.enabled?"":d.disabledReason,onSaved:P}),barView:()=>f&&r&&a(Ne,{liveHref:T,pageId:l??null,draftLink:E}),mainAction:p}}function At(e,t){const{capabilities:o,templateId:r,siteId:c,tokenRef:l,navigate:n}=L(),{hasSiteTheme:s,explainsSiteSettings:i}=o,m=S=>t.setView(S),[f,E]=B(We[0].id),[p,d]=B(!1),{surface:P,setSurface:h}=Se(),T=()=>{if(s){m("styles"),t.reveal(),K();return}e.show(M),e.reveal(),K()},b={id:"pages",label:u("Pages"),icon:a(re,{}),panel:({onHide:S})=>a(le,{activeSurface:P,onPreviewSurface:h,onNavigate:w=>{h(null),n(r?{kind:"template",id:r,pageSlug:w}:{kind:"page",slug:w,siteId:c??void 0})},onClose:S})},I=[];return!s&&i&&I.push({id:"appearance",label:u("Appearance"),icon:a(ie,{}),active:e.kind==="website",onSelect:T}),s&&I.push({id:"styles",label:u("Styles"),icon:a(ne,{}),panel:({onHide:S,notify:w})=>a(Le,{tokenRef:l,siteId:c??void 0,onClose:S,onNotify:w,tab:f,onTabChange:E,revealPageGroup:p,onPageGroupRevealed:()=>d(!1)})}),{railLead:[b],railTrail:I,resolveLeftView:S=>nt(S,s),openSettings:T,openStyles:()=>{E(Ve),m("styles")},openPageStyles:s?()=>{E(He),d(!0),m("styles"),t.reveal()}:i?()=>{e.show(Re),e.reveal()}:void 0}}function yt(){const{navigate:e,siteId:t,reloadFromServer:o,docId:r}=L(),c=N(n=>n.config),l=x();g(()=>(F({openPage:n=>e({kind:"page",slug:n.slug,siteId:t??void 0}),reload:()=>{o()},config:c}),()=>F(null)),[e,t,o,c]),g(()=>{const n=O();if(!n||!r)return;let s=!1;return mt(l).list().then(i=>{s||n.learn(i)}).catch(()=>{}),()=>{s=!0}},[r,l])}function q(){const e=ce();return v(t=>{de(t,e)},[e])}function Bt(e,t,o,r){const{kind:c,open:l}=e,{selected:n,zoneOf:s}=t;g(()=>{Qe(n?.type==="BookingBox"&&n.props.region==="confirm"?Je(s(String(n.props.id))):null)},[n?.props.id]);const i=Ae(e,t),{capabilities:{hasSiteSettings:m}}=L();yt();const{chat:f,setChat:E,setSelected:p,setSelectHandler:d}=pe(),P=v(()=>l(ve),[l]),h=c==="chat";g(()=>{p(h)},[h,p]),g(()=>{d(P)},[d,P]);const{setOpenHandler:T}=fe(),b=v(()=>l(ke),[l]);g(()=>{T(b)},[T,b]);const I=Z(z(e),U(e)),S=Ot(t),w=At(e,r),Q=o.device,$=q();return{...I,...S,...w,hasOwnRows:k=>k.type===Oe,ownRows:i.renderLocationTree,sectionPressed:i.sectionPressed,onCopyItem:$,wrap:k=>a(ae.Provider,{value:!0,children:R(ue.Provider,{value:Q,children:[k,a(Ge,{})]})}),addPanelRow:k=>m?R("div",{className:"sf-addside-sitewide",children:[a("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:a(C,{type:"chat",size:16})}),R("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{k(),P()},children:[u("Live chat"),a("span",{className:"sf-addside-sitewide-desc",children:u("A chat bubble on every page")})]}),a(oe,{checked:f.enabled,onChange:ee=>E({enabled:ee}),ariaLabel:u("Show the chat bubble on the whole site")})]}):void 0}}let X=null,A=new WeakMap;function Dt(e){const t=Pt();if(!e||!t)return e;X!==t&&(X=t,A=new WeakMap);let o=A.get(e);return o||(o={...e,choices:e.choices?e.choices.map(r=>({...r,label:u(r.label)})):null,spec:e.spec?{...e.spec,addLabel:u(e.spec.addLabel),...e.spec.childLabel?{childLabel:u(e.spec.childLabel)}:{}}:null},A.set(e,o)),o}const Nt={isLockedBlock:(e,t)=>st(e,t)||!!(t&&O()?.heldElsewhere(t.props.id)),duplicateBlocked:dt,nestDepth:(e,t,o)=>t===Fe?Ke(e,o):0,newSectionNode:Rt,canAddTo:(e,t,o,r)=>Dt(Ze(e,t,r,o)),blockIsOffered:Xe,slotsOf:qe,resolveOnInsert:!0},Ht=new Proxy(ht,{get:(e,t)=>{const o=Reflect.get(e,t);return typeof o=="string"?u(o):o}}),Wt={labelAtLevel:(e,t,o)=>u(St(e,t,o)),descriptions:Ht,categoryLabel:e=>{const t=ze(e);return t===void 0?void 0:u(t)},firstSection:Ue,blockRowName:$e,rowName:et,plainText:je,Icon:C,Thumbnail:Ce,useProducts:Ct,presets:kt()},Vt={desktop:2e3,tablet:800,mobile:390},J="desktop",Mt={options:me,initial:J,fluid:J,widths:Vt,hidesPerView:!0},xt={read:rt,write:e=>it(e),forSelection:(e,t)=>ot(e,t)},Gt={first:G,last:tt,firstGroup:It,lastGroup:j,isSectionGroup:wt,sectionGroupZone:gt,panelOf:e=>e===G?_e:null,get sharedReach(){return _()?Ft:void 0},get shared(){return O()?pt:void 0},get groupTab(){return _()?ct:void 0},get groupBadge(){return _()?Y({type:j})??void 0:void 0},get changeNotice(){return _()?at():void 0},get band(){return _()?Yt:void 0},get groupAccepts(){return _()?Tt:void 0}},Yt={foldable:!0},Ft=e=>Y(e)??lt(e);function Kt(e){return{...Z(z(e),U(e)),onCopyItem:q(),openSettings:()=>e.show(M)}}function jt(e,t){ye(e,t),Be()}const ir={useOwnerName:Me,useDocumentLabel:Ye,useBridges:Bt,useStandaloneBridges:Kt,useDocumentPass:jt,blockRules:Nt,blockLook:Wt,devices:Mt,leftView:xt,pinned:Gt,Canvas:ft,canvasDrag:{media:Et},Inspector:be};export{ir as WEBSITE_SCREEN};
|
|
@@ -753,6 +753,36 @@
|
|
|
753
753
|
pointer-events: auto !important;
|
|
754
754
|
}
|
|
755
755
|
|
|
756
|
+
/* ── A block hidden in some views ─────────────────────────────────────────
|
|
757
|
+
On the page, a block hidden in a view has its own root `display: none`
|
|
758
|
+
there (passes/hidden-nodes, components/ViewHideRoot), so the Box keeps no
|
|
759
|
+
cell and no gap for it. On the canvas the engine's own item
|
|
760
|
+
(`[data-easel-block]`) stands round the block, with the part host
|
|
761
|
+
(`data-sf-part-host`, display: contents) between them for a block with
|
|
762
|
+
parts, and would stay as an empty Box item, with its gap and its share. The
|
|
763
|
+
root names its hidden views (`data-sf-view-hide="tablet mobile"`), so the
|
|
764
|
+
item goes in the same views, on the editor's view widths (720 and 1100,
|
|
765
|
+
lib/content/view-hide-class). The block stays in Layers, where the eye
|
|
766
|
+
shows it again. */
|
|
767
|
+
@media (width < 720px) {
|
|
768
|
+
[data-easel-block]:has(> [data-sf-view-hide~="mobile"]),
|
|
769
|
+
[data-easel-block]:has(> [data-sf-part-host] > [data-sf-view-hide~="mobile"]) {
|
|
770
|
+
display: none;
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
@media (720px <= width < 1100px) {
|
|
774
|
+
[data-easel-block]:has(> [data-sf-view-hide~="tablet"]),
|
|
775
|
+
[data-easel-block]:has(> [data-sf-part-host] > [data-sf-view-hide~="tablet"]) {
|
|
776
|
+
display: none;
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
@media (width >= 1100px) {
|
|
780
|
+
[data-easel-block]:has(> [data-sf-view-hide~="desktop"]),
|
|
781
|
+
[data-easel-block]:has(> [data-sf-part-host] > [data-sf-view-hide~="desktop"]) {
|
|
782
|
+
display: none;
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
|
|
756
786
|
/* @tokens canvas-end */
|
|
757
787
|
|
|
758
788
|
/* ── Canvas "Add section" seams (overlay between preview sections) ──────────
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{ContrastIcon as
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{ContrastIcon as K,NoSymbolIcon as P,HoverLiftIcon as g,HoverNextImageIcon as y,HoverRotateIcon as A,HoverZoomIcon as H,OpacityIcon as U}from"efficient-easel/icons";import{customize as F,describedAs as b,group as W}from"efficient-easel/screen/lib/document/box-fields";import{effectTiles as z}from"efficient-easel/screen/lib/document/effect-tiles";import{deviceField as n}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as B,noControlField as L}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{BOX_DARKEN as c}from"../../../format/lib/content/box-background.js";import{cardTemplateField as M,cardTemplateOwner as Y,namedRowField as X}from"../../../format/lib/content/card-template.js";import{angleRow as j,slider as v}from"../document/box-fields.js";import{say as I}from"../../../format/lib/editor-words.js";import{withShowWhen as a}from"../../../format/lib/document/show-when-attach.js";import{animationDelayField as O,animationDurationField as w,showsWhatRuns as h}from"./AnimationDurationRow.js";import{CARD_HOVER_KEYS as s,CARD_HOVER_KINDS as Z,CARD_HOVER_TURN as G,HOVER_KEY as m,HOVER_KIND_LABELS as T,NEXT_PICTURE_BLOCKS as q,NEXT_PICTURE_HOVER_KINDS as J,OLD_SPIN_KEY as Q,PART_HOVER_KINDS as N,PICTURE_HOVER_KEYS as k,PICTURE_HOVER_KINDS as $,PICTURE_HOVER_ZOOM as l,cardHoverAngleOf as oo,cardHoverKindOf as eo,cardRotatesRule as to,HOVER_GROUP_KEY as R,pictureHoverKindOf as ro,pictureHoverMovesRule as no,pictureHoverRunsRule as io}from"../../../format/lib/animation/hover.js";const f=o=>n("desktop",W("Hover",{dot:o})),C=()=>n("desktop",F()),so="What this does when a shopper points at it, or taps it on a phone.",ao="What this picture does when a shopper points at it. Black and white shows it in grey until then. A phone shows its colour.",po="What this picture does when a shopper points at the card. Show next image fades to the card's next photo. Black and white shows it in grey until then. A phone shows the first photo in colour.",co="What each card does when a shopper points at it, or taps it on a phone. Rotate turns the wheel picture.",lo={none:()=>i(P,{}),nextImage:()=>i(y,{}),rotate:()=>i(A,{}),zoom:()=>i(H,{}),lift:()=>i(g,{}),mono:()=>i(K,{})};function _(o,e){const r=z({label:I("Hover effect"),options:o.map(t=>({value:t,label:I(T[t]),picture:lo[t]()})),fallback:e});return b(r,{type:"select",label:"Hover effect",options:o.map(t=>({value:t,label:T[t]}))})}function ko(){return{[R]:f({field:m,in:N.filter(o=>o!=="none")}),[m]:n("desktop",{..._(N,"none"),description:so})}}function Co(o){const e=to(o),r=j(G);return{[R]:f(e),[s.kind]:n("desktop",{...h(_(Z,o),(t,p)=>eo(p??{},o)),description:co}),[Q]:L({type:"custom",render:()=>i(B,{})},"always"),_cHover:C(),[s.angle]:n("desktop",a(h(r,t=>oo(t)),e)),[s.duration]:n("desktop",a(w("hover"),e)),[s.delay]:n("desktop",a(O("hover"),e))}}function xo(o,e=""){const r=io(o);return{[R]:f(r),[s.kind]:x($,o,ao),_cHover:C(),...q.includes(e)?mo():{},[s.duration]:n("desktop",a(w("hover"),r)),[s.delay]:n("desktop",a(O("hover"),r))}}function mo(){const o=no(),e=v("Zoom",i(H,{}),l.min,l.max,l.step,l.min,l.unit),r=v("Darken on hover",i(U,{}),c.min,c.max,c.step,c.fallback,c.unit);return{[k.zoom]:n("desktop",a(e,o)),[k.darken]:n("desktop",a(r,o))}}function x(o,e,r){const t=n("desktop",{...h(_(o,e),p=>ro({[m]:p},e,o)),description:r});return Object.assign(t,{[S]:e})}const S="sfPictureResting",V=new WeakMap;function So(o,e,r){const t=o[s.kind],p=t?.[S];if(!t||!p)return o;const E=e.props?.[m]==="nextImage",u=E?null:Y(r.appState,e.props?.id),D=u?M(String(u.type),X(e.props),u):null;if(!E&&!D?.next)return o;let d=V.get(o);return d||(d={...o,[s.kind]:x(J,p,po)},V.set(o,d)),d}export{Co as cardHoverFields,ko as hoverFields,So as offerNextPicture,xo as pictureHoverFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{HashIcon as i,StickyIcon as m}from"efficient-easel/icons";import{group as r,select as s}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as t}from"efficient-easel/screen/lib/document/device-fields";import{LIST_NUMBER_FORMS as p,LIST_NUMBER_FORM_DEFAULT as _}from"../../../../../../format/lib/content/list-number.js";import{CONTENTS_NUMBER_FORM_KEY as d}from"../../../../../../render/lib/content/page-contents.js";import{SECTION_STICK_LABEL as e}from"../../../../../../format/lib/content/section-sticky.js";import{text as f,toggle as E}from"../../../controls.js";import{CONTENTS_PH as N}from"../../../../../../format/lib/document/blocks/general/Contents/meta.js";const I={fields:{title:t("desktop",f("Heading",N.title)),_gList:t("desktop",r("List")),[d]:t("desktop",s("Number",o(i,{}),p,_)),_gStick:t("desktop",r(e)),sticky:t("desktop",E(e,!0,o(m,{})))}};export{I as ContentsFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{StylesIcon as l,WeightIcon as c,WidthIcon as p}from"efficient-easel/icons";import{swapPadding as d}from"../../../controls.js";import{keptByRow as m}from"efficient-easel/screen/lib/document/style-fields";import{iconPickerRow as a,sidesPaddingFields as f,slider as s}from"../../../box-fields.js";import{LAYOUT_CELL as I,dividerPicture as _}from"../../../choice-pictures.js";import{DEFAULT_DIVIDER_STYLE as o,DIVIDER_SPACE_PX as g,DIVIDER_STYLE_OPTIONS as D,parseDividerSpacing as E}from"../../../../../../format/lib/sections/divider-style.js";import{withRowRules as P}from"../../../../../../render/lib/document/show-when.js";const h={any:[{field:"style",set:!1},{field:"style",is:o}]},L={not:{field:"style",is:"none"}},w={fields:P({style:a("Style",i(l,{}),D.map(e=>({...e,picture:_(e.value)})),o,{columns:3,cell:I}),spacing:m("sectionPaddingTop"),thickness:s("Thickness",i(c,{}),1,8,1,1,"px"),lengthPct:s("Length",i(p,{}),10,100,1,100,"%")},[[["thickness"],h],[["lengthPct"],L]]),resolveFields:(e,{fields:r})=>{const t=g[E(e.props.spacing)],n=f({fallback:{top:t,bottom:t},tablet:!0});return d(r,n)}};export{w as DividerFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import{ChevronIcon as l}from"efficient-easel/icons";import{copyText as m,linkField as p,plainTextarea as u,text as s,textarea as c,toggle as f}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{SPLITTABLE_SECTIONS as T,headFieldsForPlacement as d}from"../../../../../../format/lib/sections/section-head-placement.js";import{withRowsShownWhen as h}from"../../../../../../format/lib/document/show-when-attach.js";import{ENTRANCE_KEYS as A,LEGACY_ENTRANCE_KEY as E}from"../../../../../../render/lib/animation/entrance.js";import{drawsCopiesInTheBox as F}from"../../../../../../format/lib/content/copies-in-box.js";import{phoneKey as _}from"efficient-easel/draw";import{FAQ_PH as n,FAQSlots as w}from"../../../../../../format/lib/document/blocks/general/FAQ/meta.js";const i="faqOnTemplate",x={not:{context:i,is:!0}},N={[i]:t=>F("FAQ",t.props??{})},Q=new Set([E,...Object.values(A).flatMap(t=>[t,_(t)])]);function g(t){return Object.keys(t).filter(e=>["num","title","linkText","linkHref","anchor"].includes(e)||e.startsWith("sectionPadding")||e.startsWith("sectionHeight")||Q.has(e))}const b={fields:{_gContent:o("Content"),num:s("Number",n.num),title:c("Heading",n.title),linkText:s("Button",n.link),linkHref:p("Link"),_gQuestions:o("Questions"),items:{type:"array",label:"Questions",arrayFields:{question:m("Question"),answer:u("Answer")},getItemSummary:t=>t.question||"Question"},_gLayout:o("Layout"),defaultOpen:f("Open first answer",!0,a(l,{})),...w},resolveFields:(t,{fields:e})=>{const r=d(e,t.props.headPlacement,T.FAQ.headRows);return h(r,g(r),x)},showWhenFacts:N};export{b as FAQFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{phoneKey as t,tabletKey as r}from"efficient-easel/draw";import{BOX_CARD_PAD as w,BOX_SWATCH_PROP as So,isBackgroundBox as mo}from"../../../../../../format/lib/content/box-background.js";import{CARD_ROW_FACTS as fo,cardRowField as ho,cardRowFields as Oo}from"../../../card-row-fields.js";import{darkenFields as uo}from"../../../darken-fields.js";import{BOX_TAB_SHAPES as Ro,REEL_SHAPE_LABELS as Ao}from"../../../../../../format/lib/reel.js";import{LAYOUT_CELL as k,CARD_LIST_STYLE_PICTURES as wo,TAB_SHAPE_PICTURES as Co}from"../../../choice-pictures.js";import{CARD_STYLE_KEY as R,CARD_STYLE_POINTS as Eo,applyCardStyle as To,isCardStyle as go}from"../../../../../../render/lib/sections/card-list-style.js";import{deviceField as d}from"efficient-easel/screen/lib/document/device-fields";import{ChevronDownIcon as Do,ClockIcon as No,CropIcon as H,GapIcon as Lo,MediaLayoutStackedIcon as bo,LineBetweenIcon as Io,LineSolidIcon as Fo,ShadowIcon as ko,StylesIcon as P,TableIcon as x,TargetIcon as Ho,WrapIcon as W}from"efficient-easel/icons";import{boxBlockSpacingField as Po,boxFillField as xo,boxColumnsFields as Wo,boxShareField as Bo,boxSharePhoneField as yo,boxShareTabletField as Mo,containerDirectionField as Uo,containerGapRows as Ko,linkField as Xo,plainText as jo,swapPadding as B,toggle as c,upload as y,withPanelOnly as Yo}from"../../../controls.js";import{BOX_STACK_LINE as M,BOX_STACK_RANGE as E,STACK_BELOW_PROP as U}from"../../../../../../render/lib/content/box-stack-line.js";import{BOX_SHAPES as K,boxShapeOf as vo}from"../../../../../../format/lib/content/box-shape.js";import{shapeLines as X}from"../../../../../../format/lib/content/gallery-card-layout.js";import{shapePickerRow as j}from"../../../shape-picker.js";import{BOX_COLUMNS_MAX as T,BOX_COLUMNS_MIN as g,boxPhoneRowOneLine as Go,boxWrapWordOf as Y}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as v}from"../../../../../../format/lib/content/box-separator.js";import{BOX_WRAP_LABEL as G,VIEW_KEY_ACCESS as a,group as m,phoneTwinFields as s}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as Vo,boxJustifyField as Jo,boxWrapField as C,iconPickerRow as V,placementField as zo,select as D,sidesPaddingFields as J,slider as qo}from"../../../box-fields.js";import{withRowRules as Qo}from"../../../../../../render/lib/document/show-when.js";import{separatorField as Zo}from"../../../separator-field.js";import{LOOP_SCROLLS as $o}from"../../../../../../format/lib/animation/index.js";import{DEFAULT_TICKER_JOIN as oe,TICKER_JOIN_OPTIONS as ee}from"../../../../../../format/lib/sections/ticker-join.js";import{NOT_HELD_BY_A_NODE as ne}from"../../../../../../format/lib/document/passes/document-position.js";import{accordionOnSet as te}from"../../../box-accordion-seed.js";import{FlexSlots as z}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{BOX_TYPE as re,CONTAINER_BLOCKS_SLOT as ie}from"../../../../../../format/lib/document/container-blocks.js";import{boxPhoneOrderField as le}from"../../../box-phone-order-field.js";import{CARD_BOX_FACTS as ae,ON_A_CARD as se,cardDisplayField as de}from"../../../card-display-chips.js";import{MIRROR_CARDS_FACTS as ce,MIRROR_CARDS_MIRRORS as pe,mirrorCardsField as _e}from"../../../mirror-cards-field.js";import{handedRowOf as q}from"../../../../../../format/lib/document/row-hand.js";import{SHOW_FOR_FACTS as Se,showForField as me,showForFields as fe}from"../../../show-for-field.js";import{SHARED_COLUMNS_KEY as f,SHARED_COLUMNS_LABEL as Q,SHARED_COLUMNS_OFF as Z,sharedColumnsDrawn as $,sharedColumnsFits as oo,SHARED_COLUMNS_PHONE_POINTS as he,SHARED_COLUMNS_POINTS as Oe,sharedRowsDrawn as ue}from"../../../../../../render/lib/content/box-shared-columns.js";const N={field:"bgImage",set:!0},eo={all:[{field:"phoneRow",in:[2,3]},{not:{field:"direction",is:"accordion"}}]},Re={field:"direction",is:"tabs"},Ae={field:"line",in:[!0,!1]},we={field:"anchor",set:!0},L=["fixed","screen"],Ce={not:{any:[{field:"sectionHeightMode",in:L},{field:"sectionHeightModeTablet",in:L},{field:"sectionHeightModePhone",in:L}]}},Ee={context:"parent.line",is:!0},p={not:{field:"direction",is:"accordion"}},no="notAccordionRow",Te={not:{context:no,is:!0}},ge={[no]:(o,e)=>e.parent?.props?.direction!=="accordion"},b={field:"direction",is:"row",default:"row"},_={not:$o},h={all:[b,_,{not:{field:"separator",in:v.map(o=>o.value)}},{not:{field:"line",is:!0}}]},to={all:[h,...["columns",r("columns")].map(o=>({not:{field:o,in:Array.from({length:T},(e,n)=>n+g)}}))]},De={all:[_,{not:{all:[b,{field:"separator",in:v.map(o=>o.value)}]}}]},I={not:{all:[h,{field:"columns",in:Array.from({length:T},(o,e)=>e+g)}]}},Ne="sharedColumnsFits",ro="sharedColumnsMisfit",io="sharedColumnsDraws",lo="sharedColumnsPhoneDraws",Le={[Ne]:o=>oo(o.props??{}),[ro]:o=>!oo(o.props??{}),[io]:o=>$(o.props??{}).desktop,[lo]:o=>$(o.props??{}).phone};function ao(o){return{all:[{not:{context:ro,is:!0}},{any:[se,{field:o,set:!0}]}]}}const S={not:{context:io,is:!0}},O={not:{context:lo,is:!0}},so="sharedRowsDraws",be={[so]:(o,e)=>ue(o.props??{})&&q(e.appState,o.props?.id)?.row===void 0},A={not:{context:so,is:!0}},Ie={any:[S,O]},F={not:N},Fe={not:{context:pe,is:!0}},co="rowHanded",ke={not:{context:co,is:!0}},He={[co]:(o,e)=>{const n=q(e.appState,o.props?.id);return n===void 0?void 0:n?.row!==void 0}},po={all:[p,F,S,O,Fe]},Pe={field:"direction",is:"row"},xe={field:"align",in:["start","center","end"]},We={all:[{field:"darken",set:!0},{not:{field:"darken",in:[0,"0"]}}]};function Be(){const{darken:o,darkenStyle:e}=uo();return{...s("darken",o,a),...s("darkenStyle",e,a)}}const _o={not:{all:[h,{field:r("columns"),in:Array.from({length:T},(o,e)=>e+g)}]}};function ye(){const o=c(G,!1,i(W,{})),e=n=>{const l=Y(n);return l===void 0?void 0:l==="wrap"};return{...C(),render:n=>o.render({...n,value:e(n.value),follows:e(n.follows)??!1,onChange:l=>n.onChange(l===void 0?void 0:l?"wrap":"nowrap")})}}function Me(){const o=c(G,!0,i(W,{})),e=n=>{const l=Y(n);return l===void 0?void 0:l==="wrap"};return{...C(),render:n=>{const l=n.followsView==="tablet";return o.render({...n,value:e(n.value),follows:!Go(void 0,l?n.follows:void 0),followsNoView:!l,onChange:u=>n.onChange(u===void 0?void 0:u?"wrap":"nowrap")})}}}const wn={fields:Qo({_gContent:m("Content"),rowTitle:z.rowTitle,content:z.content,_gCardDisplay:m("Display"),cardDisplay:de(),showFor:me(),_gLayout:m("Layout"),direction:Uo("Flex"),tabShape:V("Tab shape",i(P,{}),Ro.map(o=>({label:Ao[o],value:o,picture:Co[o]})),"tabs",{columns:2,cell:k}),mirrorCards:_e(),[U]:d("desktop",qo("Stacks below",i(bo,{}),E.min,E.max,E.step,M,"px",{clear:{hint:M},hint:"Under this screen width the blocks stand one under another, with the Phone Gap and Padding."})),startsOpen:d("desktop",c("Starts open",!1,i(Do,{}))),label:Yo(jo("Tab name")),...Ko("Flex"),...s("justify",Jo(),a),...s("align",Vo(),a),...(()=>{const o=s("wrap",C(),a,{phoneRow:Me()}),e=s("wrap",C(),a,{phoneRow:ye()});return{wrap:e.wrap,[r("wrap")]:e[r("wrap")],[t("wrap")]:o[t("wrap")]}})(),[t("order")]:le(),...s("boxShape",j("Box shape",i(H,{}),X(K),"shape","auto"),a,{phoneRow:j("Box shape",i(H,{}),X(K),"shape","auto",{phoneRest:o=>vo(o)})}),separator:Zo(i(Io,{size:18}),"none"),[R]:d("desktop",V("Card style",i(P,{}),Eo.map(o=>({...o,picture:wo[o.value]})),"table",{columns:2,cell:k})),share:d("desktop",Bo()),[r("share")]:Mo(),[t("share")]:yo(),[f]:d("desktop",D(Q,i(x,{}),[...Oe],Z)),[t(f)]:d("mobile",D(Q,i(x,{}),[...he],Z)),...Wo(),...s("blockSpacing",Po(),a),line:c("Line",!1,i(Fo,{}),"A line across the blocks, with a dot on each."),upcoming:c("Upcoming",!1,i(No,{}),"Still to come: a hollow dot, and the gold line stops before it."),join:D("Join",i(Lo,{}),ee,oe),_gShadow:m("Shadow"),...s("shadow",c("Shadow",!1,i(ko,{})),a),...s("fillColor",xo(),a),[So]:ho("Fill content","colour"),_gBackground:m("Background image"),bgImage:d("desktop",y("Image","image/*")),bgImagePhone:d("mobile",y("Image","image/*")),...Be(),placement:zo("Content position"),_gLink:m("Link"),link:Xo("Link to"),jumpHighlight:c("Highlight when a link jumps here",!1,i(Ho,{}),"When a link lands on this Box's anchor, the Box gets a main color outline and its first block turns the main color.")},[[["darken","darkenStyle","placement"],N],[[t("share")],{all:[eo,O]}],[[f],ao(f)],[[t(f)],ao(t(f))],[[t("wrap")],{all:[eo,_,O,A]}],[[t("order")],{all:[h,O,S]}],[["phoneRow"],{all:[O,p]}],[["tabShape"],Re],[["rowTitle","startsOpen"],Te],[["align","blockSpacing",r("blockSpacing"),t("blockSpacing")],p],[[r("justify"),t("justify")],{all:[_,po,A]}],[[r("align"),t("align")],{all:[Pe,xe,po]}],[[r("wrap")],{all:[_,I,_o,S,p,A]}],[[r("shadow"),t("shadow")],F],[[r("darken"),t("darken"),r("darkenStyle"),t("darkenStyle")],{all:[N,We]}],[["separator"],b],[[R],{field:R,set:!0}],[["columns",r("columns")],h],[[U],{all:[h,F,_o,{not:{all:[to,{field:r("share"),set:!0}]}}]}],[[r("gap")],De],[["justify"],{all:[_,Ie,p,A]}],[["wrap"],{all:[_,I,S,p,A]}],[["share"],{all:[I,S,p]}],[[r("share")],{all:[to,S]}],[["line"],Ae],[["upcoming"],Ee],[["jumpHighlight"],we],[["boxShape",r("boxShape"),t("boxShape")],Ce],[["direction","share",t("order")],ke],[["join"],ne]]),resolveData:(o,e)=>{const n=o.props,l=n[R];return e.changed?.[R]===!0&&go(l)?{...o,props:To(n,l,re,ie)}:n.direction==="accordion"&&(e.trigger==="insert"||e.changed?.direction===!0)?{...o,props:te(n)}:o},resolveFields:(o,e)=>fe(Ue(o,{...e,fields:Oo(e.fields,o,e)}),o.props),showWhenFacts:{...fo,...ae,...ce,...He,...Le,...be,...Se,...ge}};function Ue(...[o,{fields:e}]){{const n=o.props;if(mo(n.bgImage)){const u=J({fallback:{top:w.desktop,bottom:w.desktop,left:w.side,right:w.side},tablet:!0});return B(e,u)}return o.props.padV2!==!0?B(e,J({fallback:{top:24,bottom:24},tablet:!0})):e}}export{wn as FlexFields};
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{phoneKey as r,tabletKey as i}from"efficient-easel/draw";import{BOX_CARD_PAD as C,BOX_SWATCH_PROP as Ro,isBackgroundBox as uo}from"../../../../../../format/lib/content/box-background.js";import{CARD_ROW_FACTS as Ao,cardRowField as Co,cardRowFields as wo}from"../../../card-row-fields.js";import{darkenFields as To}from"../../../darken-fields.js";import{BOX_TAB_SHAPES as Eo,REEL_SHAPE_LABELS as No}from"../../../../../../format/lib/reel.js";import{LAYOUT_CELL as x,CARD_LIST_STYLE_PICTURES as go,TAB_SHAPE_PICTURES as Do}from"../../../choice-pictures.js";import{CARD_STYLE_KEY as u,CARD_STYLE_POINTS as Lo,applyCardStyle as Io,isCardStyle as bo}from"../../../../../../render/lib/sections/card-list-style.js";import{deviceField as l}from"efficient-easel/screen/lib/document/device-fields";import{ChevronDownIcon as Fo,ClockIcon as Po,CropIcon as y,GapIcon as ko,MediaLayoutStackedIcon as Ho,LineBetweenIcon as xo,LineSolidIcon as yo,ListIcon as Wo,NumberedListIcon as W,ShadowIcon as Bo,StylesIcon as B,TableIcon as M,TargetIcon as Mo,WrapIcon as U}from"efficient-easel/icons";import{boxBlockSpacingField as Uo,boxFillField as Ko,boxColumnsFields as Xo,boxShareField as Yo,boxSharePhoneField as jo,boxShareTabletField as vo,containerDirectionField as Go,containerGapRows as Vo,linkField as Jo,plainText as zo,swapPadding as K,toggle as c,upload as X,withPanelOnly as qo}from"../../../controls.js";import{BOX_STACK_LINE as Y,BOX_STACK_RANGE as T,STACK_BELOW_PROP as j}from"../../../../../../render/lib/content/box-stack-line.js";import{BOX_SHAPES as v,boxShapeOf as Qo}from"../../../../../../format/lib/content/box-shape.js";import{BOX_ANGLE_PROP as Zo}from"../../../../../../format/lib/content/box-angle.js";import{shapeLines as G}from"../../../../../../format/lib/content/gallery-card-layout.js";import{shapePickerRow as V}from"../../../shape-picker.js";import{ACCORDION_COLUMN_COUNTS as $o,ACCORDION_PHONE_COLUMN_COUNTS as oe,BOX_COLUMNS_MAX as E,BOX_COLUMNS_MIN as N,boxPhoneRowOneLine as ee,boxWrapWordOf as J}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as z}from"../../../../../../format/lib/content/box-separator.js";import{BOX_WRAP_LABEL as q,VIEW_KEY_ACCESS as s,group as m,phoneTwinFields as d}from"efficient-easel/screen/lib/document/box-fields";import{angleRow as ne,boxAlignField as te,boxJustifyField as re,boxWrapField as w,iconPickerRow as g,placementField as ie,select as D,sidesPaddingFields as Q,slider as ae}from"../../../box-fields.js";import{withRowRules as le}from"../../../../../../render/lib/document/show-when.js";import{separatorField as se}from"../../../separator-field.js";import{LOOP_SCROLLS as de}from"../../../../../../format/lib/animation/index.js";import{DEFAULT_TICKER_JOIN as ce,TICKER_JOIN_OPTIONS as pe}from"../../../../../../format/lib/sections/ticker-join.js";import{NOT_HELD_BY_A_NODE as _e}from"../../../../../../format/lib/document/passes/document-position.js";import{accordionOnSet as Se}from"../../../box-accordion-seed.js";import{ACCORDION_ROW_STYLE_POINTS as Oe,ACCORDION_ROW_STYLE_PROP as L}from"../../../../../../format/lib/content/accordion-row-style.js";import{FlexSlots as Z}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{BOX_TYPE as me,CONTAINER_BLOCKS_SLOT as fe}from"../../../../../../format/lib/document/container-blocks.js";import{boxPhoneOrderField as he}from"../../../box-phone-order-field.js";import{CARD_BOX_FACTS as Re,ON_A_CARD as ue,cardDisplayField as I}from"../../../card-display-chips.js";import{MIRROR_CARDS_FACTS as Ae,MIRROR_CARDS_MIRRORS as Ce,mirrorCardsField as we}from"../../../mirror-cards-field.js";import{handedRowOf as $}from"../../../../../../format/lib/document/row-hand.js";import{SHOW_FOR_FACTS as Te,showForField as Ee,showForFields as Ne}from"../../../show-for-field.js";import{SHARED_COLUMNS_KEY as f,SHARED_COLUMNS_LABEL as oo,SHARED_COLUMNS_OFF as eo,sharedColumnsDrawn as no,sharedColumnsFits as to,SHARED_COLUMNS_PHONE_POINTS as ge,SHARED_COLUMNS_POINTS as De,sharedRowsDrawn as Le}from"../../../../../../render/lib/content/box-shared-columns.js";const b={field:"bgImage",set:!0},ro={all:[{field:"phoneRow",in:[2,3]},{not:{field:"direction",is:"accordion"}}]},Ie={field:"direction",is:"tabs"},be={field:"line",in:[!0,!1]},Fe={field:"anchor",set:!0},F=["fixed","screen"],Pe={not:{any:[{field:"sectionHeightMode",in:F},{field:"sectionHeightModeTablet",in:F},{field:"sectionHeightModePhone",in:F}]}},ke={context:"parent.line",is:!0},p={not:{field:"direction",is:"accordion"}},io={field:"direction",is:"accordion"},ao={any:[p,{not:{field:L,is:"numbered"}},{field:"columns",in:[...$o]},{field:"phoneRow",in:[...oe]}]},lo="notAccordionRow",He={not:{context:lo,is:!0}},xe={[lo]:(o,e)=>e.parent?.props?.direction!=="accordion"},P={field:"direction",is:"row",default:"row"},_={not:de},S={all:[P,_,{not:{field:"separator",in:z.map(o=>o.value)}},{not:{field:"line",is:!0}}]},so={all:[S,...["columns",i("columns")].map(o=>({not:{field:o,in:Array.from({length:E},(e,n)=>n+N)}}))]},ye={all:[_,{not:{all:[P,{field:"separator",in:z.map(o=>o.value)}]}}]},k={not:{all:[S,{field:"columns",in:Array.from({length:E},(o,e)=>e+N)}]}},We="sharedColumnsFits",co="sharedColumnsMisfit",po="sharedColumnsDraws",_o="sharedColumnsPhoneDraws",Be={[We]:o=>to(o.props??{}),[co]:o=>!to(o.props??{}),[po]:o=>no(o.props??{}).desktop,[_o]:o=>no(o.props??{}).phone};function So(o){return{all:[{not:{context:co,is:!0}},{any:[ue,{field:o,set:!0}]}]}}const O={not:{context:po,is:!0}},h={not:{context:_o,is:!0}},Oo="sharedRowsDraws",Me={[Oo]:(o,e)=>Le(o.props??{})&&$(e.appState,o.props?.id)?.row===void 0},A={not:{context:Oo,is:!0}},Ue={any:[O,h]},H={not:b},Ke={not:{context:Ce,is:!0}},mo="rowHanded",Xe={not:{context:mo,is:!0}},Ye={[mo]:(o,e)=>{const n=$(e.appState,o.props?.id);return n===void 0?void 0:n?.row!==void 0}},fo={all:[p,H,O,h,Ke]},je={field:"direction",is:"row"},ve={field:"align",in:["start","center","end"]},Ge={all:[{field:"darken",set:!0},{not:{field:"darken",in:[0,"0"]}}]};function Ve(){const{darken:o,darkenStyle:e}=To();return{...d("darken",o,s),...d("darkenStyle",e,s)}}const ho={not:{all:[S,{field:i("columns"),in:Array.from({length:E},(o,e)=>e+N)}]}};function Je(){const o=c(q,!1,t(U,{})),e=n=>{const a=J(n);return a===void 0?void 0:a==="wrap"};return{...w(),render:n=>o.render({...n,value:e(n.value),follows:e(n.follows)??!1,onChange:a=>n.onChange(a===void 0?void 0:a?"wrap":"nowrap")})}}function ze(){const o=c(q,!0,t(U,{})),e=n=>{const a=J(n);return a===void 0?void 0:a==="wrap"};return{...w(),render:n=>{const a=n.followsView==="tablet";return o.render({...n,value:e(n.value),follows:!ee(void 0,a?n.follows:void 0),followsNoView:!a,onChange:R=>n.onChange(R===void 0?void 0:R?"wrap":"nowrap")})}}}const kn={fields:le({_gContent:m("Content"),rowTitle:Z.rowTitle,content:Z.content,_gCardDisplay:m("Display"),cardDisplay:I("desktop"),cardDisplayTablet:I("tablet"),cardDisplayPhone:I("mobile"),showFor:Ee(),_gLayout:m("Layout"),direction:Go("Flex"),tabShape:g("Tab shape",t(B,{}),Eo.map(o=>({label:No[o],value:o,picture:Do[o]})),"tabs",{columns:2,cell:x}),mirrorCards:we(),[j]:l("desktop",ae("Stacks below",t(Ho,{}),T.min,T.max,T.step,Y,"px",{clear:{hint:Y},hint:"Under this screen width the blocks stand one under another, with the Phone Gap and Padding."})),startsOpen:l("desktop",c("Starts open",!1,t(Fo,{}))),[L]:l("desktop",g("Row style",t(W,{}),Oe.map(o=>({...o,picture:o.value==="numbered"?t(W,{}):t(Wo,{})})),"plain",{columns:2})),label:qo(zo("Tab name")),...Vo("Flex"),...d("justify",re(),s),...d("align",te(),s),...(()=>{const o=d("wrap",w(),s,{phoneRow:ze()}),e=d("wrap",w(),s,{phoneRow:Je()});return{wrap:e.wrap,[i("wrap")]:e[i("wrap")],[r("wrap")]:o[r("wrap")]}})(),[r("order")]:he(),...d("boxShape",V("Box shape",t(y,{}),G(v),"shape","auto"),s,{phoneRow:V("Box shape",t(y,{}),G(v),"shape","auto",{phoneRest:o=>Qo(o)})}),[Zo]:l("desktop",ne(0,{clear:{hint:0},hint:"Turns the box. 0° is straight."})),separator:se(t(xo,{size:18}),"none"),[u]:l("desktop",g("Card style",t(B,{}),Lo.map(o=>({...o,picture:go[o.value]})),"table",{columns:2,cell:x})),share:l("desktop",Yo()),[i("share")]:vo(),[r("share")]:jo(),[f]:l("desktop",D(oo,t(M,{}),[...De],eo)),[r(f)]:l("mobile",D(oo,t(M,{}),[...ge],eo)),...Xo(),...d("blockSpacing",Uo(),s),line:c("Line",!1,t(yo,{}),"A line across the blocks, with a dot on each."),upcoming:c("Upcoming",!1,t(Po,{}),"Still to come: a hollow dot, and the gold line stops before it."),join:D("Join",t(ko,{}),pe,ce),_gShadow:m("Shadow"),...d("shadow",c("Shadow",!1,t(Bo,{})),s),...d("fillColor",Ko(),s),[Ro]:Co("Fill content","colour"),_gBackground:m("Background image"),bgImage:l("desktop",X("Image","image/*")),bgImagePhone:l("mobile",X("Image","image/*")),...Ve(),placement:ie("Content position"),_gLink:m("Link"),link:Jo("Link to"),jumpHighlight:c("Highlight when a link jumps here",!1,t(Mo,{}),"When a link lands on this Box's anchor, the Box gets a main color outline and its first block turns the main color.")},[[["darken","darkenStyle","placement"],b],[[r("share")],{all:[ro,h]}],[[f],So(f)],[[r(f)],So(r(f))],[[r("wrap")],{all:[ro,_,h,A]}],[[r("order")],{all:[S,h,O]}],[["phoneRow"],h],[[L],io],[["tabShape"],Ie],[["rowTitle","startsOpen"],He],[["align","blockSpacing",i("blockSpacing"),r("blockSpacing")],p],[[i("justify"),r("justify")],{all:[_,fo,A]}],[[i("align"),r("align")],{all:[je,ve,fo]}],[[i("wrap")],{all:[_,k,ho,O,p,A]}],[[i("shadow"),r("shadow")],H],[[i("darken"),r("darken"),i("darkenStyle"),r("darkenStyle")],{all:[b,Ge]}],[["separator"],P],[[u],{field:u,set:!0}],[["columns"],{any:[S,io]}],[[i("columns")],S],[[j],{all:[S,H,ho,{not:{all:[so,{field:i("share"),set:!0}]}}]}],[[i("gap")],{all:[ye,ao]}],[["gap",r("gap")],ao],[["justify"],{all:[_,Ue,p,A]}],[["wrap"],{all:[_,k,O,p,A]}],[["share"],{all:[k,O,p]}],[[i("share")],{all:[so,O]}],[["line"],be],[["upcoming"],ke],[["jumpHighlight"],Fe],[["boxShape",i("boxShape"),r("boxShape")],Pe],[["direction","share",r("order")],Xe],[["join"],_e]]),resolveData:(o,e)=>{const n=o.props,a=n[u];return e.changed?.[u]===!0&&bo(a)?{...o,props:Io(n,a,me,fe)}:n.direction==="accordion"&&(e.trigger==="insert"||e.changed?.direction===!0)?{...o,props:Se(n)}:o},resolveFields:(o,e)=>Ne(qe(o,{...e,fields:wo(e.fields,o,e)}),o.props),showWhenFacts:{...Ao,...Re,...Ae,...Ye,...Be,...Me,...Te,...xe}};function qe(...[o,{fields:e}]){{const n=o.props;if(uo(n.bgImage)){const R=Q({fallback:{top:C.desktop,bottom:C.desktop,left:C.side,right:C.side},tablet:!0});return K(e,R)}return o.props.padV2!==!0?K(e,Q({fallback:{top:24,bottom:24},tablet:!0})):e}}export{kn as FlexFields};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{group as i}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as t}from"efficient-easel/screen/lib/document/device-fields";import{text as o}from"../../../controls.js";import{LIST_SEARCH_PH as e}from"../../../../../../format/lib/document/blocks/general/ListSearch/meta.js";const d={fields:{_gContent:t("desktop",i("Content")),hint:t("desktop",o("Hint",e.hint)),noMatchText:t("desktop",o("No match",e.noMatchText))}};export{d as ListSearchFields};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const assembleGeneralBlocks: () => Record<"Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "
|
|
2
|
-
export declare const generalBlocks: Record<"Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "
|
|
1
|
+
export declare const assembleGeneralBlocks: () => Record<"Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "Footprint" | "Prose" | "ParagraphsA" | "Cards" | "Stats" | "Chart" | "Mockup" | "Banner" | "TitleWithButtons" | "Countdown" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocBody" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Logos" | "DocMasthead" | "Masthead" | "Grid" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "StatsParagraph" | "Testimonials" | "PaymentBadges" | "Heading" | "Text" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ListSearch" | "ButtonBlock" | "CardList" | "PostCard" | "HeroSlide" | "HeroGroup" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
2
|
+
export declare const generalBlocks: Record<"Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "Footprint" | "Prose" | "ParagraphsA" | "Cards" | "Stats" | "Chart" | "Mockup" | "Banner" | "TitleWithButtons" | "Countdown" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocBody" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Logos" | "DocMasthead" | "Masthead" | "Grid" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "StatsParagraph" | "Testimonials" | "PaymentBadges" | "Heading" | "Text" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ListSearch" | "ButtonBlock" | "CardList" | "PostCard" | "HeroSlide" | "HeroGroup" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{assembleBlocks as o}from"../../../../../format/lib/document/blocks/block-types.js";import{registerGeneralSectionRows as r}from"../../../../../render/lib/document/blocks/general/section-to-box-rows.js";import{BannerFields as e}from"./Banner/fields.js";import{BreadcrumbFields as i}from"./Breadcrumb/fields.js";import{ButtonBlockFields as t}from"./ButtonBlock/fields.js";import{CardsFields as m}from"./Cards/fields.js";import{CategoryBarFields as s}from"./CategoryBar/fields.js";import{ChartFields as d}from"./Chart/fields.js";import{ContactLocationsFields as l}from"./ContactLocations/fields.js";import{CountdownFields as a}from"./Countdown/fields.js";import{CustomHTMLFields as p}from"../../../../../format/lib/document/blocks/general/CustomHTML/fields.js";import{DividerFields as F}from"./Divider/fields.js";import{ContentsFields as f}from"./Contents/fields.js";import{
|
|
1
|
+
import{assembleBlocks as o}from"../../../../../format/lib/document/blocks/block-types.js";import{registerGeneralSectionRows as r}from"../../../../../render/lib/document/blocks/general/section-to-box-rows.js";import{BannerFields as e}from"./Banner/fields.js";import{BreadcrumbFields as i}from"./Breadcrumb/fields.js";import{ButtonBlockFields as t}from"./ButtonBlock/fields.js";import{CardsFields as m}from"./Cards/fields.js";import{CategoryBarFields as s}from"./CategoryBar/fields.js";import{ChartFields as d}from"./Chart/fields.js";import{ContactLocationsFields as l}from"./ContactLocations/fields.js";import{CountdownFields as a}from"./Countdown/fields.js";import{CustomHTMLFields as p}from"../../../../../format/lib/document/blocks/general/CustomHTML/fields.js";import{DividerFields as F}from"./Divider/fields.js";import{ContentsFields as f}from"./Contents/fields.js";import{ListSearchFields as n}from"./ListSearch/fields.js";import{DocBodyFields as c}from"./DocBody/fields.js";import{DocMastheadFields as S}from"./DocMasthead/fields.js";import{DocMetaCardsFields as B}from"./DocMetaCards/fields.js";import{DocTabsFields as g}from"./DocTabs/fields.js";import{EyebrowFields as C}from"./Eyebrow/fields.js";import{FAQFields as u}from"./FAQ/fields.js";import{FeaturedCoverFields as L}from"./FeaturedCover/fields.js";import{FlexFields as T}from"./Flex/fields.js";import{FootprintFields as k}from"./Footprint/fields.js";import{GridFields as h}from"./Grid/fields.js";import{HeadingFields as H}from"./Heading/fields.js";import{HeroFields as M}from"./Hero/fields.js";import{HeroGroupFields as y}from"./HeroGroup/fields.js";import{HeroSingleFields as D}from"./HeroSingle/fields.js";import{HeroSlideFields as P}from"./HeroSlide/fields.js";import{ImageBlockFields as E}from"./ImageBlock/fields.js";import{IntegrationsFields as b}from"./Integrations/fields.js";import{IntroBleedFields as G}from"./IntroBleed/fields.js";import{KeyFeaturesFields as I}from"./KeyFeatures/fields.js";import{LocationMapFields as R}from"./LocationMap/fields.js";import{LogoBlockFields as x}from"./LogoBlock/fields.js";import{LogosFields as A}from"./Logos/fields.js";import{LongReadFields as w}from"./LongRead/fields.js";import{ManifestoFields as v}from"./Manifesto/fields.js";import{MastheadFields as N}from"./Masthead/fields.js";import{MockupFields as K}from"./Mockup/fields.js";import{OrderSummaryFields as O}from"./OrderSummary/fields.js";import{CardListFields as Q}from"./CardList/fields.js";import{ParagraphsAFields as W}from"./ParagraphsA/fields.js";import{PaymentBadgesFields as _}from"./PaymentBadges/fields.js";import{PostCardFields as j}from"./PostCard/fields.js";import{ProcessStepsFields as q}from"./ProcessSteps/fields.js";import{ProseFields as z}from"./Prose/fields.js";import{SectionHeaderFields as J}from"./SectionHeader/fields.js";import{SeriesFields as U}from"./Series/fields.js";import{SpacerFields as V}from"../../../../../format/lib/document/blocks/general/Spacer/fields.js";import{SpecStripFields as X}from"./SpecStrip/fields.js";import{SplitFields as Y}from"./Split/fields.js";import{StatsFields as Z}from"./Stats/fields.js";import{StatsParagraphFields as $}from"./StatsParagraph/fields.js";import{TestimonialsFields as oo}from"./Testimonials/fields.js";import{TextFields as ro}from"./Text/fields.js";import{TickerFields as eo}from"./Ticker/fields.js";import{TimelineFields as io}from"./Timeline/fields.js";import{TimelineTrackFields as to}from"./TimelineTrack/fields.js";import{TitleWithButtonsFields as mo}from"./TitleWithButtons/fields.js";import{GENERAL_RENDERS as so}from"../../../../../render/lib/document/blocks/general/renders.js";const lo={Banner:e,Breadcrumb:i,ButtonBlock:t,Cards:m,CategoryBar:s,Chart:d,ContactLocations:l,Countdown:a,CustomHTML:p,Divider:F,Contents:f,ListSearch:n,DocBody:c,DocMasthead:S,DocMetaCards:B,DocTabs:g,Eyebrow:C,FAQ:u,FeaturedCover:L,Flex:T,Footprint:k,Grid:h,Heading:H,Hero:M,HeroGroup:y,HeroSingle:D,HeroSlide:P,ImageBlock:E,Integrations:b,IntroBleed:G,KeyFeatures:I,LocationMap:R,LogoBlock:x,Logos:A,LongRead:w,Manifesto:v,Masthead:N,Mockup:K,OrderSummary:O,CardList:Q,ParagraphsA:W,PaymentBadges:_,PostCard:j,ProcessSteps:q,Prose:z,SectionHeader:J,Series:U,Spacer:V,SpecStrip:X,Split:Y,Stats:Z,StatsParagraph:$,Testimonials:oo,Text:ro,Ticker:eo,Timeline:io,TimelineTrack:to,TitleWithButtons:mo},ao=()=>(r(),o(so,lo)),gr=ao();export{ao as assembleGeneralBlocks,gr as generalBlocks};
|
|
@@ -21,6 +21,7 @@ export declare const placementField: Rows["placementField"];
|
|
|
21
21
|
export declare const PlacementGridView: Rows["PlacementGridView"];
|
|
22
22
|
export declare const positionFields: Rows["positionFields"];
|
|
23
23
|
export declare const sidesPaddingFields: Rows["sidesPaddingFields"];
|
|
24
|
+
export declare function angleRow(fallback: number, options?: Parameters<Rows["slider"]>[7]): ReturnType<Rows["slider"]>;
|
|
24
25
|
export declare function ShellIconWord({ value }: {
|
|
25
26
|
value: string;
|
|
26
27
|
}): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createElement as
|
|
1
|
+
import{createElement as l}from"react";import{SettingsDefaultReset as I,SettingsField as P}from"efficient-easel/panel";import{boxFieldBuilders as R,describedAs as W,iconOf as G,onDesktopWords as E}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS as O}from"efficient-easel/screen/lib/content/length-units";import{IconPicker as L,Tooltip as C,useShellStrings as D}from"efficient-shell/ui";import{RotateIcon as T}from"efficient-easel/icons";import{ANGLE_RANGE as f}from"../../../format/lib/content/box-angle.js";import{editorEaselWords as V,say as s}from"../../../format/lib/editor-words.js";const h=o=>s(o),_=O,t=R(h,{paddingUnits:_}),U=t.slider,ee=t.select,ne=t.Segmented,oe=t.segmented,te=t.alignmentField,le=t.alignmentFields,ie=t.blockAlignmentField,se=t.blockAlignmentFields,ce=t.boxJustifyField,de=t.boxAlignField,re=t.boxWrapField,ae=t.directionField,pe=t.gapField,fe=t.placementField,me=t.PlacementGridView,ue=t.positionFields,xe=t.sidesPaddingFields;function ge(o,i){return U("Angle",l(T),f.min,f.max,f.step,o,"°",i)}const H={width:"3.5rem",height:"2.75rem"};function J({value:o}){return D().iconNames[o]??o}function B(o,i,e){return l(C,{content:e,className:"sf-pick-tip",children:l("span",{className:"sf-pick"},l("span",{className:"sf-pick-pic"},o),l("span",{className:"sf-pick-cap"},i))})}function Y(o){const i=e=>e.label===void 0?l(J,{value:e.value}):s(e.label);return o.map(e=>({value:e.value,...e.label===void 0?{}:{label:s(e.hint??e.label)},icon:B(e.picture,i(e),e.hint===void 0?i(e):s(e.hint))}))}function Fe(o,i){return l("span",{className:"sf-pick"},l("span",{className:"sf-pick-pic"},o),l("span",{className:"sf-pick-cap sf-pick-cap-closed"},i))}function we(o,i,e,m,c={}){const k=n=>e.some(d=>d.value===n),r=n=>c.resolve?c.resolve(n):k(n)?n:void 0,u=e.map(n=>({value:n.value,...n.label===void 0?{}:{label:n.label},...n.showWhen?{showWhen:n.showWhen}:{}}));return{type:"custom",...W({},{type:"radio",label:o,options:u}),options:u,render:n=>{const{value:d,onChange:x,field:g}=n,F=g?.options,N=Y(e.filter(p=>!F||F.some(y=>y.value===p.value))),w="follows"in n,a=w?r(c.phoneRest?c.phoneRest(n.follows):n.follows)??m:void 0,v=g?.currentValue,A=r(d)??a??r(v)??m,S=d!=null&&d!=="",b=a===void 0?void 0:e.find(p=>p.value===a);return l(P,{label:s(o),icon:G(i),action:w?l(I,{words:V()?.panel,label:s(o),changed:S,detail:b?.label!==void 0?E(h,s(b.label),n.followsView):void 0,disabled:n.readOnly===!0,onReset:()=>x(void 0)}):void 0},l(L,{label:s(o),value:A,options:N,onChange:x,columns:c.columns,cell:c.cell??H,tooltips:!1,disabled:n.readOnly===!0}))}}}export{_ as PADDING_UNITS,me as PlacementGridView,ne as Segmented,J as ShellIconWord,te as alignmentField,le as alignmentFields,ge as angleRow,ie as blockAlignmentField,se as blockAlignmentFields,de as boxAlignField,ce as boxJustifyField,re as boxWrapField,ae as directionField,pe as gapField,we as iconPickerRow,B as pickerCellIcon,Y as pickerCellsOf,Fe as pickerNoneIcon,fe as placementField,ue as positionFields,h as rowSay,oe as segmented,ee as select,xe as sidesPaddingFields,U as slider};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ViewTier } from "efficient-easel/draw";
|
|
1
2
|
import { type BlockShowWhenFacts, type ShowWhenRule } from "../../../format/lib/document/show-when-attach.js";
|
|
2
3
|
export declare const NOT_CARD_OF_TEMPLATE = "notCardOfTemplate";
|
|
3
4
|
export declare const ON_A_CARD: ShowWhenRule;
|
|
@@ -10,27 +11,28 @@ type Card = {
|
|
|
10
11
|
type?: unknown;
|
|
11
12
|
props: Record<string, unknown>;
|
|
12
13
|
};
|
|
13
|
-
export declare function cardDisplayParts(card: Card, locked?: (child: Child) => boolean): Child[];
|
|
14
|
-
export declare function cardDisplayItems(card: Card, label: (child: Child) => string, locked?: (child: Child) => boolean): {
|
|
14
|
+
export declare function cardDisplayParts(card: Card, locked?: (child: Child) => boolean, view?: ViewTier): Child[];
|
|
15
|
+
export declare function cardDisplayItems(card: Card, label: (child: Child) => string, locked?: (child: Child) => boolean, view?: ViewTier): {
|
|
15
16
|
id: string;
|
|
16
17
|
label: string;
|
|
17
18
|
shown: boolean;
|
|
18
19
|
}[];
|
|
19
|
-
export declare function withChildShown<C extends Card>(card: C, id: string, shown: boolean): C;
|
|
20
|
+
export declare function withChildShown<C extends Card>(card: C, id: string, shown: boolean, view?: ViewTier): C;
|
|
20
21
|
type ChipOwner = {
|
|
21
22
|
type?: unknown;
|
|
22
23
|
props?: Record<string, unknown>;
|
|
23
24
|
} | null | undefined;
|
|
24
25
|
export declare function cardChipLabel(child: Child, ownerType: string | undefined, layers: (child: Child) => string, owner?: ChipOwner): string;
|
|
25
|
-
export declare function CardDisplayChips({ card, ownerType, owner, labelOf, write, readOnly, }: {
|
|
26
|
+
export declare function CardDisplayChips({ card, ownerType, owner, labelOf, write, readOnly, view, }: {
|
|
26
27
|
card: Card;
|
|
27
28
|
ownerType: string | undefined;
|
|
28
29
|
owner?: ChipOwner;
|
|
29
30
|
labelOf: (type: string) => string;
|
|
30
31
|
write: (next: (latest: Card) => Card) => void;
|
|
31
32
|
readOnly?: boolean;
|
|
33
|
+
view?: ViewTier;
|
|
32
34
|
}): import("react").JSX.Element;
|
|
33
|
-
export declare function cardDisplayField(): {
|
|
35
|
+
export declare function cardDisplayField(view: ViewTier): {
|
|
34
36
|
type: "custom";
|
|
35
37
|
render: ({ readOnly }: {
|
|
36
38
|
readOnly?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as c}from"react/jsx-runtime";import{isNodeList as b}from"efficient-easel/data";import{useEasel as N}from"efficient-easel/easel";import{hiddenInView as D,hiddenKeyOf as h,hidePatch as S,slotChildName as _,slotChildRowName as A}from"efficient-easel/draw";import{cardTemplateCardOwner as k,cardTemplateField as T,namedRowField as P}from"../../../format/lib/content/card-template.js";import{DisplayRow as g,useSelectedPatch as j}from"./controls.js";import{websiteNodeIsLocked as E}from"./locked-blocks.js";import{stripMarkup as F}from"../../../format/lib/markup.js";import{sourceRowName as L}from"../../../format/lib/document/source-row-name.js";import{withShowWhen as M}from"../../../format/lib/document/show-when-attach.js";import{deviceField as I}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as $}from"efficient-easel/screen/lib/document/panel-no-control-mark";const w="notCardOfTemplate",B={not:{context:w,is:!0}},ae={[w]:(e,n)=>{const t=k(n.appState,e.props?.id);return t===void 0?void 0:t===null}};function m(e){const n=e.props?.content;return b(n)?n:[]}const l=(e,n)=>D(e.props??{},n),H=(e,n)=>e.props?.[h(n)]!==void 0;function x(e,n=()=>!1,t="desktop"){return m(e).flatMap(o=>typeof o?.props?.id!="string"?[]:m(o).length&&!l(o,t)?x(o,n,t):n(o)?[]:[o])}function K(e,n,t,o="desktop"){const r=x(e,t,o).map(p=>({child:p,name:n(p)})),i=new Set(r.map(p=>p.name)),s=new Set;return r.map(({child:p,name:u})=>{let f=u;if(s.has(u)){let a=2;for(;i.has(`${u} ${a}`);)a+=1;f=`${u} ${a}`,i.add(f)}return s.add(u),{id:p.props.id,label:f,shown:!l(p,o)}})}function y(e,n,t){const o=r=>t==="desktop"?l(r,t):H(r,t);return m(e).flatMap(r=>o(r)?n(r)?[]:[r,...y(r,n,t)]:y(r,n,t))}function V(e,n){const t={...e};for(const[r,i]of Object.entries(n))i===void 0||r===h("desktop")&&i===!1?delete t[r]:t[r]=i;return Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>t[r]===e[r])?e:t}function O(e,n,t){const o=m(e);let r=!1;const i=o.map(s=>{if(r)return s;let p=s;if(s?.props?.id===n){const u=V(s.props,t(s.props));u!==s.props&&(p={...s,props:u})}else p=O(s,n,t);return r=p!==s,p});return r?{...e,props:{...e.props,content:i}}:e}function R(e,n,t,o="desktop"){return O(e,n,r=>o==="desktop"&&l({props:r},o)===!t?{}:S(r,o,!t))}function W(e,n,t){return t==="desktop"?R(e,n,!0,t):O(e,n,()=>({[h(t)]:void 0}))}function X(e,n,t,o){return _(e).trim()?t(e):T(n,P(e.props),o)?.label??t(e)}const Y="This page is read-only.";function q({card:e,ownerType:n,owner:t,labelOf:o,write:r,readOnly:i,view:s="desktop"}){const p=a=>A(a,o,F,void 0,L),u=a=>E(a.type,a),f=K(e,a=>X(a,n,p,t),u,s);return f.length?c(g,{parts:f,changed:y(e,u,s).length>0,shown:a=>f.find(d=>d.id===a)?.shown??!0,disabledReason:i?Y:void 0,onPress:(a,d)=>r(C=>R(C,a,d,s)),onReset:()=>r(a=>y(a,u,s).reduce((d,C)=>W(d,String(C.props.id),s),a))}):c($,{})}function z(){try{const e=N(r=>r),n=e.config.components??{},t=e.selectedItem;if(!t)return null;const o=k(e.appState,t.props?.id);return{labelOf:r=>n[r]?.label??r,card:t,ownerType:typeof o?.type=="string"?o.type:void 0,owner:o}}catch{return null}}function G({readOnly:e,view:n}){const t=z(),o=j();return t?c(q,{...t,view:n,readOnly:e,write:r=>{e||o(i=>{const s={...t.card,props:i},p=r(s);return p===s?null:{content:p.props.content}})}}):c(g,{parts:[],changed:!1,shown:()=>!0,onPress:()=>{},onReset:()=>{}})}function ie(e){return M(I(e,{type:"custom",render:({readOnly:n})=>c(G,{readOnly:n,view:e})}),B)}export{ae as CARD_BOX_FACTS,q as CardDisplayChips,w as NOT_CARD_OF_TEMPLATE,B as ON_A_CARD,X as cardChipLabel,ie as cardDisplayField,K as cardDisplayItems,x as cardDisplayParts,R as withChildShown};
|
|
@@ -5,11 +5,13 @@ import { type KnownVideoFrame, type LoadingShows } from "../../../format/lib/her
|
|
|
5
5
|
import { readHidable, hidableText, type HidableValue } from "efficient-easel/draw";
|
|
6
6
|
import { FOLD_FIELD_MARKER, LINK_FIELD_MARKER, MEDIA_FIELD_MARKER, SCAFFOLD_FIELD_MARKER, TEXT_FIELD_MARKER, foldMetaOf, textFieldIdentifier, type EdgeCell, type FoldFieldMeta, type TextFieldMeta, type TextListRendering } from "efficient-easel/draw";
|
|
7
7
|
import { type ShowWhenRule } from "../../../render/lib/document/show-when.js";
|
|
8
|
+
import { boxFillSlot } from "../../../format/lib/content/box-background.js";
|
|
8
9
|
import { type SettingsBorderValue } from "efficient-easel/panel";
|
|
9
10
|
import { type AlignmentPoint, FOCAL_DEFAULT } from "efficient-shell/ui";
|
|
10
11
|
import type { GeocodeState } from "../../../format/lib/content/contact.js";
|
|
11
12
|
import { type SectionHeightMode, type SectionHeightUnit } from "../../../format/lib/content/section-min-height.js";
|
|
12
13
|
import { type DirectionContainer } from "../../../format/lib/content/container-direction.js";
|
|
14
|
+
import { normalizeThemeColors } from "../../../format/lib/theme.js";
|
|
13
15
|
import { GAP_FIELD_CONTAINER, type GapContainer } from "../../../format/lib/content/container-gap.js";
|
|
14
16
|
import { type SectionBackground } from "../../../format/lib/content/section-background.js";
|
|
15
17
|
import { type TypeRole, type TypeSizeValue } from "../../../format/lib/content/section-type-size.js";
|
|
@@ -270,6 +272,10 @@ export declare function pageBackgroundField(): CustomField<string>;
|
|
|
270
272
|
export declare function checkbox(label: string, fallback: boolean): CustomField<boolean>;
|
|
271
273
|
export declare function colorInput(label: string, fallback: string, icon?: ReactElement): CustomField<string>;
|
|
272
274
|
export declare function boxFillField(): CustomField<string>;
|
|
275
|
+
export declare function slotFill(slot: NonNullable<ReturnType<typeof boxFillSlot>>, colors: ReturnType<typeof normalizeThemeColors>, n: number): {
|
|
276
|
+
hex: string;
|
|
277
|
+
words: string;
|
|
278
|
+
} | null;
|
|
273
279
|
export declare function boxThemeIndexOf(data: unknown, id: string, own: unknown): number | null;
|
|
274
280
|
export declare const FOCAL_POINTS: {
|
|
275
281
|
value: string;
|