@payloadcms/next 3.71.0-internal-debug.80dab4c → 3.71.0-internal.27e1e08

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 (448) hide show
  1. package/dist/auth/login.js +58 -52
  2. package/dist/auth/login.js.map +1 -1
  3. package/dist/auth/logout.js +44 -39
  4. package/dist/auth/logout.js.map +1 -1
  5. package/dist/auth/refresh.js +47 -45
  6. package/dist/auth/refresh.js.map +1 -1
  7. package/dist/cjs/withPayload.cjs +23 -61
  8. package/dist/cjs/withPayload.cjs.map +2 -2
  9. package/dist/config.js +0 -1
  10. package/dist/config.js.map +1 -1
  11. package/dist/elements/DocumentHeader/Tabs/ShouldRenderTabs.js +15 -9
  12. package/dist/elements/DocumentHeader/Tabs/ShouldRenderTabs.js.map +1 -1
  13. package/dist/elements/DocumentHeader/Tabs/Tab/TabLink.js +71 -40
  14. package/dist/elements/DocumentHeader/Tabs/Tab/TabLink.js.map +1 -1
  15. package/dist/elements/DocumentHeader/Tabs/Tab/index.js +59 -65
  16. package/dist/elements/DocumentHeader/Tabs/Tab/index.js.map +1 -1
  17. package/dist/elements/DocumentHeader/Tabs/index.js +70 -80
  18. package/dist/elements/DocumentHeader/Tabs/index.js.map +1 -1
  19. package/dist/elements/DocumentHeader/Tabs/tabs/VersionsPill/index.js +23 -16
  20. package/dist/elements/DocumentHeader/Tabs/tabs/VersionsPill/index.js.map +1 -1
  21. package/dist/elements/DocumentHeader/Tabs/tabs/index.js +69 -61
  22. package/dist/elements/DocumentHeader/Tabs/tabs/index.js.map +1 -1
  23. package/dist/elements/DocumentHeader/index.js +28 -48
  24. package/dist/elements/DocumentHeader/index.js.map +1 -1
  25. package/dist/elements/FormHeader/index.js +16 -30
  26. package/dist/elements/FormHeader/index.js.map +1 -1
  27. package/dist/elements/Logo/index.js +34 -19
  28. package/dist/elements/Logo/index.js.map +1 -1
  29. package/dist/elements/Nav/NavHamburger/index.js +44 -23
  30. package/dist/elements/Nav/NavHamburger/index.js.map +1 -1
  31. package/dist/elements/Nav/NavWrapper/index.js +54 -28
  32. package/dist/elements/Nav/NavWrapper/index.js.map +1 -1
  33. package/dist/elements/Nav/SettingsMenuButton/index.js +39 -33
  34. package/dist/elements/Nav/SettingsMenuButton/index.js.map +1 -1
  35. package/dist/elements/Nav/getNavPrefs.js +22 -27
  36. package/dist/elements/Nav/getNavPrefs.js.map +1 -1
  37. package/dist/elements/Nav/index.client.js +118 -97
  38. package/dist/elements/Nav/index.client.js.map +1 -1
  39. package/dist/elements/Nav/index.js +127 -148
  40. package/dist/elements/Nav/index.js.map +1 -1
  41. package/dist/exports/auth.js +0 -1
  42. package/dist/exports/auth.js.map +1 -1
  43. package/dist/exports/client.js +1 -1
  44. package/dist/exports/client.js.map +1 -1
  45. package/dist/exports/layouts.js +0 -1
  46. package/dist/exports/layouts.js.map +1 -1
  47. package/dist/exports/routes.js +0 -1
  48. package/dist/exports/routes.js.map +1 -1
  49. package/dist/exports/rsc.js +0 -1
  50. package/dist/exports/rsc.js.map +1 -1
  51. package/dist/exports/templates.js +0 -1
  52. package/dist/exports/templates.js.map +1 -1
  53. package/dist/exports/utilities.js +12 -7
  54. package/dist/exports/utilities.js.map +1 -1
  55. package/dist/exports/views.js +0 -1
  56. package/dist/exports/views.js.map +1 -1
  57. package/dist/index.js +0 -1
  58. package/dist/index.js.map +1 -1
  59. package/dist/layouts/Root/NestProviders.js +20 -21
  60. package/dist/layouts/Root/NestProviders.js.map +1 -1
  61. package/dist/layouts/Root/checkDependencies.js +41 -49
  62. package/dist/layouts/Root/checkDependencies.js.map +1 -1
  63. package/dist/layouts/Root/index.js +103 -128
  64. package/dist/layouts/Root/index.js.map +1 -1
  65. package/dist/prod/styles.css +1 -5
  66. package/dist/routes/graphql/handler.js +122 -114
  67. package/dist/routes/graphql/handler.js.map +1 -1
  68. package/dist/routes/graphql/index.js +0 -1
  69. package/dist/routes/graphql/index.js.map +1 -1
  70. package/dist/routes/graphql/playground.js +27 -28
  71. package/dist/routes/graphql/playground.js.map +1 -1
  72. package/dist/routes/index.js +0 -1
  73. package/dist/routes/index.js.map +1 -1
  74. package/dist/routes/rest/index.js +22 -23
  75. package/dist/routes/rest/index.js.map +1 -1
  76. package/dist/routes/rest/og/image.js +79 -103
  77. package/dist/routes/rest/og/image.js.map +1 -1
  78. package/dist/routes/rest/og/index.js +54 -59
  79. package/dist/routes/rest/og/index.js.map +1 -1
  80. package/dist/templates/Default/NavHamburger/index.js +20 -12
  81. package/dist/templates/Default/NavHamburger/index.js.map +1 -1
  82. package/dist/templates/Default/Wrapper/index.js +44 -20
  83. package/dist/templates/Default/Wrapper/index.js.map +1 -1
  84. package/dist/templates/Default/index.js +116 -147
  85. package/dist/templates/Default/index.js.map +1 -1
  86. package/dist/templates/Minimal/index.js +17 -26
  87. package/dist/templates/Minimal/index.js.map +1 -1
  88. package/dist/utilities/getExistingAuthToken.js +2 -3
  89. package/dist/utilities/getExistingAuthToken.js.map +1 -1
  90. package/dist/utilities/getNextRequestI18n.js +13 -12
  91. package/dist/utilities/getNextRequestI18n.js.map +1 -1
  92. package/dist/utilities/getPayloadHMR.js +5 -5
  93. package/dist/utilities/getPayloadHMR.js.map +1 -1
  94. package/dist/utilities/getPreferences.js +22 -27
  95. package/dist/utilities/getPreferences.js.map +1 -1
  96. package/dist/utilities/getRequestLocale.js +14 -13
  97. package/dist/utilities/getRequestLocale.js.map +1 -1
  98. package/dist/utilities/getRequestTheme.js +19 -19
  99. package/dist/utilities/getRequestTheme.js.map +1 -1
  100. package/dist/utilities/getRouteWithoutAdmin.js +5 -3
  101. package/dist/utilities/getRouteWithoutAdmin.js.map +1 -1
  102. package/dist/utilities/handleAuthRedirect.js +36 -22
  103. package/dist/utilities/handleAuthRedirect.js.map +1 -1
  104. package/dist/utilities/handleServerFunctions.js +41 -34
  105. package/dist/utilities/handleServerFunctions.js.map +1 -1
  106. package/dist/utilities/initReq.js +96 -78
  107. package/dist/utilities/initReq.js.map +1 -1
  108. package/dist/utilities/isCustomAdminView.js +26 -22
  109. package/dist/utilities/isCustomAdminView.js.map +1 -1
  110. package/dist/utilities/isPublicAdminRoute.js +20 -26
  111. package/dist/utilities/isPublicAdminRoute.js.map +1 -1
  112. package/dist/utilities/meta.js +63 -68
  113. package/dist/utilities/meta.js.map +1 -1
  114. package/dist/utilities/selectiveCache.js +26 -25
  115. package/dist/utilities/selectiveCache.js.map +1 -1
  116. package/dist/utilities/setPayloadAuthCookie.js +22 -19
  117. package/dist/utilities/setPayloadAuthCookie.js.map +1 -1
  118. package/dist/utilities/slugify.js +33 -24
  119. package/dist/utilities/slugify.js.map +1 -1
  120. package/dist/utilities/timestamp.js +6 -7
  121. package/dist/utilities/timestamp.js.map +1 -1
  122. package/dist/views/API/LocaleSelector/index.js +39 -17
  123. package/dist/views/API/LocaleSelector/index.js.map +1 -1
  124. package/dist/views/API/RenderJSON/index.js +126 -171
  125. package/dist/views/API/RenderJSON/index.js.map +1 -1
  126. package/dist/views/API/index.client.js +197 -290
  127. package/dist/views/API/index.client.js.map +1 -1
  128. package/dist/views/API/index.js +2 -7
  129. package/dist/views/API/index.js.map +1 -1
  130. package/dist/views/API/metadata.js +23 -18
  131. package/dist/views/API/metadata.js.map +1 -1
  132. package/dist/views/Account/ResetPreferences/index.js +102 -78
  133. package/dist/views/Account/ResetPreferences/index.js.map +1 -1
  134. package/dist/views/Account/Settings/LanguageSelector.js +47 -18
  135. package/dist/views/Account/Settings/LanguageSelector.js.map +1 -1
  136. package/dist/views/Account/Settings/index.js +25 -60
  137. package/dist/views/Account/Settings/index.js.map +1 -1
  138. package/dist/views/Account/ToggleTheme/index.js +55 -38
  139. package/dist/views/Account/ToggleTheme/index.js.map +1 -1
  140. package/dist/views/Account/index.client.js +32 -16
  141. package/dist/views/Account/index.client.js.map +1 -1
  142. package/dist/views/Account/index.js +158 -147
  143. package/dist/views/Account/index.js.map +1 -1
  144. package/dist/views/Account/metadata.js +12 -8
  145. package/dist/views/Account/metadata.js.map +1 -1
  146. package/dist/views/BrowseByFolder/buildView.js +157 -138
  147. package/dist/views/BrowseByFolder/buildView.js.map +1 -1
  148. package/dist/views/BrowseByFolder/index.js +16 -16
  149. package/dist/views/BrowseByFolder/index.js.map +1 -1
  150. package/dist/views/BrowseByFolder/metadata.js +15 -13
  151. package/dist/views/BrowseByFolder/metadata.js.map +1 -1
  152. package/dist/views/CollectionFolders/buildView.js +142 -122
  153. package/dist/views/CollectionFolders/buildView.js.map +1 -1
  154. package/dist/views/CollectionFolders/index.js +16 -16
  155. package/dist/views/CollectionFolders/index.js.map +1 -1
  156. package/dist/views/CollectionFolders/metadata.js +21 -18
  157. package/dist/views/CollectionFolders/metadata.js.map +1 -1
  158. package/dist/views/CollectionFolders/renderFolderViewSlots.js +61 -58
  159. package/dist/views/CollectionFolders/renderFolderViewSlots.js.map +1 -1
  160. package/dist/views/CollectionTrash/index.js +17 -17
  161. package/dist/views/CollectionTrash/index.js.map +1 -1
  162. package/dist/views/CollectionTrash/metadata.js +21 -18
  163. package/dist/views/CollectionTrash/metadata.js.map +1 -1
  164. package/dist/views/CreateFirstUser/index.client.js +103 -117
  165. package/dist/views/CreateFirstUser/index.client.js.map +1 -1
  166. package/dist/views/CreateFirstUser/index.js +81 -87
  167. package/dist/views/CreateFirstUser/index.js.map +1 -1
  168. package/dist/views/CreateFirstUser/metadata.js +12 -8
  169. package/dist/views/CreateFirstUser/metadata.js.map +1 -1
  170. package/dist/views/Dashboard/Default/ModularDashboard/DashboardStepNav.js +138 -147
  171. package/dist/views/Dashboard/Default/ModularDashboard/DashboardStepNav.js.map +1 -1
  172. package/dist/views/Dashboard/Default/ModularDashboard/index.client.js +405 -423
  173. package/dist/views/Dashboard/Default/ModularDashboard/index.client.js.map +1 -1
  174. package/dist/views/Dashboard/Default/ModularDashboard/index.js +75 -72
  175. package/dist/views/Dashboard/Default/ModularDashboard/index.js.map +1 -1
  176. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/RenderWidget.js +89 -62
  177. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/RenderWidget.js.map +1 -1
  178. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/getDefaultLayoutServerFn.js +47 -40
  179. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/getDefaultLayoutServerFn.js.map +1 -1
  180. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/renderWidgetServerFn.js +65 -64
  181. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/renderWidgetServerFn.js.map +1 -1
  182. package/dist/views/Dashboard/Default/ModularDashboard/useDashboardLayout.js +147 -164
  183. package/dist/views/Dashboard/Default/ModularDashboard/useDashboardLayout.js.map +1 -1
  184. package/dist/views/Dashboard/Default/ModularDashboard/utils/collisionDetection.js +30 -31
  185. package/dist/views/Dashboard/Default/ModularDashboard/utils/collisionDetection.js.map +1 -1
  186. package/dist/views/Dashboard/Default/ModularDashboard/utils/sensors.js +229 -223
  187. package/dist/views/Dashboard/Default/ModularDashboard/utils/sensors.js.map +1 -1
  188. package/dist/views/Dashboard/Default/index.js +45 -59
  189. package/dist/views/Dashboard/Default/index.js.map +1 -1
  190. package/dist/views/Dashboard/index.js +42 -46
  191. package/dist/views/Dashboard/index.js.map +1 -1
  192. package/dist/views/Dashboard/metadata.js +14 -10
  193. package/dist/views/Dashboard/metadata.js.map +1 -1
  194. package/dist/views/Document/getCustomDocumentViewByKey.js +2 -3
  195. package/dist/views/Document/getCustomDocumentViewByKey.js.map +1 -1
  196. package/dist/views/Document/getCustomViewByRoute.js +30 -27
  197. package/dist/views/Document/getCustomViewByRoute.js.map +1 -1
  198. package/dist/views/Document/getDocPreferences.js +41 -40
  199. package/dist/views/Document/getDocPreferences.js.map +1 -1
  200. package/dist/views/Document/getDocumentData.js +55 -44
  201. package/dist/views/Document/getDocumentData.js.map +1 -1
  202. package/dist/views/Document/getDocumentPermissions.js +80 -77
  203. package/dist/views/Document/getDocumentPermissions.js.map +1 -1
  204. package/dist/views/Document/getDocumentView.js +283 -313
  205. package/dist/views/Document/getDocumentView.js.map +1 -1
  206. package/dist/views/Document/getIsLocked.js +66 -66
  207. package/dist/views/Document/getIsLocked.js.map +1 -1
  208. package/dist/views/Document/getMetaBySegment.js +136 -130
  209. package/dist/views/Document/getMetaBySegment.js.map +1 -1
  210. package/dist/views/Document/getVersions.js +195 -205
  211. package/dist/views/Document/getVersions.js.map +1 -1
  212. package/dist/views/Document/handleServerFunction.js +128 -103
  213. package/dist/views/Document/handleServerFunction.js.map +1 -1
  214. package/dist/views/Document/index.js +355 -316
  215. package/dist/views/Document/index.js.map +1 -1
  216. package/dist/views/Document/metadata.js +1 -2
  217. package/dist/views/Document/metadata.js.map +1 -1
  218. package/dist/views/Document/renderDocumentSlots.js +132 -121
  219. package/dist/views/Document/renderDocumentSlots.js.map +1 -1
  220. package/dist/views/Edit/index.js +6 -10
  221. package/dist/views/Edit/index.js.map +1 -1
  222. package/dist/views/Edit/metadata.js +46 -36
  223. package/dist/views/Edit/metadata.js.map +1 -1
  224. package/dist/views/ForgotPassword/ForgotPasswordForm/index.js +164 -130
  225. package/dist/views/ForgotPassword/ForgotPasswordForm/index.js.map +1 -1
  226. package/dist/views/ForgotPassword/index.js +62 -79
  227. package/dist/views/ForgotPassword/index.js.map +1 -1
  228. package/dist/views/ForgotPassword/metadata.js +12 -8
  229. package/dist/views/ForgotPassword/metadata.js.map +1 -1
  230. package/dist/views/List/createSerializableValue.js +11 -12
  231. package/dist/views/List/createSerializableValue.js.map +1 -1
  232. package/dist/views/List/enrichDocsWithVersionStatus.js +86 -86
  233. package/dist/views/List/enrichDocsWithVersionStatus.js.map +1 -1
  234. package/dist/views/List/extractRelationshipDisplayValue.js +14 -15
  235. package/dist/views/List/extractRelationshipDisplayValue.js.map +1 -1
  236. package/dist/views/List/extractValueOrRelationshipID.js +15 -16
  237. package/dist/views/List/extractValueOrRelationshipID.js.map +1 -1
  238. package/dist/views/List/handleGroupBy.js +150 -133
  239. package/dist/views/List/handleGroupBy.js.map +1 -1
  240. package/dist/views/List/handleServerFunction.js +121 -98
  241. package/dist/views/List/handleServerFunction.js.map +1 -1
  242. package/dist/views/List/index.js +323 -305
  243. package/dist/views/List/index.js.map +1 -1
  244. package/dist/views/List/metadata.js +20 -17
  245. package/dist/views/List/metadata.js.map +1 -1
  246. package/dist/views/List/renderListViewSlots.js +75 -82
  247. package/dist/views/List/renderListViewSlots.js.map +1 -1
  248. package/dist/views/List/resolveAllFilterOptions.js +45 -43
  249. package/dist/views/List/resolveAllFilterOptions.js.map +1 -1
  250. package/dist/views/List/transformColumnsToSelect.js +8 -9
  251. package/dist/views/List/transformColumnsToSelect.js.map +1 -1
  252. package/dist/views/Login/LoginField/index.js +89 -57
  253. package/dist/views/Login/LoginField/index.js.map +1 -1
  254. package/dist/views/Login/LoginForm/index.js +160 -107
  255. package/dist/views/Login/LoginForm/index.js.map +1 -1
  256. package/dist/views/Login/index.js +85 -82
  257. package/dist/views/Login/index.js.map +1 -1
  258. package/dist/views/Login/metadata.js +12 -8
  259. package/dist/views/Login/metadata.js.map +1 -1
  260. package/dist/views/Logout/LogoutClient.js +120 -84
  261. package/dist/views/Logout/LogoutClient.js.map +1 -1
  262. package/dist/views/Logout/index.js +29 -29
  263. package/dist/views/Logout/index.js.map +1 -1
  264. package/dist/views/Logout/metadata.js +11 -7
  265. package/dist/views/Logout/metadata.js.map +1 -1
  266. package/dist/views/NotFound/index.client.js +82 -71
  267. package/dist/views/NotFound/index.client.js.map +1 -1
  268. package/dist/views/NotFound/index.js +73 -72
  269. package/dist/views/NotFound/index.js.map +1 -1
  270. package/dist/views/NotFound/metadata.js +9 -7
  271. package/dist/views/NotFound/metadata.js.map +1 -1
  272. package/dist/views/ResetPassword/ResetPasswordForm/index.js +108 -97
  273. package/dist/views/ResetPassword/ResetPasswordForm/index.js.map +1 -1
  274. package/dist/views/ResetPassword/index.js +73 -93
  275. package/dist/views/ResetPassword/index.js.map +1 -1
  276. package/dist/views/ResetPassword/metadata.js +12 -8
  277. package/dist/views/ResetPassword/metadata.js.map +1 -1
  278. package/dist/views/Root/attachViewActions.js +23 -18
  279. package/dist/views/Root/attachViewActions.js.map +1 -1
  280. package/dist/views/Root/generateCustomViewMetadata.js +21 -19
  281. package/dist/views/Root/generateCustomViewMetadata.js.map +1 -1
  282. package/dist/views/Root/getCustomViewByKey.js +14 -12
  283. package/dist/views/Root/getCustomViewByKey.js.map +1 -1
  284. package/dist/views/Root/getCustomViewByRoute.js +42 -31
  285. package/dist/views/Root/getCustomViewByRoute.js.map +1 -1
  286. package/dist/views/Root/getDocumentViewInfo.js +23 -24
  287. package/dist/views/Root/getDocumentViewInfo.js.map +1 -1
  288. package/dist/views/Root/getRouteData.js +325 -333
  289. package/dist/views/Root/getRouteData.js.map +1 -1
  290. package/dist/views/Root/index.js +270 -248
  291. package/dist/views/Root/index.js.map +1 -1
  292. package/dist/views/Root/isPathMatchingRoute.js +26 -21
  293. package/dist/views/Root/isPathMatchingRoute.js.map +1 -1
  294. package/dist/views/Root/metadata.js +181 -176
  295. package/dist/views/Root/metadata.js.map +1 -1
  296. package/dist/views/Unauthorized/index.js +46 -54
  297. package/dist/views/Unauthorized/index.js.map +1 -1
  298. package/dist/views/Unauthorized/metadata.js +12 -8
  299. package/dist/views/Unauthorized/metadata.js.map +1 -1
  300. package/dist/views/Verify/index.client.js +43 -25
  301. package/dist/views/Verify/index.client.js.map +1 -1
  302. package/dist/views/Verify/index.js +64 -69
  303. package/dist/views/Verify/index.js.map +1 -1
  304. package/dist/views/Verify/metadata.js +12 -8
  305. package/dist/views/Verify/metadata.js.map +1 -1
  306. package/dist/views/Version/Default/SelectedLocalesContext.js +4 -4
  307. package/dist/views/Version/Default/SelectedLocalesContext.js.map +1 -1
  308. package/dist/views/Version/Default/SetStepNav.js +127 -86
  309. package/dist/views/Version/Default/SetStepNav.js.map +1 -1
  310. package/dist/views/Version/Default/index.js +236 -380
  311. package/dist/views/Version/Default/index.js.map +1 -1
  312. package/dist/views/Version/Default/types.js +1 -2
  313. package/dist/views/Version/Default/types.js.map +1 -1
  314. package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.js +119 -102
  315. package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.js.map +1 -1
  316. package/dist/views/Version/RenderFieldsToDiff/RenderVersionFieldsToDiff.js +73 -78
  317. package/dist/views/Version/RenderFieldsToDiff/RenderVersionFieldsToDiff.js.map +1 -1
  318. package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.js +408 -363
  319. package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.js.map +1 -1
  320. package/dist/views/Version/RenderFieldsToDiff/fields/Collapsible/index.js +51 -40
  321. package/dist/views/Version/RenderFieldsToDiff/fields/Collapsible/index.js.map +1 -1
  322. package/dist/views/Version/RenderFieldsToDiff/fields/Date/index.js +67 -35
  323. package/dist/views/Version/RenderFieldsToDiff/fields/Date/index.js.map +1 -1
  324. package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.js +56 -59
  325. package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.js.map +1 -1
  326. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js +117 -139
  327. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js.map +1 -1
  328. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/generateLabelFromValue.js +41 -36
  329. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/generateLabelFromValue.js.map +1 -1
  330. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js +178 -192
  331. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js.map +1 -1
  332. package/dist/views/Version/RenderFieldsToDiff/fields/Row/index.js +11 -17
  333. package/dist/views/Version/RenderFieldsToDiff/fields/Row/index.js.map +1 -1
  334. package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js +73 -48
  335. package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js.map +1 -1
  336. package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js +143 -132
  337. package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js.map +1 -1
  338. package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.js +81 -56
  339. package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.js.map +1 -1
  340. package/dist/views/Version/RenderFieldsToDiff/fields/Upload/index.js +211 -252
  341. package/dist/views/Version/RenderFieldsToDiff/fields/Upload/index.js.map +1 -1
  342. package/dist/views/Version/RenderFieldsToDiff/fields/index.js +22 -23
  343. package/dist/views/Version/RenderFieldsToDiff/fields/index.js.map +1 -1
  344. package/dist/views/Version/RenderFieldsToDiff/index.js +9 -12
  345. package/dist/views/Version/RenderFieldsToDiff/index.js.map +1 -1
  346. package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.js +228 -213
  347. package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.js.map +1 -1
  348. package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.spec.js +826 -1005
  349. package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.spec.js.map +1 -1
  350. package/dist/views/Version/RenderFieldsToDiff/utilities/fieldHasChanges.js +1 -2
  351. package/dist/views/Version/RenderFieldsToDiff/utilities/fieldHasChanges.js.map +1 -1
  352. package/dist/views/Version/RenderFieldsToDiff/utilities/fieldHasChanges.spec.js +43 -44
  353. package/dist/views/Version/RenderFieldsToDiff/utilities/fieldHasChanges.spec.js.map +1 -1
  354. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldPathsModified.js +22 -25
  355. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldPathsModified.js.map +1 -1
  356. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.js +36 -32
  357. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.js.map +1 -1
  358. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.spec.js +129 -145
  359. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.spec.js.map +1 -1
  360. package/dist/views/Version/Restore/index.js +93 -117
  361. package/dist/views/Version/Restore/index.js.map +1 -1
  362. package/dist/views/Version/SelectComparison/VersionDrawer/CreatedAtCell.js +50 -33
  363. package/dist/views/Version/SelectComparison/VersionDrawer/CreatedAtCell.js.map +1 -1
  364. package/dist/views/Version/SelectComparison/VersionDrawer/index.js +226 -170
  365. package/dist/views/Version/SelectComparison/VersionDrawer/index.js.map +1 -1
  366. package/dist/views/Version/SelectComparison/index.js +50 -73
  367. package/dist/views/Version/SelectComparison/index.js.map +1 -1
  368. package/dist/views/Version/SelectComparison/types.js +1 -2
  369. package/dist/views/Version/SelectComparison/types.js.map +1 -1
  370. package/dist/views/Version/SelectLocales/index.js +32 -34
  371. package/dist/views/Version/SelectLocales/index.js.map +1 -1
  372. package/dist/views/Version/VersionPillLabel/VersionPillLabel.js +95 -104
  373. package/dist/views/Version/VersionPillLabel/VersionPillLabel.js.map +1 -1
  374. package/dist/views/Version/VersionPillLabel/getVersionLabel.js +27 -23
  375. package/dist/views/Version/VersionPillLabel/getVersionLabel.js.map +1 -1
  376. package/dist/views/Version/fetchVersions.js +138 -113
  377. package/dist/views/Version/fetchVersions.js.map +1 -1
  378. package/dist/views/Version/index.js +323 -325
  379. package/dist/views/Version/index.js.map +1 -1
  380. package/dist/views/Version/metadata.js +50 -43
  381. package/dist/views/Version/metadata.js.map +1 -1
  382. package/dist/views/Versions/buildColumns.js +79 -95
  383. package/dist/views/Versions/buildColumns.js.map +1 -1
  384. package/dist/views/Versions/cells/AutosaveCell/index.js +38 -34
  385. package/dist/views/Versions/cells/AutosaveCell/index.js.map +1 -1
  386. package/dist/views/Versions/cells/CreatedAt/index.js +53 -32
  387. package/dist/views/Versions/cells/CreatedAt/index.js.map +1 -1
  388. package/dist/views/Versions/cells/ID/index.js +8 -10
  389. package/dist/views/Versions/cells/ID/index.js.map +1 -1
  390. package/dist/views/Versions/index.client.js +83 -106
  391. package/dist/views/Versions/index.client.js.map +1 -1
  392. package/dist/views/Versions/index.js +143 -143
  393. package/dist/views/Versions/index.js.map +1 -1
  394. package/dist/views/Versions/metadata.js +44 -37
  395. package/dist/views/Versions/metadata.js.map +1 -1
  396. package/dist/views/Versions/types.js +1 -2
  397. package/dist/views/Versions/types.js.map +1 -1
  398. package/dist/withPayload/withPayload.js +143 -198
  399. package/dist/withPayload/withPayload.js.map +1 -1
  400. package/dist/withPayload/withPayload.utils.js +95 -92
  401. package/dist/withPayload/withPayload.utils.js.map +1 -1
  402. package/dist/withPayload/withPayloadLegacy.js +40 -42
  403. package/dist/withPayload/withPayloadLegacy.js.map +1 -1
  404. package/package.json +7 -7
  405. package/dist/elements/DocumentHeader/Tabs/Tab/index.scss +0 -38
  406. package/dist/elements/DocumentHeader/Tabs/index.scss +0 -54
  407. package/dist/elements/DocumentHeader/Tabs/tabs/VersionsPill/index.scss +0 -9
  408. package/dist/elements/DocumentHeader/index.scss +0 -64
  409. package/dist/elements/FormHeader/index.scss +0 -8
  410. package/dist/elements/Nav/NavWrapper/index.scss +0 -27
  411. package/dist/elements/Nav/SettingsMenuButton/index.scss +0 -11
  412. package/dist/elements/Nav/index.scss +0 -173
  413. package/dist/esbuildEntry.d.ts +0 -5
  414. package/dist/esbuildEntry.d.ts.map +0 -1
  415. package/dist/esbuildEntry.js +0 -6
  416. package/dist/esbuildEntry.js.map +0 -1
  417. package/dist/templates/Default/Wrapper/index.scss +0 -58
  418. package/dist/templates/Default/index.scss +0 -79
  419. package/dist/templates/Minimal/index.scss +0 -30
  420. package/dist/views/API/RenderJSON/index.scss +0 -129
  421. package/dist/views/API/index.scss +0 -119
  422. package/dist/views/Account/Settings/index.scss +0 -48
  423. package/dist/views/CreateFirstUser/index.scss +0 -21
  424. package/dist/views/Dashboard/Default/ModularDashboard/index.scss +0 -316
  425. package/dist/views/Login/LoginForm/index.scss +0 -10
  426. package/dist/views/Login/index.scss +0 -10
  427. package/dist/views/Logout/index.scss +0 -25
  428. package/dist/views/NotFound/index.scss +0 -57
  429. package/dist/views/ResetPassword/index.scss +0 -11
  430. package/dist/views/Unauthorized/index.scss +0 -14
  431. package/dist/views/Verify/index.scss +0 -16
  432. package/dist/views/Version/Default/index.scss +0 -170
  433. package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.scss +0 -81
  434. package/dist/views/Version/RenderFieldsToDiff/fields/Date/index.scss +0 -12
  435. package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.scss +0 -9
  436. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.scss +0 -59
  437. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.scss +0 -91
  438. package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.scss +0 -4
  439. package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.scss +0 -9
  440. package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.scss +0 -4
  441. package/dist/views/Version/RenderFieldsToDiff/fields/Upload/index.scss +0 -121
  442. package/dist/views/Version/RenderFieldsToDiff/index.scss +0 -24
  443. package/dist/views/Version/Restore/index.scss +0 -84
  444. package/dist/views/Version/SelectComparison/VersionDrawer/index.scss +0 -18
  445. package/dist/views/Version/SelectComparison/index.scss +0 -9
  446. package/dist/views/Version/VersionPillLabel/index.scss +0 -26
  447. package/dist/views/Versions/cells/AutosaveCell/index.scss +0 -9
  448. package/dist/views/Versions/index.scss +0 -110
