@prezly/theme-kit-nextjs 4.3.5-alpha.1 → 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.
Files changed (462) hide show
  1. package/README.md +13 -7
  2. package/build/{cjs/adapter-nextjs → adapter-nextjs}/api-handlers/fetchGalleries.js +2 -2
  3. package/build/adapter-nextjs/api-handlers/fetchGalleries.js.map +1 -0
  4. package/build/{cjs/adapter-nextjs → adapter-nextjs}/api-handlers/fetchStories.js +2 -2
  5. package/build/adapter-nextjs/api-handlers/fetchStories.js.map +1 -0
  6. package/build/adapter-nextjs/api-handlers/index.d.ts +2 -0
  7. package/build/adapter-nextjs/api-handlers/index.js +8 -0
  8. package/build/adapter-nextjs/api-handlers/index.js.map +1 -0
  9. package/build/{cjs/adapter-nextjs → adapter-nextjs}/getNewsroomServerSideProps.d.ts +2 -2
  10. package/build/{cjs/adapter-nextjs → adapter-nextjs}/getNewsroomServerSideProps.js +2 -2
  11. package/build/adapter-nextjs/getNewsroomServerSideProps.js.map +1 -0
  12. package/build/{cjs/adapter-nextjs → adapter-nextjs}/getNewsroomStaticProps.d.ts +2 -2
  13. package/build/{cjs/adapter-nextjs → adapter-nextjs}/getNewsroomStaticProps.js +2 -2
  14. package/build/adapter-nextjs/getNewsroomStaticProps.js.map +1 -0
  15. package/build/adapter-nextjs/index.d.ts +6 -0
  16. package/build/{cjs/server.js → adapter-nextjs/index.js} +7 -8
  17. package/build/adapter-nextjs/index.js.map +1 -0
  18. package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/category.js +10 -10
  19. package/build/adapter-nextjs/page-props/category.js.map +1 -0
  20. package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/gallery.js +8 -8
  21. package/build/adapter-nextjs/page-props/gallery.js.map +1 -0
  22. package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/galleryAlbum.js +10 -10
  23. package/build/adapter-nextjs/page-props/galleryAlbum.js.map +1 -0
  24. package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/home.js +8 -8
  25. package/build/adapter-nextjs/page-props/home.js.map +1 -0
  26. package/build/{types/adapter-nextjs → adapter-nextjs}/page-props/index.d.ts +8 -8
  27. package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/index.js +24 -24
  28. package/build/adapter-nextjs/page-props/index.js.map +1 -0
  29. package/build/adapter-nextjs/page-props/lib/types.js.map +1 -0
  30. package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/search.js +8 -8
  31. package/build/adapter-nextjs/page-props/search.js.map +1 -0
  32. package/build/adapter-nextjs/page-props/sitemap/SitemapBuilder.js.map +1 -0
  33. package/build/adapter-nextjs/page-props/sitemap/createPaths.js.map +1 -0
  34. package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/getServerSideProps.js +6 -6
  35. package/build/adapter-nextjs/page-props/sitemap/getServerSideProps.js.map +1 -0
  36. package/build/adapter-nextjs/page-props/sitemap/index.d.ts +4 -0
  37. package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/index.js +7 -7
  38. package/build/adapter-nextjs/page-props/sitemap/index.js.map +1 -0
  39. package/build/adapter-nextjs/page-props/sitemap/types.js.map +1 -0
  40. package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/story.js +14 -14
  41. package/build/adapter-nextjs/page-props/story.js.map +1 -0
  42. package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/storyPreview.js +6 -6
  43. package/build/adapter-nextjs/page-props/storyPreview.js.map +1 -0
  44. package/build/{cjs/adapter-nextjs → adapter-nextjs}/processRequest.js +2 -2
  45. package/build/adapter-nextjs/processRequest.js.map +1 -0
  46. package/build/adapter-nextjs/processStaticRequest.js.map +1 -0
  47. package/build/{cjs/components-nextjs → components-nextjs}/PageSeo/PageSeo.js +14 -15
  48. package/build/components-nextjs/PageSeo/PageSeo.js.map +1 -0
  49. package/build/components-nextjs/PageSeo/index.d.ts +1 -0
  50. package/build/{cjs/components-nextjs → components-nextjs}/PageSeo/index.js +2 -2
  51. package/build/components-nextjs/PageSeo/index.js.map +1 -0
  52. package/build/components-nextjs/PageSeo/lib/getAbsoluteUrl.js.map +1 -0
  53. package/build/components-nextjs/PageSeo/lib/index.d.ts +1 -0
  54. package/build/{cjs/components-nextjs → components-nextjs}/PageSeo/lib/index.js +2 -2
  55. package/build/components-nextjs/PageSeo/lib/index.js.map +1 -0
  56. package/build/{cjs/components-nextjs → components-nextjs}/StorySeo/StorySeo.js +0 -1
  57. package/build/components-nextjs/StorySeo/StorySeo.js.map +1 -0
  58. package/build/components-nextjs/StorySeo/index.d.ts +1 -0
  59. package/build/{cjs/components-nextjs → components-nextjs}/StorySeo/index.js +2 -2
  60. package/build/components-nextjs/StorySeo/index.js.map +1 -0
  61. package/build/{types/components-nextjs → components-nextjs}/document.d.ts +1 -1
  62. package/build/{cjs/components-nextjs → components-nextjs}/document.js +3 -4
  63. package/build/components-nextjs/document.js.map +1 -0
  64. package/build/components-nextjs/index.d.ts +3 -0
  65. package/build/components-nextjs/index.js +10 -0
  66. package/build/components-nextjs/index.js.map +1 -0
  67. package/build/{cjs/data-fetching → data-fetching}/NextPrezlyApi.js +2 -2
  68. package/build/data-fetching/NextPrezlyApi.js.map +1 -0
  69. package/build/{cjs/data-fetching → data-fetching}/getNextPrezlyApi.d.ts +1 -1
  70. package/build/{cjs/data-fetching → data-fetching}/getNextPrezlyApi.js +2 -2
  71. package/build/data-fetching/getNextPrezlyApi.js.map +1 -0
  72. package/build/data-fetching/index.d.ts +1 -0
  73. package/build/{cjs/data-fetching → data-fetching}/index.js +2 -2
  74. package/build/data-fetching/index.js.map +1 -0
  75. package/build/index.d.ts +8 -0
  76. package/build/{cjs/adapter-nextjs/index.js → index.js} +8 -6
  77. package/build/index.js.map +1 -0
  78. package/build/{cjs/infinite-loading → infinite-loading}/index.d.ts +4 -4
  79. package/build/{cjs/infinite-loading → infinite-loading}/index.js +7 -7
  80. package/build/infinite-loading/index.js.map +1 -0
  81. package/build/{esm → infinite-loading}/types.js.map +1 -1
  82. package/build/{cjs/infinite-loading → infinite-loading}/useInfiniteGalleriesLoading.js +2 -2
  83. package/build/infinite-loading/useInfiniteGalleriesLoading.js.map +1 -0
  84. package/build/infinite-loading/useInfiniteLoading.js.map +1 -0
  85. package/build/{cjs/infinite-loading → infinite-loading}/useInfiniteStoriesLoading.js +4 -4
  86. package/build/infinite-loading/useInfiniteStoriesLoading.js.map +1 -0
  87. package/build/intl/index.d.ts +2 -0
  88. package/build/{cjs/intl → intl}/index.js +2 -2
  89. package/build/intl/index.js.map +1 -0
  90. package/build/{cjs/intl → intl}/languages.js +2 -2
  91. package/build/intl/languages.js.map +1 -0
  92. package/build/intl/locale.js.map +1 -0
  93. package/build/{cjs/newsroom-context → newsroom-context}/context.js +0 -1
  94. package/build/newsroom-context/context.js.map +1 -0
  95. package/build/newsroom-context/hooks/index.d.ts +11 -0
  96. package/build/{cjs → newsroom-context/hooks}/index.js +11 -8
  97. package/build/newsroom-context/hooks/index.js.map +1 -0
  98. package/build/{cjs/newsroom-context → newsroom-context}/hooks/useAlgoliaSettings.js +2 -2
  99. package/build/newsroom-context/hooks/useAlgoliaSettings.js.map +1 -0
  100. package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCategories.js +2 -2
  101. package/build/newsroom-context/hooks/useCategories.js.map +1 -0
  102. package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCompanyInformation.js +2 -2
  103. package/build/newsroom-context/hooks/useCompanyInformation.js.map +1 -0
  104. package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCurrentCategory.js +2 -2
  105. package/build/newsroom-context/hooks/useCurrentCategory.js.map +1 -0
  106. package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCurrentLocale.js +2 -2
  107. package/build/newsroom-context/hooks/useCurrentLocale.js.map +1 -0
  108. package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCurrentStory.js +2 -2
  109. package/build/newsroom-context/hooks/useCurrentStory.js.map +1 -0
  110. package/build/{cjs/newsroom-context → newsroom-context}/hooks/useGetLinkLocaleSlug.js +4 -4
  111. package/build/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +1 -0
  112. package/build/{cjs/newsroom-context → newsroom-context}/hooks/useGetTranslationUrl.js +6 -6
  113. package/build/newsroom-context/hooks/useGetTranslationUrl.js.map +1 -0
  114. package/build/{cjs/newsroom-context → newsroom-context}/hooks/useLanguages.js +2 -2
  115. package/build/newsroom-context/hooks/useLanguages.js.map +1 -0
  116. package/build/{cjs/newsroom-context → newsroom-context}/hooks/useNewsroom.js +2 -2
  117. package/build/newsroom-context/hooks/useNewsroom.js.map +1 -0
  118. package/build/{cjs/newsroom-context → newsroom-context}/hooks/useNewsroomContext.js +2 -2
  119. package/build/newsroom-context/hooks/useNewsroomContext.js.map +1 -0
  120. package/build/newsroom-context/index.d.ts +2 -0
  121. package/build/{cjs/newsroom-context → newsroom-context}/index.js +4 -4
  122. package/build/newsroom-context/index.js.map +1 -0
  123. package/build/{cjs/sentry → sentry}/client.js +2 -2
  124. package/build/sentry/client.js.map +1 -0
  125. package/build/{esm/sentry → sentry}/common.js.map +1 -1
  126. package/build/sentry/index.d.ts +2 -0
  127. package/build/{cjs/sentry → sentry}/index.js +4 -4
  128. package/build/sentry/index.js.map +1 -0
  129. package/build/{cjs/sentry → sentry}/server.js +2 -2
  130. package/build/sentry/server.js.map +1 -0
  131. package/build/{cjs/types.d.ts → types.d.ts} +1 -1
  132. package/build/types.js.map +1 -0
  133. package/package.json +10 -42
  134. package/build/cjs/adapter-nextjs/api-handlers/fetchGalleries.js.map +0 -1
  135. package/build/cjs/adapter-nextjs/api-handlers/fetchStories.js.map +0 -1
  136. package/build/cjs/adapter-nextjs/api-handlers/index.d.ts +0 -2
  137. package/build/cjs/adapter-nextjs/api-handlers/index.js +0 -8
  138. package/build/cjs/adapter-nextjs/api-handlers/index.js.map +0 -1
  139. package/build/cjs/adapter-nextjs/getNewsroomServerSideProps.js.map +0 -1
  140. package/build/cjs/adapter-nextjs/getNewsroomStaticProps.js.map +0 -1
  141. package/build/cjs/adapter-nextjs/index.d.ts +0 -6
  142. package/build/cjs/adapter-nextjs/index.js.map +0 -1
  143. package/build/cjs/adapter-nextjs/page-props/category.js.map +0 -1
  144. package/build/cjs/adapter-nextjs/page-props/gallery.js.map +0 -1
  145. package/build/cjs/adapter-nextjs/page-props/galleryAlbum.js.map +0 -1
  146. package/build/cjs/adapter-nextjs/page-props/home.js.map +0 -1
  147. package/build/cjs/adapter-nextjs/page-props/index.d.ts +0 -8
  148. package/build/cjs/adapter-nextjs/page-props/index.js.map +0 -1
  149. package/build/cjs/adapter-nextjs/page-props/lib/types.js.map +0 -1
  150. package/build/cjs/adapter-nextjs/page-props/search.js.map +0 -1
  151. package/build/cjs/adapter-nextjs/page-props/sitemap/SitemapBuilder.js.map +0 -1
  152. package/build/cjs/adapter-nextjs/page-props/sitemap/createPaths.js.map +0 -1
  153. package/build/cjs/adapter-nextjs/page-props/sitemap/getServerSideProps.js.map +0 -1
  154. package/build/cjs/adapter-nextjs/page-props/sitemap/index.d.ts +0 -4
  155. package/build/cjs/adapter-nextjs/page-props/sitemap/index.js.map +0 -1
  156. package/build/cjs/adapter-nextjs/page-props/sitemap/types.js.map +0 -1
  157. package/build/cjs/adapter-nextjs/page-props/story.js.map +0 -1
  158. package/build/cjs/adapter-nextjs/page-props/storyPreview.js.map +0 -1
  159. package/build/cjs/adapter-nextjs/processRequest.js.map +0 -1
  160. package/build/cjs/adapter-nextjs/processStaticRequest.js.map +0 -1
  161. package/build/cjs/client.d.ts +0 -7
  162. package/build/cjs/client.js +0 -24
  163. package/build/cjs/client.js.map +0 -1
  164. package/build/cjs/components-nextjs/PageSeo/PageSeo.js.map +0 -1
  165. package/build/cjs/components-nextjs/PageSeo/index.d.ts +0 -1
  166. package/build/cjs/components-nextjs/PageSeo/index.js.map +0 -1
  167. package/build/cjs/components-nextjs/PageSeo/lib/getAbsoluteUrl.js.map +0 -1
  168. package/build/cjs/components-nextjs/PageSeo/lib/index.d.ts +0 -1
  169. package/build/cjs/components-nextjs/PageSeo/lib/index.js.map +0 -1
  170. package/build/cjs/components-nextjs/StorySeo/StorySeo.js.map +0 -1
  171. package/build/cjs/components-nextjs/StorySeo/index.d.ts +0 -1
  172. package/build/cjs/components-nextjs/StorySeo/index.js.map +0 -1
  173. package/build/cjs/components-nextjs/document.d.ts +0 -6
  174. package/build/cjs/components-nextjs/document.js.map +0 -1
  175. package/build/cjs/components-nextjs/index.d.ts +0 -3
  176. package/build/cjs/components-nextjs/index.js +0 -10
  177. package/build/cjs/components-nextjs/index.js.map +0 -1
  178. package/build/cjs/data-fetching/NextPrezlyApi.js.map +0 -1
  179. package/build/cjs/data-fetching/getNextPrezlyApi.js.map +0 -1
  180. package/build/cjs/data-fetching/index.d.ts +0 -1
  181. package/build/cjs/data-fetching/index.js.map +0 -1
  182. package/build/cjs/i18nConfig.cjs +0 -21
  183. package/build/cjs/i18nConfig.cjs.map +0 -1
  184. package/build/cjs/i18nConfig.d.cts +0 -3
  185. package/build/cjs/index.d.ts +0 -8
  186. package/build/cjs/index.js.map +0 -1
  187. package/build/cjs/infinite-loading/index.js.map +0 -1
  188. package/build/cjs/infinite-loading/types.js.map +0 -1
  189. package/build/cjs/infinite-loading/useInfiniteGalleriesLoading.js.map +0 -1
  190. package/build/cjs/infinite-loading/useInfiniteLoading.js.map +0 -1
  191. package/build/cjs/infinite-loading/useInfiniteStoriesLoading.js.map +0 -1
  192. package/build/cjs/intl/index.d.ts +0 -2
  193. package/build/cjs/intl/index.js.map +0 -1
  194. package/build/cjs/intl/languages.js.map +0 -1
  195. package/build/cjs/intl/locale.js.map +0 -1
  196. package/build/cjs/newsroom-context/context.js.map +0 -1
  197. package/build/cjs/newsroom-context/hooks/index.d.ts +0 -11
  198. package/build/cjs/newsroom-context/hooks/index.js +0 -28
  199. package/build/cjs/newsroom-context/hooks/index.js.map +0 -1
  200. package/build/cjs/newsroom-context/hooks/useAlgoliaSettings.js.map +0 -1
  201. package/build/cjs/newsroom-context/hooks/useCategories.js.map +0 -1
  202. package/build/cjs/newsroom-context/hooks/useCompanyInformation.js.map +0 -1
  203. package/build/cjs/newsroom-context/hooks/useCurrentCategory.js.map +0 -1
  204. package/build/cjs/newsroom-context/hooks/useCurrentLocale.js.map +0 -1
  205. package/build/cjs/newsroom-context/hooks/useCurrentStory.js.map +0 -1
  206. package/build/cjs/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +0 -1
  207. package/build/cjs/newsroom-context/hooks/useGetTranslationUrl.js.map +0 -1
  208. package/build/cjs/newsroom-context/hooks/useLanguages.js.map +0 -1
  209. package/build/cjs/newsroom-context/hooks/useNewsroom.js.map +0 -1
  210. package/build/cjs/newsroom-context/hooks/useNewsroomContext.js.map +0 -1
  211. package/build/cjs/newsroom-context/index.d.ts +0 -2
  212. package/build/cjs/newsroom-context/index.js.map +0 -1
  213. package/build/cjs/sentry/client.js.map +0 -1
  214. package/build/cjs/sentry/common.js.map +0 -1
  215. package/build/cjs/sentry/index.d.ts +0 -2
  216. package/build/cjs/sentry/index.js.map +0 -1
  217. package/build/cjs/sentry/server.js.map +0 -1
  218. package/build/cjs/server.d.ts +0 -7
  219. package/build/cjs/server.js.map +0 -1
  220. package/build/cjs/types.js.map +0 -1
  221. package/build/esm/adapter-nextjs/api-handlers/fetchGalleries.js +0 -19
  222. package/build/esm/adapter-nextjs/api-handlers/fetchGalleries.js.map +0 -1
  223. package/build/esm/adapter-nextjs/api-handlers/fetchStories.js +0 -29
  224. package/build/esm/adapter-nextjs/api-handlers/fetchStories.js.map +0 -1
  225. package/build/esm/adapter-nextjs/api-handlers/index.js +0 -3
  226. package/build/esm/adapter-nextjs/api-handlers/index.js.map +0 -1
  227. package/build/esm/adapter-nextjs/getNewsroomServerSideProps.js +0 -15
  228. package/build/esm/adapter-nextjs/getNewsroomServerSideProps.js.map +0 -1
  229. package/build/esm/adapter-nextjs/getNewsroomStaticProps.js +0 -15
  230. package/build/esm/adapter-nextjs/getNewsroomStaticProps.js.map +0 -1
  231. package/build/esm/adapter-nextjs/index.js +0 -7
  232. package/build/esm/adapter-nextjs/index.js.map +0 -1
  233. package/build/esm/adapter-nextjs/page-props/category.js +0 -97
  234. package/build/esm/adapter-nextjs/page-props/category.js.map +0 -1
  235. package/build/esm/adapter-nextjs/page-props/gallery.js +0 -66
  236. package/build/esm/adapter-nextjs/page-props/gallery.js.map +0 -1
  237. package/build/esm/adapter-nextjs/page-props/galleryAlbum.js +0 -49
  238. package/build/esm/adapter-nextjs/page-props/galleryAlbum.js.map +0 -1
  239. package/build/esm/adapter-nextjs/page-props/home.js +0 -70
  240. package/build/esm/adapter-nextjs/page-props/home.js.map +0 -1
  241. package/build/esm/adapter-nextjs/page-props/index.js +0 -9
  242. package/build/esm/adapter-nextjs/page-props/index.js.map +0 -1
  243. package/build/esm/adapter-nextjs/page-props/lib/types.js +0 -2
  244. package/build/esm/adapter-nextjs/page-props/lib/types.js.map +0 -1
  245. package/build/esm/adapter-nextjs/page-props/search.js +0 -27
  246. package/build/esm/adapter-nextjs/page-props/search.js.map +0 -1
  247. package/build/esm/adapter-nextjs/page-props/sitemap/SitemapBuilder.js +0 -47
  248. package/build/esm/adapter-nextjs/page-props/sitemap/SitemapBuilder.js.map +0 -1
  249. package/build/esm/adapter-nextjs/page-props/sitemap/createPaths.js +0 -15
  250. package/build/esm/adapter-nextjs/page-props/sitemap/createPaths.js.map +0 -1
  251. package/build/esm/adapter-nextjs/page-props/sitemap/getServerSideProps.js +0 -32
  252. package/build/esm/adapter-nextjs/page-props/sitemap/getServerSideProps.js.map +0 -1
  253. package/build/esm/adapter-nextjs/page-props/sitemap/index.js +0 -5
  254. package/build/esm/adapter-nextjs/page-props/sitemap/index.js.map +0 -1
  255. package/build/esm/adapter-nextjs/page-props/sitemap/types.js +0 -2
  256. package/build/esm/adapter-nextjs/page-props/sitemap/types.js.map +0 -1
  257. package/build/esm/adapter-nextjs/page-props/story.js +0 -63
  258. package/build/esm/adapter-nextjs/page-props/story.js.map +0 -1
  259. package/build/esm/adapter-nextjs/page-props/storyPreview.js +0 -22
  260. package/build/esm/adapter-nextjs/page-props/storyPreview.js.map +0 -1
  261. package/build/esm/adapter-nextjs/processRequest.js +0 -33
  262. package/build/esm/adapter-nextjs/processRequest.js.map +0 -1
  263. package/build/esm/adapter-nextjs/processStaticRequest.js +0 -22
  264. package/build/esm/adapter-nextjs/processStaticRequest.js.map +0 -1
  265. package/build/esm/client.js +0 -8
  266. package/build/esm/client.js.map +0 -1
  267. package/build/esm/components-nextjs/PageSeo/PageSeo.js +0 -78
  268. package/build/esm/components-nextjs/PageSeo/PageSeo.js.map +0 -1
  269. package/build/esm/components-nextjs/PageSeo/index.js +0 -2
  270. package/build/esm/components-nextjs/PageSeo/index.js.map +0 -1
  271. package/build/esm/components-nextjs/PageSeo/lib/getAbsoluteUrl.js +0 -7
  272. package/build/esm/components-nextjs/PageSeo/lib/getAbsoluteUrl.js.map +0 -1
  273. package/build/esm/components-nextjs/PageSeo/lib/index.js +0 -2
  274. package/build/esm/components-nextjs/PageSeo/lib/index.js.map +0 -1
  275. package/build/esm/components-nextjs/StorySeo/StorySeo.js +0 -53
  276. package/build/esm/components-nextjs/StorySeo/StorySeo.js.map +0 -1
  277. package/build/esm/components-nextjs/StorySeo/index.js +0 -2
  278. package/build/esm/components-nextjs/StorySeo/index.js.map +0 -1
  279. package/build/esm/components-nextjs/document.js +0 -22
  280. package/build/esm/components-nextjs/document.js.map +0 -1
  281. package/build/esm/components-nextjs/index.js +0 -4
  282. package/build/esm/components-nextjs/index.js.map +0 -1
  283. package/build/esm/data-fetching/NextPrezlyApi.js +0 -36
  284. package/build/esm/data-fetching/NextPrezlyApi.js.map +0 -1
  285. package/build/esm/data-fetching/getNextPrezlyApi.js +0 -17
  286. package/build/esm/data-fetching/getNextPrezlyApi.js.map +0 -1
  287. package/build/esm/data-fetching/index.js +0 -2
  288. package/build/esm/data-fetching/index.js.map +0 -1
  289. package/build/esm/i18nConfig.cjs +0 -20
  290. package/build/esm/i18nConfig.cjs.map +0 -1
  291. package/build/esm/index.js +0 -9
  292. package/build/esm/index.js.map +0 -1
  293. package/build/esm/infinite-loading/index.js +0 -5
  294. package/build/esm/infinite-loading/index.js.map +0 -1
  295. package/build/esm/infinite-loading/types.js +0 -2
  296. package/build/esm/infinite-loading/types.js.map +0 -1
  297. package/build/esm/infinite-loading/useInfiniteGalleriesLoading.js +0 -41
  298. package/build/esm/infinite-loading/useInfiniteGalleriesLoading.js.map +0 -1
  299. package/build/esm/infinite-loading/useInfiniteLoading.js +0 -40
  300. package/build/esm/infinite-loading/useInfiniteLoading.js.map +0 -1
  301. package/build/esm/infinite-loading/useInfiniteStoriesLoading.js +0 -58
  302. package/build/esm/infinite-loading/useInfiniteStoriesLoading.js.map +0 -1
  303. package/build/esm/intl/index.js +0 -3
  304. package/build/esm/intl/index.js.map +0 -1
  305. package/build/esm/intl/languages.js +0 -26
  306. package/build/esm/intl/languages.js.map +0 -1
  307. package/build/esm/intl/locale.js +0 -25
  308. package/build/esm/intl/locale.js.map +0 -1
  309. package/build/esm/newsroom-context/context.js +0 -26
  310. package/build/esm/newsroom-context/context.js.map +0 -1
  311. package/build/esm/newsroom-context/hooks/index.js +0 -12
  312. package/build/esm/newsroom-context/hooks/index.js.map +0 -1
  313. package/build/esm/newsroom-context/hooks/useAlgoliaSettings.js +0 -6
  314. package/build/esm/newsroom-context/hooks/useAlgoliaSettings.js.map +0 -1
  315. package/build/esm/newsroom-context/hooks/useCategories.js +0 -6
  316. package/build/esm/newsroom-context/hooks/useCategories.js.map +0 -1
  317. package/build/esm/newsroom-context/hooks/useCompanyInformation.js +0 -6
  318. package/build/esm/newsroom-context/hooks/useCompanyInformation.js.map +0 -1
  319. package/build/esm/newsroom-context/hooks/useCurrentCategory.js +0 -6
  320. package/build/esm/newsroom-context/hooks/useCurrentCategory.js.map +0 -1
  321. package/build/esm/newsroom-context/hooks/useCurrentLocale.js +0 -6
  322. package/build/esm/newsroom-context/hooks/useCurrentLocale.js.map +0 -1
  323. package/build/esm/newsroom-context/hooks/useCurrentStory.js +0 -6
  324. package/build/esm/newsroom-context/hooks/useCurrentStory.js.map +0 -1
  325. package/build/esm/newsroom-context/hooks/useGetLinkLocaleSlug.js +0 -25
  326. package/build/esm/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +0 -1
  327. package/build/esm/newsroom-context/hooks/useGetTranslationUrl.js +0 -71
  328. package/build/esm/newsroom-context/hooks/useGetTranslationUrl.js.map +0 -1
  329. package/build/esm/newsroom-context/hooks/useLanguages.js +0 -6
  330. package/build/esm/newsroom-context/hooks/useLanguages.js.map +0 -1
  331. package/build/esm/newsroom-context/hooks/useNewsroom.js +0 -6
  332. package/build/esm/newsroom-context/hooks/useNewsroom.js.map +0 -1
  333. package/build/esm/newsroom-context/hooks/useNewsroomContext.js +0 -12
  334. package/build/esm/newsroom-context/hooks/useNewsroomContext.js.map +0 -1
  335. package/build/esm/newsroom-context/index.js +0 -3
  336. package/build/esm/newsroom-context/index.js.map +0 -1
  337. package/build/esm/sentry/client.js +0 -5
  338. package/build/esm/sentry/client.js.map +0 -1
  339. package/build/esm/sentry/common.js +0 -62
  340. package/build/esm/sentry/index.js +0 -3
  341. package/build/esm/sentry/index.js.map +0 -1
  342. package/build/esm/sentry/server.js +0 -5
  343. package/build/esm/sentry/server.js.map +0 -1
  344. package/build/esm/server.js +0 -8
  345. package/build/esm/server.js.map +0 -1
  346. package/build/esm/types.js +0 -2
  347. package/build/tsconfig.cjs.tsbuildinfo +0 -1
  348. package/build/tsconfig.esm.tsbuildinfo +0 -1
  349. package/build/types/adapter-nextjs/api-handlers/fetchGalleries.d.ts +0 -2
  350. package/build/types/adapter-nextjs/api-handlers/fetchStories.d.ts +0 -2
  351. package/build/types/adapter-nextjs/api-handlers/index.d.ts +0 -2
  352. package/build/types/adapter-nextjs/getNewsroomServerSideProps.d.ts +0 -15
  353. package/build/types/adapter-nextjs/getNewsroomStaticProps.d.ts +0 -15
  354. package/build/types/adapter-nextjs/index.d.ts +0 -6
  355. package/build/types/adapter-nextjs/page-props/category.d.ts +0 -16
  356. package/build/types/adapter-nextjs/page-props/gallery.d.ts +0 -14
  357. package/build/types/adapter-nextjs/page-props/galleryAlbum.d.ts +0 -9
  358. package/build/types/adapter-nextjs/page-props/home.d.ts +0 -22
  359. package/build/types/adapter-nextjs/page-props/lib/types.d.ts +0 -3
  360. package/build/types/adapter-nextjs/page-props/search.d.ts +0 -4
  361. package/build/types/adapter-nextjs/page-props/sitemap/SitemapBuilder.d.ts +0 -11
  362. package/build/types/adapter-nextjs/page-props/sitemap/createPaths.d.ts +0 -2
  363. package/build/types/adapter-nextjs/page-props/sitemap/getServerSideProps.d.ts +0 -7
  364. package/build/types/adapter-nextjs/page-props/sitemap/index.d.ts +0 -4
  365. package/build/types/adapter-nextjs/page-props/sitemap/types.d.ts +0 -5
  366. package/build/types/adapter-nextjs/page-props/story.d.ts +0 -14
  367. package/build/types/adapter-nextjs/page-props/storyPreview.d.ts +0 -3
  368. package/build/types/adapter-nextjs/processRequest.d.ts +0 -12
  369. package/build/types/adapter-nextjs/processStaticRequest.d.ts +0 -11
  370. package/build/types/client.d.ts +0 -7
  371. package/build/types/components-nextjs/PageSeo/PageSeo.d.ts +0 -12
  372. package/build/types/components-nextjs/PageSeo/index.d.ts +0 -1
  373. package/build/types/components-nextjs/PageSeo/lib/getAbsoluteUrl.d.ts +0 -1
  374. package/build/types/components-nextjs/PageSeo/lib/index.d.ts +0 -1
  375. package/build/types/components-nextjs/StorySeo/StorySeo.d.ts +0 -12
  376. package/build/types/components-nextjs/StorySeo/index.d.ts +0 -1
  377. package/build/types/components-nextjs/index.d.ts +0 -3
  378. package/build/types/data-fetching/NextPrezlyApi.d.ts +0 -8
  379. package/build/types/data-fetching/getNextPrezlyApi.d.ts +0 -4
  380. package/build/types/data-fetching/index.d.ts +0 -1
  381. package/build/types/i18nConfig.d.cts +0 -3
  382. package/build/types/index.d.ts +0 -8
  383. package/build/types/infinite-loading/index.d.ts +0 -4
  384. package/build/types/infinite-loading/types.d.ts +0 -9
  385. package/build/types/infinite-loading/useInfiniteGalleriesLoading.d.ts +0 -13
  386. package/build/types/infinite-loading/useInfiniteLoading.d.ts +0 -16
  387. package/build/types/infinite-loading/useInfiniteStoriesLoading.d.ts +0 -13
  388. package/build/types/intl/index.d.ts +0 -2
  389. package/build/types/intl/languages.d.ts +0 -6
  390. package/build/types/intl/locale.d.ts +0 -5
  391. package/build/types/newsroom-context/context.d.ts +0 -62
  392. package/build/types/newsroom-context/hooks/index.d.ts +0 -11
  393. package/build/types/newsroom-context/hooks/useAlgoliaSettings.d.ts +0 -1
  394. package/build/types/newsroom-context/hooks/useCategories.d.ts +0 -1
  395. package/build/types/newsroom-context/hooks/useCompanyInformation.d.ts +0 -1
  396. package/build/types/newsroom-context/hooks/useCurrentCategory.d.ts +0 -1
  397. package/build/types/newsroom-context/hooks/useCurrentLocale.d.ts +0 -1
  398. package/build/types/newsroom-context/hooks/useCurrentStory.d.ts +0 -1
  399. package/build/types/newsroom-context/hooks/useGetLinkLocaleSlug.d.ts +0 -2
  400. package/build/types/newsroom-context/hooks/useGetTranslationUrl.d.ts +0 -6
  401. package/build/types/newsroom-context/hooks/useLanguages.d.ts +0 -1
  402. package/build/types/newsroom-context/hooks/useNewsroom.d.ts +0 -1
  403. package/build/types/newsroom-context/hooks/useNewsroomContext.d.ts +0 -2
  404. package/build/types/newsroom-context/index.d.ts +0 -2
  405. package/build/types/sentry/client.d.ts +0 -2
  406. package/build/types/sentry/common.d.ts +0 -2
  407. package/build/types/sentry/index.d.ts +0 -2
  408. package/build/types/sentry/server.d.ts +0 -2
  409. package/build/types/server.d.ts +0 -7
  410. package/build/types/types.d.ts +0 -14
  411. /package/build/{cjs/adapter-nextjs → adapter-nextjs}/api-handlers/fetchGalleries.d.ts +0 -0
  412. /package/build/{cjs/adapter-nextjs → adapter-nextjs}/api-handlers/fetchStories.d.ts +0 -0
  413. /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/category.d.ts +0 -0
  414. /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/gallery.d.ts +0 -0
  415. /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/galleryAlbum.d.ts +0 -0
  416. /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/home.d.ts +0 -0
  417. /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/lib/types.d.ts +0 -0
  418. /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/lib/types.js +0 -0
  419. /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/search.d.ts +0 -0
  420. /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/SitemapBuilder.d.ts +0 -0
  421. /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/SitemapBuilder.js +0 -0
  422. /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/createPaths.d.ts +0 -0
  423. /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/createPaths.js +0 -0
  424. /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/getServerSideProps.d.ts +0 -0
  425. /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/types.d.ts +0 -0
  426. /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/sitemap/types.js +0 -0
  427. /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/story.d.ts +0 -0
  428. /package/build/{cjs/adapter-nextjs → adapter-nextjs}/page-props/storyPreview.d.ts +0 -0
  429. /package/build/{cjs/adapter-nextjs → adapter-nextjs}/processRequest.d.ts +0 -0
  430. /package/build/{cjs/adapter-nextjs → adapter-nextjs}/processStaticRequest.d.ts +0 -0
  431. /package/build/{cjs/adapter-nextjs → adapter-nextjs}/processStaticRequest.js +0 -0
  432. /package/build/{cjs/components-nextjs → components-nextjs}/PageSeo/PageSeo.d.ts +0 -0
  433. /package/build/{cjs/components-nextjs → components-nextjs}/PageSeo/lib/getAbsoluteUrl.d.ts +0 -0
  434. /package/build/{cjs/components-nextjs → components-nextjs}/PageSeo/lib/getAbsoluteUrl.js +0 -0
  435. /package/build/{cjs/components-nextjs → components-nextjs}/StorySeo/StorySeo.d.ts +0 -0
  436. /package/build/{cjs/data-fetching → data-fetching}/NextPrezlyApi.d.ts +0 -0
  437. /package/build/{cjs/infinite-loading → infinite-loading}/types.d.ts +0 -0
  438. /package/build/{cjs/infinite-loading → infinite-loading}/types.js +0 -0
  439. /package/build/{cjs/infinite-loading → infinite-loading}/useInfiniteGalleriesLoading.d.ts +0 -0
  440. /package/build/{cjs/infinite-loading → infinite-loading}/useInfiniteLoading.d.ts +0 -0
  441. /package/build/{cjs/infinite-loading → infinite-loading}/useInfiniteLoading.js +0 -0
  442. /package/build/{cjs/infinite-loading → infinite-loading}/useInfiniteStoriesLoading.d.ts +0 -0
  443. /package/build/{cjs/intl → intl}/languages.d.ts +0 -0
  444. /package/build/{cjs/intl → intl}/locale.d.ts +0 -0
  445. /package/build/{cjs/intl → intl}/locale.js +0 -0
  446. /package/build/{cjs/newsroom-context → newsroom-context}/context.d.ts +0 -0
  447. /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useAlgoliaSettings.d.ts +0 -0
  448. /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCategories.d.ts +0 -0
  449. /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCompanyInformation.d.ts +0 -0
  450. /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCurrentCategory.d.ts +0 -0
  451. /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCurrentLocale.d.ts +0 -0
  452. /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useCurrentStory.d.ts +0 -0
  453. /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useGetLinkLocaleSlug.d.ts +0 -0
  454. /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useGetTranslationUrl.d.ts +0 -0
  455. /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useLanguages.d.ts +0 -0
  456. /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useNewsroom.d.ts +0 -0
  457. /package/build/{cjs/newsroom-context → newsroom-context}/hooks/useNewsroomContext.d.ts +0 -0
  458. /package/build/{cjs/sentry → sentry}/client.d.ts +0 -0
  459. /package/build/{cjs/sentry → sentry}/common.d.ts +0 -0
  460. /package/build/{cjs/sentry → sentry}/common.js +0 -0
  461. /package/build/{cjs/sentry → sentry}/server.d.ts +0 -0
  462. /package/build/{cjs/types.js → types.js} +0 -0
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getSitemapServerSideProps = void 0;
4
- const index_js_1 = require("../../../data-fetching/index.js");
5
- const createPaths_js_1 = require("./createPaths.js");
6
- const SitemapBuilder_js_1 = require("./SitemapBuilder.js");
4
+ const data_fetching_1 = require("../../../data-fetching");
5
+ const createPaths_1 = require("./createPaths");
6
+ const SitemapBuilder_1 = require("./SitemapBuilder");
7
7
  function getSitemapServerSideProps(options = {}) {
8
8
  return async function getServerSideProps(ctx) {
9
9
  const { res, req } = ctx;
@@ -14,13 +14,13 @@ function getSitemapServerSideProps(options = {}) {
14
14
  };
15
15
  }
16
16
  const baseUrl = req.headers.host || '/';
17
- const api = (0, index_js_1.getNextPrezlyApi)(req);
17
+ const api = (0, data_fetching_1.getNextPrezlyApi)(req);
18
18
  const stories = await api.getAllStories({
19
19
  pinning: options.pinning ?? false,
20
20
  });
21
21
  const categories = await api.getCategories();
22
- const paths = (0, createPaths_js_1.createPaths)(stories, categories);
23
- const sitemapBuilder = new SitemapBuilder_js_1.SitemapBuilder(baseUrl);
22
+ const paths = (0, createPaths_1.createPaths)(stories, categories);
23
+ const sitemapBuilder = new SitemapBuilder_1.SitemapBuilder(baseUrl);
24
24
  sitemapBuilder.addUrl('/');
25
25
  paths.forEach((path) => sitemapBuilder.addUrl(path));
26
26
  options.additionalPaths?.forEach((path) => sitemapBuilder.addUrl(path));
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getServerSideProps.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/page-props/sitemap/getServerSideProps.ts"],"names":[],"mappings":";;;AAEA,0DAA0D;AAE1D,+CAA4C;AAC5C,qDAAkD;AAElD,SAAgB,yBAAyB,CACrC,UAA6D,EAAE;IAE/D,OAAO,KAAK,UAAU,kBAAkB,CAAC,GAAoB;QACzD,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;QAEzB,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE;YACd,cAAc;YACd,OAAO;gBACH,KAAK,EAAE,EAAE;aACZ,CAAC;SACL;QAED,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,GAAG,CAAC;QAExC,MAAM,GAAG,GAAG,IAAA,gCAAgB,EAAC,GAAG,CAAC,CAAC;QAClC,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,aAAa,CAAC;YACpC,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,KAAK;SACpC,CAAC,CAAC;QACH,MAAM,UAAU,GAAG,MAAM,GAAG,CAAC,aAAa,EAAE,CAAC;QAE7C,MAAM,KAAK,GAAG,IAAA,yBAAW,EAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAC/C,MAAM,cAAc,GAAG,IAAI,+BAAc,CAAC,OAAO,CAAC,CAAC;QAEnD,cAAc,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC3B,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAErD,OAAO,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAExE,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;QAC1C,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,EAAE,CAAC,CAAC;QACtC,GAAG,CAAC,GAAG,EAAE,CAAC;QAEV,OAAO;YACH,KAAK,EAAE,EAAE;SACZ,CAAC;IACN,CAAC,CAAC;AACN,CAAC;AArCD,8DAqCC"}
@@ -0,0 +1,4 @@
1
+ export { getSitemapServerSideProps } from './getServerSideProps';
2
+ export { SitemapBuilder } from './SitemapBuilder';
3
+ export { createPaths } from './createPaths';
4
+ export * from './types';
@@ -15,11 +15,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.createPaths = exports.SitemapBuilder = exports.getSitemapServerSideProps = void 0;
18
- var getServerSideProps_js_1 = require("./getServerSideProps.js");
19
- Object.defineProperty(exports, "getSitemapServerSideProps", { enumerable: true, get: function () { return getServerSideProps_js_1.getSitemapServerSideProps; } });
20
- var SitemapBuilder_js_1 = require("./SitemapBuilder.js");
21
- Object.defineProperty(exports, "SitemapBuilder", { enumerable: true, get: function () { return SitemapBuilder_js_1.SitemapBuilder; } });
22
- var createPaths_js_1 = require("./createPaths.js");
23
- Object.defineProperty(exports, "createPaths", { enumerable: true, get: function () { return createPaths_js_1.createPaths; } });
24
- __exportStar(require("./types.js"), exports);
18
+ var getServerSideProps_1 = require("./getServerSideProps");
19
+ Object.defineProperty(exports, "getSitemapServerSideProps", { enumerable: true, get: function () { return getServerSideProps_1.getSitemapServerSideProps; } });
20
+ var SitemapBuilder_1 = require("./SitemapBuilder");
21
+ Object.defineProperty(exports, "SitemapBuilder", { enumerable: true, get: function () { return SitemapBuilder_1.SitemapBuilder; } });
22
+ var createPaths_1 = require("./createPaths");
23
+ Object.defineProperty(exports, "createPaths", { enumerable: true, get: function () { return createPaths_1.createPaths; } });
24
+ __exportStar(require("./types"), exports);
25
25
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/page-props/sitemap/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2DAAiE;AAAxD,+HAAA,yBAAyB,OAAA;AAElC,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,0CAAwB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/page-props/sitemap/types.ts"],"names":[],"mappings":""}
@@ -1,23 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getStoryPageStaticPaths = exports.getStoryPageStaticProps = exports.getStoryPageServerSideProps = void 0;
4
- const index_js_1 = require("../../data-fetching/index.js");
5
- const index_js_2 = require("../../intl/index.js");
6
- const getNewsroomServerSideProps_js_1 = require("../getNewsroomServerSideProps.js");
7
- const getNewsroomStaticProps_js_1 = require("../getNewsroomStaticProps.js");
8
- const processRequest_js_1 = require("../processRequest.js");
9
- const processStaticRequest_js_1 = require("../processStaticRequest.js");
4
+ const data_fetching_1 = require("../../data-fetching");
5
+ const intl_1 = require("../../intl");
6
+ const getNewsroomServerSideProps_1 = require("../getNewsroomServerSideProps");
7
+ const getNewsroomStaticProps_1 = require("../getNewsroomStaticProps");
8
+ const processRequest_1 = require("../processRequest");
9
+ const processStaticRequest_1 = require("../processStaticRequest");
10
10
  function getStoryPageServerSideProps(customProps) {
11
11
  return async function getServerSideProps(context) {
12
- const api = (0, index_js_1.getNextPrezlyApi)(context.req);
12
+ const api = (0, data_fetching_1.getNextPrezlyApi)(context.req);
13
13
  const { slug } = context.params;
14
14
  const story = slug ? await api.getStoryBySlug(slug) : null;
15
15
  if (!story) {
16
16
  return { notFound: true };
17
17
  }
18
- const { serverSideProps } = await (0, getNewsroomServerSideProps_js_1.getNewsroomServerSideProps)(context, { story });
18
+ const { serverSideProps } = await (0, getNewsroomServerSideProps_1.getNewsroomServerSideProps)(context, { story });
19
19
  const { locale } = context;
20
- if (locale && locale !== index_js_2.DUMMY_DEFAULT_LOCALE) {
20
+ if (locale && locale !== intl_1.DUMMY_DEFAULT_LOCALE) {
21
21
  return {
22
22
  redirect: {
23
23
  destination: `/${slug}`,
@@ -26,7 +26,7 @@ function getStoryPageServerSideProps(customProps) {
26
26
  };
27
27
  }
28
28
  serverSideProps.newsroomContextProps.currentStory = story;
29
- return (0, processRequest_js_1.processRequest)(context, {
29
+ return (0, processRequest_1.processRequest)(context, {
30
30
  ...serverSideProps,
31
31
  ...(typeof customProps === 'function'
32
32
  ? await customProps(context, serverSideProps)
@@ -37,15 +37,15 @@ function getStoryPageServerSideProps(customProps) {
37
37
  exports.getStoryPageServerSideProps = getStoryPageServerSideProps;
38
38
  function getStoryPageStaticProps(customProps) {
39
39
  return async function getStaticProps(context) {
40
- const api = (0, index_js_1.getNextPrezlyApi)();
40
+ const api = (0, data_fetching_1.getNextPrezlyApi)();
41
41
  const { slug } = context.params;
42
42
  const story = slug ? await api.getStoryBySlug(slug) : null;
43
43
  if (!story) {
44
44
  return { notFound: true };
45
45
  }
46
- const { staticProps } = await (0, getNewsroomStaticProps_js_1.getNewsroomStaticProps)(context, { story });
46
+ const { staticProps } = await (0, getNewsroomStaticProps_1.getNewsroomStaticProps)(context, { story });
47
47
  staticProps.newsroomContextProps.currentStory = story;
48
- return (0, processStaticRequest_js_1.processStaticRequest)(context, {
48
+ return (0, processStaticRequest_1.processStaticRequest)(context, {
49
49
  ...staticProps,
50
50
  ...(typeof customProps === 'function'
51
51
  ? await customProps(context, staticProps)
@@ -55,7 +55,7 @@ function getStoryPageStaticProps(customProps) {
55
55
  }
56
56
  exports.getStoryPageStaticProps = getStoryPageStaticProps;
57
57
  async function getStoryPageStaticPaths(options = {}) {
58
- const api = (0, index_js_1.getNextPrezlyApi)();
58
+ const api = (0, data_fetching_1.getNextPrezlyApi)();
59
59
  const stories = await api.getAllStories({
60
60
  pinning: options.pinning ?? false,
61
61
  });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"story.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/story.ts"],"names":[],"mappings":";;;AAOA,uDAAuD;AACvD,qCAAkD;AAClD,8EAA2E;AAC3E,sEAAmE;AACnE,sDAAmD;AACnD,kEAA+D;AAI/D,SAAgB,2BAA2B,CACvC,WAAqD;IAErD,OAAO,KAAK,UAAU,kBAAkB,CACpC,OAAkC;QAElC,MAAM,GAAG,GAAG,IAAA,gCAAgB,EAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAE1C,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,MAA2B,CAAC;QACrD,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC3D,IAAI,CAAC,KAAK,EAAE;YACR,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;SAC7B;QAED,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,IAAA,uDAA0B,EAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAEjF,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAC3B,IAAI,MAAM,IAAI,MAAM,KAAK,2BAAoB,EAAE;YAC3C,OAAO;gBACH,QAAQ,EAAE;oBACN,WAAW,EAAE,IAAI,IAAI,EAAE;oBACvB,SAAS,EAAE,IAAI;iBAClB;aACJ,CAAC;SACL;QAED,eAAe,CAAC,oBAAoB,CAAC,YAAY,GAAG,KAAK,CAAC;QAE1D,OAAO,IAAA,+BAAc,EAAC,OAAO,EAAE;YAC3B,GAAG,eAAe;YAClB,GAAG,CAAC,OAAO,WAAW,KAAK,UAAU;gBACjC,CAAC,CAAC,MAAO,WAA0C,CAAC,OAAO,EAAE,eAAe,CAAC;gBAC7E,CAAC,CAAC,WAAW,CAAC;SACrB,CAAC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AAC,CAAC;IAEhE,OAAO;QACH,KAAK;QACL,QAAQ,EAAE,UAAU;KACvB,CAAC;AACN,CAAC;AAZD,0DAYC"}
@@ -1,20 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getStoryPreviewPageServerSideProps = void 0;
4
- const index_js_1 = require("../../data-fetching/index.js");
5
- const getNewsroomServerSideProps_js_1 = require("../getNewsroomServerSideProps.js");
6
- const processRequest_js_1 = require("../processRequest.js");
4
+ const data_fetching_1 = require("../../data-fetching");
5
+ const getNewsroomServerSideProps_1 = require("../getNewsroomServerSideProps");
6
+ const processRequest_1 = require("../processRequest");
7
7
  function getStoryPreviewPageServerSideProps(customProps) {
8
8
  return async function getServerSideProps(context) {
9
- const api = (0, index_js_1.getNextPrezlyApi)(context.req);
9
+ const api = (0, data_fetching_1.getNextPrezlyApi)(context.req);
10
10
  const { uuid } = context.params;
11
11
  const story = await api.getStory(uuid);
12
12
  if (!story) {
13
13
  return { notFound: true };
14
14
  }
15
- const { serverSideProps } = await (0, getNewsroomServerSideProps_js_1.getNewsroomServerSideProps)(context, { story });
15
+ const { serverSideProps } = await (0, getNewsroomServerSideProps_1.getNewsroomServerSideProps)(context, { story });
16
16
  serverSideProps.newsroomContextProps.currentStory = story;
17
- return (0, processRequest_js_1.processRequest)(context, {
17
+ return (0, processRequest_1.processRequest)(context, {
18
18
  ...serverSideProps,
19
19
  ...(typeof customProps === 'function'
20
20
  ? await customProps(context, serverSideProps)
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storyPreview.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/storyPreview.ts"],"names":[],"mappings":";;;AAEA,uDAAuD;AACvD,8EAA2E;AAC3E,sDAAmD;AAInD,SAAgB,kCAAkC,CAC9C,WAAqD;IAErD,OAAO,KAAK,UAAU,kBAAkB,CACpC,OAAkC;QAElC,MAAM,GAAG,GAAG,IAAA,gCAAgB,EAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC1C,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,MAA0B,CAAC;QACpD,MAAM,KAAK,GAAG,MAAM,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,KAAK,EAAE;YACR,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;SAC7B;QAED,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,IAAA,uDAA0B,EAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAEjF,eAAe,CAAC,oBAAoB,CAAC,YAAY,GAAG,KAAK,CAAC;QAE1D,OAAO,IAAA,+BAAc,EAAC,OAAO,EAAE;YAC3B,GAAG,eAAe;YAClB,GAAG,CAAC,OAAO,WAAW,KAAK,UAAU;gBACjC,CAAC,CAAC,MAAO,WAA0C,CAAC,OAAO,EAAE,eAAe,CAAC;gBAC7E,CAAC,CAAC,WAAW,CAAC;SACrB,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC;AAxBD,gFAwBC"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.processRequest = void 0;
4
4
  const theme_kit_core_1 = require("@prezly/theme-kit-core");
5
- const index_js_1 = require("../intl/index.js");
5
+ const intl_1 = require("../intl");
6
6
  /**
7
7
  * This function combines the props returned from `getNewsroomServerSideProps` and your optional custom props for the page.
8
8
  * It also handles locale redirects, if `canonicalUrl` parameter is provided.
@@ -24,7 +24,7 @@ function processRequest(context, props, canonicalUrl) {
24
24
  const { languages, localeCode } = pageProps.newsroomContextProps;
25
25
  const currentLocale = theme_kit_core_1.LocaleObject.fromAnyCode(localeCode);
26
26
  const shortestLocaleCode = (0, theme_kit_core_1.getShortestLocaleCode)(languages, currentLocale);
27
- const redirect = (0, index_js_1.getRedirectToCanonicalLocale)(shortestLocaleCode, nextLocale, canonicalUrl, query);
27
+ const redirect = (0, intl_1.getRedirectToCanonicalLocale)(shortestLocaleCode, nextLocale, canonicalUrl, query);
28
28
  if (redirect) {
29
29
  return { redirect };
30
30
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processRequest.js","sourceRoot":"","sources":["../../src/adapter-nextjs/processRequest.ts"],"names":[],"mappings":";;;AAAA,2DAA6E;AAG7E,kCAAuD;AAGvD;;;;;;;;GAQG;AACH,SAAgB,cAAc,CAC1B,OAAkC,EAClC,KAA8C,EAC9C,YAAqB;IAErB,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IAE9C,MAAM,EAAE,cAAc,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAE/C,2GAA2G;IAC3G,uCAAuC;IACvC,IAAI,CAAC,cAAc,IAAI,UAAU,EAAE;QAC/B,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;KAC7B;IAED,IAAI,YAAY,EAAE;QACd,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,SAAS,CAAC,oBAAoB,CAAC;QACjE,MAAM,aAAa,GAAG,6BAAY,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAC3D,MAAM,kBAAkB,GAAG,IAAA,sCAAqB,EAAC,SAAS,EAAE,aAAa,CAAC,CAAC;QAE3E,MAAM,QAAQ,GAAG,IAAA,mCAA4B,EACzC,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,KAAK,CACR,CAAC;QACF,IAAI,QAAQ,EAAE;YACV,OAAO,EAAE,QAAQ,EAAE,CAAC;SACvB;KACJ;IAED,OAAO;QACH,KAAK,EAAE,SAA8B;KACxC,CAAC;AACN,CAAC;AAlCD,wCAkCC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processStaticRequest.js","sourceRoot":"","sources":["../../src/adapter-nextjs/processStaticRequest.ts"],"names":[],"mappings":";;;AAIA;;;;;;;GAOG;AACH,SAAgB,oBAAoB,CAChC,OAA8B,EAC9B,KAA8C,EAC9C,iBAA0B;IAE1B,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IAEvC,MAAM,EAAE,cAAc,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAE/C,2GAA2G;IAC3G,uCAAuC;IACvC,IAAI,CAAC,cAAc,IAAI,UAAU,EAAE;QAC/B,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;KAC7B;IAED,OAAO;QACH,KAAK,EAAE,SAA8B;QACrC,UAAU,EAAE,iBAAiB;KAChC,CAAC;AACN,CAAC;AAnBD,oDAmBC"}
@@ -1,28 +1,27 @@
1
1
  "use strict";
2
- 'use client';
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.PageSeo = void 0;
5
4
  const jsx_runtime_1 = require("react/jsx-runtime");
6
5
  const theme_kit_core_1 = require("@prezly/theme-kit-core");
7
- const router_js_1 = require("next/router.js");
6
+ const router_1 = require("next/router");
8
7
  const next_seo_1 = require("next-seo");
9
8
  const react_1 = require("react");
10
- const index_js_1 = require("../../newsroom-context/index.js");
11
- const index_js_2 = require("./lib/index.js");
9
+ const newsroom_context_1 = require("../../newsroom-context");
10
+ const lib_1 = require("./lib");
12
11
  /**
13
12
  * This component provides base page attributes for every Newsroom page.
14
13
  * It depends on information from NewsroomContext, so the component should be placed inside the `NewsroomContextProvider`.
15
14
  * You can pass additional props expected by NextSeo component to override any info that is provided by the NewsroomContext.
16
15
  */
17
16
  function PageSeo({ title, description, imageUrl, canonical, openGraph, twitter, ...nextSeoProps }) {
18
- const companyInformation = (0, index_js_1.useCompanyInformation)();
19
- const site = (0, index_js_1.useNewsroom)();
20
- const currentLocale = (0, index_js_1.useCurrentLocale)();
21
- const languages = (0, index_js_1.useLanguages)();
22
- const getTranslationUrl = (0, index_js_1.useGetTranslationUrl)();
23
- const getLinkLocaleSlug = (0, index_js_1.useGetLinkLocaleSlug)();
24
- const currentStory = (0, index_js_1.useCurrentStory)();
25
- const { asPath } = (0, router_js_1.useRouter)();
17
+ const companyInformation = (0, newsroom_context_1.useCompanyInformation)();
18
+ const site = (0, newsroom_context_1.useNewsroom)();
19
+ const currentLocale = (0, newsroom_context_1.useCurrentLocale)();
20
+ const languages = (0, newsroom_context_1.useLanguages)();
21
+ const getTranslationUrl = (0, newsroom_context_1.useGetTranslationUrl)();
22
+ const getLinkLocaleSlug = (0, newsroom_context_1.useGetLinkLocaleSlug)();
23
+ const currentStory = (0, newsroom_context_1.useCurrentStory)();
24
+ const { asPath } = (0, router_1.useRouter)();
26
25
  const pageTitle = companyInformation.seo_settings.meta_title ||
27
26
  companyInformation.seo_settings.default_meta_title ||
28
27
  title ||
@@ -31,7 +30,7 @@ function PageSeo({ title, description, imageUrl, canonical, openGraph, twitter,
31
30
  companyInformation.seo_settings.default_meta_description ||
32
31
  description ||
33
32
  companyInformation.about_plaintext;
34
- const canonicalUrl = canonical || (0, index_js_2.getAbsoluteUrl)(asPath, site.url, getLinkLocaleSlug(currentLocale));
33
+ const canonicalUrl = canonical || (0, lib_1.getAbsoluteUrl)(asPath, site.url, getLinkLocaleSlug(currentLocale));
35
34
  const siteName = companyInformation.name;
36
35
  const logoUrl = imageUrl || (0, theme_kit_core_1.getNewsroomLogoUrl)(site);
37
36
  const alternateLanguageLinks = (0, react_1.useMemo)(() => {
@@ -44,7 +43,7 @@ function PageSeo({ title, description, imageUrl, canonical, openGraph, twitter,
44
43
  if (!translationUrl) {
45
44
  return undefined;
46
45
  }
47
- return (0, index_js_2.getAbsoluteUrl)(translationUrl, site.url, currentStory && translationUrl !== '/' ? false : getLinkLocaleSlug(locale));
46
+ return (0, lib_1.getAbsoluteUrl)(translationUrl, site.url, currentStory && translationUrl !== '/' ? false : getLinkLocaleSlug(locale));
48
47
  });
49
48
  }, [currentStory, getLinkLocaleSlug, getTranslationUrl, languages, site.url]);
50
49
  return ((0, jsx_runtime_1.jsx)(next_seo_1.NextSeo, { title: pageTitle, description: pageDescription, canonical: canonicalUrl, noindex: nextSeoProps.noindex ?? !site.is_indexable, nofollow: nextSeoProps.nofollow ?? !site.is_indexable, openGraph: {
@@ -74,7 +73,7 @@ function PageSeo({ title, description, imageUrl, canonical, openGraph, twitter,
74
73
  {
75
74
  rel: 'alternate',
76
75
  type: 'application/rss+xml',
77
- href: (0, index_js_2.getAbsoluteUrl)('/feed', site.url),
76
+ href: (0, lib_1.getAbsoluteUrl)('/feed', site.url),
78
77
  },
79
78
  ], languageAlternates: alternateLanguageLinks, ...nextSeoProps }));
80
79
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageSeo.js","sourceRoot":"","sources":["../../../src/components-nextjs/PageSeo/PageSeo.tsx"],"names":[],"mappings":";;;;AAAA,2DAIgC;AAEhC,wCAAwC;AACxC,uCAAmC;AAEnC,iCAAgC;AAEhC,6DAQgC;AAEhC,+BAAuC;AAMvC;;;;GAIG;AACH,SAAgB,OAAO,CAAC,EACpB,KAAK,EACL,WAAW,EACX,QAAQ,EACR,SAAS,EACT,SAAS,EACT,OAAO,EACP,GAAG,YAAY,EACX;IACJ,MAAM,kBAAkB,GAAG,IAAA,wCAAqB,GAAE,CAAC;IACnD,MAAM,IAAI,GAAG,IAAA,8BAAW,GAAE,CAAC;IAC3B,MAAM,aAAa,GAAG,IAAA,mCAAgB,GAAE,CAAC;IACzC,MAAM,SAAS,GAAG,IAAA,+BAAY,GAAE,CAAC;IACjC,MAAM,iBAAiB,GAAG,IAAA,uCAAoB,GAAE,CAAC;IACjD,MAAM,iBAAiB,GAAG,IAAA,uCAAoB,GAAE,CAAC;IACjD,MAAM,YAAY,GAAG,IAAA,kCAAe,GAAE,CAAC;IACvC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,kBAAS,GAAE,CAAC;IAE/B,MAAM,SAAS,GACX,kBAAkB,CAAC,YAAY,CAAC,UAAU;QAC1C,kBAAkB,CAAC,YAAY,CAAC,kBAAkB;QAClD,KAAK;QACL,kBAAkB,CAAC,IAAI,CAAC;IAC5B,MAAM,eAAe,GACjB,kBAAkB,CAA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AQ,EAAE,YAAY,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,YAAY,EACrD,SAAS,EAAE;YACP,GAAG,EAAE,YAAY;YACjB,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,eAAe;YAC5B,MAAM,EAAE,aAAa,CAAC,gBAAgB,EAAE;YACxC,MAAM,EAAE;gBACJ;oBACI,GAAG,EAAE,OAAO;oBACZ,GAAG,EAAE,SAAS;iBACjB;aACJ;YACD,SAAS,EAAE,QAAQ;YACnB,GAAG,SAAS;SACf,EACD,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,GAAG,OAAO;SACb,EACD,kBAAkB,EAAE;YAChB,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,OAAO,EAAE;YAC3C,IAAI,CAAC,yBAAyB,IAAI;gBAC9B,IAAI,EAAE,0BAA0B;gBAChC,OAAO,EAAE,IAAI,CAAC,yBAAyB;aAC1C;SACJ,CAAC,MAAM,CAAC,CAAC,GAAG,EAA6C,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAC1E,kBAAkB,EAAE;YAChB;gBACI,GAAG,EAAE,WAAW;gBAChB,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,IAAA,oBAAc,EAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC;aAC1C;SACJ,EACD,kBAAkB,EAAE,sBAAsB,KACtC,YAAY,GAClB,CACL,CAAC;AACN,CAAC;AAnGD,0BAmGC"}
@@ -0,0 +1 @@
1
+ export { PageSeo } from './PageSeo';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PageSeo = void 0;
4
- var PageSeo_js_1 = require("./PageSeo.js");
5
- Object.defineProperty(exports, "PageSeo", { enumerable: true, get: function () { return PageSeo_js_1.PageSeo; } });
4
+ var PageSeo_1 = require("./PageSeo");
5
+ Object.defineProperty(exports, "PageSeo", { enumerable: true, get: function () { return PageSeo_1.PageSeo; } });
6
6
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components-nextjs/PageSeo/index.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AAA3B,kGAAA,OAAO,OAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAbsoluteUrl.js","sourceRoot":"","sources":["../../../../src/components-nextjs/PageSeo/lib/getAbsoluteUrl.ts"],"names":[],"mappings":";;;AAAA,0EAA0E;AAC1E,SAAgB,cAAc,CAAC,IAAY,EAAE,MAAc,EAAE,UAA2B;IACpF,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,IAAI,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC;IACnF,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;IAEhB,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AAC1B,CAAC;AALD,wCAKC"}
@@ -0,0 +1 @@
1
+ export { getAbsoluteUrl } from './getAbsoluteUrl';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAbsoluteUrl = void 0;
4
- var getAbsoluteUrl_js_1 = require("./getAbsoluteUrl.js");
5
- Object.defineProperty(exports, "getAbsoluteUrl", { enumerable: true, get: function () { return getAbsoluteUrl_js_1.getAbsoluteUrl; } });
4
+ var getAbsoluteUrl_1 = require("./getAbsoluteUrl");
5
+ Object.defineProperty(exports, "getAbsoluteUrl", { enumerable: true, get: function () { return getAbsoluteUrl_1.getAbsoluteUrl; } });
6
6
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components-nextjs/PageSeo/lib/index.ts"],"names":[],"mappings":";;;AAAA,mDAAkD;AAAzC,gHAAA,cAAc,OAAA"}
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- 'use client';
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.StorySeo = void 0;
5
4
  const jsx_runtime_1 = require("react/jsx-runtime");
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StorySeo.js","sourceRoot":"","sources":["../../../src/components-nextjs/StorySeo/StorySeo.tsx"],"names":[],"mappings":";;;;AACA,qCAAoC;AACpC,uCAAkD;AAOlD;;;GAGG;AACH,SAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,OAAO,EAAS;IAC9C,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAE/F,MAAM,UAAU,GAAG,MAAM,EAAE,YAAY,IAAI,MAAM,EAAE,KAAK,IAAI,SAAS,CAAC;IACtE,MAAM,QAAQ,GACV,KAAK,CAAC,YAAY,CAAC,UAAU,IAAI,KAAK,CAAC,YAAY,CAAC,kBAAkB,IAAI,KAAK,CAAC;IACpF,MAAM,cAAc,GAChB,KAAK,CAAC,YAAY,CAAC,gBAAgB;QACnC,KAAK,CAAC,YAAY,CAAC,wBAAwB;QAC3C,QAAQ;QACR,OAAO,CAAC;IACZ,MAAM,SAAS,GAAG,KAAK,CAAC,YAAY,CAAC,aAAa,IAAI,MAAM,CAAC,GAAG,CAAC;IACjE,MAAM,SAAS,GAAG,QAAQ,CAAC,YAAY,IAAI,KAAK,CAAC,UAAU,KAAK,WAAK,CAAC,UAAU,CAAC,MAAM,CAAC;IAExF,OAAO,CACH,6DACI,uBAAC,kBAAO,IACJ,KAAK,EAAE,QAAQ,EACf,WAAW,EAAE,cAAc,EAC3B,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,IAAI,CAAC,SAAS,EAC9B,QAAQ,EAAE,OAAO,IAAI,CAAC,SAAS,EAC/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Aa,EAAE,QAAQ,CAAC,aAAa,EACrC,WAAW,EAAE,cAAc,GAC7B,IACH,CACN,CAAC;AACN,CAAC;AAzED,4BAyEC"}
@@ -0,0 +1 @@
1
+ export { StorySeo } from './StorySeo';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StorySeo = void 0;
4
- var StorySeo_js_1 = require("./StorySeo.js");
5
- Object.defineProperty(exports, "StorySeo", { enumerable: true, get: function () { return StorySeo_js_1.StorySeo; } });
4
+ var StorySeo_1 = require("./StorySeo");
5
+ Object.defineProperty(exports, "StorySeo", { enumerable: true, get: function () { return StorySeo_1.StorySeo; } });
6
6
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components-nextjs/StorySeo/index.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA"}
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import Document from 'next/document.js';
2
+ import Document from 'next/document';
3
3
  export declare class PrezlyThemeDocument extends Document {
4
4
  getLocaleCode(): string;
5
5
  render(): JSX.Element;
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- 'use client';
3
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
3
  if (k2 === undefined) k2 = k;
5
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -27,8 +26,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
27
26
  exports.PrezlyThemeDocument = void 0;
28
27
  const jsx_runtime_1 = require("react/jsx-runtime");
29
28
  const theme_kit_core_1 = require("@prezly/theme-kit-core");
30
- const document_js_1 = __importStar(require("next/document.js"));
31
- class PrezlyThemeDocument extends document_js_1.default {
29
+ const document_1 = __importStar(require("next/document"));
30
+ class PrezlyThemeDocument extends document_1.default {
32
31
  getLocaleCode() {
33
32
  const { newsroomContextProps,
34
33
  // eslint-disable-next-line no-underscore-dangle
@@ -42,7 +41,7 @@ class PrezlyThemeDocument extends document_js_1.default {
42
41
  const locale = theme_kit_core_1.LocaleObject.fromAnyCode(this.getLocaleCode());
43
42
  // TODO: The direction can be pulled from the Language object
44
43
  const direction = (0, theme_kit_core_1.getLocaleDirection)(locale);
45
- return ((0, jsx_runtime_1.jsxs)(document_js_1.Html, { lang: locale.toHyphenCode(), dir: direction, children: [(0, jsx_runtime_1.jsx)(document_js_1.Head, { children: (0, jsx_runtime_1.jsx)("meta", { name: "og:locale", content: locale.toHyphenCode() }) }), (0, jsx_runtime_1.jsxs)("body", { children: [(0, jsx_runtime_1.jsx)(document_js_1.Main, {}), (0, jsx_runtime_1.jsx)(document_js_1.NextScript, {})] })] }));
44
+ return ((0, jsx_runtime_1.jsxs)(document_1.Html, { lang: locale.toHyphenCode(), dir: direction, children: [(0, jsx_runtime_1.jsx)(document_1.Head, { children: (0, jsx_runtime_1.jsx)("meta", { name: "og:locale", content: locale.toHyphenCode() }) }), (0, jsx_runtime_1.jsxs)("body", { children: [(0, jsx_runtime_1.jsx)(document_1.Main, {}), (0, jsx_runtime_1.jsx)(document_1.NextScript, {})] })] }));
46
45
  }
47
46
  }
48
47
  exports.PrezlyThemeDocument = PrezlyThemeDocument;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.js","sourceRoot":"","sources":["../../src/components-nextjs/document.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAA0F;AAC1F,0DAAuE;AAIvE,MAAa,mBAAoB,SAAQ,kBAAQ;IAC7C,aAAa;QACT,MAAM,EACF,oBAAoB;QACpB,gDAAgD;UACnD,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,SAAsB,CAAC;QAE1D,oFAAoF;QACpF,kEAAkE;QAClE,MAAM,EAAE,UAAU,EAAE,GAAG,oBAAoB,IAAI,EAAE,UAAU,EAAE,+BAAc,EAAE,CAAC;QAE9E,OAAO,UAAU,CAAC;IACtB,CAAC;IAED,MAAM;QACF,MAAM,MAAM,GAAG,6BAAY,CAAC,WAAW,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;QAC9D,6DAA6D;QAC7D,MAAM,SAAS,GAAG,IAAA,mCAAkB,EAAC,MAAM,CAAC,CAAC;QAE7C,OAAO,CACH,wBAAC,eAAI,IAAC,IAAI,EAAE,MAAM,CAAC,YAAY,EAAE,EAAE,GAAG,EAAE,SAAS,aAC7C,uBAAC,eAAI,cACD,iCAAM,IAAI,EAAC,WAAW,EAAC,OAAO,EAAE,MAAM,CAAC,YAAY,EAAE,GAAI,GACtD,EACP,6CACI,uBAAC,eAAI,KAAG,EACR,uBAAC,qBAAU,KAAG,IACX,IACJ,CACV,CAAC;IACN,CAAC;CACJ;AA/BD,kDA+BC"}
@@ -0,0 +1,3 @@
1
+ export { PageSeo } from './PageSeo';
2
+ export { StorySeo } from './StorySeo';
3
+ export { PrezlyThemeDocument } from './document';
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PrezlyThemeDocument = exports.StorySeo = exports.PageSeo = void 0;
4
+ var PageSeo_1 = require("./PageSeo");
5
+ Object.defineProperty(exports, "PageSeo", { enumerable: true, get: function () { return PageSeo_1.PageSeo; } });
6
+ var StorySeo_1 = require("./StorySeo");
7
+ Object.defineProperty(exports, "StorySeo", { enumerable: true, get: function () { return StorySeo_1.StorySeo; } });
8
+ var document_1 = require("./document");
9
+ Object.defineProperty(exports, "PrezlyThemeDocument", { enumerable: true, get: function () { return document_1.PrezlyThemeDocument; } });
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components-nextjs/index.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,uCAAiD;AAAxC,+GAAA,mBAAmB,OAAA"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NextPrezlyApi = void 0;
4
4
  const theme_kit_core_1 = require("@prezly/theme-kit-core");
5
- const index_js_1 = require("../intl/index.js");
5
+ const intl_1 = require("../intl");
6
6
  class NextPrezlyApi extends theme_kit_core_1.PrezlyApi {
7
7
  async getNewsroomServerSideProps(request, nextLocaleIsoCode, story) {
8
8
  const [newsroom, languages, categories, themePreset] = await Promise.all([
@@ -13,7 +13,7 @@ class NextPrezlyApi extends theme_kit_core_1.PrezlyApi {
13
13
  ]);
14
14
  const currentLanguage = story
15
15
  ? (0, theme_kit_core_1.getLanguageFromStory)(languages, story)
16
- : (0, index_js_1.getLanguageFromNextLocaleIsoCode)(languages, nextLocaleIsoCode);
16
+ : (0, intl_1.getLanguageFromNextLocaleIsoCode)(languages, nextLocaleIsoCode);
17
17
  const defaultLanguage = (0, theme_kit_core_1.getDefaultLanguage)(languages);
18
18
  const { code: localeCode } = currentLanguage || defaultLanguage;
19
19
  const locale = theme_kit_core_1.LocaleObject.fromAnyCode(localeCode);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NextPrezlyApi.js","sourceRoot":"","sources":["../../src/data-fetching/NextPrezlyApi.ts"],"names":[],"mappings":";;;AACA,2DAQgC;AAGhC,kCAA2D;AAG3D,MAAa,aAAc,SAAQ,0BAAS;IACxC,KAAK,CAAC,0BAA0B,CAC5B,OAAyB,EACzB,iBAA0B,EAC1B,KAAa;QAEb,MAAM,CAAC,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACrE,IAAI,CAAC,WAAW,EAAE;YAClB,IAAI,CAAC,oBAAoB,EAAE;YAC3B,IAAI,CAAC,aAAa,EAAE;YACpB,IAAI,CAAC,cAAc,EAAE;SACxB,CAAC,CAAC;QAEH,MAAM,eAAe,GAAG,KAAK;YACzB,CAAC,CAAC,IAAA,qCAAoB,EAAC,SAAS,EAAE,KAAK,CAAC;YACxC,CAAC,CAAC,IAAA,uCAAgC,EAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;QACrE,MAAM,eAAe,GAAG,IAAA,mCAAkB,EAAC,SAAS,CAAC,CAAC;QAEtD,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,eAAe,IAAI,eAAe,CAAC;QAChE,MAAM,MAAM,GAAG,6BAAY,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAEpD,6FAA6F;QAC7F,MAAM,kBAAkB,GAAG,IAAA,sCAAqB,EAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAEpE,MAAM,aAAa,GAAG,IAAA,iCAAgB,EAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAC1D,MAAM,eAAe,GAAG,IAAA,mCAAkB,EAAC,OAAO,CAAC,CAAC;QAEpD,OAAO;YACH,oBAAoB,EAAE;gBAClB,QAAQ;gBACR,kBAAkB;gBAClB,UAAU;gBACV,SAAS;gBACT,UAAU;gBACV,aAAa;gBACb,WAAW;gBACX,eAAe;aAClB;YACD,cAAc,EAAE,OAAO,CAAC,eAAe,CAAC;SAC3C,CAAC;IACN,CAAC;CACJ;AAzCD,sCAyCC"}
@@ -1,4 +1,4 @@
1
1
  /// <reference types="node" />
2
2
  import type { IncomingMessage } from 'http';
3
- import { NextPrezlyApi } from './NextPrezlyApi.js';
3
+ import { NextPrezlyApi } from './NextPrezlyApi';
4
4
  export declare function getNextPrezlyApi(req?: IncomingMessage): NextPrezlyApi;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getNextPrezlyApi = void 0;
4
4
  const theme_kit_core_1 = require("@prezly/theme-kit-core");
5
- const NextPrezlyApi_js_1 = require("./NextPrezlyApi.js");
5
+ const NextPrezlyApi_1 = require("./NextPrezlyApi");
6
6
  function getNextPrezlyApi(req) {
7
7
  if (typeof window !== 'undefined') {
8
8
  throw new Error('"getNextPrezlyApi" should only be used on back-end side.');
@@ -15,7 +15,7 @@ function getNextPrezlyApi(req) {
15
15
  if (!PREZLY_NEWSROOM_UUID) {
16
16
  throw new Error('"PREZLY_NEWSROOM_UUID" is not set in env variables.');
17
17
  }
18
- return new NextPrezlyApi_js_1.NextPrezlyApi(PREZLY_ACCESS_TOKEN, PREZLY_NEWSROOM_UUID, PREZLY_THEME_UUID);
18
+ return new NextPrezlyApi_1.NextPrezlyApi(PREZLY_ACCESS_TOKEN, PREZLY_NEWSROOM_UUID, PREZLY_THEME_UUID);
19
19
  }
20
20
  exports.getNextPrezlyApi = getNextPrezlyApi;
21
21
  //# sourceMappingURL=getNextPrezlyApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getNextPrezlyApi.js","sourceRoot":"","sources":["../../src/data-fetching/getNextPrezlyApi.ts"],"names":[],"mappings":";;;AAAA,2DAAyD;AAGzD,mDAAgD;AAEhD,SAAgB,gBAAgB,CAAC,GAAqB;IAClD,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAC/B,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;KAC/E;IAED,mFAAmF;IACnF,MAAM,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,GAAG,IAAA,gCAAe,EAAC,GAAG,CAAC,CAAC;IAE9F,IAAI,CAAC,mBAAmB,EAAE;QACtB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;KACzE;IAED,IAAI,CAAC,oBAAoB,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;KAC1E;IAED,OAAO,IAAI,6BAAa,CAAC,mBAAmB,EAAE,oBAAoB,EAAE,iBAAiB,CAAC,CAAC;AAC3F,CAAC;AAjBD,4CAiBC"}
@@ -0,0 +1 @@
1
+ export { getNextPrezlyApi } from './getNextPrezlyApi';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getNextPrezlyApi = void 0;
4
- var getNextPrezlyApi_js_1 = require("./getNextPrezlyApi.js");
5
- Object.defineProperty(exports, "getNextPrezlyApi", { enumerable: true, get: function () { return getNextPrezlyApi_js_1.getNextPrezlyApi; } });
4
+ var getNextPrezlyApi_1 = require("./getNextPrezlyApi");
5
+ Object.defineProperty(exports, "getNextPrezlyApi", { enumerable: true, get: function () { return getNextPrezlyApi_1.getNextPrezlyApi; } });
6
6
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/data-fetching/index.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA"}
@@ -0,0 +1,8 @@
1
+ export * from './adapter-nextjs';
2
+ export * from './components-nextjs';
3
+ export * from './data-fetching';
4
+ export * from './infinite-loading';
5
+ export * from './intl';
6
+ export * from './newsroom-context';
7
+ export * from './sentry';
8
+ export * from './types';
@@ -14,10 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./api-handlers/index.js"), exports);
18
- __exportStar(require("./getNewsroomServerSideProps.js"), exports);
19
- __exportStar(require("./getNewsroomStaticProps.js"), exports);
20
- __exportStar(require("./page-props/index.js"), exports);
21
- __exportStar(require("./processRequest.js"), exports);
22
- __exportStar(require("./processStaticRequest.js"), exports);
17
+ __exportStar(require("./adapter-nextjs"), exports);
18
+ __exportStar(require("./components-nextjs"), exports);
19
+ __exportStar(require("./data-fetching"), exports);
20
+ __exportStar(require("./infinite-loading"), exports);
21
+ __exportStar(require("./intl"), exports);
22
+ __exportStar(require("./newsroom-context"), exports);
23
+ __exportStar(require("./sentry"), exports);
24
+ __exportStar(require("./types"), exports);
23
25
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,sDAAoC;AACpC,kDAAgC;AAChC,qDAAmC;AACnC,yCAAuB;AACvB,qDAAmC;AACnC,2CAAyB;AACzB,0CAAwB"}
@@ -1,4 +1,4 @@
1
- export { useInfiniteLoading } from './useInfiniteLoading.js';
2
- export { useInfiniteStoriesLoading } from './useInfiniteStoriesLoading.js';
3
- export { useInfiniteGalleriesLoading } from './useInfiniteGalleriesLoading.js';
4
- export * from './types.js';
1
+ export { useInfiniteLoading } from './useInfiniteLoading';
2
+ export { useInfiniteStoriesLoading } from './useInfiniteStoriesLoading';
3
+ export { useInfiniteGalleriesLoading } from './useInfiniteGalleriesLoading';
4
+ export * from './types';
@@ -15,11 +15,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.useInfiniteGalleriesLoading = exports.useInfiniteStoriesLoading = exports.useInfiniteLoading = void 0;
18
- var useInfiniteLoading_js_1 = require("./useInfiniteLoading.js");
19
- Object.defineProperty(exports, "useInfiniteLoading", { enumerable: true, get: function () { return useInfiniteLoading_js_1.useInfiniteLoading; } });
20
- var useInfiniteStoriesLoading_js_1 = require("./useInfiniteStoriesLoading.js");
21
- Object.defineProperty(exports, "useInfiniteStoriesLoading", { enumerable: true, get: function () { return useInfiniteStoriesLoading_js_1.useInfiniteStoriesLoading; } });
22
- var useInfiniteGalleriesLoading_js_1 = require("./useInfiniteGalleriesLoading.js");
23
- Object.defineProperty(exports, "useInfiniteGalleriesLoading", { enumerable: true, get: function () { return useInfiniteGalleriesLoading_js_1.useInfiniteGalleriesLoading; } });
24
- __exportStar(require("./types.js"), exports);
18
+ var useInfiniteLoading_1 = require("./useInfiniteLoading");
19
+ Object.defineProperty(exports, "useInfiniteLoading", { enumerable: true, get: function () { return useInfiniteLoading_1.useInfiniteLoading; } });
20
+ var useInfiniteStoriesLoading_1 = require("./useInfiniteStoriesLoading");
21
+ Object.defineProperty(exports, "useInfiniteStoriesLoading", { enumerable: true, get: function () { return useInfiniteStoriesLoading_1.useInfiniteStoriesLoading; } });
22
+ var useInfiniteGalleriesLoading_1 = require("./useInfiniteGalleriesLoading");
23
+ Object.defineProperty(exports, "useInfiniteGalleriesLoading", { enumerable: true, get: function () { return useInfiniteGalleriesLoading_1.useInfiniteGalleriesLoading; } });
24
+ __exportStar(require("./types"), exports);
25
25
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/infinite-loading/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,yEAAwE;AAA/D,sIAAA,yBAAyB,OAAA;AAClC,6EAA4E;AAAnE,0IAAA,2BAA2B,OAAA;AACpC,0CAAwB"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/infinite-loading/types.ts"],"names":[],"mappings":""}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useInfiniteGalleriesLoading = void 0;
4
- const useInfiniteLoading_js_1 = require("./useInfiniteLoading.js");
4
+ const useInfiniteLoading_1 = require("./useInfiniteLoading");
5
5
  async function fetchGalleries(page, pageSize) {
6
6
  const result = await fetch('/api/fetch-galleries', {
7
7
  method: 'POST',
@@ -26,7 +26,7 @@ async function fetchGalleries(page, pageSize) {
26
26
  * See https://github.com/prezly/theme-nextjs-bea/blob/d381e9878187ca98815d240d3ffdf10a75993c14/pages/media/index.tsx#L23 for usage example
27
27
  */
28
28
  function useInfiniteGalleriesLoading(initialGalleries, pagination) {
29
- const { canLoadMore, data, isLoading, loadMore } = (0, useInfiniteLoading_js_1.useInfiniteLoading)({
29
+ const { canLoadMore, data, isLoading, loadMore } = (0, useInfiniteLoading_1.useInfiniteLoading)({
30
30
  fetchingFn: async (nextPage, pageSize) => {
31
31
  const { galleries } = await fetchGalleries(nextPage, pageSize);
32
32
  return galleries;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInfiniteGalleriesLoading.js","sourceRoot":"","sources":["../../src/infinite-loading/useInfiniteGalleriesLoading.ts"],"names":[],"mappings":";;;AAGA,6DAA0D;AAE1D,KAAK,UAAU,cAAc,CACzB,IAAY,EACZ,QAAgB;IAEhB,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,sBAAsB,EAAE;QAC/C,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACL,gEAAgE;YAChE,cAAc,EAAE,kBAAkB;SACrC;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;YACjB,IAAI;YACJ,QAAQ;SACX,CAAC;KACL,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE;QACZ,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;KAC5B;IAED,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;AACzB,CAAC;AAED;;;;GAIG;AACH,SAAgB,2BAA2B,CACvC,gBAAmC,EACnC,UAA2B;IAE3B,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAA,uCAAkB,EAAkB;QACnF,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE;YACrC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,cAAc,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;YAC/D,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,WAAW,EAAE,gBAAgB;QAC7B,UAAU;KACb,CAAC,CAA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