@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
package/README.md CHANGED
@@ -71,12 +71,23 @@ module.exports = {
71
71
  If you want to support multi-language in your theme, you'll need to make additional changes to the file:
72
72
 
73
73
  ```js
74
- const i18nConfig = require('@prezly/theme-kit-nextjs/i18nConfig');
74
+ const { DUMMY_DEFAULT_LOCALE } = require('@prezly/theme-kit-nextjs');
75
+ const locales = require('@prezly/theme-kit-nextjs/core/intl/localeConfig');
75
76
 
76
77
  module.exports = {
77
78
  /* ...your next config... */
78
79
 
79
- i18n: i18nConfig,
80
+ i18n: {
81
+ // These are all the locales you want to support in
82
+ // your application
83
+ locales: [...locales, DUMMY_DEFAULT_LOCALE],
84
+ // This is the default locale you want to be used when visiting
85
+ // a non-locale prefixed path e.g. `/media`
86
+ // We use Pseudo locale used for localization testing, to reliably determine if we need to fallback to the default newsroom language
87
+ defaultLocale: DUMMY_DEFAULT_LOCALE,
88
+ // Default locale detection is disabled, since the locales would be determined by Prezly API
89
+ localeDetection: false,
90
+ },
80
91
  };
81
92
  ```
82
93
 
@@ -300,11 +311,6 @@ These are available for `/category/[slug]`, `/story/[slug]` and `/media/album/[u
300
311
 
301
312
  You can find all of the helper methods in the [page-props](./tree/main/src/adapter-nextjs/page-props) directory.
302
313
 
303
- ### Experimental: Next 13 /app directory
304
-
305
- Currently, Next doesn't work well with tree-shaking during the code introspection phase, which will result in errors if you import anything from main export of `@prezly/theme-kit-nextjs` into a Next server component.
306
- So far, the workaround for this (introduced in v4.2.0) is to import from the `server` subpath (`import ... from '@prezly/theme-kit-nextjs/server`). For client components and code that is not imported into server components, you can still use regular `@prezly/theme-kit-nextjs` imports.
307
-
308
314
  ----
309
315
 
310
316
  ## Contributing
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.fetchGalleries = void 0;
4
- const index_js_1 = require("../../data-fetching/index.js");
4
+ const data_fetching_1 = require("../../data-fetching");
5
5
  async function fetchGalleries(req, res) {
6
6
  if (req.method !== 'POST') {
7
7
  res.status(405);
@@ -9,7 +9,7 @@ async function fetchGalleries(req, res) {
9
9
  }
10
10
  const { page, pageSize } = req.body;
11
11
  try {
12
- const api = (0, index_js_1.getNextPrezlyApi)(req);
12
+ const api = (0, data_fetching_1.getNextPrezlyApi)(req);
13
13
  const { galleries } = await api.getGalleries({ page, pageSize });
14
14
  res.status(200).json({ galleries });
15
15
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchGalleries.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/api-handlers/fetchGalleries.ts"],"names":[],"mappings":";;;AAEA,uDAAuD;AAEhD,KAAK,UAAU,cAAc,CAAC,GAAmB,EAAE,GAAoB;IAC1E,IAAI,GAAG,CAAC,MAAM,KAAK,MAAM,EAAE;QACvB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAChB,OAAO;KACV;IAED,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC;IAEpC,IAAI;QACA,MAAM,GAAG,GAAG,IAAA,gCAAgB,EAAC,GAAG,CAAC,CAAC;QAElC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,GAAG,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;QAEjE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;KACvC;IAAC,OAAO,KAAK,EAAE;QACZ,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;YACjB,OAAO,EAAG,KAAe,CAAC,OAAO;SACpC,CAAC,CAAC;KACN;AACL,CAAC;AAnBD,wCAmBC"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.fetchStories = void 0;
4
- const index_js_1 = require("../../data-fetching/index.js");
4
+ const data_fetching_1 = require("../../data-fetching");
5
5
  async function fetchStories(req, res) {
6
6
  if (req.method !== 'POST') {
7
7
  res.status(405);
@@ -9,7 +9,7 @@ async function fetchStories(req, res) {
9
9
  }
10
10
  const { page, pageSize, withHighlightedStory, category, include, localeCode, pinning, filterQuery, } = req.body;
11
11
  try {
12
- const api = (0, index_js_1.getNextPrezlyApi)(req);
12
+ const api = (0, data_fetching_1.getNextPrezlyApi)(req);
13
13
  const { stories } = await (category
14
14
  ? api.getStoriesFromCategory(category, { page, pageSize, include, localeCode })
15
15
  : api.getStories({
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchStories.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/api-handlers/fetchStories.ts"],"names":[],"mappings":";;;AAEA,uDAAuD;AAEhD,KAAK,UAAU,YAAY,CAAC,GAAmB,EAAE,GAAoB;IACxE,IAAI,GAAG,CAAC,MAAM,KAAK,MAAM,EAAE;QACvB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAChB,OAAO;KACV;IAED,MAAM,EACF,IAAI,EACJ,QAAQ,EACR,oBAAoB,EACpB,QAAQ,EACR,OAAO,EACP,UAAU,EACV,OAAO,EACP,WAAW,GACd,GAAG,GAAG,CAAC,IAAI,CAAC;IAEb,IAAI;QACA,MAAM,GAAG,GAAG,IAAA,gCAAgB,EAAC,GAAG,CAAC,CAAC;QAElC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,QAAQ;YAC/B,CAAC,CAAC,GAAG,CAAC,sBAAsB,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;YAC/E,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC;gBACX,IAAI;gBACJ,QAAQ;gBACR,OAAO;gBACP,UAAU;gBACV,oBAAoB;gBACpB,OAAO;gBACP,WAAW;aACd,CAAC,CAAC,CAAC;QAEV,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;KACrC;IAAC,OAAO,KAAK,EAAE;QACZ,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;YACjB,OAAO,EAAG,KAAe,CAAC,OAAO;SACpC,CAAC,CAAC;KACN;AACL,CAAC;AAtCD,oCAsCC"}
@@ -0,0 +1,2 @@
1
+ export { fetchGalleries } from './fetchGalleries';
2
+ export { fetchStories } from './fetchStories';
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetchStories = exports.fetchGalleries = void 0;
4
+ var fetchGalleries_1 = require("./fetchGalleries");
5
+ Object.defineProperty(exports, "fetchGalleries", { enumerable: true, get: function () { return fetchGalleries_1.fetchGalleries; } });
6
+ var fetchStories_1 = require("./fetchStories");
7
+ Object.defineProperty(exports, "fetchStories", { enumerable: true, get: function () { return fetchStories_1.fetchStories; } });
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/api-handlers/index.ts"],"names":[],"mappings":";;;AAAA,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,+CAA8C;AAArC,4GAAA,YAAY,OAAA"}
@@ -9,7 +9,7 @@ interface Options {
9
9
  * See README for usage examples.
10
10
  */
11
11
  export declare function getNewsroomServerSideProps(context: GetServerSidePropsContext, options?: Options): Promise<{
12
- api: import("../data-fetching/NextPrezlyApi.js").NextPrezlyApi;
13
- serverSideProps: import("../types.js").PageProps & import("../types.js").ServerSidePageProps;
12
+ api: import("../data-fetching/NextPrezlyApi").NextPrezlyApi;
13
+ serverSideProps: import("..").PageProps & import("..").ServerSidePageProps;
14
14
  }>;
15
15
  export {};
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getNewsroomServerSideProps = void 0;
4
- const index_js_1 = require("../data-fetching/index.js");
4
+ const data_fetching_1 = require("../data-fetching");
5
5
  /**
6
6
  * Use this function in your `getServerSideProps` page methods to retrieve the data necessary for the NewsroomContextProvider and `processRequest` function.
7
7
  * See README for usage examples.
8
8
  */
9
9
  async function getNewsroomServerSideProps(context, options = {}) {
10
10
  const { req: request, locale } = context;
11
- const api = (0, index_js_1.getNextPrezlyApi)(request);
11
+ const api = (0, data_fetching_1.getNextPrezlyApi)(request);
12
12
  const serverSideProps = await api.getNewsroomServerSideProps(request, locale, options.story);
13
13
  if (options.loadHomepageContacts) {
14
14
  serverSideProps.newsroomContextProps.contacts = await api.getNewsroomContacts();
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getNewsroomServerSideProps.js","sourceRoot":"","sources":["../../src/adapter-nextjs/getNewsroomServerSideProps.ts"],"names":[],"mappings":";;;AAGA,oDAAoD;AAOpD;;;GAGG;AACI,KAAK,UAAU,0BAA0B,CAC5C,OAAkC,EAClC,UAAmB,EAAE;IAErB,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAEzC,MAAM,GAAG,GAAG,IAAA,gCAAgB,EAAC,OAAO,CAAC,CAAC;IACtC,MAAM,eAAe,GAAG,MAAM,GAAG,CAAC,0BAA0B,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAE7F,IAAI,OAAO,CAAC,oBAAoB,EAAE;QAC9B,eAAe,CAAC,oBAAoB,CAAC,QAAQ,GAAG,MAAM,GAAG,CAAC,mBAAmB,EAAE,CAAC;KACnF;IAED,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,CAAC;AACpC,CAAC;AAdD,gEAcC"}
@@ -9,7 +9,7 @@ interface Options {
9
9
  * See README for usage examples.
10
10
  */
11
11
  export declare function getNewsroomStaticProps(context: GetStaticPropsContext, options?: Options): Promise<{
12
- api: import("../data-fetching/NextPrezlyApi.js").NextPrezlyApi;
13
- staticProps: import("../types.js").PageProps & import("../types.js").ServerSidePageProps;
12
+ api: import("../data-fetching/NextPrezlyApi").NextPrezlyApi;
13
+ staticProps: import("..").PageProps & import("..").ServerSidePageProps;
14
14
  }>;
15
15
  export {};
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getNewsroomStaticProps = void 0;
4
- const index_js_1 = require("../data-fetching/index.js");
4
+ const data_fetching_1 = require("../data-fetching");
5
5
  /**
6
6
  * Use this function in your `getNewsroomStaticProps` page methods to retrieve the data necessary for the NewsroomContextProvider and `processRequest` function.
7
7
  * See README for usage examples.
8
8
  */
9
9
  async function getNewsroomStaticProps(context, options = {}) {
10
10
  const { locale } = context;
11
- const api = (0, index_js_1.getNextPrezlyApi)();
11
+ const api = (0, data_fetching_1.getNextPrezlyApi)();
12
12
  const staticProps = await api.getNewsroomServerSideProps(undefined, locale, options.story);
13
13
  if (options.loadHomepageContacts) {
14
14
  staticProps.newsroomContextProps.contacts = await api.getNewsroomContacts();
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getNewsroomStaticProps.js","sourceRoot":"","sources":["../../src/adapter-nextjs/getNewsroomStaticProps.ts"],"names":[],"mappings":";;;AAGA,oDAAoD;AAOpD;;;GAGG;AACI,KAAK,UAAU,sBAAsB,CACxC,OAA8B,EAC9B,UAAmB,EAAE;IAErB,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAE3B,MAAM,GAAG,GAAG,IAAA,gCAAgB,GAAE,CAAC;IAC/B,MAAM,WAAW,GAAG,MAAM,GAAG,CAAC,0BAA0B,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAE3F,IAAI,OAAO,CAAC,oBAAoB,EAAE;QAC9B,WAAW,CAAC,oBAAoB,CAAC,QAAQ,GAAG,MAAM,GAAG,CAAC,mBAAmB,EAAE,CAAC;KAC/E;IAED,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC;AAChC,CAAC;AAdD,wDAcC"}
@@ -0,0 +1,6 @@
1
+ export * from './api-handlers';
2
+ export * from './getNewsroomServerSideProps';
3
+ export * from './getNewsroomStaticProps';
4
+ export * from './page-props';
5
+ export * from './processRequest';
6
+ export * from './processStaticRequest';
@@ -1,9 +1,4 @@
1
1
  "use strict";
2
- /**
3
- * This is a subset export created for Next 13 /app directory, which doesn't support tree-shaking properly.
4
- * See https://github.com/vercel/next.js/issues/12557
5
- *
6
- */
7
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
8
3
  if (k2 === undefined) k2 = k;
9
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -19,6 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
15
  };
21
16
  Object.defineProperty(exports, "__esModule", { value: true });
22
- __exportStar(require("./adapter-nextjs/index.js"), exports);
23
- __exportStar(require("./data-fetching/index.js"), exports);
24
- //# sourceMappingURL=server.js.map
17
+ __exportStar(require("./api-handlers"), exports);
18
+ __exportStar(require("./getNewsroomServerSideProps"), exports);
19
+ __exportStar(require("./getNewsroomStaticProps"), exports);
20
+ __exportStar(require("./page-props"), exports);
21
+ __exportStar(require("./processRequest"), exports);
22
+ __exportStar(require("./processStaticRequest"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/adapter-nextjs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,+DAA6C;AAC7C,2DAAyC;AACzC,+CAA6B;AAC7B,mDAAiC;AACjC,yDAAuC"}
@@ -2,15 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getCategoryPageStaticPaths = exports.getCategoryPageStaticProps = exports.getCategoryPageServerSideProps = void 0;
4
4
  const theme_kit_core_1 = require("@prezly/theme-kit-core");
5
- const index_js_1 = require("../../data-fetching/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");
5
+ const data_fetching_1 = require("../../data-fetching");
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 getCategoryPageServerSideProps(customProps, options) {
11
11
  const { pageSize = theme_kit_core_1.DEFAULT_PAGE_SIZE, extraStoryFields } = options || {};
12
12
  return async function getServerSideProps(context) {
13
- const { api, serverSideProps } = await (0, getNewsroomServerSideProps_js_1.getNewsroomServerSideProps)(context);
13
+ const { api, serverSideProps } = await (0, getNewsroomServerSideProps_1.getNewsroomServerSideProps)(context);
14
14
  const { slug } = context.params;
15
15
  const category = await api.getCategoryBySlug(slug);
16
16
  if (!category) {
@@ -28,7 +28,7 @@ function getCategoryPageServerSideProps(customProps, options) {
28
28
  localeCode,
29
29
  });
30
30
  serverSideProps.newsroomContextProps.currentCategory = category;
31
- return (0, processRequest_js_1.processRequest)(context, {
31
+ return (0, processRequest_1.processRequest)(context, {
32
32
  ...serverSideProps,
33
33
  // TODO: This is temporary until return types from API are figured out
34
34
  stories: stories,
@@ -47,7 +47,7 @@ exports.getCategoryPageServerSideProps = getCategoryPageServerSideProps;
47
47
  function getCategoryPageStaticProps(customProps, options) {
48
48
  const { pageSize = theme_kit_core_1.DEFAULT_PAGE_SIZE, extraStoryFields } = options || {};
49
49
  return async function getStaticProps(context) {
50
- const { api, staticProps } = await (0, getNewsroomStaticProps_js_1.getNewsroomStaticProps)(context);
50
+ const { api, staticProps } = await (0, getNewsroomStaticProps_1.getNewsroomStaticProps)(context);
51
51
  const { slug } = context.params;
52
52
  const category = await api.getCategoryBySlug(slug);
53
53
  if (!category) {
@@ -62,7 +62,7 @@ function getCategoryPageStaticProps(customProps, options) {
62
62
  localeCode,
63
63
  });
64
64
  staticProps.newsroomContextProps.currentCategory = category;
65
- return (0, processStaticRequest_js_1.processStaticRequest)(context, {
65
+ return (0, processStaticRequest_1.processStaticRequest)(context, {
66
66
  ...staticProps,
67
67
  // TODO: This is temporary until return types from API are figured out
68
68
  stories: stories,
@@ -79,7 +79,7 @@ function getCategoryPageStaticProps(customProps, options) {
79
79
  }
80
80
  exports.getCategoryPageStaticProps = getCategoryPageStaticProps;
81
81
  async function getCategoryPageStaticPaths() {
82
- const api = (0, index_js_1.getNextPrezlyApi)();
82
+ const api = (0, data_fetching_1.getNextPrezlyApi)();
83
83
  const [categories, defaultLanguage] = await Promise.all([
84
84
  api.getCategories(),
85
85
  api.getNewsroomDefaultLanguage(),
@@ -0,0 +1 @@
1
+ {"version":3,"file":"category.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/category.ts"],"names":[],"mappings":";;;AACA,2DAAmG;AASnG,uDAAuD;AAEvD,8EAA2E;AAC3E,sEAAmE;AACnE,sDAAmD;AACnD,kEAA+D;AAc/D,SAAgB,8BAA8B,CAG5C,WAAqD,EAAE,OAAiB;IACtE,MAAM,EAAE,QAAQ,GAAG,kCAAiB,EAAE,gBAAgB,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IAEzE,OAAO,KA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AA0B;IAC5C,MAAM,GAAG,GAAG,IAAA,gCAAgB,GAAE,CAAC;IAC/B,MAAM,CAAC,UAAU,EAAE,eAAe,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACpD,GAAG,CAAC,aAAa,EAAE;QACnB,GAAG,CAAC,0BAA0B,EAAE;KACnC,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,6BAAY,CAAC,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAE9D,MAAM,KAAK,GAAG,UAAU;SACnB,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;QACd,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,yCAAwB,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC5D,IAAI,CAAC,IAAI,EAAE;YACP,OAAO,SAAS,CAAC;SACpB;QAED,OAAO,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC;IAChC,CAAC,CAAC;SACD,MAAM,CAA+B,OAAc,CAAC,CAAC;IAE1D,OAAO;QACH,KAAK;QACL,QAAQ,EAAE,UAAU;KACvB,CAAC;AACN,CAAC;AAvBD,gEAuBC"}
@@ -2,14 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getGalleryPageStaticProps = exports.getGalleryPageServerSideProps = void 0;
4
4
  const theme_kit_core_1 = require("@prezly/theme-kit-core");
5
- const getNewsroomServerSideProps_js_1 = require("../getNewsroomServerSideProps.js");
6
- const getNewsroomStaticProps_js_1 = require("../getNewsroomStaticProps.js");
7
- const processRequest_js_1 = require("../processRequest.js");
8
- const processStaticRequest_js_1 = require("../processStaticRequest.js");
5
+ const getNewsroomServerSideProps_1 = require("../getNewsroomServerSideProps");
6
+ const getNewsroomStaticProps_1 = require("../getNewsroomStaticProps");
7
+ const processRequest_1 = require("../processRequest");
8
+ const processStaticRequest_1 = require("../processStaticRequest");
9
9
  function getGalleryPageServerSideProps(customProps, options) {
10
10
  const { pageSize = theme_kit_core_1.DEFAULT_GALLERY_PAGE_SIZE } = options || {};
11
11
  return async function getServerSideProps(context) {
12
- const { api, serverSideProps } = await (0, getNewsroomServerSideProps_js_1.getNewsroomServerSideProps)(context);
12
+ const { api, serverSideProps } = await (0, getNewsroomServerSideProps_1.getNewsroomServerSideProps)(context);
13
13
  const { query } = context;
14
14
  const page = query.page && typeof query.page === 'string' ? Number(query.page) : undefined;
15
15
  const { galleries, pagination } = await api.getGalleries({ page, pageSize });
@@ -23,7 +23,7 @@ function getGalleryPageServerSideProps(customProps, options) {
23
23
  },
24
24
  };
25
25
  }
26
- return (0, processRequest_js_1.processRequest)(context, {
26
+ return (0, processRequest_1.processRequest)(context, {
27
27
  ...serverSideProps,
28
28
  galleries,
29
29
  pagination: {
@@ -41,7 +41,7 @@ exports.getGalleryPageServerSideProps = getGalleryPageServerSideProps;
41
41
  function getGalleryPageStaticProps(customProps, options) {
42
42
  const { pageSize = theme_kit_core_1.DEFAULT_GALLERY_PAGE_SIZE } = options || {};
43
43
  return async function getStaticProps(context) {
44
- const { api, staticProps } = await (0, getNewsroomStaticProps_js_1.getNewsroomStaticProps)(context);
44
+ const { api, staticProps } = await (0, getNewsroomStaticProps_1.getNewsroomStaticProps)(context);
45
45
  const { galleries, pagination } = await api.getGalleries({ pageSize });
46
46
  // If there's only one gallery, redirect to it immediately
47
47
  if (galleries.length === 1) {
@@ -53,7 +53,7 @@ function getGalleryPageStaticProps(customProps, options) {
53
53
  },
54
54
  };
55
55
  }
56
- return (0, processStaticRequest_js_1.processStaticRequest)(context, {
56
+ return (0, processStaticRequest_1.processStaticRequest)(context, {
57
57
  ...staticProps,
58
58
  galleries,
59
59
  pagination: {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gallery.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/gallery.ts"],"names":[],"mappings":";;;AACA,2DAAmE;AASnE,8EAA2E;AAC3E,sEAAmE;AACnE,sDAAmD;AACnD,kEAA+D;AAa/D,SAAgB,6BA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;AAED,SAAgB,yBAAyB,CACrC,WAA4E,EAC5E,OAAiB;IAEjB,MAAM,EAAE,QAAQ,GAAG,0CAAyB,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IAE/D,OAAO,KAAK,UAAU,cAAc,CAChC,OAA8B;QAE9B,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,MAAM,IAAA,+CAAsB,EAAC,OAAO,CAAC,CAAC;QAEnE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,MAAM,GAAG,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;QAEvE,0DAA0D;QAC1D,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;YACxB,MAAM,EAAE,IAAI,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;YAE9B,OAAO;gBACH,QAAQ,EAAE;oBACN,WAAW,EAAE,gBAAgB,IAAI,EAAE;oBACnC,SAAS,EAAE,KAAK;iBACnB;aACJ,CAAC;SACL;QAED,OAAO,IAAA,2CAAoB,EAAC,OAAO,EAAE;YACjC,GAAG,WAAW;YACd,SAAS;YACT,UAAU,EAAE;gBACR,UAAU,EAAE,UAAU,CAAC,sBAAsB;gBAC7C,WAAW,EAAE,CAAC;gBACd,QAAQ;aACX;YACD,GAAG,CAAC,OAAO,WAAW,KAAK,UAAU;gBACjC,CAAC,CAAC,MAAO,WAAiE,CACpE,OAAO,EACP,WAAW,CACd;gBACH,CAAC,CAAC,WAAW,CAAC;SACrB,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC;AAzCD,8DAyCC"}
@@ -1,20 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getGalleryAlbumPageStaticPaths = exports.getGalleryAlbumPageStaticProps = exports.getGalleryAlbumPageServerSideProps = void 0;
4
- const index_js_1 = require("../../data-fetching/index.js");
5
- const getNewsroomServerSideProps_js_1 = require("../getNewsroomServerSideProps.js");
6
- const getNewsroomStaticProps_js_1 = require("../getNewsroomStaticProps.js");
7
- const processRequest_js_1 = require("../processRequest.js");
8
- const processStaticRequest_js_1 = require("../processStaticRequest.js");
4
+ const data_fetching_1 = require("../../data-fetching");
5
+ const getNewsroomServerSideProps_1 = require("../getNewsroomServerSideProps");
6
+ const getNewsroomStaticProps_1 = require("../getNewsroomStaticProps");
7
+ const processRequest_1 = require("../processRequest");
8
+ const processStaticRequest_1 = require("../processStaticRequest");
9
9
  function getGalleryAlbumPageServerSideProps(customProps) {
10
10
  return async function getServerSideProps(context) {
11
- const { api, serverSideProps } = await (0, getNewsroomServerSideProps_js_1.getNewsroomServerSideProps)(context);
11
+ const { api, serverSideProps } = await (0, getNewsroomServerSideProps_1.getNewsroomServerSideProps)(context);
12
12
  const { uuid } = context.params;
13
13
  const gallery = await api.getGallery(uuid);
14
14
  if (!gallery || !gallery.images_number) {
15
15
  return { notFound: true };
16
16
  }
17
- return (0, processRequest_js_1.processRequest)(context, {
17
+ return (0, processRequest_1.processRequest)(context, {
18
18
  ...serverSideProps,
19
19
  gallery,
20
20
  ...(typeof customProps === 'function'
@@ -26,13 +26,13 @@ function getGalleryAlbumPageServerSideProps(customProps) {
26
26
  exports.getGalleryAlbumPageServerSideProps = getGalleryAlbumPageServerSideProps;
27
27
  function getGalleryAlbumPageStaticProps(customProps) {
28
28
  return async function getStaticProps(context) {
29
- const { api, staticProps } = await (0, getNewsroomStaticProps_js_1.getNewsroomStaticProps)(context);
29
+ const { api, staticProps } = await (0, getNewsroomStaticProps_1.getNewsroomStaticProps)(context);
30
30
  const { uuid } = context.params;
31
31
  const gallery = await api.getGallery(uuid);
32
32
  if (!gallery || !gallery.images_number) {
33
33
  return { notFound: true };
34
34
  }
35
- return (0, processStaticRequest_js_1.processStaticRequest)(context, {
35
+ return (0, processStaticRequest_1.processStaticRequest)(context, {
36
36
  ...staticProps,
37
37
  gallery,
38
38
  ...(typeof customProps === 'function'
@@ -43,7 +43,7 @@ function getGalleryAlbumPageStaticProps(customProps) {
43
43
  }
44
44
  exports.getGalleryAlbumPageStaticProps = getGalleryAlbumPageStaticProps;
45
45
  async function getGalleryAlbumPageStaticPaths() {
46
- const api = (0, index_js_1.getNextPrezlyApi)();
46
+ const api = (0, data_fetching_1.getNextPrezlyApi)();
47
47
  const { galleries } = await api.getGalleries({});
48
48
  const paths = galleries.map(({ uuid }) => ({ params: { uuid } }));
49
49
  return {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"galleryAlbum.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/galleryAlbum.ts"],"names":[],"mappings":";;;AASA,uDAAuD;AACvD,8EAA2E;AAC3E,sEAAmE;AACnE,sDAAmD;AACnD,kEAA+D;AAQ/D,SAAgB,kCAAkC,CAC9C,WAAqD;IAErD,OAAO,KAAK,UAAU,kBAAkB,CACpC,OAAkC;QAElC,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,MAAM,IAAA,uDAA0B,EAAC,OAAO,CAAC,CAAC;QAE3E,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,MAA0B,CAAC;QACpD,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAE3C,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;YACpC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;SAC7B;QAED,OAAO,IAAA,+BAAc,EACjB,OAAO,EACP;YACI,GAAG,eAAe;YAClB,OAAO;YACP,GAAG,CAAC,OAAO,WAAW,KAAK,UAAU;gBACjC,CAAC,CAAC,MAAO,WAA0C,CAAC,OAAO,EAAE,eAAe,CAAC;gBAC7E,CAAC,CAAC,WAAW,CAAC;SACrB,EACD,gBAAgB,IAAI,EAAE,CACzB,CAAC;IACN,CAAC,CAAC;AACN,CAAC;AA3BD,gFA2BC;AAED,SAAgB,8BAA8B,CAC1C,WAA4E;IAE5E,OAAO,KAAK,UAAU,cAAc,CAChC,OAA8B;QAE9B,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,MAAM,IAAA,+CAAsB,EAAC,OAAO,CAAC,CAAC;QAEnE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,MAA0B,CAAC;QACpD,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAE3C,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;YACpC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;SAC7B;QAED,OAAO,IAAA,2CAAoB,EAAC,OAAO,EAAE;YACjC,GAAG,WAAW;YACd,OAAO;YACP,GAAG,CAAC,OAAO,WAAW,KAAK,UAAU;gBACjC,CAAC,CAAC,MAAO,WAAiE,CACpE,OAAO,EACP,WAAW,CACd;gBACH,CAAC,CAAC,WAAW,CAAC;SACrB,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC;AA1BD,wEA0BC;AAEM,KAAK,UAAU,8BAA8B;IAChD,MAAM,GAAG,GAAG,IAAA,gCAAgB,GAAE,CAAC;IAC/B,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IAEjD,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;IAElE,OAAO;QACH,KAAK;QACL,QAAQ,EAAE,UAAU;KACvB,CAAC;AACN,CAAC;AAVD,wEAUC"}
@@ -2,14 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getHomepageStaticProps = exports.getHomepageServerSideProps = void 0;
4
4
  const theme_kit_core_1 = require("@prezly/theme-kit-core");
5
- const getNewsroomServerSideProps_js_1 = require("../getNewsroomServerSideProps.js");
6
- const getNewsroomStaticProps_js_1 = require("../getNewsroomStaticProps.js");
7
- const processRequest_js_1 = require("../processRequest.js");
8
- const processStaticRequest_js_1 = require("../processStaticRequest.js");
5
+ const getNewsroomServerSideProps_1 = require("../getNewsroomServerSideProps");
6
+ const getNewsroomStaticProps_1 = require("../getNewsroomStaticProps");
7
+ const processRequest_1 = require("../processRequest");
8
+ const processStaticRequest_1 = require("../processStaticRequest");
9
9
  function getHomepageServerSideProps(customProps, options) {
10
10
  const { pageSize = theme_kit_core_1.DEFAULT_PAGE_SIZE, extraStoryFields, pinning = false, withHighlightedStory = false, filterQuery, } = options || {};
11
11
  return async function getServerSideProps(context) {
12
- const { api, serverSideProps } = await (0, getNewsroomServerSideProps_js_1.getNewsroomServerSideProps)(context, {
12
+ const { api, serverSideProps } = await (0, getNewsroomServerSideProps_1.getNewsroomServerSideProps)(context, {
13
13
  loadHomepageContacts: true,
14
14
  });
15
15
  const { query } = context;
@@ -25,7 +25,7 @@ function getHomepageServerSideProps(customProps, options) {
25
25
  filterQuery,
26
26
  });
27
27
  const { stories, storiesTotal } = storiesPaginated;
28
- return (0, processRequest_js_1.processRequest)(context, {
28
+ return (0, processRequest_1.processRequest)(context, {
29
29
  ...serverSideProps,
30
30
  // TODO: This is temporary until return types from API are figured out
31
31
  stories: stories,
@@ -45,7 +45,7 @@ exports.getHomepageServerSideProps = getHomepageServerSideProps;
45
45
  function getHomepageStaticProps(customProps, options) {
46
46
  const { pageSize = theme_kit_core_1.DEFAULT_PAGE_SIZE, extraStoryFields, pinning = false } = options || {};
47
47
  return async function getStaticProps(context) {
48
- const { api, staticProps } = await (0, getNewsroomStaticProps_js_1.getNewsroomStaticProps)(context, {
48
+ const { api, staticProps } = await (0, getNewsroomStaticProps_1.getNewsroomStaticProps)(context, {
49
49
  loadHomepageContacts: true,
50
50
  });
51
51
  const { localeCode } = staticProps.newsroomContextProps;
@@ -56,7 +56,7 @@ function getHomepageStaticProps(customProps, options) {
56
56
  localeCode,
57
57
  });
58
58
  const { stories, storiesTotal } = storiesPaginated;
59
- return (0, processStaticRequest_js_1.processStaticRequest)(context, {
59
+ return (0, processStaticRequest_1.processStaticRequest)(context, {
60
60
  ...staticProps,
61
61
  // TODO: This is temporary until return types from API are figured out
62
62
  stories: stories,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"home.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/home.ts"],"names":[],"mappings":";;;AACA,2DAA2D;AAS3D,8EAA2E;AAC3E,sEAAmE;AACnE,sDAAmD;AACnD,kEAA+D;AAqB/D,SAAgB,0BAA0B,CAGxC,WAAqD,EAAE,OAAiB;IACtE,MAAM,EACF,QAAQ,GAAG,kCAAiB,EAC5B,gBAAgB,EAChB,OAAO,GAAG,KAAK,EACf,oBAAoB,GAAG,KAAK,EAC5B,WAAW,GACd,GAAG,OAAO,IAAI,EAAE,CAAC;IAElB,OAAO,KAAK,UAAU,kBAAkB,CACpC,OAAkC;QAElC,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,MAAM,IAAA,uDAA0B,EAAC,OAAO,EAAE;YACvE,oBAAoB,EAAE,IAAI;SAC7B,CAAC,CAAC;QAEH,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;QAC1B,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAE3F,MAAM,EAAE,UAAU,EAAE,GAAG,eAAe,CAAC,oBAAoB,CAAC;QAE5D,MAAM,gBAAgB,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC;YAC1C,IAAI;YACJ,QAAQ;YACR,OAAO;YACP,OAAO,EAAE,gBAAgB;YACzB,UAAU;YACV,oBAAoB;YACpB,WAAW;SACd,CAAC,CAAC;QACH,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,gBAAgB,CAAC;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AAO,WAAW,KAAK,UAAU;gBACjC,CAAC,CAAC,MAAO,WAAiE,CACpE,OAAO,EACP,WAAW,CACd;gBACH,CAAC,CAAC,WAAW,CAAC;SACrB,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC;AAxCD,wDAwCC"}
@@ -1,8 +1,8 @@
1
- export { getCategoryPageServerSideProps, getCategoryPageStaticPaths, getCategoryPageStaticProps, type CategoryPageProps, } from './category.js';
2
- export { getGalleryPageServerSideProps, getGalleryPageStaticProps, type GalleryPageProps, } from './gallery.js';
3
- export { getGalleryAlbumPageServerSideProps, getGalleryAlbumPageStaticPaths, getGalleryAlbumPageStaticProps, type GalleryAlbumPageProps, } from './galleryAlbum.js';
4
- export { getHomepageServerSideProps, getHomepageStaticProps, type HomePageProps } from './home.js';
5
- export { getSearchPageServerSideProps, getSearchPageStaticProps } from './search.js';
6
- export * from './sitemap/index.js';
7
- export { getStoryPageServerSideProps, getStoryPageStaticPaths, getStoryPageStaticProps, } from './story.js';
8
- export { getStoryPreviewPageServerSideProps } from './storyPreview.js';
1
+ export { getCategoryPageServerSideProps, getCategoryPageStaticPaths, getCategoryPageStaticProps, type CategoryPageProps, } from './category';
2
+ export { getGalleryPageServerSideProps, getGalleryPageStaticProps, type GalleryPageProps, } from './gallery';
3
+ export { getGalleryAlbumPageServerSideProps, getGalleryAlbumPageStaticPaths, getGalleryAlbumPageStaticProps, type GalleryAlbumPageProps, } from './galleryAlbum';
4
+ export { getHomepageServerSideProps, getHomepageStaticProps, type HomePageProps } from './home';
5
+ export { getSearchPageServerSideProps, getSearchPageStaticProps } from './search';
6
+ export * from './sitemap';
7
+ export { getStoryPageServerSideProps, getStoryPageStaticPaths, getStoryPageStaticProps, } from './story';
8
+ export { getStoryPreviewPageServerSideProps } from './storyPreview';
@@ -15,28 +15,28 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.getStoryPreviewPageServerSideProps = exports.getStoryPageStaticProps = exports.getStoryPageStaticPaths = exports.getStoryPageServerSideProps = exports.getSearchPageStaticProps = exports.getSearchPageServerSideProps = exports.getHomepageStaticProps = exports.getHomepageServerSideProps = exports.getGalleryAlbumPageStaticProps = exports.getGalleryAlbumPageStaticPaths = exports.getGalleryAlbumPageServerSideProps = exports.getGalleryPageStaticProps = exports.getGalleryPageServerSideProps = exports.getCategoryPageStaticProps = exports.getCategoryPageStaticPaths = exports.getCategoryPageServerSideProps = void 0;
18
- var category_js_1 = require("./category.js");
19
- Object.defineProperty(exports, "getCategoryPageServerSideProps", { enumerable: true, get: function () { return category_js_1.getCategoryPageServerSideProps; } });
20
- Object.defineProperty(exports, "getCategoryPageStaticPaths", { enumerable: true, get: function () { return category_js_1.getCategoryPageStaticPaths; } });
21
- Object.defineProperty(exports, "getCategoryPageStaticProps", { enumerable: true, get: function () { return category_js_1.getCategoryPageStaticProps; } });
22
- var gallery_js_1 = require("./gallery.js");
23
- Object.defineProperty(exports, "getGalleryPageServerSideProps", { enumerable: true, get: function () { return gallery_js_1.getGalleryPageServerSideProps; } });
24
- Object.defineProperty(exports, "getGalleryPageStaticProps", { enumerable: true, get: function () { return gallery_js_1.getGalleryPageStaticProps; } });
25
- var galleryAlbum_js_1 = require("./galleryAlbum.js");
26
- Object.defineProperty(exports, "getGalleryAlbumPageServerSideProps", { enumerable: true, get: function () { return galleryAlbum_js_1.getGalleryAlbumPageServerSideProps; } });
27
- Object.defineProperty(exports, "getGalleryAlbumPageStaticPaths", { enumerable: true, get: function () { return galleryAlbum_js_1.getGalleryAlbumPageStaticPaths; } });
28
- Object.defineProperty(exports, "getGalleryAlbumPageStaticProps", { enumerable: true, get: function () { return galleryAlbum_js_1.getGalleryAlbumPageStaticProps; } });
29
- var home_js_1 = require("./home.js");
30
- Object.defineProperty(exports, "getHomepageServerSideProps", { enumerable: true, get: function () { return home_js_1.getHomepageServerSideProps; } });
31
- Object.defineProperty(exports, "getHomepageStaticProps", { enumerable: true, get: function () { return home_js_1.getHomepageStaticProps; } });
32
- var search_js_1 = require("./search.js");
33
- Object.defineProperty(exports, "getSearchPageServerSideProps", { enumerable: true, get: function () { return search_js_1.getSearchPageServerSideProps; } });
34
- Object.defineProperty(exports, "getSearchPageStaticProps", { enumerable: true, get: function () { return search_js_1.getSearchPageStaticProps; } });
35
- __exportStar(require("./sitemap/index.js"), exports);
36
- var story_js_1 = require("./story.js");
37
- Object.defineProperty(exports, "getStoryPageServerSideProps", { enumerable: true, get: function () { return story_js_1.getStoryPageServerSideProps; } });
38
- Object.defineProperty(exports, "getStoryPageStaticPaths", { enumerable: true, get: function () { return story_js_1.getStoryPageStaticPaths; } });
39
- Object.defineProperty(exports, "getStoryPageStaticProps", { enumerable: true, get: function () { return story_js_1.getStoryPageStaticProps; } });
40
- var storyPreview_js_1 = require("./storyPreview.js");
41
- Object.defineProperty(exports, "getStoryPreviewPageServerSideProps", { enumerable: true, get: function () { return storyPreview_js_1.getStoryPreviewPageServerSideProps; } });
18
+ var category_1 = require("./category");
19
+ Object.defineProperty(exports, "getCategoryPageServerSideProps", { enumerable: true, get: function () { return category_1.getCategoryPageServerSideProps; } });
20
+ Object.defineProperty(exports, "getCategoryPageStaticPaths", { enumerable: true, get: function () { return category_1.getCategoryPageStaticPaths; } });
21
+ Object.defineProperty(exports, "getCategoryPageStaticProps", { enumerable: true, get: function () { return category_1.getCategoryPageStaticProps; } });
22
+ var gallery_1 = require("./gallery");
23
+ Object.defineProperty(exports, "getGalleryPageServerSideProps", { enumerable: true, get: function () { return gallery_1.getGalleryPageServerSideProps; } });
24
+ Object.defineProperty(exports, "getGalleryPageStaticProps", { enumerable: true, get: function () { return gallery_1.getGalleryPageStaticProps; } });
25
+ var galleryAlbum_1 = require("./galleryAlbum");
26
+ Object.defineProperty(exports, "getGalleryAlbumPageServerSideProps", { enumerable: true, get: function () { return galleryAlbum_1.getGalleryAlbumPageServerSideProps; } });
27
+ Object.defineProperty(exports, "getGalleryAlbumPageStaticPaths", { enumerable: true, get: function () { return galleryAlbum_1.getGalleryAlbumPageStaticPaths; } });
28
+ Object.defineProperty(exports, "getGalleryAlbumPageStaticProps", { enumerable: true, get: function () { return galleryAlbum_1.getGalleryAlbumPageStaticProps; } });
29
+ var home_1 = require("./home");
30
+ Object.defineProperty(exports, "getHomepageServerSideProps", { enumerable: true, get: function () { return home_1.getHomepageServerSideProps; } });
31
+ Object.defineProperty(exports, "getHomepageStaticProps", { enumerable: true, get: function () { return home_1.getHomepageStaticProps; } });
32
+ var search_1 = require("./search");
33
+ Object.defineProperty(exports, "getSearchPageServerSideProps", { enumerable: true, get: function () { return search_1.getSearchPageServerSideProps; } });
34
+ Object.defineProperty(exports, "getSearchPageStaticProps", { enumerable: true, get: function () { return search_1.getSearchPageStaticProps; } });
35
+ __exportStar(require("./sitemap"), exports);
36
+ var story_1 = require("./story");
37
+ Object.defineProperty(exports, "getStoryPageServerSideProps", { enumerable: true, get: function () { return story_1.getStoryPageServerSideProps; } });
38
+ Object.defineProperty(exports, "getStoryPageStaticPaths", { enumerable: true, get: function () { return story_1.getStoryPageStaticPaths; } });
39
+ Object.defineProperty(exports, "getStoryPageStaticProps", { enumerable: true, get: function () { return story_1.getStoryPageStaticProps; } });
40
+ var storyPreview_1 = require("./storyPreview");
41
+ Object.defineProperty(exports, "getStoryPreviewPageServerSideProps", { enumerable: true, get: function () { return storyPreview_1.getStoryPreviewPageServerSideProps; } });
42
42
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uCAKoB;AAJhB,0HAAA,8BAA8B,OAAA;AAC9B,sHAAA,0BAA0B,OAAA;AAC1B,sHAAA,0BAA0B,OAAA;AAG9B,qCAImB;AAHf,wHAAA,6BAA6B,OAAA;AAC7B,oHAAA,yBAAyB,OAAA;AAG7B,+CAKwB;AAJpB,kIAAA,kCAAkC,OAAA;AAClC,8HAAA,8BAA8B,OAAA;AAC9B,8HAAA,8BAA8B,OAAA;AAGlC,+BAAgG;AAAvF,kHAAA,0BAA0B,OAAA;AAAE,8GAAA,sBAAsB,OAAA;AAC3D,mCAAkF;AAAzE,sHAAA,4BAA4B,OAAA;AAAE,kHAAA,wBAAwB,OAAA;AAC/D,4CAA0B;AAC1B,iCAIiB;AAHb,oHAAA,2BAA2B,OAAA;AAC3B,gHAAA,uBAAuB,OAAA;AACvB,gHAAA,uBAAuB,OAAA;AAE3B,+CAAoE;AAA3D,kIAAA,kCAAkC,OAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/page-props/lib/types.ts"],"names":[],"mappings":""}
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getSearchPageStaticProps = exports.getSearchPageServerSideProps = void 0;
4
- const getNewsroomServerSideProps_js_1 = require("../getNewsroomServerSideProps.js");
5
- const getNewsroomStaticProps_js_1 = require("../getNewsroomStaticProps.js");
6
- const processRequest_js_1 = require("../processRequest.js");
7
- const processStaticRequest_js_1 = require("../processStaticRequest.js");
4
+ const getNewsroomServerSideProps_1 = require("../getNewsroomServerSideProps");
5
+ const getNewsroomStaticProps_1 = require("../getNewsroomStaticProps");
6
+ const processRequest_1 = require("../processRequest");
7
+ const processStaticRequest_1 = require("../processStaticRequest");
8
8
  function getSearchPageServerSideProps(customProps) {
9
9
  return async function getServerSideProps(context) {
10
- const { serverSideProps } = await (0, getNewsroomServerSideProps_js_1.getNewsroomServerSideProps)(context);
11
- return (0, processRequest_js_1.processRequest)(context, {
10
+ const { serverSideProps } = await (0, getNewsroomServerSideProps_1.getNewsroomServerSideProps)(context);
11
+ return (0, processRequest_1.processRequest)(context, {
12
12
  ...serverSideProps,
13
13
  ...(typeof customProps === 'function'
14
14
  ? await customProps(context, serverSideProps)
@@ -19,8 +19,8 @@ function getSearchPageServerSideProps(customProps) {
19
19
  exports.getSearchPageServerSideProps = getSearchPageServerSideProps;
20
20
  function getSearchPageStaticProps(customProps) {
21
21
  return async function getStaticProps(context) {
22
- const { staticProps } = await (0, getNewsroomStaticProps_js_1.getNewsroomStaticProps)(context);
23
- return (0, processStaticRequest_js_1.processStaticRequest)(context, {
22
+ const { staticProps } = await (0, getNewsroomStaticProps_1.getNewsroomStaticProps)(context);
23
+ return (0, processStaticRequest_1.processStaticRequest)(context, {
24
24
  ...staticProps,
25
25
  ...(typeof customProps === 'function'
26
26
  ? await customProps(context, staticProps)
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/search.ts"],"names":[],"mappings":";;;AAMA,8EAA2E;AAC3E,sEAAmE;AACnE,sDAAmD;AACnD,kEAA+D;AAI/D,SAAgB,4BAA4B,CACxC,WAAqD;IAErD,OAAO,KAAK,UAAU,kBAAkB,CACpC,OAAkC;QAElC,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,IAAA,uDAA0B,EAAC,OAAO,CAAC,CAAC;QAEtE,OAAO,IAAA,+BAAc,EACjB,OAAO,EACP;YACI,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,EACD,SAAS,CACZ,CAAC;IACN,CAAC,CAAC;AACN,CAAC;AAnBD,oEAmBC;AAED,SAAgB,wBAAwB,CACpC,WAA4E;IAE5E,OAAO,KAAK,UAAU,cAAc,CAChC,OAAkC;QAElC,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,IAAA,+CAAsB,EAAC,OAAO,CAAC,CAAC;QAE9D,OAAO,IAAA,2CAAoB,EAAC,OAAO,EAAE;YACjC,GAAG,WAAW;YACd,GAAG,CAAC,OAAO,WAAW,KAAK,UAAU;gBACjC,CAAC,C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