@prezly/theme-kit-nextjs 4.3.5-alpha.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -7
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/api-handlers/fetchGalleries.js +2 -2
- package/build/adapter-nextjs/api-handlers/fetchGalleries.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/api-handlers/fetchStories.js +2 -2
- package/build/adapter-nextjs/api-handlers/fetchStories.js.map +1 -0
- package/build/adapter-nextjs/api-handlers/index.d.ts +2 -0
- package/build/adapter-nextjs/api-handlers/index.js +8 -0
- package/build/adapter-nextjs/api-handlers/index.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/getNewsroomServerSideProps.d.ts +2 -2
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/getNewsroomServerSideProps.js +2 -2
- package/build/adapter-nextjs/getNewsroomServerSideProps.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/getNewsroomStaticProps.d.ts +2 -2
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/getNewsroomStaticProps.js +2 -2
- package/build/adapter-nextjs/getNewsroomStaticProps.js.map +1 -0
- package/build/adapter-nextjs/index.d.ts +6 -0
- package/build/{cjs/server.js → adapter-nextjs/index.js} +7 -8
- package/build/adapter-nextjs/index.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/category.js +10 -10
- package/build/adapter-nextjs/page-props/category.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/gallery.js +8 -8
- package/build/adapter-nextjs/page-props/gallery.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/galleryAlbum.js +10 -10
- package/build/adapter-nextjs/page-props/galleryAlbum.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/home.js +8 -8
- package/build/adapter-nextjs/page-props/home.js.map +1 -0
- package/build/{types/adapter-nextjs → adapter-nextjs}/page-props/index.d.ts +8 -8
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/index.js +24 -24
- package/build/adapter-nextjs/page-props/index.js.map +1 -0
- package/build/adapter-nextjs/page-props/lib/types.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/search.js +8 -8
- package/build/adapter-nextjs/page-props/search.js.map +1 -0
- package/build/adapter-nextjs/page-props/sitemap/SitemapBuilder.js.map +1 -0
- package/build/adapter-nextjs/page-props/sitemap/createPaths.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/getServerSideProps.js +6 -6
- package/build/adapter-nextjs/page-props/sitemap/getServerSideProps.js.map +1 -0
- package/build/adapter-nextjs/page-props/sitemap/index.d.ts +4 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/index.js +7 -7
- package/build/adapter-nextjs/page-props/sitemap/index.js.map +1 -0
- package/build/adapter-nextjs/page-props/sitemap/types.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/story.js +14 -14
- package/build/adapter-nextjs/page-props/story.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/storyPreview.js +6 -6
- package/build/adapter-nextjs/page-props/storyPreview.js.map +1 -0
- package/build/{cjs/adapter-nextjs → adapter-nextjs}/processRequest.js +2 -2
- package/build/adapter-nextjs/processRequest.js.map +1 -0
- package/build/adapter-nextjs/processStaticRequest.js.map +1 -0
- package/build/{cjs/components-nextjs → components-nextjs}/PageSeo/PageSeo.js +12 -13
- package/build/components-nextjs/PageSeo/PageSeo.js.map +1 -0
- package/build/components-nextjs/PageSeo/index.d.ts +1 -0
- package/build/{cjs/components-nextjs → components-nextjs}/PageSeo/index.js +2 -2
- package/build/components-nextjs/PageSeo/index.js.map +1 -0
- package/build/components-nextjs/PageSeo/lib/getAbsoluteUrl.js.map +1 -0
- package/build/components-nextjs/PageSeo/lib/index.d.ts +1 -0
- package/build/{cjs/components-nextjs → components-nextjs}/PageSeo/lib/index.js +2 -2
- package/build/components-nextjs/PageSeo/lib/index.js.map +1 -0
- package/build/{cjs/components-nextjs → components-nextjs}/StorySeo/StorySeo.js +0 -1
- package/build/components-nextjs/StorySeo/StorySeo.js.map +1 -0
- package/build/components-nextjs/StorySeo/index.d.ts +1 -0
- package/build/{cjs/components-nextjs → components-nextjs}/StorySeo/index.js +2 -2
- package/build/components-nextjs/StorySeo/index.js.map +1 -0
- package/build/{cjs/components-nextjs → components-nextjs}/document.js +0 -1
- package/build/components-nextjs/document.js.map +1 -0
- package/build/components-nextjs/index.d.ts +3 -0
- package/build/components-nextjs/index.js +10 -0
- package/build/components-nextjs/index.js.map +1 -0
- package/build/{cjs/data-fetching → data-fetching}/NextPrezlyApi.js +2 -2
- package/build/data-fetching/NextPrezlyApi.js.map +1 -0
- package/build/{cjs/data-fetching → data-fetching}/getNextPrezlyApi.d.ts +1 -1
- package/build/{cjs/data-fetching → data-fetching}/getNextPrezlyApi.js +2 -2
- package/build/data-fetching/getNextPrezlyApi.js.map +1 -0
- package/build/data-fetching/index.d.ts +1 -0
- package/build/{cjs/data-fetching → data-fetching}/index.js +2 -2
- package/build/data-fetching/index.js.map +1 -0
- package/build/index.d.ts +8 -0
- package/build/{cjs/adapter-nextjs/index.js → index.js} +8 -6
- package/build/index.js.map +1 -0
- package/build/{cjs/infinite-loading → infinite-loading}/index.d.ts +4 -4
- package/build/{cjs/infinite-loading → infinite-loading}/index.js +7 -7
- package/build/infinite-loading/index.js.map +1 -0
- package/build/{esm → infinite-loading}/types.js.map +1 -1
- package/build/{cjs/infinite-loading → infinite-loading}/useInfiniteGalleriesLoading.js +2 -2
- package/build/infinite-loading/useInfiniteGalleriesLoading.js.map +1 -0
- package/build/infinite-loading/useInfiniteLoading.js.map +1 -0
- package/build/{cjs/infinite-loading → infinite-loading}/useInfiniteStoriesLoading.js +4 -4
- package/build/infinite-loading/useInfiniteStoriesLoading.js.map +1 -0
- package/build/intl/index.d.ts +2 -0
- package/build/{cjs/intl → intl}/index.js +2 -2
- package/build/intl/index.js.map +1 -0
- package/build/{cjs/intl → intl}/languages.js +2 -2
- package/build/intl/languages.js.map +1 -0
- package/build/intl/locale.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/context.js +0 -1
- package/build/newsroom-context/context.js.map +1 -0
- package/build/newsroom-context/hooks/index.d.ts +11 -0
- package/build/{cjs → newsroom-context/hooks}/index.js +11 -8
- package/build/newsroom-context/hooks/index.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useAlgoliaSettings.js +2 -2
- package/build/newsroom-context/hooks/useAlgoliaSettings.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCategories.js +2 -2
- package/build/newsroom-context/hooks/useCategories.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCompanyInformation.js +2 -2
- package/build/newsroom-context/hooks/useCompanyInformation.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCurrentCategory.js +2 -2
- package/build/newsroom-context/hooks/useCurrentCategory.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCurrentLocale.js +2 -2
- package/build/newsroom-context/hooks/useCurrentLocale.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCurrentStory.js +2 -2
- package/build/newsroom-context/hooks/useCurrentStory.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useGetLinkLocaleSlug.js +4 -4
- package/build/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useGetTranslationUrl.js +4 -4
- package/build/newsroom-context/hooks/useGetTranslationUrl.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useLanguages.js +2 -2
- package/build/newsroom-context/hooks/useLanguages.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useNewsroom.js +2 -2
- package/build/newsroom-context/hooks/useNewsroom.js.map +1 -0
- package/build/{cjs/newsroom-context → newsroom-context}/hooks/useNewsroomContext.js +2 -2
- package/build/newsroom-context/hooks/useNewsroomContext.js.map +1 -0
- package/build/newsroom-context/index.d.ts +2 -0
- package/build/{cjs/newsroom-context → newsroom-context}/index.js +4 -4
- package/build/newsroom-context/index.js.map +1 -0
- package/build/{cjs/sentry → sentry}/client.js +2 -2
- package/build/sentry/client.js.map +1 -0
- package/build/{esm/sentry → sentry}/common.js.map +1 -1
- package/build/sentry/index.d.ts +2 -0
- package/build/{cjs/sentry → sentry}/index.js +4 -4
- package/build/sentry/index.js.map +1 -0
- package/build/{cjs/sentry → sentry}/server.js +2 -2
- package/build/sentry/server.js.map +1 -0
- package/build/{cjs/types.d.ts → types.d.ts} +1 -1
- package/build/types.js.map +1 -0
- package/package.json +10 -42
- package/build/cjs/adapter-nextjs/api-handlers/fetchGalleries.js.map +0 -1
- package/build/cjs/adapter-nextjs/api-handlers/fetchStories.js.map +0 -1
- package/build/cjs/adapter-nextjs/api-handlers/index.d.ts +0 -2
- package/build/cjs/adapter-nextjs/api-handlers/index.js +0 -8
- package/build/cjs/adapter-nextjs/api-handlers/index.js.map +0 -1
- package/build/cjs/adapter-nextjs/getNewsroomServerSideProps.js.map +0 -1
- package/build/cjs/adapter-nextjs/getNewsroomStaticProps.js.map +0 -1
- package/build/cjs/adapter-nextjs/index.d.ts +0 -6
- package/build/cjs/adapter-nextjs/index.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/category.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/gallery.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/galleryAlbum.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/home.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/index.d.ts +0 -8
- package/build/cjs/adapter-nextjs/page-props/index.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/lib/types.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/search.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/sitemap/SitemapBuilder.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/sitemap/createPaths.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/sitemap/getServerSideProps.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/sitemap/index.d.ts +0 -4
- package/build/cjs/adapter-nextjs/page-props/sitemap/index.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/sitemap/types.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/story.js.map +0 -1
- package/build/cjs/adapter-nextjs/page-props/storyPreview.js.map +0 -1
- package/build/cjs/adapter-nextjs/processRequest.js.map +0 -1
- package/build/cjs/adapter-nextjs/processStaticRequest.js.map +0 -1
- package/build/cjs/client.d.ts +0 -7
- package/build/cjs/client.js +0 -24
- package/build/cjs/client.js.map +0 -1
- package/build/cjs/components-nextjs/PageSeo/PageSeo.js.map +0 -1
- package/build/cjs/components-nextjs/PageSeo/index.d.ts +0 -1
- package/build/cjs/components-nextjs/PageSeo/index.js.map +0 -1
- package/build/cjs/components-nextjs/PageSeo/lib/getAbsoluteUrl.js.map +0 -1
- package/build/cjs/components-nextjs/PageSeo/lib/index.d.ts +0 -1
- package/build/cjs/components-nextjs/PageSeo/lib/index.js.map +0 -1
- package/build/cjs/components-nextjs/StorySeo/StorySeo.js.map +0 -1
- package/build/cjs/components-nextjs/StorySeo/index.d.ts +0 -1
- package/build/cjs/components-nextjs/StorySeo/index.js.map +0 -1
- package/build/cjs/components-nextjs/document.js.map +0 -1
- package/build/cjs/components-nextjs/index.d.ts +0 -3
- package/build/cjs/components-nextjs/index.js +0 -10
- package/build/cjs/components-nextjs/index.js.map +0 -1
- package/build/cjs/data-fetching/NextPrezlyApi.js.map +0 -1
- package/build/cjs/data-fetching/getNextPrezlyApi.js.map +0 -1
- package/build/cjs/data-fetching/index.d.ts +0 -1
- package/build/cjs/data-fetching/index.js.map +0 -1
- package/build/cjs/i18nConfig.cjs +0 -21
- package/build/cjs/i18nConfig.cjs.map +0 -1
- package/build/cjs/i18nConfig.d.cts +0 -3
- package/build/cjs/index.d.ts +0 -8
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/infinite-loading/index.js.map +0 -1
- package/build/cjs/infinite-loading/types.js.map +0 -1
- package/build/cjs/infinite-loading/useInfiniteGalleriesLoading.js.map +0 -1
- package/build/cjs/infinite-loading/useInfiniteLoading.js.map +0 -1
- package/build/cjs/infinite-loading/useInfiniteStoriesLoading.js.map +0 -1
- package/build/cjs/intl/index.d.ts +0 -2
- package/build/cjs/intl/index.js.map +0 -1
- package/build/cjs/intl/languages.js.map +0 -1
- package/build/cjs/intl/locale.js.map +0 -1
- package/build/cjs/newsroom-context/context.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/index.d.ts +0 -11
- package/build/cjs/newsroom-context/hooks/index.js +0 -28
- package/build/cjs/newsroom-context/hooks/index.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useAlgoliaSettings.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useCategories.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useCompanyInformation.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useCurrentCategory.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useCurrentLocale.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useCurrentStory.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useGetTranslationUrl.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useLanguages.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useNewsroom.js.map +0 -1
- package/build/cjs/newsroom-context/hooks/useNewsroomContext.js.map +0 -1
- package/build/cjs/newsroom-context/index.d.ts +0 -2
- package/build/cjs/newsroom-context/index.js.map +0 -1
- package/build/cjs/sentry/client.js.map +0 -1
- package/build/cjs/sentry/common.js.map +0 -1
- package/build/cjs/sentry/index.d.ts +0 -2
- package/build/cjs/sentry/index.js.map +0 -1
- package/build/cjs/sentry/server.js.map +0 -1
- package/build/cjs/server.d.ts +0 -7
- package/build/cjs/server.js.map +0 -1
- package/build/cjs/types.js.map +0 -1
- package/build/esm/adapter-nextjs/api-handlers/fetchGalleries.js +0 -19
- package/build/esm/adapter-nextjs/api-handlers/fetchGalleries.js.map +0 -1
- package/build/esm/adapter-nextjs/api-handlers/fetchStories.js +0 -29
- package/build/esm/adapter-nextjs/api-handlers/fetchStories.js.map +0 -1
- package/build/esm/adapter-nextjs/api-handlers/index.js +0 -3
- package/build/esm/adapter-nextjs/api-handlers/index.js.map +0 -1
- package/build/esm/adapter-nextjs/getNewsroomServerSideProps.js +0 -15
- package/build/esm/adapter-nextjs/getNewsroomServerSideProps.js.map +0 -1
- package/build/esm/adapter-nextjs/getNewsroomStaticProps.js +0 -15
- package/build/esm/adapter-nextjs/getNewsroomStaticProps.js.map +0 -1
- package/build/esm/adapter-nextjs/index.js +0 -7
- package/build/esm/adapter-nextjs/index.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/category.js +0 -97
- package/build/esm/adapter-nextjs/page-props/category.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/gallery.js +0 -66
- package/build/esm/adapter-nextjs/page-props/gallery.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/galleryAlbum.js +0 -49
- package/build/esm/adapter-nextjs/page-props/galleryAlbum.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/home.js +0 -70
- package/build/esm/adapter-nextjs/page-props/home.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/index.js +0 -9
- package/build/esm/adapter-nextjs/page-props/index.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/lib/types.js +0 -2
- package/build/esm/adapter-nextjs/page-props/lib/types.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/search.js +0 -27
- package/build/esm/adapter-nextjs/page-props/search.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/sitemap/SitemapBuilder.js +0 -47
- package/build/esm/adapter-nextjs/page-props/sitemap/SitemapBuilder.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/sitemap/createPaths.js +0 -15
- package/build/esm/adapter-nextjs/page-props/sitemap/createPaths.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/sitemap/getServerSideProps.js +0 -32
- package/build/esm/adapter-nextjs/page-props/sitemap/getServerSideProps.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/sitemap/index.js +0 -5
- package/build/esm/adapter-nextjs/page-props/sitemap/index.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/sitemap/types.js +0 -2
- package/build/esm/adapter-nextjs/page-props/sitemap/types.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/story.js +0 -63
- package/build/esm/adapter-nextjs/page-props/story.js.map +0 -1
- package/build/esm/adapter-nextjs/page-props/storyPreview.js +0 -22
- package/build/esm/adapter-nextjs/page-props/storyPreview.js.map +0 -1
- package/build/esm/adapter-nextjs/processRequest.js +0 -33
- package/build/esm/adapter-nextjs/processRequest.js.map +0 -1
- package/build/esm/adapter-nextjs/processStaticRequest.js +0 -22
- package/build/esm/adapter-nextjs/processStaticRequest.js.map +0 -1
- package/build/esm/client.js +0 -8
- package/build/esm/client.js.map +0 -1
- package/build/esm/components-nextjs/PageSeo/PageSeo.js +0 -78
- package/build/esm/components-nextjs/PageSeo/PageSeo.js.map +0 -1
- package/build/esm/components-nextjs/PageSeo/index.js +0 -2
- package/build/esm/components-nextjs/PageSeo/index.js.map +0 -1
- package/build/esm/components-nextjs/PageSeo/lib/getAbsoluteUrl.js +0 -7
- package/build/esm/components-nextjs/PageSeo/lib/getAbsoluteUrl.js.map +0 -1
- package/build/esm/components-nextjs/PageSeo/lib/index.js +0 -2
- package/build/esm/components-nextjs/PageSeo/lib/index.js.map +0 -1
- package/build/esm/components-nextjs/StorySeo/StorySeo.js +0 -53
- package/build/esm/components-nextjs/StorySeo/StorySeo.js.map +0 -1
- package/build/esm/components-nextjs/StorySeo/index.js +0 -2
- package/build/esm/components-nextjs/StorySeo/index.js.map +0 -1
- package/build/esm/components-nextjs/document.js +0 -22
- package/build/esm/components-nextjs/document.js.map +0 -1
- package/build/esm/components-nextjs/index.js +0 -4
- package/build/esm/components-nextjs/index.js.map +0 -1
- package/build/esm/data-fetching/NextPrezlyApi.js +0 -36
- package/build/esm/data-fetching/NextPrezlyApi.js.map +0 -1
- package/build/esm/data-fetching/getNextPrezlyApi.js +0 -17
- package/build/esm/data-fetching/getNextPrezlyApi.js.map +0 -1
- package/build/esm/data-fetching/index.js +0 -2
- package/build/esm/data-fetching/index.js.map +0 -1
- package/build/esm/i18nConfig.cjs +0 -20
- package/build/esm/i18nConfig.cjs.map +0 -1
- package/build/esm/index.js +0 -9
- package/build/esm/index.js.map +0 -1
- package/build/esm/infinite-loading/index.js +0 -5
- package/build/esm/infinite-loading/index.js.map +0 -1
- package/build/esm/infinite-loading/types.js +0 -2
- package/build/esm/infinite-loading/types.js.map +0 -1
- package/build/esm/infinite-loading/useInfiniteGalleriesLoading.js +0 -41
- package/build/esm/infinite-loading/useInfiniteGalleriesLoading.js.map +0 -1
- package/build/esm/infinite-loading/useInfiniteLoading.js +0 -40
- package/build/esm/infinite-loading/useInfiniteLoading.js.map +0 -1
- package/build/esm/infinite-loading/useInfiniteStoriesLoading.js +0 -58
- package/build/esm/infinite-loading/useInfiniteStoriesLoading.js.map +0 -1
- package/build/esm/intl/index.js +0 -3
- package/build/esm/intl/index.js.map +0 -1
- package/build/esm/intl/languages.js +0 -26
- package/build/esm/intl/languages.js.map +0 -1
- package/build/esm/intl/locale.js +0 -25
- package/build/esm/intl/locale.js.map +0 -1
- package/build/esm/newsroom-context/context.js +0 -26
- package/build/esm/newsroom-context/context.js.map +0 -1
- package/build/esm/newsroom-context/hooks/index.js +0 -12
- package/build/esm/newsroom-context/hooks/index.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useAlgoliaSettings.js +0 -6
- package/build/esm/newsroom-context/hooks/useAlgoliaSettings.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useCategories.js +0 -6
- package/build/esm/newsroom-context/hooks/useCategories.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useCompanyInformation.js +0 -6
- package/build/esm/newsroom-context/hooks/useCompanyInformation.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useCurrentCategory.js +0 -6
- package/build/esm/newsroom-context/hooks/useCurrentCategory.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useCurrentLocale.js +0 -6
- package/build/esm/newsroom-context/hooks/useCurrentLocale.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useCurrentStory.js +0 -6
- package/build/esm/newsroom-context/hooks/useCurrentStory.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useGetLinkLocaleSlug.js +0 -25
- package/build/esm/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useGetTranslationUrl.js +0 -71
- package/build/esm/newsroom-context/hooks/useGetTranslationUrl.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useLanguages.js +0 -6
- package/build/esm/newsroom-context/hooks/useLanguages.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useNewsroom.js +0 -6
- package/build/esm/newsroom-context/hooks/useNewsroom.js.map +0 -1
- package/build/esm/newsroom-context/hooks/useNewsroomContext.js +0 -12
- package/build/esm/newsroom-context/hooks/useNewsroomContext.js.map +0 -1
- package/build/esm/newsroom-context/index.js +0 -3
- package/build/esm/newsroom-context/index.js.map +0 -1
- package/build/esm/sentry/client.js +0 -5
- package/build/esm/sentry/client.js.map +0 -1
- package/build/esm/sentry/common.js +0 -62
- package/build/esm/sentry/index.js +0 -3
- package/build/esm/sentry/index.js.map +0 -1
- package/build/esm/sentry/server.js +0 -5
- package/build/esm/sentry/server.js.map +0 -1
- package/build/esm/server.js +0 -8
- package/build/esm/server.js.map +0 -1
- package/build/esm/types.js +0 -2
- package/build/tsconfig.cjs.tsbuildinfo +0 -1
- package/build/tsconfig.esm.tsbuildinfo +0 -1
- package/build/types/adapter-nextjs/api-handlers/fetchGalleries.d.ts +0 -2
- package/build/types/adapter-nextjs/api-handlers/fetchStories.d.ts +0 -2
- package/build/types/adapter-nextjs/api-handlers/index.d.ts +0 -2
- package/build/types/adapter-nextjs/getNewsroomServerSideProps.d.ts +0 -15
- package/build/types/adapter-nextjs/getNewsroomStaticProps.d.ts +0 -15
- package/build/types/adapter-nextjs/index.d.ts +0 -6
- package/build/types/adapter-nextjs/page-props/category.d.ts +0 -16
- package/build/types/adapter-nextjs/page-props/gallery.d.ts +0 -14
- package/build/types/adapter-nextjs/page-props/galleryAlbum.d.ts +0 -9
- package/build/types/adapter-nextjs/page-props/home.d.ts +0 -22
- package/build/types/adapter-nextjs/page-props/lib/types.d.ts +0 -3
- package/build/types/adapter-nextjs/page-props/search.d.ts +0 -4
- package/build/types/adapter-nextjs/page-props/sitemap/SitemapBuilder.d.ts +0 -11
- package/build/types/adapter-nextjs/page-props/sitemap/createPaths.d.ts +0 -2
- package/build/types/adapter-nextjs/page-props/sitemap/getServerSideProps.d.ts +0 -7
- package/build/types/adapter-nextjs/page-props/sitemap/index.d.ts +0 -4
- package/build/types/adapter-nextjs/page-props/sitemap/types.d.ts +0 -5
- package/build/types/adapter-nextjs/page-props/story.d.ts +0 -14
- package/build/types/adapter-nextjs/page-props/storyPreview.d.ts +0 -3
- package/build/types/adapter-nextjs/processRequest.d.ts +0 -12
- package/build/types/adapter-nextjs/processStaticRequest.d.ts +0 -11
- package/build/types/client.d.ts +0 -7
- package/build/types/components-nextjs/PageSeo/PageSeo.d.ts +0 -12
- package/build/types/components-nextjs/PageSeo/index.d.ts +0 -1
- package/build/types/components-nextjs/PageSeo/lib/getAbsoluteUrl.d.ts +0 -1
- package/build/types/components-nextjs/PageSeo/lib/index.d.ts +0 -1
- package/build/types/components-nextjs/StorySeo/StorySeo.d.ts +0 -12
- package/build/types/components-nextjs/StorySeo/index.d.ts +0 -1
- package/build/types/components-nextjs/document.d.ts +0 -6
- package/build/types/components-nextjs/index.d.ts +0 -3
- package/build/types/data-fetching/NextPrezlyApi.d.ts +0 -8
- package/build/types/data-fetching/getNextPrezlyApi.d.ts +0 -4
- package/build/types/data-fetching/index.d.ts +0 -1
- package/build/types/i18nConfig.d.cts +0 -3
- package/build/types/index.d.ts +0 -8
- package/build/types/infinite-loading/index.d.ts +0 -4
- package/build/types/infinite-loading/types.d.ts +0 -9
- package/build/types/infinite-loading/useInfiniteGalleriesLoading.d.ts +0 -13
- package/build/types/infinite-loading/useInfiniteLoading.d.ts +0 -16
- package/build/types/infinite-loading/useInfiniteStoriesLoading.d.ts +0 -13
- package/build/types/intl/index.d.ts +0 -2
- package/build/types/intl/languages.d.ts +0 -6
- package/build/types/intl/locale.d.ts +0 -5
- package/build/types/newsroom-context/context.d.ts +0 -62
- package/build/types/newsroom-context/hooks/index.d.ts +0 -11
- package/build/types/newsroom-context/hooks/useAlgoliaSettings.d.ts +0 -1
- package/build/types/newsroom-context/hooks/useCategories.d.ts +0 -1
- package/build/types/newsroom-context/hooks/useCompanyInformation.d.ts +0 -1
- package/build/types/newsroom-context/hooks/useCurrentCategory.d.ts +0 -1
- package/build/types/newsroom-context/hooks/useCurrentLocale.d.ts +0 -1
- package/build/types/newsroom-context/hooks/useCurrentStory.d.ts +0 -1
- package/build/types/newsroom-context/hooks/useGetLinkLocaleSlug.d.ts +0 -2
- package/build/types/newsroom-context/hooks/useGetTranslationUrl.d.ts +0 -6
- package/build/types/newsroom-context/hooks/useLanguages.d.ts +0 -1
- package/build/types/newsroom-context/hooks/useNewsroom.d.ts +0 -1
- package/build/types/newsroom-context/hooks/useNewsroomContext.d.ts +0 -2
- package/build/types/newsroom-context/index.d.ts +0 -2
- package/build/types/sentry/client.d.ts +0 -2
- package/build/types/sentry/common.d.ts +0 -2
- package/build/types/sentry/index.d.ts +0 -2
- package/build/types/sentry/server.d.ts +0 -2
- package/build/types/server.d.ts +0 -7
- package/build/types/types.d.ts +0 -14
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/api-handlers/fetchGalleries.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/api-handlers/fetchStories.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/category.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/gallery.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/galleryAlbum.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/home.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/lib/types.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/lib/types.js +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/search.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/SitemapBuilder.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/SitemapBuilder.js +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/createPaths.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/createPaths.js +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/getServerSideProps.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/types.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/types.js +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/story.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/storyPreview.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/processRequest.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/processStaticRequest.d.ts +0 -0
- /package/build/{cjs/adapter-nextjs → adapter-nextjs}/processStaticRequest.js +0 -0
- /package/build/{cjs/components-nextjs → components-nextjs}/PageSeo/PageSeo.d.ts +0 -0
- /package/build/{cjs/components-nextjs → components-nextjs}/PageSeo/lib/getAbsoluteUrl.d.ts +0 -0
- /package/build/{cjs/components-nextjs → components-nextjs}/PageSeo/lib/getAbsoluteUrl.js +0 -0
- /package/build/{cjs/components-nextjs → components-nextjs}/StorySeo/StorySeo.d.ts +0 -0
- /package/build/{cjs/components-nextjs → components-nextjs}/document.d.ts +0 -0
- /package/build/{cjs/data-fetching → data-fetching}/NextPrezlyApi.d.ts +0 -0
- /package/build/{cjs/infinite-loading → infinite-loading}/types.d.ts +0 -0
- /package/build/{cjs/infinite-loading → infinite-loading}/types.js +0 -0
- /package/build/{cjs/infinite-loading → infinite-loading}/useInfiniteGalleriesLoading.d.ts +0 -0
- /package/build/{cjs/infinite-loading → infinite-loading}/useInfiniteLoading.d.ts +0 -0
- /package/build/{cjs/infinite-loading → infinite-loading}/useInfiniteLoading.js +0 -0
- /package/build/{cjs/infinite-loading → infinite-loading}/useInfiniteStoriesLoading.d.ts +0 -0
- /package/build/{cjs/intl → intl}/languages.d.ts +0 -0
- /package/build/{cjs/intl → intl}/locale.d.ts +0 -0
- /package/build/{cjs/intl → intl}/locale.js +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/context.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useAlgoliaSettings.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCategories.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCompanyInformation.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCurrentCategory.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCurrentLocale.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCurrentStory.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useGetLinkLocaleSlug.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useGetTranslationUrl.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useLanguages.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useNewsroom.d.ts +0 -0
- /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useNewsroomContext.d.ts +0 -0
- /package/build/{cjs/sentry → sentry}/client.d.ts +0 -0
- /package/build/{cjs/sentry → sentry}/common.d.ts +0 -0
- /package/build/{cjs/sentry → sentry}/common.js +0 -0
- /package/build/{cjs/sentry → sentry}/server.d.ts +0 -0
- /package/build/{cjs/types.js → types.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"locale.js","sourceRoot":"","sources":["../../../src/intl/locale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGtD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,oIAAoI;AACpI,MAAM,CAAC,MAAM,oBAAoB,GAAG,UAAU,CAAC;AAE/C,MAAM,UAAU,4BAA4B,CACxC,kBAAkC,EAClC,iBAAqC,EACrC,YAAoB,EACpB,KAAsB;IAEtB,+EAA+E;IAC/E,IAAI,CAAC,iBAAiB,IAAI,iBAAiB,KAAK,oBAAoB,EAAE;QAClE,OAAO,SAAS,CAAC;KACpB;IAED,MAAM,kBAAkB,GAAG,kBAAkB;QACzC,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,SAAS,EAAE;QAC1D,CAAC,CAAC,kBAAkB,CAAC;IAEzB,IAAI,kBAAkB,KAAK,iBAAiB,EAAE;QAC1C,MAAM,YAAY,GACd,YAAY,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,YAAY,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC;QAEtF,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAErD,OAAO;YACH,WAAW,EAAE,kBAAkB;gBAC3B,CAAC,CAAC,IAAI,kBAAkB,GAAG,YAAY,GAAG,QAAQ,EAAE;gBACpD,CAAC,CAAC,GAAG,YAAY,GAAG,QAAQ,EAAE;YAClC,SAAS,EAAE,KAAK;SACnB,CAAC;KACL;IAED,OAAO,SAAS,CAAC;AACrB,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { DEFAULT_LOCALE, LocaleObject } from '@prezly/theme-kit-core';
|
|
4
|
-
import { createContext, useMemo } from 'react';
|
|
5
|
-
export const NewsroomContext = createContext(undefined);
|
|
6
|
-
/**
|
|
7
|
-
* This context provides common Newsroom information retrieved by `getNewsroomServerSideProps` helper.
|
|
8
|
-
* Please refer to the `NewsroomContextType` definition for more info on what's exposed from the context.
|
|
9
|
-
*/
|
|
10
|
-
export function NewsroomContextProvider({ categories, contacts, newsroom, currentCategory, currentStory, companyInformation, languages, localeCode, notifications, themePreset, algoliaSettings, children, }) {
|
|
11
|
-
const locale = useMemo(() => LocaleObject.fromAnyCode(localeCode || DEFAULT_LOCALE), [localeCode]);
|
|
12
|
-
return (_jsx(NewsroomContext.Provider, { value: {
|
|
13
|
-
categories,
|
|
14
|
-
contacts,
|
|
15
|
-
newsroom,
|
|
16
|
-
currentCategory,
|
|
17
|
-
currentStory,
|
|
18
|
-
companyInformation,
|
|
19
|
-
languages,
|
|
20
|
-
locale,
|
|
21
|
-
notifications,
|
|
22
|
-
themePreset,
|
|
23
|
-
algoliaSettings,
|
|
24
|
-
}, children: children }));
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/newsroom-context/context.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAab,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAwD/C,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAkC,SAAS,CAAC,CAAC;AAEzF;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,EACpC,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,aAAa,EACb,WAAW,EACX,eAAe,EACf,QAAQ,GAC8B;IACtC,MAAM,MAAM,GAAG,OAAO,CAClB,GAAG,EAAE,CAAC,YAAY,CAAC,WAAW,CAAC,UAAU,IAAI,cAAc,CAAC,EAC5D,CAAC,UAAU,CAAC,CACf,CAAC;IAEF,OAAO,CACH,KAAC,eAAe,CAAC,QAAQ,IACrB,KAAK,EAAE;YACH,UAAU;YACV,QAAQ;YACR,QAAQ;YACR,eAAe;YACf,YAAY;YACZ,kBAAkB;YAClB,SAAS;YACT,MAAM;YACN,aAAa;YACb,WAAW;YACX,eAAe;SAClB,YAEA,QAAQ,GACc,CAC9B,CAAC;AACN,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from './useAlgoliaSettings.js';
|
|
2
|
-
export * from './useCategories.js';
|
|
3
|
-
export * from './useCompanyInformation.js';
|
|
4
|
-
export * from './useCurrentCategory.js';
|
|
5
|
-
export * from './useCurrentLocale.js';
|
|
6
|
-
export * from './useCurrentStory.js';
|
|
7
|
-
export * from './useGetLinkLocaleSlug.js';
|
|
8
|
-
export * from './useGetTranslationUrl.js';
|
|
9
|
-
export * from './useLanguages.js';
|
|
10
|
-
export * from './useNewsroom.js';
|
|
11
|
-
export * from './useNewsroomContext.js';
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAlgoliaSettings.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useAlgoliaSettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,UAAU,kBAAkB;IAC9B,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IAErC,OAAO,OAAO,CAAC,eAAe,CAAC;AACnC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCategories.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useCategories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,UAAU,aAAa;IACzB,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IAErC,OAAO,OAAO,CAAC,UAAU,CAAC;AAC9B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCompanyInformation.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useCompanyInformation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,UAAU,qBAAqB;IACjC,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IAErC,OAAO,OAAO,CAAC,kBAAkB,CAAC;AACtC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrentCategory.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useCurrentCategory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,UAAU,kBAAkB;IAC9B,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IAErC,OAAO,OAAO,CAAC,eAAe,CAAC;AACnC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrentLocale.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useCurrentLocale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,UAAU,gBAAgB;IAC5B,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IAErC,OAAO,OAAO,CAAC,MAAM,CAAC;AAC1B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrentStory.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useCurrentStory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,UAAU,eAAe;IAC3B,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IAErC,OAAO,OAAO,CAAC,YAAY,CAAC;AAChC,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { getShortestLocaleCode, LocaleObject } from '@prezly/theme-kit-core';
|
|
2
|
-
import { useCallback } from 'react';
|
|
3
|
-
import { useCurrentLocale } from './useCurrentLocale.js';
|
|
4
|
-
import { useLanguages } from './useLanguages.js';
|
|
5
|
-
/**
|
|
6
|
-
* Determines correct locale slug for the link (trying to shorten the locale code if possible).
|
|
7
|
-
* E.g. if newsroom has a single locale for Dutch (`nl_BE`), it will be shortened to `nl`.
|
|
8
|
-
* If there are more than one locale with the same language part, a full locale code will be used instead.
|
|
9
|
-
* `false` means that a default locale should be used (no locale in URL required).
|
|
10
|
-
*/
|
|
11
|
-
function getLinkLocaleSlug(languages, locale) {
|
|
12
|
-
const shortestLocaleCode = getShortestLocaleCode(languages, locale);
|
|
13
|
-
// When navigating to default language, we don't append the locale to the URL.
|
|
14
|
-
if (!shortestLocaleCode) {
|
|
15
|
-
return shortestLocaleCode;
|
|
16
|
-
}
|
|
17
|
-
return LocaleObject.fromAnyCode(shortestLocaleCode).toUrlSlug();
|
|
18
|
-
}
|
|
19
|
-
export function useGetLinkLocaleSlug() {
|
|
20
|
-
const currentLocale = useCurrentLocale();
|
|
21
|
-
const languages = useLanguages();
|
|
22
|
-
// The `locale` parameter is mainly used for Language Dropdown
|
|
23
|
-
return useCallback((locale) => getLinkLocaleSlug(languages, locale || currentLocale), [languages, currentLocale]);
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=useGetLinkLocaleSlug.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useGetLinkLocaleSlug.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useGetLinkLocaleSlug.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;;;;GAKG;AACH,SAAS,iBAAiB,CACtB,SAAqC,EACrC,MAAoB;IAEpB,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACpE,8EAA8E;IAC9E,IAAI,CAAC,kBAAkB,EAAE;QACrB,OAAO,kBAAkB,CAAC;KAC7B;IAED,OAAO,YAAY,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,SAAS,EAAE,CAAC;AACpE,CAAC;AAED,MAAM,UAAU,oBAAoB;IAChC,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IAEjC,8DAA8D;IAC9D,OAAO,WAAW,CACd,CAAC,MAAqB,EAAE,EAAE,CAAC,iBAAiB,CAAC,SAAS,EAAE,MAAM,IAAI,aAAa,CAAC,EAChF,CAAC,SAAS,EAAE,aAAa,CAAC,CAC7B,CAAC;AACN,CAAC"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { Story } from '@prezly/sdk';
|
|
2
|
-
import { getCategoryHasTranslation, getCategoryUrl } from '@prezly/theme-kit-core';
|
|
3
|
-
import { useRouter } from 'next/router';
|
|
4
|
-
import { useCallback } from 'react';
|
|
5
|
-
import { useCurrentCategory } from './useCurrentCategory.js';
|
|
6
|
-
import { useCurrentStory } from './useCurrentStory.js';
|
|
7
|
-
// Pulled from SDK types to not leak the `@prezly/sdk` dependency into the client bundle
|
|
8
|
-
// It looks like a hack, but the name of enum must be the same as in SDK
|
|
9
|
-
var Visibility;
|
|
10
|
-
(function (Visibility) {
|
|
11
|
-
Visibility["PUBLIC"] = "public";
|
|
12
|
-
Visibility["EMBARGO"] = "embargo";
|
|
13
|
-
Visibility["PRIVATE"] = "private";
|
|
14
|
-
Visibility["CONFIDENTIAL"] = "confidential";
|
|
15
|
-
})(Visibility || (Visibility = {}));
|
|
16
|
-
function getAllowedTranslationVisibilityValues(story) {
|
|
17
|
-
const { visibility } = story;
|
|
18
|
-
switch (visibility) {
|
|
19
|
-
case Visibility.EMBARGO:
|
|
20
|
-
return [Visibility.EMBARGO, Visibility.PUBLIC];
|
|
21
|
-
case Visibility.PRIVATE:
|
|
22
|
-
return [Visibility.PRIVATE, Visibility.PUBLIC];
|
|
23
|
-
case Visibility.CONFIDENTIAL:
|
|
24
|
-
return [Visibility.CONFIDENTIAL, Visibility.PRIVATE, Visibility.PUBLIC];
|
|
25
|
-
default:
|
|
26
|
-
return [Visibility.PUBLIC];
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Determine correct URL for translated stories/categories with a fallback to homepage.
|
|
31
|
-
* E.g. if a story has a translation, the function will return the localized slug URL.
|
|
32
|
-
* If there is no translation for the story, it will return the index page URL (`/`),
|
|
33
|
-
* or empty string, if `noFallback` is set to `true` (this is useful for alternate locale links).
|
|
34
|
-
*/
|
|
35
|
-
function getTranslationUrl(locale, path, currentCategory, currentStory, noFallback) {
|
|
36
|
-
if (currentCategory) {
|
|
37
|
-
if (getCategoryHasTranslation(currentCategory, locale)) {
|
|
38
|
-
return getCategoryUrl(currentCategory, locale);
|
|
39
|
-
}
|
|
40
|
-
if (noFallback) {
|
|
41
|
-
return '';
|
|
42
|
-
}
|
|
43
|
-
return '/';
|
|
44
|
-
}
|
|
45
|
-
const localeCode = locale.toUnderscoreCode();
|
|
46
|
-
if (currentStory && currentStory.culture.locale !== localeCode) {
|
|
47
|
-
const allowedVisibilityValues = getAllowedTranslationVisibilityValues(currentStory);
|
|
48
|
-
const translatedStory = currentStory.translations.find(({ culture, lifecycle_status, visibility }) => culture.locale === localeCode &&
|
|
49
|
-
Story.isPublished(lifecycle_status) &&
|
|
50
|
-
allowedVisibilityValues.includes(visibility));
|
|
51
|
-
if (translatedStory) {
|
|
52
|
-
return `/${translatedStory.slug}`;
|
|
53
|
-
}
|
|
54
|
-
if (noFallback) {
|
|
55
|
-
return '';
|
|
56
|
-
}
|
|
57
|
-
return '/';
|
|
58
|
-
}
|
|
59
|
-
return path;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* This hook returns a function that is meant to be used in language pickers and alternate locales list for the pages.
|
|
63
|
-
* `noFallback` parameter is useful for alternate language links in the `head` section of the document (so that there are no unwanted links to the homepage).
|
|
64
|
-
*/
|
|
65
|
-
export function useGetTranslationUrl() {
|
|
66
|
-
const { asPath } = useRouter();
|
|
67
|
-
const currentCategory = useCurrentCategory();
|
|
68
|
-
const currentStory = useCurrentStory();
|
|
69
|
-
return useCallback((locale, noFallback) => getTranslationUrl(locale, asPath, currentCategory, currentStory, noFallback), [asPath, currentCategory, currentStory]);
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=useGetTranslationUrl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useGetTranslationUrl.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useGetTranslationUrl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,wFAAwF;AACxF,wEAAwE;AACxE,IAAK,UAKJ;AALD,WAAK,UAAU;IACX,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;IACnB,2CAA6B,CAAA;AACjC,CAAC,EALI,UAAU,KAAV,UAAU,QAKd;AAED,SAAS,qCAAqC,CAAC,KAAoB;IAC/D,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAE7B,QAAQ,UAAU,EAAE;QAChB,KAAK,UAAU,CAAC,OAAO;YACnB,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;QACnD,KAAK,UAAU,CAAC,OAAO;YACnB,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;QACnD,KAAK,UAAU,CAAC,YAAY;YACxB,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;QAC5E;YACI,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;KAClC;AACL,CAAC;AAED;;;;;GAKG;AACH,SAAS,iBAAiB,CACtB,MAAoB,EACpB,IAAY,EACZ,eAA0B,EAC1B,YAA4B,EAC5B,UAAoB;IAEpB,IAAI,eAAe,EAAE;QACjB,IAAI,yBAAyB,CAAC,eAAe,EAAE,MAAM,CAAC,EAAE;YACpD,OAAO,cAAc,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;SAClD;QAED,IAAI,UAAU,EAAE;YACZ,OAAO,EAAE,CAAC;SACb;QAED,OAAO,GAAG,CAAC;KACd;IAED,MAAM,UAAU,GAAG,MAAM,CAAC,gBAAgB,EAAE,CAAC;IAE7C,IAAI,YAAY,IAAI,YAAY,CAAC,OAAO,CAAC,MAAM,KAAK,UAAU,EAAE;QAC5D,MAAM,uBAAuB,GAAG,qCAAqC,CAAC,YAAY,CAAC,CAAC;QAEpF,MAAM,eAAe,GAAG,YAAY,CAAC,YAAY,CAAC,IAAI,CAClD,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,EAAE,EAAE,CAC1C,OAAO,CAAC,MAAM,KAAK,UAAU;YAC7B,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC;YACnC,uBAAuB,CAAC,QAAQ,CAAC,UAAU,CAAC,CACnD,CAAC;QACF,IAAI,eAAe,EAAE;YACjB,OAAO,IAAI,eAAe,CAAC,IAAI,EAAE,CAAC;SACrC;QAED,IAAI,UAAU,EAAE;YACZ,OAAO,EAAE,CAAC;SACb;QAED,OAAO,GAAG,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AAChB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB;IAChC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAC;IAC/B,MAAM,eAAe,GAAG,kBAAkB,EAAE,CAAC;IAC7C,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IAEvC,OAAO,WAAW,CACd,CAAC,MAAoB,EAAE,UAAoB,EAAE,EAAE,CAC3C,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,CAAC,EAChF,CAAC,MAAM,EAAE,eAAe,EAAE,YAAY,CAAC,CAC1C,CAAC;AACN,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLanguages.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useLanguages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,UAAU,YAAY;IACxB,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IAErC,OAAO,OAAO,CAAC,SAAS,CAAC;AAC7B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useNewsroom.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useNewsroom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,UAAU,WAAW;IACvB,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IAErC,OAAO,OAAO,CAAC,QAAQ,CAAC;AAC5B,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { useContext } from 'react';
|
|
2
|
-
import { NewsroomContext } from '../context.js';
|
|
3
|
-
export function useNewsroomContext() {
|
|
4
|
-
// TS Compiler is having a hard time figuring this type implicitly, so we have to set it explicitly
|
|
5
|
-
// See https://github.com/microsoft/TypeScript/issues/5711#issuecomment-340283439
|
|
6
|
-
const newsroomContext = useContext(NewsroomContext);
|
|
7
|
-
if (!newsroomContext) {
|
|
8
|
-
throw new Error('No `NewsroomContextProvider` found when calling `useNewsroomContext`');
|
|
9
|
-
}
|
|
10
|
-
return newsroomContext;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=useNewsroomContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useNewsroomContext.js","sourceRoot":"","sources":["../../../../src/newsroom-context/hooks/useNewsroomContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,UAAU,kBAAkB;IAC9B,mGAAmG;IACnG,iFAAiF;IACjF,MAAM,eAAe,GAAoC,UAAU,CAAC,eAAe,CAAC,CAAC;IACrF,IAAI,CAAC,eAAe,EAAE;QAClB,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAC;KAC3F;IAED,OAAO,eAAe,CAAC;AAC3B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/newsroom-context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAA6B,MAAM,cAAc,CAAC;AACnG,cAAc,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/sentry/client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,UAAU,sBAAsB,CAClC,GAAW,EACX,SAAwB;IAExB,OAAO,sBAAsB,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
const IGNORED_EVENT_CULPRITS = [
|
|
2
|
-
// This usually means that something happened outside of application code.
|
|
3
|
-
// All instances of errors with this origin that I found usually were caused by referring to variables that couldn't ever exist in our code.
|
|
4
|
-
// Likely misbehaving browser extensions or people playing around in DevTools trying to break the app.
|
|
5
|
-
'<anonymous>',
|
|
6
|
-
'?(<anonymous>)',
|
|
7
|
-
'global code',
|
|
8
|
-
];
|
|
9
|
-
function shouldStackFrameBeIgnored(frame) {
|
|
10
|
-
const { abs_path, function: frameFunction } = frame;
|
|
11
|
-
if (abs_path &&
|
|
12
|
-
IGNORED_EVENT_CULPRITS.some((ignoredCulprit) => abs_path.includes(ignoredCulprit))) {
|
|
13
|
-
return true;
|
|
14
|
-
}
|
|
15
|
-
if (frameFunction &&
|
|
16
|
-
IGNORED_EVENT_CULPRITS.some((ignoredCulprit) => frameFunction.includes(ignoredCulprit))) {
|
|
17
|
-
return true;
|
|
18
|
-
}
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
function shouldExceptionBeIgnored(exception) {
|
|
22
|
-
const { stacktrace } = exception;
|
|
23
|
-
// Ignore global code errors that are not related to the application code.
|
|
24
|
-
// See comments in `IGNORED_EVENT_CULPRITS` const for context on each entry
|
|
25
|
-
if (stacktrace && stacktrace.frames?.some(shouldStackFrameBeIgnored)) {
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
export function getCommonClientOptions(dsn, themeName) {
|
|
31
|
-
return {
|
|
32
|
-
dsn,
|
|
33
|
-
// Adjust this value in production, or use tracesSampler for greater control
|
|
34
|
-
tracesSampleRate: 0.02,
|
|
35
|
-
// ...
|
|
36
|
-
// Note: if you want to override the automatic release value, do not set a
|
|
37
|
-
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
|
|
38
|
-
// that it will also get attached to your source maps
|
|
39
|
-
ignoreErrors: [
|
|
40
|
-
// This particular error is coming from Microsoft Outlook SafeLink crawler.
|
|
41
|
-
// It doesn't affect the user experience in any way, but produces a lot of unwanted Sentry events.
|
|
42
|
-
// See https://forum.sentry.io/t/unhandledrejection-non-error-promise-rejection-captured-with-value/14062
|
|
43
|
-
'Object Not Found Matching Id',
|
|
44
|
-
// This error is caused by `beacon.min.js` polyfill in Cloudflare Insights. From what we see, it doesn't affect the user experience.
|
|
45
|
-
'Illegal invocation',
|
|
46
|
-
],
|
|
47
|
-
beforeSend: (event) => {
|
|
48
|
-
if (event.exception?.values?.every(shouldExceptionBeIgnored)) {
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
return event;
|
|
52
|
-
},
|
|
53
|
-
// Attach theme tag to each event
|
|
54
|
-
initialScope: (scope) => {
|
|
55
|
-
if (themeName) {
|
|
56
|
-
scope.setTags({ prezly_theme: themeName });
|
|
57
|
-
}
|
|
58
|
-
return scope;
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=common.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sentry/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/sentry/server.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,UAAU,sBAAsB,CAClC,GAAW,EACX,SAAwB;IAExB,OAAO,sBAAsB,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;AAClD,CAAC"}
|
package/build/esm/server.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is a subset export created for Next 13 /app directory, which doesn't support tree-shaking properly.
|
|
3
|
-
* See https://github.com/vercel/next.js/issues/12557
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
export * from './adapter-nextjs/index.js';
|
|
7
|
-
export * from './data-fetching/index.js';
|
|
8
|
-
//# sourceMappingURL=server.js.map
|
package/build/esm/server.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC"}
|
package/build/esm/types.js
DELETED