efficient-web-builder 0.10.0 → 2.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 +50 -367
- package/README.md +108 -261
- package/dist/components/AddBlockRow.d.ts +1 -0
- package/dist/components/AddBlockRow.js +1 -0
- package/dist/components/AddChildRow.d.ts +1 -0
- package/dist/components/AddChildRow.js +1 -0
- package/dist/components/AddSidePanel.d.ts +2 -0
- package/dist/components/AddSidePanel.js +1 -0
- package/dist/components/AnimatedStat.d.ts +6 -0
- package/dist/components/AnimatedStat.js +1 -0
- package/dist/components/ApplyCornersToSiblings.d.ts +9 -0
- package/dist/components/ApplyCornersToSiblings.js +1 -0
- package/dist/components/Banner.d.ts +12 -0
- package/dist/components/Banner.js +1 -0
- package/dist/components/BlockFrame.d.ts +15 -0
- package/dist/components/BlockFrame.js +1 -0
- package/dist/components/BlockGapField.d.ts +5 -0
- package/dist/components/BlockGapField.js +1 -0
- package/dist/components/BlogPostSource.d.ts +14 -0
- package/dist/components/BlogPostSource.js +1 -0
- package/dist/components/BoxSurfaceContext.d.ts +7 -0
- package/dist/components/BoxSurfaceContext.js +1 -0
- package/dist/components/BoxTabs.d.ts +6 -0
- package/dist/components/BoxTabs.js +1 -0
- package/dist/components/Breadcrumb.d.ts +10 -0
- package/dist/components/Breadcrumb.js +1 -0
- package/dist/components/Btn.d.ts +22 -0
- package/dist/components/Btn.js +1 -0
- package/dist/components/ButtonBlock.d.ts +13 -0
- package/dist/components/ButtonBlock.js +1 -0
- package/dist/components/CardShadowField.d.ts +6 -0
- package/dist/components/CardShadowField.js +1 -0
- package/dist/components/Cards.d.ts +15 -0
- package/dist/components/Cards.js +1 -0
- package/dist/components/CategoryBar.d.ts +16 -0
- package/dist/components/CategoryBar.js +1 -0
- package/dist/components/ChartSection.d.ts +16 -0
- package/dist/components/ChartSection.js +1 -0
- package/dist/components/ChatSettingsPanel.d.ts +1 -0
- package/dist/components/ChatSettingsPanel.js +1 -0
- package/dist/components/ClearColoursDialog.d.ts +5 -0
- package/dist/components/ClearColoursDialog.js +1 -0
- package/dist/components/ContactLocations.d.ts +17 -0
- package/dist/components/ContactLocations.js +73 -0
- package/dist/components/CornersField.d.ts +6 -0
- package/dist/components/CornersField.js +1 -0
- package/dist/components/CountUpText.d.ts +3 -0
- package/dist/components/CountUpText.js +1 -0
- package/dist/components/Divider.d.ts +9 -0
- package/dist/components/Divider.js +1 -0
- package/dist/components/DocBody.d.ts +13 -0
- package/dist/components/DocBody.js +7 -0
- package/dist/components/DocMasthead.d.ts +13 -0
- package/dist/components/DocMasthead.js +1 -0
- package/dist/components/DocMetaCards.d.ts +10 -0
- package/dist/components/DocMetaCards.js +1 -0
- package/dist/components/DocTabs.d.ts +12 -0
- package/dist/components/DocTabs.js +1 -0
- package/dist/components/DuplicateToPageMenu.d.ts +12 -0
- package/dist/components/DuplicateToPageMenu.js +1 -0
- package/dist/components/EditorScreenMount.d.ts +1 -0
- package/dist/components/EditorScreenMount.js +1 -0
- package/dist/components/EditorStoreProvider.d.ts +1 -0
- package/dist/components/EditorStoreProvider.js +1 -0
- package/dist/components/EditorialSectionHead.d.ts +11 -0
- package/dist/components/EditorialSectionHead.js +1 -0
- package/dist/components/Eyebrow.d.ts +9 -0
- package/dist/components/Eyebrow.js +1 -0
- package/dist/components/FAQ.d.ts +20 -0
- package/dist/components/FAQ.js +1 -0
- package/dist/components/FeaturedCover.d.ts +13 -0
- package/dist/components/FeaturedCover.js +1 -0
- package/dist/components/FieldGlyph.d.ts +12 -0
- package/dist/components/FieldGlyph.js +1 -0
- package/dist/components/Flex.d.ts +32 -0
- package/dist/components/Flex.js +1 -0
- package/dist/components/Footprint.d.ts +16 -0
- package/dist/components/Footprint.js +27 -0
- package/dist/components/Grid.d.ts +11 -0
- package/dist/components/Grid.js +1 -0
- package/dist/components/Heading.d.ts +11 -0
- package/dist/components/Heading.js +1 -0
- package/dist/components/HeadingAudit.d.ts +1 -0
- package/dist/components/HeadingAudit.js +1 -0
- package/dist/components/HeroArrows.d.ts +8 -0
- package/dist/components/HeroArrows.js +1 -0
- package/dist/components/HeroGroup.d.ts +20 -0
- package/dist/components/HeroGroup.js +1 -0
- package/dist/components/HeroHeldFrame.d.ts +8 -0
- package/dist/components/HeroHeldFrame.js +1 -0
- package/dist/components/HeroImageField.d.ts +6 -0
- package/dist/components/HeroImageField.js +1 -0
- package/dist/components/HeroPoster.d.ts +10 -0
- package/dist/components/HeroPoster.js +1 -0
- package/dist/components/HeroSection.d.ts +35 -0
- package/dist/components/HeroSection.js +11 -0
- package/dist/components/HeroSingle.d.ts +17 -0
- package/dist/components/HeroSingle.js +1 -0
- package/dist/components/HeroSlide.d.ts +30 -0
- package/dist/components/HeroSlide.js +1 -0
- package/dist/components/HoverEffectField.d.ts +6 -0
- package/dist/components/HoverEffectField.js +1 -0
- package/dist/components/ImageBlock.d.ts +18 -0
- package/dist/components/ImageBlock.js +1 -0
- package/dist/components/ImageFocusRow.d.ts +7 -0
- package/dist/components/ImageFocusRow.js +1 -0
- package/dist/components/IntegrationsSection.d.ts +14 -0
- package/dist/components/IntegrationsSection.js +1 -0
- package/dist/components/IntroBleed.d.ts +32 -0
- package/dist/components/IntroBleed.js +1 -0
- package/dist/components/KeepHint.d.ts +5 -0
- package/dist/components/KeepHint.js +1 -0
- package/dist/components/KeyFeatures.d.ts +14 -0
- package/dist/components/KeyFeatures.js +1 -0
- package/dist/components/LocationGroupHeader.d.ts +5 -0
- package/dist/components/LocationGroupHeader.js +1 -0
- package/dist/components/LocationsGroupedField.d.ts +5 -0
- package/dist/components/LocationsGroupedField.js +1 -0
- package/dist/components/LocationsTreeContext.d.ts +2 -0
- package/dist/components/LocationsTreeContext.js +1 -0
- package/dist/components/Logo.d.ts +27 -0
- package/dist/components/Logo.js +1 -0
- package/dist/components/LogoBlock.d.ts +8 -0
- package/dist/components/LogoBlock.js +1 -0
- package/dist/components/Logos.d.ts +15 -0
- package/dist/components/Logos.js +1 -0
- package/dist/components/LongRead.d.ts +20 -0
- package/dist/components/LongRead.js +1 -0
- package/dist/components/Manifesto.d.ts +14 -0
- package/dist/components/Manifesto.js +1 -0
- package/dist/components/Masthead.d.ts +16 -0
- package/dist/components/Masthead.js +1 -0
- package/dist/components/MediaSidePanel.d.ts +1 -0
- package/dist/components/MediaSidePanel.js +1 -0
- package/dist/components/MediaUploadField.d.ts +9 -0
- package/dist/components/MediaUploadField.js +1 -0
- package/dist/components/MockupSection.d.ts +59 -0
- package/dist/components/MockupSection.js +1 -0
- package/dist/components/MultiSelectField.d.ts +19 -0
- package/dist/components/MultiSelectField.js +1 -0
- package/dist/components/NodeContextMenu.d.ts +2 -0
- package/dist/components/NodeContextMenu.js +1 -0
- package/dist/components/OrderSummary.d.ts +17 -0
- package/dist/components/OrderSummary.js +1 -0
- package/dist/components/PageEditGuardNotices.d.ts +1 -0
- package/dist/components/PageEditGuardNotices.js +1 -0
- package/dist/components/PagesPanel.d.ts +8 -0
- package/dist/components/PagesPanel.js +1 -0
- package/dist/components/PanelToggleIcon.d.ts +1 -0
- package/dist/components/PanelToggleIcon.js +1 -0
- package/dist/components/ParagraphsA.d.ts +15 -0
- package/dist/components/ParagraphsA.js +1 -0
- package/dist/components/PartGlyphs.d.ts +7 -0
- package/dist/components/PartGlyphs.js +1 -0
- package/dist/components/PartInkControl.d.ts +7 -0
- package/dist/components/PartInkControl.js +1 -0
- package/dist/components/PartResetDot.d.ts +5 -0
- package/dist/components/PartResetDot.js +1 -0
- package/dist/components/PartSettingsPanel.d.ts +68 -0
- package/dist/components/PartSettingsPanel.js +1 -0
- package/dist/components/PartStyledText.d.ts +5 -0
- package/dist/components/PartStyledText.js +1 -0
- package/dist/components/PartTextBox.d.ts +20 -0
- package/dist/components/PartTextBox.js +1 -0
- package/dist/components/PaymentBadges.d.ts +14 -0
- package/dist/components/PaymentBadges.js +1 -0
- package/dist/components/PhoneMenuTools.d.ts +12 -0
- package/dist/components/PhoneMenuTools.js +1 -0
- package/dist/components/PhotographyField.d.ts +6 -0
- package/dist/components/PhotographyField.js +1 -0
- package/dist/components/Placeholder.d.ts +18 -0
- package/dist/components/Placeholder.js +1 -0
- package/dist/components/PostCard.d.ts +37 -0
- package/dist/components/PostCard.js +1 -0
- package/dist/components/PreviewChatContext.d.ts +23 -0
- package/dist/components/PreviewChatContext.js +1 -0
- package/dist/components/PreviewDeviceContext.d.ts +2 -0
- package/dist/components/PreviewDeviceContext.js +1 -0
- package/dist/components/PreviewFocusContext.d.ts +15 -0
- package/dist/components/PreviewFocusContext.js +1 -0
- package/dist/components/PreviewFooterContext.d.ts +17 -0
- package/dist/components/PreviewFooterContext.js +1 -0
- package/dist/components/PreviewHeaderContext.d.ts +97 -0
- package/dist/components/PreviewHeaderContext.js +1 -0
- package/dist/components/PreviewLocationPartContext.d.ts +10 -0
- package/dist/components/PreviewLocationPartContext.js +1 -0
- package/dist/components/PreviewPartAnchors.d.ts +16 -0
- package/dist/components/PreviewPartAnchors.js +1 -0
- package/dist/components/PreviewPartStyleContext.d.ts +21 -0
- package/dist/components/PreviewPartStyleContext.js +1 -0
- package/dist/components/PreviewPartsContext.d.ts +1 -0
- package/dist/components/PreviewPartsContext.js +1 -0
- package/dist/components/PreviewSocialContext.d.ts +30 -0
- package/dist/components/PreviewSocialContext.js +1 -0
- package/dist/components/PreviewSurfaceContext.d.ts +10 -0
- package/dist/components/PreviewSurfaceContext.js +1 -0
- package/dist/components/PreviewThemeFrame.d.ts +6 -0
- package/dist/components/PreviewThemeFrame.js +11 -0
- package/dist/components/PreviewTickerContext.d.ts +4 -0
- package/dist/components/PreviewTickerContext.js +1 -0
- package/dist/components/ProcessSteps.d.ts +32 -0
- package/dist/components/ProcessSteps.js +1 -0
- package/dist/components/Prose.d.ts +9 -0
- package/dist/components/Prose.js +1 -0
- package/dist/components/PublishedFooterContext.d.ts +11 -0
- package/dist/components/PublishedFooterContext.js +1 -0
- package/dist/components/PublishedPartStylesContext.d.ts +15 -0
- package/dist/components/PublishedPartStylesContext.js +1 -0
- package/dist/components/RMark.d.ts +6 -0
- package/dist/components/RMark.js +1 -0
- package/dist/components/Reel.d.ts +15 -0
- package/dist/components/Reel.js +1 -0
- package/dist/components/RuleLine.d.ts +1 -0
- package/dist/components/RuleLine.js +1 -0
- package/dist/components/SearchSelectField.d.ts +22 -0
- package/dist/components/SearchSelectField.js +1 -0
- package/dist/components/SectionAnimation.d.ts +7 -0
- package/dist/components/SectionAnimation.js +1 -0
- package/dist/components/SectionEditor.d.ts +63 -0
- package/dist/components/SectionEditor.js +1 -0
- package/dist/components/SectionEditorShell.d.ts +1 -0
- package/dist/components/SectionEditorShell.js +1 -0
- package/dist/components/SectionEyebrow.d.ts +10 -0
- package/dist/components/SectionEyebrow.js +1 -0
- package/dist/components/SectionHeader.d.ts +29 -0
- package/dist/components/SectionHeader.js +1 -0
- package/dist/components/SectionIcon.d.ts +5 -0
- package/dist/components/SectionIcon.js +1 -0
- package/dist/components/SectionTextEntries.d.ts +5 -0
- package/dist/components/SectionTextEntries.js +1 -0
- package/dist/components/SectionTextPartBridge.d.ts +6 -0
- package/dist/components/SectionTextPartBridge.js +1 -0
- package/dist/components/SectionThemePicker.d.ts +25 -0
- package/dist/components/SectionThemePicker.js +1 -0
- package/dist/components/SectionThumbnail.d.ts +3 -0
- package/dist/components/SectionThumbnail.js +1 -0
- package/dist/components/Series.d.ts +19 -0
- package/dist/components/Series.js +1 -0
- package/dist/components/ShadowColourField.d.ts +5 -0
- package/dist/components/ShadowColourField.js +1 -0
- package/dist/components/SidePanelHead.d.ts +1 -0
- package/dist/components/SidePanelHead.js +1 -0
- package/dist/components/SideSpaceField.d.ts +7 -0
- package/dist/components/SideSpaceField.js +1 -0
- package/dist/components/SiteEditorProvider.d.ts +3 -0
- package/dist/components/SiteEditorProvider.js +1 -0
- package/dist/components/SiteFields.d.ts +6 -0
- package/dist/components/SiteFields.js +1 -0
- package/dist/components/SiteGutterFrame.d.ts +9 -0
- package/dist/components/SiteGutterFrame.js +1 -0
- package/dist/components/SiteLogoContext.d.ts +25 -0
- package/dist/components/SiteLogoContext.js +1 -0
- package/dist/components/SitePhotographyContext.d.ts +8 -0
- package/dist/components/SitePhotographyContext.js +1 -0
- package/dist/components/SiteStyleUnset.d.ts +1 -0
- package/dist/components/SiteStyleUnset.js +1 -0
- package/dist/components/SiteWidthField.d.ts +7 -0
- package/dist/components/SiteWidthField.js +1 -0
- package/dist/components/SlotChildActionsContext.d.ts +2 -0
- package/dist/components/SlotChildActionsContext.js +1 -0
- package/dist/components/SlotChildRows.d.ts +16 -0
- package/dist/components/SlotChildRows.js +1 -0
- package/dist/components/SocialLinksPanel.d.ts +3 -0
- package/dist/components/SocialLinksPanel.js +1 -0
- package/dist/components/SourceStatus.d.ts +14 -0
- package/dist/components/SourceStatus.js +1 -0
- package/dist/components/Spacer.d.ts +6 -0
- package/dist/components/Spacer.js +1 -0
- package/dist/components/SpecStrip.d.ts +10 -0
- package/dist/components/SpecStrip.js +1 -0
- package/dist/components/Split.d.ts +33 -0
- package/dist/components/Split.js +1 -0
- package/dist/components/StandaloneSectionEditor.d.ts +19 -0
- package/dist/components/StandaloneSectionEditor.js +1 -0
- package/dist/components/Stats.d.ts +14 -0
- package/dist/components/Stats.js +1 -0
- package/dist/components/StatsParagraph.d.ts +21 -0
- package/dist/components/StatsParagraph.js +1 -0
- package/dist/components/StorefrontDocumentContext.d.ts +2 -0
- package/dist/components/StorefrontDocumentContext.js +1 -0
- package/dist/components/StorefrontEditor.d.ts +19 -0
- package/dist/components/StorefrontEditor.js +1 -0
- package/dist/components/StorefrontEditorChrome.d.ts +1 -0
- package/dist/components/StorefrontEditorChrome.js +1 -0
- package/dist/components/StorefrontLinkField.d.ts +19 -0
- package/dist/components/StorefrontLinkField.js +1 -0
- package/dist/components/StylesPanel.d.ts +11 -0
- package/dist/components/StylesPanel.js +1 -0
- package/dist/components/SwitchToBoxFooter.d.ts +1 -0
- package/dist/components/SwitchToBoxFooter.js +1 -0
- package/dist/components/TemplateGlyph.d.ts +6 -0
- package/dist/components/TemplateGlyph.js +1 -0
- package/dist/components/Testimonials.d.ts +16 -0
- package/dist/components/Testimonials.js +1 -0
- package/dist/components/Text.d.ts +11 -0
- package/dist/components/Text.js +1 -0
- package/dist/components/TextStyleRow.d.ts +13 -0
- package/dist/components/TextStyleRow.js +1 -0
- package/dist/components/TextStylesField.d.ts +17 -0
- package/dist/components/TextStylesField.js +1 -0
- package/dist/components/ThemeCard.d.ts +40 -0
- package/dist/components/ThemeCard.js +1 -0
- package/dist/components/ThemeColourField.d.ts +5 -0
- package/dist/components/ThemeColourField.js +1 -0
- package/dist/components/ThemeField.d.ts +8 -0
- package/dist/components/ThemeField.js +1 -0
- package/dist/components/Ticker.d.ts +18 -0
- package/dist/components/Ticker.js +1 -0
- package/dist/components/TickerSection.d.ts +18 -0
- package/dist/components/TickerSection.js +1 -0
- package/dist/components/TickerSettingsPanel.d.ts +3 -0
- package/dist/components/TickerSettingsPanel.js +1 -0
- package/dist/components/Timeline.d.ts +24 -0
- package/dist/components/Timeline.js +1 -0
- package/dist/components/TimelineTrack.d.ts +22 -0
- package/dist/components/TimelineTrack.js +1 -0
- package/dist/components/TitleWithButtons.d.ts +14 -0
- package/dist/components/TitleWithButtons.js +1 -0
- package/dist/components/UiIcon.d.ts +2 -0
- package/dist/components/UiIcon.js +1 -0
- package/dist/components/WebsiteScreenParts.d.ts +2 -0
- package/dist/components/WebsiteScreenParts.js +1 -0
- package/dist/components/WebsiteSettingsPanel.d.ts +46 -0
- package/dist/components/WebsiteSettingsPanel.js +1 -0
- package/dist/components/WidthFollowField.d.ts +10 -0
- package/dist/components/WidthFollowField.js +1 -0
- package/dist/components/cartGlyph.d.ts +1 -0
- package/dist/components/cartGlyph.js +1 -0
- package/dist/components/floating-editor/tokens.d.ts +27 -0
- package/dist/components/floating-editor/tokens.js +1 -0
- package/dist/components/goldPhrases.d.ts +7 -0
- package/dist/components/goldPhrases.js +2 -0
- package/dist/components/integrationIcons.d.ts +2 -0
- package/dist/components/integrationIcons.js +1 -0
- package/dist/components/panel-widths.d.ts +2 -0
- package/dist/components/panel-widths.js +1 -0
- package/dist/components/preview-devices.d.ts +3 -0
- package/dist/components/preview-devices.js +1 -0
- package/dist/components/socialIcons.d.ts +8 -0
- package/dist/components/socialIcons.js +1 -0
- package/dist/components/storefront-editor.css +4870 -0
- package/dist/components/useCountUp.d.ts +10 -0
- package/dist/components/useCountUp.js +1 -0
- package/dist/components/useFooterFocus.d.ts +2 -0
- package/dist/components/useFooterFocus.js +1 -0
- package/dist/components/useLocationsTree.d.ts +6 -0
- package/dist/components/useLocationsTree.js +1 -0
- package/dist/components/usePartBridge.d.ts +1 -0
- package/dist/components/usePartBridge.js +1 -0
- package/dist/components/usePinnedChromeSeed.d.ts +2 -0
- package/dist/components/usePinnedChromeSeed.js +1 -0
- package/dist/components/usePreviewHref.d.ts +5 -0
- package/dist/components/usePreviewHref.js +1 -0
- package/dist/components/useReducedMotion.d.ts +4 -0
- package/dist/components/useReducedMotion.js +1 -0
- package/dist/components/useSnapshotSource.d.ts +17 -0
- package/dist/components/useSnapshotSource.js +1 -0
- package/dist/components/useSocialSettings.d.ts +14 -0
- package/dist/components/useSocialSettings.js +1 -0
- package/dist/components/useStorefrontBlogPosts.d.ts +2 -0
- package/dist/components/useStorefrontBlogPosts.js +1 -0
- package/dist/lib/client-only.d.ts +1 -0
- package/dist/lib/client-only.js +1 -0
- package/dist/lib/content/authored-props.d.ts +4 -0
- package/dist/lib/content/authored-props.js +1 -0
- package/dist/lib/content/box-background.d.ts +31 -0
- package/dist/lib/content/box-background.js +1 -0
- package/dist/lib/content/box-layout.d.ts +78 -0
- package/dist/lib/content/box-layout.js +1 -0
- package/dist/lib/content/button-arrow.d.ts +2 -0
- package/dist/lib/content/button-arrow.js +1 -0
- package/dist/lib/content/card-corners.d.ts +12 -0
- package/dist/lib/content/card-corners.js +1 -0
- package/dist/lib/content/card-image-background.d.ts +11 -0
- package/dist/lib/content/card-image-background.js +1 -0
- package/dist/lib/content/card-image-shape.d.ts +5 -0
- package/dist/lib/content/card-image-shape.js +1 -0
- package/dist/lib/content/cart-drawer.d.ts +20 -0
- package/dist/lib/content/cart-drawer.js +1 -0
- package/dist/lib/content/contact.d.ts +79 -0
- package/dist/lib/content/contact.js +3 -0
- package/dist/lib/content/container-direction.d.ts +14 -0
- package/dist/lib/content/container-direction.js +1 -0
- package/dist/lib/content/container-gap.d.ts +31 -0
- package/dist/lib/content/container-gap.js +1 -0
- package/dist/lib/content/footer.d.ts +30 -0
- package/dist/lib/content/footer.js +1 -0
- package/dist/lib/content/footprint.d.ts +22 -0
- package/dist/lib/content/footprint.js +1 -0
- package/dist/lib/content/gallery-card-layout.d.ts +7 -0
- package/dist/lib/content/gallery-card-layout.js +1 -0
- package/dist/lib/content/gallery-layout.d.ts +154 -0
- package/dist/lib/content/gallery-layout.js +1 -0
- package/dist/lib/content/grid-span.d.ts +15 -0
- package/dist/lib/content/grid-span.js +1 -0
- package/dist/lib/content/image-corners.d.ts +7 -0
- package/dist/lib/content/image-corners.js +1 -0
- package/dist/lib/content/image-fit.d.ts +11 -0
- package/dist/lib/content/image-fit.js +1 -0
- package/dist/lib/content/image-treatment.d.ts +20 -0
- package/dist/lib/content/image-treatment.js +1 -0
- package/dist/lib/content/image-width.d.ts +9 -0
- package/dist/lib/content/image-width.js +1 -0
- package/dist/lib/content/page-background.d.ts +4 -0
- package/dist/lib/content/page-background.js +1 -0
- package/dist/lib/content/page-width.d.ts +63 -0
- package/dist/lib/content/page-width.js +1 -0
- package/dist/lib/content/product-page.d.ts +11 -0
- package/dist/lib/content/product-page.js +1 -0
- package/dist/lib/content/section-animation.d.ts +13 -0
- package/dist/lib/content/section-animation.js +1 -0
- package/dist/lib/content/section-background.d.ts +7 -0
- package/dist/lib/content/section-background.js +1 -0
- package/dist/lib/content/section-corners.d.ts +16 -0
- package/dist/lib/content/section-corners.js +1 -0
- package/dist/lib/content/section-height.d.ts +9 -0
- package/dist/lib/content/section-height.js +1 -0
- package/dist/lib/content/section-min-height.d.ts +60 -0
- package/dist/lib/content/section-min-height.js +1 -0
- package/dist/lib/content/section-padding.d.ts +33 -0
- package/dist/lib/content/section-padding.js +1 -0
- package/dist/lib/content/section-surface.d.ts +13 -0
- package/dist/lib/content/section-surface.js +1 -0
- package/dist/lib/content/section-type-size.d.ts +7 -0
- package/dist/lib/content/section-type-size.js +1 -0
- package/dist/lib/content/section-width.d.ts +19 -0
- package/dist/lib/content/section-width.js +1 -0
- package/dist/lib/content/site-gutter.d.ts +2 -0
- package/dist/lib/content/site-gutter.js +1 -0
- package/dist/lib/content/site-name.d.ts +2 -0
- package/dist/lib/content/site-name.js +1 -0
- package/dist/lib/content/social-links.d.ts +12 -0
- package/dist/lib/content/social-links.js +1 -0
- package/dist/lib/content/subscribe.d.ts +76 -0
- package/dist/lib/content/subscribe.js +2 -0
- package/dist/lib/content/view-tiers.d.ts +2 -0
- package/dist/lib/content/view-tiers.js +1 -0
- package/dist/lib/editor/preview-href.d.ts +6 -0
- package/dist/lib/editor/preview-href.js +1 -0
- package/dist/lib/editor-admin-bridge.d.ts +2 -0
- package/dist/lib/editor-admin-bridge.js +1 -0
- package/dist/lib/editor-auth.d.ts +3 -0
- package/dist/lib/editor-auth.js +1 -0
- package/dist/lib/editor-backend-error.d.ts +2 -0
- package/dist/lib/editor-backend-error.js +1 -0
- package/dist/lib/editor-block-metadata.d.ts +6 -0
- package/dist/lib/editor-block-metadata.js +1 -0
- package/dist/lib/editor-blocks.d.ts +20 -0
- package/dist/lib/editor-blocks.js +1 -0
- package/dist/lib/editor-canvas-styles.d.ts +12 -0
- package/dist/lib/editor-canvas-styles.js +1 -0
- package/dist/lib/editor-chrome.d.ts +2 -0
- package/dist/lib/editor-chrome.js +1 -0
- package/dist/lib/editor-document-adapter.d.ts +7 -0
- package/dist/lib/editor-document-adapter.js +1 -0
- package/dist/lib/editor-document-addressing.d.ts +2 -0
- package/dist/lib/editor-document-addressing.js +1 -0
- package/dist/lib/editor-document-contract.d.ts +1 -0
- package/dist/lib/editor-document-contract.js +0 -0
- package/dist/lib/editor-document-hooks.d.ts +1 -0
- package/dist/lib/editor-document-hooks.js +0 -0
- package/dist/lib/editor-document-switch.d.ts +2 -0
- package/dist/lib/editor-document-switch.js +1 -0
- package/dist/lib/editor-events.d.ts +8 -0
- package/dist/lib/editor-events.js +1 -0
- package/dist/lib/editor-failure.d.ts +1 -0
- package/dist/lib/editor-failure.js +1 -0
- package/dist/lib/editor-form-window.d.ts +21 -0
- package/dist/lib/editor-form-window.js +1 -0
- package/dist/lib/editor-host-inbound.d.ts +1 -0
- package/dist/lib/editor-host-inbound.js +1 -0
- package/dist/lib/editor-host.d.ts +2 -0
- package/dist/lib/editor-host.js +1 -0
- package/dist/lib/editor-key-scope.d.ts +1 -0
- package/dist/lib/editor-key-scope.js +1 -0
- package/dist/lib/editor-load-error.d.ts +1 -0
- package/dist/lib/editor-load-error.js +1 -0
- package/dist/lib/editor-media-panel.d.ts +2 -0
- package/dist/lib/editor-media-panel.js +1 -0
- package/dist/lib/editor-media-picker.d.ts +2 -0
- package/dist/lib/editor-media-picker.js +1 -0
- package/dist/lib/editor-page-lock.d.ts +1 -0
- package/dist/lib/editor-page-lock.js +1 -0
- package/dist/lib/editor-page-rows.d.ts +16 -0
- package/dist/lib/editor-page-rows.js +1 -0
- package/dist/lib/editor-screen.d.ts +2 -0
- package/dist/lib/editor-screen.js +1 -0
- package/dist/lib/editor-section-templates.d.ts +1 -0
- package/dist/lib/editor-section-templates.js +1 -0
- package/dist/lib/editor-session-context.d.ts +1 -0
- package/dist/lib/editor-session-context.js +1 -0
- package/dist/lib/editor-session-loader.d.ts +4 -0
- package/dist/lib/editor-session-loader.js +1 -0
- package/dist/lib/editor-session.d.ts +2 -0
- package/dist/lib/editor-session.js +1 -0
- package/dist/lib/editor-site-slug.d.ts +2 -0
- package/dist/lib/editor-site-slug.js +1 -0
- package/dist/lib/editor-site.d.ts +3 -0
- package/dist/lib/editor-site.js +1 -0
- package/dist/lib/editor-theme.d.ts +1 -0
- package/dist/lib/editor-theme.js +1 -0
- package/dist/lib/fit-words.d.ts +3 -0
- package/dist/lib/fit-words.js +220 -0
- package/dist/lib/fonts.d.ts +32 -0
- package/dist/lib/fonts.js +1 -0
- package/dist/lib/geocode.d.ts +6 -0
- package/dist/lib/geocode.js +1 -0
- package/dist/lib/hero-arrows.d.ts +23 -0
- package/dist/lib/hero-arrows.js +1 -0
- package/dist/lib/hero-group-placement.d.ts +46 -0
- package/dist/lib/hero-group-placement.js +1 -0
- package/dist/lib/hero-overlay-anchor.d.ts +6 -0
- package/dist/lib/hero-overlay-anchor.js +1 -0
- package/dist/lib/hero-phone-stack.d.ts +27 -0
- package/dist/lib/hero-phone-stack.js +1 -0
- package/dist/lib/hero-swipe.d.ts +16 -0
- package/dist/lib/hero-swipe.js +1 -0
- package/dist/lib/hero-texture.d.ts +4 -0
- package/dist/lib/hero-texture.js +1 -0
- package/dist/lib/hero-video-control.d.ts +13 -0
- package/dist/lib/hero-video-control.js +1 -0
- package/dist/lib/image-focus.d.ts +16 -0
- package/dist/lib/image-focus.js +1 -0
- package/dist/lib/links/link-filters.d.ts +1 -0
- package/dist/lib/links/link-filters.js +0 -0
- package/dist/lib/links/link-picker-setup.d.ts +29 -0
- package/dist/lib/links/link-picker-setup.js +1 -0
- package/dist/lib/links/page-link-rules.d.ts +22 -0
- package/dist/lib/links/page-link-rules.js +1 -0
- package/dist/lib/locations-grid.d.ts +10 -0
- package/dist/lib/locations-grid.js +1 -0
- package/dist/lib/logo/analyze-logo-client.d.ts +3 -0
- package/dist/lib/logo/analyze-logo-client.js +1 -0
- package/dist/lib/logo/reverse-svg.d.ts +9 -0
- package/dist/lib/logo/reverse-svg.js +1 -0
- package/dist/lib/map-styles.d.ts +30 -0
- package/dist/lib/map-styles.js +1 -0
- package/dist/lib/maps-config.d.ts +16 -0
- package/dist/lib/maps-config.js +1 -0
- package/dist/lib/maps-loader.d.ts +3 -0
- package/dist/lib/maps-loader.js +1 -0
- package/dist/lib/markup.d.ts +38 -0
- package/dist/lib/markup.js +2 -0
- package/dist/lib/media.d.ts +10 -0
- package/dist/lib/media.js +1 -0
- package/dist/lib/parse-option.d.ts +3 -0
- package/dist/lib/parse-option.js +1 -0
- package/dist/lib/popup/text-kinds.d.ts +11 -0
- package/dist/lib/popup/text-kinds.js +1 -0
- package/dist/lib/preview-header-settings.d.ts +39 -0
- package/dist/lib/preview-header-settings.js +0 -0
- package/dist/lib/puck/ColourControl.d.ts +11 -0
- package/dist/lib/puck/ColourControl.js +1 -0
- package/dist/lib/puck/MarkupToolbar.d.ts +13 -0
- package/dist/lib/puck/MarkupToolbar.js +1 -0
- package/dist/lib/puck/add-palette.d.ts +14 -0
- package/dist/lib/puck/add-palette.js +1 -0
- package/dist/lib/puck/add-target-types.d.ts +1 -0
- package/dist/lib/puck/add-target-types.js +0 -0
- package/dist/lib/puck/add-target.d.ts +3 -0
- package/dist/lib/puck/add-target.js +1 -0
- package/dist/lib/puck/apply-card-corners.d.ts +21 -0
- package/dist/lib/puck/apply-card-corners.js +1 -0
- package/dist/lib/puck/block-choice.d.ts +2 -0
- package/dist/lib/puck/block-choice.js +1 -0
- package/dist/lib/puck/block-offer.d.ts +10 -0
- package/dist/lib/puck/block-offer.js +1 -0
- package/dist/lib/puck/block-types-in.d.ts +1 -0
- package/dist/lib/puck/block-types-in.js +1 -0
- package/dist/lib/puck/blocks/block-types.d.ts +12 -0
- package/dist/lib/puck/blocks/block-types.js +1 -0
- package/dist/lib/puck/blocks/general/Banner/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Banner/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Banner/render.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Banner/render.js +1 -0
- package/dist/lib/puck/blocks/general/Breadcrumb/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Breadcrumb/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Breadcrumb/render.d.ts +5 -0
- package/dist/lib/puck/blocks/general/Breadcrumb/render.js +1 -0
- package/dist/lib/puck/blocks/general/ButtonBlock/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/ButtonBlock/fields.js +1 -0
- package/dist/lib/puck/blocks/general/ButtonBlock/render.d.ts +2 -0
- package/dist/lib/puck/blocks/general/ButtonBlock/render.js +1 -0
- package/dist/lib/puck/blocks/general/Cards/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Cards/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Cards/render.d.ts +6 -0
- package/dist/lib/puck/blocks/general/Cards/render.js +1 -0
- package/dist/lib/puck/blocks/general/CategoryBar/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/CategoryBar/fields.js +1 -0
- package/dist/lib/puck/blocks/general/CategoryBar/render.d.ts +2 -0
- package/dist/lib/puck/blocks/general/CategoryBar/render.js +1 -0
- package/dist/lib/puck/blocks/general/Chart/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Chart/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Chart/render.d.ts +6 -0
- package/dist/lib/puck/blocks/general/Chart/render.js +2 -0
- package/dist/lib/puck/blocks/general/ContactLocations/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/ContactLocations/fields.js +1 -0
- package/dist/lib/puck/blocks/general/ContactLocations/render.d.ts +2 -0
- package/dist/lib/puck/blocks/general/ContactLocations/render.js +1 -0
- package/dist/lib/puck/blocks/general/CustomHTML/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/CustomHTML/fields.js +1 -0
- package/dist/lib/puck/blocks/general/CustomHTML/render.d.ts +2 -0
- package/dist/lib/puck/blocks/general/CustomHTML/render.js +3 -0
- package/dist/lib/puck/blocks/general/Divider/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Divider/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Divider/render.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Divider/render.js +1 -0
- package/dist/lib/puck/blocks/general/DocBody/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/DocBody/fields.js +1 -0
- package/dist/lib/puck/blocks/general/DocBody/render.d.ts +5 -0
- package/dist/lib/puck/blocks/general/DocBody/render.js +1 -0
- package/dist/lib/puck/blocks/general/DocMasthead/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/DocMasthead/fields.js +1 -0
- package/dist/lib/puck/blocks/general/DocMasthead/render.d.ts +7 -0
- package/dist/lib/puck/blocks/general/DocMasthead/render.js +1 -0
- package/dist/lib/puck/blocks/general/DocMetaCards/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/DocMetaCards/fields.js +1 -0
- package/dist/lib/puck/blocks/general/DocMetaCards/render.d.ts +4 -0
- package/dist/lib/puck/blocks/general/DocMetaCards/render.js +1 -0
- package/dist/lib/puck/blocks/general/DocTabs/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/DocTabs/fields.js +1 -0
- package/dist/lib/puck/blocks/general/DocTabs/render.d.ts +6 -0
- package/dist/lib/puck/blocks/general/DocTabs/render.js +1 -0
- package/dist/lib/puck/blocks/general/Eyebrow/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Eyebrow/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Eyebrow/render.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Eyebrow/render.js +1 -0
- package/dist/lib/puck/blocks/general/FAQ/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/FAQ/fields.js +1 -0
- package/dist/lib/puck/blocks/general/FAQ/render.d.ts +7 -0
- package/dist/lib/puck/blocks/general/FAQ/render.js +1 -0
- package/dist/lib/puck/blocks/general/FeaturedCover/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/FeaturedCover/fields.js +1 -0
- package/dist/lib/puck/blocks/general/FeaturedCover/render.d.ts +13 -0
- package/dist/lib/puck/blocks/general/FeaturedCover/render.js +1 -0
- package/dist/lib/puck/blocks/general/Flex/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Flex/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Flex/render.d.ts +7 -0
- package/dist/lib/puck/blocks/general/Flex/render.js +1 -0
- package/dist/lib/puck/blocks/general/Footprint/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Footprint/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Footprint/render.d.ts +7 -0
- package/dist/lib/puck/blocks/general/Footprint/render.js +2 -0
- package/dist/lib/puck/blocks/general/Grid/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Grid/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Grid/render.d.ts +7 -0
- package/dist/lib/puck/blocks/general/Grid/render.js +1 -0
- package/dist/lib/puck/blocks/general/Heading/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Heading/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Heading/render.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Heading/render.js +1 -0
- package/dist/lib/puck/blocks/general/Hero/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Hero/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Hero/render.d.ts +7 -0
- package/dist/lib/puck/blocks/general/Hero/render.js +1 -0
- package/dist/lib/puck/blocks/general/HeroGroup/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/HeroGroup/fields.js +1 -0
- package/dist/lib/puck/blocks/general/HeroGroup/render.d.ts +8 -0
- package/dist/lib/puck/blocks/general/HeroGroup/render.js +1 -0
- package/dist/lib/puck/blocks/general/HeroSingle/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/HeroSingle/fields.js +1 -0
- package/dist/lib/puck/blocks/general/HeroSingle/render.d.ts +8 -0
- package/dist/lib/puck/blocks/general/HeroSingle/render.js +1 -0
- package/dist/lib/puck/blocks/general/HeroSlide/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/HeroSlide/fields.js +1 -0
- package/dist/lib/puck/blocks/general/HeroSlide/render.d.ts +8 -0
- package/dist/lib/puck/blocks/general/HeroSlide/render.js +1 -0
- package/dist/lib/puck/blocks/general/ImageBlock/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/ImageBlock/fields.js +1 -0
- package/dist/lib/puck/blocks/general/ImageBlock/render.d.ts +2 -0
- package/dist/lib/puck/blocks/general/ImageBlock/render.js +1 -0
- package/dist/lib/puck/blocks/general/Integrations/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Integrations/fields.js +2 -0
- package/dist/lib/puck/blocks/general/Integrations/render.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Integrations/render.js +2 -0
- package/dist/lib/puck/blocks/general/IntroBleed/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/IntroBleed/fields.js +1 -0
- package/dist/lib/puck/blocks/general/IntroBleed/render.d.ts +7 -0
- package/dist/lib/puck/blocks/general/IntroBleed/render.js +2 -0
- package/dist/lib/puck/blocks/general/KeyFeatures/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/KeyFeatures/fields.js +1 -0
- package/dist/lib/puck/blocks/general/KeyFeatures/render.d.ts +6 -0
- package/dist/lib/puck/blocks/general/KeyFeatures/render.js +1 -0
- package/dist/lib/puck/blocks/general/LogoBlock/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/LogoBlock/fields.js +1 -0
- package/dist/lib/puck/blocks/general/LogoBlock/render.d.ts +2 -0
- package/dist/lib/puck/blocks/general/LogoBlock/render.js +1 -0
- package/dist/lib/puck/blocks/general/Logos/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Logos/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Logos/render.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Logos/render.js +1 -0
- package/dist/lib/puck/blocks/general/LongRead/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/LongRead/fields.js +1 -0
- package/dist/lib/puck/blocks/general/LongRead/render.d.ts +19 -0
- package/dist/lib/puck/blocks/general/LongRead/render.js +1 -0
- package/dist/lib/puck/blocks/general/Manifesto/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Manifesto/fields.js +2 -0
- package/dist/lib/puck/blocks/general/Manifesto/render.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Manifesto/render.js +1 -0
- package/dist/lib/puck/blocks/general/Masthead/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Masthead/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Masthead/render.d.ts +8 -0
- package/dist/lib/puck/blocks/general/Masthead/render.js +1 -0
- package/dist/lib/puck/blocks/general/Mockup/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Mockup/fields.js +2 -0
- package/dist/lib/puck/blocks/general/Mockup/render.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Mockup/render.js +2 -0
- package/dist/lib/puck/blocks/general/OrderSummary/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/OrderSummary/fields.js +1 -0
- package/dist/lib/puck/blocks/general/OrderSummary/render.d.ts +6 -0
- package/dist/lib/puck/blocks/general/OrderSummary/render.js +1 -0
- package/dist/lib/puck/blocks/general/ParagraphsA/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/ParagraphsA/fields.js +1 -0
- package/dist/lib/puck/blocks/general/ParagraphsA/render.d.ts +9 -0
- package/dist/lib/puck/blocks/general/ParagraphsA/render.js +1 -0
- package/dist/lib/puck/blocks/general/PaymentBadges/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/PaymentBadges/fields.js +1 -0
- package/dist/lib/puck/blocks/general/PaymentBadges/render.d.ts +5 -0
- package/dist/lib/puck/blocks/general/PaymentBadges/render.js +1 -0
- package/dist/lib/puck/blocks/general/PostCard/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/PostCard/fields.js +1 -0
- package/dist/lib/puck/blocks/general/PostCard/render.d.ts +9 -0
- package/dist/lib/puck/blocks/general/PostCard/render.js +1 -0
- package/dist/lib/puck/blocks/general/ProcessSteps/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/ProcessSteps/fields.js +1 -0
- package/dist/lib/puck/blocks/general/ProcessSteps/render.d.ts +13 -0
- package/dist/lib/puck/blocks/general/ProcessSteps/render.js +1 -0
- package/dist/lib/puck/blocks/general/Prose/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Prose/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Prose/render.d.ts +7 -0
- package/dist/lib/puck/blocks/general/Prose/render.js +1 -0
- package/dist/lib/puck/blocks/general/SectionHeader/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/SectionHeader/fields.js +1 -0
- package/dist/lib/puck/blocks/general/SectionHeader/render.d.ts +2 -0
- package/dist/lib/puck/blocks/general/SectionHeader/render.js +1 -0
- package/dist/lib/puck/blocks/general/Series/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Series/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Series/render.d.ts +8 -0
- package/dist/lib/puck/blocks/general/Series/render.js +1 -0
- package/dist/lib/puck/blocks/general/Spacer/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Spacer/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Spacer/render.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Spacer/render.js +1 -0
- package/dist/lib/puck/blocks/general/SpecStrip/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/SpecStrip/fields.js +1 -0
- package/dist/lib/puck/blocks/general/SpecStrip/render.d.ts +2 -0
- package/dist/lib/puck/blocks/general/SpecStrip/render.js +1 -0
- package/dist/lib/puck/blocks/general/Split/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Split/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Split/render.d.ts +10 -0
- package/dist/lib/puck/blocks/general/Split/render.js +2 -0
- package/dist/lib/puck/blocks/general/Stats/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Stats/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Stats/render.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Stats/render.js +1 -0
- package/dist/lib/puck/blocks/general/StatsParagraph/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/StatsParagraph/fields.js +1 -0
- package/dist/lib/puck/blocks/general/StatsParagraph/render.d.ts +7 -0
- package/dist/lib/puck/blocks/general/StatsParagraph/render.js +1 -0
- package/dist/lib/puck/blocks/general/Testimonials/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Testimonials/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Testimonials/render.d.ts +6 -0
- package/dist/lib/puck/blocks/general/Testimonials/render.js +1 -0
- package/dist/lib/puck/blocks/general/Text/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Text/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Text/render.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Text/render.js +1 -0
- package/dist/lib/puck/blocks/general/Ticker/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Ticker/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Ticker/render.d.ts +5 -0
- package/dist/lib/puck/blocks/general/Ticker/render.js +1 -0
- package/dist/lib/puck/blocks/general/Timeline/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/Timeline/fields.js +1 -0
- package/dist/lib/puck/blocks/general/Timeline/render.d.ts +10 -0
- package/dist/lib/puck/blocks/general/Timeline/render.js +2 -0
- package/dist/lib/puck/blocks/general/TimelineTrack/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/TimelineTrack/fields.js +1 -0
- package/dist/lib/puck/blocks/general/TimelineTrack/render.d.ts +8 -0
- package/dist/lib/puck/blocks/general/TimelineTrack/render.js +1 -0
- package/dist/lib/puck/blocks/general/TitleWithButtons/fields.d.ts +2 -0
- package/dist/lib/puck/blocks/general/TitleWithButtons/fields.js +1 -0
- package/dist/lib/puck/blocks/general/TitleWithButtons/render.d.ts +5 -0
- package/dist/lib/puck/blocks/general/TitleWithButtons/render.js +2 -0
- package/dist/lib/puck/blocks/general/index.d.ts +2 -0
- package/dist/lib/puck/blocks/general/index.js +1 -0
- package/dist/lib/puck/blocks/general/renders.d.ts +57 -0
- package/dist/lib/puck/blocks/general/renders.js +1 -0
- package/dist/lib/puck/blocks/general/section-bg-built-in.d.ts +6 -0
- package/dist/lib/puck/blocks/general/section-bg-built-in.js +1 -0
- package/dist/lib/puck/blocks/placeholders.d.ts +25 -0
- package/dist/lib/puck/blocks/placeholders.js +1 -0
- package/dist/lib/puck/blocks/scaffold.d.ts +22 -0
- package/dist/lib/puck/blocks/scaffold.js +1 -0
- package/dist/lib/puck/blocks/shared-fields.d.ts +14 -0
- package/dist/lib/puck/blocks/shared-fields.js +1 -0
- package/dist/lib/puck/booking-preview.d.ts +3 -0
- package/dist/lib/puck/booking-preview.js +1 -0
- package/dist/lib/puck/box-footer.d.ts +9 -0
- package/dist/lib/puck/box-footer.js +1 -0
- package/dist/lib/puck/build-config.d.ts +3 -0
- package/dist/lib/puck/build-config.js +1 -0
- package/dist/lib/puck/cap-hero-groups.d.ts +1 -0
- package/dist/lib/puck/cap-hero-groups.js +1 -0
- package/dist/lib/puck/container-blocks.d.ts +10 -0
- package/dist/lib/puck/container-blocks.js +1 -0
- package/dist/lib/puck/content-tree.d.ts +2 -0
- package/dist/lib/puck/content-tree.js +1 -0
- package/dist/lib/puck/controls.d.ts +335 -0
- package/dist/lib/puck/controls.js +1 -0
- package/dist/lib/puck/device-fields.d.ts +2 -0
- package/dist/lib/puck/device-fields.js +1 -0
- package/dist/lib/puck/editor-page-context.d.ts +6 -0
- package/dist/lib/puck/editor-page-context.js +1 -0
- package/dist/lib/puck/enclosing-section.d.ts +1 -0
- package/dist/lib/puck/enclosing-section.js +1 -0
- package/dist/lib/puck/field-buckets.d.ts +2 -0
- package/dist/lib/puck/field-buckets.js +1 -0
- package/dist/lib/puck/field-groups.d.ts +23 -0
- package/dist/lib/puck/field-groups.js +1 -0
- package/dist/lib/puck/field-markers.d.ts +2 -0
- package/dist/lib/puck/field-markers.js +1 -0
- package/dist/lib/puck/field-noun.d.ts +3 -0
- package/dist/lib/puck/field-noun.js +1 -0
- package/dist/lib/puck/footer-block-row-name.d.ts +4 -0
- package/dist/lib/puck/footer-block-row-name.js +1 -0
- package/dist/lib/puck/footer-blocks.d.ts +11 -0
- package/dist/lib/puck/footer-blocks.js +1 -0
- package/dist/lib/puck/footer-return.d.ts +3 -0
- package/dist/lib/puck/footer-return.js +1 -0
- package/dist/lib/puck/general-registry.d.ts +4 -0
- package/dist/lib/puck/general-registry.js +1 -0
- package/dist/lib/puck/geocode-resolve.d.ts +14 -0
- package/dist/lib/puck/geocode-resolve.js +1 -0
- package/dist/lib/puck/header-clearance.d.ts +49 -0
- package/dist/lib/puck/header-clearance.js +1 -0
- package/dist/lib/puck/header-ink.d.ts +16 -0
- package/dist/lib/puck/header-ink.js +1 -0
- package/dist/lib/puck/heading-outline.d.ts +7 -0
- package/dist/lib/puck/heading-outline.js +1 -0
- package/dist/lib/puck/hidable.d.ts +2 -0
- package/dist/lib/puck/hidable.js +1 -0
- package/dist/lib/puck/home-page.d.ts +1 -0
- package/dist/lib/puck/home-page.js +1 -0
- package/dist/lib/puck/left-view.d.ts +5 -0
- package/dist/lib/puck/left-view.js +1 -0
- package/dist/lib/puck/locations-focus.d.ts +22 -0
- package/dist/lib/puck/locations-focus.js +1 -0
- package/dist/lib/puck/locations-tree.d.ts +23 -0
- package/dist/lib/puck/locations-tree.js +2 -0
- package/dist/lib/puck/locked-blocks.d.ts +2 -0
- package/dist/lib/puck/locked-blocks.js +1 -0
- package/dist/lib/puck/media-manifest.json +138 -0
- package/dist/lib/puck/migrate-legacy.d.ts +2 -0
- package/dist/lib/puck/migrate-legacy.js +1 -0
- package/dist/lib/puck/mockup-variant-fields.d.ts +10 -0
- package/dist/lib/puck/mockup-variant-fields.js +1 -0
- package/dist/lib/puck/neutralization-contracts.d.ts +43 -0
- package/dist/lib/puck/neutralization-contracts.js +1 -0
- package/dist/lib/puck/one-h1.d.ts +3 -0
- package/dist/lib/puck/one-h1.js +1 -0
- package/dist/lib/puck/overlay-portal.d.ts +2 -0
- package/dist/lib/puck/overlay-portal.js +1 -0
- package/dist/lib/puck/overrides.d.ts +2 -0
- package/dist/lib/puck/overrides.js +1 -0
- package/dist/lib/puck/page-render.d.ts +5 -0
- package/dist/lib/puck/page-render.js +1 -0
- package/dist/lib/puck/page-root-fields.d.ts +29 -0
- package/dist/lib/puck/page-root-fields.js +1 -0
- package/dist/lib/puck/page-root.d.ts +55 -0
- package/dist/lib/puck/page-root.js +1 -0
- package/dist/lib/puck/palette-sections.d.ts +2 -0
- package/dist/lib/puck/palette-sections.js +1 -0
- package/dist/lib/puck/panel-drop-empty-headings.d.ts +3 -0
- package/dist/lib/puck/panel-drop-empty-headings.js +1 -0
- package/dist/lib/puck/panel-fields.d.ts +2 -0
- package/dist/lib/puck/panel-fields.js +1 -0
- package/dist/lib/puck/panel-heading-scope.d.ts +8 -0
- package/dist/lib/puck/panel-heading-scope.js +1 -0
- package/dist/lib/puck/panel-no-control-mark.d.ts +2 -0
- package/dist/lib/puck/panel-no-control-mark.js +1 -0
- package/dist/lib/puck/part-anchors.d.ts +23 -0
- package/dist/lib/puck/part-anchors.js +1 -0
- package/dist/lib/puck/part-id.d.ts +1 -0
- package/dist/lib/puck/part-id.js +1 -0
- package/dist/lib/puck/part-inks.d.ts +9 -0
- package/dist/lib/puck/part-inks.js +1 -0
- package/dist/lib/puck/part-key.d.ts +9 -0
- package/dist/lib/puck/part-key.js +1 -0
- package/dist/lib/puck/part-row-field.d.ts +2 -0
- package/dist/lib/puck/part-row-field.js +1 -0
- package/dist/lib/puck/part-rows.d.ts +15 -0
- package/dist/lib/puck/part-rows.js +1 -0
- package/dist/lib/puck/part-styles.d.ts +133 -0
- package/dist/lib/puck/part-styles.js +2 -0
- package/dist/lib/puck/part-text.d.ts +12 -0
- package/dist/lib/puck/part-text.js +1 -0
- package/dist/lib/puck/part-typing.d.ts +11 -0
- package/dist/lib/puck/part-typing.js +1 -0
- package/dist/lib/puck/passes/catalogue-labels.d.ts +2 -0
- package/dist/lib/puck/passes/catalogue-labels.js +1 -0
- package/dist/lib/puck/passes/cell-width.d.ts +2 -0
- package/dist/lib/puck/passes/cell-width.js +1 -0
- package/dist/lib/puck/passes/clickable-parts.d.ts +2 -0
- package/dist/lib/puck/passes/clickable-parts.js +1 -0
- package/dist/lib/puck/passes/corners.d.ts +3 -0
- package/dist/lib/puck/passes/corners.js +1 -0
- package/dist/lib/puck/passes/document-position.d.ts +16 -0
- package/dist/lib/puck/passes/document-position.js +1 -0
- package/dist/lib/puck/passes/empty-headings.d.ts +2 -0
- package/dist/lib/puck/passes/empty-headings.js +1 -0
- package/dist/lib/puck/passes/hidden-nodes.d.ts +2 -0
- package/dist/lib/puck/passes/hidden-nodes.js +1 -0
- package/dist/lib/puck/passes/index.d.ts +5 -0
- package/dist/lib/puck/passes/index.js +1 -0
- package/dist/lib/puck/passes/inspector.d.ts +2 -0
- package/dist/lib/puck/passes/inspector.js +1 -0
- package/dist/lib/puck/passes/registry-context.d.ts +2 -0
- package/dist/lib/puck/passes/registry-context.js +1 -0
- package/dist/lib/puck/passes/section-anchor.d.ts +2 -0
- package/dist/lib/puck/passes/section-anchor.js +1 -0
- package/dist/lib/puck/passes/section-animation.d.ts +2 -0
- package/dist/lib/puck/passes/section-animation.js +1 -0
- package/dist/lib/puck/passes/section-height.d.ts +2 -0
- package/dist/lib/puck/passes/section-height.js +1 -0
- package/dist/lib/puck/passes/section-padding.d.ts +8 -0
- package/dist/lib/puck/passes/section-padding.js +1 -0
- package/dist/lib/puck/passes/section-theme.d.ts +3 -0
- package/dist/lib/puck/passes/section-theme.js +1 -0
- package/dist/lib/puck/passes/section-width.d.ts +10 -0
- package/dist/lib/puck/passes/section-width.js +1 -0
- package/dist/lib/puck/passes/settings-groups.d.ts +3 -0
- package/dist/lib/puck/passes/settings-groups.js +1 -0
- package/dist/lib/puck/passes/slot-rules.d.ts +4 -0
- package/dist/lib/puck/passes/slot-rules.js +1 -0
- package/dist/lib/puck/passes/types.d.ts +51 -0
- package/dist/lib/puck/passes/types.js +0 -0
- package/dist/lib/puck/phone-override.d.ts +4 -0
- package/dist/lib/puck/phone-override.js +1 -0
- package/dist/lib/puck/pinned-seed-gate.d.ts +7 -0
- package/dist/lib/puck/pinned-seed-gate.js +1 -0
- package/dist/lib/puck/preview-click.d.ts +1 -0
- package/dist/lib/puck/preview-click.js +1 -0
- package/dist/lib/puck/preview-dom.d.ts +1 -0
- package/dist/lib/puck/preview-dom.js +1 -0
- package/dist/lib/puck/preview-events.d.ts +2 -0
- package/dist/lib/puck/preview-events.js +1 -0
- package/dist/lib/puck/preview-selection-context.d.ts +2 -0
- package/dist/lib/puck/preview-selection-context.js +1 -0
- package/dist/lib/puck/registry.d.ts +3 -0
- package/dist/lib/puck/registry.js +1 -0
- package/dist/lib/puck/renamed-props.d.ts +2 -0
- package/dist/lib/puck/renamed-props.js +1 -0
- package/dist/lib/puck/sanitize.d.ts +1 -0
- package/dist/lib/puck/sanitize.js +1 -0
- package/dist/lib/puck/section-catalog.d.ts +36 -0
- package/dist/lib/puck/section-catalog.js +1 -0
- package/dist/lib/puck/section-descriptions.d.ts +1 -0
- package/dist/lib/puck/section-descriptions.js +1 -0
- package/dist/lib/puck/section-doc.d.ts +1 -0
- package/dist/lib/puck/section-doc.js +1 -0
- package/dist/lib/puck/section-groups.d.ts +21 -0
- package/dist/lib/puck/section-groups.js +1 -0
- package/dist/lib/puck/section-text-suppress.d.ts +9 -0
- package/dist/lib/puck/section-text-suppress.js +1 -0
- package/dist/lib/puck/site-gap-fields.d.ts +2 -0
- package/dist/lib/puck/site-gap-fields.js +1 -0
- package/dist/lib/puck/slider-typing.d.ts +9 -0
- package/dist/lib/puck/slider-typing.js +1 -0
- package/dist/lib/puck/slot-child-name.d.ts +2 -0
- package/dist/lib/puck/slot-child-name.js +1 -0
- package/dist/lib/puck/slot-heal.d.ts +1 -0
- package/dist/lib/puck/slot-heal.js +1 -0
- package/dist/lib/puck/slot-section-spec.d.ts +1 -0
- package/dist/lib/puck/slot-section-spec.js +0 -0
- package/dist/lib/puck/slot-specs.d.ts +9 -0
- package/dist/lib/puck/slot-specs.js +1 -0
- package/dist/lib/puck/snapshot-contracts.d.ts +4 -0
- package/dist/lib/puck/snapshot-contracts.js +1 -0
- package/dist/lib/puck/source-bound-parts.d.ts +12 -0
- package/dist/lib/puck/source-bound-parts.js +1 -0
- package/dist/lib/puck/style-clipboard.d.ts +1 -0
- package/dist/lib/puck/style-clipboard.js +1 -0
- package/dist/lib/puck/templateFields.d.ts +2 -0
- package/dist/lib/puck/templateFields.js +1 -0
- package/dist/lib/puck/text-control-kinds.d.ts +2 -0
- package/dist/lib/puck/text-control-kinds.js +1 -0
- package/dist/lib/puck/text-parts.d.ts +30 -0
- package/dist/lib/puck/text-parts.js +1 -0
- package/dist/lib/puck/theme-swatches.d.ts +3 -0
- package/dist/lib/puck/theme-swatches.js +1 -0
- package/dist/lib/puck/tree-reveal.d.ts +1 -0
- package/dist/lib/puck/tree-reveal.js +1 -0
- package/dist/lib/puck/use-section-ops.d.ts +2 -0
- package/dist/lib/puck/use-section-ops.js +1 -0
- package/dist/lib/reel.d.ts +33 -0
- package/dist/lib/reel.js +1 -0
- package/dist/lib/safe-storage.d.ts +10 -0
- package/dist/lib/safe-storage.js +1 -0
- package/dist/lib/save-as-template-action.d.ts +29 -0
- package/dist/lib/save-as-template-action.js +1 -0
- package/dist/lib/section-template-types.d.ts +1 -0
- package/dist/lib/section-template-types.js +0 -0
- package/dist/lib/sections/card-cover-index.d.ts +7 -0
- package/dist/lib/sections/card-cover-index.js +1 -0
- package/dist/lib/sections/collection-card-text-regions.d.ts +4 -0
- package/dist/lib/sections/collection-card-text-regions.js +1 -0
- package/dist/lib/sections/divider-style.d.ts +12 -0
- package/dist/lib/sections/divider-style.js +1 -0
- package/dist/lib/sections/faq-text-regions.d.ts +4 -0
- package/dist/lib/sections/faq-text-regions.js +1 -0
- package/dist/lib/sections/hero-overlay.d.ts +10 -0
- package/dist/lib/sections/hero-overlay.js +1 -0
- package/dist/lib/sections/intro-bleed-layout.d.ts +15 -0
- package/dist/lib/sections/intro-bleed-layout.js +1 -0
- package/dist/lib/sections/new-section-node.d.ts +2 -0
- package/dist/lib/sections/new-section-node.js +1 -0
- package/dist/lib/sections/product-card-style.d.ts +18 -0
- package/dist/lib/sections/product-card-style.js +1 -0
- package/dist/lib/sections/section-eyebrow-look.d.ts +11 -0
- package/dist/lib/sections/section-eyebrow-look.js +1 -0
- package/dist/lib/sections/section-head-placement.d.ts +31 -0
- package/dist/lib/sections/section-head-placement.js +1 -0
- package/dist/lib/sections/section-head-style.d.ts +16 -0
- package/dist/lib/sections/section-head-style.js +1 -0
- package/dist/lib/sections/section-number-style.d.ts +10 -0
- package/dist/lib/sections/section-number-style.js +1 -0
- package/dist/lib/sections/section-presets.d.ts +9 -0
- package/dist/lib/sections/section-presets.js +1 -0
- package/dist/lib/sections/section-text-kinds.d.ts +8 -0
- package/dist/lib/sections/section-text-kinds.js +1 -0
- package/dist/lib/sections/section-text-regions.d.ts +3 -0
- package/dist/lib/sections/section-text-regions.js +1 -0
- package/dist/lib/sections/spec-table-regions.d.ts +11 -0
- package/dist/lib/sections/spec-table-regions.js +1 -0
- package/dist/lib/sections/text-regions.d.ts +21 -0
- package/dist/lib/sections/text-regions.js +1 -0
- package/dist/lib/sections/ticker-join.d.ts +9 -0
- package/dist/lib/sections/ticker-join.js +1 -0
- package/dist/lib/sections/ticker-scroll.d.ts +11 -0
- package/dist/lib/sections/ticker-scroll.js +1 -0
- package/dist/lib/sections/ticker-style.d.ts +17 -0
- package/dist/lib/sections/ticker-style.js +1 -0
- package/dist/lib/site-runtime.d.ts +28 -0
- package/dist/lib/site-runtime.js +1 -0
- package/dist/lib/site-theme-row.d.ts +52 -0
- package/dist/lib/site-theme-row.js +0 -0
- package/dist/lib/slugify.d.ts +1 -0
- package/dist/lib/slugify.js +1 -0
- package/dist/lib/source-rules/accent-token-name.d.ts +20 -0
- package/dist/lib/source-rules/accent-token-name.js +4 -0
- package/dist/lib/source-rules/button-corners.d.ts +13 -0
- package/dist/lib/source-rules/button-corners.js +2 -0
- package/dist/lib/source-rules/editor-chrome-note.d.ts +16 -0
- package/dist/lib/source-rules/editor-chrome-note.js +13 -0
- package/dist/lib/source-rules/editor-context-menu.d.ts +5 -0
- package/dist/lib/source-rules/editor-context-menu.js +4 -0
- package/dist/lib/source-rules/editor-puck-drag-off.d.ts +8 -0
- package/dist/lib/source-rules/editor-puck-drag-off.js +4 -0
- package/dist/lib/source-rules/efficient-easel-version.d.ts +9 -0
- package/dist/lib/source-rules/efficient-easel-version.js +2 -0
- package/dist/lib/source-rules/every-button-follows-the-button-colour.d.ts +12 -0
- package/dist/lib/source-rules/every-button-follows-the-button-colour.js +7 -0
- package/dist/lib/source-rules/flat-theme-palette.d.ts +10 -0
- package/dist/lib/source-rules/flat-theme-palette.js +8 -0
- package/dist/lib/source-rules/full-width-means-full.d.ts +8 -0
- package/dist/lib/source-rules/full-width-means-full.js +2 -0
- package/dist/lib/source-rules/heading-ceiling-sweep.d.ts +11 -0
- package/dist/lib/source-rules/heading-ceiling-sweep.js +8 -0
- package/dist/lib/source-rules/label-hints.d.ts +7 -0
- package/dist/lib/source-rules/label-hints.js +5 -0
- package/dist/lib/source-rules/label-vocabulary.d.ts +14 -0
- package/dist/lib/source-rules/label-vocabulary.js +5 -0
- package/dist/lib/source-rules/mirrored-rows-agree.d.ts +19 -0
- package/dist/lib/source-rules/mirrored-rows-agree.js +10 -0
- package/dist/lib/source-rules/no-comment-in-jsx.d.ts +9 -0
- package/dist/lib/source-rules/no-comment-in-jsx.js +7 -0
- package/dist/lib/source-rules/no-glyph-rows.d.ts +15 -0
- package/dist/lib/source-rules/no-glyph-rows.js +4 -0
- package/dist/lib/source-rules/one-colour-control.d.ts +7 -0
- package/dist/lib/source-rules/one-colour-control.js +2 -0
- package/dist/lib/source-rules/one-dropdown.d.ts +10 -0
- package/dist/lib/source-rules/one-dropdown.js +4 -0
- package/dist/lib/source-rules/one-editable-list.d.ts +16 -0
- package/dist/lib/source-rules/one-editable-list.js +6 -0
- package/dist/lib/source-rules/one-editor-list.d.ts +7 -0
- package/dist/lib/source-rules/one-editor-list.js +3 -0
- package/dist/lib/source-rules/one-right-click.d.ts +10 -0
- package/dist/lib/source-rules/one-right-click.js +2 -0
- package/dist/lib/source-rules/one-switch.d.ts +9 -0
- package/dist/lib/source-rules/one-switch.js +7 -0
- package/dist/lib/source-rules/one-up-level-link.d.ts +16 -0
- package/dist/lib/source-rules/one-up-level-link.js +18 -0
- package/dist/lib/source-rules/panel-colour-tokens.d.ts +48 -0
- package/dist/lib/source-rules/panel-colour-tokens.js +20 -0
- package/dist/lib/source-rules/panel-no-divider-lines.d.ts +14 -0
- package/dist/lib/source-rules/panel-no-divider-lines.js +10 -0
- package/dist/lib/source-rules/panel-one-arrow.d.ts +21 -0
- package/dist/lib/source-rules/panel-one-arrow.js +1 -0
- package/dist/lib/source-rules/panel-one-hover.d.ts +8 -0
- package/dist/lib/source-rules/panel-one-hover.js +2 -0
- package/dist/lib/source-rules/panel-rows-use-the-shared-row.d.ts +23 -0
- package/dist/lib/source-rules/panel-rows-use-the-shared-row.js +22 -0
- package/dist/lib/source-rules/part-slider-fills-row.d.ts +11 -0
- package/dist/lib/source-rules/part-slider-fills-row.js +29 -0
- package/dist/lib/source-rules/part-style-naming.d.ts +10 -0
- package/dist/lib/source-rules/part-style-naming.js +2 -0
- package/dist/lib/source-rules/puck-document-surfaces.d.ts +16 -0
- package/dist/lib/source-rules/puck-document-surfaces.js +8 -0
- package/dist/lib/source-rules/reduced-motion.d.ts +26 -0
- package/dist/lib/source-rules/reduced-motion.js +9 -0
- package/dist/lib/source-rules/route-content-width.d.ts +22 -0
- package/dist/lib/source-rules/route-content-width.js +5 -0
- package/dist/lib/source-rules/rule.d.ts +21 -0
- package/dist/lib/source-rules/rule.js +1 -0
- package/dist/lib/source-rules/section-theme-preview.d.ts +9 -0
- package/dist/lib/source-rules/section-theme-preview.js +8 -0
- package/dist/lib/source-rules/site-gutter.d.ts +6 -0
- package/dist/lib/source-rules/site-gutter.js +4 -0
- package/dist/lib/source-rules/site-square-by-default.d.ts +17 -0
- package/dist/lib/source-rules/site-square-by-default.js +3 -0
- package/dist/lib/source-rules/site-width.d.ts +11 -0
- package/dist/lib/source-rules/site-width.js +7 -0
- package/dist/lib/source-rules/size-token-paints.d.ts +8 -0
- package/dist/lib/source-rules/size-token-paints.js +11 -0
- package/dist/lib/source-rules/social-icons-import.d.ts +6 -0
- package/dist/lib/source-rules/social-icons-import.js +6 -0
- package/dist/lib/source-rules/source-status-is-shared.d.ts +7 -0
- package/dist/lib/source-rules/source-status-is-shared.js +1 -0
- package/dist/lib/source-rules/style-face-matches-size.d.ts +10 -0
- package/dist/lib/source-rules/style-face-matches-size.js +4 -0
- package/dist/lib/source-rules/support/accent-rename-bytes.d.ts +5 -0
- package/dist/lib/source-rules/support/accent-rename-bytes.js +1 -0
- package/dist/lib/source-rules/support/css-box-model.d.ts +5 -0
- package/dist/lib/source-rules/support/css-box-model.js +1 -0
- package/dist/lib/source-rules/support/css-length.d.ts +2 -0
- package/dist/lib/source-rules/support/css-length.js +1 -0
- package/dist/lib/source-rules/support/css-rules.d.ts +12 -0
- package/dist/lib/source-rules/support/css-rules.js +1 -0
- package/dist/lib/source-rules/support/css-source.d.ts +2 -0
- package/dist/lib/source-rules/support/css-source.js +3 -0
- package/dist/lib/source-rules/support/label-extraction.d.ts +14 -0
- package/dist/lib/source-rules/support/label-extraction.js +5 -0
- package/dist/lib/source-rules/support/panel-select-cascade.d.ts +72 -0
- package/dist/lib/source-rules/support/panel-select-cascade.js +2 -0
- package/dist/lib/source-rules/support/part-slider-call-sites.d.ts +9 -0
- package/dist/lib/source-rules/support/part-slider-call-sites.js +17 -0
- package/dist/lib/source-rules/support/registry-source.d.ts +14 -0
- package/dist/lib/source-rules/support/registry-source.js +3 -0
- package/dist/lib/source-rules/support/ts-source.d.ts +2 -0
- package/dist/lib/source-rules/support/ts-source.js +3 -0
- package/dist/lib/source-rules/theme-mode-controls-gone.d.ts +10 -0
- package/dist/lib/source-rules/theme-mode-controls-gone.js +5 -0
- package/dist/lib/source-rules/upload-intake-guard.d.ts +11 -0
- package/dist/lib/source-rules/upload-intake-guard.js +6 -0
- package/dist/lib/source-rules/word-styles.d.ts +8 -0
- package/dist/lib/source-rules/word-styles.js +4 -0
- package/dist/lib/theme-dom.d.ts +14 -0
- package/dist/lib/theme-dom.js +1 -0
- package/dist/lib/theme-row-persist.d.ts +34 -0
- package/dist/lib/theme-row-persist.js +1 -0
- package/dist/lib/theme-save-message.d.ts +6 -0
- package/dist/lib/theme-save-message.js +1 -0
- package/dist/lib/theme.d.ts +177 -0
- package/dist/lib/theme.js +18 -0
- package/dist/lib/use-host-products.d.ts +2 -0
- package/dist/lib/use-host-products.js +1 -0
- package/dist/lib/web-backend.d.ts +138 -0
- package/dist/lib/web-backend.js +1 -0
- package/dist/lib/web-runtime.d.ts +7 -0
- package/dist/lib/web-runtime.js +1 -0
- package/dist/lib/website-document-addressing.d.ts +2 -0
- package/dist/lib/website-document-addressing.js +1 -0
- package/dist/lib/website-host-inbound.d.ts +1 -0
- package/dist/lib/website-host-inbound.js +1 -0
- package/dist/lib/website-session.d.ts +5 -0
- package/dist/lib/website-session.js +1 -0
- package/dist/lib/word-styles.d.ts +54 -0
- package/dist/lib/word-styles.js +1 -0
- package/package.json +50 -36
- package/dist/chunks/EditorPreviewCheckout-5KOAA2SK.js +0 -4
- package/dist/chunks/PreviewFooter-H6XJUR5S.js +0 -1
- package/dist/chunks/SectionEditorShell-EEZR7KFE.js +0 -1
- package/dist/chunks/SiteEditorProvider-ECGZVKLG.js +0 -1
- package/dist/chunks/StorefrontEditorChrome-4TFS62GY.js +0 -1
- package/dist/chunks/chunk-6CP4D6VJ.js +0 -1
- package/dist/chunks/chunk-7QXLVNFD.js +0 -1
- package/dist/chunks/chunk-BJOS4Y35.js +0 -15
- package/dist/chunks/chunk-BJOS4Y35.js.LEGAL.txt +0 -27
- package/dist/chunks/chunk-EIXUXJQ5.js +0 -153
- package/dist/chunks/chunk-EIXUXJQ5.js.LEGAL.txt +0 -4
- package/dist/chunks/chunk-H7O6ZYX6.js +0 -1
- package/dist/chunks/chunk-HVOO2GNE.js +0 -1
- package/dist/chunks/chunk-IFRGL3GL.js +0 -1
- package/dist/chunks/chunk-ML2AR222.js +0 -1
- package/dist/chunks/chunk-RRHBLOH4.js +0 -1
- package/dist/chunks/chunk-S6SXIMIG.js +0 -2
- package/dist/chunks/chunk-SNH7IFTZ.js +0 -1
- package/dist/chunks/chunk-Y4CZD2YY.js +0 -230
- package/dist/chunks/chunk-Y6SLVHK3.js +0 -1
- package/dist/chunks/chunk-YVQUISDX.js +0 -1
- package/dist/chunks/fitment-data-6NXSKODX.js +0 -1
- package/dist/chunks/gallery-builds-data-SWA6XKFF.js +0 -1
- package/dist/chunks/headers-3CAQXQEY.js +0 -1
- package/dist/chunks/render-client-YGYDU3K2.js +0 -1
- package/dist/contract.d.ts +0 -48
- package/dist/contract.js +0 -1
- package/dist/editor.css +0 -1
- package/dist/index.d.ts +0 -721
- package/dist/index.js +0 -11058
- package/dist/links.d.ts +0 -86
- package/dist/links.js +0 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type RuleReport, type SourceFile } from "./rule.js";
|
|
2
|
+
export type PanelNoDividerLinesOptions = {
|
|
3
|
+
readonly panelSheets?: readonly string[];
|
|
4
|
+
readonly allowed?: Readonly<Record<string, string>>;
|
|
5
|
+
readonly pendingElsewhere?: Readonly<Record<string, string>>;
|
|
6
|
+
readonly fullBleed?: readonly string[];
|
|
7
|
+
readonly allowedTsx?: readonly {
|
|
8
|
+
readonly file: string;
|
|
9
|
+
readonly util: string;
|
|
10
|
+
readonly why: string;
|
|
11
|
+
}[];
|
|
12
|
+
readonly minFiles: number;
|
|
13
|
+
};
|
|
14
|
+
export declare function panelNoDividerLines(files: readonly SourceFile[], options: PanelNoDividerLinesOptions): RuleReport;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{ruleChecks as E}from"./rule.js";function v(r){const s=r.split(`
|
|
2
|
+
`),n=[];return s.forEach((g,a)=>{if(!/border-(top|bottom|left|right)[a-z-]*\s*:[^;]*\bsolid\b/.test(g))return;let $=0,c="?";for(let i=a-1;i>=0;i-=1)if($+=(s[i].match(/\}/g)??[]).length-(s[i].match(/\{/g)??[]).length,$<0){c=s[i].split("{")[0].trim();let h=i-1;for(;h>=0&&s[h].trim().endsWith(",");)c=`${s[h].trim()} ${c}`,h-=1;break}n.push({line:a+1,selector:c,decl:g.trim()})}),n}const y=r=>r.split(/[\s,+>~]/)[0].trim(),j=(r,s)=>s in r||y(s)in r,O=/\bzinc-|--sf-line\b|--sf-divider\b|--sf-input-border\b|--sf-chip-bg\b|--es-line\b|--es-divider\b|--sf-text-secondary\b/,k=[["utility",/(^|["'`\s])border-(t|b|l|r)($|["'`\s])/],["style object",/border(Top|Bottom|Left|Right)\s*:/],["css in a string",/border-(top|bottom|left|right)\s*:/]];function S(r){return/radius/i.test(r)||!O.test(r)?null:k.find(([,s])=>s.test(r))?.[0]??null}function N(r,s){const{check:n,report:g}=E("panel divider lines"),a=s.allowed??{},$=s.pendingElsewhere??{},c=s.allowedTsx??[];{const e=u=>["border",u].join("-"),t=[".a,",".b + .c {",` ${e("top")}: 1px solid red;`,"}",`.d { ${e("radius")}: 4px; }`].join(`
|
|
3
|
+
`),l=v(t);n("the census finds a directional solid border, with its whole multi-line selector",l.length===1&&l[0].selector===".a, .b + .c"&&y(l[0].selector)===".a",JSON.stringify(l));const d=["zinc","200"].join("-"),f=[["a utility",`<div className="${e("t")} border-${d}" />`,"utility"],["a style object",`style={{ ${["border","Top"].join("")}: "1px solid var(--sf-line)" }}`,"style object"],["CSS in a string",`const s = "${e("left")}: 1px solid var(--es-divider)";`,"css in a string"],["a border in the storefront's own ink",`<div className="${e("t")} border-line" />`,null],["a radius",`<div className="${e("t")} border-${d} rounded" style={{ borderRadius: 4 }} />`,null]];for(const[u,o,p]of f)n(`the sweep reads ${u} as ${p??"no hairline"}`,S(o)===p,o)}const i=[];for(const e of s.panelSheets??[]){const t=r.find(o=>o.path===e)?.text??"",l=v(t);n(`${e} was read and parsed`,t.length>1e4&&l.length>0,`${t.length} bytes, ${l.length} directional border(s)`),i.push(...l.map(o=>({...o,sheet:e})));const f=(t.replace(/\/\*[\s\S]*?\*\//g,"").match(/\[class\*="_PuckFields[^"]*"\][^{]*\{/g)??[]).length;n(`${e} reaches for no Puck field wrapper`,f===0,`${f} rule(s) still select \`[class*="_PuckFields\u2026"]\` \u2014 the rows are \`.es-insp-row\` now`);const u=t.replace(/,\s*\n\s*/g,", ");for(const o of s.fullBleed??[]){if(!(o in a))continue;const p=u.indexOf(`
|
|
4
|
+
${o} {`);if(!n(`the allowed full-bleed rule is still in ${e}`,p>=0,o))continue;const x=u.slice(p,u.indexOf("}",p));for(const w of["left","right"])n(`the full-bleed rule cancels the panel's ${w} padding, so it reaches the edge`,new RegExp(`margin-${w}:\\s*calc\\(var\\(--sf-insp-pad-x\\)\\s*\\*\\s*-1\\)`).test(x),"inset, this is the line the owner rejected \u2014 full bleed is the exemption"),n(`\u2026and puts that ${w} padding back inside, so the words stay on the rows' edge`,new RegExp(`padding-${w}:\\s*var\\(--sf-insp-pad-x\\)`).test(x))}}for(const e of s.fullBleed??[])n(`the full-bleed selector is an ALLOWED entry: ${e}`,e in a);if(s.panelSheets?.length){const e=i.filter(t=>!j(a,t.selector)&&!j($,t.selector));n(`no unlisted directional border survives in a panel stylesheet (${i.length} censused)`,e.length===0,`${e.length} neither removed, allowed, nor owed to another card \u2014 delete it and let the rhythm tokens separate, or add it to the allow-list with a reason if it is a control edge:
|
|
5
|
+
`+e.map(t=>`${t.sheet}:${t.line} ${t.selector} \u2014 ${t.decl}`).join(`
|
|
6
|
+
`))}const h=e=>i.some(t=>t.selector===e||y(t.selector)===e);for(const[e,t]of Object.entries(a))n(`ALLOWED entry ${e} still names a real rule (${t.slice(0,48)}\u2026)`,h(e),"the rule is gone: delete this entry with it");for(const[e,t]of Object.entries($))n(`PENDING entry ${e} is still owed \u2014 ${t}`,h(e),"that card has landed and the rule is gone: delete this entry");const b=r.filter(e=>/\.tsx?$/.test(e.path));n(`the repository's own TS/TSX files were swept (${b.length}, at least ${s.minFiles})`,b.length>=s.minFiles);const m=[];for(const e of b)e.text.split(`
|
|
7
|
+
`).forEach((t,l)=>{const d=S(t);d&&(c.some(f=>f.file===e.path&&t.includes(f.util))||m.push(`${e.path}:${l+1} (${d}) ${t.trim().slice(0,80)}`))});n("no editor panel file draws an unlisted directional border",m.length===0,`${m.length} found:
|
|
8
|
+
${m.join(`
|
|
9
|
+
`)}`);for(const e of c){const t=b.find(l=>l.path===e.file)?.text??"";n(`ALLOWED_TSX entry ${e.file} ${e.util} still names a real line (${e.why.slice(0,40)}\u2026)`,t.split(`
|
|
10
|
+
`).some(l=>k.some(([,d])=>d.test(l))&&l.includes(e.util)),"the line is gone: delete this entry")}return g()}export{N as panelNoDividerLines};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type * as TS from "typescript";
|
|
2
|
+
import { type RuleReport, type SourceFile } from "./rule.js";
|
|
3
|
+
import { type SelectHelper } from "./support/panel-select-cascade.js";
|
|
4
|
+
export type PanelCascadeOptions = {
|
|
5
|
+
readonly panelSheet: string | SourceFile;
|
|
6
|
+
readonly selectHelper: SelectHelper;
|
|
7
|
+
readonly populationFloor: number;
|
|
8
|
+
readonly houseDrawnFloor: number;
|
|
9
|
+
};
|
|
10
|
+
export type PanelOneArrowOptions = PanelCascadeOptions & {
|
|
11
|
+
readonly editorEntries?: readonly string[];
|
|
12
|
+
readonly loadedSheets?: Readonly<Record<string, string | null>>;
|
|
13
|
+
};
|
|
14
|
+
export declare const namesSelectElement: (selector: string) => boolean;
|
|
15
|
+
export declare function panelSheetOf(files: readonly SourceFile[], panelSheet: string | SourceFile): {
|
|
16
|
+
sheet: SourceFile | undefined;
|
|
17
|
+
ours: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare const censusFiles: (files: readonly SourceFile[]) => SourceFile[];
|
|
20
|
+
export declare function editorPackageSheets(ts: typeof TS, files: readonly SourceFile[], entries: readonly string[], sheetPath: string): string[];
|
|
21
|
+
export declare function panelOneArrow(ts: typeof TS, files: readonly SourceFile[], options: PanelOneArrowOptions): RuleReport;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isRuleSource as U,ruleChecks as G}from"./rule.js";import{readRules as K}from"./support/css-rules.js";import{stripComments as V}from"./support/css-source.js";import{applicable as q,census as J,deriveShapes as L,derefVars as Q,importsOf as B,readVars as X,resolve as O,splitDecls as W}from"./support/panel-select-cascade.js";const S="--sf-select-arrow",R=["background-image","background-size","background-repeat","background-position"],I=l=>/(^|[\s,>+~(])select(?![\w-])/.test(l);function Y(l,a){return typeof a!="string"?{sheet:a,ours:!1}:{sheet:l.find(o=>o.path===a),ours:!0}}const Z=l=>l.filter(a=>/\.(tsx?|mts)$/.test(a.path)&&!U(a.path)),P=(l,a)=>l===`@/${a}`||l.endsWith(`/${a}`)||l===`./${a.split("/").pop()}`;function oe(l,a,o,n){const x=new Set;for(const j of o){const k=a.find(r=>r.path===j);if(k)for(const r of B(l,k))r.endsWith(".css")&&!P(r,n)&&!r.startsWith("@/")&&!r.startsWith(".")&&x.add(r)}return[...x].sort()}function ae(l,a,o){const{check:n,report:x}=G("panel one arrow"),{sheet:j,ours:k}=Y(a,o.panelSheet),r=j?.path??(typeof o.panelSheet=="string"?o.panelSheet:o.panelSheet.path),{population:g,helperDeclared:N}=J(l,Z(a),o.selectHelper),T=g.filter(e=>e.engineDrawn),p=g.filter(e=>!e.engineDrawn);a.some(e=>e.path===o.selectHelper.file)&&n(`${o.selectHelper.file} declares the house \`select\` helper`,N,"the census has no helper to resolve (B) against"),n(`the panel draws house-drawn selects (${p.length}, at least ${o.houseDrawnFloor})`,p.length>=o.houseDrawnFloor&&(p.length>0||o.houseDrawnFloor===0),`${p.length} found: ${p.map(e=>`${e.file}:${e.line}`).join(", ")||"(none)"} \u2014 with none, this card's rows do not exist and \xA73 passes empty`);const v=V(j?.text??""),$=X(v);n(`${r} was read`,v.length>1e4,`${v.length} bytes`);const D=K(v),i=L(g,v),F=i.reduce((e,t)=>e+t.rows,0);n(`every house-drawn select is in exactly one shape, and no engine-drawn field is in any (${i.map(e=>e.name).join(", ")})`,F===p.length,`shapes hold ${F} row(s), the census found ${p.length} house-drawn`);const u=new Map,E=new Map,y=[],M=[];for(const e of i){const t=q(D,e,r,0,"rest"),s=q(D,e,r,0,"hover");y.push(...t.unreadable,...s.unreadable),M.push(...s.undecided);const m={appearance:O(t.applied,"appearance",$).value};for(const h of R)m[h]=O(t.applied,h,$).value;m["@from"]=O(t.applied,"background-image",$).from,u.set(e.name,m);const c={};for(const h of R)c[h]=O(s.applied,h,$).value;E.set(e.name,c)}const f=(e,t)=>e.get(t.name);n("every rule that can reach a panel select was understood",y.length===0,`could not parse: ${[...new Set(y)].slice(0,4).join(" \xB7 ")}${y.length>4?` (+${y.length-4} more)`:""} \u2014 a rule this model skips is a rule it lies about`);for(const e of i){const t=f(u,e);n(`${e.name}: the browser draws no arrow of its own (appearance: none)`,t.appearance==="none",`appearance resolves to \`${t.appearance}\` on ${e.rows} row(s) \u2014 the platform arrow is still painted, so an added image would sit beside it`)}for(const e of i){const t=f(u,e);n(`${e.name}: an arrow IS drawn`,/url\(/.test(t["background-image"]),`background-image resolves to \`${t["background-image"]}\` on ${e.rows} row(s) \u2014 a row with no arrow reads as a stylesheet that failed to load, and taking the arrow away undoes the owner's 2026-09-01 ruling`)}const A=f(u,i[0]);for(const e of["appearance",...R]){const t=i.filter(s=>f(u,s)[e]!==A[e]);n(`every shape resolves the same \`${e}\``,t.length===0,`${i[0].name} (${i[0].rows} row(s)) says \`${A[e].slice(0,44)}\`, but `+t.map(s=>`${s.name} (${s.rows} row(s)) says \`${f(u,s)[e].slice(0,44)}\``).join("; "))}const C=e=>e["background-repeat"]!=="no-repeat"||e["background-size"]==="auto";for(const e of i){const t=f(u,e);n(`${e.name}: the arrow is never tiled (66397)`,!C(t),`repeat=${t["background-repeat"]} size=${t["background-size"]} \u2014 a full-size tile repeats ~2.5x across a 248px row and draws a bar of triangles`)}for(const e of i){const t=f(E,e);n(`${e.name}: the arrow is never tiled under the pointer either (66397)`,/url\(/.test(t["background-image"])&&!C(t),`hovered image=${t["background-image"].slice(0,40)} repeat=${t["background-repeat"]} size=${t["background-size"]} \u2014 this is the dark bar with three triangles, in the state it was filed in`)}const H=M.filter(e=>W(e.decls).some(t=>t.prop==="background"||R.includes(t.prop)));if(n("no rule this model cannot judge decides a hovered arrow property",H.length===0,`${[...new Set(H.map(e=>`@media ${e.media} { ${e.selector} }`))].join(" \xB7 ")} \u2014 an unjudged media query holding one of these properties makes (e) a guess`),k){const e=D.flatMap(t=>t.selector.split(",").map(s=>s.trim()).filter(s=>I(s)).filter(()=>W(t.decls).some(s=>s.prop==="background")).map(s=>t.media?`${t.media} { ${s} }`:s));n("no rule that names the `select` element uses the `background` shorthand",e.length===0,`${e.join(" \xB7 ")} \u2014 a shorthand resets background-size/-repeat/-position/-image; set \`background-color\` instead (card 66397)`)}if(o.editorEntries!==void 0){const e=/^@measured\/puck(\/|$)/,t=new Set;for(const c of o.editorEntries){const h=a.find(d=>d.path===c),w=h?B(l,h):[];n(`${c} loads ${r}`,w.some(d=>P(d,r)),h?"\xA73 resolves the panel stylesheet's cascade, and this editor does not load it":"the entry is not among the files");const b=w.filter(d=>e.test(d));n(`${c} imports nothing from Puck's package`,b.length===0,`imports ${b.join(", ")} \u2014 Puck was removed in blueprint 6.3, and \xA73 no longer models its stylesheet`);for(const d of w)d.endsWith(".css")&&!P(d,r)&&t.add(d)}const s=[],m=[];for(const c of t){const w=(c.startsWith("@/")?a.find(b=>b.path===c.slice(2))?.text:void 0)??o.loadedSheets?.[c]??null;if(w===null){m.push(c);continue}for(const b of K(V(w)))for(const d of b.selector.split(","))I(d)&&s.push(`${c}: ${d.trim()}`)}n(`every other stylesheet the editors load was read (${t.size})`,m.length===0,`could not resolve ${m.join(", ")} \u2014 a sheet this rule cannot open is a cascade it cannot rule out`),n("no other stylesheet the editors load has a rule naming the `select` element",s.length===0,`${s.slice(0,4).join(" \xB7 ")}${s.length>4?` (+${s.length-4} more)`:""} \u2014 \xA73 resolves ${r} alone, so this rule is invisible to every answer above`)}const z=Q($.get(S)??"",$);if(k){const e=D.flatMap(t=>W(t.decls)).filter(t=>t.prop===S);n(`${r} declares \`${S}\` exactly once, as an image`,e.length===1&&/^url\(/.test(z),`${e.length} declaration(s), value \`${z.slice(0,60)||"(none)"}\` \u2014 the one arrow needs one definition`)}for(const e of i){const t=f(u,e)["background-image"];n(`${e.name}: the arrow it draws is \`var(${S})\`, glyph for glyph`,z!==""&&t===z,`resolves \`${t.slice(0,60)}\` \u2014 a redrawn arrow is the SS seat's call, made once in \`${S}\`, not in a rule of its own`)}const _=p.flatMap(e=>e.classes.filter(t=>/^(appearance-|bg-(none|\[|gradient|linear|radial|conic))/.test(t)).map(t=>`${e.file}:${e.line} \`${t}\``));return n("no panel select decides its arrow with a utility class",_.length===0,`${_.join(", ")} \u2014 \xA73 reads only ${r}`),n(`the population came from the program, not from a number typed here (${g.length}, at least ${o.populationFloor})`,g.length>=o.populationFloor&&g.length>0,`${g.length} dropdowns found (${p.length} house-drawn, ${T.length} engine-drawn) \u2014 a census that collapses to a handful means the walk stopped reading`),x()}export{Z as censusFiles,oe as editorPackageSheets,I as namesSelectElement,ae as panelOneArrow,Y as panelSheetOf};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as TS from "typescript";
|
|
2
|
+
import { type PanelCascadeOptions } from "./panel-one-arrow.js";
|
|
3
|
+
import { type RuleReport, type SourceFile } from "./rule.js";
|
|
4
|
+
export type PanelOneHoverOptions = PanelCascadeOptions & {
|
|
5
|
+
readonly chrome?: boolean;
|
|
6
|
+
readonly screenSheet?: SourceFile;
|
|
7
|
+
};
|
|
8
|
+
export declare function panelOneHover(ts: typeof TS, files: readonly SourceFile[], options: PanelOneHoverOptions): RuleReport;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{censusFiles as Q,panelSheetOf as X}from"./panel-one-arrow.js";import{ruleChecks as Y}from"./rule.js";import{readRules as I}from"./support/css-rules.js";import{stripComments as K}from"./support/css-source.js";import{applicable as P,census as ee,chainInMarkup as te,compound as q,deriveShapes as oe,readVars as ne,resolve as A,splitCombinators as B,splitDecls as F}from"./support/panel-select-cascade.js";const y=["background-color","background-image","border-color"],se=["background-image","border-color"],j="--sf-hover",C="--sf-select-arrow",m=p=>{const u=/fill='([^']*)'/.exec(p)?.[1];return u?`url(<svg \u2026 fill='${u}'>)`:p.length>46?`${p.slice(0,46)}\u2026`:p};function ie(p,u,r){const{check:s,report:Z}=Y("panel one hover"),{sheet:N,ours:E}=X(u,r.panelSheet),k=N?.path??(typeof r.panelSheet=="string"?r.panelSheet:r.panelSheet.path),{population:f,helperDeclared:G}=ee(p,Q(u),r.selectHelper),J=f.filter(e=>e.engineDrawn),$=f.filter(e=>!e.engineDrawn);u.some(e=>e.path===r.selectHelper.file)&&s(`${r.selectHelper.file} declares the house \`select\` helper`,G,"the census has no helper to resolve against"),s(`the panel draws house-drawn selects (${$.length}, at least ${r.houseDrawnFloor})`,$.length>=r.houseDrawnFloor&&($.length>0||r.houseDrawnFloor===0),`${$.length} found \u2014 with none, this card's rows do not exist`),s(`the population came from the program, not from a number typed here (${f.length}, at least ${r.populationFloor})`,f.length>=r.populationFloor&&f.length>0,`${f.length} dropdowns found (${$.length} house-drawn, ${J.length} engine-drawn) \u2014 a census that collapses to a handful means the walk stopped reading`);const a=r.screenSheet,S=K(a?.text??""),w=K(N?.text??""),R=a?`${S}
|
|
2
|
+
${w}`:w,v=ne(R);s(`${k} was read`,w.length>1e4,`${w.length} bytes`),a&&s(`${a.path} was read`,S.length>1e4,`${S.length} bytes`);const D=I(S),L=I(w),c=oe(f,R),b=(e,t)=>{const n=P(D,e,a?.path??"",0,t),o=P(L,e,k,D.length,t);return{applied:[...n.applied,...o.applied],unreadable:[...n.unreadable,...o.unreadable],undecided:[...n.undecided,...o.undecided]}},T=(e,t)=>Object.fromEntries(t.map(n=>[n,A(e.applied,n,v).value])),x=new Map,g=new Map,H=[],V=[];for(const e of c){const t=b(e,"rest"),n=b(e,"hover");H.push(...t.unreadable,...n.unreadable),V.push(...n.undecided),x.set(e.name,T(t,y)),g.set(e.name,{...T(n,y),"@from":A(n.applied,"background-color",v).from})}const d=(e,t)=>e.get(t.name);s("every rule that can reach a panel select was understood",H.length===0,`could not parse: ${[...new Set(H)].slice(0,4).join(" \xB7 ")} \u2014 a rule this model skips is a rule it lies about`);const U=V.filter(e=>F(e.decls).some(t=>y.includes(t.prop)||t.prop==="background"||t.prop==="border"));s("no rule this model cannot judge decides a hovered value",U.length===0,`${U.map(e=>`@media ${e.media} { ${e.selector} }`).join(" \xB7 ")} \u2014 an unjudged media query holding one of these properties makes every answer above a guess`);const M=c[0];for(const e of y){const t=d(g,M)[e],n=c.filter(o=>d(g,o)[e]!==t);s(`every shape resolves the same hovered \`${e}\``,n.length===0,`${M.name} (${M.rows} row(s)) says \`${m(t)}\`, but `+n.map(o=>`${o.name} (${o.rows} row(s)) says \`${m(d(g,o)[e])}\``).join("; "))}for(const e of c){const t=d(x,e),n=d(g,e);s(`${e.name}: the ground actually changes under the pointer`,t["background-color"]!==n["background-color"],`rest and hover both resolve \`${m(n["background-color"])}\` on ${e.rows} row(s) \u2014 a row that does not answer the pointer is the other half of this card's defect`)}const O=v.get(j);(E||a)&&s(`the ${a?"editor's sheets declare":"panel declares"} \`${j}\``,O!==void 0,`the token the ruling names is not in ${a?`${a.path} or ${k}`:"the panel stylesheet"}`);for(const e of c){const t=d(g,e);s(`${e.name}: the hovered ground is the panel's own \`var(${j})\``,O!==void 0&&t["background-color"]===O,`resolves to \`${m(t["background-color"])}\`, and \`${j}\` is \`${O??"(not declared)"}\` \u2014 option D is the panel's own hover ground, picked by Lewis on 2026-09-02, and a near miss is not it`)}for(const e of c){const t=d(x,e),n=d(g,e);for(const o of se)s(`${e.name}: \`${o}\` is unchanged under the pointer`,t[o]===n[o],`rest \`${m(t[o])}\` -> hover \`${m(n[o])}\` on ${e.rows} row(s) \u2014 Lewis chose D (ground only) over B (border jump) and C (darker glyph) from pictures; moving this is re-deciding it`)}if(E){const e=l=>l.replace(/\s+/g," ").replace(/^url\(([\s\S]*)\)$/,"$1").replace(/^["']|["']$/g,"").trim(),t=v.get(C),n=e(t??"");s(`the panel declares \`${C}\` as an image`,t!==void 0&&/^url\(/.test(t.trim())&&n!=="",`\`${C}\` is \`${m(t??"(not declared)")}\` \u2014 the one arrow needs one definition`);const o=n===""?-1:R.split(n).length-1;s(`the arrow glyph is written ONCE in ${k}${a?` and ${a.path}`:""}`,o===1,`found ${o} \u2014 pasting the arrow into a second rule is exactly what card 66399 removed. Read \`var(${C})\` instead`);const i=[...D,...L].filter(l=>/select/.test(l.selector)&&F(l.decls).some(_=>/url\(\s*["']?data:/.test(_.value)));s("no select rule holds the arrow inline; every one reads the token",i.length===0,`${i.map(l=>l.selector.trim()).join(" \xB7 ")} still writes a data URI`)}const W=b(c[0],"hover").applied.filter(e=>/:hover/.test(e.selector)),h=W[0];if(E){s("the panel declares a select hover rule at all",W.length>0,"no `\u2026select:hover` rule in the panel stylesheet reaches a house row \u2014 they do nothing under the pointer, which is this card's defect");const e=h?F(h.decls):[],t=h?B(h.selector).slice(0,-1).flatMap(o=>q(o)?.classes??[]):[];s("the hover rule uses no `!important`",h!==void 0&&!/!\s*important/i.test(h.decls),"an `!important` here beats every other state the panel paints, including ones this card was never given");const n=e.map(o=>o.prop).filter(o=>!y.includes(o));s("the hover rule declares only the three properties the ruling names",h!==void 0&&n.length===0,`also declares ${n.join(", ")} \u2014 the ruling is a ground colour, plus the arrow and border restated at rest. Anything else is a state this card was not given`),s("the hover rule is confined to the inspector body",t.includes("sf-insp-body"),`its ancestor chain is \`${t.join(" ")}\` \u2014 without \`.sf-insp-body\` it reaches every select in the editor, not the panel's`)}for(const e of c){const t=A(b(e,"rest").applied,"background-color",v).from;s(`${e.name}: the resting ground is NOT decided by the hover rule`,h===void 0||!t.includes(h.selector),`rest resolves from \`${t}\` \u2014 the pointer state has leaked into the row at rest`)}if(r.chrome){const e=new Set;for(const o of c)for(const i of["rest","hover"])for(const l of b(o,i).applied)for(const _ of B(l.selector).slice(0,-1))for(const z of q(_)?.classes??[])z.startsWith("@")||e.add(z);s(`the rules that resolved lean on wrapper classes (${[...e].map(o=>`.${o}`).join(" ")||"none"})`,e.size>0);const t=te(p,u,[...e]),n=new Set(D.flatMap(o=>[...o.selector.matchAll(/\.(-?[_a-zA-Z][\w-]*)/g)].map(i=>i[1])));for(const o of e){const i=(t.get(o)??[]).length>0,l=!i&&n.has(o);s(`\`.${o}\` is still written above a panel select in the editor's markup${l?` \u2014 the screen's (${a?.path} styles it)`:""}`,i||l,`no component writes \`${o}\` as a className any more${a?`, and ${a.path} styles no \`.${o}\` either`:""} \u2014 the rules leaning on it still parse, still look right, and match none of the ${$.length} house-drawn rows`)}}return Z()}export{ie as panelOneHover};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type RuleReport, type SourceFile } from "./rule.js";
|
|
2
|
+
export declare const CONTROLS_FILE = "lib/puck/controls.tsx";
|
|
3
|
+
export type PanelRowException = {
|
|
4
|
+
readonly file: string;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
readonly why: string;
|
|
7
|
+
};
|
|
8
|
+
export type PanelRowsOptions = {
|
|
9
|
+
readonly writesBuilders: boolean;
|
|
10
|
+
readonly floors: {
|
|
11
|
+
readonly toggle: number;
|
|
12
|
+
readonly textList: number;
|
|
13
|
+
readonly segmented: number;
|
|
14
|
+
readonly select: number;
|
|
15
|
+
readonly slider: number;
|
|
16
|
+
readonly handDrawn: number;
|
|
17
|
+
};
|
|
18
|
+
readonly exceptions?: readonly PanelRowException[];
|
|
19
|
+
readonly rulings: number;
|
|
20
|
+
};
|
|
21
|
+
export declare function secondArg(src: string, from: number): string;
|
|
22
|
+
export declare function callParen(line: string, builder: string): number;
|
|
23
|
+
export declare function panelRowsUseTheSharedRow(files: readonly SourceFile[], options: PanelRowsOptions): RuleReport;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{ruleChecks as v}from"./rule.js";import{isRegistryPath as F,registryFiles as D}from"./support/registry-source.js";const L="lib/puck/controls.tsx",I={},S={},E=["boxShareField","edgePad","placementField","CoordsField","textList","segmented","select","slider"],P=/sf-field-label|<Label>/,N=/<[A-Z][A-Za-z0-9]*Icon\s*\/>/,B=s=>s.startsWith("//")||s.startsWith("*")||s.startsWith("/*");function A(s,o){const e=s.indexOf("(",o);if(e===-1)return"";let g=0;const a=[];let f=e+1;for(let d=e;d<s.length;d+=1){const r=s[d];if(r==="("||r==="["||r==="{")g+=1;else if(r===")"||r==="]"||r==="}"){if(g-=1,g===0){a.push(s.slice(f,d));break}}else if(r===","&&g===1&&(a.push(s.slice(f,d)),f=d+1,a.length===2))break}return a[1]??""}function W(s,o){const e=new RegExp(`(?:^|[^.\\w])${o}\\s*(?:<[^()]*?>)?\\s*\\(|\\bcontrols\\.${o}\\s*(?:<[^()]*?>)?\\s*\\(`).exec(s);return e?s.indexOf("(",e.index):s.indexOf("(")}function _(s,o){const e=s.slice(0,o);return e.includes("//")?!1:(e.match(/"/g)??[]).length%2===0&&(e.match(/`/g)??[]).length%2===0&&(e.match(/'/g)??[]).length%2===0}const T=(s,o)=>new RegExp(`import \\{[^}]*\\b${o}\\b[^}]*\\} from "@/lib/puck/controls"`).test(s)||/import \* as controls from "@\/lib\/puck\/controls"/.test(s);function G(s,o,e){const g=new RegExp(`(^|[^.\\w])${o}\\s*(<[^()]*?>)?\\s*\\(|\\bcontrols\\.${o}\\s*(<[^()]*?>)?\\s*\\(`,"g"),a=new RegExp(`^(export )?function ${o}(<[^>]*>)?\\(`),f=[];let d=0;for(const r of s){const p=r.text.split(`
|
|
2
|
+
`),x=p.join(`
|
|
3
|
+
`);p.forEach((b,h)=>{const m=b.trim();if(B(m)||a.test(m))return;g.lastIndex=0;const $=g.exec(b);if(!$||!_(b,$.index))return;d+=1;const t=A(x,p.slice(0,h).join(`
|
|
4
|
+
`).length+W(b,o));N.test(t)||/<FieldGlyph\b/.test(t)||e.some(n=>n.test(t))||f.push(`${r.path}:${h+1} ${m.slice(0,80)}`)})}return{bare:f,total:d}}function U(s){const o={};for(const e of s){const g=e.text.split(`
|
|
5
|
+
`);g.forEach((a,f)=>{if(!/className="sf-field"/.test(a))return;const d=g.slice(f,f+9).join(`
|
|
6
|
+
`);if(!P.test(d))return;const r=d.match(/sf-field-label[^>]*>([^<{][^<]*)</),p=d.match(/sf-field-label[^>]*>\{([^}]*)\}/),x=d.match(/<Label>([^<{][^<]*)</),b=d.match(/<Label>\{([^}]*)\}/),h=$=>$.trim()==="label"?"{label}":"{...}",m=r?r[1].trim():p?h(p[1]):x?x[1].trim():b?h(b[1]):"{...}";(o[e.path]??=[]).push(m)})}return o}function M(s){const o=[];let e=0;for(const g of s){const a=g.text.split(`
|
|
7
|
+
`);a.forEach((f,d)=>{if(!/<SettingsField\b/.test(f))return;const r=[];let p=!1;for(let b=d;b<Math.min(d+40,a.length)&&!p;b+=1){let h=a[b];if(h=h.replace(/\/\*[\s\S]*?\*\//g," "),/\/\*/.test(h)&&(h=h.slice(0,h.indexOf("/*"))),/^\s*\*/.test(a[b]))continue;const m=h.indexOf("//");m!==-1&&(h=h.slice(0,m)),r.push(h),h.includes(">")&&(p=!0)}const x=r.join(`
|
|
8
|
+
`);/\blabel=/.test(x)&&(e+=1,!/\bicon=/.test(x)&&o.push(`${g.path}:${d+1} ${f.trim().slice(0,80)}`))})}return{seen:e,bare:o}}function K(s,o){const{check:e,report:g}=v("panel rows use the shared row"),a=o.exceptions??[],{floors:f}=o;{const t={path:"fixture.tsx",text:['import { slider, textList } from "@/lib/puck/controls";','const a = { textList: () => controls.textList("Items", <ListIcon />, x) };','const b = slider("Thickness", 0, 10);','const c = slider("Gap", <GapIcon />, 0, 10);','// slider("In a comment", 0, 10) is not a row'].join(`
|
|
9
|
+
`)},n=G([t],"textList",[]),c=G([t],"slider",[]);e("the reader reads a namespaced call's own arguments, not the arrow's",n.total===1&&n.bare.length===0,JSON.stringify(n)),e("the reader flags a bare row whose neighbour has a glyph, and skips a comment",c.total===2&&c.bare.length===1&&c.bare[0].startsWith("fixture.tsx:3"),JSON.stringify(c))}const r=new Map(s.map(t=>[t.path,t])).get(L);e(o.writesBuilders?`read ${L}, where the builders are declared`:`${L} is not among this repository's files (it calls the builders, it does not declare them)`,!!r===o.writesBuilders);const p=D(s);e(`read this repository's share of the block registry (${p.length} files)`,p.length>0);const x=s.filter(t=>/^components\/[^/]+\.tsx$/.test(t.path)),b=s.filter(t=>/^scripts\/[^/]+\.tsx$/.test(t.path)),h=[...p,...r?[r]:[],...x],m=t=>t.path===L;{const t=h.filter(l=>m(l)||/import \{[^}]*\btoggle\b[^}]*\} from "@\/lib\/puck\/controls"/.test(l.text)),n=t.filter(l=>m(l)||F(l.path));e("only the known files use the toggle builder",t.length===n.length&&(!o.writesBuilders||n.some(m))&&n.some(l=>F(l.path)),t.map(l=>l.path).join(" \xB7 "));const c=[];let u=0;for(const l of n)l.text.split(`
|
|
10
|
+
`).forEach((w,i)=>{const y=w.trim();B(y)||/classList\.toggle/.test(w)||/^export function toggle\(/.test(y)||/(^|[^.\w])toggle\(/.test(w)&&(u+=1,!(N.test(w)||/<FieldGlyph\b/.test(w))&&c.push(`${l.path}:${i+1} ${y.slice(0,80)}`))});e("every toggle() row carries a glyph",c.length===0,`
|
|
11
|
+
${c.join(`
|
|
12
|
+
`)}`),e(`\u2026and there are rows to check (${u} toggle() call sites, at least ${f.toggle})`,u>=f.toggle,"the scan is reading nothing")}const $=[{builder:"textList",inControls:!1,accept:[/TICKER_ITEMS_ROW\.icon/],name:"every textList() row carries a glyph"},{builder:"segmented",inControls:!0,accept:[/\bnoGlyph\(/],name:"every segmented() row carries a glyph (or a ruled noGlyph)"},{builder:"select",inControls:!0,accept:[/\btextKindGlyph\(/,/\bnoGlyph\(/],name:"every select() row carries a glyph (or a ruled noGlyph)"},{builder:"slider",inControls:!0,accept:[/\bnoGlyph\(/],name:"every slider() row carries a glyph"}];for(const t of $){const n=[...p,...t.inControls&&r?[r]:[],...b].filter(l=>t.inControls&&m(l)||F(l.path)||T(l.text,t.builder)),{bare:c,total:u}=G(n,t.builder,t.accept);e(t.name,c.length===0,`
|
|
13
|
+
${c.join(`
|
|
14
|
+
`)}`),e(`\u2026and the ${t.builder} scan actually read rows (${u} call sites in ${n.length} files, at least ${f[t.builder]})`,u>=f[t.builder])}{const t=U(h);for(const i of a)e(`the exception still names a real row \u2014 ${i.label}`,(t[i.file]??[]).includes(i.label),`${i.file} no longer draws it`);const n={};for(const[i,y]of Object.entries(t)){const k=y.filter(O=>!a.some(j=>j.file===i&&j.label===O));k.length&&(n[i]=k)}const c=i=>i.slice().sort(),u=[];for(const[i,y]of Object.entries(n)){const k=I[i];if(!k){u.push(`${i} \u2014 hand-rolls ${y.length} row(s) and is not in PENDING`);continue}const O=c(y),j=c(k);(O.length!==j.length||O.some((C,R)=>C!==j[R]))&&u.push(`${i} \u2014 found [${O.join(" \xB7 ")}] but PENDING says [${j.join(" \xB7 ")}]`)}e("no NEW hand-rolled settings row",u.length===0,`
|
|
15
|
+
${u.join(`
|
|
16
|
+
`)}`);const l=Object.keys(I).filter(i=>!n[i]);e("no PENDING entry has outlived its subject",l.length===0,l.join(" \xB7 "));const w=Object.values(n).reduce((i,y)=>i+y.length,0);e("the hand-rolled rows are GONE \u2014 the count is zero",w===0,`${w}`),e("\u2026and no file is left hand-rolling one",Object.keys(I).length===0,Object.keys(I).join(" \xB7 ")),e(`\u2026and the rulings are exactly ${o.rulings} (a new one is argued in review, not added)`,a.length===o.rulings&&a.every(i=>i.why.trim().length>40),`${a.length}`),e("\u2026and BlogSource is not among them, because its row is gone",!a.some(i=>i.file.endsWith("BlogSource.tsx")))}{const t=Object.values(S).reduce((n,c)=>n+c,0);if(e("every builder is finished \u2014 nothing left to count",t===0,`${t}`),e("\u2026and the emptiness is because FOUR builders are done, not because the list was cleared",E.length===8&&["textList","segmented","select","slider"].every(n=>E.includes(n)),E.join(" \xB7 ")),e("\u2026and a finished builder has left the list",E.every(n=>!(n in S)),E.join(" \xB7 ")),r){const n=Object.keys(S).filter(c=>!new RegExp(`(export )?function ${c}\\(`).test(r.text));e(`\u2026and every builder it names is really declared in ${L}`,n.length===0,n.join(" \xB7 "))}}if(r){const t=r.text,n=t.indexOf("export function backgroundField("),c=n===-1?"":t.slice(n),u=c.slice(0,c.indexOf(`
|
|
17
|
+
}
|
|
18
|
+
`));e("backgroundField is declared",n!==-1),e("backgroundField renders SettingsField",/<SettingsField/.test(u)),e("\u2026and hand-rolls no row of its own",u.length>0&&!/className="sf-field"/.test(u)),e("\u2026and passes `BackgroundIcon`, not merely some glyph",/icon=\{<BackgroundIcon \/>\}/.test(u));const l=t.indexOf("export function cardImageBackgroundField("),w=l===-1?"":t.slice(l);e("\u2026and cardImageBackgroundField still passes `GroundIcon`",/icon=\{<GroundIcon \/>\}/.test(w.slice(0,w.indexOf(`
|
|
19
|
+
}
|
|
20
|
+
`))))}{const{seen:t,bare:n}=M(x);e(`the hand-rolled row scan read something (${t} hand-drawn SettingsField rows across ${x.length} files, at least ${f.handDrawn})`,t>=f.handDrawn),e("no hand-rolled SettingsField row goes without a glyph",n.length===0,`
|
|
21
|
+
${n.join(`
|
|
22
|
+
`)}`)}return g()}export{L as CONTROLS_FILE,W as callParen,K as panelRowsUseTheSharedRow,A as secondArg};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type RuleReport, type SourceFile } from "./rule.js";
|
|
2
|
+
export type PartSliderFillsRowOptions = {
|
|
3
|
+
readonly partPanel?: string;
|
|
4
|
+
readonly sheet?: string;
|
|
5
|
+
readonly shellSheet?: SourceFile;
|
|
6
|
+
readonly hosts: readonly string[];
|
|
7
|
+
readonly renderedHosts?: Readonly<Record<string, string>>;
|
|
8
|
+
readonly minFiles: number;
|
|
9
|
+
};
|
|
10
|
+
export declare function reachesSlider(selector: string): boolean;
|
|
11
|
+
export declare function partSliderFillsRow(files: readonly SourceFile[], options: PartSliderFillsRowOptions): RuleReport;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import{DEFAULT_PANEL_W as k,MAX_PANEL_W as N,MIN_PANEL_W as y}from"../../components/panel-widths.js";import{isRuleSource as A,ruleChecks as F}from"./rule.js";import{parseRules as w}from"./support/css-box-model.js";import{readSliderCallSites as E,sliderFields as v}from"./support/part-slider-call-sites.js";const m=[["sf-editor","es-editor"],["sf-panel","sf-panel--right"],["sf-insp-body","sf-scroll"],["sf-part-panel"],["es-group"],["es-group-body"],["es-field","sf-part-field"],["es-field-ctl"]],_=["sf-slider","has-notch"],S=129;function $(r){const e=r.trim();if(!e.startsWith("."))return null;const s=e.split(".").filter(Boolean);return s.every(o=>/^[a-zA-Z0-9_-]+$/.test(o))?s:null}function c(r){if(/[+~:]/.test(r))return!1;const e=r.trim().split(/\s*(>)\s*|\s+/).filter(Boolean);if(!e.length)return!1;const s=$(e[e.length-1]);if(!s||!s.every(a=>_.includes(a)))return!1;let o=e.length-2,d=m.length-1,i=!1;for(;o>=0;){const a=e[o];if(a===">"){i=!0,o-=1;continue}const f=$(a);if(!f)return!1;let t=-1;for(let n=d;n>=0;n-=1){if(f.every(l=>m[n].includes(l))){t=n;break}if(i)break}if(t===-1)return!1;d=t-1,i=!1,o-=1}return!0}function W(r){const e=r.trim();if(e==="none")return 0;if(e==="auto"||e==="initial")return e==="auto"?1:0;const s=Number.parseFloat(e);return Number.isFinite(s)?s:0}function P(r){const e={grow:0,width:"auto",from:[]};for(const s of r)for(const o of w(s.css)){if(!o.selector.split(",").some(i=>c(i)))continue;let d=!1;for(const[i,a]of o.declarations)i==="flex"?(e.grow=W(a),d=!0):i==="flex-grow"?(e.grow=Number.parseFloat(a)||0,d=!0):i==="width"&&(e.width=a.trim(),d=!0);d&&e.from.push(`${s.name} ${o.selector}`)}return e}function x(r,e){return r.grow>=1||/^100%$/.test(r.width)?e:S}function j(r){return r.filter(e=>{const s=e.text.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/[^\n]*/g,"");return/SettingsField/.test(s)&&/<Slider[\s/>]/.test(s)}).map(e=>e.path).sort()}function I(r,e){const{check:s,report:o}=F("part slider fills row"),d=new Map(r.map(t=>[t.path,t]));if(s("the walk reaches the slot's own slider, and not the notch, a hover or another panel's row",c(".es-field-ctl > .sf-slider")&&c(".sf-insp-body .sf-slider")&&!c(".sf-slider.has-notch::before")&&!c(".es-field-ctl > .sf-slider:hover")&&!c(".sf-field .sf-slider")&&!c(".es-field-ctl > div > .sf-slider")),e.partPanel!==void 0){const t=d.get(e.partPanel);let n=null,l="";try{n=t?E(t.text):null}catch(u){l=u instanceof Error?u.message:String(u)}s(`read the part panel ${e.partPanel}`,!!t&&n!==null,l||"the file is not among those handed in"),s("\xA71 the part panel draws no slider since plan S2",n!==null&&n.length===0,`${e.partPanel} draws ${n?.length??"?"} slider(s) again \u2014 fields ${v(n??[]).join(", ")}. Since plan S2 its numbers are the text box's cells; if a slider is meant to come back, it comes back into the hosts and this section moves with it.`)}if(e.shellSheet!==void 0){const t=w(e.shellSheet.text).filter(n=>n.selector.trim()===".es-field-ctl");s(`\xA72 ${e.shellSheet.path} declares the control slot \`.es-field-ctl\``,t.length>0,"that is the slot `SettingsField` stacks a control into, and this rule is about how an item sizes inside it"),s("\xA72 the shell's control slot is still a flex row",t.length>0&&t[t.length-1].declarations.get("display")==="flex","`.es-field-ctl` is no longer `display: flex` in the installed shell. How a flex ITEM sizes is then not the question, and this rule would be answering the old one. Re-read the shell before trusting a verdict from here.")}if(e.sheet!==void 0){const t=d.get(e.sheet);s(`read the stylesheet ${e.sheet}`,!!t),s("\xA73 the installed shell stylesheet was handed in beside it",e.shellSheet!==void 0);const n=[...t?[{name:t.path,css:t.text}]:[],...e.shellSheet?[{name:e.shellSheet.path,css:e.shellSheet.text}]:[]],l=P(n),u=[{panel:y,content:192,what:"MIN_PANEL_W"},{panel:k.right,content:280,what:"the default"},{panel:N,content:520,what:"MAX_PANEL_W"}],b=u.map(h=>{const p=x(l,h.content),g=h.content-p;return` panel ${String(h.panel).padStart(3)} (${h.what.padEnd(11)}) field content ${String(h.content).padStart(3)} track ${String(p).padStart(3)} `+(g>0?`SHORT BY ${g} \u2014 ${Math.round(p/h.content*100)}% of the row`:"fills")}).join(`
|
|
2
|
+
`);for(const h of u)s(`\xA73 the stacked slider fills its row at ${h.what} (field content ${h.content}px)`,!!t&&x(l,h.content)===h.content,`the shell's stacked sliders do not fill their row.
|
|
3
|
+
|
|
4
|
+
${e.hosts.length} host(s) \u2014 ${e.hosts.join(", ")} \u2014 draw the shared \`Slider\` inside
|
|
5
|
+
\`SettingsField\`, whose control slot \`.es-field-ctl\` is \`display: flex\`. Nothing in ${e.sheet} makes \`.sf-slider\` take
|
|
6
|
+
that row, so it is \`flex: 0 1 auto\` and collapses to the UA's own ${S}px range input \u2014 the
|
|
7
|
+
same width whatever the panel is dragged to:
|
|
8
|
+
|
|
9
|
+
${b}
|
|
10
|
+
|
|
11
|
+
Resolved on \`.sf-slider\` in that slot: flex-grow ${l.grow}, width ${l.width}`+(l.from.length?`
|
|
12
|
+
from: ${l.from.join(`
|
|
13
|
+
`)}`:`
|
|
14
|
+
from: (no rule reaches it)`)+`
|
|
15
|
+
|
|
16
|
+
The shell asks for this in its own words (src/panel/SettingsField.tsx):
|
|
17
|
+
"The row is stacked rather than side-by-side so the control gets the panel's full
|
|
18
|
+
width \u2014 a 308px panel cannot afford a label column AND a usable slider."`)}const i=r.filter(t=>/\.tsx?$/.test(t.path)&&!A(t.path)&&(t.path.startsWith("components/")||t.path.startsWith("lib/")));s(`read the source (${i.length} .ts/.tsx files under components/ and lib/, at least ${e.minFiles})`,i.length>=e.minFiles);const a=j(i),f=[...e.hosts].sort();s(`\xA74 the files that draw a \`Slider\` inside a \`SettingsField\` are the ${f.length} known host(s)`,a.join(`
|
|
19
|
+
`)===f.join(`
|
|
20
|
+
`),`the set has changed.
|
|
21
|
+
|
|
22
|
+
known: ${f.join(", ")||"(none)"}
|
|
23
|
+
found: ${a.join(", ")||"(none)"}
|
|
24
|
+
|
|
25
|
+
A NEW one is a row \`.es-field-ctl > .sf-slider\` now fills and nothing here watches \u2014 add it to the hosts
|
|
26
|
+
(and render it for the direct-child check). One REMOVED is a guard pointing at nothing.`);for(const[t,n]of Object.entries(e.renderedHosts??{})){const l=/class="es-field-ctl"><([a-z]+) class="([^"]*)"/.exec(n);s(`\xA74 ${t}: the rendered row has a \`.es-field-ctl\` slot with an element child`,l!==null,"has it stopped going through `SettingsField`?"),l&&s(`\xA74 ${t}: the slot's first child is the \`.sf-slider\` itself`,l[2].split(/\s+/).includes("sf-slider"),`the control slot's first child is <${l[1]} class="${l[2]}">. Something wraps the slider, so
|
|
27
|
+
\`.es-field-ctl > .sf-slider\` no longer reaches it and that row is back to the UA's 129px \u2014 the wrapper is the
|
|
28
|
+
flex item now. Widening the selector to a descendant would NOT fix it; it would paint \`flex: 1\` on an element
|
|
29
|
+
whose parent is the wrapper and leave the measurement unchanged. Card 66247.`)}return o()}export{I as partSliderFillsRow,c as reachesSlider};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type RuleReport, type SourceFile } from "./rule.js";
|
|
2
|
+
export type PartStyleNamingOptions = {
|
|
3
|
+
readonly roleSheet?: string;
|
|
4
|
+
readonly panel?: string;
|
|
5
|
+
readonly bridge?: string;
|
|
6
|
+
readonly minSites: number;
|
|
7
|
+
readonly minWithScale: number;
|
|
8
|
+
readonly minWithoutScale: number;
|
|
9
|
+
};
|
|
10
|
+
export declare function partStyleNaming(files: readonly SourceFile[], options: PartStyleNamingOptions): RuleReport;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{fontRoleOfClassName as y,FONT_ROLE_LABELS as x}from"../fonts.js";import{isRuleSource as w,ruleChecks as E}from"./rule.js";import{enclosingLiteral as N}from"./heading-ceiling-sweep.js";import{stripComments as b}from"./support/ts-source.js";import{typeScaleGroupOfClassName as u}from"../theme.js";const R=["app/","components/","lib/"],p={"font-display":"heading","font-heading2":"heading2","font-heading3":"heading3","font-body":"body","font-serif":"accent","font-mono":"label"},k={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 L(m){const n=[],t=new Set;for(const d of m){const c=b(d.text),l=/\bfont-(?:display|body|serif|mono)\b/g;let r;for(;r=l.exec(c);){const i=N(c,r.index);if(!i)continue;const o=c.slice(0,r.index).split(`
|
|
2
|
+
`).length,h=`${d.path}:${o}:${i}`;if(t.has(h))continue;t.add(h);const g=i.split(/\s+/).filter(a=>!a.slice(0,a.lastIndexOf(":")+1).includes("&")).map(a=>a.slice(a.lastIndexOf(":")+1)),f=Object.keys(p).filter(a=>g.includes(a));f.length!==0&&n.push({file:d.path,line:o,className:i,utilities:f})}}return n}function I(m,n){const{check:t,report:d}=E("part style naming"),c=m.filter(e=>/\.tsx?$/.test(e.path)&&!w(e.path)&&R.some(s=>e.path.startsWith(s))),l=L(c),r=new Map(m.map(e=>[e.path,e]));t(`read the source (${c.length} .ts/.tsx files)`,c.length>0,"found no source to sweep \u2014 this rule is not measuring anything"),t(`the scanner finds face-tagged class lists at all (${l.length}, at least ${n.minSites})`,l.length>=n.minSites);const i=l.filter(e=>u(e.className)!==null),o=l.filter(e=>u(e.className)===null);t(`\u2026both taggings are represented, so neither branch below is untested (${i.length} with a scale token, at least ${n.minWithScale})`,i.length>=n.minWithScale&&i.length>0),t(`\u2026and the face-without-a-size-knob population is real, not an artefact (${o.length}, at least ${n.minWithoutScale})`,o.length>=n.minWithoutScale&&o.length>0,`${o.length} class lists carry a face utility and no matching scale token`);const h=l.filter(e=>y(e.className)!==p[e.utilities[0]]);if(t("every class list in the census reads back as its own utility's role",h.length===0,h.slice(0,5).map(e=>`${e.file}:${e.line} has ${e.utilities[0]} but reads ${y(e.className)}`).join("; ")),n.roleSheet!==void 0){const e=r.get(n.roleSheet),s=Object.values(k).filter(O=>!e||!e.text.includes(O));t(`\u2026and every role named here is a custom property ${n.roleSheet} defines`,!!e&&s.length===0,e?s.join(", "):"the sheet was not read")}const g=Object.values(p).filter(e=>!(e in x));t("every face utility names a role the panel offers",g.length===0,g.join(", "));const f=Object.keys(x).filter(e=>!Object.values(p).includes(e));t("\u2026and the roles no utility can name are exactly the ones decided to have none",f.join()===$.join(),`no utility reaches: [${f}] \u2014 expected [${$}]`);const a=o.filter(e=>u(e.className)!==null);t("no class list without a scale token claims a size group",a.length===0,a.slice(0,5).map(e=>`${e.file}:${e.line}`).join("; ")),t("the reported case: a `font-display text-[22px]` heading is Headings, size group none",y("font-display text-[22px] font-medium")==="heading"&&u("font-display text-[22px] font-medium")===null),t("\u2026and genuinely body-tagged copy still reads as the body size group",u("text-[var(--size-body,16px)]")==="body");const S=l.filter(e=>e.utilities.length>1);if(t("every class list names at most one face",S.length===0,S.slice(0,5).map(e=>`${e.file}:${e.line} \u2014 ${e.utilities.join(" + ")}`).join("; ")),n.panel!==void 0){const e=r.get(n.panel),s=e?b(e.text):"";t(`read the part panel ${n.panel}`,!!e),t("the box's name comes from the FACE, not from a size group",s.includes("FONT_ROLE_LABELS[face.role]")&&!s.includes("TYPE_GROUP_LABELS[")),t("\u2026a face the page does not draw as its declared role is called Custom",/return\s*"Custom"/.test(s)&&s.includes('kind: "custom"')),t("\u2026and a part no size knob reaches says so under the text box",/sizeGroup === null && \(\s*<p className="es-field-hint sf-hint-keep">Fixed size/.test(s))}if(n.bridge!==void 0){const e=r.get(n.bridge),s=e?b(e.text):"";t(`read the preview's part bridge ${n.bridge}`,!!e),t("the preview publishes BOTH tags, each walked up to its own nearest declarer",s.includes("fontRoleOfClassName")&&s.includes("typeScaleGroupOfClassName")&&s.includes("el.parentElement")),t("\u2026and the element it reads from is one that declares EITHER tag",/partStyleSource\([\s\S]{0,200}fontRoleOfClassName[\s\S]{0,120}typeScaleGroupOfClassName/.test(s))}return d()}export{I as partStyleNaming};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type RuleReport, type SourceFile } from "./rule.js";
|
|
2
|
+
export type PuckDocumentMount = {
|
|
3
|
+
readonly migratedBy: string | null;
|
|
4
|
+
readonly why: string;
|
|
5
|
+
};
|
|
6
|
+
export type PuckDocumentSurfacesOptions = {
|
|
7
|
+
readonly mounts: Readonly<Record<string, PuckDocumentMount>>;
|
|
8
|
+
readonly migrator?: string;
|
|
9
|
+
readonly handedMigrator?: {
|
|
10
|
+
readonly rules: string;
|
|
11
|
+
readonly entry: string;
|
|
12
|
+
};
|
|
13
|
+
readonly storedFloor: number;
|
|
14
|
+
readonly minFiles: number;
|
|
15
|
+
};
|
|
16
|
+
export declare function puckDocumentSurfaces(files: readonly SourceFile[], options: PuckDocumentSurfacesOptions): RuleReport;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{ruleChecks as P}from"./rule.js";const o=/<(Render|Puck|SiteEditorProvider|EditorStoreProvider|ScreenStoreProvider)\b[^<>]*\bdata=\{/,m=/migrateRenamedProps\s*\(/,g=/export function migrateRenamedProps\b/;function S(l,r){const{check:t,report:p}=P("puck document surfaces"),a=e=>l.find(s=>s.path===e)?.text;{const e=n=>`<${n}`;t("a mount is found",o.test(`${e("Render")} config={c} data={doc} />`)),t("\u2026across lines",o.test(`${e("SiteEditorProvider")}
|
|
2
|
+
config={c}
|
|
3
|
+
data={initial}
|
|
4
|
+
>`)),t("\u2026and the screen's store provider is one under either of its names",["Editor","Screen"].every(n=>o.test(`${e(`${n}StoreProvider`)} config={c} data={doc}>`))),t("\u2026and a tag named in prose is not one",!o.test(`the ${e("Puck")}> mounts, then its data={x} is read`)),t("\u2026nor the composition API",!o.test(`${e("Puck.Preview")} />`));const s="migrateRenamedProps";t("a call is found",m.test(`const d = ${s}(stored);`)),t("\u2026and a mention is not one",!m.test(`// runs ${s} first`)),t("the declaration is found, generic as it is",g.test(`export function ${s}<T>(data: T): T {`))}const d=l.filter(e=>/\.tsx?$/.test(e.path));t(`the source scan reached the app (${d.length} TS/TSX files, at least ${r.minFiles})`,d.length>=r.minFiles);const c=d.filter(e=>o.test(e.text)).map(e=>e.path).sort(),$=Object.keys(r.mounts).sort(),u=c.filter(e=>!(e in r.mounts)),f=$.filter(e=>!c.includes(e));t(`every mount is declared (${c.length} found) \u2014 a NEW one must say whether its document comes from stored props (migrate it) or is a mock (say so)`,u.length===0,u.map(e=>`UNDECLARED: ${e}`).join(`
|
|
5
|
+
`)),t("every declared mount is a real mount \u2014 a stale row would shelter a surface that later stops migrating",f.length===0,f.map(e=>`NOT FOUND: ${e}`).join(`
|
|
6
|
+
`));const i=Object.entries(r.mounts).filter(([,e])=>e.migratedBy!==null),h=i.filter(([,e])=>!m.test(a(e.migratedBy)??""));if(t(`SURFACES=${i.length} \u2014 every mount fed from STORED props runs migrateRenamedProps, so a renamed prop key cannot silently reset a live section`,h.length===0,h.map(([e,s])=>`${e}
|
|
7
|
+
\u2192 ${s.migratedBy} never calls migrateRenamedProps(`).join(`
|
|
8
|
+
`)),r.handedMigrator){const{rules:e,entry:s}=r.handedMigrator,n=a(e)??"";t(`${e} carries the REAL migrateRenamedProps, not a stand-in`,/import \{ migrateRenamedProps \} from "@\/lib\/puck\/renamed-props";/.test(n)&&/^\s*migrateRenamedProps,$/m.test(n)),t(`\u2026${s} passes those rules to the screen's mount`,/<(?:EditorScreenMount|ScreenMount)\b[^>]*addressing=\{WEBSITE_ADDRESSING\}/.test(a(s)??""))}return t(`at least ${r.storedFloor} mount(s) fed from stored props (found ${i.length})`,i.length>=r.storedFloor,"if this drops, a surface was reclassified as a mock rather than fixed"),r.migrator&&t(`${r.migrator} still exports migrateRenamedProps \u2014 the function \xA72 hunts calls of is live`,g.test(a(r.migrator)??"")),p()}export{S as puckDocumentSurfaces};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type RuleReport, type SourceFile } from "./rule.js";
|
|
2
|
+
export type ReducedMotionOptions = {
|
|
3
|
+
readonly globalSheet?: string;
|
|
4
|
+
readonly stylesheets?: readonly string[];
|
|
5
|
+
readonly editorOnly?: Readonly<Record<string, string>>;
|
|
6
|
+
readonly askingSites?: Readonly<Record<string, number>>;
|
|
7
|
+
readonly hook?: string;
|
|
8
|
+
readonly minScripts: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const MOVING_PROPERTIES: string[];
|
|
11
|
+
export declare const REQUIRED_FADES: string[];
|
|
12
|
+
export declare const HARD_CODED_SMOOTH: RegExp;
|
|
13
|
+
export interface ReduceBlock {
|
|
14
|
+
body: string;
|
|
15
|
+
selector: string;
|
|
16
|
+
decls: string;
|
|
17
|
+
unlayered: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function readReduceBlock(css: string): ReduceBlock | null;
|
|
20
|
+
export declare function valueOf(decls: string, property: string): string | null;
|
|
21
|
+
export declare function hardCodedSmoothScrolls(file: SourceFile): {
|
|
22
|
+
file: string;
|
|
23
|
+
line: number;
|
|
24
|
+
text: string;
|
|
25
|
+
}[];
|
|
26
|
+
export declare function reducedMotion(files: readonly SourceFile[], options: ReducedMotionOptions): RuleReport;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{isRuleSource as C,ruleChecks as I}from"./rule.js";import{stripCommentsAndStrings as O}from"./support/css-source.js";import{stripComments as S}from"./support/ts-source.js";const R=["all","transform","translate","rotate","scale","top","right","bottom","left","inset","margin","padding","width","height","max-height","max-width","min-height","min-width","gap","flex","flex-basis","grid-template-columns","grid-template-rows","background-position","object-position","offset-distance"],D=["opacity","color","background-color","border-color"],x=/\bbehaviou?r\s*:\s*["'`]smooth["'`]/,N=/\b(transition|animation)[a-z-]*\s*:[^;]*!important/i;function $(n){const o=n.search(/@media[^{]*prefers-reduced-motion\s*:\s*reduce/);if(o<0)return null;let e=0;const d=[];let r="";for(let c=0;c<o;c++){const t=n[c];if(t==="{"){const i=/^@layer\b/.test(r.trim());d.push(i),i&&e++,r=""}else t==="}"?(d.pop()&&e--,r=""):t===";"?r="":r+=t}const m=n.indexOf("{",o);if(m<0)return null;let u=0,g=-1;for(let c=m;c<n.length;c++)if(n[c]==="{")u++;else if(n[c]==="}"&&--u===0){g=c;break}if(g<0)return null;const s=n.slice(m+1,g),y=s.indexOf("{"),b=s.lastIndexOf("}");return y<0||b<0?null:{body:s,selector:s.slice(0,y).trim().replace(/\s+/g," "),decls:s.slice(y+1,b),unlayered:e===0}}function p(n,o){const e=new RegExp(`(?:^|;)\\s*${o}\\s*:([^;]*)`,"i"),d=n.match(e);return d?d[1].replace(/!important/i,"").trim().replace(/\s+/g," "):null}function j(n){const o=S(n.text),e=[];for(const[d,r]of o.split(`
|
|
2
|
+
`).entries())x.test(r)&&e.push({file:n.path,line:d+1,text:r.trim()});return e}function B(n,o){const e=O(n.text),d=o?e.replace(o,""):e,r=[];for(const[m,u]of d.split(`
|
|
3
|
+
`).entries())N.test(u)&&r.push(`${n.path}:${m+1} ${u.trim()}`);return r}function L(n,o){const{check:e,report:d}=I("reduced motion"),r=o.editorOnly??{},m=new Map(n.map(t=>[t.path,t]));{e("a rule that exists only in a comment is NOT counted",$(O(`/* the site should have a @media (prefers-reduced-motion: reduce) rule */
|
|
4
|
+
a { color: red; }`))===null);const i="@media (prefers-reduced-motion: reduce) { * { animation-duration: 1ms !important; } }";e("the layer check fails on a layered copy and passes on an unlayered one",$(i)?.unlayered===!0&&$(`@layer base { ${i} }`)?.unlayered===!1&&$(`@layer base { a { color: red; } } ${i}`)?.unlayered===!0),e("valueOf reads a declaration and drops !important",p("animation-duration: 1ms !important;","animation-duration")==="1ms"&&p("transition-property: opacity, color !important;","transition-property")==="opacity, color"&&p("animation-duration: 1ms;","animation")===null&&p("scroll-behavior: auto;","animation-delay")===null);const a=f=>(f??"").split(",").map(v=>v.trim()),h=a(p("transition-property: opacity, transform !important;","transition-property")),w=a(p("transition-property: opacity, color !important;","transition-property"));e("the moving-property check fails on a copy that lets transform through, and passes a fade-only list",h.some(f=>R.includes(f))&&!w.some(f=>R.includes(f))),e("the !important scan flags a motion declaration and not one in a comment",B({path:"fixture.css",text:`/* transition: x !important */
|
|
5
|
+
a { transition: opacity 1s !important; }`},null).length===1),e("the smooth-scroll regex bites, both ways",x.test('el.scrollIntoView({ behavior: "smooth" })')&&x.test("window.scrollTo({ top: 0, behavior: 'smooth' })")&&!x.test("el.scrollIntoView({ behavior: scrollBehavior() })")&&!x.test('window.scrollTo({ top: 0, behavior: "auto" })')),e("a commented example is not a breach",j({path:"fixture.ts",text:`// behavior: "smooth" in a comment
|
|
6
|
+
const a = 1;`}).length===0)}const u=n.filter(t=>t.path.endsWith(".css")),g=n.filter(t=>/\.tsx?$/.test(t.path)&&!t.path.endsWith(".d.ts")&&!C(t.path));let s=null;if(o.globalSheet!==void 0){const t=m.get(o.globalSheet),i=t?O(t.text):"";s=$(i);const a=o.globalSheet;e(`${a} was actually read`,i.length>1e4,`expected the real stylesheet, got ${i.length} chars`),e(`${a} has a real prefers-reduced-motion rule, not just prose about one`,s!==null&&s.decls.trim().length>0,"no `@media (prefers-reduced-motion: reduce)` block once comments are stripped, or it is empty. Before this rule landed the sheet's ONLY match for that string was a comment, which is the state this asserts is over."),e("the rule is UNLAYERED, so Tailwind's utilities cannot outrank it",s?.unlayered===!0,"the reduced-motion rule sits inside an @layer. Tailwind's utilities live in a later layer, so every `transition-*` class would beat it and the site would move for everyone, with nothing to show for it.");const h=s?.selector??"";e("the rule applies to every element and both generated boxes",/\*/.test(h)&&/::before/.test(h)&&/::after/.test(h),`selector \`${h}\` \u2014 it must start from \`*\` (a narrower one covers only what somebody remembered) and cover \`::before\` and \`::after\`: a generated box animates like any other`);const w=(s?.decls??"").split(";").map(l=>l.trim()).filter(l=>l.length>0),f=w.filter(l=>!/!important\s*$/i.test(l)).map(l=>l.split(":")[0].trim());e("every declaration carries !important",w.length>=4&&f.length===0,`${w.length} declaration(s), without !important: ${f.join(", ")||"(none)"}. Being unlayered beats Tailwind, but not the unlayered class rules in the same sheet and not an inline style.`);const v=p(s?.decls??"","transition-property"),E=(v??"").split(",").map(l=>l.trim().toLowerCase()),T=E.filter(l=>R.includes(l));e("the transition allow-list lets nothing move",v!==null&&T.length===0,v===null?"the rule must set `transition-property` \u2014 that is how movement is sorted from fades":`movement is back on the allow-list: ${T.join(", ")}. Anything on that list still animates for a visitor who asked for no motion.`);const M=D.filter(l=>!E.includes(l));e("the transition allow-list still lets fades through",M.length===0,`\`${M.join("`, `")}\` must stay transitionable. A fade carries no movement, helps people follow what changed, and harms nobody \u2014 dropping it is the crude rule this one was written instead of.`);const k=p(s?.decls??"","animation-duration");e("animations are collapsed to a short NON-ZERO time",k!==null&&/^(0?\.\d+|[1-9]\d*)m?s$/.test(k),`animation-duration is \`${k}\`; the rule must cap it (CSS cannot sort a keyframe list by what it moves), and exactly 0s stops \`animationend\` firing in some engines and hangs any component waiting on it.`),e("a loop that still repeats is still a loop: animation-iteration-count is 1",p(s?.decls??"","animation-iteration-count")==="1"),e("animations are not collapsed with `animation: none`, which can hide content",p(s?.decls??"","animation")===null,"an element whose static styles are invisible, made visible by a `forwards` fill, would never appear. Run the animation to its end instead."),e("a scroll the visitor did not ask for is movement too: scroll-behavior is auto",p(s?.decls??"","scroll-behavior")==="auto","the sheet sets `scroll-behavior: smooth` on html inside @layer base; this must turn it off."),e("the escape hatch exists and is spelled the one way",/\[data-motion-keep\]/.test(h),"the exemption attribute must appear in the selector, so one grep finds every exception.")}for(const t of o.stylesheets??[])e(`read the stylesheet ${t}`,m.has(t)&&t.endsWith(".css"));const y=u.flatMap(t=>B(t,t.path===o.globalSheet&&s?s.body:null));e(`nothing in the stylesheets can outrank the rule (${u.length} sheet(s))`,u.length>0&&y.length===0,u.length===0?"read no stylesheet \u2014 this check is not measuring anything":`!important motion declaration(s) outside the reduced-motion rule:
|
|
7
|
+
`+y.join(`
|
|
8
|
+
`)),e(`read the scripts (${g.length} .ts/.tsx files, at least ${o.minScripts})`,g.length>=o.minScripts);const b=g.flatMap(j),c=b.filter(t=>!(t.file in r));e("no shopper-facing code hard-codes a smooth scroll",c.length===0,'an explicit `behavior: "smooth"` beats the stylesheet, so this scroll animates for a visitor who asked for no motion:\n '+c.map(t=>`${t.file}:${t.line} ${t.text}`).join(`
|
|
9
|
+
`)+"\n Call `scrollBehavior()` from components/useReducedMotion.ts instead. It still scrolls \u2014 it just arrives instead of travelling.");for(const[t,i]of Object.entries(r)){const a=m.get(t);e(`the editor waiver is still real: ${t} (${i})`,!!a&&/editor/i.test(a.text.slice(0,400))&&b.some(h=>h.file===t),a?"its own opening no longer says it is the editor's, or it no longer holds the literal \u2014 the waiver covers nothing":"the file is gone \u2014 remove the stale entry")}for(const[t,i]of Object.entries(o.askingSites??{})){const a=m.get(t),h=a?(S(a.text).match(/behaviou?r:\s*scrollBehavior\(\)/g)??[]).length:-1;e(`${t} still asks scrollBehavior() ${i} time(s)`,h===i,a?`found ${h}. A shopper-facing scroll stopped asking \u2014 if a site was deliberately removed, change the number and say which.`:"the file is gone")}if(o.hook!==void 0){const t=m.get(o.hook),i=t?S(t.text):"";e(`${o.hook} exports scrollBehavior()`,/export function scrollBehavior\(\)/.test(i)),e(`${o.hook} names the media query once and shares it`,/export const REDUCED_MOTION_QUERY/.test(i),"the media query must be named once and shared, not typed out per reader");const a=(i.match(/prefers-reduced-motion/g)??[]).length;e(`the query string appears exactly once in ${o.hook}`,a===1,`it appears ${a} times. Two spellings of the same question can disagree; there must be exactly one.`)}return d()}export{x as HARD_CODED_SMOOTH,R as MOVING_PROPERTIES,D as REQUIRED_FADES,j as hardCodedSmoothScrolls,$ as readReduceBlock,L as reducedMotion,p as valueOf};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type RuleReport, type SourceFile } from "./rule.js";
|
|
2
|
+
export type NamedCap = {
|
|
3
|
+
readonly file: string;
|
|
4
|
+
readonly cls: string;
|
|
5
|
+
readonly why: string;
|
|
6
|
+
};
|
|
7
|
+
export type MovedColumn = {
|
|
8
|
+
readonly file: string;
|
|
9
|
+
readonly from: number;
|
|
10
|
+
readonly moved: number;
|
|
11
|
+
readonly caps: number;
|
|
12
|
+
readonly what: string;
|
|
13
|
+
readonly cap?: "site" | "chrome";
|
|
14
|
+
};
|
|
15
|
+
export type RouteContentWidthOptions = {
|
|
16
|
+
readonly measures?: readonly NamedCap[];
|
|
17
|
+
readonly ownedElsewhere?: readonly NamedCap[];
|
|
18
|
+
readonly moved?: readonly MovedColumn[];
|
|
19
|
+
readonly movedColumns?: number;
|
|
20
|
+
readonly minFiles: number;
|
|
21
|
+
};
|
|
22
|
+
export declare function routeContentWidth(files: readonly SourceFile[], options: RouteContentWidthOptions): RuleReport;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{CHROME_WIDTH_CAP_CLASS as v,PAGE_WIDTH as o,SITE_WIDTH_CAP_CLASS as u,SITE_WIDTH_VAR as $}from"../content/page-width.js";import{ruleChecks as C}from"./rule.js";const i=/max-w-\[1\d{3}px\]/,f=s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),E=s=>/^\s*(\/\/|\*|\/\*)/.test(s);function x(s){const n=[];return s.text.split(`
|
|
2
|
+
`).forEach((t,h)=>{if(!E(t))for(const r of t.matchAll(new RegExp(i,"g")))n.push({file:s.path,line:h+1,cls:r[0]})}),n}const b=s=>s.cap==="chrome"?v:u;function S(s,n){const{check:t,report:h}=C("route content width"),r=n.measures??[],g=[...r,...n.ownedElsewhere??[]],m=n.moved??[];t("a site's width starts at 1000px",o.min===1e3,`PAGE_WIDTH.min is ${o.min}`),t("the band holds the narrowest site width",i.test(`max-w-[${o.min}px]`)),t("the band holds the built-in site width",i.test(`max-w-[${o.default}px]`)),t("a cap below the band is never looked at",!i.test("max-w-[999px]")&&!i.test("max-w-[680px]")),t("the replacement class is not itself a literal in the band",!i.test(u));{const e=x({path:"fixture.tsx",text:["// a doc line naming max-w-[1100px] is not a use",'<div className="mx-auto max-w-[1100px]" />'].join(`
|
|
3
|
+
`)});t("the reader finds a cap in code and skips a comment line",e.length===1&&e[0].line===2,JSON.stringify(e))}const c=s.filter(e=>/\.tsx?$/.test(e.path));t(`read the source (${c.length} TS/TSX files, at least ${n.minFiles})`,c.length>=n.minFiles,"fewer means the walk broke, and the census below is vacuous");const d=c.flatMap(x).filter(e=>!g.some(a=>a.file===e.file&&a.cls===e.cls));t("no route layout types its own content column (no literal cap in the 1000\u20131999px band)",d.length===0,`${d.length} cap(s) in the band are a hand-typed content column. Each should read ${u} \u2014 or, if it is a reading measure, be named as one with the reason it is one:
|
|
4
|
+
`+d.map(e=>`${e.file}:${e.line} ${e.cls}`).join(`
|
|
5
|
+
`));const p=new Map(c.map(e=>[e.path,e.text]));for(const e of r)t(`the measure is still there: ${e.file} ${e.cls}`,new RegExp(f(e.cls)).test(p.get(e.file)??""),"delete that measure rather than leaving a hole the next hard-coded column can sit in"),t(`\u2026and it carries its reason: ${e.file} ${e.cls}`,e.why.trim().length>40,"a measure needs its reason");for(const e of m){const a=p.get(e.file);if(!t(`read the moved column's file ${e.file} (${e.what})`,a!==void 0,"the file is gone \u2014 delete its row"))continue;const l=b(e);t(`${e.file} (${e.what}) declares a cap that reads ${$}`,l.includes($),l);const w=[...a.matchAll(new RegExp(f(l),"g"))].length;t(`${e.file} (${e.what}) carries ${e.caps} ${e.cap==="chrome"?"chrome":"site"} width cap(s)`,w===e.caps,`found ${w}`),t(`${e.file} (${e.what}) no longer types its old ${e.from}px column`,!new RegExp(f(`max-w-[${e.from}px]`)).test(a)),t(`${e.file} (${e.what}) gets wider at the default width, never narrower`,o.default>e.from,`it would NARROW by ${e.from-o.default}px`)}if(n.movedColumns!==void 0){const e=m.reduce((a,l)=>a+l.moved,0);t(`the moved list and the census agree: ${n.movedColumns} column(s) moved across ${m.length} file(s)`,e===n.movedColumns,`the rows add up to ${e} \u2014 a column moved without a row stops the report of what a merchant will SEE change matching the code`)}return h()}export{S as routeContentWidth};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type SourceFile = {
|
|
2
|
+
readonly path: string;
|
|
3
|
+
readonly text: string;
|
|
4
|
+
};
|
|
5
|
+
export type RuleCheck = {
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly ok: boolean;
|
|
8
|
+
readonly detail?: string;
|
|
9
|
+
};
|
|
10
|
+
export type RuleReport = {
|
|
11
|
+
readonly rule: string;
|
|
12
|
+
readonly checks: readonly RuleCheck[];
|
|
13
|
+
};
|
|
14
|
+
export declare const RULES_DIR = "lib/source-rules/";
|
|
15
|
+
export declare function isRuleSource(path: string): boolean;
|
|
16
|
+
export declare function ruleChecks(rule: string): {
|
|
17
|
+
check(name: string, ok: boolean, detail?: string): boolean;
|
|
18
|
+
report(): RuleReport;
|
|
19
|
+
};
|
|
20
|
+
export declare function failedChecks(report: RuleReport): readonly RuleCheck[];
|
|
21
|
+
export declare function reportLines(report: RuleReport): string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const u="lib/source-rules/";function c(r){return r.startsWith(u)}function s(r){const e=[];return{check(n,t,o){return e.push(t||o===void 0?{name:n,ok:t}:{name:n,ok:t,detail:o}),t},report(){return e.length===0&&e.push({name:`${r} checked nothing`,ok:!1}),{rule:r,checks:e}}}}function i(r){return r.checks.filter(e=>!e.ok)}function h(r){return r.checks.map(e=>e.ok?` ok ${e.name}`:` FAIL ${e.name}${e.detail?` \u2014 ${e.detail}`:""}`)}export{u as RULES_DIR,i as failedChecks,c as isRuleSource,h as reportLines,s as ruleChecks};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type RuleReport, type SourceFile } from "./rule.js";
|
|
2
|
+
export type SectionThemePreviewOptions = {
|
|
3
|
+
readonly home?: string;
|
|
4
|
+
readonly panels?: readonly string[];
|
|
5
|
+
readonly triggerPanels?: readonly string[];
|
|
6
|
+
readonly menuSheet?: string;
|
|
7
|
+
readonly minFiles: number;
|
|
8
|
+
};
|
|
9
|
+
export declare function sectionThemePreview(files: readonly SourceFile[], options: SectionThemePreviewOptions): RuleReport;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{ruleChecks as u}from"./rule.js";const o="sf-theme-page",d=new RegExp(`["\`\\s]${o}`),w=/from\s+"@\/components\/ThemeCard"/,m=/ThemeColourRow\b(?!s)/;function f(r,n){const t=r.indexOf(`
|
|
2
|
+
${n} {`);if(t<0)return"";const i=r.indexOf("{",t);return r.slice(i+1,r.indexOf(`
|
|
3
|
+
}`,i)).replace(/\/\*[\s\S]*?\*\//g,"")}function b(r,n){const{check:t,report:i}=u("section theme preview"),h=r.filter(e=>e.path.endsWith(".tsx")),c=e=>r.find(s=>s.path===e)?.text;t("the class reader finds the preview class written into markup",d.test(`<div className="${o} x" />`)),t("\u2026and not a longer class that only starts the same",!d.test(`<div className="x-${o}" />`)),t("a single colour row is told apart from the shared run",m.test("<ThemeColourRow label />")&&!m.test("<ThemeColourRows colors={c} />")),t("the rule-body reader cuts the comment and keeps the declaration",f(`
|
|
4
|
+
.m {
|
|
5
|
+
/* not #eff6ff */
|
|
6
|
+
background: var(--sf-accent-tint);
|
|
7
|
+
}
|
|
8
|
+
`,".m").trim()==="background: var(--sf-accent-tint);"),t(`read the .tsx files (${h.length}, at least ${n.minFiles})`,h.length>=n.minFiles,"fewer means the walk broke");const a=h.filter(e=>d.test(e.text)).map(e=>e.path);t(n.home?`\`.${o}\` is written by exactly one component, and it is ${n.home}`:`no file here writes \`.${o}\``,n.home?a.length===1&&a[0]===n.home:a.length===0,`it is written by ${a.length?a.join(", "):"nothing"}. Two files drawing one preview is the defect card 66503 closes, one level along: they match on the day they are written and drift on every day after \u2014 draw it with the builder's components/ThemeCard.tsx`);for(const e of n.panels??[]){const s=c(e)??"";t(`${e} reaches the drawing by import`,w.test(s),"it imports no shared drawing, so whatever it puts on screen is its own"),t(`${e} draws no colour row of its own`,s.length>0&&!m.test(s),"it reaches a row directly instead of drawing the shared run, which is how the two lists drifted apart the first time")}for(const e of n.triggerPanels??[])t(`${e} reaches the closed drawing by import too`,/ThemeCardTrigger/.test(c(e)??""),"a trigger assembled in the panel is a second file drawing a theme");if(n.menuSheet){const e=c(n.menuSheet)??"",s=f(e,".sf-secttheme-menu"),l=f(e,".sf-multi-menu");t(`the instrument found both rules in ${n.menuSheet}, so the absences below mean something`,/background/.test(s)&&/border/.test(l),`.sf-secttheme-menu read ${s.length} chars and .sf-multi-menu ${l.length}`),t("the theme list fills itself with the accent tint",/background:\s*var\(--sf-accent-tint\)/.test(s)),t("\u2026as the FILL, leaving the shared grey frame alone",!/border(-color)?:/.test(s)),t("\u2026and NO literal colour is written there",!/#[0-9a-fA-F]{3,8}\b/.test(s)&&!/\brgba?\(/.test(s),"it must be `--sf-accent-tint`"),t("the SHARED dropdown container is still untinted",!/--sf-accent-tint/.test(l),"`.sf-multi-menu` is worn by MultiSelectField too; tinting every dropdown was offered and declined")}return i()}export{b as sectionThemePreview};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type RuleReport, type SourceFile } from "./rule.js";
|
|
2
|
+
export type SiteGutterOptions = {
|
|
3
|
+
readonly minFiles: number;
|
|
4
|
+
readonly gutterFloor: number;
|
|
5
|
+
};
|
|
6
|
+
export declare function siteGutter(files: readonly SourceFile[], options: SiteGutterOptions): RuleReport;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{SITE_GUTTER as f}from"../content/page-width.js";import{ruleChecks as h}from"./rule.js";const g=/px-\[(?:min\([^)]*,)?var\(--sf-site-gutter,(\d+)px\)/g;function u(s){return[...s.matchAll(g)].map(e=>({match:e[0],fallback:Number(e[1])}))}function p(s,e){const{check:a,report:c}=h("site gutter");{const t=i=>`var(--sf-site-gutter,${i}px)`,r=u([`className="px-[${t(40)}]"`,`"max-[720px]:px-[min(20px,${t(60)})]"`,'"px-10"',`"py-[${t(40)}]"`].join(`
|
|
2
|
+
`));a("the reader finds a whole gutter and a narrow step, with their fallbacks",r.length===2&&r[0].fallback===40&&r[1].fallback===60,JSON.stringify(r))}const l=s.filter(t=>/\.tsx?$/.test(t.path));a(`read the source (${l.length} TS/TSX files, at least ${e.minFiles})`,l.length>=e.minFiles,"fewer means the walk broke, and the check below is vacuous");let o=0;const n=[];for(const t of l)for(const r of u(t.text))o+=1,r.fallback!==f.default&&n.push(`${t.path}: ${r.match}`);return a(`found >= ${e.gutterFloor} literal gutters (found ${o})`,o>=e.gutterFloor,"fewer means the gutters went back to a hand-written number, or the reader broke"),a(`every --sf-site-gutter fallback is SITE_GUTTER.default (${f.default}px)`,n.length===0,`${n.length} gutter(s) name a second "standard gutter":
|
|
3
|
+
${n.join(`
|
|
4
|
+
`)}`),c()}export{p as siteGutter};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type RuleReport, type SourceFile } from "./rule.js";
|
|
2
|
+
type Tokens = Readonly<Record<string, string>>;
|
|
3
|
+
export type CornerPublishers = {
|
|
4
|
+
readonly siteCornerRadiusTokens: (v?: number | string | null) => Tokens;
|
|
5
|
+
readonly cornerRadiusTokens: (v?: number | string | null) => Tokens;
|
|
6
|
+
readonly cornerStyleToPx: Readonly<Record<string, number | null>>;
|
|
7
|
+
readonly normalizeCornerStyle: (v?: string | null) => string;
|
|
8
|
+
readonly sectionCornerStyle: (value: unknown) => unknown;
|
|
9
|
+
};
|
|
10
|
+
export type SiteSquareByDefaultOptions = {
|
|
11
|
+
readonly corners?: CornerPublishers;
|
|
12
|
+
readonly livePage?: string;
|
|
13
|
+
readonly canvas?: string;
|
|
14
|
+
readonly minFiles: number;
|
|
15
|
+
};
|
|
16
|
+
export declare function siteSquareByDefault(files: readonly SourceFile[], options: SiteSquareByDefaultOptions): RuleReport;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{ruleChecks as f}from"./rule.js";const c=["--radius","--radius-xs","--radius-sm","--radius-md","--radius-lg","--radius-xl","--radius-2xl","--radius-3xl","--radius-4xl"],i=(a,r)=>JSON.stringify(a)===JSON.stringify(r);function h(a){const r=[];return a.text.split(`
|
|
2
|
+
`).forEach((s,u)=>{for(const o of s.matchAll(/["'`]([^"'`]*\brounded-full\b[^"'`]*)["'`]/g))/(^|\s)px-(?!0\b|0\.5\b|1\b|px\b)[\d[]/.test(o[1])&&r.push(`${a.path}:${u+1}`)}),r}function g(a,r){const{check:s,report:u}=f("site square by default"),o=e=>a.find(n=>n.path===e),t=r.corners;if(t){const e=t.siteCornerRadiusTokens(null);s("a website that has chosen no corners publishes every step of the radius scale a `rounded-*` utility reads",c.every(n=>n in e),`missing: ${c.filter(n=>!(n in e)).join(", ")}`),s("\u2026and the card's and the button's own properties","--sf-card-radius"in e&&"--sf-button-radius"in e),s("\u2026every one of them 0 \u2014 square",Object.values(e).every(n=>n==="0"),JSON.stringify(e)),s("\u2026exactly what a site that chose 0 publishes",i(e,t.cornerRadiusTokens(0))),s("an absent value and a blank one are the same statement",i(t.siteCornerRadiusTokens(void 0),e)&&i(t.siteCornerRadiusTokens(""),e)&&i(t.siteCornerRadiusTokens(" "),e)),s("a website that has chosen keeps its number",i(t.siteCornerRadiusTokens(16),t.cornerRadiusTokens(16))&&t.siteCornerRadiusTokens(16)["--radius-lg"]==="1rem"),s('the retired `large` word is still 16, and `small` is still "not set"',t.cornerStyleToPx[t.normalizeCornerStyle("large")]===16&&t.cornerStyleToPx[t.normalizeCornerStyle("small")]===null),s('`cornerRadiusTokens(null)` publishes NOTHING \u2014 not set there means "follow the site"',i(t.cornerRadiusTokens(null),{})),s("\u2026so an untouched section declares no radius of its own",t.sectionCornerStyle(null)===void 0,JSON.stringify(t.sectionCornerStyle(null)))}if(r.livePage!==void 0){const e=o(r.livePage);if(s(`read the live page's layout ${r.livePage}`,!!e)){const n=e.text;s("the live page publishes the site's corners through siteCornerRadiusTokens",/const siteCornerTokens = siteCornerRadiusTokens\(/.test(n)&&/\.\.\.siteCornerTokens,/.test(n)),s("\u2026and never through the two that publish nothing for an untouched site",!/\bcornerRadiusTokens\(|\bcornerStyleTokens\(/.test(n))}}if(r.canvas!==void 0){const e=o(r.canvas);if(s(`read the editor canvas ${r.canvas}`,!!e)){const n=e.text;s("the editor canvas publishes them through the same function",/\.\.\.siteCornerRadiusTokens\(cornerRadiusPx\),/.test(n)&&/siteCardRadiusTokens\(siteCornerRadiusTokens\(cornerRadiusPx\)\)/.test(n)),s("\u2026and nowhere through the bare one",!/(?<![A-Za-z])cornerRadiusTokens\(/.test(n))}}{const e=h({path:"fixture.tsx",text:['<button className="rounded-full px-4 py-2">Sign in</button>','<span className="rounded-full px-1 text-xs">3</span>','<span className="h-2 w-2 rounded-full bg-fg" />',"<i className={`rounded-full px-[10px]`} />"].join(`
|
|
3
|
+
`)});s("the pill sweep flags a padded circle, and neither a count badge nor a dot",i(e,["fixture.tsx:1","fixture.tsx:4"]),JSON.stringify(e))}const l=a.filter(e=>e.path.endsWith(".tsx"));s(`the pill sweep read the .tsx files (${l.length}, at least ${r.minFiles})`,l.length>=r.minFiles&&l.length>0);const d=l.flatMap(h);return s("no control with horizontal padding wears the circle utility",d.length===0,d.join(", ")),u()}export{g as siteSquareByDefault};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type RuleReport, type SourceFile } from "./rule.js";
|
|
2
|
+
export type SiteWidthOptions = {
|
|
3
|
+
readonly minFiles: number;
|
|
4
|
+
readonly capFloor: number;
|
|
5
|
+
readonly sections?: readonly string[];
|
|
6
|
+
readonly tokenSheets?: readonly string[];
|
|
7
|
+
readonly chromeStyled?: readonly string[];
|
|
8
|
+
readonly chromeClassed?: readonly string[];
|
|
9
|
+
readonly carrier?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function siteWidth(files: readonly SourceFile[], options: SiteWidthOptions): RuleReport;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{CHROME_WIDTH_CAP_CLASS as S,PAGE_WIDTH as f,PRE_CHROME_WIDTH_CAP_CLASS as b,PRE_SITE_WIDTH_CAP_CLASS as _,SITE_WIDTH_CAP_CLASS as d,SITE_WIDTH_VAR as g,siteWidthTokens as p}from"../content/page-width.js";import{ruleChecks as C}from"./rule.js";const y=a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),T=a=>/^\s*(\/\/|\*|\/\*)/.test(a);function m(a,i){const t=[];for(const o of a)o.text.split(`
|
|
2
|
+
`).forEach((r,h)=>{i.test(r)&&!T(r)&&t.push({file:o.path,line:h+1,text:r})});return t}function u(a,i){const t=/max-w-\[([^\]]+)\]/.exec(a);if(!t)return null;const o=/^var\((--[\w-]+),\s*([^)]+)\)$/.exec(t[1].trim());return o?i[o[1]]??o[2]:t[1].trim()}function E(a,i){const{check:t,report:o}=C("site width"),r=e=>a.find(n=>n.path===e);{const e=["max-w-[",f.default,"px]"].join(""),n={path:"fixture.tsx",text:[`const a = "mx-auto ${e}";`,`// a note naming ${e} is not a use`,`const b = "${d} px-10";`,`const c = "max-w-[var(${g},1400px)]";`].join(`
|
|
3
|
+
`)},s=m([n],new RegExp(y(_)));t("R1 flags a bare 1600 cap, and not a comment naming one",s.length===1&&s[0].line===1,JSON.stringify(s));const l=m([n],new RegExp(`max-w-\\[var\\(${g}`));t("R2 finds every cap that reads the token, and only the drifted one differs",l.length===2&&l.filter(c=>!c.text.includes(d)).map(c=>c.line).join()==="4",JSON.stringify(l)),t("the cascade reader takes the fallback unset and the published width when set",u(d,p(void 0))===`${f.default}px`&&u(d,p(1400))==="1400px")}const h=a.filter(e=>/\.tsx?$/.test(e.path));t(`read the source (${h.length} TS/TSX files, at least ${i.minFiles})`,h.length>=i.minFiles,"fewer means the walk broke, and every absence below is vacuous");const w=m(h,new RegExp(y(_)));t("R1 no page-width cap is a hand-written 1600 literal any more",w.length===0,`page width is still hard-coded in ${w.length} place(s):
|
|
4
|
+
${w.map(e=>`${e.file}:${e.line}`).join(`
|
|
5
|
+
`)}`);const $=m(h,new RegExp(`max-w-\\[var\\(${g}`));t(`found >= ${i.capFloor} caps that read the site width token (found ${$.length})`,$.length>=i.capFloor,"fewer means caps went back to a number, or the reader broke");const x=$.filter(e=>/max-w-\[var\(--sf-site-width[^\]]*\]/.exec(e.text)?.[0]!==d).map(e=>`${e.file}:${e.line} \u2014 ${e.text.trim()}`);t("R2 every page-width cap reads the site token, with the built-in as its fallback",x.length===0,`${x.length} cap(s) do not match SITE_WIDTH_CAP_CLASS (${d}):
|
|
6
|
+
${x.join(`
|
|
7
|
+
`)}`);for(const e of i.sections??[]){const n=r(e),s=[...(n?.text??"").matchAll(/"([^"]*max-w-\[[^\]]+\][^"]*)"/g)].map(c=>c[1]);if(!t(`${e} carries a page-width cap`,s.length>0,n?"it no longer carries one":"it is not among the files handed in"))continue;const l=s.filter(c=>u(c,p(void 0))!==`${f.default}px`||u(c,p(1400))!=="1400px");t(`${e} renders at ${f.default} unset, and at the site's width when set`,l.length===0,l.join(" \xB7 "))}for(const e of i.tokenSheets??[]){const n=/--sf-site-width:\s*([^;]+);/.exec(r(e)?.text??"");t(`${e} defines the token at the built-in width`,n?.[1].trim()===`${f.default}px`,n?`it defines ${n[1].trim()}`:`${e} defines no --sf-site-width (or was not read)`)}for(const e of i.chromeStyled??[]){const n=r(e)?.text??"";t(`${e} caps at the site's width (chromeWidthStyle)`,/chromeWidthStyle\(/.test(n),`${e} does not cap at the site's width`),t(`${e} does not cap at the built-in number (pageWidthStyle)`,n.length>0&&!/^(?!.*\/\/).*\bpageWidthStyle\(/m.test(n),`${e} still caps at the built-in number, so the chrome ignores the site's width`)}for(const e of i.chromeClassed??[]){const n=r(e)?.text??"";t(`${e} carries ${S}`,n.includes(S),"its tabs sit one gutter wide of the page"),t(`${e} no longer carries the old ${b}`,n.length>0&&!n.includes(b))}if(i.carrier){const e=r(i.carrier)?.text??"",n=/const carrierStyle = \{([\s\S]*?)\} as CSSProperties;/.exec(e),s=/const contentThemeStyle = \{([\s\S]*?)\} as CSSProperties;/.exec(e);t(`${i.carrier} builds a carrierStyle`,!!n)&&n&&t("the site width is published on the accent carrier, so the chrome can read it",/siteWidthTokens\(/.test(n[1]),"the site width is not published on the accent carrier, so the chrome cannot read it"),t(`${i.carrier} builds a contentThemeStyle`,!!s)&&s&&t("\u2026and not on <main> as well \u2014 one emitter, not two",!/siteWidthTokens\(/.test(s[1]),"the site width is still published on <main> as well")}return o()}export{E as siteWidth};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type RuleReport, type SourceFile } from "./rule.js";
|
|
2
|
+
export type SizeTokenPaintsOptions = {
|
|
3
|
+
readonly baseline?: Readonly<Record<string, number>>;
|
|
4
|
+
readonly minFiles: number;
|
|
5
|
+
};
|
|
6
|
+
export declare function stripComments(src: string): string;
|
|
7
|
+
export declare function brokenCount(src: string): number;
|
|
8
|
+
export declare function sizeTokenPaints(files: readonly SourceFile[], options: SizeTokenPaintsOptions): RuleReport;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{ruleChecks as d}from"./rule.js";const b=/text-\[(?!length:)[^\]]*--size-[a-zA-Z]+[^\]]*\]/g;function w(t){let i="",e=0;const l=t.length;for(;e<l;){const a=t[e],h=t[e+1];if(a==="/"&&h==="/"){for(;e<l&&t[e]!==`
|
|
2
|
+
`;)i+=" ",e++;continue}if(a==="/"&&h==="*"){for(;e<l&&!(t[e]==="*"&&t[e+1]==="/");)i+=t[e]===`
|
|
3
|
+
`?`
|
|
4
|
+
`:" ",e++;i+=" ",e+=2;continue}if(a==="`"){for(i+=a,e++;e<l;){if(t[e]==="\\"){i+=t[e]+(t[e+1]??""),e+=2;continue}if(t[e]==="`"){i+="`",e++;break}i+=t[e],e++}continue}if(a==='"'||a==="'"){let o=e+1,r=!1;for(;o<l&&t[o]!==`
|
|
5
|
+
`;){if(t[o]==="\\"){o+=2;continue}if(t[o]===a){r=!0;break}o++}if(!r){i+=a,e++;continue}i+=t.slice(e,o+1),e=o+1;continue}i+=a,e++}return i}function f(t){return(w(t).match(b)??[]).length}function x(){const t="text-[";return[{name:"empty source",src:"",want:0},{name:"no size token at all",src:`<p className="${t}13px] font-mono">hi</p>`,want:0},{name:"the broken form",src:`<p className="${t}var(--size-label,13px)]">hi</p>`,want:1},{name:"the working form",src:`<p className="${t}length:var(--size-label,13px)]">hi</p>`,want:0},{name:"two on one line, desktop and phone",src:`<h2 className="${t}var(--size-headingMedium,44px)] max-[800px]:${t}var(--size-headingMedium,32px)]">t</h2>`,want:2},{name:"wrapped in min(), still broken",src:`<h1 className="${t}min(var(--size-headingLarge,64px),var(--sf-heading-max,9999px))]">t</h1>`,want:1},{name:"a line comment is not code",src:`// ${t}var(--size-label,13px)] is the broken form`,want:0},{name:"a block comment is not code",src:`/* ${t}var(--size-label,13px)] */`,want:0},{name:"an apostrophe does not stop a later comment being stripped",src:`<p>it doesn't paint</p>
|
|
6
|
+
// ${t}var(--size-label,13px)]
|
|
7
|
+
<p>that's why</p>`,want:0}]}function $(t,i){const{check:e,report:l}=d("size token paints"),a=i.baseline??{};let h=!0;for(const n of x()){const s=f(n.src);h=e(`fixture "${n.name}": ${n.want}`,s===n.want,`got ${s}`)&&h}if(!h)return e("the extractor is right, so its verdict on the tree means something",!1,"a fixture failed above"),l();const o=t.filter(n=>/\.tsx?$/.test(n.path));e(`read the source (${o.length} TS/TSX files, at least ${i.minFiles})`,o.length>=i.minFiles,"fewer means the walk broke, and the check below is vacuous");const r=[],p=[];let m=0;for(const n of o){const s=f(n.text);m+=s;const c=a[n.path]??0;s>c?r.push(`${n.path} \u2014 ${s} broken, baseline allows ${c}`):s<c&&p.push(`${n.path} \u2014 ${s} broken, baseline says ${c}`)}const u=Object.values(a).reduce((n,s)=>n+s,0);e(`no text size is written in the form that compiles to \`color:\` (${m} broken place(s) found, the baseline allows ${u})`,r.length===0,`${r.length} file(s) over budget:
|
|
8
|
+
${r.join(`
|
|
9
|
+
`)}
|
|
10
|
+
Write it as \`text-[length:var(--size-<role>,<built-in>)]\`. Without \`length:\` Tailwind reads the var() as a
|
|
11
|
+
colour, the declaration is dropped as invalid, and the site's text style setting reaches nothing.`);for(const[n]of Object.entries(a))e(`the baseline entry is still a file: ${n}`,o.some(s=>s.path===n),"delete the stale entry");for(const n of p)e(`improved \u2014 lower its baseline entry: ${n}`,!0);return l()}export{f as brokenCount,$ as sizeTokenPaints,w as stripComments};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type RuleReport, type SourceFile } from "./rule.js";
|
|
2
|
+
export type SocialIconsImportOptions = {
|
|
3
|
+
readonly helper?: string;
|
|
4
|
+
readonly minFiles: number;
|
|
5
|
+
};
|
|
6
|
+
export declare function socialIconsImport(files: readonly SourceFile[], options: SocialIconsImportOptions): RuleReport;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{ruleChecks as d}from"./rule.js";const a=n=>JSON.stringify(n),g="the website builder's components/socialIcons.tsx (`<SocialMark>`)",$=/\.(ts|tsx|js|jsx|mjs|cjs)$/,u=/(?:from\s*|import\s*\(\s*|require\s*\(\s*|import\s+)["'](@tabler\/[^"']+)["']/g,f=/(?:import\s*\*\s*as\s+\w+\s*from|export\s*\*\s*(?:as\s+\w+\s*)?from)\s*["']@tabler\/[^"']+["']/,x=["Instagram","Facebook","Tiktok","Youtube","X","Linkedin","Pinterest","Whatsapp"],c=n=>[...n.matchAll(u)].map(t=>t[1]);function k(n,t){const{check:r,report:b}=d("social icons import");{const e=["@tabler","icons-react"].join("/"),s=[["a named import",`import { IconBrandX } from ${a(e)};`,!1],["a dynamic import()",`const m = await import(${a(e)});`,!1],["a require()",`const t = require(${a(e)});`,!1],["a side-effect import",`import ${a(e)};`,!1],["a namespace import",`import * as Tabler from ${a(e)};`,!0],["a star re-export",`export * from ${a(e)};`,!0],["a named star re-export",`export * as T from ${a(e)};`,!0]];for(const[l,o,p]of s)r(`the reader finds ${l}`,c(o).length===1),r(`\u2026and ${p?"flags":"does not flag"} it as the whole set`,f.test(o)===p);r("a package that is not Tabler is not Tabler",c('import x from "@tablerish/x";').length===0)}const i=n.filter(e=>$.test(e.path));r(`read the source (${i.length} JS/TS files, at least ${t.minFiles})`,i.length>=t.minFiles,"fewer means the walk broke, and every check below is vacuous");const m=i.filter(e=>c(e.text).length>0&&e.path!==t.helper).map(e=>e.path);r(t.helper?`only ${t.helper} imports Tabler`:"no file here imports Tabler",m.length===0,`Tabler is imported outside its one home:
|
|
2
|
+
${m.join(`
|
|
3
|
+
`)}
|
|
4
|
+
Draw social marks through ${g} instead.`);const h=i.filter(e=>f.test(e.text)).map(e=>e.path);if(r("nothing imports the whole Tabler set",h.length===0,`a namespace or star import from Tabler ships all ~6,000 icons (552 KB gzip):
|
|
5
|
+
${h.join(`
|
|
6
|
+
`)}`),t.helper){const e=i.find(s=>s.path===t.helper);if(r(`read the helper ${t.helper}`,!!e,"the social marks have lost their one home")&&e){const s=[...new Set(c(e.text))];r("the helper imports from @tabler/icons-react only (the React build, per-icon rewritable)",s.length===1&&s[0]==="@tabler/icons-react",JSON.stringify(s));const l=x.flatMap(o=>[`IconBrand${o}`,`IconBrand${o}Filled`]).filter(o=>!new RegExp(`\\b${o},`).test(e.text));r("the helper imports the sixteen marks by name",l.length===0,`no longer imports ${l.join(", ")}`)}}return b()}export{k as socialIconsImport};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type RuleReport, type SourceFile } from "./rule.js";
|
|
2
|
+
export type SourceStatusIsSharedOptions = {
|
|
3
|
+
readonly home?: string;
|
|
4
|
+
readonly callers: readonly string[];
|
|
5
|
+
readonly minFiles: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function sourceStatusIsShared(files: readonly SourceFile[], options: SourceStatusIsSharedOptions): RuleReport;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ruleChecks as d}from"./rule.js";const n=/sf-blogsource-status/,r=/from "@\/components\/SourceStatus"/;function f(m,t){const{check:s,report:i}=d("source status is shared");s("the import reader finds the shared block's import",r.test('import SourceStatus from "@/components/SourceStatus";')),s("\u2026and not a module whose name only starts the same",!r.test('import X from "@/components/SourceStatusLegacy";')),s("the class reader finds a hand-drawn status line",n.test('<p className="sf-blogsource-status" data-state={s}>'));const a=m.filter(e=>e.path.endsWith(".tsx"));s(`read the .tsx files (${a.length}, at least ${t.minFiles})`,a.length>=t.minFiles,"fewer means the walk broke, and every absence below is vacuous");const h=a.filter(e=>e.path!==t.home&&n.test(e.text)).map(e=>e.path);if(s(t.home?`only ${t.home} draws the status line`:"no file here draws the status line",h.length===0,`${h.join(" \xB7 ")} \u2014 draw it with the builder's components/SourceStatus.tsx`),t.home){const e=a.find(l=>l.path===t.home);s(`\u2026and ${t.home} really does draw it`,!!e&&n.test(e?.text??""))}const o=t.callers.filter(e=>!r.test(a.find(l=>l.path===e)?.text??""));s(`every named caller imports the shared block (${t.callers.length})`,t.callers.length>0&&o.length===0,t.callers.length===0?"no caller is named \u2014 this half measures nothing":o.join(" \xB7 "));const c=a.filter(e=>e.path!==t.home&&!t.callers.includes(e.path)&&r.test(e.text)).map(e=>e.path);return s("\u2026and no caller is missing from the list",c.length===0,c.join(" \xB7 ")),i()}export{f as sourceStatusIsShared};
|