efficient-web-builder 57.1.0 → 59.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 +52 -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/ColourControl.js +1 -1
- package/dist/editor/lib/document/blocks/general/CardList/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Cards/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Chart/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Contents/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Countdown/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/Mockup/fields.js +2 -2
- 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/card-row-fields.d.ts +2 -1
- package/dist/editor/lib/document/card-row-fields.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +13 -1
- package/dist/editor/lib/document/controls.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-columns.d.ts +1 -0
- package/dist/format/lib/content/card-columns.js +1 -0
- 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-state.d.ts +17 -0
- package/dist/format/lib/content/card-state.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/gallery-layout.d.ts +13 -1
- package/dist/format/lib/content/gallery-layout.js +1 -1
- 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/page-background.js +1 -1
- package/dist/format/lib/content/part-display.js +1 -1
- package/dist/format/lib/content/section-background.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/Chart/meta.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/Chart/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Countdown/meta.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/Countdown/meta.js +1 -1
- 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/Mockup/meta.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/Mockup/meta.js +1 -1
- 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 +28 -0
- package/dist/format/lib/document/box-footer.js +1 -1
- package/dist/format/lib/document/card-row-keys.d.ts +14 -0
- package/dist/format/lib/document/card-row-keys.js +1 -0
- package/dist/format/lib/document/cards-template-on-read.d.ts +1 -1
- package/dist/format/lib/document/cards-template-on-read.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/neutralization-contracts.js +1 -1
- package/dist/format/lib/document/part-inks.d.ts +6 -2
- package/dist/format/lib/document/part-inks.js +1 -1
- package/dist/format/lib/document/section-catalog.js +2 -2
- package/dist/format/lib/document/theme-slots.d.ts +20 -0
- package/dist/format/lib/document/theme-slots.js +1 -0
- package/dist/format/lib/editor-words-catalogue.d.ts +10 -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/format/lib/theme.d.ts +1 -0
- package/dist/format/lib/theme.js +4 -4
- 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.d.ts +2 -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.d.ts +2 -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.d.ts +2 -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.d.ts +2 -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.d.ts +2 -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/Cards/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Chart/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Contents/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Countdown/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/FeaturedCover/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/Mockup/render.js +2 -2
- 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.d.ts +3 -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-cards.d.ts +3 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.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-promo.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-promo.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-proof.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-proof.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/head-core-boxes.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 +3 -3
- package/dist/editor/lib/document/theme-swatches.d.ts +0 -3
- package/dist/editor/lib/document/theme-swatches.js +0 -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,57 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 59.0.0 - 2026-11-08
|
|
4
|
+
|
|
5
|
+
From main at `bb1ff965`: #608, #610, #611, #602, #613. A major: #608 has `!` in its title, narrows a peer and removes a module. The peer `efficient-shell` narrows from `^12.16.0` to `^12.17.0`; `efficient-easel` stays `^29.0.0`. No stored key or value moves (a stored hex paints as before; 0 rewritten).
|
|
6
|
+
|
|
7
|
+
**For hosts:**
|
|
8
|
+
- Bump `efficient-shell` to `^12.17.0` with this release: the fill pickers read `FILL_COLOR_SLOTS` and `fillColorRole` from it (#608).
|
|
9
|
+
- The module `lib/document/theme-swatches` is renamed `lib/document/theme-slots`; `themeSwatches` is deleted. No host imports the old path (efficient-storefront, efficient-storefront-blocks, efficient-admin-portal and efficient-easel searched: 0) (#608).
|
|
10
|
+
- storefront-blocks, on its bump: the `twoThenThreesPhoto` Gallery layout and its `ratio` value are new (#613); a host that lists gallery layouts may offer it.
|
|
11
|
+
|
|
12
|
+
### Removed (BREAKING)
|
|
13
|
+
|
|
14
|
+
- **`lib/document/theme-swatches`** and its `themeSwatches` list (#608): the one slot table is `lib/document/theme-slots` now. The peer `efficient-shell` narrows to `^12.17.0`.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- **Every fill and background picker names a theme slot** (#608): Box Fill, the section band Background color, the page Background and the card row colour offer Theme N main, text, background, muted and surface first. A pick stores the slot name, not a hex. Text rows keep their own slots and never offer `surface`.
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- **A Cards press lays down a Box of one Card list** (#602): the highlight badge sits on the card's top line.
|
|
23
|
+
- **A Chart or Mockup Card press lays down a Box** (#610): its words are Text parts; the chart or device card stays one block in its own Box. New `surfacePresetIndex`.
|
|
24
|
+
- **A Countdown or Feature Banner press lays down a Box** (#611): the timer stays one block; the Feature Banner keeps its linked post card whole. New `FOLLOW_THE_BOX` export.
|
|
25
|
+
- **A Two, then threes photo Gallery layout with 4:3 tiles** (#613): layout `twoThenThreesPhoto`, an optional `ratio` and `galleryLayoutRatio`; a wall's phone and desktop rules are checked together.
|
|
26
|
+
|
|
27
|
+
## 58.0.0 - 2026-11-08
|
|
28
|
+
|
|
29
|
+
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).
|
|
30
|
+
|
|
31
|
+
**For hosts:**
|
|
32
|
+
- 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).
|
|
33
|
+
- `lib/document/passes/hidden-nodes` moves from `format/` to `render/`: it provides a React context now. No host imports it (#589).
|
|
34
|
+
- 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.
|
|
35
|
+
- 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).
|
|
36
|
+
|
|
37
|
+
### Removed (BREAKING)
|
|
38
|
+
|
|
39
|
+
- **`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.
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
|
|
43
|
+
- **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.
|
|
44
|
+
- **The Product grid row is the host's** (#607): see the host note above.
|
|
45
|
+
- **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.
|
|
46
|
+
- **Payment Methods leaves the Add menu** (#605): the Logos Box takes its job. New `paymentScaffoldBadges`, `paymentScaffoldAssurances` and `paymentPressStarter`. Stored nodes still draw.
|
|
47
|
+
|
|
48
|
+
### Added
|
|
49
|
+
|
|
50
|
+
- **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`.
|
|
51
|
+
- **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.
|
|
52
|
+
- **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`.
|
|
53
|
+
- **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`.
|
|
54
|
+
|
|
3
55
|
## 57.1.0 - 2026-11-07
|
|
4
56
|
|
|
5
57
|
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.
|
|
@@ -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
|
-
"use client";import{jsx as r,jsxs as
|
|
1
|
+
"use client";import{jsx as r,jsxs as m}from"react/jsx-runtime";import{useRef as C}from"react";import{ColorPicker as w,ColorPickerPanel as x,ColorSwatch as b,HexInput as S,Popover as N,Tooltip as P,colorFill as k,colorSwatchClasses as T,useShellStrings as E}from"efficient-shell/ui";import{SettingsDefaultReset as R,SettingsField as _}from"efficient-easel/panel";import{typedHex as p}from"efficient-easel/pick";import{usePreviewHeader as j}from"../../../render/components/PreviewHeaderContext.js";import{editorEaselWords as F,say as g}from"../../../format/lib/editor-words.js";import{themePresets as I}from"../../../format/lib/document/theme-slots.js";import{SITE_STYLE_UNSET_LABEL as L}from"../../../format/components/SiteStyleUnset.js";function y({value:e,onChange:i,label:o,id:a,caption:s,inherited:c,ariaLabel:t,choices:n}){return r(B,{value:e,onChange:i,label:g(t??o),id:a,caption:s,inherited:c,choices:n})}function z(){const{theme:e}=j();return I(e)}function B({value:e,onChange:i,label:o,id:a,caption:s,inherited:c,choices:t}){const n=z(),l=e?null:p(c??""),d=s!==void 0&&(!e||p(s)!==p(e))?s:null,f=h=>{h!==e&&i(h)};return m("div",{className:"sf-colour",children:[t?r(H,{id:a,value:e,onChange:i,label:o,presets:n,follows:l,choices:t}):r(w,{id:a,value:e,onChange:f,label:o,presets:n,fallback:l??void 0,size:"md",align:"start"}),d!==null?r("span",{className:"sf-colour-caption",children:d}):r("span",{className:"sf-colour-hexwrap",children:r(S,{value:e||l||"",onChange:f,label:g("{label} hex code",{label:o}),placeholder:e||l?void 0:g(L),className:l?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function H({value:e,onChange:i,label:o,id:a,presets:s,follows:c,choices:t}){const n=E().color,l=e||c||"",d=t.findIndex(u=>u.selected),f=d>=0,h=C(d);return f&&(h.current=d),r(N,{id:a,trigger:r("span",{"aria-hidden":"true",className:"absolute inset-0",style:k(l)}),triggerLabel:n.swatch(o,l.toUpperCase()||n.none),triggerClassName:T({size:"md"}),"aria-label":n.panel(o),align:"start",children:m("div",{className:"sf-colour-window",children:[r("div",{role:"group","aria-label":o,className:"sf-colour-choices",children:t.map(u=>r(P,{content:u.label,children:r(b,{color:u.color,"aria-label":u.label,selected:u.selected,onClick:()=>{u.selected||u.onPick()}})},u.label))}),r(x,{value:f?"":e,onChange:i,label:o,presets:s,fallback:(f?l:c)??void 0},h.current)]})})}function W({label:e,icon:i,changed:o,hint:a,onReset:s,resetTo:c,children:t,...n}){return m(_,{label:e,icon:i,htmlFor:n.id,changed:o,hint:a,action:s?r(R,{words:F()?.panel,label:e,changed:!!o,detail:c,onReset:s}):void 0,children:[y({...n,label:e}),t]})}function M({label:e,icon:i,value:o,inherited:a,resetTo:s,onChange:c,onReset:t,hint:n,choices:l}){const d=!!o;return r(W,{label:e,icon:i,value:o,inherited:d?void 0:a,onChange:c,changed:d,onReset:t,resetTo:s,hint:n,choices:l})}export{y as ColourControl,W as ColourRow,M as InheritedColourRow,z as useThemePresets};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as u}from"react/jsx-runtime";import{AccentIcon as O,ListIcon as L}from"efficient-easel/icons";import{isNodeList as F,newId as b}from"efficient-easel/data";import{group as w}from"efficient-easel/screen/lib/document/box-fields";import{COUNT_KEY_PROP as h}from"../../../../../../format/lib/content/block-sources.js";import{CARD_LIST_ROWS as p,CARD_LIST_TYPE as f,cardListFieldsOf as S,cardTemplateOwner as g,namedRowField as I}from"../../../../../../format/lib/content/card-template.js";import{BLOCK_SOURCE_EDIT_PROP as T,NO_BLOCK_SOURCE as E,blockSourceEditField as A,blockSourceField as M,blockSourceFields as P}from"../../../block-source-fields.js";import{select as W}from"../../../box-fields.js";import{text as x}from"../../../controls.js";import{cardsFieldsFollowContent as D}from"../../../../../../format/lib/document/cards-template-on-read.js";import{cardPicks as N,pickRow as j,withOwnCardKeys as v}from"../../../../../../format/lib/document/card-row-keys.js";import{ROW_LIVE_NUMBER_FIELD as B}from"../../../live-number-field.js";import{withShowWhen as d}from"../../../../../../format/lib/document/show-when-attach.js";import{CARD_ROW_FACTS as U,cardRowField as K,cardRowFields as H,cardRowItemField as Y}from"../../../card-row-fields.js";import{say as J}from"../../../../../../format/lib/editor-words.js";import{CardListSlots as V}from"../../../../../../format/lib/document/blocks/general/CardList/meta.js";function y(t){return F(t)?t.some(o=>{const e=o.props??{};return o.type==="Text"&&typeof e[h]=="string"&&I(e)?!0:Object.values(e).some(y)}):!1}const q=t=>Object.defineProperty(Object.fromEntries(t.map(o=>[o.key,""])),"key",{get:()=>b("row"),enumerable:!0}),_=new WeakMap;function z(t,o,e){const r=o.filter(s=>!s.everySource);let n=_.get(t);n||_.set(t,n=new Map);const a=JSON.stringify([r,e]);let i=n.get(a);if(!i){const s=Object.fromEntries(r.map(l=>[l.key,Y(l)]));e&&(s[h]=B);const c=r[0]?.key;i={...t,arrayFields:s,defaultItemProps:q(r),getItemSummary:l=>c&&typeof l?.[c]=="string"&&l[c]||J("Row")},n.set(a,i)}return i}const R="cardListInCardTemplate",m={not:{context:R,is:!0}},G={...U,[R]:(t,o)=>{const e=g(o.appState,t.props?.id);return e===void 0?void 0:e!==null}},Q=d({type:"array",label:"Rows",icon:u(L,{}),arrayFields:{}},{all:[m,E]}),X=t=>t.find(o=>!o.everySource&&(o.kind??"text")==="text")?.key??"title",C=new WeakMap;function Z(t,o){let e=C.get(t);e||C.set(t,e=new WeakMap);let r=e.get(o);return r||e.set(o,r={...t,highlightedCard:o}),r}const $=t=>{const o=new Set(S(null,{type:f,props:t}).map(e=>e.key));return e=>o.has(e)},k=new WeakMap;function ee(t,o){let e=k.get(t);e||k.set(t,e=new WeakMap);let r=e.get(o);return r||e.set(o,r={...t,[p]:o}),r}const Se={fields:{_gSource:w("Source"),dataSource:d(M("Card content","Manual"),m),[T]:A(),_gCardList:w("Card list"),rowField:K("Shows","list"),[p]:Q,highlightedCard:d(W("Highlighted card",u(O,{}),[{label:"None",value:""}],""),m),highlightBadge:d(x("Highlight badge","Most popular"),m),...V},resolveData:t=>{const o=t.props,e=v(o,p),r=D(e,$(e));return r===o?t:{...t,props:r}},resolveFields:(t,o)=>{const e=t.props??{},r=P(f,H(o.fields,t,o),e),n=!!g(o.appState,e.id),a=r[p];if(n||!a)return r;const i=S(o.appState,{type:f,props:e}),s=ee(r,z(a,i,y(e.template))),c=r.highlightedCard;return c?Z(s,j(c,N(e,{rows:p,label:X(i)}))):s},showWhenFacts:G};export{Se as CardListFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as s}from"react/jsx-runtime";import{AccentIcon as C,ColumnsIcon as f,StylesIcon as c}from"efficient-easel/icons";import{copyText as S,plainText as w,text as d,textarea as E,withOffPage as F}from"../../../controls.js";import{group as i}from"efficient-easel/screen/lib/document/box-fields";import{iconPickerRow as L,select as m,slider as I}from"../../../box-fields.js";import{CARD_STYLE_PICTURES as p,LAYOUT_CELL as _}from"../../../choice-pictures.js";import{SPLITTABLE_SECTIONS as O,headFieldsForPlacement as T}from"../../../../../../format/lib/sections/section-head-placement.js";import{SECTION_EYEBROW_LOOK_OPTIONS as k,eyebrowLookFor as h}from"../../../../../../format/lib/sections/section-eyebrow-look.js";import{BLOCK_SOURCE_EDIT_PROP as P,blockSourceEditField as R,blockSourceField as x,blockSourceFields as M}from"../../../block-source-fields.js";import{cardTemplateFields as u}from"../../../../../../format/lib/content/card-template.js";import{cardRowItemField as y}from"../../../card-row-fields.js";import{cardPicks as j,newCard as v,pickRow as A,withOwnCardKeys as B}from"../../../../../../format/lib/document/card-row-keys.js";import{isNodeList as D}from"efficient-easel/data";import{cardsFieldsFollowContent as H}from"../../../../../../format/lib/document/cards-template-on-read.js";import{CARDS_PH as b,CardsSlots as N}from"../../../../../../format/lib/document/blocks/general/Cards/meta.js";const K=e=>D(e.template)&&e.template.length>0;function U(e,t){const o=K(t)&&t.cardStyle!=="label-only"&&!!e.highlightedCard;return Object.fromEntries(Object.entries(e).flatMap(([r,l])=>r==="highlightedCard"?o?[[r,A(l,j(t))]]:[]:r==="highlightBadge"?o?[[r,l]]:[]:r==="items"&&o&&l?[[r,q(l)]]:[[r,l]]))}const Y=Object.fromEntries(u("Cards").filter(e=>!e.everySource).map(e=>[e.key,y(e)])),W=Object.fromEntries(u("Cards").filter(e=>e.key==="title"||e.key==="body").map(e=>[e.key,y(e)])),g=new WeakMap;function q(e){let t=g.get(e);return t||g.set(e,t={...e,arrayFields:Y}),t}const ae={fields:{_gSource:i("Source"),dataSource:x("Card content","Manual"),[P]:R(),_gContent:i("Content"),eyebrow:d("Eyebrow",b.eyebrow),eyebrowLook:m("Eyebrow style",s(c,{}),[...k],h("Cards")),title:E("Heading",b.title),items:{type:"array",label:"Cards",arrayFields:W,defaultItemProps:v({title:"",body:""}),getItemSummary:e=>e?.title||e?.body||"Card"},...N,highlightedCard:m("Highlighted card",s(C,{}),[{label:"None",value:""}],""),highlightBadge:d("Highlight badge","Most popular"),_gStyle:i("Style"),cardStyle:L("Card style",s(c,{}),[{label:"Cards",value:"cards",picture:p.cards},{label:"Label only",value:"label-only",picture:p["label-only"]}],"cards",{columns:2,cell:_}),columns:I("Columns",s(f,{}),2,4,1,3)},resolveData:e=>{const t=H(e.props),o=t===e.props?e:{...e,props:t},r=o.props,l=B(r);return l===r?o:{...o,props:l}},resolveFields:(e,{fields:t})=>{const o=T(M("Cards",t,e.props,{hides:["items"]}),e.props.headPlacement,O.Cards.headRows),r=e.props,l=U(o,r);if(r.cardStyle!=="label-only")return l;const a=o.items,n=o.eyebrowLook;return{...l,...a?{items:{...a,arrayFields:{title:S("Feature label"),href:F(w("Link"))}}}:{},...n?{eyebrowLook:{...n,fallback:h("KeyFeatures")}}:{}}}};export{ae as CardsFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{StylesIcon as n}from"efficient-easel/icons";import{copyText as
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{StylesIcon as n}from"efficient-easel/icons";import{copyText as m,plainText as p,text as e,textarea as o,withPanelOnly as s}from"../../../controls.js";import{group as a}from"efficient-easel/screen/lib/document/box-fields";import{iconPickerRow as u}from"../../../box-fields.js";import{CHART_PICTURES as t,LAYOUT_CELL as f}from"../../../choice-pictures.js";import{HEAD_ROWS_SHOW_WHEN as b}from"../../../../../../format/lib/sections/section-head-placement.js";import{withRowsShownWhen as y}from"../../../../../../format/lib/document/show-when-attach.js";import{CHART_OWN_BOX_WORDS as c,CHART_PH as r}from"../../../../../../format/lib/document/blocks/general/Chart/meta.js";const _=[...c],R={fields:y({_gContent:a("Content"),eyebrow:e("Chip label",r.eyebrow),title:o("Heading",r.title),body:o("Body",""),items:{type:"array",label:"Data points",arrayFields:{label:m("Label"),value:p("Value")},defaultItemProps:{label:"",value:""},getItemSummary:l=>[l?.label,l?.value].filter(Boolean).join(" · ")||"Point"},caption:e("Caption","Illustrative example"),_gStyle:a("Style"),chartStyle:u("Chart style",i(n,{}),[{label:"Bars",hint:"Bars (comparison / funnel)",value:"bars",picture:t.bars},{label:"Line",hint:"Line (trend)",value:"line",picture:t.line},{label:"Donut",hint:"Donut (split of a whole)",value:"donut",picture:t.donut}],"bars",{columns:3,cell:f}),valueSuffix:s(e("Value suffix","%"))},_,b)};export{R as ChartFields};
|
|
@@ -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
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{ClockIcon as n,TagIcon as r}from"efficient-easel/icons";import{dateTime as i,text as t,toggle as m,withPanelOnly as s}from"../../../controls.js";import{HEAD_ROWS_SHOW_WHEN as O}from"../../../../../../format/lib/sections/section-head-placement.js";import{withRowsShownWhen as l}from"../../../../../../format/lib/document/show-when-attach.js";import{COUNTDOWN_DEFAULTS as e,COUNTDOWN_OWN_BOX_WORDS as _}from"../../../../../../format/lib/document/blocks/general/Countdown/meta.js";const W=[..._],T={fields:l({title:t("Heading",e.title),zeroText:s(t("At zero",e.zeroText)),endsAt:i("Ends",o(n,{}),"In your own time zone. Every visitor counts down to the same moment."),showUnits:m("Unit labels",!0,o(r,{}))},W,O)};export{T as CountdownFields};
|
|
@@ -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
|
-
import{jsx as t}from"react/jsx-runtime";import{BlockColumnIcon as i,PlacementIcon as
|
|
2
|
-
*the counter.*`),body:n("Body",""),_gCard:r("Mockup card"),variant:b("Card type",t(c,{}),g.map(e=>({...e,picture:
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{BlockColumnIcon as i,PlacementIcon as u,StateIcon as s,TemplateIcon as c,TextLinesIcon as d}from"efficient-easel/icons";import{plainText as l,text as a,textarea as n,textList as o}from"../../../controls.js";import{group as r}from"efficient-easel/screen/lib/document/box-fields";import{iconPickerRow as b,select as m}from"../../../box-fields.js";import{LAYOUT_CELL as p,MOCKUP_PICTURES as f}from"../../../choice-pictures.js";import{withMockupVariantRules as y,MOCKUP_DEFAULT_VARIANT as C,MOCKUP_VARIANT_OPTIONS as g}from"../../../../../../format/lib/document/mockup-variant-fields.js";import{HEAD_ROWS_SHOW_WHEN as I}from"../../../../../../format/lib/sections/section-head-placement.js";import{withRowsShownWhen as _}from"../../../../../../format/lib/document/show-when-attach.js";import{MOCKUP_OWN_BOX_WORDS as v}from"../../../../../../format/lib/document/blocks/general/Mockup/meta.js";const S=[...v,"align"],x={fields:_(y({_gContent:r("Content"),eyebrow:a("Chip label","In the product"),title:n("Heading",`Seen from
|
|
2
|
+
*the counter.*`),body:n("Body",""),_gCard:r("Mockup card"),variant:b("Card type",t(c,{}),g.map(e=>({...e,picture:f[e.value]})),C,{columns:3,cell:p}),cardHeader:a("Card header strip","Product record"),badge:a("Header badge","LIVE"),cardTitle:a("Card title",""),cardSubtitle:a("Card subtitle",""),pills:{type:"array",label:"Selector pills",arrayFields:{label:l("Label"),value:l("Value")},defaultItemProps:{label:"",value:""},getItemSummary:e=>[e?.label,e?.value].filter(Boolean).join(" ")||"Pill"},tiles:{type:"array",label:"Spec tiles",arrayFields:{label:l("Label"),value:l("Value")},defaultItemProps:{label:"",value:""},getItemSummary:e=>[e?.label,e?.value].filter(Boolean).join(" ")||"Tile"},rows:{type:"array",label:"Result / order rows",arrayFields:{lead:l("Lead"),detail:l("Detail"),state:m("State",t(s,{}),[{label:"Match / done (green)",value:"ok"},{label:"In progress (main)",value:"warn"},{label:"No match (gray ✕)",value:"no"}],"ok"),status:l("Status chip")},defaultItemProps:{lead:"",detail:"",state:"ok",status:""},getItemSummary:e=>[e?.lead,e?.detail].filter(Boolean).join(" · ")||"Row"},button:a("Button",""),footnote:a("Footnote",""),_gKanban:r("Kanban columns"),col1Title:a("Column 1 title",""),col1Cards:o("Column 1 cards",t(i,{}),"Job card label","verbatim"),col2Title:a("Column 2 title",""),col2Cards:o("Column 2 cards",t(i,{}),"Job card label","verbatim"),col3Title:a("Column 3 title",""),col3Cards:o("Column 3 cards",t(i,{}),"Job card label","verbatim"),col4Title:a("Column 4 title",""),col4Cards:o("Column 4 cards",t(i,{}),"Job card label","verbatim"),_gClaims:r("Claims bars"),barsHeading:a("Bars heading","Defect rate by product"),bars:{type:"array",label:"Bars",arrayFields:{label:l("Label"),value:l("Value")},defaultItemProps:{label:"",value:""},getItemSummary:e=>[e?.label,e?.value].filter(Boolean).join(" · ")||"Bar"},_gTerminal:r("Terminal"),termLines:o("Terminal lines",t(d,{}),"$ efficient …","verbatim"),_gBrowser:r("Browser mock"),urlText:a("URL pill",""),heroTitle:a("Hero line",""),heroButton:a("Hero button",""),products:{type:"array",label:"Product tiles",arrayFields:{name:l("Name"),price:l("Price")},defaultItemProps:{name:"",price:""},getItemSummary:e=>[e?.name,e?.price].filter(Boolean).join(" · ")||"Tile"},_gStyle:r("Style"),align:m("Mockup position",t(u,{}),[{label:"Right of the copy",value:"right"},{label:"Left of the copy",value:"left"}],"right")}),S,I)};export{x as MockupFields};
|
|
@@ -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};
|