efficient-web-builder 44.0.1 → 46.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 +12 -2
- package/README.md +8 -0
- package/dist/editor/components/ApplyCornersToSiblings.d.ts +1 -3
- package/dist/editor/components/ApplyCornersToSiblings.js +1 -1
- package/dist/editor/components/BlogPostSource.js +1 -1
- package/dist/editor/components/CanvasPartsBridge.js +1 -1
- package/dist/editor/components/CardShadowField.js +1 -1
- package/dist/editor/components/ChatSettingsPanel.js +1 -1
- package/dist/editor/components/FieldGlyph.js +1 -1
- package/dist/editor/components/LocationsGroupedField.js +1 -1
- package/dist/editor/components/PartInkControl.js +1 -1
- package/dist/editor/components/PartSettingsPanel.d.ts +0 -2
- package/dist/editor/components/PartSettingsPanel.js +1 -1
- package/dist/editor/components/PartTextBox.d.ts +6 -3
- package/dist/editor/components/PartTextBox.js +1 -1
- package/dist/editor/components/PreviewChatContext.d.ts +1 -2
- package/dist/editor/components/PreviewChatContext.js +1 -1
- package/dist/editor/components/PreviewPartAnchors.js +1 -1
- package/dist/editor/components/SectionIcon.js +1 -1
- package/dist/editor/components/SectionThemePicker.js +1 -1
- package/dist/editor/components/SectionThumbnail.js +1 -1
- package/dist/editor/components/SectionWidthRows.d.ts +6 -13
- package/dist/editor/components/SectionWidthRows.js +1 -1
- package/dist/editor/components/SourceStatus.d.ts +2 -1
- package/dist/editor/components/SourceStatus.js +1 -1
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/components/ThemeCard.js +1 -1
- package/dist/editor/components/ThemeColourField.js +1 -1
- package/dist/editor/components/ThemeField.js +1 -1
- package/dist/editor/components/TickerSettingsPanel.js +1 -1
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
- package/dist/editor/components/storefront-editor.css +90 -359
- package/dist/editor/components/useHostDocumentBridge.js +1 -1
- package/dist/editor/components/useLocationsTree.js +1 -1
- package/dist/editor/components/useSectionToBoxPass.d.ts +8 -1
- package/dist/editor/components/useSectionToBoxPass.js +1 -1
- package/dist/editor/components/useSocialSettings.d.ts +2 -2
- package/dist/editor/lib/animation/AnimationDurationRow.d.ts +3 -0
- package/dist/editor/lib/animation/AnimationDurationRow.js +1 -0
- package/dist/editor/lib/animation/entrance-fields.d.ts +4 -0
- package/dist/editor/lib/animation/entrance-fields.js +1 -0
- package/dist/editor/lib/animation/fields.d.ts +2 -0
- package/dist/editor/lib/animation/fields.js +1 -0
- package/dist/editor/lib/animation/loop-fields.d.ts +2 -0
- package/dist/editor/lib/animation/loop-fields.js +1 -0
- package/dist/editor/lib/document/ColourControl.js +1 -1
- package/dist/editor/lib/document/add-palette.js +1 -1
- package/dist/editor/lib/document/block-offer.js +1 -1
- package/dist/editor/lib/document/block-source-fields.d.ts +1 -1
- package/dist/editor/lib/document/block-source-fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Banner/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Breadcrumb/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Cards/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/CategoryBar/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Chart/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/DocBody/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/DocMasthead/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/DocTabs/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Eyebrow/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/FAQ/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/FeaturedCover/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Grid/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Heading/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroGroup/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ImageBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Integrations/fields.js +2 -2
- package/dist/editor/lib/document/blocks/general/IntroBleed/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/KeyFeatures/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/LocationMap/fields.d.ts +10 -0
- package/dist/editor/lib/document/blocks/general/LocationMap/fields.js +1 -0
- package/dist/editor/lib/document/blocks/general/LogoBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/LongRead/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Manifesto/fields.js +2 -2
- package/dist/editor/lib/document/blocks/general/Masthead/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Mockup/fields.js +2 -2
- package/dist/editor/lib/document/blocks/general/OrderSummary/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ParagraphsA/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/PaymentBadges/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/PostCard/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Prose/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/SectionHeader/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Series/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/SpecStrip/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Split/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Stats/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/StatsParagraph/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Testimonials/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Ticker/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Timeline/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/TimelineTrack/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/TitleWithButtons/fields.js +1 -1
- 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/blocks/shared-fields.d.ts +2 -4
- package/dist/editor/lib/document/blocks/shared-fields.js +1 -1
- package/dist/editor/lib/document/box-fields.d.ts +36 -0
- package/dist/editor/lib/document/box-fields.js +1 -0
- package/dist/editor/lib/document/box-gutter-field.d.ts +1 -0
- package/dist/editor/lib/document/box-gutter-field.js +1 -0
- package/dist/editor/lib/document/canvas-typing.js +1 -1
- package/dist/editor/lib/document/card-row-fields.d.ts +1 -1
- package/dist/editor/lib/document/card-row-fields.js +1 -1
- package/dist/editor/lib/document/consent-words-field.d.ts +2 -3
- package/dist/editor/lib/document/consent-words-field.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +34 -94
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/enclosing-section.d.ts +5 -1
- package/dist/editor/lib/document/enclosing-section.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/general-registry.js +1 -1
- package/dist/editor/lib/document/overrides.js +1 -1
- package/dist/editor/lib/document/page-root-fields.d.ts +1 -1
- package/dist/editor/lib/document/page-root-fields.js +1 -1
- package/dist/editor/lib/document/page-root.d.ts +2 -7
- package/dist/editor/lib/document/page-root.js +2 -2
- package/dist/editor/lib/document/part-anchors.d.ts +0 -1
- package/dist/editor/lib/document/part-anchors.js +1 -1
- package/dist/editor/lib/document/part-panel-rows.d.ts +75 -0
- package/dist/editor/lib/document/part-panel-rows.js +1 -0
- package/dist/editor/lib/document/passes/inspector.js +1 -1
- package/dist/editor/lib/document/separator-field.d.ts +10 -0
- package/dist/editor/lib/document/separator-field.js +1 -0
- package/dist/editor/lib/document/shell-glyph.d.ts +2 -0
- package/dist/editor/lib/document/shell-glyph.js +1 -0
- package/dist/{format → editor}/lib/host-document-bridge.d.ts +1 -3
- package/dist/editor/lib/host-document-bridge.js +1 -0
- package/dist/editor/lib/pinned-chrome-doc.js +1 -1
- package/dist/editor/lib/sections/city-presets.d.ts +4 -0
- package/dist/editor/lib/sections/city-presets.js +1 -0
- package/dist/editor/lib/sections/new-section-node.js +1 -1
- package/dist/editor/lib/sections/section-dry-run.d.ts +13 -2
- package/dist/editor/lib/sections/section-dry-run.js +2 -2
- package/dist/editor/lib/sections/text-layouts.d.ts +6 -0
- package/dist/editor/lib/sections/text-layouts.js +1 -0
- package/dist/editor/lib/source-rules/part-slider-fills-row.d.ts +1 -0
- package/dist/editor/lib/source-rules/part-slider-fills-row.js +5 -5
- package/dist/format/lib/animation/index.d.ts +1 -0
- package/dist/format/lib/animation/index.js +1 -0
- package/dist/format/lib/animation/loop.d.ts +29 -0
- package/dist/format/lib/animation/loop.js +1 -0
- package/dist/format/lib/content/block-align.d.ts +2 -0
- package/dist/format/lib/content/block-align.js +1 -1
- package/dist/format/lib/content/block-size.d.ts +59 -0
- package/dist/format/lib/content/block-size.js +1 -0
- package/dist/format/lib/content/box-background.js +1 -1
- package/dist/format/lib/content/box-layout.d.ts +16 -37
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/box-link.d.ts +13 -0
- package/dist/format/lib/content/box-link.js +13 -0
- package/dist/format/lib/content/box-separator.d.ts +10 -0
- package/dist/format/lib/content/box-separator.js +1 -0
- package/dist/format/lib/content/box-shape.d.ts +10 -0
- package/dist/format/lib/content/box-shape.js +1 -0
- package/dist/format/lib/content/button-icon.d.ts +1 -0
- package/dist/format/lib/content/button-icon.js +1 -1
- package/dist/format/lib/content/card-corners.d.ts +0 -3
- package/dist/format/lib/content/card-corners.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +2 -0
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/cart-drawer.d.ts +7 -0
- package/dist/format/lib/content/cart-drawer.js +1 -1
- package/dist/format/lib/content/chat-launcher.js +1 -1
- package/dist/format/lib/content/container-gap.d.ts +9 -1
- package/dist/format/lib/content/container-gap.js +1 -1
- package/dist/format/lib/content/gallery-card-layout.js +1 -1
- package/dist/format/lib/content/gallery-layout.d.ts +1 -0
- package/dist/format/lib/content/gallery-layout.js +1 -1
- package/dist/format/lib/content/page-background.js +1 -1
- package/dist/format/lib/content/post-date.d.ts +1 -0
- package/dist/format/lib/content/post-date.js +1 -0
- package/dist/format/lib/content/scrim.d.ts +1 -0
- package/dist/format/lib/content/scrim.js +1 -0
- package/dist/format/lib/content/section-min-height.d.ts +4 -0
- package/dist/format/lib/content/section-min-height.js +1 -1
- package/dist/format/lib/content/section-width.d.ts +2 -18
- package/dist/format/lib/content/section-width.js +1 -1
- package/dist/format/lib/content/site-gutter.d.ts +11 -1
- package/dist/format/lib/content/site-gutter.js +1 -1
- package/dist/format/lib/content/tint.d.ts +1 -0
- package/dist/format/lib/content/tint.js +1 -0
- package/dist/format/lib/document/blocks/block-types.d.ts +0 -1
- package/dist/format/lib/document/blocks/general/HeroSingle/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/HeroSlide/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/IntroBleed/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/LocationMap/meta.d.ts +2 -0
- package/dist/format/lib/document/blocks/general/LocationMap/meta.js +1 -0
- package/dist/format/lib/document/blocks/general/SpecStrip/meta.d.ts +5 -0
- package/dist/format/lib/document/blocks/general/SpecStrip/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Ticker/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 +30 -0
- package/dist/format/lib/document/box-footer.d.ts +1 -0
- package/dist/format/lib/document/box-footer.js +1 -1
- package/dist/format/lib/document/cap-hero-groups.js +1 -1
- package/dist/format/lib/document/container-blocks.js +1 -1
- package/dist/format/lib/document/editor-site-widths.d.ts +2 -0
- package/dist/format/lib/document/editor-site-widths.js +1 -0
- 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/part-inks.js +1 -1
- package/dist/format/lib/document/passes/document-position.js +1 -1
- package/dist/format/lib/document/passes/settings-groups.js +1 -1
- package/dist/format/lib/document/passes/types.d.ts +10 -5
- package/dist/format/lib/document/renamed-props.js +1 -1
- package/dist/format/lib/document/section-catalog.js +2 -2
- package/dist/format/lib/editor-words-catalogue.d.ts +36 -32
- package/dist/format/lib/editor-words-catalogue.js +6 -6
- package/dist/format/lib/fit-words.js +77 -18
- package/dist/format/lib/fonts.d.ts +1 -0
- package/dist/format/lib/fonts.js +1 -1
- package/dist/format/lib/hero-group-placement.js +1 -1
- package/dist/format/lib/hero-texture.d.ts +1 -1
- package/dist/format/lib/hero-texture.js +1 -1
- package/dist/format/lib/locations-grid.d.ts +1 -0
- package/dist/format/lib/locations-grid.js +1 -1
- package/dist/format/lib/map-styles.d.ts +0 -1
- package/dist/format/lib/map-styles.js +1 -1
- package/dist/format/lib/popup/look.js +1 -1
- package/dist/format/lib/popup/text-kinds.d.ts +0 -1
- package/dist/format/lib/popup/text-kinds.js +1 -1
- package/dist/format/lib/sections/hero-overlay.d.ts +1 -1
- package/dist/format/lib/sections/hero-overlay.js +1 -1
- package/dist/format/lib/sections/section-head-placement.d.ts +0 -4
- package/dist/format/lib/sections/section-head-placement.js +1 -1
- package/dist/format/lib/sections/section-presets.js +1 -1
- package/dist/format/lib/sections/strip-shape.d.ts +16 -0
- package/dist/format/lib/sections/strip-shape.js +1 -0
- package/dist/format/lib/sections/timeline-year-shape.d.ts +4 -0
- package/dist/format/lib/sections/timeline-year-shape.js +1 -0
- package/dist/format/lib/source-rules/box-fields-from-easel.d.ts +4 -0
- package/dist/format/lib/source-rules/box-fields-from-easel.js +8 -0
- package/dist/format/lib/source-rules/editor-chrome-note.js +1 -1
- package/dist/format/lib/source-rules/editor-words.js +2 -2
- package/dist/format/lib/source-rules/no-glyph-rows.d.ts +0 -4
- package/dist/format/lib/source-rules/no-glyph-rows.js +4 -4
- package/dist/format/lib/source-rules/one-alignment-row.d.ts +9 -0
- package/dist/format/lib/source-rules/one-alignment-row.js +7 -0
- package/dist/format/lib/source-rules/one-loop-module.d.ts +7 -0
- package/dist/format/lib/source-rules/one-loop-module.js +6 -0
- package/dist/format/lib/source-rules/one-node-list.d.ts +2 -0
- package/dist/format/lib/source-rules/one-node-list.js +1 -0
- package/dist/format/lib/source-rules/one-page-theme-reader.d.ts +6 -0
- package/dist/format/lib/source-rules/one-page-theme-reader.js +6 -0
- package/dist/format/lib/source-rules/part-style-naming.js +1 -1
- package/dist/format/lib/source-rules/shell-width-token-not-colour.d.ts +5 -0
- package/dist/format/lib/source-rules/shell-width-token-not-colour.js +2 -0
- package/dist/format/lib/source-rules/site-square-by-default.js +3 -3
- package/dist/format/lib/source-rules/support/panel-select-cascade.js +2 -2
- package/dist/format/lib/theme.d.ts +6 -0
- package/dist/format/lib/theme.js +4 -4
- package/dist/render/components/Banner.js +1 -1
- package/dist/render/components/ButtonBlock.d.ts +2 -0
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +4 -4
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/Cards.d.ts +1 -0
- package/dist/render/components/Cards.js +1 -1
- package/dist/render/components/ContactLocations.js +2 -14
- package/dist/render/components/Eyebrow.d.ts +2 -1
- package/dist/render/components/Eyebrow.js +1 -1
- package/dist/render/components/FeaturedCover.js +1 -1
- package/dist/render/components/Flex.d.ts +19 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Grid.js +1 -1
- package/dist/render/components/Heading.d.ts +3 -4
- package/dist/render/components/Heading.js +1 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/HeroVideoPlay.js +1 -1
- package/dist/render/components/ImageBlock.d.ts +1 -2
- package/dist/render/components/ImageBlock.js +1 -1
- package/dist/render/components/InBoxContext.d.ts +2 -0
- package/dist/render/components/InBoxContext.js +1 -0
- package/dist/render/components/KeyFeatures.js +1 -1
- package/dist/render/components/LocationMap.d.ts +23 -0
- package/dist/render/components/LocationMap.js +1 -0
- package/dist/render/components/Logo.js +1 -1
- package/dist/render/components/LogoBlock.d.ts +1 -0
- package/dist/render/components/LogoBlock.js +1 -1
- package/dist/render/components/LongRead.js +1 -1
- package/dist/render/components/Manifesto.d.ts +2 -1
- package/dist/render/components/Manifesto.js +1 -1
- package/dist/render/components/PreviewHeaderContext.d.ts +12 -5
- package/dist/render/components/PreviewHeaderContext.js +1 -1
- package/dist/render/components/PreviewLocationPartContext.d.ts +1 -1
- package/dist/render/components/PreviewLocationPartContext.js +1 -1
- package/dist/render/components/ProcessSteps.js +1 -1
- package/dist/render/components/SectionAnimation.d.ts +16 -3
- package/dist/render/components/SectionAnimation.js +1 -1
- package/dist/render/components/SiteGutterFrame.d.ts +7 -1
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/components/SiteMap.js +1 -1
- package/dist/render/components/SpecStrip.d.ts +2 -4
- package/dist/render/components/SpecStrip.js +1 -1
- package/dist/render/components/Split.d.ts +3 -1
- package/dist/render/components/Split.js +1 -1
- package/dist/render/components/Text.d.ts +5 -2
- package/dist/render/components/Text.js +1 -1
- package/dist/render/components/Ticker.d.ts +5 -4
- package/dist/render/components/Ticker.js +1 -1
- package/dist/render/components/TickerSection.d.ts +5 -4
- package/dist/render/components/TickerSection.js +1 -1
- package/dist/render/components/Timeline.js +1 -1
- package/dist/render/components/TimelineRail.d.ts +55 -0
- package/dist/render/components/TimelineRail.js +1 -0
- package/dist/render/components/TimelineTrack.js +1 -1
- package/dist/render/components/TitleWithButtons.d.ts +2 -1
- package/dist/render/components/TitleWithButtons.js +1 -1
- package/dist/render/components/goldPhrases.js +1 -1
- package/dist/render/lib/animation/LoopTrack.d.ts +14 -0
- package/dist/render/lib/animation/LoopTrack.js +1 -0
- package/dist/render/lib/animation/entrance.d.ts +18 -0
- package/dist/render/lib/animation/entrance.js +1 -0
- package/dist/render/lib/document/blocks/general/ButtonBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Eyebrow/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Heading/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/LocationMap/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/LocationMap/render.js +1 -0
- package/dist/render/lib/document/blocks/general/LogoBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Manifesto/render.js +1 -1
- package/dist/render/lib/document/blocks/general/SectionHeader/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Split/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Ticker/render.js +1 -1
- package/dist/render/lib/document/blocks/general/TitleWithButtons/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-head-looks.d.ts +9 -0
- package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +9 -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 +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.d.ts +4 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +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-stats.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-strip.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-strip.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +3 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/page-frame.d.ts +3 -21
- package/dist/render/lib/document/page-frame.js +1 -1
- package/dist/render/lib/document/page-render.js +1 -1
- package/dist/render/lib/document/part-styles.d.ts +15 -13
- package/dist/render/lib/document/part-styles.js +2 -2
- package/dist/render/lib/document/passes/block-size.d.ts +3 -0
- package/dist/render/lib/document/passes/block-size.js +1 -0
- package/dist/render/lib/document/passes/cell-width.d.ts +1 -0
- package/dist/render/lib/document/passes/cell-width.js +1 -1
- package/dist/render/lib/document/passes/clickable-parts.js +1 -1
- package/dist/render/lib/document/passes/corners.js +1 -1
- package/dist/render/lib/document/passes/index.js +1 -1
- package/dist/render/lib/document/passes/section-anchor.d.ts +1 -0
- package/dist/render/lib/document/passes/section-anchor.js +1 -1
- package/dist/render/lib/document/passes/section-animation.d.ts +1 -0
- package/dist/render/lib/document/passes/section-animation.js +1 -1
- package/dist/render/lib/document/passes/section-padding.js +1 -1
- package/dist/render/lib/document/passes/section-width.d.ts +1 -4
- package/dist/render/lib/document/passes/section-width.js +1 -1
- package/dist/render/lib/document/text-parts.d.ts +4 -0
- package/dist/render/lib/document/text-parts.js +1 -1
- package/dist/render/lib/sections/section-to-box.d.ts +30 -7
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/dist/render/lib/text-styles/site-text-styles.js +2 -2
- package/package.json +5 -5
- package/dist/editor/components/PartResetDot.d.ts +0 -5
- package/dist/editor/components/PartResetDot.js +0 -1
- package/dist/editor/lib/document/section-width-fields.d.ts +0 -2
- package/dist/editor/lib/document/section-width-fields.js +0 -1
- package/dist/format/lib/content/image-width.d.ts +0 -9
- package/dist/format/lib/content/image-width.js +0 -1
- package/dist/format/lib/content/section-animation.d.ts +0 -13
- package/dist/format/lib/content/section-animation.js +0 -1
- package/dist/format/lib/host-document-bridge.js +0 -1
- package/dist/format/lib/sections/ticker-scroll.d.ts +0 -11
- package/dist/format/lib/sections/ticker-scroll.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SECTION_BOX_SLOT as W,SECTION_BOX_TYPE as G}from"../../../sections/section-to-box.js";import{BUTTON as b,DIM as i,DROP_COMMON as j,DROP_SIDE_PADDING as X,INNER_BOX as n,SAME_KEYS as v,SECTION_BOX as S,SH_LINK as f,TEXT as p,bandAccent as $,bandIndex as K,bandPage as z,bandProps as P,bandWrites as U,smallText as d,wrapperPad as l}from"./section-to-box-row-parts.js";import{editorialHeadTree as Y,token as c}from"./section-head-looks.js";import{declaredBlockSource as w}from"../../../../../format/lib/content/block-sources.js";import{parseLocationTileShape as q,splitLegacyRegion as x}from"../../../../../format/lib/content/contact.js";import{groupColumns as g}from"../../../../../format/lib/locations-grid.js";import{phoneHref as F}from"../../../../../format/lib/links/phone-href.js";import{hasMapCoords as V}from"../../../../../format/lib/map-styles.js";const r=e=>typeof e=="string"?e:e==null?"":String(e),m=e=>Array.isArray(e.locations)?e.locations.map(t=>t??{}):[],s=e=>r(e.group),B=e=>`loc-${e}`,T=e=>r(e.state).trim()||x(r(e.region)).state,O=e=>r(e.country).trim()||x(r(e.region)).country,_=e=>[T(e),O(e)].filter(Boolean).join(" · "),J=e=>m(e).some(t=>r(t.photo).trim()!==""),Q=e=>m(e).some(t=>V(Number(t.lat),Number(t.lng))),Z=(e,t)=>m(e).filter(o=>s(o)===s(t)).length,ee=(e,t)=>Z(e,t)===1?"wide":q(e.imageShape),h={top:100,bottom:100,topPhone:60,bottomPhone:60},N=48,a=(e,t={})=>({textStyle:"body-5",...c("label",e),case:"upper",...t}),y={top:1,right:1,bottom:1,left:1},u=(e,t)=>({sectionPaddingTop:e,sectionPaddingBottom:e,sectionPaddingLeft:t,sectionPaddingRight:t,sectionPaddingTopPhone:e,sectionPaddingBottomPhone:e,sectionPaddingLeftPhone:t,sectionPaddingRightPhone:t}),k={...n,direction:"row",share:"equal",gap:0},C=(e,t={})=>o=>o>g(o)?{...n,gap:0}:{...k,...t,...e&&o>1?{phoneRow:e}:{}},te=250,E={wrap:!0},oe={kind:"group",name:"Gallery",props:{...n,gap:20},when:J,parts:[{kind:"group",name:"Gallery head",props:{...n,direction:"row",justify:"between",align:"end",gap:24,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},parts:[d("galleryKicker",a(12,{color:"accent",letterSpacing:.3})),{kind:"text",key:"galleryHint",props:{...i,align:"right"},style:a(11,{letterSpacing:.22})}]},{kind:"group",name:"Groups",props:{...n,gap:24},parts:[{kind:"list",key:"locations",name:"City picture",props:{...n,darken:85,darkenStyle:"bottom",placement:"bottom-left",sectionBorder:y,...u(12,12)},item:(e,t,o)=>({props:{...r(e.photo).trim()?{bgImage:r(e.photo)}:{},link:`#${B(t)}`,boxShape:ee(o,e)}}),parts:[{kind:"text",key:"name",props:p,style:a(11,{letterSpacing:.22,color:"text"})}],groups:{of:s,name:"Group",props:{...n,gap:10},head:e=>({label:s(e[0]??{})}),parts:[d("label",a(11,{color:"accent",letterSpacing:.3}))],itemsName:"Cities",itemsProps:C(2),perRow:g,rowName:"Row",rowProps:{...k,phoneRow:2}}}]}]},ne={kind:"group",name:"Words",props:{...n,gap:12,...u(28,28),sectionBorder:{bottom:1},sectionHeightMode:"fixed",sectionHeightValue:280,sectionHeightUnit:"px",sectionHeightModePhone:"auto"},parts:[{kind:"group",name:"Name row",props:{...n,direction:"row",justify:"between",align:"start",gap:14,share:"content",wrap:!0},parts:[{kind:"group",name:"Name",props:{...n,gap:6},parts:[{kind:"text",key:"name",role:"heading",props:p,style:{textStyle:"heading-3",...c("headingSmall",30),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02}},{kind:"block",type:"Text",props:{...p,_partStyles:{text:a(12,{color:"accent",letterSpacing:.24})}},box:["region","state","country"].map(e=>[e,"text",(t,o)=>_(o)]),when:(e,t)=>_(t??{})!==""}]},{kind:"group",name:"Time zone",props:{...n,sectionBorder:y,...u(6,10)},parts:[{kind:"text",key:"timezone",props:i,style:a(12,{letterSpacing:.22})}]}]},{kind:"text",key:"address",props:i,style:{textStyle:"body-5",fontRole:"heading",...c("body",14),lineHeight:1.5}},{kind:"block",type:"ButtonBlock",props:{...b,...f,variant:"ghost",arrow:!1,_partStyles:{label:a(13,{letterSpacing:.18,color:"text"})}},box:[["phone","label"],["phone","href",e=>F(r(e))??"#"]],when:(e,t)=>r(t?.phone).trim()!==""},{kind:"text",key:"hours",props:i,style:a(12,{letterSpacing:.18,lineHeight:1.7})}]},re={kind:"block",type:"LocationMap",props:e=>({mapTheme:typeof e.mapTheme=="string"?e.mapTheme:"auto"}),box:["name","lat","lng","mapsUrl","geocode",...["region","state"].map(e=>[e,"state",(t,o)=>T(o)]),...["region","country"].map(e=>[e,"country",(t,o)=>O(o)])]},ae={kind:"list",key:"locations",name:"City",props:(e,t)=>({...n,gap:0,sectionBorder:y,jumpHighlight:!0,minWidth:te,sectionAccent:K(e,t)>=0?z(e.sectionAccent,t):-1}),item:(e,t)=>({props:{anchor:B(t)}}),parts:[ne,re],groups:{of:s,name:"Group",props:{...n,gap:20},head:e=>{const t=e[0]??{};return{key:s(t),groupName:r(t.groupName),count:`${e.length} location${e.length===1?"":"s"}`}},parts:[{kind:"group",name:"Group head",props:{...n,direction:"row",justify:"between",align:"end",gap:16,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},when:(e,t)=>r(t?.key).trim()!=="",parts:[d("key",a(13,{color:"accent",letterSpacing:.3})),{kind:"text",key:"groupName",role:"heading",props:p,style:{textStyle:"heading-3",...c("headingSmall",24),case:"upper",weight:500,letterSpacing:-.01}},{kind:"text",key:"count",props:i,style:a(12,{letterSpacing:.22})}]}],itemsName:"Cities",itemsProps:C(void 0,E),perRow:g,rowName:"Row",rowProps:{...k,...E}}},M=a(10,{letterSpacing:.25}),ie={kind:"block",type:G,props:{...n,name:"Credit",direction:"row",justify:"end",align:"center",gap:6,share:"content",wrap:!0},when:Q,slot:W,keepEmpty:!0,parts:[{kind:"block",type:"Text",props:{...i,text:"Location coordinates ©",_partStyles:{text:M}}},{kind:"block",type:"ButtonBlock",props:{...b,...f,variant:"ghost",arrow:!1,label:"OpenStreetMap contributors",href:"https://www.openstreetmap.org/copyright",_partStyles:{label:{...M,color:"labels"}}}}]},R=(e,t)=>Object.fromEntries(t.filter(o=>e[o]!==void 0).map(o=>[o,e[o]])),A=["sectionPaddingTop","sectionPaddingTopPhone"],L=["sectionPaddingBottom","sectionPaddingBottomPhone"],I=e=>e.map(t=>[t,t,(o,D)=>l(D,h)[t]]),H=["sectionAccent","sectionAccent",$],se=["gridSpan","_hidden"],pe={name:"City pictures",skip:e=>w(e)?`fed by the data source "${w(e)}": its cities are read as the page is served, not stored on the node`:void 0,boxProps:(e,t)=>({...S,direction:"column",gap:40,anchor:"studios",...R(l(e,h),A),sectionPaddingBottom:N,sectionPaddingBottomPhone:N,...P(e,t)}),box:[...v.filter(e=>e!=="sectionAccent"&&e!=="anchor"),H,["anchor","anchor",e=>r(e).trim()?e:"studios"],...I(A)],parts:[Y("sectionNumber","heading","tagline"),oe],also:[{name:"City maps",boxProps:(e,t)=>({...S,direction:"column",gap:40,sectionBorder:{bottom:1},sectionPaddingTop:0,sectionPaddingTopPhone:0,...R(l(e,h),L),...P(e,t)}),box:[...se,H,...I(L)],parts:[ae,ie]}],reads:{mapTheme:"City maps Box: each Map block's Map theme",imageShape:"City pictures Box: each picture Box's Box shape"},site:U,drop:{...j,...X,apiKey:"a stored Google Maps key from before the map needed none: the website's one map (components/SiteMap) takes no key, and a key is a credential, never page content",mapId:"a Google Maps style id from the same retired map: nothing in src/ reads it",gallery:"the retired separate tile list: the wall is derived from the cities (`components/ContactLocations`), nothing in src/ reads it",dataSource:"always empty here: a node fed by a source is skipped (see skip)"}},ke={ContactLocations:pe};export{ke as LOCATIONS_SECTION_TO_BOX};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hasWords as t}from"../../../sections/section-to-box.js";import{DROP_COMMON as d,DROP_SIDE_PADDING as i,INNER_BOX as l,SAME_KEYS as c,SECTION_BOX as p,TEXT as n,smallText as g,wrapperPad as s,wrapperPadKeys as m}from"./section-to-box-row-parts.js";import{finiteNumber as P}from"../../../../../format/lib/finite-number.js";const h={contained:!1},b=(o,e)=>({logos:[{kind:"list",key:o,name:"Logo",flat:!0,parts:[{kind:"block",type:"LogoBlock",box:["src",[e,"alt"]],when:(S,r)=>t(r?.src)||t(r?.[e])}]}]}),a=o=>{const e=P(o.bandPadding)??40;return{top:e,bottom:e,topPhone:e,bottomPhone:e}},k={...g("heading",{color:"labels",letterSpacing:.2}),props:{...n,align:"center"}},
|
|
1
|
+
import{hasWords as t}from"../../../sections/section-to-box.js";import{DROP_COMMON as d,DROP_SIDE_PADDING as i,INNER_BOX as l,SAME_KEYS as c,SECTION_BOX as p,TEXT as n,smallText as g,wrapperPad as s,wrapperPadKeys as m}from"./section-to-box-row-parts.js";import{finiteNumber as P}from"../../../../../format/lib/finite-number.js";const h={contained:!1},b=(o,e)=>({logos:[{kind:"list",key:o,name:"Logo",flat:!0,parts:[{kind:"block",type:"LogoBlock",box:["src",[e,"alt"]],when:(S,r)=>t(r?.src)||t(r?.[e])}]}]}),a=o=>{const e=P(o.bandPadding)??40;return{top:e,bottom:e,topPhone:e,bottomPhone:e}},k={...g("heading",{color:"labels",letterSpacing:.2}),props:{...n,align:"center"}},O={name:"Logos",boxProps:o=>({...p,direction:"column",gap:32,...s(o,a(o))}),box:[...c,...m(a),["bandPadding","sectionPaddingTop",(o,e)=>s(e,a(e)).sectionPaddingTop]],parts:[k,{kind:"core",keep:["columns","logoHeight","grayscale"],rename:{logosPerRow:"columns"},props:h,slots:b("items","alt")}],drop:{...d,...i,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)",headPlacement:"a Logos band has no split head (not in SPLITTABLE_SECTIONS): no stored node can hold one, and the converted block stores own-box"}},u={top:24,bottom:24,topPhone:24,bottomPhone:24},f={name:"Payment Methods",boxProps:o=>({...p,direction:"column",...s(o,u)}),box:[...c,...m(u)],skip:o=>t(o.dataSource)?"its payment methods come from a data source (a venue's Setup): a sourced list needs the card template (plan §3.2), not built yet":void 0,parts:[{kind:"group",name:"Methods",props:{...l,align:"center",gap:20,sectionBorder:{top:1,bottom:1},sectionPaddingTop:32,sectionPaddingBottom:32},parts:[{...g("heading",{color:"labels"}),props:{...n,align:"center"}},{kind:"core",keep:[],as:"Logos",props:{...h,look:"cards",grayscale:!1},slots:b("badges","label")},{kind:"group",name:"Reassurance",props:{...l,direction:"row",wrap:!0,justify:"center",gap:24},parts:[{kind:"list",key:"assurances",name:"Line",flat:!0,parts:[{kind:"text",key:"text",props:{...n,align:"center"},style:{size:13,color:"labels"}}]}]}]}],drop:{...d,...i,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)",dataSource:"empty: no source, so the authored badges above are the list (a node that names a source is skipped, see `skip`)"}},L={Logos:O,PaymentBadges:f};export{L as LOGOS_SECTION_TO_BOX};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hasWords as l}from"../../../sections/section-to-box.js";import{
|
|
1
|
+
import{phoneKey as d}from"efficient-easel/draw";import{hasWords as l}from"../../../sections/section-to-box.js";import{DROP_COMMON as c,DROP_SIDE_PADDING as h,INNER_BOX as o,SAME_KEYS as g,SECTION_BOX as u,TEXT as a,innerPad as S,innerPadKeys as x,smallText as f}from"./section-to-box-row-parts.js";import{headTree as w}from"./section-head-looks.js";const n=t=>typeof t=="string"?t.trim():"";function i(t){const e=`${n(t.prefix)}${n(t.value)}`,s=n(t.suffix);return t.emphasizeAll===!0?e?`==_${e}_==`:"":`${e}${s?`==_${s}_==`:""}`}const r={kind:"block",type:"Text",props:{...a,_partStyles:{text:{textStyle:"heading-1",case:"none",lineHeight:.9,letterSpacing:-.04}}},box:[["value","text",(t,e)=>i(e)]],when:(t,e)=>e!==void 0&&typeof e.value=="string"&&i(e)!==""},p=t=>l(t?.supSuffix),b={name:"Stats with Text",boxProps:t=>({...u,direction:"column",gap:60,sectionBorder:{bottom:1},...S(t,"StatsParagraph")}),box:[...g,...x("StatsParagraph")],parts:[w("StatsParagraph"),{kind:"group",name:"Stats",props:{...o,gap:0},parts:[{kind:"list",key:"stats",name:"Stat",perRow:()=>4,rowName:"Stats row",rowProps:{...o,direction:"row",gap:0,share:"equal"},props:{...o,justify:"between",gap:12,sectionPaddingTop:48,sectionPaddingBottom:48,sectionPaddingLeft:32,sectionPaddingRight:32,sectionBorder:{top:1,right:1,bottom:1,left:1}},parts:[{...r,when:(t,e)=>!p(e)&&r.when(t,e)},{kind:"group",name:"Figure",props:{...o,direction:"row",align:"start",gap:32,share:"content",phoneRow:2,[d("share")]:"content"},when:(t,e)=>p(e),parts:[r,{kind:"text",key:"supSuffix",props:a,style:{textStyle:"body-5",color:"accent",letterSpacing:.18,lineHeight:1,padding:18}}]},{kind:"group",name:"Words",props:{...o,gap:4},parts:[{kind:"text",key:"label",props:a,style:{textStyle:"body-1",letterSpacing:-.01},was:{size:16}},f("sub",{color:"labels",letterSpacing:.24})]}]}]}],drop:{...c,...h,background:"needs a Box fill: the old band painted this colour (the theme's section band, `var(--section-bg)`, or none) behind the head and round the cards, and a Box paints only its theme's page colour",headPlacement:"needs a row per head placement: an own-box Stats with Text draws no head (its words sit in a Section Header above it), the row always draws the head"}},T={StatsParagraph:b};export{T as STATS_SECTION_TO_BOX,i as figureWords};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{finiteNumber as x}from"../../../../../format/lib/finite-number.js";import{parseTickerSeparator as T}from"../../../../../format/lib/sections/ticker-style.js";import{DIM as o,DROP_COMMON as i,DROP_SIDE_PADDING as n,SAME_KEYS as r,SECTION_BOX as s,TEXT as b,wrapperPad as a,wrapperPadKeys as p}from"./section-to-box-row-parts.js";import{SPEC_PAD as d,SPEC_STRIP as u,SPEC_TEXT as l,STRIP_BOX as c,TICKER_DISPLAY as _,TICKER_PAD as m,TICKER_SMALL as f,TICKER_STRIP as k}from"../../../../../format/lib/sections/strip-shape.js";const h=e=>e.size==="display",P=(e,t)=>({kind:"list",key:"items",name:"Item",flat:!0,when:t,parts:[{kind:"text",key:"text",props:o,style:e}]}),y={name:"Scrolling Bar",boxProps:e=>({...s,...c,...k,...a(e,m)}),box:[["separator","separator",e=>T(e)],["borders","sectionBorder",e=>e===!1?void 0:{top:1,bottom:1}],...r,["tone","sectionAccent",(e,t)=>t.sectionAccent!==void 0?x(t.sectionAccent):e==="plain"?-1:void 0],...p(m)],parts:[P(f,e=>!h(e)),P(_,h)],drop:{...i,...n,scrollDirection:"carried to Loop › Direction (the Box's Animation tab) by this row once the Box Loop build PR (Panels And Popups director) is merged; the row stays OFF until then",speed:"carried to Loop › Duration (the Box's Animation tab) by this row once the Box Loop build PR (Panels And Popups director) is merged; the row stays OFF until then",join:"the band sitting inside its neighbour: absent on all 18 live Tickers (JJ 2026-10-27), and not the separator",size:"each item's Text style: Small → Body 5, Display → Heading 3"}},S=e=>e?.tone==="muted",I={name:"Spec Strip",boxProps:e=>({...s,...c,...u,...e.fill==="none"?{sectionBorder:{top:1}}:{},...a(e,d)}),box:[...r,...p(d)],parts:[{kind:"list",key:"cells",name:"Cell",flat:!0,parts:[{kind:"text",key:"text",props:b,style:l,when:(e,t)=>!S(t)},{kind:"text",key:"text",props:o,style:l,when:(e,t)=>S(t)}]}],drop:{...i,...n,fill:"None → no fill and a line on top. Dark band → the Box follows its theme: the old fixed `plate-band` colour has no home (no site write adds a theme preset since 8622589f); the merchant picks a dark theme on the Box"}},O={Ticker:y,SpecStrip:I};export{O as STRIP_SECTION_TO_BOX};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{convertTheme as S}from"../../../sections/section-to-box.js";import{BUTTON as g,DIM as s,bandAccent as _,bandIndex as E,bandPage as I,bandWrites as B,DROP_COMMON as h,DROP_SIDE_PADDING as m,INNER_BOX as i,SAME_KEYS as b,SECTION_BOX as y,TEXT as l,headingCaseOf as u,innerPad as x,innerPadKeys as k}from"./section-to-box-row-parts.js";import{splitParagraphs as O}from"../../../../components/goldPhrases.js";import{TIMELINE_YEAR_BOX as A,TIMELINE_YEAR_HEAD as w}from"../../../../../format/lib/sections/timeline-year-shape.js";const H="jetbrains-mono",T="space-grotesk",r=(e,t,o={})=>({textStyle:"body-5",font:H,size:e,sizePhone:e,letterSpacing:t,lineHeight:1.5,weight:400,...o}),p=(e,t,o,d)=>({font:T,size:e,sizePhone:t,case:"upper",weight:500,letterSpacing:o,lineHeight:d}),a=(e,t,o,d={})=>({textStyle:"body-1",font:T,size:e,sizePhone:t,weight:400,case:"none",lineHeight:o,...d}),n=(e,t,o={})=>({kind:"text",key:e,props:l,style:t,...o}),P=(e,t)=>t?.future===!0,f=(e,t)=>{const o=S(t)?.themes[I(e.sectionAccent,t)]?.line;return o?{buttonBorder:{width:1,color:o}}:{}},c=e=>O(typeof e?.body=="string"?e.body:""),M={name:"Milestone Timeline",boxProps:(e,t)=>{const o=E(e,t);return{...y,direction:"column",gap:60,sectionBorder:{bottom:1},...x(e,"TimelineTrack"),...o>=0?{sectionAccent:o}:{}}},box:[...b.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",_],...k("TimelineTrack")],parts:[{kind:"group",name:"Heading",props:{...i,direction:"row",align:"end",justify:"between",gap:40,share:"content",sectionPaddingBottom:32,sectionBorder:{bottom:1}},parts:[{kind:"group",name:"Title",props:{...i,direction:"row",align:"end",gap:40,share:"content"},parts:[n("eyebrow",r(13,.3,{case:"upper",color:"accent",padding:8}),{role:"eyebrow"}),n("title",{textStyle:"heading-2",...p(79,40,-.03,1)},{role:"heading"})]},n("intro",a(14,14,1.5),{props:{...s,align:"right",maxWidth:360}})]},{kind:"group",name:"Years",props:{...i,direction:"row",share:"equal",gap:0,line:!0},parts:[{kind:"list",key:"entries",name:"Year",props:{...i,...A},item:e=>({props:e.future===!0?{upcoming:!0}:{}}),parts:[{kind:"group",name:w.name,props:{...i,...w},parts:[n("date",r(13,.22,{color:"accent"}),{when:(e,t)=>!P(e,t)}),n("date",r(13,.22,{color:"labels"}),{when:P}),n("title",{textStyle:"heading-3",...p(20,20,-.02,1.1)},{role:"heading"})]},n("blurb",a(13,13,1.55),{props:s})]}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:(e,t)=>({...g,align:"right",...f(e,t)}),style:r(13,.3,{case:"upper"})}],site:(e,t)=>[...u("title")(e),...B(e,t)],drop:{...h,...m,background:"the band is the Box's theme: the site's band preset (`sectionAccent`), or a declared band-preset write (`lib/theme` `bandPresetIndex`)",headPlacement:"needs a row per head placement: an own-box Milestone Timeline draws no head (its words sit in a Section Header above it), the row always draws the head"}},N={name:"Story Timeline",skip:e=>{const t=typeof e.layout=="string"?e.layout:"split";return t==="split"?void 0:`display "${t}": not converted (0 live pages; Spine and Alternating are not offered, a Track story is not stored anywhere)`},boxProps:e=>({...y,direction:"row",share:"twoThree",gap:80,align:"start",...x(e,"Timeline")}),box:[...b,...k("Timeline")],parts:[{kind:"group",name:"Heading",props:{...i,gap:24},parts:[n("eyebrow",r(12,.3,{case:"upper",color:"accent"}),{role:"eyebrow"}),n("title",{textStyle:"heading-2",...p(72,40,-.03,.94)},{role:"heading"}),n("intro",a(14,14,1.6),{props:{...s,maxWidth:360}}),{kind:"group",name:"Picture",keepEmpty:!0,box:[["imageSrc","bgImage"]],props:{...i,sectionBorder:{top:1,right:1,bottom:1,left:1},darken:75,darkenStyle:"bottom",placement:"bottom-center",sectionHeightMode:"fixed",sectionHeightValue:667,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:419,sectionHeightUnitPhone:"px",sectionPaddingTop:12,sectionPaddingBottom:12,sectionPaddingLeft:16,sectionPaddingRight:16,sectionPaddingTopPhone:12,sectionPaddingBottomPhone:12,sectionPaddingLeftPhone:16,sectionPaddingRightPhone:16},when:e=>typeof e.imageSrc=="string"&&e.imageSrc.trim()!=="",parts:[{kind:"group",name:"Caption",props:{...i,direction:"row",justify:"between",align:"center",gap:12,share:"content",phoneRow:2},parts:[n("imageCaption",r(11,.24,{case:"upper",color:"text"})),n("imageMeta",r(11,.24,{case:"upper",color:"accent"}),{props:{...l,align:"right"}})]}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:(e,t)=>({...g,...f(e,t)}),style:r(13,.3,{case:"upper"})}]},{kind:"group",name:"Chapters",props:{...i,gap:48,line:!1},parts:[{kind:"list",key:"entries",name:"Chapter",props:{...i,direction:"row",gap:24,share:"biggerRight",align:"start"},parts:[n("date",r(13,.24,{color:"accent"})),{kind:"group",name:"Words",props:{...i,gap:14},parts:[n("title",{textStyle:"heading-3",...p(24,20,-.02,1.5)},{role:"heading"}),{kind:"block",type:"Text",props:{...l,_partStyles:{text:a(17,16,1.6)}},box:[["body","text",(e,t)=>c(t)[0]??""]],when:(e,t)=>c(t).length>0},{kind:"block",type:"Text",props:{...s,_partStyles:{text:a(17,16,1.6,{paragraphSpacing:14})}},box:[["body","text",(e,t)=>c(t).slice(1).join(`
|
|
2
|
+
|
|
3
|
+
`)]],when:(e,t)=>c(t).length>1}]}]}]}],site:u("title"),drop:{...h,...m,layout:"Split is the only display converted (see skip); the Box's own arrangement replaces it"}},L={TimelineTrack:M,Timeline:N};export{L as TIMELINE_SECTION_TO_BOX};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hasWords as
|
|
1
|
+
import{hasWords as x,registerSectionToBox as o}from"../../../sections/section-to-box.js";import{BUTTON as m,DIM as d,DROP_COMMON as n,DROP_SIDE_PADDING as p,INNER_BOX as t,SAME_KEYS as i,SECTION_BOX as r,TEXT as s,headingCaseOf as O,innerPad as c,innerPadKeys as y,smallText as a,wrapperPad as l,wrapperPadKeys as h}from"./section-to-box-row-parts.js";import{CARDS_SECTION_TO_BOX as T}from"./section-to-box-rows-cards.js";import{finiteNumber as f}from"../../../../../format/lib/finite-number.js";import{STATS_SECTION_TO_BOX as B}from"./section-to-box-rows-stats.js";import{LOGOS_SECTION_TO_BOX as _}from"./section-to-box-rows-logos.js";import{STRIP_SECTION_TO_BOX as N}from"./section-to-box-rows-strip.js";import{TIMELINE_SECTION_TO_BOX as E}from"./section-to-box-rows-timeline.js";import{LOCATIONS_SECTION_TO_BOX as H}from"./section-to-box-rows-locations.js";import{HEAD_ONLY_SECTION_TO_BOX as I}from"./section-to-box-rows-head.js";import{headTree as b}from"./section-head-looks.js";const u={top:72,bottom:72,topPhone:72,bottomPhone:72},v={name:"Editorial Text",boxProps:e=>({...r,direction:"column",gap:28,sectionBorder:{top:1},...l(e,u)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...i,...h(u)],parts:[b("Prose"),{kind:"text",key:"body",props:{...d,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.7,paragraphSpacing:18},was:{size:16}}],drop:{...n,...p,headPlacement:"needs a row per head placement: an own-box Prose draws no head (its words sit in a Section Header above it), the row always draws the head. 0 of 123 live nodes store it (JJ's export, 2026-10-24)"}},A={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},w=(e,k)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",variant:{key:"variant",map:{primary:"primary",outline:"ghost"},fallback:"ghost"},style:{letterSpacing:.3},props:{...m,...A,...k}}]}),g=e=>x(e.title),C={name:"Call-to-Action Heading",boxProps:e=>({...r,direction:"row",align:"center",justify:g(e)?"between":"end",gap:60,share:"content",sectionBorder:{bottom:1},...c(e,"TitleWithButtons")}),box:[...i,...y("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:t,parts:[{kind:"text",key:"title",role:"heading",props:{...s,maxWidth:1e3},style:{textStyle:"heading-1",lineHeight:.94,letterSpacing:-.035}}]},{kind:"group",name:"Buttons",props:{...t,gap:14},parts:[w(g,{widthFit:"fill",iconPosition:"end"}),w(e=>!g(e),{})]}],site:O("title"),drop:{...n,buttonsAlign:"moves the buttons only when there is no heading (4 of 128 live nodes), where the Box puts them at the end. 0 of 128 live nodes store it (JJ's export, 2026-10-24)",buttonsAlignPhone:"the phone's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Phone view's Block alignment row), so nothing moves"}},S={top:40,bottom:64,topPhone:24,bottomPhone:36},W={name:"Section Header",boxProps:e=>({...r,direction:"column",gap:0,...l(e,S)}),box:[...i,...h(S)],parts:[b("SectionHeader")],drop:{...n,...p,headStyle:"needs a row per head look: the row draws the standard look; the editorial, simple, statement, natural and essay looks are other layouts. 0 of 69 live nodes store it (JJ's export, 2026-10-24)",eyebrowLook:"read only by the simple, statement, natural and essay looks, which this row does not draw. 0 of 69 live nodes store it",rowGap:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",descriptionSize:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",numStyle:"Solid (the default; 4 of 69 live nodes store it) IS the eyebrow Text the row draws; Outlined (0 live) needs an outlined-number text look"}},R={name:"Lead Text",boxProps:e=>({...r,direction:"column",gap:40,sectionBorder:{bottom:1},...c(e,"ParagraphsA")}),box:[...i,...y("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...t,direction:"row",justify:"between",gap:60,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:40},parts:[a("eyebrow",{color:"labels",letterSpacing:.24}),{kind:"group",name:"Stats",props:{...t,align:"end"},parts:[{kind:"list",key:"stats",name:"Stat",props:{...t,direction:"row",share:"content",justify:"end",gap:8},parts:[a("value",{color:"text",letterSpacing:.18,lineHeight:1.8}),a("label",{color:"labels",letterSpacing:.18,lineHeight:1.8})]}]}]},{kind:"group",name:"Words",props:{...t,direction:"row",align:"end",gap:60,share:"bigLeft"},parts:[{kind:"text",key:"lead",props:{...s,maxWidth:780},style:{textStyle:"body-1",lineHeight:1.45,letterSpacing:-.005,paragraphSpacing:0},was:{size:22,sizePhone:20}},{kind:"group",name:"Founders",props:{...t,gap:8},parts:[{kind:"group",name:"Note",props:{...t,gap:6},parts:[{kind:"text",key:"foundersHeading",props:s,style:{textStyle:"body-1",weight:500,letterSpacing:-.01,lineHeight:1.7},was:{size:18,sizePhone:16}},{kind:"text",key:"foundersBody",props:d,style:{textStyle:"body-5",lineHeight:1.7},was:{size:14,sizePhone:12}}]},a("attribution",{letterSpacing:.24,lineHeight:1.7})]}]}],drop:{...n}},P={top:24,bottom:24,topPhone:24,bottomPhone:24},L={name:"Banner",boxProps:e=>({...r,direction:"column",gap:0,...l(e,P)}),box:[...i,"contained",...h(P)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...t,gap:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},sectionPaddingTop:64,sectionPaddingBottom:64,sectionPaddingTopPhone:40,sectionPaddingBottomPhone:40,sectionPaddingLeft:40,sectionPaddingRight:40,sectionPaddingLeftPhone:24,sectionPaddingRightPhone:24},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(f(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...t,gap:20},parts:[a("eyebrow"),{kind:"text",key:"title",role:"heading",props:{...s,maxWidth:680},style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none"}},{kind:"text",key:"body",props:{...d,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6},was:{size:16}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:m}]}],drop:{...n,...p}},X={Prose:v,TitleWithButtons:C,SectionHeader:W,ParagraphsA:R,Banner:L};function Q(){o(X),o(B),o(_),o(T),o(N),o(E),o(H),o(I)}export{X as GENERAL_SECTION_TO_BOX,Q as registerGeneralSectionRows};
|
|
@@ -1,34 +1,16 @@
|
|
|
1
1
|
import type { CSSProperties, ReactNode } from "react";
|
|
2
|
-
export declare function pageWidthTokens(
|
|
3
|
-
widthMode?: unknown;
|
|
4
|
-
fullWidth?: unknown;
|
|
5
|
-
pageWidth?: unknown;
|
|
6
|
-
}): {
|
|
7
|
-
frameClass?: string;
|
|
2
|
+
export declare function pageWidthTokens(): {
|
|
8
3
|
style: CSSProperties;
|
|
9
4
|
};
|
|
10
|
-
export declare function PageWidthWrapper({
|
|
11
|
-
w: {
|
|
12
|
-
widthMode?: unknown;
|
|
13
|
-
fullWidth?: unknown;
|
|
14
|
-
pageWidth?: unknown;
|
|
15
|
-
};
|
|
5
|
+
export declare function PageWidthWrapper({ children }: {
|
|
16
6
|
children?: ReactNode;
|
|
17
7
|
}): import("react").JSX.Element;
|
|
18
|
-
export declare function PublishedPageFrame({ pageBackground, inheritBackground,
|
|
8
|
+
export declare function PublishedPageFrame({ pageBackground, inheritBackground, children, }: {
|
|
19
9
|
pageBackground?: unknown;
|
|
20
10
|
inheritBackground?: boolean;
|
|
21
|
-
w: {
|
|
22
|
-
widthMode?: unknown;
|
|
23
|
-
fullWidth?: unknown;
|
|
24
|
-
pageWidth?: unknown;
|
|
25
|
-
};
|
|
26
11
|
children?: ReactNode;
|
|
27
12
|
}): import("react").JSX.Element;
|
|
28
13
|
export declare function drawPublishedRoot(rootProps: {
|
|
29
14
|
children?: ReactNode;
|
|
30
|
-
widthMode?: unknown;
|
|
31
|
-
fullWidth?: unknown;
|
|
32
|
-
pageWidth?: unknown;
|
|
33
15
|
pageBackground?: unknown;
|
|
34
16
|
}): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{pageBackgroundVars as o}from"../../../format/lib/content/page-background.js";import{SITE_WIDTH_CAP as i}from"../../../format/lib/content/page-width.js";function a(){return{style:{"--sf-page-width":i}}}function d({children:r}){return e("div",{style:a().style,children:r})}function c({pageBackground:r,inheritBackground:t=!1,children:n}){return e("div",{style:{...t?{}:o(r),background:"var(--bg)",minHeight:"100%",overflowX:"clip"},children:e(d,{children:n})})}function u(r){const{children:t,pageBackground:n}=r;return e(c,{pageBackground:n,children:t})}export{d as PageWidthWrapper,c as PublishedPageFrame,u as drawPublishedRoot,a as pageWidthTokens};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t}from"react/jsx-runtime";import{Render as m}from"efficient-easel/render";import{capHeroGroups as
|
|
1
|
+
"use client";import{jsx as t}from"react/jsx-runtime";import{Render as m}from"efficient-easel/render";import{capHeroGroups as i}from"../../../format/lib/document/cap-hero-groups.js";import{oneH1 as a}from"../../../format/lib/document/one-h1.js";import{migrateLegacyPageData as n}from"./migrate-legacy.js";import{migrateRenamedProps as f}from"../../../format/lib/document/renamed-props.js";import{convertSectionsInPage as p,SECTION_TO_BOX_ON as s}from"../sections/section-to-box.js";import{siteThemeOf as c}from"../../../format/lib/theme.js";import{registerGeneralSectionRows as g}from"./blocks/general/section-to-box-rows.js";function d({config:e,data:o,metadata:r}){return g(),t(m,{config:e,metadata:r,data:a(i(p(f(n(o)),s,{theme:c(r)})))})}export{d as default};
|
|
@@ -19,9 +19,6 @@ export declare const PART_NUDGE_MAX = 10;
|
|
|
19
19
|
export declare const PART_PADDING_MIN = 0;
|
|
20
20
|
export declare const PART_PADDING_MAX = 64;
|
|
21
21
|
export declare const PART_PADDING_STEP = 2;
|
|
22
|
-
export declare const PART_WIDTH_MIN = 120;
|
|
23
|
-
export declare const PART_WIDTH_MAX = 1280;
|
|
24
|
-
export declare const PART_WIDTH_STEP = 10;
|
|
25
22
|
export declare const PART_MEASURED_TRACKS: {
|
|
26
23
|
readonly size: {
|
|
27
24
|
readonly min: 5;
|
|
@@ -38,11 +35,6 @@ export declare const PART_MEASURED_TRACKS: {
|
|
|
38
35
|
readonly max: 64;
|
|
39
36
|
readonly step: 2;
|
|
40
37
|
};
|
|
41
|
-
readonly width: {
|
|
42
|
-
readonly min: 120;
|
|
43
|
-
readonly max: 1280;
|
|
44
|
-
readonly step: 10;
|
|
45
|
-
};
|
|
46
38
|
};
|
|
47
39
|
export type PartMeasuredProp = keyof typeof PART_MEASURED_TRACKS;
|
|
48
40
|
export declare const PART_LINE_STEP = 0.05;
|
|
@@ -55,12 +47,25 @@ export declare const PART_LETTER_EM_MIN = -1;
|
|
|
55
47
|
export declare const PART_LETTER_EM_MAX = 1;
|
|
56
48
|
export declare const PART_PARAGRAPH_MIN = 0;
|
|
57
49
|
export declare const PART_PARAGRAPH_MAX = 400;
|
|
50
|
+
export declare const PART_SIZE_STEPS: readonly string[];
|
|
51
|
+
export type PartSizeToken = {
|
|
52
|
+
step: string;
|
|
53
|
+
px: number;
|
|
54
|
+
stepPhone?: string;
|
|
55
|
+
pxPhone?: number;
|
|
56
|
+
fluid?: {
|
|
57
|
+
minPx: number;
|
|
58
|
+
vw: number;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
58
61
|
export type PartStyle = {
|
|
59
62
|
font?: string;
|
|
60
63
|
role?: FontRole;
|
|
64
|
+
fontRole?: FontRole;
|
|
61
65
|
textStyle?: string;
|
|
62
66
|
weight?: PartWeight;
|
|
63
67
|
size?: number;
|
|
68
|
+
sizeToken?: PartSizeToken;
|
|
64
69
|
line?: number;
|
|
65
70
|
letter?: number;
|
|
66
71
|
lineHeight?: number;
|
|
@@ -69,10 +74,10 @@ export type PartStyle = {
|
|
|
69
74
|
case?: TextStyleCase;
|
|
70
75
|
align?: PartAlign;
|
|
71
76
|
padding?: number;
|
|
72
|
-
width?: number;
|
|
73
77
|
color?: string;
|
|
74
78
|
italic?: boolean;
|
|
75
79
|
sizePhone?: number;
|
|
80
|
+
alignPhone?: PartAlign;
|
|
76
81
|
};
|
|
77
82
|
export type PartStyleBase = {
|
|
78
83
|
fontKey: string;
|
|
@@ -83,7 +88,6 @@ export type PartStyleBase = {
|
|
|
83
88
|
align: PartAlign;
|
|
84
89
|
case: TextStyleCase;
|
|
85
90
|
paddingPx: number;
|
|
86
|
-
widthPx: number;
|
|
87
91
|
};
|
|
88
92
|
export type PartStyles = Record<string, PartStyle>;
|
|
89
93
|
export type StyledPartEl = PartEl & {
|
|
@@ -113,7 +117,6 @@ export declare const PART_PARAGRAPH_VAR = "--sf-part-para";
|
|
|
113
117
|
export declare function partPhoneDeclarations(style: PartStyle): Record<string, string>;
|
|
114
118
|
export declare function partStyleForScreen(style: PartStyle, phone: boolean): PartStyle;
|
|
115
119
|
export declare function partStyleDeclarations(style: PartStyle, base: PartStyleBase, options?: PartDeclarationOptions): Record<string, string>;
|
|
116
|
-
export declare function isHexColour(value: string): boolean;
|
|
117
120
|
export type MeasuredPartStyle = {
|
|
118
121
|
fontSize: string;
|
|
119
122
|
fontWeight: string;
|
|
@@ -122,7 +125,6 @@ export type MeasuredPartStyle = {
|
|
|
122
125
|
textAlign: string;
|
|
123
126
|
textTransform: string;
|
|
124
127
|
paddingTop: string;
|
|
125
|
-
maxWidth: string;
|
|
126
128
|
};
|
|
127
129
|
export declare function partStyleBase(measured: MeasuredPartStyle, fontKey: string): PartStyleBase;
|
|
128
130
|
export declare function partFontKeyOf(family: string, resolve: (cssVar: string) => string): string;
|
|
@@ -148,5 +150,5 @@ export declare function publishedPartStyles(needles: readonly PartNeedle[], styl
|
|
|
148
150
|
export declare function isPartKindKey(key: string): boolean;
|
|
149
151
|
export declare function partRuleForKind(sheet: PublishedPartSheet | null, kind: string): PublishedPartRule | null;
|
|
150
152
|
export declare function partStyleCss(sheet: PublishedPartSheet): string;
|
|
151
|
-
export declare function paragraphRules(scope: string): string[];
|
|
153
|
+
export declare function paragraphRules(scope: string, paragraph: string): string[];
|
|
152
154
|
export declare function partRuleForText(sheet: PublishedPartSheet | null, value: string): PublishedPartRule | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{textStyleCaseCss as q,textStyleCaseOfCss as J}from"efficient-easel/draw";import{FONT_OPTIONS as Q,FONT_ROLES as O,fontOption as v,SIZE_STEP_OF_ROLE as tt}from"../../../format/lib/fonts.js";import{encodePartKey as et}from"../../../format/lib/document/part-key.js";import{decodePartId as H,normalizePartText as N}from"./text-parts.js";import{COLOUR_TOKEN as F}from"../../../format/lib/word-styles.js";import{PHONE_MEDIA as nt}from"../content/view-values.js";const w="_partStyles",rt="data-sf-part-styled",L="data-sf-text-style",ot=/^(heading|body)-[1-7]$/;function S(t){return typeof t=="string"&&ot.test(t)}const z={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function it(t){if(!t)return null;for(const[e,n]of Object.entries(z))if(n===t)return e;return null}function re(t){if(S(t.textStyle))return t.textStyle;const e=t.role&&O.includes(t.role)?t.role:null;return e?z[e]:void 0}const st=[400,500,600,700],k=["left","center","right","justify"],D=5,j=1e3,at=-5,ct=10,lt=0,ft=64,ut=2,pt=120,E=1280,dt=10,W={size:{min:D,max:j,step:1},sizePhone:{min:D,max:j,step:1},padding:{min:lt,max:ft,step:ut},width:{min:pt,max:E,step:dt}},xt=.05,ht=.01,gt=["line","letter"],St=.5,mt=2.5,Pt=-1,Tt=1,_t=0,bt=400;function T(t){return!t||typeof t!="object"||Array.isArray(t)?null:t}function C(t){return T(t?.[w])??{}}function K(t,e){const n=C(t);return Object.hasOwn(n,e)?T(n[e])??{}:{}}function oe(t,e){return Object.values(K(t,e)).filter(n=>n!==void 0).length}function G(t,e,n){const r={...C(t)};if(At(n).length?r[e]=n:delete r[e],!Object.keys(r).length){const{[w]:o,...i}=t;return i}return{...t,[w]:r}}function At(t){return Object.entries(t).filter(([,e])=>e!==void 0)}function Rt(t){return gt.includes(t)}const _=(t,e,n)=>Math.min(n,Math.max(e,t));function Et(t,e){if(Rt(t)){const n=Math.round(Number(e));return!Number.isFinite(n)||n===0?null:_(n,at,ct)}if(t==="lineHeight"){const n=Number(e);return Number.isFinite(n)?m(_(n,St,mt),3):null}if(t==="letterSpacing"){const n=Number(e);return Number.isFinite(n)?m(_(n,Pt,Tt),4):null}if(t==="paragraphSpacing"){const n=Math.round(Number(e));return!Number.isFinite(n)||n<=0?null:_(n,_t,bt)}if(Object.hasOwn(W,t)){const{min:n,max:r}=W[t],o=Math.round(Number(e));return Number.isFinite(o)?_(o,n,r):null}return t==="italic"?typeof e=="boolean"?e:null:t==="role"?O.includes(String(e))?e:null:t==="textStyle"?S(e)?e:null:e}const yt=["weight","size","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding","width"];function X(t){let e=null;const n=r=>{e??={...t},delete e[r]};for(const r of yt){const o=t[r];o!==void 0&&!(typeof o=="number"&&Number.isFinite(o))&&n(r)}return t.align!==void 0&&!k.includes(t.align)&&n("align"),t.textStyle!==void 0&&!S(t.textStyle)&&n("textStyle"),e??t}const Ot=[["font","role"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function Nt(t){const e=[];for(const[n,r]of Ot)n===t?e.push(r):r===t&&e.push(n);return e}function ie(t,e,n,r){const o={...K(t,e)},i=r==null?null:Et(n,r);if(i===null)delete o[n];else{o[n]=i;for(const s of Nt(n))delete o[s]}return G(t,e,o)}function se(t,e){return G(t,e,{})}function wt(t){return J(t)??"none"}function It(t){return q(t)??""}const $t={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function Mt(t,e){const n=t.role;return n&&O.includes(n)?n:e?.blockDrawsStyle?null:it(t.textStyle)}function ae(t,e){return t==="Text"&&e==="text"}const Ht={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function Ft(t){const e=tt[t],n=Ht[e];return n?`var(--size-${e}, ${n})`:`var(--size-${e})`}function Lt(t){const e={};return typeof t.lineHeight=="number"?e.lineHeight=t.lineHeight:t.line&&(e.lineHeight=m(zt+t.line*xt,3)),typeof t.letterSpacing=="number"?e.letterSpacingEm=t.letterSpacing:t.letter&&(e.letterSpacingEm=m(t.letter*ht,4)),e}const zt=1,b="--sf-part-para";function U(t){return t=X(t),typeof t.sizePhone=="number"&&t.sizePhone>0?{fontSize:`${t.sizePhone}px`}:{}}function kt(t,e){return e&&typeof t.sizePhone=="number"&&t.sizePhone>0?{...t,size:t.sizePhone}:t}function y(t,e,n){t=X(t);const r=Mt(t,n),o=Lt(t),i=t.size?`${t.size}px`:r?Ft(r):"";return{fontFamily:t.font?Ct(t.font):r?`var(${$t[r]})`:"",fontWeight:t.weight?String(t.weight):"",fontSize:i,minWidth:i?"0":"",overflowWrap:i?"break-word":"",lineHeight:o.lineHeight!==void 0?String(o.lineHeight):"",letterSpacing:o.letterSpacingEm!==void 0?`${o.letterSpacingEm}em`:"",[b]:t.paragraphSpacing?`${t.paragraphSpacing}px`:"",textTransform:It(t.case),textAlign:t.align??"",paddingTop:I(t.padding),paddingBottom:I(t.padding),maxWidth:I(t.width),color:Dt(t.color),fontStyle:t.italic===!0?"italic":t.italic===!1?"normal":""}}const Dt=t=>t===void 0||t===""?"":Object.hasOwn(F,t)?F[t]:B.test(t)?t:"",B=/^#[0-9a-fA-F]{6}$/;function ce(t){return B.test(t)}const I=t=>t===void 0?"":`${t}px`,m=(t,e)=>Number(t.toFixed(e));function le(t,e){const n=Number.parseFloat(t.fontSize)||16,r=Number.parseFloat(t.lineHeight),o=Number.parseFloat(t.letterSpacing),i=Number.parseFloat(t.paddingTop),s=Number.parseFloat(t.maxWidth);return{fontKey:e,sizePx:n,weight:jt(Number.parseInt(t.fontWeight,10)),lineRatio:Number.isFinite(r)?m(r/n,3):1.2,letterEm:Number.isFinite(o)?m(o/n,4):0,align:Wt(t.textAlign),case:wt(t.textTransform),paddingPx:Number.isFinite(i)?Math.round(i):0,widthPx:Number.isFinite(s)&&s<E?Math.round(s):E}}function jt(t){return Number.isFinite(t)?st.reduce((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e):400}function Wt(t){for(const e of k)if(e===t)return e;return t==="end"?"right":"left"}function fe(t,e){const n=V(t);if(!n)return"";for(const r of Q)if(V(e(r.cssVar))===n)return r.key;return""}const V=t=>(t.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function Ct(t){const e=v(t);return e?`var(${e.cssVar})`:""}function ue(t,e,n,r){return!e||H(e)?.nodeId!==t?null:n.find(i=>r(i.getAttribute("class")))??n[0]??null}function pe(t,e,n=()=>A,r=d=>d,o=Xt,i=!1,s=()=>!1){let d=0;for(const{element:a,partId:c}of t){const u=H(c)?.propKey;if(!u)continue;const l=r(u),p=Object.hasOwn(e,l)?T(e[l])??{}:{},f=y(kt(p,i),A,{blockDrawsStyle:s(u)});S(p.textStyle)?a.setAttribute?.(L,p.textStyle):a.removeAttribute?.(L);const g=M.some(h=>a.style[h]);let x=!1;for(const[h,P]of Object.entries(f))Ut(a,h,P),P&&(x=!0);if(g||M.some(h=>f[h]))for(const h of Kt(a,o))for(const P of M)h.style[P]=f[P]??"";x&&(d+=1)}return d}function Kt(t,e){const n=N(t.textContent??""),r=[];let o=t;for(let i=0;i<Gt&&e(o);i+=1){const s=o.parentElement;if(!s||N(s.textContent??"")!==n)break;r.push(s),o=s}return r}const Gt=8;function Xt(t){const e=t;return typeof window>"u"||!e?.ownerDocument?!1:window.getComputedStyle(e).display==="inline"}const A={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:E};function Ut(t,e,n){if(!e.startsWith("--")){t.style[e]=n;return}const r=t.style;typeof r.setProperty=="function"?n?r.setProperty(e,n):r.removeProperty?.(e):r[e]=n;const o=t;e===b&&(n?o.setAttribute?.(Y,""):o.removeAttribute?.(Y))}const Y="data-sf-part-para",Bt=Object.keys(y({},A)),$=new Set(["color","overflowWrap",b,"fontStyle"]),M=Bt.filter(t=>!$.has(t));function de(t,e,n,r=i=>i,o=()=>!1){const i=new Map;for(const a of t){const c=et(a.key,a.row);for(const u of a.texts){const l=i.get(u);l?(l.keys.add(a.key),l.partKeys.add(c)):i.set(u,{keys:new Set([a.key]),partKeys:new Set([c])})}}const s=new Map;for(const a of Object.keys(e)){if(!Vt(a))continue;const c=T(e[a])??{},u=y(c,A),l=U(c),p=S(c.textStyle)?c.textStyle:void 0;!Object.values(u).some(Boolean)&&!Object.keys(l).length&&!p||s.set(a,{stamp:Z(n,a),declarations:u,...Object.keys(l).length?{phone:l}:{},...p?{textStyle:p}:{}})}const d=new Map;for(const[a,{keys:c,partKeys:u}]of i){const l=u.size===1?[...u][0]:c.size===1?[...c][0]:null;if(!l)continue;const p=r(l);if(!Object.hasOwn(e,p))continue;const f=T(e[p])??{},g=y(f,A,{blockDrawsStyle:o(l)}),x=U(f),R=S(f.textStyle)?f.textStyle:void 0;!Object.values(g).some(Boolean)&&!Object.keys(x).length&&!R||d.set(a,{stamp:Z(n,l),declarations:g,...Object.keys(x).length?{phone:x}:{},...R?{textStyle:R}:{}})}return d.size||s.size?{rules:d,kindRules:s,drawn:new Set(i.keys())}:null}function Vt(t){return t.startsWith("@")}function xe(t,e){return t?.kindRules.get(e)??null}function Z(t,e){const n=r=>r.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(t)}~${n(e)}`}function he(t){const e=[],n=new Set,r=o=>{const{stamp:i,declarations:s}=o;if(n.has(i))return;n.add(i);const d=Object.entries(s).filter(([,f])=>f!==""),a=f=>f.map(([g,x])=>`${Zt(g)}: ${x}`).join("; "),c=`[${rt}="${i}"]`,u=d.filter(([f])=>!$.has(f)),l=d.filter(([f])=>$.has(f));u.length&&e.push(`${c}, *:has(> ${c}) { ${a(u)} }`),l.length&&e.push(`${c} { ${a(l)} }`),s[b]&&e.push(...Yt(c));const p=Object.entries(o.phone??{}).filter(([,f])=>f!=="");p.length&&e.push(`@media ${nt} { ${c}, *:has(> ${c}) { ${a(p)} } }`)};for(const o of t.rules.values())r(o);for(const o of t.kindRules.values())r(o);return e.join(`
|
|
2
|
-
`)}function
|
|
1
|
+
import{textStyleCaseCss as v,textStyleCaseOfCss as tt}from"efficient-easel/draw";import{parseHexColor as et}from"efficient-shell/format";import{FONT_OPTIONS as nt,fontOption as ot,fontRoleOf as E,SIZE_STEP_OF_ROLE as M}from"../../../format/lib/fonts.js";import{encodePartKey as rt}from"../../../format/lib/document/part-key.js";import{decodePartId as F,normalizePartText as N}from"./text-parts.js";import{COLOUR_TOKEN as L}from"../../../format/lib/word-styles.js";import{PHONE_MEDIA as it}from"../content/view-values.js";const $="_partStyles",st="data-sf-part-styled",j="data-sf-text-style",ct=/^(heading|body)-[1-7]$/;function m(t){return typeof t=="string"&&ct.test(t)}const H={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function at(t){if(!t)return null;for(const[e,n]of Object.entries(H))if(n===t)return e;return null}function se(t){if(m(t.textStyle))return t.textStyle;const e=E(t.role);return e?H[e]:void 0}const ft=[400,500,600,700],y=["left","center","right","justify"],D=5,C=1e3,lt=-5,ut=10,pt=0,dt=64,xt=2,K={size:{min:D,max:C,step:1},sizePhone:{min:D,max:C,step:1},padding:{min:pt,max:dt,step:xt}},ht=.05,gt=.01,St=["line","letter"],mt=.5,Pt=2.5,Tt=-1,bt=1,_t=0,Rt=400,At=[...new Set(Object.values(M))];function b(t){return!t||typeof t!="object"||Array.isArray(t)?null:t}function W(t){return b(t?.[$])??{}}function G(t,e){const n=W(t);return Object.hasOwn(n,e)?b(n[e])??{}:{}}function ce(t,e){return Object.values(G(t,e)).filter(n=>n!==void 0).length}function X(t,e,n){const o={...W(t)};if(Et(n).length?o[e]=n:delete o[e],!Object.keys(o).length){const{[$]:r,...i}=t;return i}return{...t,[$]:o}}function Et(t){return Object.entries(t).filter(([,e])=>e!==void 0)}function yt(t){return St.includes(t)}const _=(t,e,n)=>Math.min(n,Math.max(e,t));function Ot(t,e){if(yt(t)){const n=Math.round(Number(e));return!Number.isFinite(n)||n===0?null:_(n,lt,ut)}if(t==="lineHeight"){const n=Number(e);return Number.isFinite(n)?P(_(n,mt,Pt),3):null}if(t==="letterSpacing"){const n=Number(e);return Number.isFinite(n)?P(_(n,Tt,bt),4):null}if(t==="paragraphSpacing"){const n=Math.round(Number(e));return!Number.isFinite(n)||n<=0?null:_(n,_t,Rt)}if(Object.hasOwn(K,t)){const{min:n,max:o}=K[t],r=Math.round(Number(e));return Number.isFinite(r)?_(r,n,o):null}return t==="italic"?typeof e=="boolean"?e:null:t==="role"||t==="fontRole"?E(e)?e:null:t==="sizeToken"?z(e)?e:null:t==="textStyle"?m(e)?e:null:t==="alignPhone"?y.includes(e)?e:null:e}const Nt=["weight","size","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function w(t){let e=null;const n=o=>{e??={...t},delete e[o]};for(const o of Nt){const r=t[o];r!==void 0&&!(typeof r=="number"&&Number.isFinite(r))&&n(o)}return t.align!==void 0&&!y.includes(t.align)&&n("align"),t.alignPhone!==void 0&&!y.includes(t.alignPhone)&&n("alignPhone"),t.textStyle!==void 0&&!m(t.textStyle)&&n("textStyle"),t.sizeToken!==void 0&&!z(t.sizeToken)&&n("sizeToken"),t.fontRole!==void 0&&!E(t.fontRole)&&n("fontRole"),e??t}function z(t){if(!t||typeof t!="object")return!1;const{step:e,px:n,stepPhone:o,pxPhone:r,fluid:i}=t,c=s=>typeof s=="number"&&Number.isFinite(s)&&s>0,p=s=>typeof s=="string"&&At.includes(s);return p(e)&&c(n)&&(o===void 0||p(o))&&(r===void 0||c(r))&&(i===void 0||$t(i,n))}function $t(t,e){if(!t||typeof t!="object"||Array.isArray(t))return!1;const{minPx:n,vw:o,...r}=t;return Object.keys(r).length===0&&typeof n=="number"&&Number.isFinite(n)&&n>0&&n<e&&typeof o=="number"&&Number.isFinite(o)&&o>0&&o<=100}function U(t){return t?.pxPhone&&z(t)?{step:t.stepPhone??t.step,px:t.pxPhone}:null}function B({step:t,px:e,fluid:n}){const o=n?`clamp(${n.minPx}px, ${n.vw}vw, ${e}px)`:`${e}px`,r=`var(--size-${t}, ${o})`;return t.startsWith("heading")?`min(${r}, var(--sf-heading-max,9999px))`:r}const wt=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function zt(t){const e=[];for(const[n,o]of wt)n===t?e.push(o):o===t&&e.push(n);return e}function ae(t,e,n,o){const r={...G(t,e)},i=o==null?null:Ot(n,o);if(i===null)delete r[n];else{r[n]=i;for(const c of zt(n))delete r[c]}return X(t,e,r)}function fe(t,e){return X(t,e,{})}function It(t){return tt(t)??"none"}function kt(t){return v(t)??""}const V={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function Mt(t,e){const n=E(t.role);return n||(e?.blockDrawsStyle?null:at(t.textStyle))}function le(t,e){return t==="Text"&&e==="text"}const Ft={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function Lt(t){const e=M[t],n=Ft[e];return n?`var(--size-${e}, ${n})`:`var(--size-${e})`}function jt(t){const e={};return typeof t.lineHeight=="number"?e.lineHeight=t.lineHeight:t.line&&(e.lineHeight=P(Ht+t.line*ht,3)),typeof t.letterSpacing=="number"?e.letterSpacingEm=t.letterSpacing:t.letter&&(e.letterSpacingEm=P(t.letter*gt,4)),e}const Ht=1,g="--sf-part-para";function Y(t){t=w(t);const e={};if(typeof t.sizePhone=="number"&&t.sizePhone>0)e.fontSize=`${t.sizePhone}px`;else{const n=U(t.sizeToken);n&&(e.fontSize=B(n))}return t.alignPhone&&(e.textAlign=t.alignPhone),e}function Dt(t,e){if(!e)return t;const n=w(t);let o=t;if(typeof n.sizePhone=="number"&&n.sizePhone>0)o={...o,size:n.sizePhone};else{const r=U(n.sizeToken);r&&(o={...o,size:void 0,sizeToken:r})}return n.alignPhone&&(o={...o,align:n.alignPhone}),o}function O(t,e,n){t=w(t);const o=Mt(t,n),r=jt(t),i=t.size?`${t.size}px`:t.sizeToken?B(t.sizeToken):o?Lt(o):"";return{fontFamily:t.font?Gt(t.font):t.fontRole?`var(${V[t.fontRole]})`:o?`var(${V[o]})`:"",fontWeight:t.weight?String(t.weight):"",fontSize:i,minWidth:i?"0":"",overflowWrap:i?"break-word":"",lineHeight:r.lineHeight!==void 0?String(r.lineHeight):"",letterSpacing:r.letterSpacingEm!==void 0?`${r.letterSpacingEm}em`:"",[g]:t.paragraphSpacing?`${t.paragraphSpacing}px`:"",textTransform:kt(t.case),textAlign:t.align??"",paddingTop:Z(t.padding),paddingBottom:Z(t.padding),color:Ct(t.color),fontStyle:t.italic===!0?"italic":t.italic===!1?"normal":""}}const Ct=t=>t===void 0||t===""?"":Object.hasOwn(L,t)?L[t]:et(t)===t.toLowerCase()?t:"",Z=t=>t===void 0?"":`${t}px`,P=(t,e)=>Number(t.toFixed(e));function ue(t,e){const n=Number.parseFloat(t.fontSize)||16,o=Number.parseFloat(t.lineHeight),r=Number.parseFloat(t.letterSpacing),i=Number.parseFloat(t.paddingTop);return{fontKey:e,sizePx:n,weight:Kt(Number.parseInt(t.fontWeight,10)),lineRatio:Number.isFinite(o)?P(o/n,3):1.2,letterEm:Number.isFinite(r)?P(r/n,4):0,align:Wt(t.textAlign),case:It(t.textTransform),paddingPx:Number.isFinite(i)?Math.round(i):0}}function Kt(t){return Number.isFinite(t)?ft.reduce((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e):400}function Wt(t){for(const e of y)if(e===t)return e;return t==="end"?"right":"left"}function pe(t,e){const n=q(t);if(!n)return"";for(const o of nt)if(q(e(o.cssVar))===n)return o.key;return""}const q=t=>(t.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function Gt(t){const e=ot(t);return e?`var(${e.cssVar})`:""}function de(t,e,n,o){return!e||F(e)?.nodeId!==t?null:n.find(i=>o(i.getAttribute("class")))??n[0]??null}function xe(t,e,n=()=>R,o=p=>p,r=Bt,i=!1,c=()=>!1){let p=0;for(const{element:s,partId:a}of t){const u=F(a)?.propKey;if(!u)continue;const f=o(u),d=Object.hasOwn(e,f)?b(e[f])??{}:{},l=O(Dt(d,i),R,{blockDrawsStyle:c(u)});m(d.textStyle)?s.setAttribute?.(j,d.textStyle):s.removeAttribute?.(j);const S=k.some(h=>s.style[h]);let x=!1;for(const[h,T]of Object.entries(l))Vt(s,h,T),T&&(x=!0);if(S||k.some(h=>l[h]))for(const h of Xt(s,r))for(const T of k)h.style[T]=l[T]??"";x&&(p+=1)}return p}function Xt(t,e){const n=N(t.textContent??""),o=[];let r=t;for(let i=0;i<Ut&&e(r);i+=1){const c=r.parentElement;if(!c||N(c.textContent??"")!==n)break;o.push(c),r=c}return o}const Ut=8;function Bt(t){const e=t;return typeof window>"u"||!e?.ownerDocument?!1:window.getComputedStyle(e).display==="inline"}const R={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function Vt(t,e,n){if(!e.startsWith("--")){t.style[e]=n;return}const o=t.style;typeof o.setProperty=="function"?n?o.setProperty(e,n):o.removeProperty?.(e):o[e]=n;const r=t;e===g&&(n?r.setAttribute?.(J,""):r.removeAttribute?.(J))}const J="data-sf-part-para",Yt=Object.keys(O({},R)),I=new Set(["color","overflowWrap",g,"fontStyle"]),k=Yt.filter(t=>!I.has(t));function he(t,e,n,o=i=>i,r=()=>!1){const i=new Map;for(const s of t){const a=rt(s.key,s.row);for(const u of s.texts){const f=i.get(u);f?(f.keys.add(s.key),f.partKeys.add(a)):i.set(u,{keys:new Set([s.key]),partKeys:new Set([a])})}}const c=new Map;for(const s of Object.keys(e)){if(!Zt(s))continue;const a=b(e[s])??{},u=O(a,R),f=Y(a),d=m(a.textStyle)?a.textStyle:void 0;!Object.values(u).some(Boolean)&&!Object.keys(f).length&&!d||c.set(s,{stamp:Q(n,s),declarations:u,...Object.keys(f).length?{phone:f}:{},...d?{textStyle:d}:{}})}const p=new Map;for(const[s,{keys:a,partKeys:u}]of i){const f=u.size===1?[...u][0]:a.size===1?[...a][0]:null;if(!f)continue;const d=o(f);if(!Object.hasOwn(e,d))continue;const l=b(e[d])??{},S=O(l,R,{blockDrawsStyle:r(f)}),x=Y(l),A=m(l.textStyle)?l.textStyle:void 0;!Object.values(S).some(Boolean)&&!Object.keys(x).length&&!A||p.set(s,{stamp:Q(n,f),declarations:S,...Object.keys(x).length?{phone:x}:{},...A?{textStyle:A}:{}})}return p.size||c.size?{rules:p,kindRules:c,drawn:new Set(i.keys())}:null}function Zt(t){return t.startsWith("@")}function ge(t,e){return t?.kindRules.get(e)??null}function Q(t,e){const n=o=>o.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(t)}~${n(e)}`}function Se(t){const e=[],n=new Set,o=r=>{const{stamp:i,declarations:c}=r;if(n.has(i))return;n.add(i);const p=Object.entries(c).filter(([,l])=>l!==""),s=l=>l.map(([S,x])=>`${Jt(S)}: ${x}`).join("; "),a=`[${st}="${i}"]`,u=p.filter(([l])=>!I.has(l)),f=p.filter(([l])=>I.has(l));u.length&&e.push(`${a}, *:has(> ${a}) { ${s(u)} }`),f.length&&e.push(`${a} { ${s(f)} }`),c[g]&&(e.push(`*:has(> ${a}) { ${g}: ${c[g]} }`),e.push(...qt(a,`*:has(> ${a})`)));const d=Object.entries(r.phone??{}).filter(([,l])=>l!=="");d.length&&e.push(`@media ${it} { ${a}, *:has(> ${a}) { ${s(d)} } }`)};for(const r of t.rules.values())o(r);for(const r of t.kindRules.values())o(r);return e.join(`
|
|
2
|
+
`)}function qt(t,e){const n=`var(${g})`,o=":is([data-sf-bullet], [data-sf-number])";return[`${t} br:not(br + br) { display: block; content: ""; margin-top: ${n} }`,`${t} ${o}:not(:first-child) { margin-top: ${n} }`,`${t} ${o}:not(:last-child) { margin-bottom: ${n} }`,`:is(${e}) + :is(${e}) { margin-top: ${n} }`]}const Jt=t=>t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`);function me(t,e){if(!t)return null;const n=N(e),o=t.rules.get(n);if(o)return o;if(n.length<Qt||t.drawn.has(n))return null;let r=null;for(const[i,c]of t.rules)if(i.includes(n)){if(r&&r.stamp!==c.stamp)return null;r=c}return r}const Qt=8;export{y as PART_ALIGNS,bt as PART_LETTER_EM_MAX,Tt as PART_LETTER_EM_MIN,gt as PART_LETTER_STEP,Pt as PART_LINE_HEIGHT_MAX,mt as PART_LINE_HEIGHT_MIN,ht as PART_LINE_STEP,K as PART_MEASURED_TRACKS,ut as PART_NUDGE_MAX,lt as PART_NUDGE_MIN,dt as PART_PADDING_MAX,pt as PART_PADDING_MIN,xt as PART_PADDING_STEP,J as PART_PARAGRAPH_ATTR,Rt as PART_PARAGRAPH_MAX,_t as PART_PARAGRAPH_MIN,g as PART_PARAGRAPH_VAR,St as PART_RELATIVE_PROPS,C as PART_SIZE_MAX,D as PART_SIZE_MIN,At as PART_SIZE_STEPS,st as PART_STYLED_ATTR,$ as PART_STYLES_PROP,Yt as PART_STYLE_PROPERTIES,ft as PART_WEIGHTS,k as SHARED_PART_PROPERTIES,H as STYLE_ID_OF_ROLE,j as TEXT_STYLE_ATTR,xe as applyPartStyles,le as blockDrawsTextStyle,se as followedStyleOf,Zt as isPartKindKey,m as isTextStyleId,qt as paragraphRules,It as partCaseOfTransform,kt as partCaseTransform,pe as partFontKeyOf,Y as partPhoneDeclarations,ge as partRuleForKind,me as partRuleForText,jt as partSpacingOf,ue as partStyleBase,ce as partStyleCount,Se as partStyleCss,O as partStyleDeclarations,Dt as partStyleForScreen,de as partStyleSource,ae as propsWithPartStyleValue,fe as propsWithoutPartStyle,he as publishedPartStyles,G as readPartStyle,W as readPartStyles};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as H}from"react/jsx-runtime";import{phoneKey as o}from"efficient-easel/draw";import{BLOCK_SIZE_KEYS as N,blockSizeOf as z,parseBlockWidthFit as R}from"../../../../format/lib/content/block-size.js";import{boxPhoneRowFits as j,boxShareClasses as D}from"../../../../format/lib/content/box-layout.js";import{resolveContainerDirection as K}from"../../../../format/lib/content/container-direction.js";import{containerBlocksFor as P}from"../../../../format/lib/document/container-blocks.js";import{readPartStyle as C}from"../part-styles.js";import{addShowWhenFacts as A,withRowRules as h}from"../../../../format/lib/document/show-when-attach.js";import{BOX_BLOCK_KEYS as L}from"./cell-width.js";import{findParentNode as v}from"../../../../format/lib/document/passes/document-position.js";const Z=new Set(["Text","Heading"]),G=new Set(["h1","h2","h3","h4","h5","h6"]);function _(t,e){return t==="Heading"?!0:t!=="Text"?!1:typeof e.tag=="string"&&G.has(e.tag)?!0:C(e,"text").textStyle?.startsWith("heading-")===!0}const c={not:{context:"blockOutsideBox",is:!0}},m={all:[c,{not:{context:"boxSharesWidth",is:!0}}]},g={all:[c,{not:{context:"boxSharesWidthPhone",is:!0}}]};function O(t,e,n){return{any:[{field:o(t),is:e},{all:[{field:o(t),set:!1},n??{field:t,is:e}]}]}}const b={any:[{field:"textFit",is:"shrink"},{all:[{field:"textFit",set:!1},{not:{context:"textWrapsByDefault",is:!0}}]}]},X=[[["_gBlockSize","minWidth",o("minWidth"),"maxWidth",o("maxWidth")],c],[["widthFit"],m],[[o("widthFit")],g],[["width"],{all:[m,{field:"widthFit",is:"fixed"}]}],[[o("width")],{all:[g,O("widthFit","fixed")]}]],k=[[["_gText","textFit",o("textFit")],c],[["minFont"],{all:[c,b]}],[[o("minFont")],{all:[c,O("textFit","shrink",b)]}]],u=(t,e)=>v(e.appState,t.props?.id),x=t=>!!t&&typeof t.type=="string"&&P(t.type)!==null,B=t=>(t.type==="Flex"||t.type==="HeroGroup")&&K(t.type,t.props?.direction)==="row",W=t=>{const e=R(t);return e!==void 0&&e!=="fit"},U={blockOutsideBox:(t,e)=>!x(u(t,e)),boxSharesWidth:(t,e)=>{const n=u(t,e);return x(n)&&B(n)&&D(n.props?.share)!==""&&!W(t.props?.widthFit)},boxSharesWidthPhone:(t,e)=>{const n=u(t,e);if(!x(n)||!B(n))return!1;const i=n.props?.phoneRow;return(Number(i)===2||Number(i)===3)&&!j(i,n.props?.[o("share")])&&!W(t.props?.[o("widthFit")]??t.props?.widthFit)}},Y=t=>/^_[gds][A-Z]/.test(t);function M(t,e,n){const i=Object.entries(t),s=i.findIndex(([l])=>l===e);if(s===-1)return null;let r=s+1;for(;r<i.length&&!Y(i[r][0]);)r++;return Object.fromEntries([...i.slice(0,r),...Object.entries(n),...i.slice(r)])}function T(t,e,n){const i=Object.entries(t);return Object.fromEntries([...i.slice(0,e),...Object.entries(n),...i.slice(e)])}function V(t,e,n){const i=Object.keys(e);if(i.includes("_dSize")){const{_gBlockSize:s,...r}=n;return T(e,i.indexOf("_dSize")+1,r)}return q.has(t)&&i.includes("_gSpacing")?T(e,i.indexOf("_gSpacing"),n):{...e,...n}}const q=new Set(["Text","Heading"]);function J(t,e){const{_gText:n,...i}=e;return M(t,"_gText",i)??{...t,...e}}function Q(t){const e=new WeakMap;return n=>{if(!n||!("textFit"in n))return n;let i=e.get(n);if(!i){i={...n};for(const s of["textFit",o("textFit")])s in i&&(i[s]=t[s]);e.set(n,i)}return i}}const dt={name:"blockSize",applies:(t,e,n)=>L.includes(t)&&!!n&&typeof n.render=="function",panel(t,e,n){const i=Z.has(e),{size:s,text:r}=n.blockSizeFields(i?{textFit:e==="Heading"?"shrink":"wrap"}:{});let l=V(e,t.fields??{},h(s,X));if(i){const f=h(r,k);if(l=J(l,f),e==="Text"){const y=h(n.blockSizeFields({textFit:"shrink"}).text,k),E=Q(y),p=t.resolveFields,I=(S,a)=>{const d=p?p(S,a):a.fields,w=F=>_(e,S?.props??{})?E(F??a.fields):F;return d instanceof Promise?d.then(w):w(d)};t.resolveFields=I}}t.fields=l,A(t,{...U,textWrapsByDefault:f=>!_(e,f.props??{})})},draw(t){tt(t)}};function $(t){const e={};for(const n of N){const i=t[n],s=t[o(n)];(i!==void 0||s!==void 0)&&(e[n]={desktop:i,phone:s})}return e}function tt(t){const e=t.render;t.render=n=>{const i=z($(n)),s=e(n);return i===null?s:H("div",{className:i.className,...Object.keys(i.style).length?{style:i.style}:{},...i.attrs,children:s})}}export{dt as blockSize,_ as textShrinksByDefault};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ShowWhenRule } from "../../../../format/lib/document/show-when-attach.js";
|
|
2
2
|
import type { BlockPass } from "../../../../format/lib/document/passes/types.js";
|
|
3
|
+
export declare const BOX_BLOCK_KEYS: readonly string[];
|
|
3
4
|
export declare const CELL_WIDTH_SHOW_WHEN: ShowWhenRule;
|
|
4
5
|
export declare const cellWidth: BlockPass;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{GRID_SPAN_ATTR as s,resolveGridSpan as l}from"../../../../format/lib/content/grid-span.js";import{withRowsShownWhen as d}from"../../../../format/lib/document/show-when-attach.js";import{CONTAINER_BLOCK_CHOICES as _}from"../../../../format/lib/document/container-blocks.js";import{RETIRED_NESTABLE_SECTIONS as f}from"../../../../format/lib/document/section-catalog.js";import{BOX_MAY_HOLD as a}from"../../../../format/lib/document/passes/slot-rules.js";const c=Array.from(new Set([..._.map(e=>e.type),...a])),S=Array.from(new Set([...c,...f,"GalleryItem"])),m={not:{context:"parentOffersPositions",is:!1}},h={name:"cellWidth",applies:(e,n,r)=>S.includes(e)&&!!r&&typeof r.render=="function",panel(e,n,r){const t=r.cellWidthFields;e.fields={...e.fields,...t()},e.fields=d(e.fields??{},Object.keys(t()),m)},draw(e){const n=e.render;e.render=r=>{const t=l(r.gridSpan),i=n(r);return t==null?i:o("div",{className:"sf-grid-cell",[s]:String(t),children:i})}}};export{c as BOX_BLOCK_KEYS,m as CELL_WIDTH_SHOW_WHEN,h as cellWidth};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{CardRowDrawn as m}from"../../../components/CardRowContext.js";import{PublishedPartStyles as y}from"../../../components/PublishedPartStylesContext.js";import{readPartStyles as h}from"../part-styles.js";import{partNeedles as f}from"../text-parts.js";const j={name:"clickableParts",applies:(o,t,s)=>typeof s?.render=="function",draw(o,t,s){const r=o,d=()=>r.textParts??r.fields,i=r.render,a=s.inspector?.PartAnchors;r.render=e=>{const c=h(e);return e.editor?.isEditing&&a?n(m,{type:t,props:e,children:l=>n(a,{needles:f(d(),l),styles:c,type:t,children:i(e)})}):Object.keys(c).length?n(m,{type:t,props:e,children:l=>n(y,{needles:f(d(),l),styles:c,type:t,children:i(e)})}):i(e)}}};export{j as clickableParts};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{cardCornerStyle as d}from"../../../../format/lib/content/card-corners.js";import{sectionCornerStyle as i}from"../../../../format/lib/content/section-corners.js";const f={name:"sectionCorners",applies:(r,n,e)=>n.isSection(r)&&!!e&&typeof e.render=="function",panel(r,n,e){r.fields={...r.fields,...e.sectionShapeFields()}},draw(r){const n=r.render;r.render=e=>{const s=i(e.sectionCorners,e.sectionCornerSides),t=n(e);return s?o("div",{className:"sf-section-corners",style:{display:"contents",...s},children:t}):t}}},c=["CollectionCard"],y={name:"cardCorners",applies:(r,n,e)=>c.includes(r)&&!!e&&typeof e.render=="function",panel(r,n,e){r.fields={...r.fields,...e.cardShapeFields()}},draw(r){const n=r.render;r.render=e=>{const s=d(e.cardCorners,e.cardCornerSides),t=n(e);return s?o("div",{className:"sf-card-corners",style:{display:"contents",...s},children:t}):t}}};export{c as CARD_BLOCK_KEYS,y as cardCorners,f as sectionCorners};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{catalogueLabel as m}from"../../../../format/lib/document/passes/catalogue-labels.js";import{
|
|
1
|
+
import{catalogueLabel as m}from"../../../../format/lib/document/passes/catalogue-labels.js";import{blockSize as n}from"./block-size.js";import{cellWidth as s}from"./cell-width.js";import{clickableParts as p}from"./clickable-parts.js";import{cardCorners as c,sectionCorners as f}from"./corners.js";import{emptyHeadings as a}from"../../../../format/lib/document/passes/empty-headings.js";import{showWhenRows as l}from"../../../../format/lib/document/passes/show-when-rows.js";import{hiddenNodes as d}from"../../../../format/lib/document/passes/hidden-nodes.js";import{mediaValues as h}from"../../../../format/lib/document/passes/media-values.js";import{sectionAnchor as u}from"./section-anchor.js";import{blockEntrance as g,sectionAnimation as S}from"./section-animation.js";import{sectionHeight as b}from"./section-height.js";import{cardSticky as w,sectionSticky as P}from"./section-sticky.js";import{sectionBorder as k}from"./borders.js";import{blockPadding as A,sectionPadding as C}from"./section-padding.js";import{sectionTheme as W,slideTheme as y}from"./section-theme.js";import{buttonAlignInRow as B,containedWidth as G,sectionWidth as E}from"./section-width.js";import{blockGroups as H,sectionGroups as L}from"../../../../format/lib/document/passes/settings-groups.js";import{openSlotDisallow as R,sectionGroupAllow as T}from"../../../../format/lib/document/passes/slot-rules.js";import{registryPassContext as io}from"../../../../format/lib/document/passes/registry-context.js";const z=[h,T,R,C,f,k,c,A,g,s,E,G,B,b,u,W,S,P,w,y,n,L,H,l,a,p,d,m];function $(r,e,o){const i=e;for(const t of z)t.applies(r,o,i)&&(o.inspector&&t.panel?.(i,r,o.inspector,o),t.draw?.(i,r,o));return e}export{z as BLOCK_PASSES,$ as applyBlockPasses,io as registryPassContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as s,Fragment as
|
|
1
|
+
import{jsx as s,Fragment as i,jsxs as t}from"react/jsx-runtime";import{slugify as a}from"efficient-shell/format";import{useInBox as c}from"../../../components/InBoxContext.js";const d="!grow-0 !shrink-0 !basis-0";function f({anchor:n}){const e=a(typeof n=="string"?n:""),r=c();return e?s("span",{id:e,className:r?`sf-section-anchor ${d}`:"sf-section-anchor","aria-hidden":"true"}):null}const x={name:"sectionAnchor",applies:(n,e,r)=>e.isSection(n)&&!!r&&typeof r.render=="function",panel(n,e,r){const o=r.anchorFields;n.fields={...n.fields,...o()}},draw(n){n.defaultProps={...n.defaultProps,anchor:""};const e=n.render;n.render=r=>t(i,{children:[s(f,{anchor:r.anchor}),e(r)]})}};export{d as SECTION_ANCHOR_IN_BOX_CLASS,x as sectionAnchor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as s}from"react/jsx-runtime";import{SectionAnimation as d}from"../../../components/SectionAnimation.js";import{ENTRANCE_EXCLUDED as l,entranceDrawn as m}from"../../animation/entrance.js";import{BOX_TYPE as f}from"../../../../format/lib/document/container-blocks.js";const p={[f]:"box",Ticker:"marquee"},r=(n,e)=>!l.has(n)&&!!e&&typeof e.render=="function";function a(n,e,o){n.fields={...n.fields,...o.animationTabFields(e)}}function c(n){const e=n,o=e.render;e.render=i=>{const t=m(i);return t?s(d,{desktop:t.desktop,phone:t.phone,editing:!!i.editor?.isEditing,children:o(i)}):o(i)}}const A={name:"sectionAnimation",applies:(n,e,o)=>e.isSection(n)&&r(n,o),panel:(n,e,o)=>a(n,p[e]??"section",o),draw:n=>c(n)},k={name:"blockEntrance",applies:(n,e,o)=>!e.isSection(n)&&r(n,o),panel:(n,e,o)=>a(n,"block",o),draw:n=>c(n)};export{k as blockEntrance,A as sectionAnimation};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as _}from"react/jsx-runtime";import{isBackgroundBox as
|
|
1
|
+
import{jsx as _}from"react/jsx-runtime";import{isBackgroundBox as u}from"../../../../format/lib/content/box-background.js";import{SECTION_PAD_KEYS as S,padValuesOf as p,resolveSectionPadding as m,sectionPadAttrs as T}from"../../content/section-padding.js";import{sectionFillPassClass as g}from"../../../../format/lib/content/section-min-height.js";const l={ParagraphsA:{top:60,bottom:80},StatsParagraph:{top:120,bottom:120},Timeline:{top:120,bottom:120},Footprint:{top:120,bottom:120},TimelineTrack:{top:120,bottom:120},TitleWithButtons:{top:140,bottom:140},ProcessSteps:{top:120,bottom:120},DetailRows:{top:100,bottom:100}},c=new Set(Object.keys(l)),P=new Set(["Flex","Text","Heading"]),A=new Set(["Divider"]),D=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),f=new Set(["ProductGrid"]);function i(t,e,n=!1){const r=t.render;t.render=o=>{if(e?.(o))return r(o);const s=T(p(o,S,n)),a=r(o),d=g(o);return s?_("div",{className:d?`${s.className} ${d}`:s.className,style:s.style,children:a}):a}}const h={name:"sectionPadding",applies:(t,e,n)=>e.isSection(t)&&!D.has(t)&&!!n&&typeof n.render=="function",panel(t,e,n){c.has(e)||f.has(e)||(t.fields={...t.fields,...n.sidesPaddingFields()})},draw(t,e){if(c.has(e)){const n=t.render,r=l[e];t.render=o=>{const s=m(o,r);return n({...o,padTop:s.top,padBottom:s.bottom})};return}if(f.has(e)){i(t);return}P.has(e)||A.has(e)||i(t,e==="Flex"?n=>u(n.bgImage):void 0,!0)}},E=["Heading","Text"],N=["LogoBlock"],B={name:"blockPadding",applies:(t,e,n)=>(E.includes(t)||N.includes(t))&&!!n&&typeof n.render=="function",panel(t,e,n){t.fields={...t.fields,...n.sidesPaddingFields()}},draw(t,e){P.has(e)||i(t,void 0,!0)}};export{A as PADS_ITS_OWN_SPACE,P as PAD_ON_ROOT,c as SECTION_PAD_INNER,l as SECTION_PAD_INNER_DEFAULTS,B as blockPadding,h as sectionPadding};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type WidthMode } from "../../../../format/lib/content/section-width.js";
|
|
2
2
|
import type { BlockPass } from "../../../../format/lib/document/passes/types.js";
|
|
3
|
-
export declare function drawsTwoWidthRows(key: string, comp?: object): boolean;
|
|
4
3
|
export declare const SITE_CONTENT_VAR = "--sf-sw-site";
|
|
5
4
|
export declare const SECTION_CONTENT_VAR = "--sf-sw-content";
|
|
6
5
|
export declare const SECTION_BACKGROUND_VAR = "--sf-bg-cap";
|
|
7
6
|
export declare const SECTION_CONTENT_CLASS = "contents [--sf-site-width:var(--sf-sw-content)] max-[800px]:[--sf-site-width:var(--sf-sw-site)]";
|
|
8
|
-
export declare function contentOverride(w: SectionWidths, background: WidthAnswer | null): string | null;
|
|
9
7
|
export declare const SECTION_CONTENT_CAP_VAR = "--sf-content-cap";
|
|
10
8
|
export declare const SECTION_CONTENT_CAP_CLASS = "contents max-[800px]:[--sf-content-cap:none]";
|
|
11
9
|
export declare const sectionWidth: BlockPass;
|
|
@@ -15,4 +13,3 @@ export declare function widthModeFields<T extends Record<string, unknown>>(field
|
|
|
15
13
|
}): T;
|
|
16
14
|
export declare const containedWidth: BlockPass;
|
|
17
15
|
export declare const buttonAlignInRow: BlockPass;
|
|
18
|
-
export declare const imageWidth: BlockPass;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as u}from"react/jsx-runtime";import{resolveContainerDirection as S}from"../../../../format/lib/content/container-direction.js";import{HERO_BACKGROUND_VAR as A,HERO_CHROME_CAP_VAR as B,HERO_CHROME_INSET_VAR as v,SITE_WIDTH_CAP as f,centredCap as I,heroBackgroundTokens as W}from"../../../../format/lib/content/page-width.js";import{SECTION_WIDTH_FAMILY as y,hasWidthFamily as g,resolveWidth as w,siteWidthsOf as G}from"../../../../format/lib/content/section-width.js";import{boxGutterOf as b,boxPlaceOf as F,isFrameContainer as T,siteDrawsGutter as H}from"../../../../format/lib/content/site-gutter.js";import{getEditorSiteContentWidth as P}from"../../../../format/lib/document/editor-site-widths.js";import{NestedBoxChoice as D,SplitBandAndColumn as M}from"../../../components/SiteGutterFrame.js";import{FRAME as m}from"../../../components/BlockFrame.js";import{sectionFillPassClass as k}from"../../../../format/lib/content/section-min-height.js";import{parentCapsWidth as V}from"../../../../format/lib/sections/section-head-placement.js";import{addShowWhenFacts as _,withRowsShownWhen as h}from"../../../../format/lib/document/show-when-attach.js";import{findParentNode as j,isNestedNode as L}from"../../../../format/lib/document/passes/document-position.js";const N="--sf-sw-site",U="--sf-sw-content",K="--sf-bg-cap",Y="contents [--sf-site-width:var(--sf-sw-content)] max-[800px]:[--sf-site-width:var(--sf-sw-site)]";function O(t,e){return t==="full"&&e!=="content"?"100vw":null}function E(t,e){return e===null?t:u("div",{className:"contents",style:{[N]:f},children:u("div",{className:Y,style:{[U]:e},children:t})})}const $="--sf-content-cap",q="contents max-[800px]:[--sf-content-cap:none]";function z(t,e){return t==="full"||e==="content"?null:`var(${N})`}function J(t,e){return e===null?t:u("div",{className:"contents",style:{[N]:f},children:u("div",{className:q,style:{[$]:e},children:t})})}const p=(t,e,n="")=>t==="content"?u("div",{className:n||void 0,style:I(f),children:e}):e;function x(t,e,n,o,i){return n==="full"?p(o,t({...e,contained:!1}),i):o==="content"?t({...e,contained:!0}):u(M,{children:t({...e,contained:!0})})}function Q(t,e){const n=y[e],o=t.render;t.render=i=>{const s=G(i),r=s.content??"content";if(n==="hero"){const d=s.background,l=E(o(i),O(r,d));return d==="full"?u("div",{style:{[A]:"none",[v]:"initial",[B]:"initial"},children:l}):d==="content"?u("div",{style:W(!0),children:l}):l}const c=s.background??"full",a=k(i);if(n==="scrollOver"){const d=o({...i,fullWidth:r==="full"});return c==="content"?u("div",{className:"contents",style:{[K]:f},children:d}):d}switch(n){case"both":return p(c,J(o(i),z(r,c)),a);case"contained":{const d=x(o,i,r,c,a);if(!T(e))return d;const l=b(i),C=l===void 0?r:l?"content":"full";return C===r?d:u(D,{atTop:d,nested:x(o,i,C,c,a)})}case"contentColumn":case"contentFull":case"productGrid":{const l=o({...i,widthMode:r==="full"?"full":"page"});return n==="productGrid"?c==="content"?u("div",{className:a?`${m} ${a}`:m,children:l}):l:p(c,l,a)}default:return p(c,E(o(i),O(r,c)),a)}}}const Ct={name:"sectionWidth",applies:(t,e,n)=>g(t)&&!!n&&typeof n.render=="function",panel(t,e,n){if(!T(e))return;const o=n.boxGutterFields();t.fields=R(e,t,{...t.fields,...o},Object.keys(o))},draw(t,e){Q(t,e)}};function X(t,e){if(!t||!("widthMode"in t))return t;const n={...t},o=n.widthMode;return o&&(n.widthMode={...o,currentValue:e.mode,inherited:e.inherited}),n}const Z=new Set(["Heading","Text","ImageBlock","ButtonBlock"]),wt={name:"containedWidth",applies:(t,e,n)=>Z.has(t)&&!!n&&typeof n.render=="function",panel(t,e,n){const o=n.widthField;t.fields=R(e,t,{...t.fields,...o("page")});const i=t.resolveFields;t.resolveFields=(s,r)=>{const c=i?i(s,r):r.fields,a=w(s?.props??{},"page"),d=l=>X(l,a);return c&&typeof c.then=="function"?c.then(d):d(c)}},draw(t){const e=t.render;t.render=n=>{const{mode:o}=w(n,"page");return e({...n,contained:o!=="full"})}}},tt={not:{context:"inHeroGroupRow",is:!0}},Tt={name:"buttonAlignInRow",applies:t=>t==="ButtonBlock",panel(t){const e=t;e.fields=h(e.fields??{},["align"],tt),_(e,{inHeroGroupRow:(n,o)=>{const i=j(o.appState,n.props?.id);return!!i&&i.type==="HeroGroup"&&S("HeroGroup",i.props?.direction)==="row"}})}};function et(t){return Object.values(t).some(e=>!!e&&typeof e=="object"&&e.type==="slot")}const nt={any:[]},ot={all:[{context:"insideBox",is:!0},{not:{context:"insideSiteGutter",is:!0}}]},it={not:{context:"widthCappedByParent",is:!0}};function R(t,e,n,o=["widthMode"]){if(t==="ButtonBlock")return h(n,["_gWidth",...o],nt);if(et(n)){const i=(s,r)=>F(r.appState?.data?.content,s.props?.id,H(P()));return _(e,{insideBox:(s,r)=>i(s,r)?.inBox,insideSiteGutter:(s,r)=>i(s,r)?.insideGutter}),h(n,o,ot)}return _(e,{widthCappedByParent:(i,s)=>"parent"in s?V(s.parent):L({props:i.props??{}},s)}),h(n,o,it)}export{K as SECTION_BACKGROUND_VAR,q as SECTION_CONTENT_CAP_CLASS,$ as SECTION_CONTENT_CAP_VAR,Y as SECTION_CONTENT_CLASS,U as SECTION_CONTENT_VAR,N as SITE_CONTENT_VAR,Tt as buttonAlignInRow,wt as containedWidth,Ct as sectionWidth,X as widthModeFields};
|
|
@@ -27,6 +27,10 @@ export declare function holdsAuthoredText(field: unknown): boolean;
|
|
|
27
27
|
export declare function partLabel(field: Record<string, unknown>, key: string): string;
|
|
28
28
|
export declare function partHeadLabel(label: string): string;
|
|
29
29
|
export declare function partNeedles(fields: Record<string, unknown> | undefined, props: Record<string, unknown> | undefined): PartNeedle[];
|
|
30
|
+
export declare function canTypeOnCanvas(part: {
|
|
31
|
+
offPage: boolean;
|
|
32
|
+
hidden: boolean;
|
|
33
|
+
}): boolean;
|
|
30
34
|
export type SectionTextPart = {
|
|
31
35
|
key: string;
|
|
32
36
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{decodePartId as
|
|
1
|
+
import{decodePartId as g,encodePartId as O}from"efficient-easel/draw";import{stripMarkup as m}from"../../../format/lib/markup.js";import{LINK_FIELD_MARKER as R,SCAFFOLD_FIELD_MARKER as y,TEXT_FIELD_MARKER as u}from"efficient-easel/draw";import{readHidable as A}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as E}from"efficient-easel/draw";import{isStructuralTextProp as _}from"../../../format/lib/document/neutralization-contracts.js";import{fieldInOwnBox as L}from"../../../format/lib/document/own-box.js";import{partRowTexts as I}from"./part-rows.js";import{nonEmptyString as S}from"../../../format/lib/non-empty-string.js";const $="data-sf-part",G="data-sf-region-part",q="data-sf-part-row";function J(e,t){return`${e}[${t}]`}const Q="data-sf-part-kind",j="data-sf-part-style-owner",N="data-sf-part-style-kind";function U(e){for(let t=e;t;t=t.parentElement){const r=t.getAttribute(j),n=t.getAttribute(N);if(r&&n)return{owner:r,kind:n};if(t.getAttribute("data-easel-block"))return null}return null}const b=2;function h(e){return m(e).replace(/\s+/gu,"")}function l(e,t,r){const n=e[u];if(n){if(n.control==="textList"){const o=n.itemKey??"text";if(!Array.isArray(t))return;for(const s of t){const c=s?.[o];typeof c=="string"&&r.push(c)}return}const{text:i}=A(t);i?r.push(i):n.placeholder&&r.push(n.placeholder);return}if(!e[R]){if(e.type==="text"||e.type==="textarea"){const i=S(t);i&&r.push(i);return}if(e.arrayFields&&Array.isArray(t)){for(const i of t)for(const[o,s]of Object.entries(e.arrayFields))l(s,i?.[o],r);return}if(e.objectFields&&t&&typeof t=="object")for(const[i,o]of Object.entries(e.objectFields))l(o,t[i],r)}}function V(e){if(!e||typeof e!="object")return!1;const t=e;return t[R]?!1:!!t[u]||t.type==="text"||t.type==="textarea"}function w(e,t){const r=e[u];return r?.label?r.label:typeof e.label=="string"?e.label:t}function F(e){const t=e.indexOf(" (");return(t>0?e.slice(0,t):e).trim()}function Z(e,t){if(!e)return[];const r=[];for(const[n,i]of Object.entries(e)){if(!i||typeof i!="object"||_(n))continue;const o=i,s=[];l(o,t?.[n],s),!s.length&&o[y]!==void 0&&l(o,o[y],s);const c=w(o,n),a=new Set;for(const{row:d,text:f}of I(o,t?.[n])){const T=h(f);T.length<b||(a.add(T),r.push({key:n,label:c,texts:[T],row:d}))}const p=new Set(a),x=[];for(const d of s){const f=h(d);f.length<b||p.has(f)||(p.add(f),x.push(f))}x.length&&r.push({key:n,label:c,texts:x})}return r}function K(e){return!e.offPage&&!e.hidden}const k=E;function P(e,t){if(!t||typeof t!="object"||_(e)||L(t))return null;const r=t[u];return!r||!k.includes(r.control)?null:r}function v(e,t){const r=P(e,t);return r!==null&&r.identifier!==!0}function tt(e,t){if(!e)return[];const r=[];for(const[n,i]of Object.entries(e)){const o=P(n,i);if(!o)continue;const{text:s,hidden:c}=A(t?.[n]);if(K({offPage:o.offPage===!0,hidden:!!c}))continue;const a=s||o.placeholder||"",p=m(a).replace(/\s+/gu," ").trim();r.push({key:n,label:F(w(i,n)),preview:p,offPage:o.offPage===!0,identifier:o.identifier===!0,hidden:!!c})}return r}export{$ as PART_ATTR,Q as PART_KIND_ATTR,q as PART_ROW_ATTR,N as PART_STYLE_KIND_ATTR,j as PART_STYLE_OWNER_ATTR,G as REGION_PART_ATTR,K as canTypeOnCanvas,g as decodePartId,O as encodePartId,J as encodePartRow,P as entryPartMetaOf,v as fieldDrawsEntryRow,V as holdsAuthoredText,h as normalizePartText,F as partHeadLabel,w as partLabel,Z as partNeedles,U as partStyleOwnerOf,tt as sectionTextParts};
|