@@ -1,113 +1,116 @@
1
1
  /* eslint-disable no-console */ /**
2
- * This was taken and modified from https://github.com/getsentry/sentry-javascript/blob/15256034ee8150a5b7dcb97d23eca1a5486f0cae/packages/nextjs/src/config/util.ts
3
- *
4
- * MIT License
5
- *
6
- * Copyright (c) 2012 Functional Software, Inc. dba Sentry
7
- *
8
- * Permission is hereby granted, free of charge, to any person obtaining a copy of
9
- * this software and associated documentation files (the "Software"), to deal in
10
- * the Software without restriction, including without limitation the rights to
11
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12
- * of the Software, and to permit persons to whom the Software is furnished to do
13
- * so, subject to the following conditions:
14
- *
15
- * The above copyright notice and this permission notice shall be included in all
16
- * copies or substantial portions of the Software.
17
- *
18
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
- * SOFTWARE.
25
- */ import { readFileSync } from 'fs';
2
+ * This was taken and modified from https://github.com/getsentry/sentry-javascript/blob/15256034ee8150a5b7dcb97d23eca1a5486f0cae/packages/nextjs/src/config/util.ts
3
+ *
4
+ * MIT License
5
+ *
6
+ * Copyright (c) 2012 Functional Software, Inc. dba Sentry
7
+ *
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
9
+ * this software and associated documentation files (the "Software"), to deal in
10
+ * the Software without restriction, including without limitation the rights to
11
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12
+ * of the Software, and to permit persons to whom the Software is furnished to do
13
+ * so, subject to the following conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be included in all
16
+ * copies or substantial portions of the Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ * SOFTWARE.
25
+ */import { readFileSync } from 'fs';
26
26
  import { fileURLToPath } from 'url';
