From 651c25593ac95ee0f4839c3d81a1dd9bd9e9829c Mon Sep 17 00:00:00 2001 From: Jamie B <53781962+JamieB-gu@users.noreply.github.com> Date: Thu, 17 Oct 2024 13:19:56 +0100 Subject: [PATCH] Rename `format.ts` To `articleFormat.ts` (#12566) This matches the filename to the type, which is `ArticleFormat`. --- .../.storybook/decorators/splitThemeDecorator.tsx | 2 +- .../.storybook/decorators/themeDecorator.tsx | 2 +- .../.storybook/mocks/paletteDeclarations.ts | 2 +- .../.storybook/toolbar/globalColourScheme.ts | 2 +- dotcom-rendering/fixtures/manual/guideAtom.ts | 6 +++++- dotcom-rendering/fixtures/manual/key-events.ts | 2 +- dotcom-rendering/fixtures/manual/trails-nav.ts | 6 +++++- dotcom-rendering/fixtures/manual/trails.ts | 2 +- dotcom-rendering/scripts/gen-stories/get-stories.mjs | 2 +- dotcom-rendering/src/components/AdSlot.web.tsx | 2 +- .../src/components/AllEditorialNewslettersPage.tsx | 2 +- dotcom-rendering/src/components/Answers.stories.tsx | 2 +- dotcom-rendering/src/components/Answers.tsx | 2 +- .../src/components/AppsEpic.importable.stories.tsx | 2 +- .../src/components/AppsFooter.importable.stories.tsx | 2 +- .../src/components/AppsLightboxImage.importable.tsx | 2 +- dotcom-rendering/src/components/ArticleBody.tsx | 6 +++--- dotcom-rendering/src/components/ArticleContainer.tsx | 2 +- .../src/components/ArticleHeadline.stories.tsx | 5 +++-- dotcom-rendering/src/components/ArticleHeadline.tsx | 2 +- .../src/components/ArticleLastUpdated.stories.tsx | 2 +- .../src/components/ArticleLastUpdated.tsx | 2 +- .../src/components/ArticleMeta.apps.stories.tsx | 8 ++++++-- dotcom-rendering/src/components/ArticleMeta.apps.tsx | 7 +++++-- .../src/components/ArticleMeta.web.stories.tsx | 8 ++++++-- .../src/components/ArticleMeta.web.test.tsx | 2 +- dotcom-rendering/src/components/ArticleMeta.web.tsx | 4 ++-- dotcom-rendering/src/components/ArticlePage.tsx | 2 +- .../src/components/ArticleTitle.stories.tsx | 4 ++-- dotcom-rendering/src/components/ArticleTitle.tsx | 2 +- dotcom-rendering/src/components/Avatar.stories.tsx | 2 +- .../components/BlockquoteBlockComponent.stories.tsx | 2 +- dotcom-rendering/src/components/Blocks.amp.tsx | 2 +- dotcom-rendering/src/components/BodyArticle.amp.tsx | 4 ++-- dotcom-rendering/src/components/BodyLiveblog.amp.tsx | 2 +- dotcom-rendering/src/components/Branding.amp.tsx | 2 +- .../src/components/Branding.importable.tsx | 2 +- dotcom-rendering/src/components/BylineLink.test.tsx | 2 +- dotcom-rendering/src/components/BylineLink.tsx | 2 +- .../src/components/CalloutBlockComponent.stories.tsx | 2 +- .../CalloutEmbedBlockComponent.importable.tsx | 2 +- .../CalloutEmbedBlockComponent.stories.tsx | 2 +- dotcom-rendering/src/components/Caption.amp.tsx | 2 +- dotcom-rendering/src/components/Caption.stories.tsx | 2 +- dotcom-rendering/src/components/Caption.tsx | 2 +- .../src/components/CaptionBlockComponent.stories.tsx | 2 +- .../src/components/CaptionBlockComponent.tsx | 2 +- .../src/components/Card/Card.stories.tsx | 2 +- dotcom-rendering/src/components/Card/Card.tsx | 2 +- .../src/components/Card/components/CardBranding.tsx | 2 +- .../src/components/Card/components/CardFooter.tsx | 2 +- .../src/components/Card/components/CardWrapper.tsx | 2 +- .../src/components/CardHeadline.stories.tsx | 2 +- dotcom-rendering/src/components/CardHeadline.tsx | 2 +- .../src/components/Carousel.importable.tsx | 2 +- dotcom-rendering/src/components/Carousel.stories.tsx | 2 +- .../src/components/CartoonComponent.stories.tsx | 2 +- dotcom-rendering/src/components/CartoonComponent.tsx | 2 +- .../src/components/ChartAtom.stories.tsx | 2 +- .../src/components/ClickToView.stories.tsx | 2 +- .../src/components/CodeBlockComponent.stories.tsx | 2 +- dotcom-rendering/src/components/Contributor.test.tsx | 2 +- dotcom-rendering/src/components/Contributor.tsx | 2 +- dotcom-rendering/src/components/Dateline.tsx | 2 +- dotcom-rendering/src/components/DecideLines.tsx | 6 +++++- .../src/components/DesignTag.stories.tsx | 2 +- dotcom-rendering/src/components/DesignTag.tsx | 2 +- .../src/components/Discussion.stories.tsx | 2 +- .../Discussion/AbuseReportForm.stories.tsx | 2 +- .../src/components/Discussion/Avatar.stories.tsx | 2 +- .../src/components/Discussion/Badges.stories.tsx | 2 +- .../src/components/Discussion/Comment.stories.tsx | 2 +- .../Discussion/CommentContainer.stories.tsx | 2 +- .../components/Discussion/CommentForm.stories.tsx | 2 +- .../Discussion/CommentReplyPreview.stories.tsx | 2 +- .../src/components/Discussion/Comments.stories.tsx | 2 +- .../src/components/Discussion/Dropdown.stories.tsx | 2 +- .../src/components/Discussion/Filters.stories.tsx | 2 +- .../Discussion/FirstCommentWelcome.stories.tsx | 2 +- .../Discussion/LoadingComments.stories.tsx | 2 +- .../components/Discussion/LoadingPicks.stories.tsx | 2 +- .../src/components/Discussion/Pagination.stories.tsx | 4 ++-- .../components/Discussion/PillarButton.stories.tsx | 2 +- .../src/components/Discussion/Preview.stories.tsx | 2 +- .../Discussion/RecommendationCount.stories.tsx | 2 +- .../src/components/Discussion/Timestamp.stories.tsx | 2 +- .../src/components/Discussion/TopPick.stories.tsx | 2 +- .../src/components/Discussion/TopPicks.stories.tsx | 2 +- dotcom-rendering/src/components/DiscussionLayout.tsx | 2 +- .../src/components/DividerBlockComponent.stories.tsx | 2 +- dotcom-rendering/src/components/DropCap.tsx | 6 +++++- dotcom-rendering/src/components/Dropcap.stories.tsx | 2 +- .../src/components/DynamicPackage.stories.tsx | 6 +++++- .../src/components/DynamicSlow.stories.tsx | 2 +- .../EditorialButton/EditorialButton.stories.tsx | 2 +- .../EditorialButton/EditorialLinkButton.stories.tsx | 2 +- dotcom-rendering/src/components/Elements.amp.tsx | 4 ++-- .../src/components/EmailSignup.stories.tsx | 2 +- dotcom-rendering/src/components/Expandable.amp.tsx | 2 +- .../src/components/ExplainerAtom.stories.tsx | 2 +- .../src/components/FetchOnwardsData.importable.tsx | 2 +- dotcom-rendering/src/components/Figure.stories.tsx | 2 +- dotcom-rendering/src/components/Figure.tsx | 2 +- .../src/components/FlexibleGeneral.stories.tsx | 2 +- .../src/components/FollowButtons.stories.tsx | 2 +- dotcom-rendering/src/components/Footer.stories.tsx | 2 +- dotcom-rendering/src/components/Footer.tsx | 2 +- dotcom-rendering/src/components/FormatBoundary.tsx | 2 +- dotcom-rendering/src/components/FrontCard.tsx | 2 +- dotcom-rendering/src/components/FrontPage.tsx | 2 +- .../components/GetCricketScoreboard.importable.tsx | 2 +- .../src/components/GetMatchNav.importable.tsx | 2 +- .../src/components/GetMatchStats.importable.tsx | 2 +- .../src/components/GetMatchTabs.importable.tsx | 2 +- .../src/components/GoalAttempts.stories.tsx | 2 +- .../src/components/GuVideoBlockComponent.amp.tsx | 2 +- .../src/components/GuVideoBlockComponent.tsx | 2 +- .../src/components/GuideAtom/GuideAtom.stories.tsx | 2 +- dotcom-rendering/src/components/Header.amp.tsx | 2 +- .../src/components/HeadlineByline.stories.tsx | 2 +- dotcom-rendering/src/components/HeadlineByline.tsx | 4 ++-- .../src/components/ImageBlockComponent.amp.tsx | 2 +- .../src/components/ImageBlockComponent.stories.tsx | 2 +- .../src/components/ImageBlockComponent.tsx | 2 +- dotcom-rendering/src/components/ImageComponent.tsx | 2 +- .../InteractiveBlockComponent.importable.tsx | 2 +- .../components/InteractiveBlockComponent.stories.tsx | 2 +- .../InteractiveContentsBlockComponent.stories.tsx | 2 +- dotcom-rendering/src/components/Island.test.tsx | 2 +- .../src/components/KeyEventCard.stories.tsx | 2 +- .../src/components/KeyEventsCarousel.stories.tsx | 2 +- dotcom-rendering/src/components/KeyTakeaway.tsx | 2 +- .../src/components/KeyTakeaways.stories.tsx | 5 +++-- dotcom-rendering/src/components/KeyTakeaways.tsx | 2 +- dotcom-rendering/src/components/Kicker.stories.tsx | 2 +- .../src/components/KnowledgeQuizAtom.importable.tsx | 2 +- .../src/components/KnowledgeQuizAtom.stories.tsx | 2 +- .../src/components/KnowledgeQuizAtom.test.tsx | 2 +- .../components/LatestLinks.importable.stories.tsx | 2 +- .../src/components/LeftColumn.stories.tsx | 2 +- dotcom-rendering/src/components/Lightbox.stories.tsx | 2 +- dotcom-rendering/src/components/LightboxImages.tsx | 2 +- .../src/components/LightboxJavascript.tsx | 2 +- .../src/components/LightboxLayout.importable.tsx | 2 +- dotcom-rendering/src/components/LightboxLink.tsx | 2 +- .../src/components/LinkHeadline.stories.tsx | 2 +- .../src/components/LiveBlock.stories.tsx | 2 +- dotcom-rendering/src/components/LiveBlock.tsx | 2 +- .../src/components/LiveBlogBlocksAndAdverts.tsx | 2 +- dotcom-rendering/src/components/LiveBlogRenderer.tsx | 2 +- dotcom-rendering/src/components/MainMedia.amp.tsx | 2 +- dotcom-rendering/src/components/MainMedia.tsx | 4 ++-- .../components/MapEmbedBlockComponent.importable.tsx | 2 +- .../components/Masthead/HighlightsCard.stories.tsx | 2 +- .../src/components/Masthead/HighlightsCard.tsx | 2 +- .../src/components/Masthead/Titlepiece/Nav.mock.tsx | 2 +- .../Masthead/Titlepiece/Pillars.stories.tsx | 2 +- .../src/components/Masthead/Titlepiece/Pillars.tsx | 2 +- dotcom-rendering/src/components/MatchNav.stories.tsx | 2 +- .../src/components/MatchStats.stories.tsx | 2 +- dotcom-rendering/src/components/MatchStats.tsx | 2 +- .../src/components/MatchTabs.stories.tsx | 2 +- dotcom-rendering/src/components/MatchTabs.tsx | 2 +- dotcom-rendering/src/components/MiniProfile.tsx | 2 +- .../src/components/MiniProfiles.stories.tsx | 5 +++-- dotcom-rendering/src/components/MiniProfiles.tsx | 2 +- .../src/components/MostViewedFooterItem.tsx | 2 +- .../components/MostViewedFooterLayout.stories.tsx | 2 +- .../src/components/MostViewedRight.stories.tsx | 2 +- .../src/components/MostViewedRightItem.tsx | 2 +- .../components/MostViewedRightWithAd.importable.tsx | 2 +- .../components/MultiImageBlockComponent.stories.tsx | 2 +- .../src/components/MultiImageBlockComponent.tsx | 2 +- .../NumberedTitleBlockComponent.stories.tsx | 2 +- .../src/components/OnwardsUpper.importable.tsx | 6 +++++- .../src/components/Pagination.stories.tsx | 7 +++++-- dotcom-rendering/src/components/PaidForBand.amp.tsx | 2 +- .../components/PersonalityQuizAtom.importable.tsx | 2 +- .../src/components/PersonalityQuizAtom.stories.tsx | 2 +- .../src/components/PersonalityQuizAtom.test.tsx | 2 +- dotcom-rendering/src/components/Picture.tsx | 2 +- .../src/components/PinnedPost.stories.tsx | 2 +- .../src/components/ProfileAtom.stories.tsx | 2 +- .../components/PullQuoteBlockComponent.stories.tsx | 2 +- .../src/components/PullQuoteBlockComponent.tsx | 4 ++-- .../src/components/PullquoteBlockComponent.amp.tsx | 2 +- dotcom-rendering/src/components/QAndAExplainer.tsx | 2 +- .../src/components/QAndAExplainers.stories.tsx | 4 ++-- dotcom-rendering/src/components/QAndAExplainers.tsx | 2 +- .../src/components/QandaAtom.stories.tsx | 8 ++++++-- dotcom-rendering/src/components/RichLink.stories.tsx | 2 +- dotcom-rendering/src/components/RichLink.tsx | 4 ++-- .../src/components/RichLinkBlockComponent.amp.tsx | 2 +- .../components/RichLinkComponent.importable.test.tsx | 6 +++++- .../src/components/RichLinkComponent.importable.tsx | 2 +- dotcom-rendering/src/components/Section.tsx | 2 +- dotcom-rendering/src/components/SeriesLink.amp.tsx | 2 +- .../src/components/SeriesSectionLink.tsx | 2 +- .../src/components/ShareButton.importable.tsx | 2 +- .../src/components/ShareButton.stories.tsx | 2 +- dotcom-rendering/src/components/ShareIcons.amp.tsx | 2 +- .../src/components/SignedInAs.stories.tsx | 2 +- .../components/SpotifyBlockComponent.importable.tsx | 2 +- dotcom-rendering/src/components/Standfirst.amp.tsx | 2 +- .../src/components/Standfirst.stories.tsx | 2 +- dotcom-rendering/src/components/Standfirst.test.tsx | 2 +- dotcom-rendering/src/components/Standfirst.tsx | 2 +- .../components/StarRatingBlockComponent.stories.tsx | 2 +- dotcom-rendering/src/components/SubMeta.amp.tsx | 2 +- dotcom-rendering/src/components/SubMeta.stories.tsx | 7 +++++-- dotcom-rendering/src/components/SubMeta.tsx | 2 +- dotcom-rendering/src/components/Subheading.tsx | 2 +- .../src/components/SubheadingBlockComponent.amp.tsx | 5 ++++- .../components/SubheadingBlockComponent.stories.tsx | 9 +++++++-- .../src/components/SubheadingBlockComponent.tsx | 2 +- .../src/components/SupportingContent.stories.tsx | 2 +- .../src/components/SupportingContent.tsx | 2 +- .../src/components/TableOfContents.importable.tsx | 2 +- .../src/components/TableOfContents.stories.tsx | 2 +- dotcom-rendering/src/components/TagPage.tsx | 2 +- .../src/components/TextBlockComponent.amp.tsx | 2 +- .../src/components/TextBlockComponent.stories.tsx | 2 +- .../src/components/TextBlockComponent.tsx | 6 +++--- dotcom-rendering/src/components/Timeline.stories.tsx | 2 +- dotcom-rendering/src/components/Timeline.tsx | 2 +- dotcom-rendering/src/components/TimelineAtom.amp.tsx | 2 +- .../src/components/TimelineAtom.stories.tsx | 2 +- dotcom-rendering/src/components/Toast.stories.tsx | 2 +- dotcom-rendering/src/components/TopMeta.amp.tsx | 2 +- .../src/components/TopMetaAnalysis.amp.tsx | 2 +- .../src/components/TopMetaExtras.amp.tsx | 2 +- .../src/components/TopMetaLiveblog.amp.tsx | 2 +- dotcom-rendering/src/components/TopMetaNews.amp.tsx | 2 +- .../src/components/TopMetaOpinion.amp.tsx | 2 +- .../src/components/TopMetaPaidContent.amp.tsx | 2 +- dotcom-rendering/src/components/Treats.stories.tsx | 2 +- dotcom-rendering/src/components/Treats.tsx | 2 +- .../src/components/TwitterBlockComponent.amp.tsx | 2 +- .../VideoFacebookBlockComponent.importable.tsx | 2 +- .../VideoFacebookBlockComponent.stories.tsx | 2 +- .../src/components/VideoVimeoBlockComponent.amp.tsx | 2 +- .../components/VideoYoutubeBlockComponent.amp.tsx | 2 +- .../src/components/VimeoBlockComponent.stories.tsx | 2 +- .../src/components/VimeoBlockComponent.tsx | 2 +- .../src/components/WitnessBlockComponent.stories.tsx | 2 +- .../components/YoutubeAtom/YoutubeAtom.stories.tsx | 2 +- .../src/components/YoutubeAtom/YoutubeAtom.test.tsx | 2 +- .../src/components/YoutubeAtom/YoutubeAtom.tsx | 2 +- .../YoutubeAtom/YoutubeAtomExpiredOverlay.tsx | 2 +- .../components/YoutubeAtom/YoutubeAtomOverlay.tsx | 2 +- .../src/components/YoutubeBlockComponent.amp.tsx | 2 +- .../components/YoutubeBlockComponent.importable.tsx | 2 +- .../src/components/YoutubeBlockComponent.stories.tsx | 2 +- .../YoutubeEmbedBlockComponent.stories.tsx | 2 +- .../src/components/YoutubeEmbedBlockComponent.tsx | 2 +- dotcom-rendering/src/layouts/CommentLayout.tsx | 10 +++++----- .../src/layouts/DecideLayout.stories.tsx | 2 +- dotcom-rendering/src/layouts/DecideLayout.tsx | 2 +- dotcom-rendering/src/layouts/FrontLayout.tsx | 2 +- .../src/layouts/FullPageInteractiveLayout.tsx | 2 +- dotcom-rendering/src/layouts/ImmersiveLayout.tsx | 10 +++++----- dotcom-rendering/src/layouts/InteractiveLayout.tsx | 2 +- dotcom-rendering/src/layouts/LiveLayout.tsx | 2 +- .../src/layouts/NewsletterSignupLayout.tsx | 2 +- dotcom-rendering/src/layouts/PictureLayout.tsx | 2 +- dotcom-rendering/src/layouts/ShowcaseLayout.tsx | 8 ++++---- dotcom-rendering/src/layouts/StandardLayout.tsx | 8 ++++---- .../src/layouts/lib/interactiveLegacyStyling.ts | 2 +- dotcom-rendering/src/lib/ArticleRenderer.tsx | 2 +- .../lib/{format.test.ts => articleFormat.test.ts} | 8 ++++++-- .../src/lib/{format.ts => articleFormat.ts} | 0 dotcom-rendering/src/lib/cardHelpers.test.ts | 4 ++-- dotcom-rendering/src/lib/cardHelpers.ts | 2 +- dotcom-rendering/src/lib/decideLogo.ts | 2 +- dotcom-rendering/src/lib/decideNavPillar.ts | 2 +- dotcom-rendering/src/lib/decidePalette.ts | 8 ++++---- dotcom-rendering/src/lib/decideTrail.ts | 2 +- dotcom-rendering/src/lib/getDataLinkName.ts | 4 ++-- dotcom-rendering/src/lib/layoutHelpers.ts | 2 +- dotcom-rendering/src/lib/pillars.ts | 2 +- dotcom-rendering/src/lib/renderElement.tsx | 2 +- dotcom-rendering/src/lib/rootStyles.ts | 2 +- dotcom-rendering/src/lib/themeToPillar.ts | 2 +- .../src/model/enhance-ad-placeholders.test.ts | 2 +- .../src/model/enhance-ad-placeholders.ts | 2 +- .../src/model/enhance-blockquotes.test.ts | 6 +++++- dotcom-rendering/src/model/enhance-blockquotes.ts | 2 +- dotcom-rendering/src/model/enhance-images.test.ts | 2 +- dotcom-rendering/src/model/enhance-images.ts | 2 +- .../src/model/enhance-numbered-lists.test.ts | 2 +- dotcom-rendering/src/model/enhance-numbered-lists.ts | 2 +- dotcom-rendering/src/model/enhance-videos.test.ts | 2 +- dotcom-rendering/src/model/enhance-videos.ts | 2 +- dotcom-rendering/src/model/enhanceBlocks.ts | 2 +- dotcom-rendering/src/model/enhanceCards.ts | 6 +++++- dotcom-rendering/src/model/enhanceTreats.ts | 2 +- dotcom-rendering/src/model/extract-nav.ts | 2 +- dotcom-rendering/src/model/find-pillar.test.ts | 2 +- dotcom-rendering/src/model/find-pillar.ts | 6 +++++- .../src/model/insertPromotedNewsletter.test.ts | 2 +- .../src/model/insertPromotedNewsletter.ts | 2 +- dotcom-rendering/src/palette.ts | 4 ++-- dotcom-rendering/src/server/handler.article.amp.tsx | 2 +- dotcom-rendering/src/server/handler.article.web.ts | 2 +- dotcom-rendering/src/server/render.article.apps.tsx | 2 +- dotcom-rendering/src/server/render.article.web.tsx | 12 ++++++------ dotcom-rendering/src/server/render.front.web.tsx | 2 +- dotcom-rendering/src/types/article.ts | 2 +- dotcom-rendering/src/types/content.ts | 2 +- dotcom-rendering/src/types/front.ts | 6 +++++- dotcom-rendering/src/types/trails.ts | 2 +- dotcom-rendering/stories/generated/Card.stories.tsx | 2 +- 312 files changed, 441 insertions(+), 361 deletions(-) rename dotcom-rendering/src/lib/{format.test.ts => articleFormat.test.ts} (75%) rename dotcom-rendering/src/lib/{format.ts => articleFormat.ts} (100%) diff --git a/dotcom-rendering/.storybook/decorators/splitThemeDecorator.tsx b/dotcom-rendering/.storybook/decorators/splitThemeDecorator.tsx index 8c0faa5b21b..7572e713ce5 100644 --- a/dotcom-rendering/.storybook/decorators/splitThemeDecorator.tsx +++ b/dotcom-rendering/.storybook/decorators/splitThemeDecorator.tsx @@ -6,7 +6,7 @@ import { ArticleFormat, ArticleSpecial, Pillar, -} from '../../src/lib/format'; +} from '../../src/lib/articleFormat'; import { palette as sourcePalette, space, diff --git a/dotcom-rendering/.storybook/decorators/themeDecorator.tsx b/dotcom-rendering/.storybook/decorators/themeDecorator.tsx index 988a714a5a7..1eb110abac2 100644 --- a/dotcom-rendering/.storybook/decorators/themeDecorator.tsx +++ b/dotcom-rendering/.storybook/decorators/themeDecorator.tsx @@ -12,7 +12,7 @@ import { type StoryContext, type StrictArgs, } from '@storybook/react'; -import { ArticleFormat } from '../../src/lib/format'; +import { ArticleFormat } from '../../src/lib/articleFormat'; import type { CSSProperties } from 'react'; const darkStoryCss = css` diff --git a/dotcom-rendering/.storybook/mocks/paletteDeclarations.ts b/dotcom-rendering/.storybook/mocks/paletteDeclarations.ts index 0e3165b9e63..b5c6e2e8f75 100644 --- a/dotcom-rendering/.storybook/mocks/paletteDeclarations.ts +++ b/dotcom-rendering/.storybook/mocks/paletteDeclarations.ts @@ -1,4 +1,4 @@ -import { ArticleFormat } from '../../src/lib/format'; +import { ArticleFormat } from '../../src/lib/articleFormat'; import { paletteDeclarations } from '../../src/palette'; /** diff --git a/dotcom-rendering/.storybook/toolbar/globalColourScheme.ts b/dotcom-rendering/.storybook/toolbar/globalColourScheme.ts index b8698fea4db..a70fca864e1 100644 --- a/dotcom-rendering/.storybook/toolbar/globalColourScheme.ts +++ b/dotcom-rendering/.storybook/toolbar/globalColourScheme.ts @@ -6,7 +6,7 @@ import { ArticleDesign, Pillar, type ArticleFormat, -} from '../../src/lib/format'; +} from '../../src/lib/articleFormat'; const defaultFormat: ArticleFormat = { display: ArticleDisplay.Standard, diff --git a/dotcom-rendering/fixtures/manual/guideAtom.ts b/dotcom-rendering/fixtures/manual/guideAtom.ts index 2ce275d2c31..b82878b30fd 100644 --- a/dotcom-rendering/fixtures/manual/guideAtom.ts +++ b/dotcom-rendering/fixtures/manual/guideAtom.ts @@ -1,4 +1,8 @@ -import { ArticleDesign, ArticleDisplay, Pillar } from '../../src/lib/format'; +import { + ArticleDesign, + ArticleDisplay, + Pillar, +} from '../../src/lib/articleFormat'; export const defaultStoryExpanded = { id: 'a76d998e-d4b0-4d00-8afb-773eddb4064c', diff --git a/dotcom-rendering/fixtures/manual/key-events.ts b/dotcom-rendering/fixtures/manual/key-events.ts index 8992ce8cf08..13f76837a21 100644 --- a/dotcom-rendering/fixtures/manual/key-events.ts +++ b/dotcom-rendering/fixtures/manual/key-events.ts @@ -3,7 +3,7 @@ import { ArticleDisplay, type ArticleFormat, Pillar, -} from '../../src/lib/format'; +} from '../../src/lib/articleFormat'; export interface KeyEventCard { id: string; diff --git a/dotcom-rendering/fixtures/manual/trails-nav.ts b/dotcom-rendering/fixtures/manual/trails-nav.ts index b11efa3b7e3..dc34021c0b5 100644 --- a/dotcom-rendering/fixtures/manual/trails-nav.ts +++ b/dotcom-rendering/fixtures/manual/trails-nav.ts @@ -1,4 +1,8 @@ -import { ArticleDesign, ArticleDisplay, Pillar } from '../../src/lib/format'; +import { + ArticleDesign, + ArticleDisplay, + Pillar, +} from '../../src/lib/articleFormat'; import type { TrailType } from '../../src/types/trails'; export const trails: [ diff --git a/dotcom-rendering/fixtures/manual/trails.ts b/dotcom-rendering/fixtures/manual/trails.ts index 8fc816d4d1c..745f6c9602c 100644 --- a/dotcom-rendering/fixtures/manual/trails.ts +++ b/dotcom-rendering/fixtures/manual/trails.ts @@ -3,7 +3,7 @@ import { ArticleDisplay, type ArticleFormat, Pillar, -} from '../../src/lib/format'; +} from '../../src/lib/articleFormat'; import type { DCRFrontCard } from '../../src/types/front'; import { discussionApiUrl } from './discussionApiUrl'; diff --git a/dotcom-rendering/scripts/gen-stories/get-stories.mjs b/dotcom-rendering/scripts/gen-stories/get-stories.mjs index 8c0e2f03eda..7813736ec2a 100644 --- a/dotcom-rendering/scripts/gen-stories/get-stories.mjs +++ b/dotcom-rendering/scripts/gen-stories/get-stories.mjs @@ -36,7 +36,7 @@ const CARD_TEMPLATE_HEADER = ` import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator'; import { CardsWithDifferentThemes } from '../../src/components/Card/Card.stories'; -import { ArticleDesign, ArticleDisplay, ArticleSpecial, Pillar } from '../../src/lib/format'; +import { ArticleDesign, ArticleDisplay, ArticleSpecial, Pillar } from '../../src/lib/articleFormat'; // eslint-disable-next-line import/no-default-export -- we need a default here export default { diff --git a/dotcom-rendering/src/components/AdSlot.web.tsx b/dotcom-rendering/src/components/AdSlot.web.tsx index 4d4e2994d32..151407177f3 100644 --- a/dotcom-rendering/src/components/AdSlot.web.tsx +++ b/dotcom-rendering/src/components/AdSlot.web.tsx @@ -11,7 +11,7 @@ import { until, } from '@guardian/source/foundations'; import { Hide } from '@guardian/source/react-components'; -import { ArticleDisplay } from '../lib/format'; +import { ArticleDisplay } from '../lib/articleFormat'; import { getZIndex } from '../lib/getZIndex'; import { LABS_HEADER_HEIGHT } from '../lib/labs-constants'; import { palette as schemedPalette } from '../palette'; diff --git a/dotcom-rendering/src/components/AllEditorialNewslettersPage.tsx b/dotcom-rendering/src/components/AllEditorialNewslettersPage.tsx index 725646ca42f..b1240773121 100644 --- a/dotcom-rendering/src/components/AllEditorialNewslettersPage.tsx +++ b/dotcom-rendering/src/components/AllEditorialNewslettersPage.tsx @@ -1,7 +1,7 @@ import { Global } from '@emotion/react'; import { StrictMode } from 'react'; import { AllEditorialNewslettersPageLayout } from '../layouts/AllEditorialNewslettersPageLayout'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { rootStyles } from '../lib/rootStyles'; import type { NavType } from '../model/extract-nav'; import type { DCRNewslettersPageType } from '../types/newslettersPage'; diff --git a/dotcom-rendering/src/components/Answers.stories.tsx b/dotcom-rendering/src/components/Answers.stories.tsx index c902259691e..b1de725ac75 100644 --- a/dotcom-rendering/src/components/Answers.stories.tsx +++ b/dotcom-rendering/src/components/Answers.stories.tsx @@ -2,7 +2,7 @@ import { css } from '@emotion/react'; import { Radio, RadioGroup } from '@guardian/source/react-components'; import type { Meta, StoryObj } from '@storybook/react'; import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { CorrectSelectedAnswer, IncorrectAnswer, diff --git a/dotcom-rendering/src/components/Answers.tsx b/dotcom-rendering/src/components/Answers.tsx index 1bd22c212aa..c1591b739db 100644 --- a/dotcom-rendering/src/components/Answers.tsx +++ b/dotcom-rendering/src/components/Answers.tsx @@ -7,7 +7,7 @@ import { textSans17, } from '@guardian/source/foundations'; import { SvgCheckmark, SvgCross } from '@guardian/source/react-components'; -import { ArticleSpecial, type ArticleTheme } from '../lib/format'; +import { ArticleSpecial, type ArticleTheme } from '../lib/articleFormat'; import { palette as schemedPalette } from '../palette'; // We export Radio wrapper styles to override Source Radio buttons to align diff --git a/dotcom-rendering/src/components/AppsEpic.importable.stories.tsx b/dotcom-rendering/src/components/AppsEpic.importable.stories.tsx index 964a77c1476..9966d3e3dd0 100644 --- a/dotcom-rendering/src/components/AppsEpic.importable.stories.tsx +++ b/dotcom-rendering/src/components/AppsEpic.importable.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from '@storybook/react'; import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { AppsEpic as AppsEpicComponent } from './AppsEpic.importable'; const meta = { diff --git a/dotcom-rendering/src/components/AppsFooter.importable.stories.tsx b/dotcom-rendering/src/components/AppsFooter.importable.stories.tsx index 8a48d625799..9a5d53f4724 100644 --- a/dotcom-rendering/src/components/AppsFooter.importable.stories.tsx +++ b/dotcom-rendering/src/components/AppsFooter.importable.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from '@storybook/react'; import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { AppsFooter as AppsFooterComponent } from './AppsFooter.importable'; const meta = { diff --git a/dotcom-rendering/src/components/AppsLightboxImage.importable.tsx b/dotcom-rendering/src/components/AppsLightboxImage.importable.tsx index 7bf4e394d56..09c19c05e4e 100644 --- a/dotcom-rendering/src/components/AppsLightboxImage.importable.tsx +++ b/dotcom-rendering/src/components/AppsLightboxImage.importable.tsx @@ -1,5 +1,5 @@ import { css } from '@emotion/react'; -import type { ArticleFormat } from '../lib/format'; +import type { ArticleFormat } from '../lib/articleFormat'; import { type RoleType } from '../types/content'; import { openLightboxForImageId } from './AppsLightboxImageStore.importable'; import type { Loading } from './CardPicture'; diff --git a/dotcom-rendering/src/components/ArticleBody.tsx b/dotcom-rendering/src/components/ArticleBody.tsx index f0d61020b98..2cd311738a5 100644 --- a/dotcom-rendering/src/components/ArticleBody.tsx +++ b/dotcom-rendering/src/components/ArticleBody.tsx @@ -5,13 +5,13 @@ import { remSpace, textEgyptian17, } from '@guardian/source/foundations'; -import { ArticleRenderer } from '../lib/ArticleRenderer'; -import type { EditionId } from '../lib/edition'; import { ArticleDesign, ArticleDisplay, type ArticleFormat, -} from '../lib/format'; +} from '../lib/articleFormat'; +import { ArticleRenderer } from '../lib/ArticleRenderer'; +import type { EditionId } from '../lib/edition'; import { decideLanguage, decideLanguageDirection } from '../lib/lang'; import { revealStyles } from '../lib/revealStyles'; import { palette as themePalette } from '../palette'; diff --git a/dotcom-rendering/src/components/ArticleContainer.tsx b/dotcom-rendering/src/components/ArticleContainer.tsx index 6d9f1a00f13..169efaf9628 100644 --- a/dotcom-rendering/src/components/ArticleContainer.tsx +++ b/dotcom-rendering/src/components/ArticleContainer.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { adSizes, constants } from '@guardian/commercial'; import { from, space, until } from '@guardian/source/foundations'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import { palette } from '../palette'; import { carrotAdStyles, labelStyles } from './AdSlot.web'; diff --git a/dotcom-rendering/src/components/ArticleHeadline.stories.tsx b/dotcom-rendering/src/components/ArticleHeadline.stories.tsx index 75378364a81..a6a408f90f6 100644 --- a/dotcom-rendering/src/components/ArticleHeadline.stories.tsx +++ b/dotcom-rendering/src/components/ArticleHeadline.stories.tsx @@ -6,9 +6,10 @@ import { ArticleDesign, ArticleDisplay, ArticleSpecial, + formatToString, + getAllThemes, Pillar, -} from '../lib/format'; -import { formatToString, getAllThemes } from '../lib/format'; +} from '../lib/articleFormat'; import { palette } from '../palette'; import { ArticleHeadline } from './ArticleHeadline'; import { Standfirst } from './Standfirst'; diff --git a/dotcom-rendering/src/components/ArticleHeadline.tsx b/dotcom-rendering/src/components/ArticleHeadline.tsx index ba262a5b292..d9e3ad1df27 100644 --- a/dotcom-rendering/src/components/ArticleHeadline.tsx +++ b/dotcom-rendering/src/components/ArticleHeadline.tsx @@ -23,7 +23,7 @@ import { type ArticleFormat, ArticleSpecial, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { getZIndex } from '../lib/getZIndex'; import { palette as themePalette } from '../palette'; import type { TagType } from '../types/tag'; diff --git a/dotcom-rendering/src/components/ArticleLastUpdated.stories.tsx b/dotcom-rendering/src/components/ArticleLastUpdated.stories.tsx index 538e9371486..db110316f37 100644 --- a/dotcom-rendering/src/components/ArticleLastUpdated.stories.tsx +++ b/dotcom-rendering/src/components/ArticleLastUpdated.stories.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import type { Meta, StoryObj } from '@storybook/react'; import { allModes } from '../../.storybook/modes'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { palette } from '../palette'; import { ArticleLastUpdated } from './ArticleLastUpdated'; diff --git a/dotcom-rendering/src/components/ArticleLastUpdated.tsx b/dotcom-rendering/src/components/ArticleLastUpdated.tsx index faa2c175b9d..3ee10943da5 100644 --- a/dotcom-rendering/src/components/ArticleLastUpdated.tsx +++ b/dotcom-rendering/src/components/ArticleLastUpdated.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { timeAgo } from '@guardian/libs'; import { textSans15, textSansBold15 } from '@guardian/source/foundations'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import { palette } from '../palette'; import { Island } from './Island'; import { PulsingDot } from './PulsingDot.importable'; diff --git a/dotcom-rendering/src/components/ArticleMeta.apps.stories.tsx b/dotcom-rendering/src/components/ArticleMeta.apps.stories.tsx index de5d8aa9c07..6a361b1a1a2 100644 --- a/dotcom-rendering/src/components/ArticleMeta.apps.stories.tsx +++ b/dotcom-rendering/src/components/ArticleMeta.apps.stories.tsx @@ -2,8 +2,12 @@ import type { Meta, StoryObj } from '@storybook/react'; import { leftColumnDecorator } from '../../.storybook/decorators/gridDecorators'; import { defaultFormats } from '../../.storybook/decorators/splitThemeDecorator'; import { allModes } from '../../.storybook/modes'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; -import { getAllThemes } from '../lib/format'; +import { + ArticleDesign, + ArticleDisplay, + getAllThemes, + Pillar, +} from '../lib/articleFormat'; import { ArticleMetaApps } from './ArticleMeta.apps'; const meta = { diff --git a/dotcom-rendering/src/components/ArticleMeta.apps.tsx b/dotcom-rendering/src/components/ArticleMeta.apps.tsx index 5d2eae6fc51..da06f5efd09 100644 --- a/dotcom-rendering/src/components/ArticleMeta.apps.tsx +++ b/dotcom-rendering/src/components/ArticleMeta.apps.tsx @@ -4,9 +4,12 @@ import { from, space, until } from '@guardian/source/foundations'; import { StraightLines } from '@guardian/source-development-kitchen/react-components'; import type { ReactNode } from 'react'; import { interactiveLegacyClasses } from '../layouts/lib/interactiveLegacyStyling'; +import { + ArticleDesign, + ArticleDisplay, + type ArticleFormat, +} from '../lib/articleFormat'; import { getSoleContributor } from '../lib/byline'; -import { ArticleDesign, ArticleDisplay } from '../lib/format'; -import type { ArticleFormat } from '../lib/format'; import { palette as themePalette } from '../palette'; import type { Branding as BrandingType } from '../types/branding'; import type { TagType } from '../types/tag'; diff --git a/dotcom-rendering/src/components/ArticleMeta.web.stories.tsx b/dotcom-rendering/src/components/ArticleMeta.web.stories.tsx index 66609fed69b..747a6bab1aa 100644 --- a/dotcom-rendering/src/components/ArticleMeta.web.stories.tsx +++ b/dotcom-rendering/src/components/ArticleMeta.web.stories.tsx @@ -9,8 +9,12 @@ import type { Meta, StoryObj } from '@storybook/react'; import { leftColumnDecorator } from '../../.storybook/decorators/gridDecorators'; import { defaultFormats } from '../../.storybook/decorators/splitThemeDecorator'; import { allModes } from '../../.storybook/modes'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; -import { getAllThemes } from '../lib/format'; +import { + ArticleDesign, + ArticleDisplay, + getAllThemes, + Pillar, +} from '../lib/articleFormat'; import { palette } from '../palette'; import { ArticleMeta } from './ArticleMeta.web'; diff --git a/dotcom-rendering/src/components/ArticleMeta.web.test.tsx b/dotcom-rendering/src/components/ArticleMeta.web.test.tsx index 362a4f928d0..399a8f774e3 100644 --- a/dotcom-rendering/src/components/ArticleMeta.web.test.tsx +++ b/dotcom-rendering/src/components/ArticleMeta.web.test.tsx @@ -1,6 +1,6 @@ import { render } from '@testing-library/react'; import { interactiveLegacyClasses } from '../layouts/lib/interactiveLegacyStyling'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { ArticleMeta, shouldShowContributor } from './ArticleMeta.web'; import { ConfigProvider } from './ConfigContext'; diff --git a/dotcom-rendering/src/components/ArticleMeta.web.tsx b/dotcom-rendering/src/components/ArticleMeta.web.tsx index 3e537332bc9..01b65194723 100644 --- a/dotcom-rendering/src/components/ArticleMeta.web.tsx +++ b/dotcom-rendering/src/components/ArticleMeta.web.tsx @@ -2,13 +2,13 @@ import { css } from '@emotion/react'; import { between, from, space, until } from '@guardian/source/foundations'; import { StraightLines } from '@guardian/source-development-kitchen/react-components'; import { interactiveLegacyClasses } from '../layouts/lib/interactiveLegacyStyling'; -import { getSoleContributor } from '../lib/byline'; import { ArticleDesign, ArticleDisplay, type ArticleFormat, ArticleSpecial, -} from '../lib/format'; +} from '../lib/articleFormat'; +import { getSoleContributor } from '../lib/byline'; import { palette as themePalette } from '../palette'; import type { Branding as BrandingType } from '../types/branding'; import type { TagType } from '../types/tag'; diff --git a/dotcom-rendering/src/components/ArticlePage.tsx b/dotcom-rendering/src/components/ArticlePage.tsx index ee93f33a6b6..85f849b74cf 100644 --- a/dotcom-rendering/src/components/ArticlePage.tsx +++ b/dotcom-rendering/src/components/ArticlePage.tsx @@ -2,7 +2,7 @@ import { Global } from '@emotion/react'; import { StrictMode } from 'react'; import { DecideLayout } from '../layouts/DecideLayout'; import { buildAdTargeting } from '../lib/ad-targeting'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import { rootStyles } from '../lib/rootStyles'; import { filterABTestSwitches } from '../model/enhance-switches'; import type { NavType } from '../model/extract-nav'; diff --git a/dotcom-rendering/src/components/ArticleTitle.stories.tsx b/dotcom-rendering/src/components/ArticleTitle.stories.tsx index f2d1c307353..8a80b250d7a 100644 --- a/dotcom-rendering/src/components/ArticleTitle.stories.tsx +++ b/dotcom-rendering/src/components/ArticleTitle.stories.tsx @@ -6,9 +6,9 @@ import { ArticleDesign, ArticleDisplay, ArticleSpecial, + getAllThemes, Pillar, -} from '../lib/format'; -import { getAllThemes } from '../lib/format'; +} from '../lib/articleFormat'; import { ArticleTitle } from './ArticleTitle'; const meta = { diff --git a/dotcom-rendering/src/components/ArticleTitle.tsx b/dotcom-rendering/src/components/ArticleTitle.tsx index aaa3e96f095..51a7237e321 100644 --- a/dotcom-rendering/src/components/ArticleTitle.tsx +++ b/dotcom-rendering/src/components/ArticleTitle.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { from } from '@guardian/source/foundations'; -import { ArticleDisplay, type ArticleFormat } from '../lib/format'; +import { ArticleDisplay, type ArticleFormat } from '../lib/articleFormat'; import type { TagType } from '../types/tag'; import { SeriesSectionLink } from './SeriesSectionLink'; diff --git a/dotcom-rendering/src/components/Avatar.stories.tsx b/dotcom-rendering/src/components/Avatar.stories.tsx index 907fa6297a8..b025f89774a 100644 --- a/dotcom-rendering/src/components/Avatar.stories.tsx +++ b/dotcom-rendering/src/components/Avatar.stories.tsx @@ -7,7 +7,7 @@ import { ArticleSpecial, type ArticleTheme, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { Avatar } from './Avatar'; const meta = { diff --git a/dotcom-rendering/src/components/BlockquoteBlockComponent.stories.tsx b/dotcom-rendering/src/components/BlockquoteBlockComponent.stories.tsx index 016662986b2..eb54924d5f6 100644 --- a/dotcom-rendering/src/components/BlockquoteBlockComponent.stories.tsx +++ b/dotcom-rendering/src/components/BlockquoteBlockComponent.stories.tsx @@ -8,7 +8,7 @@ import { getAllDesigns, getAllThemes, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { BlockquoteBlockComponent } from './BlockquoteBlockComponent'; const meta = { diff --git a/dotcom-rendering/src/components/Blocks.amp.tsx b/dotcom-rendering/src/components/Blocks.amp.tsx index 059326c943f..c0ad1782b6b 100644 --- a/dotcom-rendering/src/components/Blocks.amp.tsx +++ b/dotcom-rendering/src/components/Blocks.amp.tsx @@ -1,9 +1,9 @@ import { css } from '@emotion/react'; import { palette, text, textSans12 } from '@guardian/source/foundations'; +import type { ArticleTheme } from '../lib/articleFormat'; import { blockLink } from '../lib/block-link.amp'; import type { EditionId } from '../lib/edition'; import { findBlockAdSlots } from '../lib/find-adslots.amp'; -import type { ArticleTheme } from '../lib/format'; import { pillarPalette_DO_NOT_USE } from '../lib/pillars'; import type { CommercialProperties } from '../types/commercial'; import type { Switches } from '../types/config'; diff --git a/dotcom-rendering/src/components/BodyArticle.amp.tsx b/dotcom-rendering/src/components/BodyArticle.amp.tsx index 1a6d30b7ac8..bbb38d4d311 100644 --- a/dotcom-rendering/src/components/BodyArticle.amp.tsx +++ b/dotcom-rendering/src/components/BodyArticle.amp.tsx @@ -2,7 +2,6 @@ import { css } from '@emotion/react'; import { palette, text, textSans12, until } from '@guardian/source/foundations'; import React from 'react'; import { buildAdTargeting } from '../lib/ad-targeting'; -import { findAdSlots } from '../lib/find-adslots.amp'; import { ArticleDesign, type ArticleTheme, @@ -10,7 +9,8 @@ import { decideTheme, ArticleDesign as Design, ArticleSpecial as Special, -} from '../lib/format'; +} from '../lib/articleFormat'; +import { findAdSlots } from '../lib/find-adslots.amp'; import { pillarPalette_DO_NOT_USE } from '../lib/pillars'; import { getSharingUrls } from '../lib/sharing-urls'; import { insertDisclaimerElement } from '../model/enhance-disclaimer'; diff --git a/dotcom-rendering/src/components/BodyLiveblog.amp.tsx b/dotcom-rendering/src/components/BodyLiveblog.amp.tsx index 2ee0330dd28..4f6e69781e2 100644 --- a/dotcom-rendering/src/components/BodyLiveblog.amp.tsx +++ b/dotcom-rendering/src/components/BodyLiveblog.amp.tsx @@ -5,7 +5,7 @@ import { textSans12, } from '@guardian/source/foundations'; import { buildAdTargeting } from '../lib/ad-targeting'; -import { decideTheme } from '../lib/format'; +import { decideTheme } from '../lib/articleFormat'; import { getSharingUrls } from '../lib/sharing-urls'; import RefreshIcon from '../static/icons/refresh.svg'; import type { AMPArticleModel } from '../types/article.amp'; diff --git a/dotcom-rendering/src/components/Branding.amp.tsx b/dotcom-rendering/src/components/Branding.amp.tsx index bc236513f09..a31e4cc29fe 100644 --- a/dotcom-rendering/src/components/Branding.amp.tsx +++ b/dotcom-rendering/src/components/Branding.amp.tsx @@ -2,8 +2,8 @@ import { css } from '@emotion/react'; import { isUndefined } from '@guardian/libs'; import { textSans12 } from '@guardian/source/foundations'; import React from 'react'; +import type { ArticleTheme } from '../lib/articleFormat'; import { isEditionId } from '../lib/edition'; -import type { ArticleTheme } from '../lib/format'; import { neutralBorder, pillarPalette_DO_NOT_USE } from '../lib/pillars'; import { editionRegionClasses } from '../lib/region-classes.amp'; import type { Branding as BrandingType } from '../types/branding'; diff --git a/dotcom-rendering/src/components/Branding.importable.tsx b/dotcom-rendering/src/components/Branding.importable.tsx index 2a4550d9bd9..21e84621d9e 100644 --- a/dotcom-rendering/src/components/Branding.importable.tsx +++ b/dotcom-rendering/src/components/Branding.importable.tsx @@ -9,7 +9,7 @@ import { ArticleDesign, type ArticleFormat, ArticleSpecial, -} from '../lib/format'; +} from '../lib/articleFormat'; import { getOphanComponents } from '../lib/labs'; import { palette } from '../palette'; import type { Branding as BrandingType } from '../types/branding'; diff --git a/dotcom-rendering/src/components/BylineLink.test.tsx b/dotcom-rendering/src/components/BylineLink.test.tsx index 0113ac8f277..f4461478ae2 100644 --- a/dotcom-rendering/src/components/BylineLink.test.tsx +++ b/dotcom-rendering/src/components/BylineLink.test.tsx @@ -1,6 +1,6 @@ import { render } from '@testing-library/react'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { getContributorTagsForToken } from '../lib/byline'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; import type { TagType } from '../types/tag'; import { bylineAsTokens, diff --git a/dotcom-rendering/src/components/BylineLink.tsx b/dotcom-rendering/src/components/BylineLink.tsx index 93f4ca12bf0..d4367c2ed3a 100644 --- a/dotcom-rendering/src/components/BylineLink.tsx +++ b/dotcom-rendering/src/components/BylineLink.tsx @@ -1,12 +1,12 @@ import { isString } from '@guardian/libs'; import { Hide } from '@guardian/source/react-components'; import { DottedLines } from '@guardian/source-development-kitchen/react-components'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import { getBylineComponentsFromTokens, getSoleContributor, isContributor, } from '../lib/byline'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; import { palette as themePalette } from '../palette'; import type { TagType } from '../types/tag'; import { useConfig } from './ConfigContext'; diff --git a/dotcom-rendering/src/components/CalloutBlockComponent.stories.tsx b/dotcom-rendering/src/components/CalloutBlockComponent.stories.tsx index abd1fdd355a..f15516aaa21 100644 --- a/dotcom-rendering/src/components/CalloutBlockComponent.stories.tsx +++ b/dotcom-rendering/src/components/CalloutBlockComponent.stories.tsx @@ -7,7 +7,7 @@ import { ArticleDisplay, type ArticleFormat, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { CalloutBlockComponent } from './CalloutBlockComponent.importable'; const tomorrow = new Date().setDate(new Date().getDate() + 1) / 1000; diff --git a/dotcom-rendering/src/components/CalloutEmbedBlockComponent.importable.tsx b/dotcom-rendering/src/components/CalloutEmbedBlockComponent.importable.tsx index 38cb02fd698..8ca13f2f796 100644 --- a/dotcom-rendering/src/components/CalloutEmbedBlockComponent.importable.tsx +++ b/dotcom-rendering/src/components/CalloutEmbedBlockComponent.importable.tsx @@ -6,8 +6,8 @@ import { } from '@guardian/source/foundations'; import { Button } from '@guardian/source/react-components'; import { useEffect, useState } from 'react'; +import type { ArticleFormat } from '../lib/articleFormat'; import { decidePalette } from '../lib/decidePalette'; -import type { ArticleFormat } from '../lib/format'; import MinusIcon from '../static/icons/minus.svg'; import PlusIcon from '../static/icons/plus.svg'; import type { diff --git a/dotcom-rendering/src/components/CalloutEmbedBlockComponent.stories.tsx b/dotcom-rendering/src/components/CalloutEmbedBlockComponent.stories.tsx index 0553366fdc3..e55b4c0f8d9 100644 --- a/dotcom-rendering/src/components/CalloutEmbedBlockComponent.stories.tsx +++ b/dotcom-rendering/src/components/CalloutEmbedBlockComponent.stories.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import fetchMock from 'fetch-mock'; import { calloutCampaign } from '../../fixtures/manual/calloutCampaign'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { CalloutEmbedBlockComponent } from './CalloutEmbedBlockComponent.importable'; export default { diff --git a/dotcom-rendering/src/components/Caption.amp.tsx b/dotcom-rendering/src/components/Caption.amp.tsx index c51d64f5528..174906a0ec2 100644 --- a/dotcom-rendering/src/components/Caption.amp.tsx +++ b/dotcom-rendering/src/components/Caption.amp.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { palette, textSans12 } from '@guardian/source/foundations'; import React from 'react'; -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import { pillarPalette_DO_NOT_USE } from '../lib/pillars'; import TriangleIcon from '../static/icons/triangle.svg'; diff --git a/dotcom-rendering/src/components/Caption.stories.tsx b/dotcom-rendering/src/components/Caption.stories.tsx index 6dfdf9dd9cb..75d77d0dbf9 100644 --- a/dotcom-rendering/src/components/Caption.stories.tsx +++ b/dotcom-rendering/src/components/Caption.stories.tsx @@ -8,7 +8,7 @@ import { type ArticleFormat, ArticleSpecial, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { Caption } from './Caption'; import { Section } from './Section'; import { StarRating } from './StarRating/StarRating'; diff --git a/dotcom-rendering/src/components/Caption.tsx b/dotcom-rendering/src/components/Caption.tsx index 2ce8f162329..bcc801d5cf0 100644 --- a/dotcom-rendering/src/components/Caption.tsx +++ b/dotcom-rendering/src/components/Caption.tsx @@ -11,7 +11,7 @@ import { ArticleDisplay, type ArticleFormat, ArticleSpecial, -} from '../lib/format'; +} from '../lib/articleFormat'; import { palette } from '../palette'; import CameraSvg from '../static/icons/camera.svg'; import VideoSvg from '../static/icons/video-icon.svg'; diff --git a/dotcom-rendering/src/components/CaptionBlockComponent.stories.tsx b/dotcom-rendering/src/components/CaptionBlockComponent.stories.tsx index 3d3b3d2841c..36077e0229d 100644 --- a/dotcom-rendering/src/components/CaptionBlockComponent.stories.tsx +++ b/dotcom-rendering/src/components/CaptionBlockComponent.stories.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { CaptionBlockComponent } from './CaptionBlockComponent'; import { Flex } from './Flex'; import { LeftColumn } from './LeftColumn'; diff --git a/dotcom-rendering/src/components/CaptionBlockComponent.tsx b/dotcom-rendering/src/components/CaptionBlockComponent.tsx index 99d6c1c8e82..2cf1f6d8740 100644 --- a/dotcom-rendering/src/components/CaptionBlockComponent.tsx +++ b/dotcom-rendering/src/components/CaptionBlockComponent.tsx @@ -1,4 +1,4 @@ -import type { ArticleFormat } from '../lib/format'; +import type { ArticleFormat } from '../lib/articleFormat'; import { Caption } from './Caption'; type Props = { diff --git a/dotcom-rendering/src/components/Card/Card.stories.tsx b/dotcom-rendering/src/components/Card/Card.stories.tsx index 7f957a64c54..0409703a940 100644 --- a/dotcom-rendering/src/components/Card/Card.stories.tsx +++ b/dotcom-rendering/src/components/Card/Card.stories.tsx @@ -7,7 +7,7 @@ import { ArticleDisplay, ArticleSpecial, Pillar, -} from '../../lib/format'; +} from '../../lib/articleFormat'; import type { Branding } from '../../types/branding'; import type { DCRContainerPalette } from '../../types/front'; import type { MainMedia } from '../../types/mainMedia'; diff --git a/dotcom-rendering/src/components/Card/Card.tsx b/dotcom-rendering/src/components/Card/Card.tsx index 880cc09f4f7..ee3ec3fbd85 100644 --- a/dotcom-rendering/src/components/Card/Card.tsx +++ b/dotcom-rendering/src/components/Card/Card.tsx @@ -6,8 +6,8 @@ import { space, } from '@guardian/source/foundations'; import { Hide, Link } from '@guardian/source/react-components'; +import { ArticleDesign, type ArticleFormat } from '../../lib/articleFormat'; import { isMediaCard } from '../../lib/cardHelpers'; -import { ArticleDesign, type ArticleFormat } from '../../lib/format'; import { getZIndex } from '../../lib/getZIndex'; import { DISCUSSION_ID_DATA_ATTRIBUTE } from '../../lib/useCommentCount'; import { palette } from '../../palette'; diff --git a/dotcom-rendering/src/components/Card/components/CardBranding.tsx b/dotcom-rendering/src/components/Card/components/CardBranding.tsx index f022fb4b210..23791f19d18 100644 --- a/dotcom-rendering/src/components/Card/components/CardBranding.tsx +++ b/dotcom-rendering/src/components/Card/components/CardBranding.tsx @@ -5,8 +5,8 @@ import { visuallyHidden, } from '@guardian/source/foundations'; import { useConfig } from '../../../components/ConfigContext'; +import type { ArticleFormat } from '../../../lib/articleFormat'; import { decideCardLogo } from '../../../lib/decideLogo'; -import type { ArticleFormat } from '../../../lib/format'; import { getZIndex } from '../../../lib/getZIndex'; import { getOphanComponents } from '../../../lib/labs'; import { palette as themePalette } from '../../../palette'; diff --git a/dotcom-rendering/src/components/Card/components/CardFooter.tsx b/dotcom-rendering/src/components/Card/components/CardFooter.tsx index 0898dc39c1e..c465be1af6a 100644 --- a/dotcom-rendering/src/components/Card/components/CardFooter.tsx +++ b/dotcom-rendering/src/components/Card/components/CardFooter.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { palette, space, textSansBold12 } from '@guardian/source/foundations'; -import { type ArticleFormat, ArticleSpecial } from '../../../lib/format'; +import { type ArticleFormat, ArticleSpecial } from '../../../lib/articleFormat'; type Props = { format: ArticleFormat; diff --git a/dotcom-rendering/src/components/Card/components/CardWrapper.tsx b/dotcom-rendering/src/components/Card/components/CardWrapper.tsx index 28fdca574b8..cab0dc589c4 100644 --- a/dotcom-rendering/src/components/Card/components/CardWrapper.tsx +++ b/dotcom-rendering/src/components/Card/components/CardWrapper.tsx @@ -4,7 +4,7 @@ import { space, until, } from '@guardian/source/foundations'; -import type { ArticleFormat } from '../../../lib/format'; +import type { ArticleFormat } from '../../../lib/articleFormat'; import { palette } from '../../../palette'; import type { DCRContainerPalette } from '../../../types/front'; import { ContainerOverrides } from '../../ContainerOverrides'; diff --git a/dotcom-rendering/src/components/CardHeadline.stories.tsx b/dotcom-rendering/src/components/CardHeadline.stories.tsx index ba20558e8eb..3593c108557 100644 --- a/dotcom-rendering/src/components/CardHeadline.stories.tsx +++ b/dotcom-rendering/src/components/CardHeadline.stories.tsx @@ -7,7 +7,7 @@ import { ArticleDisplay, ArticleSpecial, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import type { DCRContainerPalette } from '../types/front'; import { CardHeadline } from './CardHeadline'; import { ContainerOverrides } from './ContainerOverrides'; diff --git a/dotcom-rendering/src/components/CardHeadline.tsx b/dotcom-rendering/src/components/CardHeadline.tsx index f762178f9a6..5fa6f366930 100644 --- a/dotcom-rendering/src/components/CardHeadline.tsx +++ b/dotcom-rendering/src/components/CardHeadline.tsx @@ -21,7 +21,7 @@ import { } from '@guardian/source/foundations'; import { Link, SvgExternal } from '@guardian/source/react-components'; import React from 'react'; -import { type ArticleFormat, ArticleSpecial } from '../lib/format'; +import { type ArticleFormat, ArticleSpecial } from '../lib/articleFormat'; import { getZIndex } from '../lib/getZIndex'; import { palette } from '../palette'; import { Byline } from './Byline'; diff --git a/dotcom-rendering/src/components/Carousel.importable.tsx b/dotcom-rendering/src/components/Carousel.importable.tsx index 37dcae69b0e..f395eadc96b 100644 --- a/dotcom-rendering/src/components/Carousel.importable.tsx +++ b/dotcom-rendering/src/components/Carousel.importable.tsx @@ -8,7 +8,7 @@ import { } from '@guardian/source/foundations'; import libDebounce from 'lodash.debounce'; import { useEffect, useRef, useState } from 'react'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import { formatAttrString } from '../lib/formatAttrString'; import { getSourceImageUrl } from '../lib/getSourceImageUrl_temp_fix'; import { getZIndex } from '../lib/getZIndex'; diff --git a/dotcom-rendering/src/components/Carousel.stories.tsx b/dotcom-rendering/src/components/Carousel.stories.tsx index 13db96df0e3..1ff09f0965b 100644 --- a/dotcom-rendering/src/components/Carousel.stories.tsx +++ b/dotcom-rendering/src/components/Carousel.stories.tsx @@ -9,7 +9,7 @@ import { ArticleDisplay, ArticleSpecial, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { palette } from '../palette'; import type { TrailType } from '../types/trails'; import { Carousel } from './Carousel.importable'; diff --git a/dotcom-rendering/src/components/CartoonComponent.stories.tsx b/dotcom-rendering/src/components/CartoonComponent.stories.tsx index fb116335ba5..83fc5da1dd8 100644 --- a/dotcom-rendering/src/components/CartoonComponent.stories.tsx +++ b/dotcom-rendering/src/components/CartoonComponent.stories.tsx @@ -1,5 +1,5 @@ import { css } from '@emotion/react'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { CartoonComponent } from './CartoonComponent'; import { cartoon, diff --git a/dotcom-rendering/src/components/CartoonComponent.tsx b/dotcom-rendering/src/components/CartoonComponent.tsx index b5fb664e8a1..bf883a76107 100644 --- a/dotcom-rendering/src/components/CartoonComponent.tsx +++ b/dotcom-rendering/src/components/CartoonComponent.tsx @@ -6,7 +6,7 @@ import { ArticleDisplay, type ArticleFormat, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import type { CartoonBlockElement, Image } from '../types/content'; import { AppsLightboxImage } from './AppsLightboxImage.importable'; import { Caption } from './Caption'; diff --git a/dotcom-rendering/src/components/ChartAtom.stories.tsx b/dotcom-rendering/src/components/ChartAtom.stories.tsx index cdfb7467cfc..07449ac4689 100644 --- a/dotcom-rendering/src/components/ChartAtom.stories.tsx +++ b/dotcom-rendering/src/components/ChartAtom.stories.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator'; import { barChartHtml, lineChartHtml } from '../../fixtures/manual/chartAtoms'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { ChartAtom } from './ChartAtom.importable'; export default { diff --git a/dotcom-rendering/src/components/ClickToView.stories.tsx b/dotcom-rendering/src/components/ClickToView.stories.tsx index d77eec01aef..b261984f479 100644 --- a/dotcom-rendering/src/components/ClickToView.stories.tsx +++ b/dotcom-rendering/src/components/ClickToView.stories.tsx @@ -7,7 +7,7 @@ import { ArticleDisplay, type ArticleFormat, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import type { DocumentBlockElement, EmbedBlockElement, diff --git a/dotcom-rendering/src/components/CodeBlockComponent.stories.tsx b/dotcom-rendering/src/components/CodeBlockComponent.stories.tsx index 91b486fc748..faf0322d5bc 100644 --- a/dotcom-rendering/src/components/CodeBlockComponent.stories.tsx +++ b/dotcom-rendering/src/components/CodeBlockComponent.stories.tsx @@ -1,5 +1,5 @@ import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { CodeBlockComponent } from './CodeBlockComponent'; import { Section } from './Section'; diff --git a/dotcom-rendering/src/components/Contributor.test.tsx b/dotcom-rendering/src/components/Contributor.test.tsx index 08ee4bd09db..120771dd40b 100644 --- a/dotcom-rendering/src/components/Contributor.test.tsx +++ b/dotcom-rendering/src/components/Contributor.test.tsx @@ -1,6 +1,6 @@ import { render } from '@testing-library/react'; import { interactiveLegacyClasses } from '../layouts/lib/interactiveLegacyStyling'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { ConfigProvider } from './ConfigContext'; import { Contributor } from './Contributor'; diff --git a/dotcom-rendering/src/components/Contributor.tsx b/dotcom-rendering/src/components/Contributor.tsx index 778bb604a0e..ba1ae4a384a 100644 --- a/dotcom-rendering/src/components/Contributor.tsx +++ b/dotcom-rendering/src/components/Contributor.tsx @@ -9,7 +9,7 @@ import { ArticleDesign, type ArticleFormat, ArticleSpecial, -} from '../lib/format'; +} from '../lib/articleFormat'; import { palette as schemedPalette } from '../palette'; import type { TagType } from '../types/tag'; import { BylineLink } from './BylineLink'; diff --git a/dotcom-rendering/src/components/Dateline.tsx b/dotcom-rendering/src/components/Dateline.tsx index 3ad323641da..c410d2c5d33 100644 --- a/dotcom-rendering/src/components/Dateline.tsx +++ b/dotcom-rendering/src/components/Dateline.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { textSans12, until } from '@guardian/source/foundations'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import { palette } from '../palette'; import { useConfig } from './ConfigContext'; diff --git a/dotcom-rendering/src/components/DecideLines.tsx b/dotcom-rendering/src/components/DecideLines.tsx index 7f95658af95..5d356323691 100644 --- a/dotcom-rendering/src/components/DecideLines.tsx +++ b/dotcom-rendering/src/components/DecideLines.tsx @@ -1,7 +1,11 @@ import { css } from '@emotion/react'; import { palette } from '@guardian/source/foundations'; import { StraightLines } from '@guardian/source-development-kitchen/react-components'; -import { ArticleDesign, type ArticleFormat, Pillar } from '../lib/format'; +import { + ArticleDesign, + type ArticleFormat, + Pillar, +} from '../lib/articleFormat'; type Props = { format: ArticleFormat; diff --git a/dotcom-rendering/src/components/DesignTag.stories.tsx b/dotcom-rendering/src/components/DesignTag.stories.tsx index 60fee8519ed..8375eae2c91 100644 --- a/dotcom-rendering/src/components/DesignTag.stories.tsx +++ b/dotcom-rendering/src/components/DesignTag.stories.tsx @@ -4,7 +4,7 @@ import { ArticleDisplay, ArticleSpecial, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { DesignTag } from './DesignTag'; const meta = { diff --git a/dotcom-rendering/src/components/DesignTag.tsx b/dotcom-rendering/src/components/DesignTag.tsx index 1028c7b7f65..990707e1683 100644 --- a/dotcom-rendering/src/components/DesignTag.tsx +++ b/dotcom-rendering/src/components/DesignTag.tsx @@ -6,7 +6,7 @@ import { until, } from '@guardian/source/foundations'; import { LinkButton } from '@guardian/source/react-components'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import { palette } from '../palette'; const tagStyles = css` diff --git a/dotcom-rendering/src/components/Discussion.stories.tsx b/dotcom-rendering/src/components/Discussion.stories.tsx index 026c69526a0..ccd099f6186 100644 --- a/dotcom-rendering/src/components/Discussion.stories.tsx +++ b/dotcom-rendering/src/components/Discussion.stories.tsx @@ -3,7 +3,7 @@ import type { StoryObj } from '@storybook/react'; import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator'; import type { StoryProps } from '../../.storybook/decorators/splitThemeDecorator'; import { Section } from '../components/Section'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { palette as themePalette } from '../palette'; import { DiscussionLayout } from './DiscussionLayout'; diff --git a/dotcom-rendering/src/components/Discussion/AbuseReportForm.stories.tsx b/dotcom-rendering/src/components/Discussion/AbuseReportForm.stories.tsx index cc2fa7e680d..472c45c74b1 100644 --- a/dotcom-rendering/src/components/Discussion/AbuseReportForm.stories.tsx +++ b/dotcom-rendering/src/components/Discussion/AbuseReportForm.stories.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { splitTheme } from '../../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import { ok } from '../../lib/result'; import { AbuseReportForm } from './AbuseReportForm'; diff --git a/dotcom-rendering/src/components/Discussion/Avatar.stories.tsx b/dotcom-rendering/src/components/Discussion/Avatar.stories.tsx index 89dfc8cdfe1..c7a8bcbc2cb 100644 --- a/dotcom-rendering/src/components/Discussion/Avatar.stories.tsx +++ b/dotcom-rendering/src/components/Discussion/Avatar.stories.tsx @@ -1,5 +1,5 @@ import { splitTheme } from '../../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import { Avatar } from './Avatar'; export default { diff --git a/dotcom-rendering/src/components/Discussion/Badges.stories.tsx b/dotcom-rendering/src/components/Discussion/Badges.stories.tsx index 38f61602692..dfd2cc0c163 100644 --- a/dotcom-rendering/src/components/Discussion/Badges.stories.tsx +++ b/dotcom-rendering/src/components/Discussion/Badges.stories.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { splitTheme } from '../../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import { GuardianContributor, GuardianPick, GuardianStaff } from './Badges'; export default { diff --git a/dotcom-rendering/src/components/Discussion/Comment.stories.tsx b/dotcom-rendering/src/components/Discussion/Comment.stories.tsx index d43c7598a9a..43228609bfb 100644 --- a/dotcom-rendering/src/components/Discussion/Comment.stories.tsx +++ b/dotcom-rendering/src/components/Discussion/Comment.stories.tsx @@ -1,11 +1,11 @@ import { splitTheme } from '../../../.storybook/decorators/splitThemeDecorator'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import type { CommentType, Reader, ReplyType, Staff, } from '../../lib/discussion'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; import { ok } from '../../lib/result'; import { Comment } from './Comment'; diff --git a/dotcom-rendering/src/components/Discussion/CommentContainer.stories.tsx b/dotcom-rendering/src/components/Discussion/CommentContainer.stories.tsx index 0bbadf475dc..773ac73be4f 100644 --- a/dotcom-rendering/src/components/Discussion/CommentContainer.stories.tsx +++ b/dotcom-rendering/src/components/Discussion/CommentContainer.stories.tsx @@ -1,6 +1,6 @@ import { splitTheme } from '../../../.storybook/decorators/splitThemeDecorator'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import type { CommentType, Reader, ReplyType } from '../../lib/discussion'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; import { ok } from '../../lib/result'; import { CommentContainer } from './CommentContainer'; diff --git a/dotcom-rendering/src/components/Discussion/CommentForm.stories.tsx b/dotcom-rendering/src/components/Discussion/CommentForm.stories.tsx index 47b88a921ee..03b09171304 100644 --- a/dotcom-rendering/src/components/Discussion/CommentForm.stories.tsx +++ b/dotcom-rendering/src/components/Discussion/CommentForm.stories.tsx @@ -1,7 +1,7 @@ import { useState } from 'react'; import { splitTheme } from '../../../.storybook/decorators/splitThemeDecorator'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import type { CommentType, Reader } from '../../lib/discussion'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; import { ok } from '../../lib/result'; import { CommentForm } from './CommentForm'; diff --git a/dotcom-rendering/src/components/Discussion/CommentReplyPreview.stories.tsx b/dotcom-rendering/src/components/Discussion/CommentReplyPreview.stories.tsx index 47372284170..60b9ceef37c 100644 --- a/dotcom-rendering/src/components/Discussion/CommentReplyPreview.stories.tsx +++ b/dotcom-rendering/src/components/Discussion/CommentReplyPreview.stories.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { splitTheme } from '../../../.storybook/decorators/splitThemeDecorator'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import type { CommentType } from '../../lib/discussion'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; import { CommentReplyPreview, Preview } from './CommentReplyPreview'; const defaultFormat = { diff --git a/dotcom-rendering/src/components/Discussion/Comments.stories.tsx b/dotcom-rendering/src/components/Discussion/Comments.stories.tsx index b629ef02eed..00c46b6ec24 100644 --- a/dotcom-rendering/src/components/Discussion/Comments.stories.tsx +++ b/dotcom-rendering/src/components/Discussion/Comments.stories.tsx @@ -5,13 +5,13 @@ import { lightDecorator } from '../../../.storybook/decorators/themeDecorator'; import { discussion } from '../../../fixtures/manual/discussion'; import { discussionWithTwoComments as discussionWithTwoCommentsMock } from '../../../fixtures/manual/discussionWithTwoComments'; import { legacyDiscussionWithoutThreading } from '../../../fixtures/manual/legacyDiscussionWithoutThreading'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import type { CommentFormProps, FilterOptions, Reader, } from '../../lib/discussion'; import { discussionApiResponseSchema } from '../../lib/discussion'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; import { ok } from '../../lib/result'; import { Comments } from './Comments'; diff --git a/dotcom-rendering/src/components/Discussion/Dropdown.stories.tsx b/dotcom-rendering/src/components/Discussion/Dropdown.stories.tsx index dfcd14d7249..0dfb8e9dabc 100644 --- a/dotcom-rendering/src/components/Discussion/Dropdown.stories.tsx +++ b/dotcom-rendering/src/components/Discussion/Dropdown.stories.tsx @@ -1,8 +1,8 @@ import { css } from '@emotion/react'; import { useState } from 'react'; import { splitTheme } from '../../../.storybook/decorators/splitThemeDecorator'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import type { DropdownOptionType } from '../../lib/discussion'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; import { Dropdown } from './Dropdown'; const Container = ({ children }: { children: React.ReactNode }) => ( diff --git a/dotcom-rendering/src/components/Discussion/Filters.stories.tsx b/dotcom-rendering/src/components/Discussion/Filters.stories.tsx index 33758f0699e..23b1aa11802 100644 --- a/dotcom-rendering/src/components/Discussion/Filters.stories.tsx +++ b/dotcom-rendering/src/components/Discussion/Filters.stories.tsx @@ -1,7 +1,7 @@ import { useState } from 'react'; import { splitTheme } from '../../../.storybook/decorators/splitThemeDecorator'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import type { FilterOptions } from '../../lib/discussion'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; import { Filters } from './Filters'; export default { title: 'Discussion/Filters' }; diff --git a/dotcom-rendering/src/components/Discussion/FirstCommentWelcome.stories.tsx b/dotcom-rendering/src/components/Discussion/FirstCommentWelcome.stories.tsx index 138a49fa300..8bd536f0578 100644 --- a/dotcom-rendering/src/components/Discussion/FirstCommentWelcome.stories.tsx +++ b/dotcom-rendering/src/components/Discussion/FirstCommentWelcome.stories.tsx @@ -1,5 +1,5 @@ import { splitTheme } from '../../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import { FirstCommentWelcome } from './FirstCommentWelcome'; export default { title: 'Discussion/FirstCommentWelcome' }; diff --git a/dotcom-rendering/src/components/Discussion/LoadingComments.stories.tsx b/dotcom-rendering/src/components/Discussion/LoadingComments.stories.tsx index 3035a2f1282..27c5a26de1f 100644 --- a/dotcom-rendering/src/components/Discussion/LoadingComments.stories.tsx +++ b/dotcom-rendering/src/components/Discussion/LoadingComments.stories.tsx @@ -1,5 +1,5 @@ import { splitTheme } from '../../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import { LoadingComments } from './LoadingComments'; export default { diff --git a/dotcom-rendering/src/components/Discussion/LoadingPicks.stories.tsx b/dotcom-rendering/src/components/Discussion/LoadingPicks.stories.tsx index 22f55dab6ce..f0fc3b42064 100644 --- a/dotcom-rendering/src/components/Discussion/LoadingPicks.stories.tsx +++ b/dotcom-rendering/src/components/Discussion/LoadingPicks.stories.tsx @@ -1,5 +1,5 @@ import { splitTheme } from '../../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import { LoadingPicks } from './LoadingPicks'; export default { diff --git a/dotcom-rendering/src/components/Discussion/Pagination.stories.tsx b/dotcom-rendering/src/components/Discussion/Pagination.stories.tsx index cb6d06bcb90..a2bc61c7353 100644 --- a/dotcom-rendering/src/components/Discussion/Pagination.stories.tsx +++ b/dotcom-rendering/src/components/Discussion/Pagination.stories.tsx @@ -1,12 +1,12 @@ import { useState } from 'react'; import { splitTheme } from '../../../.storybook/decorators/splitThemeDecorator'; -import type { FilterOptions } from '../../lib/discussion'; import { ArticleDesign, ArticleDisplay, type ArticleFormat, Pillar, -} from '../../lib/format'; +} from '../../lib/articleFormat'; +import type { FilterOptions } from '../../lib/discussion'; import { Pagination } from './Pagination'; const articleFormat: ArticleFormat = { diff --git a/dotcom-rendering/src/components/Discussion/PillarButton.stories.tsx b/dotcom-rendering/src/components/Discussion/PillarButton.stories.tsx index fa65a9c81ea..f71da02a364 100644 --- a/dotcom-rendering/src/components/Discussion/PillarButton.stories.tsx +++ b/dotcom-rendering/src/components/Discussion/PillarButton.stories.tsx @@ -7,7 +7,7 @@ import { ArticleDisplay, type ArticleFormat, Pillar, -} from '../../lib/format'; +} from '../../lib/articleFormat'; import { PillarButton } from './PillarButton'; import { Row } from './Row'; diff --git a/dotcom-rendering/src/components/Discussion/Preview.stories.tsx b/dotcom-rendering/src/components/Discussion/Preview.stories.tsx index af027a3fb16..1791421f0cf 100644 --- a/dotcom-rendering/src/components/Discussion/Preview.stories.tsx +++ b/dotcom-rendering/src/components/Discussion/Preview.stories.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { splitTheme } from '../../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import { Preview } from './Preview'; export default { diff --git a/dotcom-rendering/src/components/Discussion/RecommendationCount.stories.tsx b/dotcom-rendering/src/components/Discussion/RecommendationCount.stories.tsx index c11f8077d74..f44e950f203 100644 --- a/dotcom-rendering/src/components/Discussion/RecommendationCount.stories.tsx +++ b/dotcom-rendering/src/components/Discussion/RecommendationCount.stories.tsx @@ -1,6 +1,6 @@ import { splitTheme } from '../../../.storybook/decorators/splitThemeDecorator'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import type { SignedInUser } from '../../lib/discussion'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; import { ok } from '../../lib/result'; import { palette as themePalette } from '../../palette'; import { RecommendationCount } from './RecommendationCount'; diff --git a/dotcom-rendering/src/components/Discussion/Timestamp.stories.tsx b/dotcom-rendering/src/components/Discussion/Timestamp.stories.tsx index 12ec0480220..23746b73d56 100644 --- a/dotcom-rendering/src/components/Discussion/Timestamp.stories.tsx +++ b/dotcom-rendering/src/components/Discussion/Timestamp.stories.tsx @@ -1,5 +1,5 @@ import { splitTheme } from '../../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import { Timestamp } from './Timestamp'; type Props = Parameters[0]; diff --git a/dotcom-rendering/src/components/Discussion/TopPick.stories.tsx b/dotcom-rendering/src/components/Discussion/TopPick.stories.tsx index 460c8bfc3c7..2eeb0992092 100644 --- a/dotcom-rendering/src/components/Discussion/TopPick.stories.tsx +++ b/dotcom-rendering/src/components/Discussion/TopPick.stories.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { splitTheme } from '../../../.storybook/decorators/splitThemeDecorator'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import type { ReplyType, SignedInUser } from '../../lib/discussion'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; import { ok } from '../../lib/result'; import { TopPick } from './TopPick'; diff --git a/dotcom-rendering/src/components/Discussion/TopPicks.stories.tsx b/dotcom-rendering/src/components/Discussion/TopPicks.stories.tsx index fe7c6a05de9..58d5593e5e1 100644 --- a/dotcom-rendering/src/components/Discussion/TopPicks.stories.tsx +++ b/dotcom-rendering/src/components/Discussion/TopPicks.stories.tsx @@ -1,6 +1,6 @@ import { splitTheme } from '../../../.storybook/decorators/splitThemeDecorator'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import type { ReplyType, SignedInUser } from '../../lib/discussion'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; import { ok } from '../../lib/result'; import { TopPicks } from './TopPicks'; diff --git a/dotcom-rendering/src/components/DiscussionLayout.tsx b/dotcom-rendering/src/components/DiscussionLayout.tsx index 4c706d9c2f3..6aae80bee83 100644 --- a/dotcom-rendering/src/components/DiscussionLayout.tsx +++ b/dotcom-rendering/src/components/DiscussionLayout.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { from } from '@guardian/source/foundations'; -import { ArticleDisplay, type ArticleFormat } from '../lib/format'; +import { ArticleDisplay, type ArticleFormat } from '../lib/articleFormat'; import type { RenderingTarget } from '../types/renderingTarget'; import { AdSlot, labelStyles } from './AdSlot.web'; import { useConfig } from './ConfigContext'; diff --git a/dotcom-rendering/src/components/DividerBlockComponent.stories.tsx b/dotcom-rendering/src/components/DividerBlockComponent.stories.tsx index 05a9eae4fff..00407b34758 100644 --- a/dotcom-rendering/src/components/DividerBlockComponent.stories.tsx +++ b/dotcom-rendering/src/components/DividerBlockComponent.stories.tsx @@ -1,5 +1,5 @@ import { css } from '@emotion/react'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { DividerBlockComponent } from './DividerBlockComponent'; import { TextBlockComponent } from './TextBlockComponent'; diff --git a/dotcom-rendering/src/components/DropCap.tsx b/dotcom-rendering/src/components/DropCap.tsx index 11c3c57b9db..ece4da22c16 100644 --- a/dotcom-rendering/src/components/DropCap.tsx +++ b/dotcom-rendering/src/components/DropCap.tsx @@ -1,6 +1,10 @@ import { css } from '@emotion/react'; import { headlineMedium14Object, space } from '@guardian/source/foundations'; -import { ArticleDesign, type ArticleFormat, Pillar } from '../lib/format'; +import { + ArticleDesign, + type ArticleFormat, + Pillar, +} from '../lib/articleFormat'; import { palette } from '../palette'; type Props = { diff --git a/dotcom-rendering/src/components/Dropcap.stories.tsx b/dotcom-rendering/src/components/Dropcap.stories.tsx index 490ce79c7d6..0321d13a57b 100644 --- a/dotcom-rendering/src/components/Dropcap.stories.tsx +++ b/dotcom-rendering/src/components/Dropcap.stories.tsx @@ -6,7 +6,7 @@ import { ArticleDisplay, type ArticleFormat, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { DropCap } from './DropCap'; const Wrapper = ({ children }: { children: React.ReactNode }) => ( diff --git a/dotcom-rendering/src/components/DynamicPackage.stories.tsx b/dotcom-rendering/src/components/DynamicPackage.stories.tsx index 222c98f7548..351107f294a 100644 --- a/dotcom-rendering/src/components/DynamicPackage.stories.tsx +++ b/dotcom-rendering/src/components/DynamicPackage.stories.tsx @@ -2,7 +2,11 @@ import { breakpoints } from '@guardian/source/foundations'; import type { Meta, StoryObj } from '@storybook/react'; import { discussionApiUrl } from '../../fixtures/manual/discussionApiUrl'; import { getSublinks, trails } from '../../fixtures/manual/trails'; -import { ArticleDesign, ArticleDisplay, ArticleSpecial } from '../lib/format'; +import { + ArticleDesign, + ArticleDisplay, + ArticleSpecial, +} from '../lib/articleFormat'; import type { DCRGroupedTrails } from '../types/front'; import { DynamicPackage } from './DynamicPackage'; import { FrontSection } from './FrontSection'; diff --git a/dotcom-rendering/src/components/DynamicSlow.stories.tsx b/dotcom-rendering/src/components/DynamicSlow.stories.tsx index d612140e6fa..14e0503e2f0 100644 --- a/dotcom-rendering/src/components/DynamicSlow.stories.tsx +++ b/dotcom-rendering/src/components/DynamicSlow.stories.tsx @@ -1,7 +1,7 @@ import { breakpoints } from '@guardian/source/foundations'; import { discussionApiUrl } from '../../fixtures/manual/discussionApiUrl'; import { trails } from '../../fixtures/manual/trails'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import type { DCRGroupedTrails } from '../types/front'; import { DynamicSlow } from './DynamicSlow'; import { FrontSection } from './FrontSection'; diff --git a/dotcom-rendering/src/components/EditorialButton/EditorialButton.stories.tsx b/dotcom-rendering/src/components/EditorialButton/EditorialButton.stories.tsx index 3d8e9ba572a..4eeb0eecdbe 100644 --- a/dotcom-rendering/src/components/EditorialButton/EditorialButton.stories.tsx +++ b/dotcom-rendering/src/components/EditorialButton/EditorialButton.stories.tsx @@ -6,7 +6,7 @@ import { ArticleDisplay, ArticleSpecial, Pillar, -} from '../../lib/format'; +} from '../../lib/articleFormat'; import { EditorialButton } from './EditorialButton'; import type { EditorialButtonProps } from './EditorialButton'; diff --git a/dotcom-rendering/src/components/EditorialButton/EditorialLinkButton.stories.tsx b/dotcom-rendering/src/components/EditorialButton/EditorialLinkButton.stories.tsx index fcc3eb0e166..036760eea1d 100644 --- a/dotcom-rendering/src/components/EditorialButton/EditorialLinkButton.stories.tsx +++ b/dotcom-rendering/src/components/EditorialButton/EditorialLinkButton.stories.tsx @@ -6,7 +6,7 @@ import { ArticleDisplay, ArticleSpecial, Pillar, -} from '../../lib/format'; +} from '../../lib/articleFormat'; import { EditorialLinkButton } from './EditorialLinkButton'; import type { EditorialLinkButtonProps } from './EditorialLinkButton'; diff --git a/dotcom-rendering/src/components/Elements.amp.tsx b/dotcom-rendering/src/components/Elements.amp.tsx index 15648374962..de24f1e403a 100644 --- a/dotcom-rendering/src/components/Elements.amp.tsx +++ b/dotcom-rendering/src/components/Elements.amp.tsx @@ -1,10 +1,10 @@ import { isNonNullable } from '@guardian/libs'; -import { NotRenderableInDCR } from '../lib/errors/not-renderable-in-dcr'; import { ArticleDesign, type ArticleFormat, type ArticleTheme, -} from '../lib/format'; +} from '../lib/articleFormat'; +import { NotRenderableInDCR } from '../lib/errors/not-renderable-in-dcr'; import type { Switches } from '../types/config'; import type { FEElement } from '../types/content'; import type { TagType } from '../types/tag'; diff --git a/dotcom-rendering/src/components/EmailSignup.stories.tsx b/dotcom-rendering/src/components/EmailSignup.stories.tsx index 32a767116b2..e9e9a5f79e5 100644 --- a/dotcom-rendering/src/components/EmailSignup.stories.tsx +++ b/dotcom-rendering/src/components/EmailSignup.stories.tsx @@ -5,7 +5,7 @@ import { ArticleDisplay, type ArticleFormat, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { EmailSignup } from './EmailSignup'; import { NewsletterPrivacyMessage } from './NewsletterPrivacyMessage'; import { Section } from './Section'; diff --git a/dotcom-rendering/src/components/Expandable.amp.tsx b/dotcom-rendering/src/components/Expandable.amp.tsx index 9007732bb93..dbf6fef99f7 100644 --- a/dotcom-rendering/src/components/Expandable.amp.tsx +++ b/dotcom-rendering/src/components/Expandable.amp.tsx @@ -6,7 +6,7 @@ import { textSans15, } from '@guardian/source/foundations'; import React from 'react'; -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import { neutralBorder, pillarPalette_DO_NOT_USE } from '../lib/pillars'; import InfoIcon from '../static/icons/info.svg'; import PlusIcon from '../static/icons/plus.svg'; diff --git a/dotcom-rendering/src/components/ExplainerAtom.stories.tsx b/dotcom-rendering/src/components/ExplainerAtom.stories.tsx index ccefe7866d2..0d6ffda7270 100644 --- a/dotcom-rendering/src/components/ExplainerAtom.stories.tsx +++ b/dotcom-rendering/src/components/ExplainerAtom.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from '@storybook/react'; import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { ExplainerAtom as ExplainerAtomComponent } from './ExplainerAtom'; const html = diff --git a/dotcom-rendering/src/components/FetchOnwardsData.importable.tsx b/dotcom-rendering/src/components/FetchOnwardsData.importable.tsx index 837b6293126..f150facb0e5 100644 --- a/dotcom-rendering/src/components/FetchOnwardsData.importable.tsx +++ b/dotcom-rendering/src/components/FetchOnwardsData.importable.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { isNonNullable } from '@guardian/libs'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import { decideTrail } from '../lib/decideTrail'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; import { useApi } from '../lib/useApi'; import { addDiscussionIds } from '../lib/useCommentCount'; import { palette } from '../palette'; diff --git a/dotcom-rendering/src/components/Figure.stories.tsx b/dotcom-rendering/src/components/Figure.stories.tsx index e7f077f2a1a..6fbaba04fd1 100644 --- a/dotcom-rendering/src/components/Figure.stories.tsx +++ b/dotcom-rendering/src/components/Figure.stories.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { breakpoints } from '@guardian/source/foundations'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { ArticleContainer } from './ArticleContainer'; import { Figure } from './Figure'; import { Flex } from './Flex'; diff --git a/dotcom-rendering/src/components/Figure.tsx b/dotcom-rendering/src/components/Figure.tsx index 16493d934e3..e313ea29db2 100644 --- a/dotcom-rendering/src/components/Figure.tsx +++ b/dotcom-rendering/src/components/Figure.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { from, space, until } from '@guardian/source/foundations'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import type { FEElement, RoleType } from '../types/content'; type Props = { diff --git a/dotcom-rendering/src/components/FlexibleGeneral.stories.tsx b/dotcom-rendering/src/components/FlexibleGeneral.stories.tsx index f4679c48797..2bff1a93397 100644 --- a/dotcom-rendering/src/components/FlexibleGeneral.stories.tsx +++ b/dotcom-rendering/src/components/FlexibleGeneral.stories.tsx @@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/react'; import fetchMock from 'fetch-mock'; import { discussionApiUrl } from '../../fixtures/manual/discussionApiUrl'; import { getSublinks, trails } from '../../fixtures/manual/trails'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import type { DCRContainerPalette, DCRFrontCard, diff --git a/dotcom-rendering/src/components/FollowButtons.stories.tsx b/dotcom-rendering/src/components/FollowButtons.stories.tsx index b14c4bf0f31..f6b4a0cb2bb 100644 --- a/dotcom-rendering/src/components/FollowButtons.stories.tsx +++ b/dotcom-rendering/src/components/FollowButtons.stories.tsx @@ -1,5 +1,5 @@ import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { FollowNotificationsButton, FollowTagButton } from './FollowButtons'; export default { diff --git a/dotcom-rendering/src/components/Footer.stories.tsx b/dotcom-rendering/src/components/Footer.stories.tsx index 18e9a9a122d..260f41cbc78 100644 --- a/dotcom-rendering/src/components/Footer.stories.tsx +++ b/dotcom-rendering/src/components/Footer.stories.tsx @@ -6,8 +6,8 @@ import { textSans34, } from '@guardian/source/foundations'; import { Standard } from '../../fixtures/generated/dcr-articles/Standard'; +import { Pillar } from '../lib/articleFormat'; import { editionList } from '../lib/edition'; -import { Pillar } from '../lib/format'; import { extractNAV } from '../model/extract-nav'; import { Footer } from './Footer'; import { Section } from './Section'; diff --git a/dotcom-rendering/src/components/Footer.tsx b/dotcom-rendering/src/components/Footer.tsx index 37dd23038c2..de5e9efb9ac 100644 --- a/dotcom-rendering/src/components/Footer.tsx +++ b/dotcom-rendering/src/components/Footer.tsx @@ -15,8 +15,8 @@ import { LinkButton, SvgArrowRightStraight, } from '@guardian/source/react-components'; +import type { Pillar } from '../lib/articleFormat'; import type { EditionId } from '../lib/edition'; -import type { Pillar } from '../lib/format'; import { clearFix } from '../lib/mixins'; import { nestedOphanComponents } from '../lib/ophan-helpers'; import type { PillarLinkType } from '../model/extract-nav'; diff --git a/dotcom-rendering/src/components/FormatBoundary.tsx b/dotcom-rendering/src/components/FormatBoundary.tsx index bc95491bd95..d3b8c9a79b6 100644 --- a/dotcom-rendering/src/components/FormatBoundary.tsx +++ b/dotcom-rendering/src/components/FormatBoundary.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { useEffect, useState } from 'react'; -import type { ArticleFormat } from '../lib/format'; +import type { ArticleFormat } from '../lib/articleFormat'; import { paletteDeclarations } from '../palette'; import { useConfig } from './ConfigContext'; diff --git a/dotcom-rendering/src/components/FrontCard.tsx b/dotcom-rendering/src/components/FrontCard.tsx index 86ad1c2164c..3b54ecb82e8 100644 --- a/dotcom-rendering/src/components/FrontCard.tsx +++ b/dotcom-rendering/src/components/FrontCard.tsx @@ -1,4 +1,4 @@ -import { ArticleDesign } from '../lib/format'; +import { ArticleDesign } from '../lib/articleFormat'; import type { DCRFrontCard } from '../types/front'; import type { Props as CardProps } from './Card/Card'; import { Card } from './Card/Card'; diff --git a/dotcom-rendering/src/components/FrontPage.tsx b/dotcom-rendering/src/components/FrontPage.tsx index 45adb782014..56a573685fa 100644 --- a/dotcom-rendering/src/components/FrontPage.tsx +++ b/dotcom-rendering/src/components/FrontPage.tsx @@ -2,7 +2,7 @@ import { Global } from '@emotion/react'; import { StrictMode } from 'react'; import { FrontLayout } from '../layouts/FrontLayout'; import { buildAdTargeting } from '../lib/ad-targeting'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { rootStyles } from '../lib/rootStyles'; import { filterABTestSwitches } from '../model/enhance-switches'; import type { NavType } from '../model/extract-nav'; diff --git a/dotcom-rendering/src/components/GetCricketScoreboard.importable.tsx b/dotcom-rendering/src/components/GetCricketScoreboard.importable.tsx index 2adef368087..41c59c3810f 100644 --- a/dotcom-rendering/src/components/GetCricketScoreboard.importable.tsx +++ b/dotcom-rendering/src/components/GetCricketScoreboard.importable.tsx @@ -1,5 +1,5 @@ import type { SWRConfiguration } from 'swr'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import { useApi } from '../lib/useApi'; import type { CricketMatch } from '../types/sport'; import { CricketScoreboard } from './CricketScoreboard'; diff --git a/dotcom-rendering/src/components/GetMatchNav.importable.tsx b/dotcom-rendering/src/components/GetMatchNav.importable.tsx index a9da495f949..c643904422f 100644 --- a/dotcom-rendering/src/components/GetMatchNav.importable.tsx +++ b/dotcom-rendering/src/components/GetMatchNav.importable.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { from } from '@guardian/source/foundations'; import type { SWRConfiguration } from 'swr'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import { useApi } from '../lib/useApi'; import type { TeamType } from '../types/sport'; import type { TagType } from '../types/tag'; diff --git a/dotcom-rendering/src/components/GetMatchStats.importable.tsx b/dotcom-rendering/src/components/GetMatchStats.importable.tsx index 84e55dfcd22..59749f1b10d 100644 --- a/dotcom-rendering/src/components/GetMatchStats.importable.tsx +++ b/dotcom-rendering/src/components/GetMatchStats.importable.tsx @@ -1,5 +1,5 @@ import type { SWRConfiguration } from 'swr'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import { useApi } from '../lib/useApi'; import { useHydrated } from '../lib/useHydrated'; import type { TeamType } from '../types/sport'; diff --git a/dotcom-rendering/src/components/GetMatchTabs.importable.tsx b/dotcom-rendering/src/components/GetMatchTabs.importable.tsx index d6225635663..42ffd60fde6 100644 --- a/dotcom-rendering/src/components/GetMatchTabs.importable.tsx +++ b/dotcom-rendering/src/components/GetMatchTabs.importable.tsx @@ -1,4 +1,4 @@ -import type { ArticleFormat } from '../lib/format'; +import type { ArticleFormat } from '../lib/articleFormat'; import { useApi } from '../lib/useApi'; import { MatchTabs } from './MatchTabs'; import { Placeholder } from './Placeholder'; diff --git a/dotcom-rendering/src/components/GoalAttempts.stories.tsx b/dotcom-rendering/src/components/GoalAttempts.stories.tsx index aa646e8645f..5b65399c46b 100644 --- a/dotcom-rendering/src/components/GoalAttempts.stories.tsx +++ b/dotcom-rendering/src/components/GoalAttempts.stories.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { lightDecorator } from '../../.storybook/decorators/themeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { GoalAttempts } from './GoalAttempts'; export default { diff --git a/dotcom-rendering/src/components/GuVideoBlockComponent.amp.tsx b/dotcom-rendering/src/components/GuVideoBlockComponent.amp.tsx index 344b4b4f6ae..c4c68b2435a 100644 --- a/dotcom-rendering/src/components/GuVideoBlockComponent.amp.tsx +++ b/dotcom-rendering/src/components/GuVideoBlockComponent.amp.tsx @@ -1,4 +1,4 @@ -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import type { GuVideoBlockElement } from '../types/content'; import { Caption } from './Caption.amp'; diff --git a/dotcom-rendering/src/components/GuVideoBlockComponent.tsx b/dotcom-rendering/src/components/GuVideoBlockComponent.tsx index b75956fa933..fc97714460e 100644 --- a/dotcom-rendering/src/components/GuVideoBlockComponent.tsx +++ b/dotcom-rendering/src/components/GuVideoBlockComponent.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; +import type { ArticleFormat } from '../lib/articleFormat'; import { unescapeData } from '../lib/escapeData'; -import type { ArticleFormat } from '../lib/format'; import { Caption } from './Caption'; type Props = { diff --git a/dotcom-rendering/src/components/GuideAtom/GuideAtom.stories.tsx b/dotcom-rendering/src/components/GuideAtom/GuideAtom.stories.tsx index aa723e94bb8..2ef65c52d8b 100644 --- a/dotcom-rendering/src/components/GuideAtom/GuideAtom.stories.tsx +++ b/dotcom-rendering/src/components/GuideAtom/GuideAtom.stories.tsx @@ -9,7 +9,7 @@ import { listStoryExpanded, orderedListStoryExpanded, } from '../../../fixtures/manual/guideAtom'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import { palette } from '../../palette'; import { GuideAtom } from './GuideAtom'; diff --git a/dotcom-rendering/src/components/Header.amp.tsx b/dotcom-rendering/src/components/Header.amp.tsx index aa6eaca3209..de1ad8431d4 100644 --- a/dotcom-rendering/src/components/Header.amp.tsx +++ b/dotcom-rendering/src/components/Header.amp.tsx @@ -8,7 +8,7 @@ import { visuallyHidden, } from '@guardian/source/foundations'; import { SvgGuardianBestWebsiteLogo } from '@guardian/source/react-components'; -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import { pillarPalette_DO_NOT_USE } from '../lib/pillars'; import type { NavType, PillarLinkType } from '../model/extract-nav'; import { ReaderRevenueButton } from './ReaderRevenueButton.amp'; diff --git a/dotcom-rendering/src/components/HeadlineByline.stories.tsx b/dotcom-rendering/src/components/HeadlineByline.stories.tsx index 41be4381da2..ae2305eee94 100644 --- a/dotcom-rendering/src/components/HeadlineByline.stories.tsx +++ b/dotcom-rendering/src/components/HeadlineByline.stories.tsx @@ -9,7 +9,7 @@ import { ArticleDisplay, ArticleSpecial, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { HeadlineByline } from './HeadlineByline'; export default { diff --git a/dotcom-rendering/src/components/HeadlineByline.tsx b/dotcom-rendering/src/components/HeadlineByline.tsx index 413518bc53e..0ec7c1917e5 100644 --- a/dotcom-rendering/src/components/HeadlineByline.tsx +++ b/dotcom-rendering/src/components/HeadlineByline.tsx @@ -14,13 +14,13 @@ import { textSansItalic34, until, } from '@guardian/source/foundations'; -import { getSoleContributor } from '../lib/byline'; import { ArticleDesign, ArticleDisplay, type ArticleFormat, ArticleSpecial, -} from '../lib/format'; +} from '../lib/articleFormat'; +import { getSoleContributor } from '../lib/byline'; import { palette as schemedPalette } from '../palette'; import type { TagType } from '../types/tag'; import { BylineLink } from './BylineLink'; diff --git a/dotcom-rendering/src/components/ImageBlockComponent.amp.tsx b/dotcom-rendering/src/components/ImageBlockComponent.amp.tsx index 051a2230fb5..11d6d8e3694 100644 --- a/dotcom-rendering/src/components/ImageBlockComponent.amp.tsx +++ b/dotcom-rendering/src/components/ImageBlockComponent.amp.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { text, textSans12 } from '@guardian/source/foundations'; -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import { bestFitImage, heightEstimate } from '../lib/image-fit.amp'; import { pillarPalette_DO_NOT_USE } from '../lib/pillars'; import TriangleIcon from '../static/icons/triangle.svg'; diff --git a/dotcom-rendering/src/components/ImageBlockComponent.stories.tsx b/dotcom-rendering/src/components/ImageBlockComponent.stories.tsx index b6ea127d3c3..3c238947028 100644 --- a/dotcom-rendering/src/components/ImageBlockComponent.stories.tsx +++ b/dotcom-rendering/src/components/ImageBlockComponent.stories.tsx @@ -1,5 +1,5 @@ import { css } from '@emotion/react'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { Figure } from './Figure'; import { Flex } from './Flex'; import { ImageBlockComponent } from './ImageBlockComponent'; diff --git a/dotcom-rendering/src/components/ImageBlockComponent.tsx b/dotcom-rendering/src/components/ImageBlockComponent.tsx index 5ed41641b7a..117fa8fec36 100644 --- a/dotcom-rendering/src/components/ImageBlockComponent.tsx +++ b/dotcom-rendering/src/components/ImageBlockComponent.tsx @@ -1,4 +1,4 @@ -import type { ArticleFormat } from '../lib/format'; +import type { ArticleFormat } from '../lib/articleFormat'; import type { ImageBlockElement, StarRating } from '../types/content'; import { ImageComponent } from './ImageComponent'; diff --git a/dotcom-rendering/src/components/ImageComponent.tsx b/dotcom-rendering/src/components/ImageComponent.tsx index 0264838616c..a41c20be706 100644 --- a/dotcom-rendering/src/components/ImageComponent.tsx +++ b/dotcom-rendering/src/components/ImageComponent.tsx @@ -13,7 +13,7 @@ import { ArticleDesign, ArticleDisplay, type ArticleFormat, -} from '../lib/format'; +} from '../lib/articleFormat'; import { getLargest, getMaster } from '../lib/image'; import { palette as themePalette } from '../palette'; import type { diff --git a/dotcom-rendering/src/components/InteractiveBlockComponent.importable.tsx b/dotcom-rendering/src/components/InteractiveBlockComponent.importable.tsx index c297219980e..43a3d2b33d8 100644 --- a/dotcom-rendering/src/components/InteractiveBlockComponent.importable.tsx +++ b/dotcom-rendering/src/components/InteractiveBlockComponent.importable.tsx @@ -4,7 +4,7 @@ import { article17, space, textSans17 } from '@guardian/source/foundations'; import libDebounce from 'lodash.debounce'; import { useRef, useState } from 'react'; import { interactiveLegacyFigureClasses } from '../layouts/lib/interactiveLegacyStyling'; -import { type ArticleFormat, ArticleSpecial } from '../lib/format'; +import { type ArticleFormat, ArticleSpecial } from '../lib/articleFormat'; import { useOnce } from '../lib/useOnce'; import { palette as themePalette } from '../palette'; import type { RoleType } from '../types/content'; diff --git a/dotcom-rendering/src/components/InteractiveBlockComponent.stories.tsx b/dotcom-rendering/src/components/InteractiveBlockComponent.stories.tsx index d7ff9cdcb33..fe50199fd4d 100644 --- a/dotcom-rendering/src/components/InteractiveBlockComponent.stories.tsx +++ b/dotcom-rendering/src/components/InteractiveBlockComponent.stories.tsx @@ -2,7 +2,7 @@ import { css } from '@emotion/react'; import type { StoryObj } from '@storybook/react'; import type { StoryProps } from '../../.storybook/decorators/splitThemeDecorator'; import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { InteractiveBlockComponent } from './InteractiveBlockComponent.importable'; import { TextBlockComponent } from './TextBlockComponent'; diff --git a/dotcom-rendering/src/components/InteractiveContentsBlockComponent.stories.tsx b/dotcom-rendering/src/components/InteractiveContentsBlockComponent.stories.tsx index 550b09650a0..7d117b3866e 100644 --- a/dotcom-rendering/src/components/InteractiveContentsBlockComponent.stories.tsx +++ b/dotcom-rendering/src/components/InteractiveContentsBlockComponent.stories.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator'; import { NumberedList } from '../../fixtures/generated/dcr-articles/NumberedList'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { enhanceInteractiveContentsElements } from '../model/enhance-interactive-contents-elements'; import type { InteractiveContentsBlockElement } from '../types/content'; import { InteractiveContentsBlockComponent } from './InteractiveContentsBlockComponent.importable'; diff --git a/dotcom-rendering/src/components/Island.test.tsx b/dotcom-rendering/src/components/Island.test.tsx index 49bf243ac4a..074c1dc4054 100644 --- a/dotcom-rendering/src/components/Island.test.tsx +++ b/dotcom-rendering/src/components/Island.test.tsx @@ -4,7 +4,7 @@ import type { PropsWithChildren } from 'react'; import { renderToString } from 'react-dom/server'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { AdPortals } from './AdPortals.importable'; import { AlreadyVisited } from './AlreadyVisited.importable'; import { AppsEpic } from './AppsEpic.importable'; diff --git a/dotcom-rendering/src/components/KeyEventCard.stories.tsx b/dotcom-rendering/src/components/KeyEventCard.stories.tsx index 9c1432ea696..36231a91c6a 100644 --- a/dotcom-rendering/src/components/KeyEventCard.stories.tsx +++ b/dotcom-rendering/src/components/KeyEventCard.stories.tsx @@ -9,7 +9,7 @@ import { type ArticleFormat, ArticleSpecial, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { palette } from '../palette'; import { KeyEventCard } from './KeyEventCard'; diff --git a/dotcom-rendering/src/components/KeyEventsCarousel.stories.tsx b/dotcom-rendering/src/components/KeyEventsCarousel.stories.tsx index 5996a7ac120..17004c904ef 100644 --- a/dotcom-rendering/src/components/KeyEventsCarousel.stories.tsx +++ b/dotcom-rendering/src/components/KeyEventsCarousel.stories.tsx @@ -12,7 +12,7 @@ import { type ArticleFormat, ArticleSpecial, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { palette } from '../palette'; import { KeyEventsCarousel } from './KeyEventsCarousel.importable'; diff --git a/dotcom-rendering/src/components/KeyTakeaway.tsx b/dotcom-rendering/src/components/KeyTakeaway.tsx index 1ad40235fd0..07538a27d62 100644 --- a/dotcom-rendering/src/components/KeyTakeaway.tsx +++ b/dotcom-rendering/src/components/KeyTakeaway.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; +import { type ArticleFormat } from '../lib/articleFormat'; import type { EditionId } from '../lib/edition'; -import { type ArticleFormat } from '../lib/format'; import type { ArticleElementRenderer } from '../lib/renderElement'; import { slugify } from '../model/enhance-H2s'; import { palette } from '../palette'; diff --git a/dotcom-rendering/src/components/KeyTakeaways.stories.tsx b/dotcom-rendering/src/components/KeyTakeaways.stories.tsx index 3b3034cfae2..ba450b9ab23 100644 --- a/dotcom-rendering/src/components/KeyTakeaways.stories.tsx +++ b/dotcom-rendering/src/components/KeyTakeaways.stories.tsx @@ -7,9 +7,10 @@ import { ArticleDisplay, type ArticleFormat, ArticleSpecial, + getAllDesigns, + getAllThemes, Pillar, -} from '../lib/format'; -import { getAllDesigns, getAllThemes } from '../lib/format'; +} from '../lib/articleFormat'; import { RenderArticleElement } from '../lib/renderElement'; import type { TextBlockElement } from '../types/content'; import { KeyTakeaways } from './KeyTakeaways'; diff --git a/dotcom-rendering/src/components/KeyTakeaways.tsx b/dotcom-rendering/src/components/KeyTakeaways.tsx index 2aad07ae82b..621b4d9a4b8 100644 --- a/dotcom-rendering/src/components/KeyTakeaways.tsx +++ b/dotcom-rendering/src/components/KeyTakeaways.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { palette } from '@guardian/source/foundations'; +import type { ArticleFormat } from '../lib/articleFormat'; import type { EditionId } from '../lib/edition'; -import type { ArticleFormat } from '../lib/format'; import type { ArticleElementRenderer } from '../lib/renderElement'; import type { ServerSideTests, Switches } from '../types/config'; import type { KeyTakeaway, StarRating } from '../types/content'; diff --git a/dotcom-rendering/src/components/Kicker.stories.tsx b/dotcom-rendering/src/components/Kicker.stories.tsx index 97305c79570..4b0d6b76e4f 100644 --- a/dotcom-rendering/src/components/Kicker.stories.tsx +++ b/dotcom-rendering/src/components/Kicker.stories.tsx @@ -1,7 +1,7 @@ import type { Meta } from '@storybook/react'; import type { CSSProperties } from 'react'; import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { palette } from '../palette'; import type { DCRContainerPalette } from '../types/front'; import { ContainerOverrides } from './ContainerOverrides'; diff --git a/dotcom-rendering/src/components/KnowledgeQuizAtom.importable.tsx b/dotcom-rendering/src/components/KnowledgeQuizAtom.importable.tsx index e7aeb18766b..9b720a96845 100644 --- a/dotcom-rendering/src/components/KnowledgeQuizAtom.importable.tsx +++ b/dotcom-rendering/src/components/KnowledgeQuizAtom.importable.tsx @@ -10,7 +10,7 @@ import { } from '@guardian/source/foundations'; import { Button, Radio, RadioGroup } from '@guardian/source/react-components'; import { Fragment, useEffect, useState } from 'react'; -import { ArticleSpecial, type ArticleTheme } from '../lib/format'; +import { ArticleSpecial, type ArticleTheme } from '../lib/articleFormat'; import type { AnswerType, KnowledgeQuizAtomType, diff --git a/dotcom-rendering/src/components/KnowledgeQuizAtom.stories.tsx b/dotcom-rendering/src/components/KnowledgeQuizAtom.stories.tsx index 3190dc6f1c6..71cce5f1622 100644 --- a/dotcom-rendering/src/components/KnowledgeQuizAtom.stories.tsx +++ b/dotcom-rendering/src/components/KnowledgeQuizAtom.stories.tsx @@ -12,7 +12,7 @@ import { ArticleDisplay, ArticleSpecial, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { KnowledgeQuizAtom } from './KnowledgeQuizAtom.importable'; const meta = { diff --git a/dotcom-rendering/src/components/KnowledgeQuizAtom.test.tsx b/dotcom-rendering/src/components/KnowledgeQuizAtom.test.tsx index 88184fba6b2..3a1b47c5a0e 100644 --- a/dotcom-rendering/src/components/KnowledgeQuizAtom.test.tsx +++ b/dotcom-rendering/src/components/KnowledgeQuizAtom.test.tsx @@ -5,7 +5,7 @@ import { resultGroups, } from '../../fixtures/manual/knowledgeQuizAtom'; import { sharingUrls } from '../../fixtures/manual/sharingUrls'; -import { Pillar } from '../lib/format'; +import { Pillar } from '../lib/articleFormat'; import { KnowledgeQuizAtom } from './KnowledgeQuizAtom.importable'; const questionOne = ensure(exampleKnowledgeQuestions.find((x) => x)); diff --git a/dotcom-rendering/src/components/LatestLinks.importable.stories.tsx b/dotcom-rendering/src/components/LatestLinks.importable.stories.tsx index 573780d8f68..0ade172af45 100644 --- a/dotcom-rendering/src/components/LatestLinks.importable.stories.tsx +++ b/dotcom-rendering/src/components/LatestLinks.importable.stories.tsx @@ -4,7 +4,7 @@ import { breakpoints } from '@guardian/source/foundations'; import fetchMock from 'fetch-mock'; import type { PropsWithChildren } from 'react'; import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { palette } from '../palette'; import type { DCRContainerPalette } from '../types/front'; import { ContainerOverrides } from './ContainerOverrides'; diff --git a/dotcom-rendering/src/components/LeftColumn.stories.tsx b/dotcom-rendering/src/components/LeftColumn.stories.tsx index 03306ed582b..f1f43ce13a5 100644 --- a/dotcom-rendering/src/components/LeftColumn.stories.tsx +++ b/dotcom-rendering/src/components/LeftColumn.stories.tsx @@ -1,4 +1,4 @@ -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { ArticleContainer } from './ArticleContainer'; import { Flex } from './Flex'; import { LeftColumn } from './LeftColumn'; diff --git a/dotcom-rendering/src/components/Lightbox.stories.tsx b/dotcom-rendering/src/components/Lightbox.stories.tsx index 4a8f4dbf76d..c79a6291949 100644 --- a/dotcom-rendering/src/components/Lightbox.stories.tsx +++ b/dotcom-rendering/src/components/Lightbox.stories.tsx @@ -7,7 +7,7 @@ import { ArticleDisplay, ArticleSpecial, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import type { ImageForLightbox } from '../types/content'; import { LightboxLayout } from './LightboxLayout.importable'; diff --git a/dotcom-rendering/src/components/LightboxImages.tsx b/dotcom-rendering/src/components/LightboxImages.tsx index bae005f5784..1e8728c3c7b 100644 --- a/dotcom-rendering/src/components/LightboxImages.tsx +++ b/dotcom-rendering/src/components/LightboxImages.tsx @@ -12,7 +12,7 @@ import { import { Hide, Link } from '@guardian/source/react-components'; import { StarRating } from '@guardian/source-development-kitchen/react-components'; import { useEffect, useState } from 'react'; -import type { ArticleFormat } from '../lib/format'; +import type { ArticleFormat } from '../lib/articleFormat'; import type { ImageForLightbox } from '../types/content'; import { LightboxCaption } from './LightboxCaption'; import { LightboxLoader } from './LightboxLoader'; diff --git a/dotcom-rendering/src/components/LightboxJavascript.tsx b/dotcom-rendering/src/components/LightboxJavascript.tsx index 3d915359092..5f3a620ad74 100644 --- a/dotcom-rendering/src/components/LightboxJavascript.tsx +++ b/dotcom-rendering/src/components/LightboxJavascript.tsx @@ -4,7 +4,7 @@ import { from, space } from '@guardian/source/foundations'; import libDebounce from 'lodash.debounce'; import { useEffect, useState } from 'react'; import screenfull from 'screenfull'; -import type { ArticleFormat } from '../lib/format'; +import type { ArticleFormat } from '../lib/articleFormat'; import type { ImageForLightbox } from '../types/content'; import { LightboxImages } from './LightboxImages'; diff --git a/dotcom-rendering/src/components/LightboxLayout.importable.tsx b/dotcom-rendering/src/components/LightboxLayout.importable.tsx index 2c52d9dd8bc..b9781915d10 100644 --- a/dotcom-rendering/src/components/LightboxLayout.importable.tsx +++ b/dotcom-rendering/src/components/LightboxLayout.importable.tsx @@ -13,7 +13,7 @@ import { SvgArrowRightStraight, SvgCross, } from '@guardian/source/react-components'; -import type { ArticleFormat } from '../lib/format'; +import type { ArticleFormat } from '../lib/articleFormat'; import { getZIndex } from '../lib/getZIndex'; import type { ImageForLightbox } from '../types/content'; import { LightboxJavascript } from './LightboxJavascript'; diff --git a/dotcom-rendering/src/components/LightboxLink.tsx b/dotcom-rendering/src/components/LightboxLink.tsx index 94531f4d430..84b70c2e70e 100644 --- a/dotcom-rendering/src/components/LightboxLink.tsx +++ b/dotcom-rendering/src/components/LightboxLink.tsx @@ -10,7 +10,7 @@ import { ArticleDesign, ArticleDisplay, type ArticleFormat, -} from '../lib/format'; +} from '../lib/articleFormat'; import type { RoleType } from '../types/content'; type Props = { diff --git a/dotcom-rendering/src/components/LinkHeadline.stories.tsx b/dotcom-rendering/src/components/LinkHeadline.stories.tsx index 4a4bba592a2..e68829517c2 100644 --- a/dotcom-rendering/src/components/LinkHeadline.stories.tsx +++ b/dotcom-rendering/src/components/LinkHeadline.stories.tsx @@ -7,7 +7,7 @@ import { type ArticleFormat, ArticleSpecial, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { LinkHeadline } from './LinkHeadline'; import { Section } from './Section'; diff --git a/dotcom-rendering/src/components/LiveBlock.stories.tsx b/dotcom-rendering/src/components/LiveBlock.stories.tsx index 1f2b1db54d5..9b565f675d3 100644 --- a/dotcom-rendering/src/components/LiveBlock.stories.tsx +++ b/dotcom-rendering/src/components/LiveBlock.stories.tsx @@ -3,7 +3,7 @@ import { breakpoints, from } from '@guardian/source/foundations'; import { lightDecorator } from '../../.storybook/decorators/themeDecorator'; import { images } from '../../fixtures/generated/images'; import { liveBlock } from '../../fixtures/manual/liveBlock'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { LiveBlock } from './LiveBlock'; const Wrapper = ({ children }: { children: React.ReactNode }) => { diff --git a/dotcom-rendering/src/components/LiveBlock.tsx b/dotcom-rendering/src/components/LiveBlock.tsx index 3dfc26871b0..0a39eae71d9 100644 --- a/dotcom-rendering/src/components/LiveBlock.tsx +++ b/dotcom-rendering/src/components/LiveBlock.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { isUndefined } from '@guardian/libs'; +import type { ArticleFormat } from '../lib/articleFormat'; import type { EditionId } from '../lib/edition'; -import type { ArticleFormat } from '../lib/format'; import { RenderArticleElement } from '../lib/renderElement'; import type { ServerSideTests, Switches } from '../types/config'; import { Island } from './Island'; diff --git a/dotcom-rendering/src/components/LiveBlogBlocksAndAdverts.tsx b/dotcom-rendering/src/components/LiveBlogBlocksAndAdverts.tsx index df2f4ce03f3..c1c39e255f9 100644 --- a/dotcom-rendering/src/components/LiveBlogBlocksAndAdverts.tsx +++ b/dotcom-rendering/src/components/LiveBlogBlocksAndAdverts.tsx @@ -1,6 +1,6 @@ import { Fragment } from 'react'; +import type { ArticleFormat } from '../lib/articleFormat'; import type { EditionId } from '../lib/edition'; -import type { ArticleFormat } from '../lib/format'; import { getLiveblogAdPositions } from '../lib/getLiveblogAdPositions'; import type { ServerSideTests, Switches } from '../types/config'; import { AdPlaceholder } from './AdPlaceholder.apps'; diff --git a/dotcom-rendering/src/components/LiveBlogRenderer.tsx b/dotcom-rendering/src/components/LiveBlogRenderer.tsx index 6ec3b4b93a5..0b5d036d6b7 100644 --- a/dotcom-rendering/src/components/LiveBlogRenderer.tsx +++ b/dotcom-rendering/src/components/LiveBlogRenderer.tsx @@ -1,6 +1,6 @@ import { Hide } from '@guardian/source/react-components'; +import type { ArticleFormat } from '../lib/articleFormat'; import type { EditionId } from '../lib/edition'; -import type { ArticleFormat } from '../lib/format'; import type { ServerSideTests, Switches } from '../types/config'; import type { TagType } from '../types/tag'; import { useConfig } from './ConfigContext'; diff --git a/dotcom-rendering/src/components/MainMedia.amp.tsx b/dotcom-rendering/src/components/MainMedia.amp.tsx index f3f0b25c6d3..d1f79a2a091 100644 --- a/dotcom-rendering/src/components/MainMedia.amp.tsx +++ b/dotcom-rendering/src/components/MainMedia.amp.tsx @@ -4,7 +4,7 @@ import { textSans15, visuallyHidden, } from '@guardian/source/foundations'; -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import { bestFitImage, heightEstimate } from '../lib/image-fit.amp'; import { scrsetStringFromImagesSources } from '../lib/srcset-utils.amp'; import InfoIcon from '../static/icons/info.svg'; diff --git a/dotcom-rendering/src/components/MainMedia.tsx b/dotcom-rendering/src/components/MainMedia.tsx index 6cdae88b5a0..d7cb77e10f3 100644 --- a/dotcom-rendering/src/components/MainMedia.tsx +++ b/dotcom-rendering/src/components/MainMedia.tsx @@ -1,11 +1,11 @@ import { css } from '@emotion/react'; import { space, until } from '@guardian/source/foundations'; -import type { EditionId } from '../lib/edition'; import { ArticleDesign, ArticleDisplay, type ArticleFormat, -} from '../lib/format'; +} from '../lib/articleFormat'; +import type { EditionId } from '../lib/edition'; import { getZIndex } from '../lib/getZIndex'; import { RenderArticleElement } from '../lib/renderElement'; import type { ServerSideTests, Switches } from '../types/config'; diff --git a/dotcom-rendering/src/components/MapEmbedBlockComponent.importable.tsx b/dotcom-rendering/src/components/MapEmbedBlockComponent.importable.tsx index 22fcb767999..96dd37f2d38 100644 --- a/dotcom-rendering/src/components/MapEmbedBlockComponent.importable.tsx +++ b/dotcom-rendering/src/components/MapEmbedBlockComponent.importable.tsx @@ -1,5 +1,5 @@ import { css } from '@emotion/react'; -import type { ArticleFormat } from '../lib/format'; +import type { ArticleFormat } from '../lib/articleFormat'; import type { RoleType } from '../types/content'; import { Caption } from './Caption'; import { ClickToView } from './ClickToView'; diff --git a/dotcom-rendering/src/components/Masthead/HighlightsCard.stories.tsx b/dotcom-rendering/src/components/Masthead/HighlightsCard.stories.tsx index 4ef7447f312..c81762453a1 100644 --- a/dotcom-rendering/src/components/Masthead/HighlightsCard.stories.tsx +++ b/dotcom-rendering/src/components/Masthead/HighlightsCard.stories.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { from } from '@guardian/source/foundations'; import type { Meta, StoryObj } from '@storybook/react'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import type { MainMedia } from '../../types/mainMedia'; import { HighlightsCard } from './HighlightsCard'; diff --git a/dotcom-rendering/src/components/Masthead/HighlightsCard.tsx b/dotcom-rendering/src/components/Masthead/HighlightsCard.tsx index 8007f139431..9f0aab3f720 100644 --- a/dotcom-rendering/src/components/Masthead/HighlightsCard.tsx +++ b/dotcom-rendering/src/components/Masthead/HighlightsCard.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { between, from, until } from '@guardian/source/foundations'; +import { ArticleDesign, type ArticleFormat } from '../../lib/articleFormat'; import { isMediaCard } from '../../lib/cardHelpers'; -import { ArticleDesign, type ArticleFormat } from '../../lib/format'; import { palette } from '../../palette'; import type { DCRFrontImage } from '../../types/front'; import type { MainMedia } from '../../types/mainMedia'; diff --git a/dotcom-rendering/src/components/Masthead/Titlepiece/Nav.mock.tsx b/dotcom-rendering/src/components/Masthead/Titlepiece/Nav.mock.tsx index 197ee18a8af..341ec8369c9 100644 --- a/dotcom-rendering/src/components/Masthead/Titlepiece/Nav.mock.tsx +++ b/dotcom-rendering/src/components/Masthead/Titlepiece/Nav.mock.tsx @@ -1,4 +1,4 @@ -import { Pillar } from '../../../lib/format'; +import { Pillar } from '../../../lib/articleFormat'; import type { NavType } from '../../../model/extract-nav'; export const nav: NavType = { diff --git a/dotcom-rendering/src/components/Masthead/Titlepiece/Pillars.stories.tsx b/dotcom-rendering/src/components/Masthead/Titlepiece/Pillars.stories.tsx index 46e85afd94a..6583e03c1b2 100644 --- a/dotcom-rendering/src/components/Masthead/Titlepiece/Pillars.stories.tsx +++ b/dotcom-rendering/src/components/Masthead/Titlepiece/Pillars.stories.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { palette as sourcePalette } from '@guardian/source/foundations'; import type { Meta } from '@storybook/react'; -import type { Pillar } from '../../../lib/format'; +import type { Pillar } from '../../../lib/articleFormat'; import { nestedOphanComponents } from '../../../lib/ophan-helpers'; import { nav } from './Nav.mock'; import { Pillars } from './Pillars'; diff --git a/dotcom-rendering/src/components/Masthead/Titlepiece/Pillars.tsx b/dotcom-rendering/src/components/Masthead/Titlepiece/Pillars.tsx index 42e63e3e450..bb1ff3aec1e 100644 --- a/dotcom-rendering/src/components/Masthead/Titlepiece/Pillars.tsx +++ b/dotcom-rendering/src/components/Masthead/Titlepiece/Pillars.tsx @@ -12,7 +12,7 @@ import { palette as sourcePalette, space, } from '@guardian/source/foundations'; -import { type ArticleTheme, Pillar } from '../../../lib/format'; +import { type ArticleTheme, Pillar } from '../../../lib/articleFormat'; import { nestedOphanComponents } from '../../../lib/ophan-helpers'; import type { NavType } from '../../../model/extract-nav'; import { palette as themePalette } from '../../../palette'; diff --git a/dotcom-rendering/src/components/MatchNav.stories.tsx b/dotcom-rendering/src/components/MatchNav.stories.tsx index 7331dabccf9..abb20f7d2e5 100644 --- a/dotcom-rendering/src/components/MatchNav.stories.tsx +++ b/dotcom-rendering/src/components/MatchNav.stories.tsx @@ -1,4 +1,4 @@ -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import type { TeamType } from '../types/sport'; import { ArticleContainer } from './ArticleContainer'; import { Flex } from './Flex'; diff --git a/dotcom-rendering/src/components/MatchStats.stories.tsx b/dotcom-rendering/src/components/MatchStats.stories.tsx index 9b9226b5d85..028a66f4095 100644 --- a/dotcom-rendering/src/components/MatchStats.stories.tsx +++ b/dotcom-rendering/src/components/MatchStats.stories.tsx @@ -1,5 +1,5 @@ import { matchReport } from '../../fixtures/generated/match-report'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { ArticleContainer } from './ArticleContainer'; import { Flex } from './Flex'; import { LeftColumn } from './LeftColumn'; diff --git a/dotcom-rendering/src/components/MatchStats.tsx b/dotcom-rendering/src/components/MatchStats.tsx index 6c27b1d97ee..1d519270449 100644 --- a/dotcom-rendering/src/components/MatchStats.tsx +++ b/dotcom-rendering/src/components/MatchStats.tsx @@ -8,7 +8,7 @@ import { textSans15, until, } from '@guardian/source/foundations'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import { palette as themePalette } from '../palette'; import type { TeamType } from '../types/sport'; import { Distribution } from './Distribution'; diff --git a/dotcom-rendering/src/components/MatchTabs.stories.tsx b/dotcom-rendering/src/components/MatchTabs.stories.tsx index ce9c08e4b19..6636c7fd0dc 100644 --- a/dotcom-rendering/src/components/MatchTabs.stories.tsx +++ b/dotcom-rendering/src/components/MatchTabs.stories.tsx @@ -1,4 +1,4 @@ -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { MatchTabs } from './MatchTabs'; export default { diff --git a/dotcom-rendering/src/components/MatchTabs.tsx b/dotcom-rendering/src/components/MatchTabs.tsx index c5e2deff888..fcc453d6d8c 100644 --- a/dotcom-rendering/src/components/MatchTabs.tsx +++ b/dotcom-rendering/src/components/MatchTabs.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { headlineMedium17, space } from '@guardian/source/foundations'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import { palette as themePalette } from '../palette'; type Props = { diff --git a/dotcom-rendering/src/components/MiniProfile.tsx b/dotcom-rendering/src/components/MiniProfile.tsx index 30edf8b27fc..c0e6d842f07 100644 --- a/dotcom-rendering/src/components/MiniProfile.tsx +++ b/dotcom-rendering/src/components/MiniProfile.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { neutral, space, textSans14 } from '@guardian/source/foundations'; import sanitise from 'sanitize-html'; -import type { ArticleFormat } from '../lib/format'; +import type { ArticleFormat } from '../lib/articleFormat'; import { slugify } from '../model/enhance-H2s'; import { palette } from '../palette'; import type { MiniProfile as MiniProfileModel } from '../types/content'; diff --git a/dotcom-rendering/src/components/MiniProfiles.stories.tsx b/dotcom-rendering/src/components/MiniProfiles.stories.tsx index c124c1838e0..afabcba7008 100644 --- a/dotcom-rendering/src/components/MiniProfiles.stories.tsx +++ b/dotcom-rendering/src/components/MiniProfiles.stories.tsx @@ -7,9 +7,10 @@ import { ArticleDisplay, type ArticleFormat, ArticleSpecial, + getAllDesigns, + getAllThemes, Pillar, -} from '../lib/format'; -import { getAllDesigns, getAllThemes } from '../lib/format'; +} from '../lib/articleFormat'; import { RenderArticleElement } from '../lib/renderElement'; import type { TextBlockElement } from '../types/content'; import { MiniProfiles } from './MiniProfiles'; diff --git a/dotcom-rendering/src/components/MiniProfiles.tsx b/dotcom-rendering/src/components/MiniProfiles.tsx index 2ed3985aabd..186bc263220 100644 --- a/dotcom-rendering/src/components/MiniProfiles.tsx +++ b/dotcom-rendering/src/components/MiniProfiles.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { palette } from '@guardian/source/foundations'; +import type { ArticleFormat } from '../lib/articleFormat'; import type { EditionId } from '../lib/edition'; -import type { ArticleFormat } from '../lib/format'; import type { ArticleElementRenderer } from '../lib/renderElement'; import type { ServerSideTests, Switches } from '../types/config'; import type { MiniProfile, StarRating } from '../types/content'; diff --git a/dotcom-rendering/src/components/MostViewedFooterItem.tsx b/dotcom-rendering/src/components/MostViewedFooterItem.tsx index 5cd11fde18d..07ed19b1cfc 100644 --- a/dotcom-rendering/src/components/MostViewedFooterItem.tsx +++ b/dotcom-rendering/src/components/MostViewedFooterItem.tsx @@ -5,7 +5,7 @@ import { ArticleDesign, type ArticleFormat, ArticleSpecial, -} from '../lib/format'; +} from '../lib/articleFormat'; import { palette } from '../palette'; import { AgeWarning } from './AgeWarning'; import { BigNumber } from './BigNumber'; diff --git a/dotcom-rendering/src/components/MostViewedFooterLayout.stories.tsx b/dotcom-rendering/src/components/MostViewedFooterLayout.stories.tsx index 67e278d4243..753d3aa0bba 100644 --- a/dotcom-rendering/src/components/MostViewedFooterLayout.stories.tsx +++ b/dotcom-rendering/src/components/MostViewedFooterLayout.stories.tsx @@ -1,7 +1,7 @@ import type { StoryObj } from '@storybook/react'; import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator'; import { trails } from '../../fixtures/manual/trails'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { palette } from '../palette'; import { MostViewedFooter } from './MostViewedFooter.importable'; import { MostViewedFooterLayout } from './MostViewedFooterLayout'; diff --git a/dotcom-rendering/src/components/MostViewedRight.stories.tsx b/dotcom-rendering/src/components/MostViewedRight.stories.tsx index 3d74b8af18c..ce450ed6515 100644 --- a/dotcom-rendering/src/components/MostViewedRight.stories.tsx +++ b/dotcom-rendering/src/components/MostViewedRight.stories.tsx @@ -4,7 +4,7 @@ import { splitTheme, type StoryProps, } from '../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { ArticleContainer } from './ArticleContainer'; import { Flex } from './Flex'; import { LeftColumn } from './LeftColumn'; diff --git a/dotcom-rendering/src/components/MostViewedRightItem.tsx b/dotcom-rendering/src/components/MostViewedRightItem.tsx index c74571f2a72..38f0f84390f 100644 --- a/dotcom-rendering/src/components/MostViewedRightItem.tsx +++ b/dotcom-rendering/src/components/MostViewedRightItem.tsx @@ -3,7 +3,7 @@ import { headlineMedium17, palette as sourcePalette, } from '@guardian/source/foundations'; -import { ArticleDesign, ArticleSpecial } from '../lib/format'; +import { ArticleDesign, ArticleSpecial } from '../lib/articleFormat'; import { useHover } from '../lib/useHover'; import { palette as themePalette } from '../palette'; import type { TrailType } from '../types/trails'; diff --git a/dotcom-rendering/src/components/MostViewedRightWithAd.importable.tsx b/dotcom-rendering/src/components/MostViewedRightWithAd.importable.tsx index f07c32f7d8e..56ce6d03e42 100644 --- a/dotcom-rendering/src/components/MostViewedRightWithAd.importable.tsx +++ b/dotcom-rendering/src/components/MostViewedRightWithAd.importable.tsx @@ -3,7 +3,7 @@ import { ArticleDesign, type ArticleFormat, ArticleSpecial, -} from '../lib/format'; +} from '../lib/articleFormat'; import { RightAdsPlaceholder } from './AdPlaceholder.apps'; import { AdSlot } from './AdSlot.web'; import { useConfig } from './ConfigContext'; diff --git a/dotcom-rendering/src/components/MultiImageBlockComponent.stories.tsx b/dotcom-rendering/src/components/MultiImageBlockComponent.stories.tsx index 092500deb39..5c068242595 100644 --- a/dotcom-rendering/src/components/MultiImageBlockComponent.stories.tsx +++ b/dotcom-rendering/src/components/MultiImageBlockComponent.stories.tsx @@ -1,4 +1,4 @@ -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { MultiImageBlockComponent } from './MultiImageBlockComponent'; import { fourImages } from './MultiImageBlockComponent.mocks'; import { Section } from './Section'; diff --git a/dotcom-rendering/src/components/MultiImageBlockComponent.tsx b/dotcom-rendering/src/components/MultiImageBlockComponent.tsx index 15b159cb403..c4c1b89927b 100644 --- a/dotcom-rendering/src/components/MultiImageBlockComponent.tsx +++ b/dotcom-rendering/src/components/MultiImageBlockComponent.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { from, space, until } from '@guardian/source/foundations'; -import type { ArticleFormat } from '../lib/format'; +import type { ArticleFormat } from '../lib/articleFormat'; import type { ImageBlockElement } from '../types/content'; import { Caption } from './Caption'; import { GridItem } from './GridItem'; diff --git a/dotcom-rendering/src/components/NumberedTitleBlockComponent.stories.tsx b/dotcom-rendering/src/components/NumberedTitleBlockComponent.stories.tsx index 3d5fa86b672..b2768d981d1 100644 --- a/dotcom-rendering/src/components/NumberedTitleBlockComponent.stories.tsx +++ b/dotcom-rendering/src/components/NumberedTitleBlockComponent.stories.tsx @@ -5,7 +5,7 @@ import { ArticleSpecial, type ArticleTheme, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { NumberedTitleBlockComponent } from './NumberedTitleBlockComponent'; export default { diff --git a/dotcom-rendering/src/components/OnwardsUpper.importable.tsx b/dotcom-rendering/src/components/OnwardsUpper.importable.tsx index 7b621399381..d8a59467e87 100644 --- a/dotcom-rendering/src/components/OnwardsUpper.importable.tsx +++ b/dotcom-rendering/src/components/OnwardsUpper.importable.tsx @@ -1,7 +1,11 @@ import { css } from '@emotion/react'; import { joinUrl } from '@guardian/libs'; +import { + type ArticleFormat, + type ArticleTheme, + Pillar, +} from '../lib/articleFormat'; import type { EditionId } from '../lib/edition'; -import { type ArticleFormat, type ArticleTheme, Pillar } from '../lib/format'; import { useIsAndroid } from '../lib/useIsAndroid'; import { palette } from '../palette'; import type { OnwardsSource } from '../types/onwards'; diff --git a/dotcom-rendering/src/components/Pagination.stories.tsx b/dotcom-rendering/src/components/Pagination.stories.tsx index ec6757b5529..56a1a274bbe 100644 --- a/dotcom-rendering/src/components/Pagination.stories.tsx +++ b/dotcom-rendering/src/components/Pagination.stories.tsx @@ -1,8 +1,11 @@ import { breakpoints } from '@guardian/source/foundations'; import type { StoryProps } from '../../.storybook/decorators/splitThemeDecorator'; import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay } from '../lib/format'; -import { getAllThemes } from '../lib/format'; +import { + ArticleDesign, + ArticleDisplay, + getAllThemes, +} from '../lib/articleFormat'; import { Pagination } from './Pagination'; export default { diff --git a/dotcom-rendering/src/components/PaidForBand.amp.tsx b/dotcom-rendering/src/components/PaidForBand.amp.tsx index e236bd0a544..a50ed2899b0 100644 --- a/dotcom-rendering/src/components/PaidForBand.amp.tsx +++ b/dotcom-rendering/src/components/PaidForBand.amp.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { from, palette, textSans15 } from '@guardian/source/foundations'; -import { ArticleSpecial } from '../lib/format'; +import { ArticleSpecial } from '../lib/articleFormat'; import { pillarPalette_DO_NOT_USE } from '../lib/pillars'; import ArrowRightIcon from '../static/icons/arrow-right.svg'; import LabsLogo from '../static/logos/the-guardian-labs.svg'; diff --git a/dotcom-rendering/src/components/PersonalityQuizAtom.importable.tsx b/dotcom-rendering/src/components/PersonalityQuizAtom.importable.tsx index 0be0ae21444..8cf9767320e 100644 --- a/dotcom-rendering/src/components/PersonalityQuizAtom.importable.tsx +++ b/dotcom-rendering/src/components/PersonalityQuizAtom.importable.tsx @@ -10,7 +10,7 @@ import { import { Button, Radio, RadioGroup } from '@guardian/source/react-components'; import type { KeyboardEvent, MouseEvent } from 'react'; import { memo, useEffect, useState } from 'react'; -import { ArticleSpecial, type ArticleTheme } from '../lib/format'; +import { ArticleSpecial, type ArticleTheme } from '../lib/articleFormat'; import type { AnswerType, PersonalityQuizAtomType, diff --git a/dotcom-rendering/src/components/PersonalityQuizAtom.stories.tsx b/dotcom-rendering/src/components/PersonalityQuizAtom.stories.tsx index 38e01bb6fac..8721b8e3f4a 100644 --- a/dotcom-rendering/src/components/PersonalityQuizAtom.stories.tsx +++ b/dotcom-rendering/src/components/PersonalityQuizAtom.stories.tsx @@ -10,7 +10,7 @@ import { ArticleDisplay, ArticleSpecial, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { PersonalityQuizAtom } from './PersonalityQuizAtom.importable'; const meta = { diff --git a/dotcom-rendering/src/components/PersonalityQuizAtom.test.tsx b/dotcom-rendering/src/components/PersonalityQuizAtom.test.tsx index f21ce75efc3..0c3cf3adbc2 100644 --- a/dotcom-rendering/src/components/PersonalityQuizAtom.test.tsx +++ b/dotcom-rendering/src/components/PersonalityQuizAtom.test.tsx @@ -6,7 +6,7 @@ import { exampleResultBuckets, } from '../../fixtures/manual/personalityQuizAtom'; import { sharingUrls } from '../../fixtures/manual/sharingUrls'; -import { Pillar } from '../lib/format'; +import { Pillar } from '../lib/articleFormat'; import { findMostReferredToBucketId, PersonalityQuizAtom, diff --git a/dotcom-rendering/src/components/Picture.tsx b/dotcom-rendering/src/components/Picture.tsx index 3349860f3b5..b95b977d0cb 100644 --- a/dotcom-rendering/src/components/Picture.tsx +++ b/dotcom-rendering/src/components/Picture.tsx @@ -5,7 +5,7 @@ import { ArticleDesign, ArticleDisplay, type ArticleFormat, -} from '../lib/format'; +} from '../lib/articleFormat'; import { generateImageURL } from '../lib/image'; import type { RoleType } from '../types/content'; import type { Loading } from './CardPicture'; diff --git a/dotcom-rendering/src/components/PinnedPost.stories.tsx b/dotcom-rendering/src/components/PinnedPost.stories.tsx index 1465021cdac..5d5c3c021d7 100644 --- a/dotcom-rendering/src/components/PinnedPost.stories.tsx +++ b/dotcom-rendering/src/components/PinnedPost.stories.tsx @@ -8,7 +8,7 @@ import { type ArticleFormat, ArticleSpecial, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { FormatBoundary } from './FormatBoundary'; import { LiveBlock } from './LiveBlock'; import { PinnedPost } from './PinnedPost'; diff --git a/dotcom-rendering/src/components/ProfileAtom.stories.tsx b/dotcom-rendering/src/components/ProfileAtom.stories.tsx index da0eac6bfbe..7ae1c555480 100644 --- a/dotcom-rendering/src/components/ProfileAtom.stories.tsx +++ b/dotcom-rendering/src/components/ProfileAtom.stories.tsx @@ -5,7 +5,7 @@ import { ArticleDisplay, type ArticleFormat, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { ProfileAtom } from './ProfileAtom.importable'; const meta = { diff --git a/dotcom-rendering/src/components/PullQuoteBlockComponent.stories.tsx b/dotcom-rendering/src/components/PullQuoteBlockComponent.stories.tsx index 2f0c6dbf509..ab5e4f0f535 100644 --- a/dotcom-rendering/src/components/PullQuoteBlockComponent.stories.tsx +++ b/dotcom-rendering/src/components/PullQuoteBlockComponent.stories.tsx @@ -5,7 +5,7 @@ import { ArticleDisplay, type ArticleFormat, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { palette as themePalette } from '../palette'; import { PullQuoteBlockComponent } from './PullQuoteBlockComponent'; import { Section } from './Section'; diff --git a/dotcom-rendering/src/components/PullQuoteBlockComponent.tsx b/dotcom-rendering/src/components/PullQuoteBlockComponent.tsx index 744d532f1e5..2fda13c4257 100644 --- a/dotcom-rendering/src/components/PullQuoteBlockComponent.tsx +++ b/dotcom-rendering/src/components/PullQuoteBlockComponent.tsx @@ -7,12 +7,12 @@ import { textSans20, until, } from '@guardian/source/foundations'; -import { unescapeData } from '../lib/escapeData'; import { ArticleDesign, type ArticleFormat, ArticleSpecial, -} from '../lib/format'; +} from '../lib/articleFormat'; +import { unescapeData } from '../lib/escapeData'; import { palette } from '../palette'; import { QuoteIcon } from './QuoteIcon'; diff --git a/dotcom-rendering/src/components/PullquoteBlockComponent.amp.tsx b/dotcom-rendering/src/components/PullquoteBlockComponent.amp.tsx index f6c83a65df1..5b9f350bbd2 100644 --- a/dotcom-rendering/src/components/PullquoteBlockComponent.amp.tsx +++ b/dotcom-rendering/src/components/PullquoteBlockComponent.amp.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { article17, palette } from '@guardian/source/foundations'; -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import { pillarPalette_DO_NOT_USE } from '../lib/pillars'; import Quote from '../static/icons/quote.svg'; diff --git a/dotcom-rendering/src/components/QAndAExplainer.tsx b/dotcom-rendering/src/components/QAndAExplainer.tsx index 8465450dc9f..7271fc80814 100644 --- a/dotcom-rendering/src/components/QAndAExplainer.tsx +++ b/dotcom-rendering/src/components/QAndAExplainer.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; +import type { ArticleFormat } from '../lib/articleFormat'; import type { EditionId } from '../lib/edition'; -import type { ArticleFormat } from '../lib/format'; import type { ArticleElementRenderer } from '../lib/renderElement'; import { slugify } from '../model/enhance-H2s'; import { palette } from '../palette'; diff --git a/dotcom-rendering/src/components/QAndAExplainers.stories.tsx b/dotcom-rendering/src/components/QAndAExplainers.stories.tsx index 0d1621f3e53..5dddddfee87 100644 --- a/dotcom-rendering/src/components/QAndAExplainers.stories.tsx +++ b/dotcom-rendering/src/components/QAndAExplainers.stories.tsx @@ -6,9 +6,9 @@ import { ArticleDesign, ArticleDisplay, ArticleSpecial, + getAllThemes, Pillar, -} from '../lib/format'; -import { getAllThemes } from '../lib/format'; +} from '../lib/articleFormat'; import { RenderArticleElement } from '../lib/renderElement'; import type { TextBlockElement } from '../types/content'; import { QAndAExplainers } from './QAndAExplainers'; diff --git a/dotcom-rendering/src/components/QAndAExplainers.tsx b/dotcom-rendering/src/components/QAndAExplainers.tsx index 3d724b02a4f..ea0c0131172 100644 --- a/dotcom-rendering/src/components/QAndAExplainers.tsx +++ b/dotcom-rendering/src/components/QAndAExplainers.tsx @@ -1,5 +1,5 @@ +import type { ArticleFormat } from '../lib/articleFormat'; import type { EditionId } from '../lib/edition'; -import type { ArticleFormat } from '../lib/format'; import type { ArticleElementRenderer } from '../lib/renderElement'; import type { ServerSideTests, Switches } from '../types/config'; import type { QAndAExplainer, StarRating } from '../types/content'; diff --git a/dotcom-rendering/src/components/QandaAtom.stories.tsx b/dotcom-rendering/src/components/QandaAtom.stories.tsx index 1f3bfb1b5bb..7dc96e0e82c 100644 --- a/dotcom-rendering/src/components/QandaAtom.stories.tsx +++ b/dotcom-rendering/src/components/QandaAtom.stories.tsx @@ -5,8 +5,12 @@ import { imageStoryWithCreditExpanded, listStoryExpanded, } from '../../fixtures/manual/qandaAtom'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; -import { getAllThemes } from '../lib/format'; +import { + ArticleDesign, + ArticleDisplay, + getAllThemes, + Pillar, +} from '../lib/articleFormat'; import { QandaAtom as QandaAtomComponent } from './QandaAtom.importable'; const meta: Meta = { diff --git a/dotcom-rendering/src/components/RichLink.stories.tsx b/dotcom-rendering/src/components/RichLink.stories.tsx index 24c6cb3ff2e..9b09c98be4f 100644 --- a/dotcom-rendering/src/components/RichLink.stories.tsx +++ b/dotcom-rendering/src/components/RichLink.stories.tsx @@ -5,7 +5,7 @@ import { ArticleDisplay, ArticleSpecial, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { palette } from '../palette'; import { Figure } from './Figure'; import { RichLink } from './RichLink'; diff --git a/dotcom-rendering/src/components/RichLink.tsx b/dotcom-rendering/src/components/RichLink.tsx index 369063b88ec..c19a4d08e7e 100644 --- a/dotcom-rendering/src/components/RichLink.tsx +++ b/dotcom-rendering/src/components/RichLink.tsx @@ -12,12 +12,12 @@ import { textSansBold15, textSansBold17, } from '@guardian/source/foundations'; -import { getSoleContributor, isContributor } from '../lib/byline'; import { ArticleDesign, type ArticleFormat, ArticleSpecial, -} from '../lib/format'; +} from '../lib/articleFormat'; +import { getSoleContributor, isContributor } from '../lib/byline'; import { palette as themePalette } from '../palette'; import ArrowInCircle from '../static/icons/arrow-in-circle.svg'; import type { StarRating as Rating } from '../types/content'; diff --git a/dotcom-rendering/src/components/RichLinkBlockComponent.amp.tsx b/dotcom-rendering/src/components/RichLinkBlockComponent.amp.tsx index 8714ed6ab09..e21d8e64f5e 100644 --- a/dotcom-rendering/src/components/RichLinkBlockComponent.amp.tsx +++ b/dotcom-rendering/src/components/RichLinkBlockComponent.amp.tsx @@ -5,7 +5,7 @@ import { text, textSans12, } from '@guardian/source/foundations'; -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import { pillarPalette_DO_NOT_USE } from '../lib/pillars'; import type { RichLinkBlockElement } from '../types/content'; diff --git a/dotcom-rendering/src/components/RichLinkComponent.importable.test.tsx b/dotcom-rendering/src/components/RichLinkComponent.importable.test.tsx index e18e800a046..95cf409cc08 100644 --- a/dotcom-rendering/src/components/RichLinkComponent.importable.test.tsx +++ b/dotcom-rendering/src/components/RichLinkComponent.importable.test.tsx @@ -1,5 +1,9 @@ import { renderToString } from 'react-dom/server'; -import { ArticleDesign, ArticleDisplay, ArticleSpecial } from '../lib/format'; +import { + ArticleDesign, + ArticleDisplay, + ArticleSpecial, +} from '../lib/articleFormat'; import { ConfigProvider } from './ConfigContext'; import { RichLinkComponent } from './RichLinkComponent.importable'; diff --git a/dotcom-rendering/src/components/RichLinkComponent.importable.tsx b/dotcom-rendering/src/components/RichLinkComponent.importable.tsx index 528b190c90f..3cf548f7755 100644 --- a/dotcom-rendering/src/components/RichLinkComponent.importable.tsx +++ b/dotcom-rendering/src/components/RichLinkComponent.importable.tsx @@ -1,4 +1,4 @@ -import { type ArticleFormat, decideFormat } from '../lib/format'; +import { type ArticleFormat, decideFormat } from '../lib/articleFormat'; import { useApi } from '../lib/useApi'; import type { RichLinkBlockElement, StarRating } from '../types/content'; import type { FEFormat } from '../types/frontend'; diff --git a/dotcom-rendering/src/components/Section.tsx b/dotcom-rendering/src/components/Section.tsx index 97e86d50c75..5f96c7889a2 100644 --- a/dotcom-rendering/src/components/Section.tsx +++ b/dotcom-rendering/src/components/Section.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { from, space, until } from '@guardian/source/foundations'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import type { EditionId } from '../lib/edition'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; import { hiddenStyles } from '../lib/hiddenStyles'; import { palette } from '../palette'; import type { TreatType } from '../types/front'; diff --git a/dotcom-rendering/src/components/SeriesLink.amp.tsx b/dotcom-rendering/src/components/SeriesLink.amp.tsx index d893c739162..f5511cfc88c 100644 --- a/dotcom-rendering/src/components/SeriesLink.amp.tsx +++ b/dotcom-rendering/src/components/SeriesLink.amp.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { headlineMedium17 } from '@guardian/source/foundations'; -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import { pillarPalette_DO_NOT_USE } from '../lib/pillars'; import type { TagType } from '../types/tag'; diff --git a/dotcom-rendering/src/components/SeriesSectionLink.tsx b/dotcom-rendering/src/components/SeriesSectionLink.tsx index f67670896ab..e75a70f0b85 100644 --- a/dotcom-rendering/src/components/SeriesSectionLink.tsx +++ b/dotcom-rendering/src/components/SeriesSectionLink.tsx @@ -16,7 +16,7 @@ import { ArticleDisplay, type ArticleFormat, ArticleSpecial, -} from '../lib/format'; +} from '../lib/articleFormat'; import { palette as themePalette } from '../palette'; import type { TagType } from '../types/tag'; import { Hide } from './Hide'; diff --git a/dotcom-rendering/src/components/ShareButton.importable.tsx b/dotcom-rendering/src/components/ShareButton.importable.tsx index d76656227ec..a80f8b75898 100644 --- a/dotcom-rendering/src/components/ShareButton.importable.tsx +++ b/dotcom-rendering/src/components/ShareButton.importable.tsx @@ -8,7 +8,7 @@ import { SvgShareWeb, } from '@guardian/source/react-components'; import { useEffect, useMemo, useState } from 'react'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import { transparentColour } from '../lib/transparentColour'; import { palette as themePalette } from '../palette'; diff --git a/dotcom-rendering/src/components/ShareButton.stories.tsx b/dotcom-rendering/src/components/ShareButton.stories.tsx index 0ace8bdabc7..b5af065b2cc 100644 --- a/dotcom-rendering/src/components/ShareButton.stories.tsx +++ b/dotcom-rendering/src/components/ShareButton.stories.tsx @@ -4,7 +4,7 @@ import { defaultFormats, splitTheme, } from '../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { palette as themePalette } from '../palette'; import { CopyNativeShareButton, diff --git a/dotcom-rendering/src/components/ShareIcons.amp.tsx b/dotcom-rendering/src/components/ShareIcons.amp.tsx index 71fcb1963d4..31e9b8dff4e 100644 --- a/dotcom-rendering/src/components/ShareIcons.amp.tsx +++ b/dotcom-rendering/src/components/ShareIcons.amp.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { visuallyHidden } from '@guardian/source/foundations'; import React from 'react'; -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import { neutralBorder, pillarMap, diff --git a/dotcom-rendering/src/components/SignedInAs.stories.tsx b/dotcom-rendering/src/components/SignedInAs.stories.tsx index 47ce4a964ad..2bfd5f651f7 100644 --- a/dotcom-rendering/src/components/SignedInAs.stories.tsx +++ b/dotcom-rendering/src/components/SignedInAs.stories.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { SignedInAs } from './SignedInAs'; const aUser = { diff --git a/dotcom-rendering/src/components/SpotifyBlockComponent.importable.tsx b/dotcom-rendering/src/components/SpotifyBlockComponent.importable.tsx index b68c1f104ec..a780c8a84ff 100644 --- a/dotcom-rendering/src/components/SpotifyBlockComponent.importable.tsx +++ b/dotcom-rendering/src/components/SpotifyBlockComponent.importable.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { isUndefined } from '@guardian/libs'; -import type { ArticleFormat } from '../lib/format'; +import type { ArticleFormat } from '../lib/articleFormat'; import type { RoleType } from '../types/content'; import { Caption } from './Caption'; import { ClickToView } from './ClickToView'; diff --git a/dotcom-rendering/src/components/Standfirst.amp.tsx b/dotcom-rendering/src/components/Standfirst.amp.tsx index ec96925dd72..d850c3d1da2 100644 --- a/dotcom-rendering/src/components/Standfirst.amp.tsx +++ b/dotcom-rendering/src/components/Standfirst.amp.tsx @@ -4,7 +4,7 @@ import { palette, textSans20, } from '@guardian/source/foundations'; -import { ArticleSpecial, type ArticleTheme } from '../lib/format'; +import { ArticleSpecial, type ArticleTheme } from '../lib/articleFormat'; import { neutralBorder, pillarPalette_DO_NOT_USE } from '../lib/pillars'; const ListStyle = (iconColour: string) => css` diff --git a/dotcom-rendering/src/components/Standfirst.stories.tsx b/dotcom-rendering/src/components/Standfirst.stories.tsx index beb1e656e78..743805d941d 100644 --- a/dotcom-rendering/src/components/Standfirst.stories.tsx +++ b/dotcom-rendering/src/components/Standfirst.stories.tsx @@ -7,7 +7,7 @@ import { type ArticleFormat, ArticleSpecial, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { Section } from './Section'; import { Standfirst } from './Standfirst'; diff --git a/dotcom-rendering/src/components/Standfirst.test.tsx b/dotcom-rendering/src/components/Standfirst.test.tsx index e0b14d542d4..22cc80fdea0 100644 --- a/dotcom-rendering/src/components/Standfirst.test.tsx +++ b/dotcom-rendering/src/components/Standfirst.test.tsx @@ -1,6 +1,6 @@ import { render } from '@testing-library/react'; import { interactiveLegacyClasses } from '../layouts/lib/interactiveLegacyStyling'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { Standfirst } from './Standfirst'; describe('Standfirst', () => { diff --git a/dotcom-rendering/src/components/Standfirst.tsx b/dotcom-rendering/src/components/Standfirst.tsx index a7dc40caf5c..74f7b4a517e 100644 --- a/dotcom-rendering/src/components/Standfirst.tsx +++ b/dotcom-rendering/src/components/Standfirst.tsx @@ -19,7 +19,7 @@ import { ArticleDisplay, type ArticleFormat, ArticleSpecial, -} from '../lib/format'; +} from '../lib/articleFormat'; import { palette } from '../palette'; type Props = { diff --git a/dotcom-rendering/src/components/StarRatingBlockComponent.stories.tsx b/dotcom-rendering/src/components/StarRatingBlockComponent.stories.tsx index f0f0003da9c..50210e09b67 100644 --- a/dotcom-rendering/src/components/StarRatingBlockComponent.stories.tsx +++ b/dotcom-rendering/src/components/StarRatingBlockComponent.stories.tsx @@ -4,7 +4,7 @@ import { ArticleDisplay, type ArticleFormat, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { StarRatingBlockComponent } from './StarRatingBlockComponent'; const articleFormat: ArticleFormat = { diff --git a/dotcom-rendering/src/components/SubMeta.amp.tsx b/dotcom-rendering/src/components/SubMeta.amp.tsx index f9349573f33..4f0fc044873 100644 --- a/dotcom-rendering/src/components/SubMeta.amp.tsx +++ b/dotcom-rendering/src/components/SubMeta.amp.tsx @@ -6,7 +6,7 @@ import { textSans12, textSans15, } from '@guardian/source/foundations'; -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import { neutralBorder, pillarPalette_DO_NOT_USE } from '../lib/pillars'; import type { BaseLinkType } from '../model/extract-nav'; import CommentIcon from '../static/icons/comment.svg'; diff --git a/dotcom-rendering/src/components/SubMeta.stories.tsx b/dotcom-rendering/src/components/SubMeta.stories.tsx index f3745ece3c0..066c4bb1a34 100644 --- a/dotcom-rendering/src/components/SubMeta.stories.tsx +++ b/dotcom-rendering/src/components/SubMeta.stories.tsx @@ -1,8 +1,11 @@ import { css } from '@emotion/react'; import type { StoryProps } from '../../.storybook/decorators/splitThemeDecorator'; import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay } from '../lib/format'; -import { getAllThemes } from '../lib/format'; +import { + ArticleDesign, + ArticleDisplay, + getAllThemes, +} from '../lib/articleFormat'; import { SubMeta } from './SubMeta'; export default { diff --git a/dotcom-rendering/src/components/SubMeta.tsx b/dotcom-rendering/src/components/SubMeta.tsx index dc583b8c6fa..38634acf448 100644 --- a/dotcom-rendering/src/components/SubMeta.tsx +++ b/dotcom-rendering/src/components/SubMeta.tsx @@ -7,7 +7,7 @@ import { until, } from '@guardian/source/foundations'; import { LinkButton } from '@guardian/source/react-components'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import type { BaseLinkType } from '../model/extract-nav'; import { palette } from '../palette'; import { Island } from './Island'; diff --git a/dotcom-rendering/src/components/Subheading.tsx b/dotcom-rendering/src/components/Subheading.tsx index 185838a918e..5c6c5d94253 100644 --- a/dotcom-rendering/src/components/Subheading.tsx +++ b/dotcom-rendering/src/components/Subheading.tsx @@ -20,7 +20,7 @@ import { type ArticleFormat, ArticleSpecial, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { palette } from '../palette'; const fontStyles = ({ diff --git a/dotcom-rendering/src/components/SubheadingBlockComponent.amp.tsx b/dotcom-rendering/src/components/SubheadingBlockComponent.amp.tsx index d2438a7f666..b30d860b045 100644 --- a/dotcom-rendering/src/components/SubheadingBlockComponent.amp.tsx +++ b/dotcom-rendering/src/components/SubheadingBlockComponent.amp.tsx @@ -5,7 +5,10 @@ import { palette, textSans20, } from '@guardian/source/foundations'; -import { type ArticleTheme, ArticleSpecial as Special } from '../lib/format'; +import { + type ArticleTheme, + ArticleSpecial as Special, +} from '../lib/articleFormat'; import { pillarPalette_DO_NOT_USE } from '../lib/pillars'; const style = (pillar: ArticleTheme) => css` diff --git a/dotcom-rendering/src/components/SubheadingBlockComponent.stories.tsx b/dotcom-rendering/src/components/SubheadingBlockComponent.stories.tsx index ec84a429fd4..f8bb409a129 100644 --- a/dotcom-rendering/src/components/SubheadingBlockComponent.stories.tsx +++ b/dotcom-rendering/src/components/SubheadingBlockComponent.stories.tsx @@ -1,8 +1,13 @@ import { css } from '@emotion/react'; import type { Decorator, Meta, StoryObj } from '@storybook/react'; import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; -import { getAllDesigns, getAllThemes } from '../lib/format'; +import { + ArticleDesign, + ArticleDisplay, + getAllDesigns, + getAllThemes, + Pillar, +} from '../lib/articleFormat'; import { SubheadingBlockComponent } from './SubheadingBlockComponent'; const globalStrongStyles = css` diff --git a/dotcom-rendering/src/components/SubheadingBlockComponent.tsx b/dotcom-rendering/src/components/SubheadingBlockComponent.tsx index c6ffb142429..c34a223c780 100644 --- a/dotcom-rendering/src/components/SubheadingBlockComponent.tsx +++ b/dotcom-rendering/src/components/SubheadingBlockComponent.tsx @@ -1,8 +1,8 @@ import { jsx } from '@emotion/react'; import type { ReactNode } from 'react'; import { Fragment } from 'react'; +import type { ArticleFormat } from '../lib/articleFormat'; import { isElement, parseHtml } from '../lib/domUtils'; -import type { ArticleFormat } from '../lib/format'; import { logger } from '../server/lib/logging'; import { Subheading } from './Subheading'; diff --git a/dotcom-rendering/src/components/SupportingContent.stories.tsx b/dotcom-rendering/src/components/SupportingContent.stories.tsx index 6418449f2bc..66d924395c9 100644 --- a/dotcom-rendering/src/components/SupportingContent.stories.tsx +++ b/dotcom-rendering/src/components/SupportingContent.stories.tsx @@ -5,7 +5,7 @@ import { ArticleDisplay, ArticleSpecial, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import type { Props as CardProps } from './Card/Card'; import { Card } from './Card/Card'; import { SupportingContent } from './SupportingContent'; diff --git a/dotcom-rendering/src/components/SupportingContent.tsx b/dotcom-rendering/src/components/SupportingContent.tsx index a9f6d512fed..9362278492f 100644 --- a/dotcom-rendering/src/components/SupportingContent.tsx +++ b/dotcom-rendering/src/components/SupportingContent.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { from, space, until } from '@guardian/source/foundations'; +import { ArticleDesign } from '../lib/articleFormat'; import { isMediaCard } from '../lib/cardHelpers'; -import { ArticleDesign } from '../lib/format'; import { palette } from '../palette'; import type { DCRContainerPalette, DCRSupportingContent } from '../types/front'; import { CardHeadline } from './CardHeadline'; diff --git a/dotcom-rendering/src/components/TableOfContents.importable.tsx b/dotcom-rendering/src/components/TableOfContents.importable.tsx index 531e92dafcf..419289e39aa 100644 --- a/dotcom-rendering/src/components/TableOfContents.importable.tsx +++ b/dotcom-rendering/src/components/TableOfContents.importable.tsx @@ -10,7 +10,7 @@ import { SvgChevronUpSingle, } from '@guardian/source/react-components'; import { useState } from 'react'; -import { ArticleDisplay, type ArticleFormat } from '../lib/format'; +import { ArticleDisplay, type ArticleFormat } from '../lib/articleFormat'; import { palette } from '../palette'; import type { TableOfContentsItem } from '../types/article'; diff --git a/dotcom-rendering/src/components/TableOfContents.stories.tsx b/dotcom-rendering/src/components/TableOfContents.stories.tsx index 59443b0398d..05abca0ddc4 100644 --- a/dotcom-rendering/src/components/TableOfContents.stories.tsx +++ b/dotcom-rendering/src/components/TableOfContents.stories.tsx @@ -6,7 +6,7 @@ import { ArticleDisplay, type ArticleFormat, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import type { TableOfContentsItem } from '../types/article'; import { TableOfContents } from './TableOfContents.importable'; diff --git a/dotcom-rendering/src/components/TagPage.tsx b/dotcom-rendering/src/components/TagPage.tsx index 09cdd49c2d6..a077776b7e3 100644 --- a/dotcom-rendering/src/components/TagPage.tsx +++ b/dotcom-rendering/src/components/TagPage.tsx @@ -2,7 +2,7 @@ import { Global } from '@emotion/react'; import { StrictMode } from 'react'; import { TagPageLayout } from '../layouts/TagPageLayout'; import { buildAdTargeting } from '../lib/ad-targeting'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { rootStyles } from '../lib/rootStyles'; import { filterABTestSwitches } from '../model/enhance-switches'; import type { NavType } from '../model/extract-nav'; diff --git a/dotcom-rendering/src/components/TextBlockComponent.amp.tsx b/dotcom-rendering/src/components/TextBlockComponent.amp.tsx index ff347e49216..e5b43ad37c4 100644 --- a/dotcom-rendering/src/components/TextBlockComponent.amp.tsx +++ b/dotcom-rendering/src/components/TextBlockComponent.amp.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { article17, palette, textSans20 } from '@guardian/source/foundations'; import sanitise from 'sanitize-html'; -import { ArticleSpecial, type ArticleTheme } from '../lib/format'; +import { ArticleSpecial, type ArticleTheme } from '../lib/articleFormat'; import { neutralBorder, pillarPalette_DO_NOT_USE } from '../lib/pillars'; // Note, this should only apply basic text styling. It is a case where we want diff --git a/dotcom-rendering/src/components/TextBlockComponent.stories.tsx b/dotcom-rendering/src/components/TextBlockComponent.stories.tsx index e21b77f4342..7c1e9626ee7 100644 --- a/dotcom-rendering/src/components/TextBlockComponent.stories.tsx +++ b/dotcom-rendering/src/components/TextBlockComponent.stories.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { TextBlockComponent } from './TextBlockComponent'; const html = diff --git a/dotcom-rendering/src/components/TextBlockComponent.tsx b/dotcom-rendering/src/components/TextBlockComponent.tsx index 7531501038e..655757d0069 100644 --- a/dotcom-rendering/src/components/TextBlockComponent.tsx +++ b/dotcom-rendering/src/components/TextBlockComponent.tsx @@ -11,14 +11,14 @@ import type { ReactNode } from 'react'; import { Fragment } from 'react'; import type { IOptions } from 'sanitize-html'; import sanitise from 'sanitize-html'; -import { decidePalette } from '../lib/decidePalette'; -import { getAttrs, isElement, parseHtml } from '../lib/domUtils'; import { ArticleDesign, ArticleDisplay, type ArticleFormat, ArticleSpecial, -} from '../lib/format'; +} from '../lib/articleFormat'; +import { decidePalette } from '../lib/decidePalette'; +import { getAttrs, isElement, parseHtml } from '../lib/domUtils'; import { palette as themePalette } from '../palette'; import { logger } from '../server/lib/logging'; import { DropCap } from './DropCap'; diff --git a/dotcom-rendering/src/components/Timeline.stories.tsx b/dotcom-rendering/src/components/Timeline.stories.tsx index db38822ddbf..856103f74ee 100644 --- a/dotcom-rendering/src/components/Timeline.stories.tsx +++ b/dotcom-rendering/src/components/Timeline.stories.tsx @@ -7,7 +7,7 @@ import { ArticleDisplay, type ArticleFormat, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { getNestedArticleElement } from '../lib/renderElement'; import type { TextBlockElement, YoutubeBlockElement } from '../types/content'; import { Timeline } from './Timeline'; diff --git a/dotcom-rendering/src/components/Timeline.tsx b/dotcom-rendering/src/components/Timeline.tsx index cebe1e17605..240e7809b99 100644 --- a/dotcom-rendering/src/components/Timeline.tsx +++ b/dotcom-rendering/src/components/Timeline.tsx @@ -12,7 +12,7 @@ import { textSansBold15, textSansBold17, } from '@guardian/source/foundations'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import type { NestedArticleElement } from '../lib/renderElement'; import { palette } from '../palette'; import type { diff --git a/dotcom-rendering/src/components/TimelineAtom.amp.tsx b/dotcom-rendering/src/components/TimelineAtom.amp.tsx index a01176b64ff..4e355468a78 100644 --- a/dotcom-rendering/src/components/TimelineAtom.amp.tsx +++ b/dotcom-rendering/src/components/TimelineAtom.amp.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { palette } from '@guardian/source/foundations'; -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import type { TimelineAtomEvent } from '../types/content'; import { Expandable } from './Expandable.amp'; diff --git a/dotcom-rendering/src/components/TimelineAtom.stories.tsx b/dotcom-rendering/src/components/TimelineAtom.stories.tsx index 1ab9acb4c7e..e7313aba957 100644 --- a/dotcom-rendering/src/components/TimelineAtom.stories.tsx +++ b/dotcom-rendering/src/components/TimelineAtom.stories.tsx @@ -6,7 +6,7 @@ import { noTimelineEventsStoryExpanded, sportTimelineStoryWithDescriptionAndEventsExpanded, } from '../../fixtures/manual/timelineAtom'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { TimelineAtom as TimelineAtomComponent } from './TimelineAtom.importable'; const meta: Meta = { diff --git a/dotcom-rendering/src/components/Toast.stories.tsx b/dotcom-rendering/src/components/Toast.stories.tsx index 8db5d59068a..cda51c9f380 100644 --- a/dotcom-rendering/src/components/Toast.stories.tsx +++ b/dotcom-rendering/src/components/Toast.stories.tsx @@ -7,7 +7,7 @@ import { ArticleDisplay, ArticleSpecial, Pillar, -} from '../lib/format'; +} from '../lib/articleFormat'; import { Toast } from './Toast'; import type { ToastProps } from './Toast'; diff --git a/dotcom-rendering/src/components/TopMeta.amp.tsx b/dotcom-rendering/src/components/TopMeta.amp.tsx index 0c6dd2f62ac..c055525f970 100644 --- a/dotcom-rendering/src/components/TopMeta.amp.tsx +++ b/dotcom-rendering/src/components/TopMeta.amp.tsx @@ -2,7 +2,7 @@ import { ArticleDesign, ArticleSpecial, type ArticleTheme, -} from '../lib/format'; +} from '../lib/articleFormat'; import type { AMPArticleModel } from '../types/article.amp'; import { TopMetaAnalysis } from './TopMetaAnalysis.amp'; import { TopMetaNews } from './TopMetaNews.amp'; diff --git a/dotcom-rendering/src/components/TopMetaAnalysis.amp.tsx b/dotcom-rendering/src/components/TopMetaAnalysis.amp.tsx index 9f0791a3776..272767b7740 100644 --- a/dotcom-rendering/src/components/TopMetaAnalysis.amp.tsx +++ b/dotcom-rendering/src/components/TopMetaAnalysis.amp.tsx @@ -8,7 +8,7 @@ import { } from '@guardian/source/foundations'; import { string as curly } from 'curlyquotes'; import { getAgeWarning } from '../lib/age-warning'; -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import { pillarPalette_DO_NOT_USE } from '../lib/pillars'; import { getSharingUrls } from '../lib/sharing-urls'; import type { AMPArticleModel } from '../types/article.amp'; diff --git a/dotcom-rendering/src/components/TopMetaExtras.amp.tsx b/dotcom-rendering/src/components/TopMetaExtras.amp.tsx index 668b302fc28..7831ab7db17 100644 --- a/dotcom-rendering/src/components/TopMetaExtras.amp.tsx +++ b/dotcom-rendering/src/components/TopMetaExtras.amp.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { text, textSans12 } from '@guardian/source/foundations'; -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import { neutralBorder, pillarMap, diff --git a/dotcom-rendering/src/components/TopMetaLiveblog.amp.tsx b/dotcom-rendering/src/components/TopMetaLiveblog.amp.tsx index 68af5894efd..1dd8e10f3ce 100644 --- a/dotcom-rendering/src/components/TopMetaLiveblog.amp.tsx +++ b/dotcom-rendering/src/components/TopMetaLiveblog.amp.tsx @@ -6,7 +6,7 @@ import { } from '@guardian/source/foundations'; import { string as curly } from 'curlyquotes'; import { getAgeWarning } from '../lib/age-warning'; -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import { neutralBorder, pillarPalette_DO_NOT_USE } from '../lib/pillars'; import { getSharingUrls } from '../lib/sharing-urls'; import type { AMPArticleModel } from '../types/article.amp'; diff --git a/dotcom-rendering/src/components/TopMetaNews.amp.tsx b/dotcom-rendering/src/components/TopMetaNews.amp.tsx index 4e120c50189..07681aa1c95 100644 --- a/dotcom-rendering/src/components/TopMetaNews.amp.tsx +++ b/dotcom-rendering/src/components/TopMetaNews.amp.tsx @@ -7,7 +7,7 @@ import { } from '@guardian/source/foundations'; import { string as curly } from 'curlyquotes'; import { getAgeWarning } from '../lib/age-warning'; -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import { pillarPalette_DO_NOT_USE } from '../lib/pillars'; import { getSharingUrls } from '../lib/sharing-urls'; import type { AMPArticleModel } from '../types/article.amp'; diff --git a/dotcom-rendering/src/components/TopMetaOpinion.amp.tsx b/dotcom-rendering/src/components/TopMetaOpinion.amp.tsx index caff95b828e..ac0b36350ed 100644 --- a/dotcom-rendering/src/components/TopMetaOpinion.amp.tsx +++ b/dotcom-rendering/src/components/TopMetaOpinion.amp.tsx @@ -2,7 +2,7 @@ import { css } from '@emotion/react'; import { isUndefined } from '@guardian/libs'; import { headlineMedium28, palette } from '@guardian/source/foundations'; import { getAgeWarning } from '../lib/age-warning'; -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import { pillarPalette_DO_NOT_USE } from '../lib/pillars'; import { getSharingUrls } from '../lib/sharing-urls'; import type { AMPArticleModel } from '../types/article.amp'; diff --git a/dotcom-rendering/src/components/TopMetaPaidContent.amp.tsx b/dotcom-rendering/src/components/TopMetaPaidContent.amp.tsx index adeeec8a602..9872088d376 100644 --- a/dotcom-rendering/src/components/TopMetaPaidContent.amp.tsx +++ b/dotcom-rendering/src/components/TopMetaPaidContent.amp.tsx @@ -7,7 +7,7 @@ import { textSans24, } from '@guardian/source/foundations'; import { getAgeWarning } from '../lib/age-warning'; -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import { getSharingUrls } from '../lib/sharing-urls'; import type { AMPArticleModel } from '../types/article.amp'; import type { Branding } from '../types/branding'; diff --git a/dotcom-rendering/src/components/Treats.stories.tsx b/dotcom-rendering/src/components/Treats.stories.tsx index fe171c2dbe5..b6317c68571 100644 --- a/dotcom-rendering/src/components/Treats.stories.tsx +++ b/dotcom-rendering/src/components/Treats.stories.tsx @@ -1,5 +1,5 @@ import { css } from '@emotion/react'; -import { Pillar } from '../lib/format'; +import { Pillar } from '../lib/articleFormat'; import { Treats } from './Treats'; export default { diff --git a/dotcom-rendering/src/components/Treats.tsx b/dotcom-rendering/src/components/Treats.tsx index d8c63c8daae..9911e249e04 100644 --- a/dotcom-rendering/src/components/Treats.tsx +++ b/dotcom-rendering/src/components/Treats.tsx @@ -8,7 +8,7 @@ import { } from '@guardian/source/foundations'; import { Link } from '@guardian/source/react-components'; import { Fragment } from 'react'; -import { ArticleDesign, ArticleDisplay } from '../lib/format'; +import { ArticleDesign, ArticleDisplay } from '../lib/articleFormat'; import { palette } from '../palette'; import type { TreatType } from '../types/front'; import { FormatBoundary } from './FormatBoundary'; diff --git a/dotcom-rendering/src/components/TwitterBlockComponent.amp.tsx b/dotcom-rendering/src/components/TwitterBlockComponent.amp.tsx index dc613555292..556959e563e 100644 --- a/dotcom-rendering/src/components/TwitterBlockComponent.amp.tsx +++ b/dotcom-rendering/src/components/TwitterBlockComponent.amp.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { article17, palette } from '@guardian/source/foundations'; import { JSDOM } from 'jsdom'; -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import { neutralBorder, pillarPalette_DO_NOT_USE } from '../lib/pillars'; import type { TweetBlockElement } from '../types/content'; diff --git a/dotcom-rendering/src/components/VideoFacebookBlockComponent.importable.tsx b/dotcom-rendering/src/components/VideoFacebookBlockComponent.importable.tsx index a48be11cc5f..7fff48c2d78 100644 --- a/dotcom-rendering/src/components/VideoFacebookBlockComponent.importable.tsx +++ b/dotcom-rendering/src/components/VideoFacebookBlockComponent.importable.tsx @@ -1,5 +1,5 @@ import { css } from '@emotion/react'; -import type { ArticleFormat } from '../lib/format'; +import type { ArticleFormat } from '../lib/articleFormat'; import type { RoleType } from '../types/content'; import { Caption } from './Caption'; import { ClickToView } from './ClickToView'; diff --git a/dotcom-rendering/src/components/VideoFacebookBlockComponent.stories.tsx b/dotcom-rendering/src/components/VideoFacebookBlockComponent.stories.tsx index 5564b393f19..e8fd63072a7 100644 --- a/dotcom-rendering/src/components/VideoFacebookBlockComponent.stories.tsx +++ b/dotcom-rendering/src/components/VideoFacebookBlockComponent.stories.tsx @@ -1,5 +1,5 @@ import { css } from '@emotion/react'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { VideoFacebookBlockComponent } from './VideoFacebookBlockComponent.importable'; export default { diff --git a/dotcom-rendering/src/components/VideoVimeoBlockComponent.amp.tsx b/dotcom-rendering/src/components/VideoVimeoBlockComponent.amp.tsx index 0a43f168133..dc96e9edf21 100644 --- a/dotcom-rendering/src/components/VideoVimeoBlockComponent.amp.tsx +++ b/dotcom-rendering/src/components/VideoVimeoBlockComponent.amp.tsx @@ -1,5 +1,5 @@ import { levels } from 'log4js'; -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import { getIdFromUrl } from '../lib/get-video-id.amp'; import { logger } from '../server/lib/logging'; import type { VideoVimeoBlockElement } from '../types/content'; diff --git a/dotcom-rendering/src/components/VideoYoutubeBlockComponent.amp.tsx b/dotcom-rendering/src/components/VideoYoutubeBlockComponent.amp.tsx index 39a33d96ed6..b465c661ba8 100644 --- a/dotcom-rendering/src/components/VideoYoutubeBlockComponent.amp.tsx +++ b/dotcom-rendering/src/components/VideoYoutubeBlockComponent.amp.tsx @@ -1,5 +1,5 @@ import { levels } from 'log4js'; -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import { getIdFromUrl } from '../lib/get-video-id.amp'; import { logger } from '../server/lib/logging'; import type { VideoYoutubeBlockElement } from '../types/content'; diff --git a/dotcom-rendering/src/components/VimeoBlockComponent.stories.tsx b/dotcom-rendering/src/components/VimeoBlockComponent.stories.tsx index 6411617f6df..766f5e37d33 100644 --- a/dotcom-rendering/src/components/VimeoBlockComponent.stories.tsx +++ b/dotcom-rendering/src/components/VimeoBlockComponent.stories.tsx @@ -1,5 +1,5 @@ import { css } from '@emotion/react'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { VimeoBlockComponent } from './VimeoBlockComponent'; export default { diff --git a/dotcom-rendering/src/components/VimeoBlockComponent.tsx b/dotcom-rendering/src/components/VimeoBlockComponent.tsx index 95b85e4be63..1382cce3b50 100644 --- a/dotcom-rendering/src/components/VimeoBlockComponent.tsx +++ b/dotcom-rendering/src/components/VimeoBlockComponent.tsx @@ -1,5 +1,5 @@ import { css } from '@emotion/react'; -import type { ArticleFormat } from '../lib/format'; +import type { ArticleFormat } from '../lib/articleFormat'; import { Caption } from './Caption'; const responsiveAspectRatio = (height: number, width: number) => css` diff --git a/dotcom-rendering/src/components/WitnessBlockComponent.stories.tsx b/dotcom-rendering/src/components/WitnessBlockComponent.stories.tsx index ebd0eda80ff..0fa3a04d1e4 100644 --- a/dotcom-rendering/src/components/WitnessBlockComponent.stories.tsx +++ b/dotcom-rendering/src/components/WitnessBlockComponent.stories.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/react'; import { lightDecorator } from '../../.storybook/decorators/themeDecorator'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import type { WitnessAssetType } from '../types/content'; import { WitnessImageBlockComponent, diff --git a/dotcom-rendering/src/components/YoutubeAtom/YoutubeAtom.stories.tsx b/dotcom-rendering/src/components/YoutubeAtom/YoutubeAtom.stories.tsx index 4c8bfd7ec84..edfc7fa9592 100644 --- a/dotcom-rendering/src/components/YoutubeAtom/YoutubeAtom.stories.tsx +++ b/dotcom-rendering/src/components/YoutubeAtom/YoutubeAtom.stories.tsx @@ -2,7 +2,7 @@ import { css } from '@emotion/react'; import type { ConsentState } from '@guardian/libs'; import type { Decorator, Meta, StoryObj } from '@storybook/react'; import { useState } from 'react'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import type { ImagePositionType, ImageSizeType, diff --git a/dotcom-rendering/src/components/YoutubeAtom/YoutubeAtom.test.tsx b/dotcom-rendering/src/components/YoutubeAtom/YoutubeAtom.test.tsx index 6cb38b91f13..fe85fb33266 100644 --- a/dotcom-rendering/src/components/YoutubeAtom/YoutubeAtom.test.tsx +++ b/dotcom-rendering/src/components/YoutubeAtom/YoutubeAtom.test.tsx @@ -1,7 +1,7 @@ import type { ConsentState } from '@guardian/libs'; import '@testing-library/jest-dom'; import { fireEvent, render } from '@testing-library/react'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat'; import { ConfigProvider } from '../ConfigContext'; import { YoutubeAtom } from './YoutubeAtom'; diff --git a/dotcom-rendering/src/components/YoutubeAtom/YoutubeAtom.tsx b/dotcom-rendering/src/components/YoutubeAtom/YoutubeAtom.tsx index 8559d80cb67..0efb7bb31df 100644 --- a/dotcom-rendering/src/components/YoutubeAtom/YoutubeAtom.tsx +++ b/dotcom-rendering/src/components/YoutubeAtom/YoutubeAtom.tsx @@ -1,7 +1,7 @@ import type { Participations } from '@guardian/ab-core'; import type { ConsentState } from '@guardian/libs'; import { useCallback, useState } from 'react'; -import type { ArticleFormat } from '../../lib/format'; +import type { ArticleFormat } from '../../lib/articleFormat'; import type { RenderingTarget } from '../../types/renderingTarget'; import type { ImagePositionType, diff --git a/dotcom-rendering/src/components/YoutubeAtom/YoutubeAtomExpiredOverlay.tsx b/dotcom-rendering/src/components/YoutubeAtom/YoutubeAtomExpiredOverlay.tsx index 94a1cc84c9f..82f77aba70e 100644 --- a/dotcom-rendering/src/components/YoutubeAtom/YoutubeAtomExpiredOverlay.tsx +++ b/dotcom-rendering/src/components/YoutubeAtom/YoutubeAtomExpiredOverlay.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { palette, space, textEgyptian17 } from '@guardian/source/foundations'; import { SvgAlertRound } from '@guardian/source/react-components'; -import type { ArticleFormat } from '../../lib/format'; +import type { ArticleFormat } from '../../lib/articleFormat'; import { Caption } from '../Caption'; type Props = { diff --git a/dotcom-rendering/src/components/YoutubeAtom/YoutubeAtomOverlay.tsx b/dotcom-rendering/src/components/YoutubeAtom/YoutubeAtomOverlay.tsx index c61988bf074..d9c393d8c7a 100644 --- a/dotcom-rendering/src/components/YoutubeAtom/YoutubeAtomOverlay.tsx +++ b/dotcom-rendering/src/components/YoutubeAtom/YoutubeAtomOverlay.tsx @@ -8,7 +8,7 @@ import { space, textSansBold12, } from '@guardian/source/foundations'; -import type { ArticleFormat } from '../../lib/format'; +import type { ArticleFormat } from '../../lib/articleFormat'; import { palette } from '../../palette'; import type { ImagePositionType, diff --git a/dotcom-rendering/src/components/YoutubeBlockComponent.amp.tsx b/dotcom-rendering/src/components/YoutubeBlockComponent.amp.tsx index e0ac004a5db..7032a0336ac 100644 --- a/dotcom-rendering/src/components/YoutubeBlockComponent.amp.tsx +++ b/dotcom-rendering/src/components/YoutubeBlockComponent.amp.tsx @@ -1,4 +1,4 @@ -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; import { constructQuery } from '../lib/querystring'; import type { YoutubeBlockElement } from '../types/content'; import { Caption } from './Caption.amp'; diff --git a/dotcom-rendering/src/components/YoutubeBlockComponent.importable.tsx b/dotcom-rendering/src/components/YoutubeBlockComponent.importable.tsx index 24423b4676a..eb36dd6b22a 100644 --- a/dotcom-rendering/src/components/YoutubeBlockComponent.importable.tsx +++ b/dotcom-rendering/src/components/YoutubeBlockComponent.importable.tsx @@ -1,6 +1,6 @@ import type { ConsentState } from '@guardian/libs'; import { useEffect, useState } from 'react'; -import type { ArticleFormat } from '../lib/format'; +import type { ArticleFormat } from '../lib/articleFormat'; import { useAB } from '../lib/useAB'; import { useAdTargeting } from '../lib/useAdTargeting'; import { Caption } from './Caption'; diff --git a/dotcom-rendering/src/components/YoutubeBlockComponent.stories.tsx b/dotcom-rendering/src/components/YoutubeBlockComponent.stories.tsx index 87bf90e5b1c..4a369d364e3 100644 --- a/dotcom-rendering/src/components/YoutubeBlockComponent.stories.tsx +++ b/dotcom-rendering/src/components/YoutubeBlockComponent.stories.tsx @@ -1,5 +1,5 @@ import { css } from '@emotion/react'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { Flex } from './Flex'; import { LeftColumn } from './LeftColumn'; import { RightColumn } from './RightColumn'; diff --git a/dotcom-rendering/src/components/YoutubeEmbedBlockComponent.stories.tsx b/dotcom-rendering/src/components/YoutubeEmbedBlockComponent.stories.tsx index 6806015b350..c19c700a614 100644 --- a/dotcom-rendering/src/components/YoutubeEmbedBlockComponent.stories.tsx +++ b/dotcom-rendering/src/components/YoutubeEmbedBlockComponent.stories.tsx @@ -1,5 +1,5 @@ import { css } from '@emotion/react'; -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import { YoutubeEmbedBlockComponent } from './YoutubeEmbedBlockComponent'; export default { diff --git a/dotcom-rendering/src/components/YoutubeEmbedBlockComponent.tsx b/dotcom-rendering/src/components/YoutubeEmbedBlockComponent.tsx index 26a782e4356..cb3e816866d 100644 --- a/dotcom-rendering/src/components/YoutubeEmbedBlockComponent.tsx +++ b/dotcom-rendering/src/components/YoutubeEmbedBlockComponent.tsx @@ -1,5 +1,5 @@ import { css } from '@emotion/react'; -import type { ArticleFormat } from '../lib/format'; +import type { ArticleFormat } from '../lib/articleFormat'; import { Caption } from './Caption'; import { MaintainAspectRatio } from './MaintainAspectRatio'; diff --git a/dotcom-rendering/src/layouts/CommentLayout.tsx b/dotcom-rendering/src/layouts/CommentLayout.tsx index b266339989f..4232f296e73 100644 --- a/dotcom-rendering/src/layouts/CommentLayout.tsx +++ b/dotcom-rendering/src/layouts/CommentLayout.tsx @@ -40,15 +40,15 @@ import { Standfirst } from '../components/Standfirst'; import { StickyBottomBanner } from '../components/StickyBottomBanner.importable'; import { SubMeta } from '../components/SubMeta'; import { SubNav } from '../components/SubNav.importable'; -import { getSoleContributor } from '../lib/byline'; -import { canRenderAds } from '../lib/canRenderAds'; -import { getContributionsServiceUrl } from '../lib/contributions'; -import { decideTrail } from '../lib/decideTrail'; import { ArticleDesign, ArticleDisplay, type ArticleFormat, -} from '../lib/format'; +} from '../lib/articleFormat'; +import { getSoleContributor } from '../lib/byline'; +import { canRenderAds } from '../lib/canRenderAds'; +import { getContributionsServiceUrl } from '../lib/contributions'; +import { decideTrail } from '../lib/decideTrail'; import { getZIndex } from '../lib/getZIndex'; import { parse } from '../lib/slot-machine-flags'; import type { NavType } from '../model/extract-nav'; diff --git a/dotcom-rendering/src/layouts/DecideLayout.stories.tsx b/dotcom-rendering/src/layouts/DecideLayout.stories.tsx index c10d9f5f970..d19e1e1e129 100644 --- a/dotcom-rendering/src/layouts/DecideLayout.stories.tsx +++ b/dotcom-rendering/src/layouts/DecideLayout.stories.tsx @@ -15,7 +15,7 @@ import { Recipe as RecipeStandardLifestyleFixture } from '../../fixtures/generat import { Standard as StandardStandardNewsFixture } from '../../fixtures/generated/dcr-articles/Standard'; import { Video as VideoStandardNewsFixture } from '../../fixtures/generated/dcr-articles/Video'; import { embedIframe } from '../client/embedIframe'; -import { type ArticleFormat, decideFormat } from '../lib/format'; +import { type ArticleFormat, decideFormat } from '../lib/articleFormat'; import { getCurrentPillar } from '../lib/layoutHelpers'; import { mockRESTCalls } from '../lib/mockRESTCalls'; import { extractNAV } from '../model/extract-nav'; diff --git a/dotcom-rendering/src/layouts/DecideLayout.tsx b/dotcom-rendering/src/layouts/DecideLayout.tsx index e4b09f751a9..e256aade80a 100644 --- a/dotcom-rendering/src/layouts/DecideLayout.tsx +++ b/dotcom-rendering/src/layouts/DecideLayout.tsx @@ -2,7 +2,7 @@ import { ArticleDesign, ArticleDisplay, type ArticleFormat, -} from '../lib/format'; +} from '../lib/articleFormat'; import type { NavType } from '../model/extract-nav'; import type { ArticleDeprecated } from '../types/article'; import type { RenderingTarget } from '../types/renderingTarget'; diff --git a/dotcom-rendering/src/layouts/FrontLayout.tsx b/dotcom-rendering/src/layouts/FrontLayout.tsx index a24e808fa6f..21cad59da4d 100644 --- a/dotcom-rendering/src/layouts/FrontLayout.tsx +++ b/dotcom-rendering/src/layouts/FrontLayout.tsx @@ -31,11 +31,11 @@ import { StickyBottomBanner } from '../components/StickyBottomBanner.importable' import { SubNav } from '../components/SubNav.importable'; import { TrendingTopics } from '../components/TrendingTopics'; import { WeatherWrapper } from '../components/WeatherWrapper.importable'; +import { ArticleDisplay } from '../lib/articleFormat'; import { badgeFromBranding, isPaidContentSameBranding } from '../lib/branding'; import { canRenderAds } from '../lib/canRenderAds'; import { getContributionsServiceUrl } from '../lib/contributions'; import { editionList } from '../lib/edition'; -import { ArticleDisplay } from '../lib/format'; import { getFrontsBannerAdPositions, getMobileAdPositions, diff --git a/dotcom-rendering/src/layouts/FullPageInteractiveLayout.tsx b/dotcom-rendering/src/layouts/FullPageInteractiveLayout.tsx index 1f09c270d90..1b48ee19e57 100644 --- a/dotcom-rendering/src/layouts/FullPageInteractiveLayout.tsx +++ b/dotcom-rendering/src/layouts/FullPageInteractiveLayout.tsx @@ -16,9 +16,9 @@ import { Masthead } from '../components/Masthead/Masthead'; import { Section } from '../components/Section'; import { StickyBottomBanner } from '../components/StickyBottomBanner.importable'; import { SubNav } from '../components/SubNav.importable'; +import { type ArticleFormat, ArticleSpecial } from '../lib/articleFormat'; import { canRenderAds } from '../lib/canRenderAds'; import type { EditionId } from '../lib/edition'; -import { type ArticleFormat, ArticleSpecial } from '../lib/format'; import { getZIndex } from '../lib/getZIndex'; import { decideLanguage, decideLanguageDirection } from '../lib/lang'; import { renderElement } from '../lib/renderElement'; diff --git a/dotcom-rendering/src/layouts/ImmersiveLayout.tsx b/dotcom-rendering/src/layouts/ImmersiveLayout.tsx index d78c985e8fe..73d9e4fdd98 100644 --- a/dotcom-rendering/src/layouts/ImmersiveLayout.tsx +++ b/dotcom-rendering/src/layouts/ImmersiveLayout.tsx @@ -44,15 +44,15 @@ import { Standfirst } from '../components/Standfirst'; import { StickyBottomBanner } from '../components/StickyBottomBanner.importable'; import { SubMeta } from '../components/SubMeta'; import { SubNav } from '../components/SubNav.importable'; -import { canRenderAds } from '../lib/canRenderAds'; -import { getContributionsServiceUrl } from '../lib/contributions'; -import { decideMainMediaCaption } from '../lib/decide-caption'; -import { decideTrail } from '../lib/decideTrail'; import { ArticleDesign, type ArticleFormat, ArticleSpecial, -} from '../lib/format'; +} from '../lib/articleFormat'; +import { canRenderAds } from '../lib/canRenderAds'; +import { getContributionsServiceUrl } from '../lib/contributions'; +import { decideMainMediaCaption } from '../lib/decide-caption'; +import { decideTrail } from '../lib/decideTrail'; import { getZIndex } from '../lib/getZIndex'; import { LABS_HEADER_HEIGHT } from '../lib/labs-constants'; import { parse } from '../lib/slot-machine-flags'; diff --git a/dotcom-rendering/src/layouts/InteractiveLayout.tsx b/dotcom-rendering/src/layouts/InteractiveLayout.tsx index e4f62744fb9..7927502e368 100644 --- a/dotcom-rendering/src/layouts/InteractiveLayout.tsx +++ b/dotcom-rendering/src/layouts/InteractiveLayout.tsx @@ -39,10 +39,10 @@ import { StarRating } from '../components/StarRating/StarRating'; import { StickyBottomBanner } from '../components/StickyBottomBanner.importable'; import { SubMeta } from '../components/SubMeta'; import { SubNav } from '../components/SubNav.importable'; +import { type ArticleFormat, ArticleSpecial } from '../lib/articleFormat'; import { canRenderAds } from '../lib/canRenderAds'; import { getContributionsServiceUrl } from '../lib/contributions'; import { decideTrail } from '../lib/decideTrail'; -import { type ArticleFormat, ArticleSpecial } from '../lib/format'; import type { NavType } from '../model/extract-nav'; import { palette as themePalette } from '../palette'; import type { ArticleDeprecated } from '../types/article'; diff --git a/dotcom-rendering/src/layouts/LiveLayout.tsx b/dotcom-rendering/src/layouts/LiveLayout.tsx index cc9c3b06300..53af88a7946 100644 --- a/dotcom-rendering/src/layouts/LiveLayout.tsx +++ b/dotcom-rendering/src/layouts/LiveLayout.tsx @@ -49,10 +49,10 @@ import { StickyBottomBanner } from '../components/StickyBottomBanner.importable' import { StickyLiveblogAskWrapper } from '../components/StickyLiveblogAskWrapper.importable'; import { SubMeta } from '../components/SubMeta'; import { SubNav } from '../components/SubNav.importable'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import { canRenderAds } from '../lib/canRenderAds'; import { getContributionsServiceUrl } from '../lib/contributions'; import { decideTrail } from '../lib/decideTrail'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; import { getZIndex } from '../lib/getZIndex'; import type { NavType } from '../model/extract-nav'; import { palette as themePalette } from '../palette'; diff --git a/dotcom-rendering/src/layouts/NewsletterSignupLayout.tsx b/dotcom-rendering/src/layouts/NewsletterSignupLayout.tsx index 0a177dae3d7..13fd98b8682 100644 --- a/dotcom-rendering/src/layouts/NewsletterSignupLayout.tsx +++ b/dotcom-rendering/src/layouts/NewsletterSignupLayout.tsx @@ -33,10 +33,10 @@ import { Section } from '../components/Section'; import { SecureSignup } from '../components/SecureSignup.importable'; import { ShareButton } from '../components/ShareButton.importable'; import { Standfirst } from '../components/Standfirst'; +import { ArticleDisplay, type ArticleFormat } from '../lib/articleFormat'; import { canRenderAds } from '../lib/canRenderAds'; import { getContributionsServiceUrl } from '../lib/contributions'; import { decideTrail } from '../lib/decideTrail'; -import { ArticleDisplay, type ArticleFormat } from '../lib/format'; import { isValidUrl } from '../lib/isValidUrl'; import type { NavType } from '../model/extract-nav'; import type { ArticleDeprecated } from '../types/article'; diff --git a/dotcom-rendering/src/layouts/PictureLayout.tsx b/dotcom-rendering/src/layouts/PictureLayout.tsx index 27fc3f6dc33..3c4e4318870 100644 --- a/dotcom-rendering/src/layouts/PictureLayout.tsx +++ b/dotcom-rendering/src/layouts/PictureLayout.tsx @@ -36,11 +36,11 @@ import { Standfirst } from '../components/Standfirst'; import { StickyBottomBanner } from '../components/StickyBottomBanner.importable'; import { SubMeta } from '../components/SubMeta'; import { SubNav } from '../components/SubNav.importable'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import { getSoleContributor } from '../lib/byline'; import { canRenderAds } from '../lib/canRenderAds'; import { getContributionsServiceUrl } from '../lib/contributions'; import { decideTrail } from '../lib/decideTrail'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; import { decideLanguage, decideLanguageDirection } from '../lib/lang'; import type { NavType } from '../model/extract-nav'; import { palette as themePalette } from '../palette'; diff --git a/dotcom-rendering/src/layouts/ShowcaseLayout.tsx b/dotcom-rendering/src/layouts/ShowcaseLayout.tsx index de9f3ef2f3a..bda4ad0f2c3 100644 --- a/dotcom-rendering/src/layouts/ShowcaseLayout.tsx +++ b/dotcom-rendering/src/layouts/ShowcaseLayout.tsx @@ -42,14 +42,14 @@ import { Standfirst } from '../components/Standfirst'; import { StickyBottomBanner } from '../components/StickyBottomBanner.importable'; import { SubMeta } from '../components/SubMeta'; import { SubNav } from '../components/SubNav.importable'; -import { canRenderAds } from '../lib/canRenderAds'; -import { getContributionsServiceUrl } from '../lib/contributions'; -import { decideTrail } from '../lib/decideTrail'; import { ArticleDesign, type ArticleFormat, ArticleSpecial, -} from '../lib/format'; +} from '../lib/articleFormat'; +import { canRenderAds } from '../lib/canRenderAds'; +import { getContributionsServiceUrl } from '../lib/contributions'; +import { decideTrail } from '../lib/decideTrail'; import { getZIndex } from '../lib/getZIndex'; import { decideLanguage, decideLanguageDirection } from '../lib/lang'; import { parse } from '../lib/slot-machine-flags'; diff --git a/dotcom-rendering/src/layouts/StandardLayout.tsx b/dotcom-rendering/src/layouts/StandardLayout.tsx index 0e44748a36b..ba4486a2806 100644 --- a/dotcom-rendering/src/layouts/StandardLayout.tsx +++ b/dotcom-rendering/src/layouts/StandardLayout.tsx @@ -48,14 +48,14 @@ import { StarRating } from '../components/StarRating/StarRating'; import { StickyBottomBanner } from '../components/StickyBottomBanner.importable'; import { SubMeta } from '../components/SubMeta'; import { SubNav } from '../components/SubNav.importable'; -import { canRenderAds } from '../lib/canRenderAds'; -import { getContributionsServiceUrl } from '../lib/contributions'; -import { decideTrail } from '../lib/decideTrail'; import { ArticleDesign, type ArticleFormat, ArticleSpecial, -} from '../lib/format'; +} from '../lib/articleFormat'; +import { canRenderAds } from '../lib/canRenderAds'; +import { getContributionsServiceUrl } from '../lib/contributions'; +import { decideTrail } from '../lib/decideTrail'; import { getZIndex } from '../lib/getZIndex'; import { parse } from '../lib/slot-machine-flags'; import type { NavType } from '../model/extract-nav'; diff --git a/dotcom-rendering/src/layouts/lib/interactiveLegacyStyling.ts b/dotcom-rendering/src/layouts/lib/interactiveLegacyStyling.ts index 85e17a934d5..85d7d0fffb8 100644 --- a/dotcom-rendering/src/layouts/lib/interactiveLegacyStyling.ts +++ b/dotcom-rendering/src/layouts/lib/interactiveLegacyStyling.ts @@ -1,7 +1,7 @@ import { css } from '@emotion/react'; import { from, until } from '@guardian/source/foundations'; +import { ArticleDesign } from '../../lib/articleFormat'; import { center } from '../../lib/center'; -import { ArticleDesign } from '../../lib/format'; import type { RoleType } from '../../types/content'; export const isInteractive = (design: ArticleDesign): boolean => diff --git a/dotcom-rendering/src/lib/ArticleRenderer.tsx b/dotcom-rendering/src/lib/ArticleRenderer.tsx index c9964f8991a..028cd0f0b5b 100644 --- a/dotcom-rendering/src/lib/ArticleRenderer.tsx +++ b/dotcom-rendering/src/lib/ArticleRenderer.tsx @@ -2,10 +2,10 @@ import { css } from '@emotion/react'; import { adContainerStyles } from '../components/AdSlot.web'; import { useConfig } from '../components/ConfigContext'; import { interactiveLegacyClasses } from '../layouts/lib/interactiveLegacyStyling'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; import type { ServerSideTests, Switches } from '../types/config'; import type { FEElement } from '../types/content'; import type { TagType } from '../types/tag'; +import { ArticleDesign, type ArticleFormat } from './articleFormat'; import type { EditionId } from './edition'; import { RenderArticleElement } from './renderElement'; import { withSignInGateSlot } from './withSignInGateSlot'; diff --git a/dotcom-rendering/src/lib/format.test.ts b/dotcom-rendering/src/lib/articleFormat.test.ts similarity index 75% rename from dotcom-rendering/src/lib/format.test.ts rename to dotcom-rendering/src/lib/articleFormat.test.ts index 0684cec9c65..7bdf17219ef 100644 --- a/dotcom-rendering/src/lib/format.test.ts +++ b/dotcom-rendering/src/lib/articleFormat.test.ts @@ -1,5 +1,9 @@ -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; -import { formatToFEFormat } from './format'; +import { + ArticleDesign, + ArticleDisplay, + formatToFEFormat, + Pillar, +} from './articleFormat'; describe('formatToFEFormat', () => { it('returns the correct FEFormat given an ArticleFormat', () => { diff --git a/dotcom-rendering/src/lib/format.ts b/dotcom-rendering/src/lib/articleFormat.ts similarity index 100% rename from dotcom-rendering/src/lib/format.ts rename to dotcom-rendering/src/lib/articleFormat.ts diff --git a/dotcom-rendering/src/lib/cardHelpers.test.ts b/dotcom-rendering/src/lib/cardHelpers.test.ts index 86f13058cfb..c0f8339dcfb 100644 --- a/dotcom-rendering/src/lib/cardHelpers.test.ts +++ b/dotcom-rendering/src/lib/cardHelpers.test.ts @@ -1,10 +1,10 @@ +import type { DCRContainerPalette } from '../types/front'; import { ArticleDesign, ArticleDisplay, type ArticleFormat, Pillar, -} from '../lib/format'; -import type { DCRContainerPalette } from '../types/front'; +} from './articleFormat'; import { cardHasDarkBackground } from './cardHelpers'; describe('cardHasDarkBackground', () => { diff --git a/dotcom-rendering/src/lib/cardHelpers.ts b/dotcom-rendering/src/lib/cardHelpers.ts index 5cd018073bb..9f204ae3577 100644 --- a/dotcom-rendering/src/lib/cardHelpers.ts +++ b/dotcom-rendering/src/lib/cardHelpers.ts @@ -1,5 +1,5 @@ -import { ArticleDesign, type ArticleFormat } from '../lib/format'; import type { DCRContainerPalette } from '../types/front'; +import { ArticleDesign, type ArticleFormat } from './articleFormat'; export const isMediaCard = (format: ArticleFormat): boolean => { switch (format.design) { diff --git a/dotcom-rendering/src/lib/decideLogo.ts b/dotcom-rendering/src/lib/decideLogo.ts index 9d65cecb428..33c00e7ce6a 100644 --- a/dotcom-rendering/src/lib/decideLogo.ts +++ b/dotcom-rendering/src/lib/decideLogo.ts @@ -1,6 +1,6 @@ -import type { ArticleFormat } from '../lib/format'; import type { Branding } from '../types/branding'; import type { DCRContainerPalette } from '../types/front'; +import type { ArticleFormat } from './articleFormat'; import { cardHasDarkBackground } from './cardHelpers'; export const decideCardLogo = ( diff --git a/dotcom-rendering/src/lib/decideNavPillar.ts b/dotcom-rendering/src/lib/decideNavPillar.ts index 6fb20208966..9d06073830a 100644 --- a/dotcom-rendering/src/lib/decideNavPillar.ts +++ b/dotcom-rendering/src/lib/decideNavPillar.ts @@ -1,5 +1,5 @@ -import { Pillar } from '../lib/format'; import type { LegacyPillar } from '../types/frontend'; +import { Pillar } from './articleFormat'; export const decideNavPillar = (pillar: LegacyPillar): Pillar | undefined => { switch (pillar) { diff --git a/dotcom-rendering/src/lib/decidePalette.ts b/dotcom-rendering/src/lib/decidePalette.ts index 5d58c66aa8b..ea1e9ff98ea 100644 --- a/dotcom-rendering/src/lib/decidePalette.ts +++ b/dotcom-rendering/src/lib/decidePalette.ts @@ -1,13 +1,13 @@ import { brandAltBackground, palette } from '@guardian/source/foundations'; +// Here is the one place where we use `pillarPalette` +import { pillarPalette_DO_NOT_USE as pillarPalette } from '../lib/pillars'; +import type { Palette } from '../types/palette'; import { ArticleDesign, type ArticleFormat, ArticleSpecial, Pillar, -} from '../lib/format'; -// Here is the one place where we use `pillarPalette` -import { pillarPalette_DO_NOT_USE as pillarPalette } from '../lib/pillars'; -import type { Palette } from '../types/palette'; +} from './articleFormat'; import { transparentColour } from './transparentColour'; const { diff --git a/dotcom-rendering/src/lib/decideTrail.ts b/dotcom-rendering/src/lib/decideTrail.ts index fb7434a7e99..f92dccc75df 100644 --- a/dotcom-rendering/src/lib/decideTrail.ts +++ b/dotcom-rendering/src/lib/decideTrail.ts @@ -1,6 +1,6 @@ -import { type ArticleFormat, decideFormat } from '../lib/format'; import type { DCRFrontImage } from '../types/front'; import type { FETrailType, TrailType } from '../types/trails'; +import { type ArticleFormat, decideFormat } from './articleFormat'; import { getDataLinkNameCard } from './getDataLinkName'; export const decideTrail = (trail: FETrailType, index = 0): TrailType => { diff --git a/dotcom-rendering/src/lib/getDataLinkName.ts b/dotcom-rendering/src/lib/getDataLinkName.ts index 1a6a68949d5..0729ef18810 100644 --- a/dotcom-rendering/src/lib/getDataLinkName.ts +++ b/dotcom-rendering/src/lib/getDataLinkName.ts @@ -1,9 +1,9 @@ +import type { FEFrontCardStyle } from '../types/front'; import { ArticleDesign, type ArticleFormat, ArticleSpecial, -} from '../lib/format'; -import type { FEFrontCardStyle } from '../types/front'; +} from './articleFormat'; /** * TODO: missing "podcast" diff --git a/dotcom-rendering/src/lib/layoutHelpers.ts b/dotcom-rendering/src/lib/layoutHelpers.ts index 2f20b9d82ad..7584c08aee9 100644 --- a/dotcom-rendering/src/lib/layoutHelpers.ts +++ b/dotcom-rendering/src/lib/layoutHelpers.ts @@ -1,6 +1,6 @@ -import type { Pillar } from '../lib/format'; import type { ArticleDeprecated } from '../types/article'; import type { LegacyPillar } from '../types/frontend'; +import type { Pillar } from './articleFormat'; import { decideNavPillar } from './decideNavPillar'; export const getCurrentPillar = ( diff --git a/dotcom-rendering/src/lib/pillars.ts b/dotcom-rendering/src/lib/pillars.ts index 3230ae49d9d..d2f8ac09a20 100644 --- a/dotcom-rendering/src/lib/pillars.ts +++ b/dotcom-rendering/src/lib/pillars.ts @@ -1,5 +1,5 @@ import { palette } from '@guardian/source/foundations'; -import { ArticleSpecial, type ArticleTheme, Pillar } from '../lib/format'; +import { ArticleSpecial, type ArticleTheme, Pillar } from './articleFormat'; const { culture, diff --git a/dotcom-rendering/src/lib/renderElement.tsx b/dotcom-rendering/src/lib/renderElement.tsx index d4d5c099ede..be18547e755 100644 --- a/dotcom-rendering/src/lib/renderElement.tsx +++ b/dotcom-rendering/src/lib/renderElement.tsx @@ -64,10 +64,10 @@ import { interactiveLegacyFigureClasses, isInteractive, } from '../layouts/lib/interactiveLegacyStyling'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; import { getSharingUrls } from '../lib/sharing-urls'; import type { ServerSideTests, Switches } from '../types/config'; import type { FEElement, RoleType, StarRating } from '../types/content'; +import { ArticleDesign, type ArticleFormat } from './articleFormat'; import type { EditionId } from './edition'; type Props = { diff --git a/dotcom-rendering/src/lib/rootStyles.ts b/dotcom-rendering/src/lib/rootStyles.ts index 3e0bb5581b0..1c6d9f0cb6a 100644 --- a/dotcom-rendering/src/lib/rootStyles.ts +++ b/dotcom-rendering/src/lib/rootStyles.ts @@ -3,8 +3,8 @@ import { focusHalo, palette as sourcePalette, } from '@guardian/source/foundations'; -import type { ArticleFormat } from '../lib/format'; import { paletteDeclarations } from '../palette'; +import type { ArticleFormat } from './articleFormat'; /** * Global styles for pages: diff --git a/dotcom-rendering/src/lib/themeToPillar.ts b/dotcom-rendering/src/lib/themeToPillar.ts index 1a24fa900c5..1a1bdfa7dbf 100644 --- a/dotcom-rendering/src/lib/themeToPillar.ts +++ b/dotcom-rendering/src/lib/themeToPillar.ts @@ -1,4 +1,4 @@ -import { type ArticleTheme, Pillar } from '../lib/format'; +import { type ArticleTheme, Pillar } from './articleFormat'; export const themeToPillar = (theme?: ArticleTheme): Pillar | undefined => { switch (theme) { diff --git a/dotcom-rendering/src/model/enhance-ad-placeholders.test.ts b/dotcom-rendering/src/model/enhance-ad-placeholders.test.ts index b12fd66f1fd..6312fe01815 100644 --- a/dotcom-rendering/src/model/enhance-ad-placeholders.test.ts +++ b/dotcom-rendering/src/model/enhance-ad-placeholders.test.ts @@ -1,4 +1,4 @@ -import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/format'; +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; import type { AdPlaceholderBlockElement, FEElement, diff --git a/dotcom-rendering/src/model/enhance-ad-placeholders.ts b/dotcom-rendering/src/model/enhance-ad-placeholders.ts index dca5188e16f..ab81122f39f 100644 --- a/dotcom-rendering/src/model/enhance-ad-placeholders.ts +++ b/dotcom-rendering/src/model/enhance-ad-placeholders.ts @@ -1,4 +1,4 @@ -import { ArticleDesign, type ArticleFormat } from '../lib/format'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import type { AdPlaceholderBlockElement, FEElement } from '../types/content'; import type { RenderingTarget } from '../types/renderingTarget'; diff --git a/dotcom-rendering/src/model/enhance-blockquotes.test.ts b/dotcom-rendering/src/model/enhance-blockquotes.test.ts index 40cd410360e..ce4a371335f 100644 --- a/dotcom-rendering/src/model/enhance-blockquotes.test.ts +++ b/dotcom-rendering/src/model/enhance-blockquotes.test.ts @@ -1,5 +1,9 @@ import { Standard as ExampleArticle } from '../../fixtures/generated/fe-articles/Standard'; -import { ArticleDesign, type ArticleFormat, decideFormat } from '../lib/format'; +import { + ArticleDesign, + type ArticleFormat, + decideFormat, +} from '../lib/articleFormat'; import type { FEElement } from '../types/content'; import type { FEArticleType } from '../types/frontend'; import { enhanceBlockquotes } from './enhance-blockquotes'; diff --git a/dotcom-rendering/src/model/enhance-blockquotes.ts b/dotcom-rendering/src/model/enhance-blockquotes.ts index a7e3af9f33e..86aaca47c4e 100644 --- a/dotcom-rendering/src/model/enhance-blockquotes.ts +++ b/dotcom-rendering/src/model/enhance-blockquotes.ts @@ -1,5 +1,5 @@ import { JSDOM } from 'jsdom'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import type { BlockquoteBlockElement, FEElement } from '../types/content'; const isQuoted = (element: BlockquoteBlockElement): boolean => { diff --git a/dotcom-rendering/src/model/enhance-images.test.ts b/dotcom-rendering/src/model/enhance-images.test.ts index 88167583294..fff943dcdae 100644 --- a/dotcom-rendering/src/model/enhance-images.test.ts +++ b/dotcom-rendering/src/model/enhance-images.test.ts @@ -1,7 +1,7 @@ import { PhotoEssay } from '../../fixtures/generated/fe-articles/PhotoEssay'; import { Standard as ExampleArticle } from '../../fixtures/generated/fe-articles/Standard'; import { images } from '../../fixtures/generated/images'; -import { decideFormat, Pillar } from '../lib/format'; +import { decideFormat, Pillar } from '../lib/articleFormat'; import type { FEElement } from '../types/content'; import { enhanceElementsImages, enhanceImages } from './enhance-images'; diff --git a/dotcom-rendering/src/model/enhance-images.ts b/dotcom-rendering/src/model/enhance-images.ts index e3d9e7f74a7..44024de18db 100644 --- a/dotcom-rendering/src/model/enhance-images.ts +++ b/dotcom-rendering/src/model/enhance-images.ts @@ -4,7 +4,7 @@ import { ArticleDesign, type ArticleFormat, ArticleSpecial, -} from '../lib/format'; +} from '../lib/articleFormat'; import { getLargest, getMaster } from '../lib/image'; import type { CartoonBlockElement, diff --git a/dotcom-rendering/src/model/enhance-numbered-lists.test.ts b/dotcom-rendering/src/model/enhance-numbered-lists.test.ts index b0be298cf34..0b1863e6483 100644 --- a/dotcom-rendering/src/model/enhance-numbered-lists.test.ts +++ b/dotcom-rendering/src/model/enhance-numbered-lists.test.ts @@ -1,7 +1,7 @@ import { NumberedList } from '../../fixtures/generated/fe-articles/NumberedList'; import { Standard as ExampleArticle } from '../../fixtures/generated/fe-articles/Standard'; import { images } from '../../fixtures/generated/images'; -import { decideFormat } from '../lib/format'; +import { decideFormat } from '../lib/articleFormat'; import type { FEElement } from '../types/content'; import { enhanceNumberedLists } from './enhance-numbered-lists'; diff --git a/dotcom-rendering/src/model/enhance-numbered-lists.ts b/dotcom-rendering/src/model/enhance-numbered-lists.ts index c191fc034f5..1fab92a8d6d 100644 --- a/dotcom-rendering/src/model/enhance-numbered-lists.ts +++ b/dotcom-rendering/src/model/enhance-numbered-lists.ts @@ -1,6 +1,6 @@ import { isUndefined } from '@guardian/libs'; import { JSDOM } from 'jsdom'; -import { ArticleDisplay, type ArticleFormat } from '../lib/format'; +import { ArticleDisplay, type ArticleFormat } from '../lib/articleFormat'; import type { FEElement, StarRating, TextBlockElement } from '../types/content'; const isFalseH3 = (element: FEElement): boolean => { diff --git a/dotcom-rendering/src/model/enhance-videos.test.ts b/dotcom-rendering/src/model/enhance-videos.test.ts index cefe8e20b07..d434f8da4c1 100644 --- a/dotcom-rendering/src/model/enhance-videos.test.ts +++ b/dotcom-rendering/src/model/enhance-videos.test.ts @@ -1,4 +1,4 @@ -import { ArticleDesign, type ArticleFormat } from '../lib/format'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import type { FEElement } from '../types/content'; import { enhanceGuVideos } from './enhance-videos'; diff --git a/dotcom-rendering/src/model/enhance-videos.ts b/dotcom-rendering/src/model/enhance-videos.ts index 5e42c8b91fc..3ef1942d400 100644 --- a/dotcom-rendering/src/model/enhance-videos.ts +++ b/dotcom-rendering/src/model/enhance-videos.ts @@ -1,4 +1,4 @@ -import { ArticleDesign, type ArticleFormat } from '../lib/format'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import type { FEElement } from '../types/content'; const addHtmlToGuVideoBlocks = (elements: FEElement[], html?: string) => { diff --git a/dotcom-rendering/src/model/enhanceBlocks.ts b/dotcom-rendering/src/model/enhanceBlocks.ts index edbb9e0d1b9..ef3acd3f77b 100644 --- a/dotcom-rendering/src/model/enhanceBlocks.ts +++ b/dotcom-rendering/src/model/enhanceBlocks.ts @@ -1,5 +1,5 @@ import { isUndefined } from '@guardian/libs'; -import { type ArticleFormat } from '../lib/format'; +import { type ArticleFormat } from '../lib/articleFormat'; import type { FEElement, ImageBlockElement, diff --git a/dotcom-rendering/src/model/enhanceCards.ts b/dotcom-rendering/src/model/enhanceCards.ts index 5776cdb5e1f..e0a500bdec1 100644 --- a/dotcom-rendering/src/model/enhanceCards.ts +++ b/dotcom-rendering/src/model/enhanceCards.ts @@ -1,7 +1,11 @@ import { isUndefined } from '@guardian/libs'; +import { + ArticleDesign, + type ArticleFormat, + decideFormat, +} from '../lib/articleFormat'; import { getSoleContributor } from '../lib/byline'; import type { EditionId } from '../lib/edition'; -import { ArticleDesign, type ArticleFormat, decideFormat } from '../lib/format'; import type { Group } from '../lib/getDataLinkName'; import { getDataLinkNameCard } from '../lib/getDataLinkName'; import type { diff --git a/dotcom-rendering/src/model/enhanceTreats.ts b/dotcom-rendering/src/model/enhanceTreats.ts index e5dafc6f9cf..d9458086043 100644 --- a/dotcom-rendering/src/model/enhanceTreats.ts +++ b/dotcom-rendering/src/model/enhanceTreats.ts @@ -1,5 +1,5 @@ +import { Pillar } from '../lib/articleFormat'; import type { EditionId } from '../lib/edition'; -import { Pillar } from '../lib/format'; import type { FEFrontCard, TreatType } from '../types/front'; const SOCCER_TREAT: TreatType = { diff --git a/dotcom-rendering/src/model/extract-nav.ts b/dotcom-rendering/src/model/extract-nav.ts index 829775bc4d1..d5d2be53a06 100644 --- a/dotcom-rendering/src/model/extract-nav.ts +++ b/dotcom-rendering/src/model/extract-nav.ts @@ -1,5 +1,5 @@ +import { type ArticleTheme, Pillar } from '../lib/articleFormat'; import type { EditionId } from '../lib/edition'; -import { type ArticleTheme, Pillar } from '../lib/format'; import type { FELinkType, FENavType } from '../types/frontend'; import { findPillar } from './find-pillar'; diff --git a/dotcom-rendering/src/model/find-pillar.test.ts b/dotcom-rendering/src/model/find-pillar.test.ts index 98cc9e18d09..ce36b542ca3 100644 --- a/dotcom-rendering/src/model/find-pillar.test.ts +++ b/dotcom-rendering/src/model/find-pillar.test.ts @@ -1,4 +1,4 @@ -import { ArticleSpecial, Pillar } from '../lib/format'; +import { ArticleSpecial, Pillar } from '../lib/articleFormat'; import { findPillar } from './find-pillar'; jest.mock('../lib/pillars', () => ({ diff --git a/dotcom-rendering/src/model/find-pillar.ts b/dotcom-rendering/src/model/find-pillar.ts index c6e2451625e..9217261acff 100644 --- a/dotcom-rendering/src/model/find-pillar.ts +++ b/dotcom-rendering/src/model/find-pillar.ts @@ -1,4 +1,8 @@ -import { ArticleSpecial, type ArticleTheme, Pillar } from '../lib/format'; +import { + ArticleSpecial, + type ArticleTheme, + Pillar, +} from '../lib/articleFormat'; import type { TagType } from '../types/tag'; export const findPillar: ( diff --git a/dotcom-rendering/src/model/insertPromotedNewsletter.test.ts b/dotcom-rendering/src/model/insertPromotedNewsletter.test.ts index ea086f6f974..3564efbbf2e 100644 --- a/dotcom-rendering/src/model/insertPromotedNewsletter.test.ts +++ b/dotcom-rendering/src/model/insertPromotedNewsletter.test.ts @@ -1,7 +1,7 @@ import { Live as exampleLiveBlog } from '../../fixtures/generated/fe-articles/Live'; import { Quiz as exampleQuiz } from '../../fixtures/generated/fe-articles/Quiz'; import { Standard as exampleStandard } from '../../fixtures/generated/fe-articles/Standard'; -import { decideFormat } from '../lib/format'; +import { decideFormat } from '../lib/articleFormat'; import type { KeyTakeawaysBlockElement, Newsletter, diff --git a/dotcom-rendering/src/model/insertPromotedNewsletter.ts b/dotcom-rendering/src/model/insertPromotedNewsletter.ts index 06c9d0968a8..a9172888886 100644 --- a/dotcom-rendering/src/model/insertPromotedNewsletter.ts +++ b/dotcom-rendering/src/model/insertPromotedNewsletter.ts @@ -1,5 +1,5 @@ import { isOneOf } from '@guardian/libs'; -import { ArticleDesign, type ArticleFormat } from '../lib/format'; +import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat'; import { logger } from '../server/lib/logging'; import type { FEElement, Newsletter } from '../types/content'; diff --git a/dotcom-rendering/src/palette.ts b/dotcom-rendering/src/palette.ts index fb0782948fa..804d56918ae 100644 --- a/dotcom-rendering/src/palette.ts +++ b/dotcom-rendering/src/palette.ts @@ -14,7 +14,6 @@ import { tabsDarkTheme, tabsThemeDefault, } from '@guardian/source-development-kitchen/react-components'; -import { isMediaCard } from './lib/cardHelpers'; import { ArticleDesign, ArticleDisplay, @@ -22,7 +21,8 @@ import { ArticleSpecial, type ArticleTheme, Pillar, -} from './lib/format'; +} from './lib/articleFormat'; +import { isMediaCard } from './lib/cardHelpers'; import { transparentColour } from './lib/transparentColour'; // ----- Palette Functions ----- // diff --git a/dotcom-rendering/src/server/handler.article.amp.tsx b/dotcom-rendering/src/server/handler.article.amp.tsx index ae4fa84fa5b..897a6b63dc3 100644 --- a/dotcom-rendering/src/server/handler.article.amp.tsx +++ b/dotcom-rendering/src/server/handler.article.amp.tsx @@ -4,9 +4,9 @@ import type { AnalyticsModel } from '../components/Analytics.amp'; import { AmpArticlePage } from '../components/ArticlePage.amp'; import { isAmpSupported } from '../components/Elements.amp'; import type { PermutiveModel } from '../components/Permutive.amp'; +import { ArticleDesign, decideFormat } from '../lib/articleFormat'; import { enhance } from '../lib/enhance.amp'; import { NotRenderableInDCR } from '../lib/errors/not-renderable-in-dcr'; -import { ArticleDesign, decideFormat } from '../lib/format'; import { generatePermutivePayload } from '../lib/permutive.amp'; import { extractScripts } from '../lib/scripts.amp'; import { findBySubsection } from '../model/article-sections'; diff --git a/dotcom-rendering/src/server/handler.article.web.ts b/dotcom-rendering/src/server/handler.article.web.ts index 9618c088068..e26882ee3db 100644 --- a/dotcom-rendering/src/server/handler.article.web.ts +++ b/dotcom-rendering/src/server/handler.article.web.ts @@ -1,6 +1,6 @@ import type { RequestHandler } from 'express'; import { Standard as ExampleArticle } from '../../fixtures/generated/fe-articles/Standard'; -import { decideFormat } from '../lib/format'; +import { decideFormat } from '../lib/articleFormat'; import { enhanceBlocks } from '../model/enhanceBlocks'; import { validateAsBlock } from '../model/validate'; import { enhanceArticleType } from '../types/article'; diff --git a/dotcom-rendering/src/server/render.article.apps.tsx b/dotcom-rendering/src/server/render.article.apps.tsx index bd324936413..e184b15cd90 100644 --- a/dotcom-rendering/src/server/render.article.apps.tsx +++ b/dotcom-rendering/src/server/render.article.apps.tsx @@ -1,13 +1,13 @@ import { isString } from '@guardian/libs'; import { ArticlePage } from '../components/ArticlePage'; import { ConfigProvider } from '../components/ConfigContext'; +import { ArticleDesign } from '../lib/articleFormat'; import { ASSET_ORIGIN, generateScriptTags, getPathFromManifest, } from '../lib/assets'; import { renderToStringWithEmotion } from '../lib/emotion'; -import { ArticleDesign } from '../lib/format'; import { createGuardian } from '../model/guardian'; import type { Article } from '../types/article'; import type { Config } from '../types/configContext'; diff --git a/dotcom-rendering/src/server/render.article.web.tsx b/dotcom-rendering/src/server/render.article.web.tsx index 28d3c7e388e..a4e643afa4e 100644 --- a/dotcom-rendering/src/server/render.article.web.tsx +++ b/dotcom-rendering/src/server/render.article.web.tsx @@ -3,6 +3,12 @@ import { ArticlePage } from '../components/ArticlePage'; import { ConfigProvider } from '../components/ConfigContext'; import { isAmpSupported } from '../components/Elements.amp'; import { LiveBlogRenderer } from '../components/LiveBlogRenderer'; +import { + ArticleDesign, + type ArticleFormat, + decideFormat, + Pillar, +} from '../lib/articleFormat'; import { ASSET_ORIGIN, generateScriptTags, @@ -11,12 +17,6 @@ import { } from '../lib/assets'; import { isEditionId } from '../lib/edition'; import { renderToStringWithEmotion } from '../lib/emotion'; -import { - ArticleDesign, - type ArticleFormat, - decideFormat, - Pillar, -} from '../lib/format'; import { getCurrentPillar } from '../lib/layoutHelpers'; import { polyfillIO } from '../lib/polyfill.io'; import { extractNAV } from '../model/extract-nav'; diff --git a/dotcom-rendering/src/server/render.front.web.tsx b/dotcom-rendering/src/server/render.front.web.tsx index a69816f04a8..b5a2a7ad34b 100644 --- a/dotcom-rendering/src/server/render.front.web.tsx +++ b/dotcom-rendering/src/server/render.front.web.tsx @@ -2,6 +2,7 @@ import { isString } from '@guardian/libs'; import { ConfigProvider } from '../components/ConfigContext'; import { FrontPage } from '../components/FrontPage'; import { TagPage } from '../components/TagPage'; +import { Pillar } from '../lib/articleFormat'; import { ASSET_ORIGIN, generateScriptTags, @@ -9,7 +10,6 @@ import { getPathFromManifest, } from '../lib/assets'; import { renderToStringWithEmotion } from '../lib/emotion'; -import { Pillar } from '../lib/format'; import { polyfillIO } from '../lib/polyfill.io'; import { themeToPillar } from '../lib/themeToPillar'; import type { NavType } from '../model/extract-nav'; diff --git a/dotcom-rendering/src/types/article.ts b/dotcom-rendering/src/types/article.ts index 19d60bb0257..1467de93faa 100644 --- a/dotcom-rendering/src/types/article.ts +++ b/dotcom-rendering/src/types/article.ts @@ -1,4 +1,4 @@ -import { type ArticleFormat, decideFormat } from '../lib/format'; +import { type ArticleFormat, decideFormat } from '../lib/articleFormat'; import type { ImageForAppsLightbox } from '../model/appsLightboxImages'; import { appsLightboxImages } from '../model/appsLightboxImages'; import { buildLightboxImages } from '../model/buildLightboxImages'; diff --git a/dotcom-rendering/src/types/content.ts b/dotcom-rendering/src/types/content.ts index 4933e98c7c7..9acb5874ef7 100644 --- a/dotcom-rendering/src/types/content.ts +++ b/dotcom-rendering/src/types/content.ts @@ -1,4 +1,4 @@ -import type { ArticleTheme } from '../lib/format'; +import type { ArticleTheme } from '../lib/articleFormat'; export type StarRating = 0 | 1 | 2 | 3 | 4 | 5; diff --git a/dotcom-rendering/src/types/front.ts b/dotcom-rendering/src/types/front.ts index 4aec055721a..fb923ef2a5a 100644 --- a/dotcom-rendering/src/types/front.ts +++ b/dotcom-rendering/src/types/front.ts @@ -1,6 +1,10 @@ import type { SharedAdTargeting } from '../lib/ad-targeting'; +import type { + ArticleFormat, + ArticleSpecial, + Pillar, +} from '../lib/articleFormat'; import type { EditionId } from '../lib/edition'; -import type { ArticleFormat, ArticleSpecial, Pillar } from '../lib/format'; import type { Branding, CollectionBranding, EditionBranding } from './branding'; import type { ServerSideTests, Switches } from './config'; import type { BoostLevel, Image, StarRating } from './content'; diff --git a/dotcom-rendering/src/types/trails.ts b/dotcom-rendering/src/types/trails.ts index 5d59ff1d533..50acb59a7e4 100644 --- a/dotcom-rendering/src/types/trails.ts +++ b/dotcom-rendering/src/types/trails.ts @@ -1,4 +1,4 @@ -import type { ArticleFormat } from '../lib/format'; +import type { ArticleFormat } from '../lib/articleFormat'; import type { Branding } from './branding'; import type { BoostLevel, StarRating } from './content'; import type { DCRFrontImage, DCRSnapType, DCRSupportingContent } from './front'; diff --git a/dotcom-rendering/stories/generated/Card.stories.tsx b/dotcom-rendering/stories/generated/Card.stories.tsx index b767b099305..3a4b2b0a8f7 100644 --- a/dotcom-rendering/stories/generated/Card.stories.tsx +++ b/dotcom-rendering/stories/generated/Card.stories.tsx @@ -6,7 +6,7 @@ import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator'; import { CardsWithDifferentThemes } from '../../src/components/Card/Card.stories'; -import { ArticleDesign, ArticleDisplay, ArticleSpecial, Pillar } from '../../src/lib/format'; +import { ArticleDesign, ArticleDisplay, ArticleSpecial, Pillar } from '../../src/lib/articleFormat'; // eslint-disable-next-line import/no-default-export -- we need a default here export default {