27
27
  function _parseInt(input) {
28
- return parseInt(input || '', 10);
28
+ return parseInt(input || '', 10);
29
29
  }
30
- /**
31
- * Represents Semantic Versioning object
32
- */ /**
33
- * undefined if not a canary version
34
- */ // https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
30
+ // https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
35
31
  const SEMVER_REGEXP = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-z-][0-9a-z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-z-][0-9a-z-]*))*))?(?:\+([0-9a-z-]+(?:\.[0-9a-z-]+)*))?$/i;
36
32
  /**
37
33
  * Parses input into a SemVer interface
38
34
  * @param input string representation of a semver version
39
- */ export function parseSemver(input) {
40
- const match = input.match(SEMVER_REGEXP) || [];
41
- const major = _parseInt(match[1]);
42
- const minor = _parseInt(match[2]);
43
- const patch = _parseInt(match[3]);
44
- const prerelease = match[4];
45
- const canaryVersion = prerelease?.startsWith('canary.') ? parseInt(prerelease.split('.')[1] || '0', 10) : undefined;
46
- return {
47
- buildmetadata: match[5],
48
- canaryVersion,
49
- major: isNaN(major) ? undefined : major,
50
- minor: isNaN(minor) ? undefined : minor,
51
- patch: isNaN(patch) ? undefined : patch,
52
- prerelease: match[4]
53
- };
35
+ */
36
+ export function parseSemver(input) {
37
+ const match = input.match(SEMVER_REGEXP) || [];
38
+ const major = _parseInt(match[1]);
39
+ const minor = _parseInt(match[2]);
40
+ const patch = _parseInt(match[3]);
41
+ const prerelease = match[4];
42
+ const canaryVersion = prerelease?.startsWith('canary.') ? parseInt(prerelease.split('.')[1] || '0', 10) : undefined;
43
+ return {
44
+ buildmetadata: match[5],
45
+ canaryVersion,
46
+ major: isNaN(major) ? undefined : major,
47
+ minor: isNaN(minor) ? undefined : minor,
48
+ patch: isNaN(patch) ? undefined : patch,
49
+ prerelease: match[4]
50
+ };
54
51
  }
55
52
  /**
56
53
  * Returns the version of Next.js installed in the project, or undefined if it cannot be determined.
57
- */ export function getNextjsVersion() {
58
- try {
59
- let pkgPath;
60
- // Check if we're in ESM or CJS environment
61
- if (typeof import.meta?.resolve === 'function') {
62
- // ESM environment - use import.meta.resolve
63
- const pkgUrl = import.meta.resolve('next/package.json');
64
- // Use fileURLToPath for proper cross-platform path handling (Windows, macOS, Linux)
65
- // new URL().pathname returns '/C:/path' on Windows which causes path resolution issues
66
- pkgPath = fileURLToPath(pkgUrl);
67
- } else {
68
- // CJS environment - use require.resolve
69
- pkgPath = require.resolve('next/package.json');
70
- }
71
- const pkgJson = JSON.parse(readFileSync(pkgPath, 'utf8'));
72
- return parseSemver(pkgJson.version);
73
- } catch (e) {
74
- console.error('Payload: Error getting Next.js version', e);
75
- return undefined;
54
+ */
55
+ export function getNextjsVersion() {
56
+ try {
57
+ let pkgPath;
58
+ // Check if we're in ESM or CJS environment
59
+ if (typeof import.meta?.resolve === 'function') {
60
+ // ESM environment - use import.meta.resolve
61
+ const pkgUrl = import.meta.resolve('next/package.json');
62
+ // Use fileURLToPath for proper cross-platform path handling (Windows, macOS, Linux)
63
+ // new URL().pathname returns '/C:/path' on Windows which causes path resolution issues
64
+ pkgPath = fileURLToPath(pkgUrl);
65
+ } else {
66
+ // CJS environment - use require.resolve
67
+ pkgPath = require.resolve('next/package.json');
76
68
  }
69
+ const pkgJson = JSON.parse(readFileSync(pkgPath, 'utf8'));
70
+ return parseSemver(pkgJson.version);
71
+ } catch (e) {
72
+ console.error('Payload: Error getting Next.js version', e);
73
+ return undefined;
74
+ }
77
75
  }
78
76
  /**
79
77
  * Checks if the current Next.js version supports Turbopack externalize transitive dependencies.
80
78
  * This was introduced in Next.js v16.1.0-canary.3
81
- */ export function supportsTurbopackExternalizeTransitiveDependencies(version) {
82
- if (!version) {
83
- return false;
84
- }
85
- const { canaryVersion, major, minor, patch } = version;
86
- if (major === undefined || minor === undefined) {
87
- return false;
79
+ */
80
+ export function supportsTurbopackExternalizeTransitiveDependencies(version) {
81
+ if (!version) {
82
+ return false;
83
+ }
84
+ const {
85
+ canaryVersion,
86
+ major,
87
+ minor,
88
+ patch
89
+ } = version;
90
+ if (major === undefined || minor === undefined) {
91
+ return false;
92
+ }
93
+ if (major > 16) {
94
+ return true;
95
+ }
96
+ if (major === 16) {
97
+ if (minor > 1) {
98
+ return true;
88
99
  }
89
- if (major > 16) {
100
+ if (minor === 1) {
101
+ // 16.1.1+ and canaries support this feature
102
+ if (patch > 0) {
90
103
  return true;
104
+ }
105
+ if (canaryVersion !== undefined) {
106
+ // 16.1.0-canary.3+
107
+ return canaryVersion >= 3;
108
+ } else {
109
+ // Next.js 16.1.0
110
+ return true;
111
+ }
91
112
  }
92
- if (major === 16) {
93
- if (minor > 1) {
94
- return true;
95
- }
96
- if (minor === 1) {
97
- // 16.1.1+ and canaries support this feature
98
- if (patch > 0) {
99
- return true;
100
- }
101
- if (canaryVersion !== undefined) {
102
- // 16.1.0-canary.3+
103
- return canaryVersion >= 3;
104
- } else {
105
- // Next.js 16.1.0
106
- return true;
107
- }
108
- }
109
- }
110
- return false;
113
+ }
114
+ return false;
111
115
  }
112
-
113
116
  //# sourceMappingURL=withPayload.utils.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/withPayload/withPayload.utils.ts"],"sourcesContent":["/* eslint-disable no-console */\n/**\n * This was taken and modified from https://github.com/getsentry/sentry-javascript/blob/15256034ee8150a5b7dcb97d23eca1a5486f0cae/packages/nextjs/src/config/util.ts\n *\n * MIT License\n *\n * Copyright (c) 2012 Functional Software, Inc. dba Sentry\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n * of the Software, and to permit persons to whom the Software is furnished to do\n * so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { readFileSync } from 'fs'\nimport { fileURLToPath } from 'url'\n\nfunction _parseInt(input: string | undefined): number {\n return parseInt(input || '', 10)\n}\n\n/**\n * Represents Semantic Versioning object\n */\ntype SemVer = {\n buildmetadata?: string\n /**\n * undefined if not a canary version\n */\n canaryVersion?: number\n major?: number\n minor?: number\n patch?: number\n prerelease?: string\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP =\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$/i\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nexport function parseSemver(input: string): SemVer {\n const match = input.match(SEMVER_REGEXP) || []\n const major = _parseInt(match[1])\n const minor = _parseInt(match[2])\n const patch = _parseInt(match[3])\n\n const prerelease = match[4]\n const canaryVersion = prerelease?.startsWith('canary.')\n ? parseInt(prerelease.split('.')[1] || '0', 10)\n : undefined\n\n return {\n buildmetadata: match[5],\n canaryVersion,\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n }\n}\n\n/**\n * Returns the version of Next.js installed in the project, or undefined if it cannot be determined.\n */\nexport function getNextjsVersion(): SemVer | undefined {\n try {\n let pkgPath: string\n\n // Check if we're in ESM or CJS environment\n if (typeof import.meta?.resolve === 'function') {\n // ESM environment - use import.meta.resolve\n const pkgUrl = import.meta.resolve('next/package.json')\n // Use fileURLToPath for proper cross-platform path handling (Windows, macOS, Linux)\n // new URL().pathname returns '/C:/path' on Windows which causes path resolution issues\n pkgPath = fileURLToPath(pkgUrl)\n } else {\n // CJS environment - use require.resolve\n pkgPath = require.resolve('next/package.json')\n }\n\n const pkgJson = JSON.parse(readFileSync(pkgPath, 'utf8'))\n return parseSemver(pkgJson.version)\n } catch (e) {\n console.error('Payload: Error getting Next.js version', e)\n return undefined\n }\n}\n\n/**\n * Checks if the current Next.js version supports Turbopack externalize transitive dependencies.\n * This was introduced in Next.js v16.1.0-canary.3\n */\nexport function supportsTurbopackExternalizeTransitiveDependencies(\n version: SemVer | undefined,\n): boolean {\n if (!version) {\n return false\n }\n\n const { canaryVersion, major, minor, patch } = version\n\n if (major === undefined || minor === undefined) {\n return false\n }\n\n if (major > 16) {\n return true\n }\n\n if (major === 16) {\n if (minor > 1) {\n return true\n }\n if (minor === 1) {\n // 16.1.1+ and canaries support this feature\n if (patch > 0) {\n return true\n }\n if (canaryVersion !== undefined) {\n // 16.1.0-canary.3+\n return canaryVersion >= 3\n } else {\n // Next.js 16.1.0\n return true\n }\n }\n }\n\n return false\n}\n"],"names":["readFileSync","fileURLToPath","_parseInt","input","parseInt","SEMVER_REGEXP","parseSemver","match","major","minor","patch","prerelease","canaryVersion","startsWith","split","undefined","buildmetadata","isNaN","getNextjsVersion","pkgPath","resolve","pkgUrl","require","pkgJson","JSON","parse","version","e","console","error","supportsTurbopackExternalizeTransitiveDependencies"],"mappings":"AAAA,6BAA6B,GAC7B;;;;;;;;;;;;;;;;;;;;;;;;CAwBC,GAED,SAASA,YAAY,QAAQ,KAAI;AACjC,SAASC,aAAa,QAAQ,MAAK;AAEnC,SAASC,UAAUC,KAAyB;IAC1C,OAAOC,SAASD,SAAS,IAAI;AAC/B;AAEA;;CAEC,GAGC;;GAEC,GAQH,6FAA6F;AAC7F,MAAME,gBACJ;AAEF;;;CAGC,GACD,OAAO,SAASC,YAAYH,KAAa;IACvC,MAAMI,QAAQJ,MAAMI,KAAK,CAACF,kBAAkB,EAAE;IAC9C,MAAMG,QAAQN,UAAUK,KAAK,CAAC,EAAE;IAChC,MAAME,QAAQP,UAAUK,KAAK,CAAC,EAAE;IAChC,MAAMG,QAAQR,UAAUK,KAAK,CAAC,EAAE;IAEhC,MAAMI,aAAaJ,KAAK,CAAC,EAAE;IAC3B,MAAMK,gBAAgBD,YAAYE,WAAW,aACzCT,SAASO,WAAWG,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,KAAK,MAC1CC;IAEJ,OAAO;QACLC,eAAeT,KAAK,CAAC,EAAE;QACvBK;QACAJ,OAAOS,MAAMT,SAASO,YAAYP;QAClCC,OAAOQ,MAAMR,SAASM,YAAYN;QAClCC,OAAOO,MAAMP,SAASK,YAAYL;QAClCC,YAAYJ,KAAK,CAAC,EAAE;IACtB;AACF;AAEA;;CAEC,GACD,OAAO,SAASW;IACd,IAAI;QACF,IAAIC;QAEJ,2CAA2C;QAC3C,IAAI,OAAO,aAAaC,YAAY,YAAY;YAC9C,4CAA4C;YAC5C,MAAMC,SAAS,YAAYD,OAAO,CAAC;YACnC,oFAAoF;YACpF,uFAAuF;YACvFD,UAAUlB,cAAcoB;QAC1B,OAAO;YACL,wCAAwC;YACxCF,UAAUG,QAAQF,OAAO,CAAC;QAC5B;QAEA,MAAMG,UAAUC,KAAKC,KAAK,CAACzB,aAAamB,SAAS;QACjD,OAAOb,YAAYiB,QAAQG,OAAO;IACpC,EAAE,OAAOC,GAAG;QACVC,QAAQC,KAAK,CAAC,0CAA0CF;QACxD,OAAOZ;IACT;AACF;AAEA;;;CAGC,GACD,OAAO,SAASe,mDACdJ,OAA2B;IAE3B,IAAI,CAACA,SAAS;QACZ,OAAO;IACT;IAEA,MAAM,EAAEd,aAAa,EAAEJ,KAAK,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGgB;IAE/C,IAAIlB,UAAUO,aAAaN,UAAUM,WAAW;QAC9C,OAAO;IACT;IAEA,IAAIP,QAAQ,IAAI;QACd,OAAO;IACT;IAEA,IAAIA,UAAU,IAAI;QAChB,IAAIC,QAAQ,GAAG;YACb,OAAO;QACT;QACA,IAAIA,UAAU,GAAG;YACf,4CAA4C;YAC5C,IAAIC,QAAQ,GAAG;gBACb,OAAO;YACT;YACA,IAAIE,kBAAkBG,WAAW;gBAC/B,mBAAmB;gBACnB,OAAOH,iBAAiB;YAC1B,OAAO;gBACL,iBAAiB;gBACjB,OAAO;YACT;QACF;IACF;IAEA,OAAO;AACT"}
1
+ {"version":3,"file":"withPayload.utils.js","names":["readFileSync","fileURLToPath","_parseInt","input","parseInt","SEMVER_REGEXP","parseSemver","match","major","minor","patch","prerelease","canaryVersion","startsWith","split","undefined","buildmetadata","isNaN","getNextjsVersion","pkgPath","import","meta","resolve","pkgUrl","require","pkgJson","JSON","parse","version","e","console","error","supportsTurbopackExternalizeTransitiveDependencies"],"sources":["../../src/withPayload/withPayload.utils.ts"],"sourcesContent":["/* eslint-disable no-console */\n/**\n * This was taken and modified from https://github.com/getsentry/sentry-javascript/blob/15256034ee8150a5b7dcb97d23eca1a5486f0cae/packages/nextjs/src/config/util.ts\n *\n * MIT License\n *\n * Copyright (c) 2012 Functional Software, Inc. dba Sentry\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n * of the Software, and to permit persons to whom the Software is furnished to do\n * so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { readFileSync } from 'fs'\nimport { fileURLToPath } from 'url'\n\nfunction _parseInt(input: string | undefined): number {\n return parseInt(input || '', 10)\n}\n\n/**\n * Represents Semantic Versioning object\n */\ntype SemVer = {\n buildmetadata?: string\n /**\n * undefined if not a canary version\n */\n canaryVersion?: number\n major?: number\n minor?: number\n patch?: number\n prerelease?: string\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP =\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$/i\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nexport function parseSemver(input: string): SemVer {\n const match = input.match(SEMVER_REGEXP) || []\n const major = _parseInt(match[1])\n const minor = _parseInt(match[2])\n const patch = _parseInt(match[3])\n\n const prerelease = match[4]\n const canaryVersion = prerelease?.startsWith('canary.')\n ? parseInt(prerelease.split('.')[1] || '0', 10)\n : undefined\n\n return {\n buildmetadata: match[5],\n canaryVersion,\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n }\n}\n\n/**\n * Returns the version of Next.js installed in the project, or undefined if it cannot be determined.\n */\nexport function getNextjsVersion(): SemVer | undefined {\n try {\n let pkgPath: string\n\n // Check if we're in ESM or CJS environment\n if (typeof import.meta?.resolve === 'function') {\n // ESM environment - use import.meta.resolve\n const pkgUrl = import.meta.resolve('next/package.json')\n // Use fileURLToPath for proper cross-platform path handling (Windows, macOS, Linux)\n // new URL().pathname returns '/C:/path' on Windows which causes path resolution issues\n pkgPath = fileURLToPath(pkgUrl)\n } else {\n // CJS environment - use require.resolve\n pkgPath = require.resolve('next/package.json')\n }\n\n const pkgJson = JSON.parse(readFileSync(pkgPath, 'utf8'))\n return parseSemver(pkgJson.version)\n } catch (e) {\n console.error('Payload: Error getting Next.js version', e)\n return undefined\n }\n}\n\n/**\n * Checks if the current Next.js version supports Turbopack externalize transitive dependencies.\n * This was introduced in Next.js v16.1.0-canary.3\n */\nexport function supportsTurbopackExternalizeTransitiveDependencies(\n version: SemVer | undefined,\n): boolean {\n if (!version) {\n return false\n }\n\n const { canaryVersion, major, minor, patch } = version\n\n if (major === undefined || minor === undefined) {\n return false\n }\n\n if (major > 16) {\n return true\n }\n\n if (major === 16) {\n if (minor > 1) {\n return true\n }\n if (minor === 1) {\n // 16.1.1+ and canaries support this feature\n if (patch > 0) {\n return true\n }\n if (canaryVersion !== undefined) {\n // 16.1.0-canary.3+\n return canaryVersion >= 3\n } else {\n // Next.js 16.1.0\n return true\n }\n }\n }\n\n return false\n}\n"],"mappings":"AAAA,gCACA;;;;;;;;;;;;;;;;;;;;;;;;kCA0BA,SAASA,YAAY,QAAQ;AAC7B,SAASC,aAAa,QAAQ;AAE9B,SAASC,UAAUC,KAAyB;EAC1C,OAAOC,QAAA,CAASD,KAAA,IAAS,IAAI;AAC/B;AAiBA;AACA,MAAME,aAAA,GACJ;AAEF;;;;AAIA,OAAO,SAASC,YAAYH,KAAa;EACvC,MAAMI,KAAA,GAAQJ,KAAA,CAAMI,KAAK,CAACF,aAAA,KAAkB,EAAE;EAC9C,MAAMG,KAAA,GAAQN,SAAA,CAAUK,KAAK,CAAC,EAAE;EAChC,MAAME,KAAA,GAAQP,SAAA,CAAUK,KAAK,CAAC,EAAE;EAChC,MAAMG,KAAA,GAAQR,SAAA,CAAUK,KAAK,CAAC,EAAE;EAEhC,MAAMI,UAAA,GAAaJ,KAAK,CAAC,EAAE;EAC3B,MAAMK,aAAA,GAAgBD,UAAA,EAAYE,UAAA,CAAW,aACzCT,QAAA,CAASO,UAAA,CAAWG,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,KAAK,MAC1CC,SAAA;EAEJ,OAAO;IACLC,aAAA,EAAeT,KAAK,CAAC,EAAE;IACvBK,aAAA;IACAJ,KAAA,EAAOS,KAAA,CAAMT,KAAA,IAASO,SAAA,GAAYP,KAAA;IAClCC,KAAA,EAAOQ,KAAA,CAAMR,KAAA,IAASM,SAAA,GAAYN,KAAA;IAClCC,KAAA,EAAOO,KAAA,CAAMP,KAAA,IAASK,SAAA,GAAYL,KAAA;IAClCC,UAAA,EAAYJ,KAAK,CAAC;EACpB;AACF;AAEA;;;AAGA,OAAO,SAASW,iBAAA;EACd,IAAI;IACF,IAAIC,OAAA;IAEJ;IACA,IAAI,OAAOC,MAAA,CAAAC,IAAA,EAAaC,OAAA,KAAY,YAAY;MAC9C;MACA,MAAMC,MAAA,GAASH,MAAA,CAAAC,IAAA,CAAYC,OAAO,CAAC;MACnC;MACA;MACAH,OAAA,GAAUlB,aAAA,CAAcsB,MAAA;IAC1B,OAAO;MACL;MACAJ,OAAA,GAAUK,OAAA,CAAQF,OAAO,CAAC;IAC5B;IAEA,MAAMG,OAAA,GAAUC,IAAA,CAAKC,KAAK,CAAC3B,YAAA,CAAamB,OAAA,EAAS;IACjD,OAAOb,WAAA,CAAYmB,OAAA,CAAQG,OAAO;EACpC,EAAE,OAAOC,CAAA,EAAG;IACVC,OAAA,CAAQC,KAAK,CAAC,0CAA0CF,CAAA;IACxD,OAAOd,SAAA;EACT;AACF;AAEA;;;;AAIA,OAAO,SAASiB,mDACdJ,OAA2B;EAE3B,IAAI,CAACA,OAAA,EAAS;IACZ,OAAO;EACT;EAEA,MAAM;IAAEhB,aAAa;IAAEJ,KAAK;IAAEC,KAAK;IAAEC;EAAK,CAAE,GAAGkB,OAAA;EAE/C,IAAIpB,KAAA,KAAUO,SAAA,IAAaN,KAAA,KAAUM,SAAA,EAAW;IAC9C,OAAO;EACT;EAEA,IAAIP,KAAA,GAAQ,IAAI;IACd,OAAO;EACT;EAEA,IAAIA,KAAA,KAAU,IAAI;IAChB,IAAIC,KAAA,GAAQ,GAAG;MACb,OAAO;IACT;IACA,IAAIA,KAAA,KAAU,GAAG;MACf;MACA,IAAIC,KAAA,GAAQ,GAAG;QACb,OAAO;MACT;MACA,IAAIE,aAAA,KAAkBG,SAAA,EAAW;QAC/B;QACA,OAAOH,aAAA,IAAiB;MAC1B,OAAO;QACL;QACA,OAAO;MACT;IACF;EACF;EAEA,OAAO;AACT","ignoreList":[]}
@@ -1,46 +1,44 @@
1
1
  /* eslint-disable no-console */ /**
2
- * Applies config options required to support Next.js versions before 16.1.0 and 16.1.0-canary.3.
3
- */ export const withPayloadLegacy = (nextConfig = {})=>{
4
- if (process.env.PAYLOAD_PATCH_TURBOPACK_WARNINGS !== 'false') {
5
- // TODO: This warning is thrown because we cannot externalize the entry-point package for client-s3, so we patch the warning to not show it.
6
- // We can remove this once Next.js implements https://github.com/vercel/next.js/discussions/76991
7
- const turbopackWarningText = 'Packages that should be external need to be installed in the project directory, so they can be resolved from the output files.\nTry to install it into the project directory by running';
8
- // TODO 4.0: Remove this once we drop support for Next.js 15.2.x
9
- const turbopackConfigWarningText = "Unrecognized key(s) in object: 'turbopack'";
10
- const consoleWarn = console.warn;
11
- console.warn = (...args)=>{
12
- // Force to disable serverExternalPackages warnings: https://github.com/vercel/next.js/issues/68805
13
- if (typeof args[1] === 'string' && args[1].includes(turbopackWarningText) || typeof args[0] === 'string' && args[0].includes(turbopackWarningText)) {
14
- return;
15
- }
16
- // Add Payload-specific message after turbopack config warning in Next.js 15.2.x or lower.
17
- // TODO 4.0: Remove this once we drop support for Next.js 15.2.x
18
- const hasTurbopackConfigWarning = typeof args[1] === 'string' && args[1].includes(turbopackConfigWarningText) || typeof args[0] === 'string' && args[0].includes(turbopackConfigWarningText);
19
- if (hasTurbopackConfigWarning) {
20
- consoleWarn(...args);
21
- consoleWarn('Payload: You can safely ignore the "Invalid next.config" warning above. This only occurs on Next.js 15.2.x or lower. We recommend upgrading to the latest supported Next.js version to resolve this warning.');
22
- return;
23
- }
24
- consoleWarn(...args);
25
- };
26
- }
27
- const isBuild = process.env.NODE_ENV === 'production';
28
- const isTurbopackNextjs15 = process.env.TURBOPACK === '1';
29
- const isTurbopackNextjs16 = process.env.TURBOPACK === 'auto';
30
- if (isBuild && (isTurbopackNextjs15 || isTurbopackNextjs16)) {
31
- throw new Error('Your Next.js version does not support using Turbopack for production builds. The *minimum* Next.js version required for Turbopack Builds is 16.1.0. Please upgrade to the latest supported Next.js version to resolve this error.');
32
- }
33
- const toReturn = {
34
- ...nextConfig,
35
- serverExternalPackages: [
36
- // serverExternalPackages = webpack.externals, but with turbopack support and an additional check
37
- // for whether the package is resolvable from the project root
38
- ...nextConfig.serverExternalPackages || [],
39
- // External, because it installs import-in-the-middle and require-in-the-middle - both in the default serverExternalPackages list.
40
- '@sentry/nextjs'
41
- ]
2
+ * Applies config options required to support Next.js versions before 16.1.0 and 16.1.0-canary.3.
3
+ */export const withPayloadLegacy = (nextConfig = {}) => {
4
+ if (process.env.PAYLOAD_PATCH_TURBOPACK_WARNINGS !== 'false') {
5
+ // TODO: This warning is thrown because we cannot externalize the entry-point package for client-s3, so we patch the warning to not show it.
6
+ // We can remove this once Next.js implements https://github.com/vercel/next.js/discussions/76991
7
+ const turbopackWarningText = 'Packages that should be external need to be installed in the project directory, so they can be resolved from the output files.\nTry to install it into the project directory by running';
8
+ // TODO 4.0: Remove this once we drop support for Next.js 15.2.x
9
+ const turbopackConfigWarningText = "Unrecognized key(s) in object: 'turbopack'";
10
+ const consoleWarn = console.warn;
11
+ console.warn = (...args) => {
12
+ // Force to disable serverExternalPackages warnings: https://github.com/vercel/next.js/issues/68805
13
+ if (typeof args[1] === 'string' && args[1].includes(turbopackWarningText) || typeof args[0] === 'string' && args[0].includes(turbopackWarningText)) {
14
+ return;
15
+ }
16
+ // Add Payload-specific message after turbopack config warning in Next.js 15.2.x or lower.
17
+ // TODO 4.0: Remove this once we drop support for Next.js 15.2.x
18
+ const hasTurbopackConfigWarning = typeof args[1] === 'string' && args[1].includes(turbopackConfigWarningText) || typeof args[0] === 'string' && args[0].includes(turbopackConfigWarningText);
19
+ if (hasTurbopackConfigWarning) {
20
+ consoleWarn(...args);
21
+ consoleWarn('Payload: You can safely ignore the "Invalid next.config" warning above. This only occurs on Next.js 15.2.x or lower. We recommend upgrading to the latest supported Next.js version to resolve this warning.');
22
+ return;
23
+ }
24
+ consoleWarn(...args);
42
25
  };
43
- return toReturn;
26
+ }
27
+ const isBuild = process.env.NODE_ENV === 'production';
28
+ const isTurbopackNextjs15 = process.env.TURBOPACK === '1';
29
+ const isTurbopackNextjs16 = process.env.TURBOPACK === 'auto';
30
+ if (isBuild && (isTurbopackNextjs15 || isTurbopackNextjs16)) {
31
+ throw new Error('Your Next.js version does not support using Turbopack for production builds. The *minimum* Next.js version required for Turbopack Builds is 16.1.0. Please upgrade to the latest supported Next.js version to resolve this error.');
32
+ }
33
+ const toReturn = {
34
+ ...nextConfig,
35
+ serverExternalPackages: [
36
+ // serverExternalPackages = webpack.externals, but with turbopack support and an additional check
37
+ // for whether the package is resolvable from the project root
38
+ ...(nextConfig.serverExternalPackages || []),
39
+ // External, because it installs import-in-the-middle and require-in-the-middle - both in the default serverExternalPackages list.
40
+ '@sentry/nextjs']
41
+ };
42
+ return toReturn;
44
43
  };
45
-
46
44
  //# sourceMappingURL=withPayloadLegacy.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/withPayload/withPayloadLegacy.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport type { NextConfig } from 'next'\n\n/**\n * Applies config options required to support Next.js versions before 16.1.0 and 16.1.0-canary.3.\n */\nexport const withPayloadLegacy = (nextConfig: NextConfig = {}): NextConfig => {\n if (process.env.PAYLOAD_PATCH_TURBOPACK_WARNINGS !== 'false') {\n // TODO: This warning is thrown because we cannot externalize the entry-point package for client-s3, so we patch the warning to not show it.\n // We can remove this once Next.js implements https://github.com/vercel/next.js/discussions/76991\n const turbopackWarningText =\n 'Packages that should be external need to be installed in the project directory, so they can be resolved from the output files.\\nTry to install it into the project directory by running'\n\n // TODO 4.0: Remove this once we drop support for Next.js 15.2.x\n const turbopackConfigWarningText = \"Unrecognized key(s) in object: 'turbopack'\"\n\n const consoleWarn = console.warn\n console.warn = (...args) => {\n // Force to disable serverExternalPackages warnings: https://github.com/vercel/next.js/issues/68805\n if (\n (typeof args[1] === 'string' && args[1].includes(turbopackWarningText)) ||\n (typeof args[0] === 'string' && args[0].includes(turbopackWarningText))\n ) {\n return\n }\n\n // Add Payload-specific message after turbopack config warning in Next.js 15.2.x or lower.\n // TODO 4.0: Remove this once we drop support for Next.js 15.2.x\n const hasTurbopackConfigWarning =\n (typeof args[1] === 'string' && args[1].includes(turbopackConfigWarningText)) ||\n (typeof args[0] === 'string' && args[0].includes(turbopackConfigWarningText))\n\n if (hasTurbopackConfigWarning) {\n consoleWarn(...args)\n consoleWarn(\n 'Payload: You can safely ignore the \"Invalid next.config\" warning above. This only occurs on Next.js 15.2.x or lower. We recommend upgrading to the latest supported Next.js version to resolve this warning.',\n )\n return\n }\n\n consoleWarn(...args)\n }\n }\n\n const isBuild = process.env.NODE_ENV === 'production'\n const isTurbopackNextjs15 = process.env.TURBOPACK === '1'\n const isTurbopackNextjs16 = process.env.TURBOPACK === 'auto'\n\n if (isBuild && (isTurbopackNextjs15 || isTurbopackNextjs16)) {\n throw new Error(\n 'Your Next.js version does not support using Turbopack for production builds. The *minimum* Next.js version required for Turbopack Builds is 16.1.0. Please upgrade to the latest supported Next.js version to resolve this error.',\n )\n }\n\n const toReturn: NextConfig = {\n ...nextConfig,\n serverExternalPackages: [\n // serverExternalPackages = webpack.externals, but with turbopack support and an additional check\n // for whether the package is resolvable from the project root\n ...(nextConfig.serverExternalPackages || []),\n // External, because it installs import-in-the-middle and require-in-the-middle - both in the default serverExternalPackages list.\n '@sentry/nextjs',\n ],\n }\n\n return toReturn\n}\n"],"names":["withPayloadLegacy","nextConfig","process","env","PAYLOAD_PATCH_TURBOPACK_WARNINGS","turbopackWarningText","turbopackConfigWarningText","consoleWarn","console","warn","args","includes","hasTurbopackConfigWarning","isBuild","NODE_ENV","isTurbopackNextjs15","TURBOPACK","isTurbopackNextjs16","Error","toReturn","serverExternalPackages"],"mappings":"AAAA,6BAA6B,GAG7B;;CAEC,GACD,OAAO,MAAMA,oBAAoB,CAACC,aAAyB,CAAC,CAAC;IAC3D,IAAIC,QAAQC,GAAG,CAACC,gCAAgC,KAAK,SAAS;QAC5D,4IAA4I;QAC5I,iGAAiG;QACjG,MAAMC,uBACJ;QAEF,gEAAgE;QAChE,MAAMC,6BAA6B;QAEnC,MAAMC,cAAcC,QAAQC,IAAI;QAChCD,QAAQC,IAAI,GAAG,CAAC,GAAGC;YACjB,mGAAmG;YACnG,IACE,AAAC,OAAOA,IAAI,CAAC,EAAE,KAAK,YAAYA,IAAI,CAAC,EAAE,CAACC,QAAQ,CAACN,yBAChD,OAAOK,IAAI,CAAC,EAAE,KAAK,YAAYA,IAAI,CAAC,EAAE,CAACC,QAAQ,CAACN,uBACjD;gBACA;YACF;YAEA,0FAA0F;YAC1F,gEAAgE;YAChE,MAAMO,4BACJ,AAAC,OAAOF,IAAI,CAAC,EAAE,KAAK,YAAYA,IAAI,CAAC,EAAE,CAACC,QAAQ,CAACL,+BAChD,OAAOI,IAAI,CAAC,EAAE,KAAK,YAAYA,IAAI,CAAC,EAAE,CAACC,QAAQ,CAACL;YAEnD,IAAIM,2BAA2B;gBAC7BL,eAAeG;gBACfH,YACE;gBAEF;YACF;YAEAA,eAAeG;QACjB;IACF;IAEA,MAAMG,UAAUX,QAAQC,GAAG,CAACW,QAAQ,KAAK;IACzC,MAAMC,sBAAsBb,QAAQC,GAAG,CAACa,SAAS,KAAK;IACtD,MAAMC,sBAAsBf,QAAQC,GAAG,CAACa,SAAS,KAAK;IAEtD,IAAIH,WAAYE,CAAAA,uBAAuBE,mBAAkB,GAAI;QAC3D,MAAM,IAAIC,MACR;IAEJ;IAEA,MAAMC,WAAuB;QAC3B,GAAGlB,UAAU;QACbmB,wBAAwB;YACtB,iGAAiG;YACjG,8DAA8D;eAC1DnB,WAAWmB,sBAAsB,IAAI,EAAE;YAC3C,kIAAkI;YAClI;SACD;IACH;IAEA,OAAOD;AACT,EAAC"}
1
+ {"version":3,"file":"withPayloadLegacy.js","names":["withPayloadLegacy","nextConfig","process","env","PAYLOAD_PATCH_TURBOPACK_WARNINGS","turbopackWarningText","turbopackConfigWarningText","consoleWarn","console","warn","args","includes","hasTurbopackConfigWarning","isBuild","NODE_ENV","isTurbopackNextjs15","TURBOPACK","isTurbopackNextjs16","Error","toReturn","serverExternalPackages"],"sources":["../../src/withPayload/withPayloadLegacy.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport type { NextConfig } from 'next'\n\n/**\n * Applies config options required to support Next.js versions before 16.1.0 and 16.1.0-canary.3.\n */\nexport const withPayloadLegacy = (nextConfig: NextConfig = {}): NextConfig => {\n if (process.env.PAYLOAD_PATCH_TURBOPACK_WARNINGS !== 'false') {\n // TODO: This warning is thrown because we cannot externalize the entry-point package for client-s3, so we patch the warning to not show it.\n // We can remove this once Next.js implements https://github.com/vercel/next.js/discussions/76991\n const turbopackWarningText =\n 'Packages that should be external need to be installed in the project directory, so they can be resolved from the output files.\\nTry to install it into the project directory by running'\n\n // TODO 4.0: Remove this once we drop support for Next.js 15.2.x\n const turbopackConfigWarningText = \"Unrecognized key(s) in object: 'turbopack'\"\n\n const consoleWarn = console.warn\n console.warn = (...args) => {\n // Force to disable serverExternalPackages warnings: https://github.com/vercel/next.js/issues/68805\n if (\n (typeof args[1] === 'string' && args[1].includes(turbopackWarningText)) ||\n (typeof args[0] === 'string' && args[0].includes(turbopackWarningText))\n ) {\n return\n }\n\n // Add Payload-specific message after turbopack config warning in Next.js 15.2.x or lower.\n // TODO 4.0: Remove this once we drop support for Next.js 15.2.x\n const hasTurbopackConfigWarning =\n (typeof args[1] === 'string' && args[1].includes(turbopackConfigWarningText)) ||\n (typeof args[0] === 'string' && args[0].includes(turbopackConfigWarningText))\n\n if (hasTurbopackConfigWarning) {\n consoleWarn(...args)\n consoleWarn(\n 'Payload: You can safely ignore the \"Invalid next.config\" warning above. This only occurs on Next.js 15.2.x or lower. We recommend upgrading to the latest supported Next.js version to resolve this warning.',\n )\n return\n }\n\n consoleWarn(...args)\n }\n }\n\n const isBuild = process.env.NODE_ENV === 'production'\n const isTurbopackNextjs15 = process.env.TURBOPACK === '1'\n const isTurbopackNextjs16 = process.env.TURBOPACK === 'auto'\n\n if (isBuild && (isTurbopackNextjs15 || isTurbopackNextjs16)) {\n throw new Error(\n 'Your Next.js version does not support using Turbopack for production builds. The *minimum* Next.js version required for Turbopack Builds is 16.1.0. Please upgrade to the latest supported Next.js version to resolve this error.',\n )\n }\n\n const toReturn: NextConfig = {\n ...nextConfig,\n serverExternalPackages: [\n // serverExternalPackages = webpack.externals, but with turbopack support and an additional check\n // for whether the package is resolvable from the project root\n ...(nextConfig.serverExternalPackages || []),\n // External, because it installs import-in-the-middle and require-in-the-middle - both in the default serverExternalPackages list.\n '@sentry/nextjs',\n ],\n }\n\n return toReturn\n}\n"],"mappings":"AAAA,gCAGA;;kCAGA,OAAO,MAAMA,iBAAA,GAAoBA,CAACC,UAAA,GAAyB,CAAC,CAAC;EAC3D,IAAIC,OAAA,CAAQC,GAAG,CAACC,gCAAgC,KAAK,SAAS;IAC5D;IACA;IACA,MAAMC,oBAAA,GACJ;IAEF;IACA,MAAMC,0BAAA,GAA6B;IAEnC,MAAMC,WAAA,GAAcC,OAAA,CAAQC,IAAI;IAChCD,OAAA,CAAQC,IAAI,GAAG,CAAC,GAAGC,IAAA;MACjB;MACA,IACE,OAAQA,IAAI,CAAC,EAAE,KAAK,YAAYA,IAAI,CAAC,EAAE,CAACC,QAAQ,CAACN,oBAAA,KAChD,OAAOK,IAAI,CAAC,EAAE,KAAK,YAAYA,IAAI,CAAC,EAAE,CAACC,QAAQ,CAACN,oBAAA,GACjD;QACA;MACF;MAEA;MACA;MACA,MAAMO,yBAAA,GACJ,OAAQF,IAAI,CAAC,EAAE,KAAK,YAAYA,IAAI,CAAC,EAAE,CAACC,QAAQ,CAACL,0BAAA,KAChD,OAAOI,IAAI,CAAC,EAAE,KAAK,YAAYA,IAAI,CAAC,EAAE,CAACC,QAAQ,CAACL,0BAAA;MAEnD,IAAIM,yBAAA,EAA2B;QAC7BL,WAAA,IAAeG,IAAA;QACfH,WAAA,CACE;QAEF;MACF;MAEAA,WAAA,IAAeG,IAAA;IACjB;EACF;EAEA,MAAMG,OAAA,GAAUX,OAAA,CAAQC,GAAG,CAACW,QAAQ,KAAK;EACzC,MAAMC,mBAAA,GAAsBb,OAAA,CAAQC,GAAG,CAACa,SAAS,KAAK;EACtD,MAAMC,mBAAA,GAAsBf,OAAA,CAAQC,GAAG,CAACa,SAAS,KAAK;EAEtD,IAAIH,OAAA,KAAYE,mBAAA,IAAuBE,mBAAkB,GAAI;IAC3D,MAAM,IAAIC,KAAA,CACR;EAEJ;EAEA,MAAMC,QAAA,GAAuB;IAC3B,GAAGlB,UAAU;IACbmB,sBAAA,EAAwB;IACtB;IACA;QACInB,UAAA,CAAWmB,sBAAsB,IAAI,EAAE;IAC3C;IACA;EAEJ;EAEA,OAAOD,QAAA;AACT","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/next",
3
- "version": "3.71.0-internal-debug.80dab4c",
3
+ "version": "3.71.0-internal.27e1e08",
4
4
  "homepage": "https://payloadcms.com",
5
5
  "repository": {
6
6
  "type": "git",
@@ -99,9 +99,9 @@
99
99
  "qs-esm": "7.0.2",
100
100
  "sass": "1.77.4",
101
101
  "uuid": "10.0.0",
102
- "@payloadcms/graphql": "3.71.0-internal-debug.80dab4c",
103
- "@payloadcms/ui": "3.71.0-internal-debug.80dab4c",
104
- "@payloadcms/translations": "3.71.0-internal-debug.80dab4c"
102
+ "@payloadcms/graphql": "3.71.0-internal.27e1e08",
103
+ "@payloadcms/translations": "3.71.0-internal.27e1e08",
104
+ "@payloadcms/ui": "3.71.0-internal.27e1e08"
105
105
  },
106
106
  "devDependencies": {
107
107
  "@babel/cli": "7.27.2",
@@ -118,13 +118,13 @@
118
118
  "esbuild": "0.25.5",
119
119
  "esbuild-sass-plugin": "3.3.1",
120
120
  "swc-plugin-transform-remove-imports": "8.3.0",
121
- "@payloadcms/eslint-config": "3.28.0",
122
- "payload": "3.71.0-internal-debug.80dab4c"
121
+ "payload": "3.71.0-internal.27e1e08",
122
+ "@payloadcms/eslint-config": "3.28.0"
123
123
  },
124
124
  "peerDependencies": {
125
125
  "graphql": "^16.8.1",
126
126
  "next": "^15.4.10",
127
- "payload": "3.71.0-internal-debug.80dab4c"
127
+ "payload": "3.71.0-internal.27e1e08"
128
128
  },
129
129
  "engines": {
130
130
  "node": "^18.20.2 || >=20.9.0"
@@ -1,38 +0,0 @@
1
- @import '~@payloadcms/ui/scss';
2
-
3
- @layer payload-default {
4
- .doc-tab {
5
- display: flex;
6
- justify-content: center;
7
- align-items: center;
8
- white-space: nowrap;
9
-
10
- &:hover {
11
- .pill-version-count {
12
- background-color: var(--theme-elevation-150);
13
- }
14
- }
15
-
16
- &--active {
17
- .pill-version-count {
18
- background-color: var(--theme-elevation-250);
19
- }
20
-
21
- &:hover {
22
- .pill-version-count {
23
- background-color: var(--theme-elevation-250);
24
- }
25
- }
26
- }
27
-
28
- &__label {
29
- display: flex;
30
- position: relative;
31
- align-items: center;
32
- gap: 4px;
33
- width: 100%;
34
- height: 100%;
35
- line-height: calc(var(--base) * 1.2);
36
- }
37
- }
38
- }
@@ -1,54 +0,0 @@
1
- @import '~@payloadcms/ui/scss';
2
-
3
- @layer payload-default {
4
- .doc-tabs {
5
- display: flex;
6
-
7
- &__tabs {
8
- display: flex;
9
- gap: calc(var(--base) / 2);
10
- list-style: none;
11
- align-items: center;
12
- margin: 0;
13
- padding-left: 0;
14
- }
15
-
16
- @include mid-break {
17
- width: 100%;
18
- padding: 0;
19
- overflow: auto;
20
-
21
- // this container has a gradient overlay as visual indication of `overflow: scroll`
22
- &::-webkit-scrollbar {
23
- display: none;
24
- }
25
-
26
- &::after {
27
- content: '';
28
- display: block;
29
- position: sticky;
30
- right: 0;
31
- width: calc(var(--base) * 2);
32
- height: calc(var(--base) * 2);
33
- background: linear-gradient(to right, transparent, var(--theme-bg));
34
- flex-shrink: 0;
35
- z-index: 1111;
36
- pointer-events: none;
37
- }
38
-
39
- &__tabs {
40
- padding: 0;
41
- }
42
- }
43
-
44
- @include small-break {
45
- &__tabs-container {
46
- margin-right: var(--gutter-h);
47
- }
48
-
49
- &__tabs {
50
- gap: var(--gutter-h);
51
- }
52
- }
53
- }
54
- }
@@ -1,9 +0,0 @@
1
- @layer payload-default {
2
- .pill-version-count {
3
- line-height: calc(var(--base) * 0.8);
4
- min-width: calc(var(--base) * 0.8);
5
- text-align: center;
6
- background-color: var(--theme-elevation-100);
7
- border-radius: var(--style-radius-s);
8
- }
9
- }
@@ -1,64 +0,0 @@
1
- @import '~@payloadcms/ui/scss';
2
-
3
- @layer payload-default {
4
- .doc-header {
5
- width: 100%;
6
- margin-top: calc(var(--base) * 0.4);
7
- padding-bottom: calc(var(--base) * 1.2);
8
- position: relative;
9
-
10
- &::after {
11
- content: '';
12
- display: block;
13
- position: absolute;
14
- height: 1px;
15
- background: var(--theme-elevation-100);
16
- width: 100%;
17
- left: 0;
18
- top: calc(100% - 1px);
19
- }
20
-
21
- &__header {
22
- display: flex;
23
- align-items: center;
24
- gap: calc(var(--base) / 2);
25
- }
26
-
27
- &__title {
28
- flex-grow: 1;
29
- white-space: nowrap;
30
- overflow: hidden;
31
- text-overflow: ellipsis;
32
- margin: 0;
33
- padding-bottom: calc(var(--base) * 0.4);
34
- vertical-align: top;
35
- padding-bottom: 0;
36
- }
37
-
38
- &__after-header {
39
- padding-top: calc(var(--base) * 0.8);
40
- }
41
-
42
- @include mid-break {
43
- margin-top: calc(var(--base) * 0.25);
44
- padding-bottom: calc(var(--base) / 1.5);
45
-
46
- &__header {
47
- flex-direction: column;
48
- gap: calc(var(--base) / 2);
49
- }
50
-
51
- &__title {
52
- width: 100%;
53
- }
54
-
55
- &__after-header {
56
- padding-top: calc(var(--base) / 4);
57
- }
58
- }
59
-
60
- @include small-break {
61
- margin-top: 0;
62
- }
63
- }
64
- }
@@ -1,8 +0,0 @@
1
- @layer payload-default {
2
- .form-header {
3
- display: flex;
4
- flex-direction: column;
5
- gap: calc(var(--base) * 0.5);
6
- margin-bottom: var(--base);
7
- }
8
- }
@@ -1,27 +0,0 @@
1
- @import '~@payloadcms/ui/scss';
2
-
3
- @layer payload-default {
4
- .nav {
5
- position: sticky;
6
- top: 0;
7
- left: 0;
8
- flex-shrink: 0;
9
- height: 100vh;
10
- width: var(--nav-width);
11
- border-right: 1px solid var(--theme-elevation-100);
12
- opacity: 0;
13
-
14
- [dir='rtl'] & {
15
- border-right: none;
16
- border-left: 1px solid var(--theme-elevation-100);
17
- }
18
-
19
- &--nav-animate {
20
- transition: opacity var(--nav-trans-time) ease-in-out;
21
- }
22
-
23
- &--nav-open {
24
- opacity: 1;
25
- }
26
- }
27
- }
@@ -1,11 +0,0 @@
1
- @import '~@payloadcms/ui/scss';
2
-
3
- @layer payload-default {
4
- .settings-menu-button {
5
- &.popup--h-align-left {
6
- .popup__content {
7
- left: calc(var(--nav-padding-inline-start) * -0.5);
8
- }
9
- }
10
- }
11
- }