@delmaredigital/payload-experiments 0.4.0-rc.1 → 0.4.0-rc.10

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 (573) hide show
  1. package/README.md +284 -772
  2. package/dist/admin/LayerUsage.js +1 -1
  3. package/dist/admin/MetricSourceSelect.js +2 -2
  4. package/dist/admin/PlacementStatus.js +1 -1
  5. package/dist/admin/TestsDashboardCards.d.ts +1 -0
  6. package/dist/admin/TestsDashboardCards.js +5 -9
  7. package/dist/admin/TestsNavLink.d.ts +1 -0
  8. package/dist/admin/TestsNavLink.js +5 -11
  9. package/dist/admin/blocks/BlockPanel.d.ts +1 -0
  10. package/dist/admin/blocks/BlockPanel.js +129 -37
  11. package/dist/admin/blocks/TestBlockField.js +3 -3
  12. package/dist/admin/blocks/formApi.d.ts +3 -0
  13. package/dist/admin/blocks/formApi.js +10 -4
  14. package/dist/admin/blocks/inject.js +1 -0
  15. package/dist/admin/blocks/model.d.ts +3 -2
  16. package/dist/admin/blocks/model.js +10 -6
  17. package/dist/admin/blocks/statusCache.d.ts +2 -0
  18. package/dist/admin/blocks/statusCache.js +12 -3
  19. package/dist/admin/components/RootViewMessage.js +1 -1
  20. package/dist/admin/copy/blocks.d.ts +21 -1
  21. package/dist/admin/copy/blocks.js +40 -6
  22. package/dist/admin/copy/goals.d.ts +6 -1
  23. package/dist/admin/copy/goals.js +10 -3
  24. package/dist/admin/copy/newTest.d.ts +6 -7
  25. package/dist/admin/copy/newTest.js +9 -7
  26. package/dist/admin/goals/XpGoalField.d.ts +2 -0
  27. package/dist/admin/goals/XpGoalField.js +156 -114
  28. package/dist/admin/goals/xpGoalField.css +47 -0
  29. package/dist/admin/pageCollections.d.ts +1 -0
  30. package/dist/admin/pageCollections.js +3 -0
  31. package/dist/admin/paths.d.ts +3 -0
  32. package/dist/admin/paths.js +3 -0
  33. package/dist/admin/placementStatus.model.js +1 -1
  34. package/dist/admin/status.model.js +1 -1
  35. package/dist/admin/surface/ResultsRoute.d.ts +2 -1
  36. package/dist/admin/surface/ResultsRoute.js +20 -24
  37. package/dist/admin/surface/SurfaceShell.js +5 -2
  38. package/dist/admin/surface/TestRowMenu.d.ts +6 -0
  39. package/dist/admin/surface/TestRowMenu.js +156 -0
  40. package/dist/admin/surface/TestsHome.d.ts +5 -3
  41. package/dist/admin/surface/TestsHome.js +266 -58
  42. package/dist/admin/surface/TestsSurface.js +8 -7
  43. package/dist/admin/surface/goals/GoalForm.d.ts +1 -1
  44. package/dist/admin/surface/goals/GoalForm.js +95 -54
  45. package/dist/admin/surface/goals/GoalsList.d.ts +1 -1
  46. package/dist/admin/surface/goals/GoalsList.js +5 -4
  47. package/dist/admin/surface/goals/data.js +2 -2
  48. package/dist/admin/surface/goals/goals.css +7 -0
  49. package/dist/admin/surface/goals/goals.model.d.ts +11 -1
  50. package/dist/admin/surface/goals/goals.model.js +43 -0
  51. package/dist/admin/surface/home.model.d.ts +9 -8
  52. package/dist/admin/surface/home.model.js +22 -21
  53. package/dist/admin/surface/newTest/NewTest.d.ts +4 -4
  54. package/dist/admin/surface/newTest/NewTest.js +98 -94
  55. package/dist/admin/surface/newTest/PageWizard.d.ts +2 -1
  56. package/dist/admin/surface/newTest/PageWizard.js +111 -76
  57. package/dist/admin/surface/newTest/newTest.css +28 -9
  58. package/dist/admin/surface/results/ResultsHeader.d.ts +2 -2
  59. package/dist/admin/surface/results/ResultsHeader.js +58 -54
  60. package/dist/admin/surface/surface.css +10 -0
  61. package/dist/admin/surface/test/TestPage.d.ts +1 -2
  62. package/dist/admin/surface/test/TestPage.js +42 -162
  63. package/dist/admin/theme.css +2 -0
  64. package/dist/admin/views/CollectionListRedirect.d.ts +1 -0
  65. package/dist/admin/views/CollectionListRedirect.js +1 -1
  66. package/dist/admin/views/ExperimentsRootView.js +18 -165
  67. package/dist/admin/views/GoalEditRedirect.d.ts +4 -0
  68. package/dist/admin/views/GoalEditRedirect.js +14 -0
  69. package/dist/admin/views/GoalsCollectionListView.d.ts +2 -0
  70. package/dist/admin/views/GoalsCollectionListView.js +4 -0
  71. package/dist/admin/views/TestsCollectionListView.d.ts +2 -0
  72. package/dist/admin/views/TestsCollectionListView.js +4 -0
  73. package/dist/admin/views/TestsNavLinkServer.d.ts +1 -0
  74. package/dist/admin/views/TestsNavLinkServer.js +2 -2
  75. package/dist/admin/views/TestsSurfaceClient.d.ts +3 -0
  76. package/dist/admin/views/TestsSurfaceClient.js +11 -0
  77. package/dist/admin/views/buildSurfaceProps.d.ts +8 -0
  78. package/dist/admin/views/buildSurfaceProps.js +102 -0
  79. package/dist/admin/views/renderCollectionList.d.ts +2 -0
  80. package/dist/admin/views/renderCollectionList.js +34 -0
  81. package/dist/admin/views/renderTestsSurface.d.ts +3 -0
  82. package/dist/admin/views/renderTestsSurface.js +34 -0
  83. package/dist/blocks/bindings.js +8 -14
  84. package/dist/blocks/formState.js +1 -1
  85. package/dist/blocks/placementLanguages.d.ts +7 -0
  86. package/dist/blocks/placementLanguages.js +27 -0
  87. package/dist/blocks/placementLocale.d.ts +37 -0
  88. package/dist/blocks/placementLocale.js +270 -0
  89. package/dist/collections/experiments/config.js +17 -8
  90. package/dist/collections/experiments/deleteGuard.js +2 -2
  91. package/dist/collections/experiments/lockHook.js +21 -2
  92. package/dist/collections/experiments/pickSlug.js +2 -0
  93. package/dist/collections/metrics.js +16 -4
  94. package/dist/collections/metricsGuards.js +2 -0
  95. package/dist/collections/serialize.js +5 -4
  96. package/dist/constants.d.ts +1 -0
  97. package/dist/constants.js +1 -0
  98. package/dist/db/adapter.d.ts +9 -1
  99. package/dist/db/adapter.js +77 -1
  100. package/dist/db/appends.d.ts +13 -0
  101. package/dist/db/appends.js +49 -0
  102. package/dist/db/bulkPlacementRemoval.d.ts +30 -0
  103. package/dist/db/bulkPlacementRemoval.js +111 -0
  104. package/dist/db/delete.d.ts +1 -1
  105. package/dist/db/delete.js +2 -4
  106. package/dist/db/events.d.ts +9 -0
  107. package/dist/db/events.js +42 -8
  108. package/dist/db/executor.d.ts +7 -1
  109. package/dist/db/executor.js +7 -3
  110. package/dist/db/pageCopies.d.ts +5 -0
  111. package/dist/db/pageCopies.js +31 -0
  112. package/dist/db/placements.d.ts +2 -0
  113. package/dist/db/placements.js +8 -0
  114. package/dist/db/results.d.ts +5 -1
  115. package/dist/db/results.js +21 -5
  116. package/dist/db/snapshots.d.ts +1 -0
  117. package/dist/endpoints/contentLocale.d.ts +6 -0
  118. package/dist/endpoints/contentLocale.js +15 -0
  119. package/dist/endpoints/deleteImpact.d.ts +6 -0
  120. package/dist/endpoints/deleteImpact.js +207 -0
  121. package/dist/endpoints/duplicateOriginal.d.ts +38 -0
  122. package/dist/endpoints/duplicateOriginal.js +407 -0
  123. package/dist/endpoints/editorSurface.d.ts +3 -0
  124. package/dist/endpoints/editorSurface.js +31 -0
  125. package/dist/endpoints/events.js +103 -39
  126. package/dist/endpoints/index.js +57 -9
  127. package/dist/endpoints/pages.js +247 -64
  128. package/dist/endpoints/placementStatus.js +13 -5
  129. package/dist/endpoints/preflight.d.ts +1 -1
  130. package/dist/endpoints/preflight.js +17 -2
  131. package/dist/endpoints/results.d.ts +1 -1
  132. package/dist/endpoints/results.js +6 -2
  133. package/dist/endpoints/routeId.d.ts +2 -2
  134. package/dist/endpoints/routeId.js +11 -5
  135. package/dist/endpoints/summary.js +46 -12
  136. package/dist/endpoints/testVersion.d.ts +2 -0
  137. package/dist/endpoints/testVersion.js +38 -0
  138. package/dist/endpoints/transitions.js +41 -29
  139. package/dist/errors.d.ts +5 -0
  140. package/dist/errors.js +8 -0
  141. package/dist/events/request.d.ts +6 -2
  142. package/dist/events/request.js +35 -8
  143. package/dist/events/rows.d.ts +1 -1
  144. package/dist/events/rows.js +24 -8
  145. package/dist/events/writable.d.ts +9 -0
  146. package/dist/events/writable.js +13 -0
  147. package/dist/exports/adminClient.d.ts +1 -1
  148. package/dist/exports/adminClient.js +1 -1
  149. package/dist/exports/adminRsc.d.ts +3 -0
  150. package/dist/exports/adminRsc.js +3 -0
  151. package/dist/exports/index.d.ts +1 -1
  152. package/dist/exports/rsc.d.ts +1 -0
  153. package/dist/exports/rsc.js +1 -0
  154. package/dist/fields/xpGoal.js +3 -15
  155. package/dist/goals/fairness.d.ts +1 -1
  156. package/dist/goals/fairness.js +44 -35
  157. package/dist/goals/picker/clickGoalPicker.model.d.ts +8 -1
  158. package/dist/goals/picker/clickGoalPicker.model.js +20 -2
  159. package/dist/goals/picker/copy.d.ts +6 -2
  160. package/dist/goals/picker/copy.js +11 -2
  161. package/dist/goals/picker/useClickGoalPicker.d.ts +1 -1
  162. package/dist/goals/picker/useClickGoalPicker.js +4 -2
  163. package/dist/goals/validate.d.ts +3 -0
  164. package/dist/goals/validate.js +15 -0
  165. package/dist/hooks/blockRemovalRule.d.ts +30 -0
  166. package/dist/hooks/blockRemovalRule.js +165 -0
  167. package/dist/hooks/hostHook.js +6 -2
  168. package/dist/hooks/pageGuard.d.ts +27 -2
  169. package/dist/hooks/pageGuard.js +213 -45
  170. package/dist/hooks/puckGoals.d.ts +5 -0
  171. package/dist/hooks/puckGoals.js +62 -0
  172. package/dist/hooks/puckNestedTests.d.ts +8 -0
  173. package/dist/hooks/puckNestedTests.js +36 -0
  174. package/dist/hooks/trackPageCopies.d.ts +11 -0
  175. package/dist/hooks/trackPageCopies.js +7 -0
  176. package/dist/lib/fetchAllDocs.d.ts +1 -1
  177. package/dist/lib/placementPages.d.ts +10 -0
  178. package/dist/{admin/previewLinks.model.js → lib/placementPages.js} +10 -5
  179. package/dist/manifest/compile.d.ts +2 -1
  180. package/dist/manifest/compile.js +13 -6
  181. package/dist/onInit.js +36 -0
  182. package/dist/options.d.ts +2 -0
  183. package/dist/options.js +23 -2
  184. package/dist/plugin.js +19 -20
  185. package/dist/proxy/pageNavigation.d.ts +4 -0
  186. package/dist/proxy/pageNavigation.js +28 -0
  187. package/dist/proxy/resolve.js +52 -25
  188. package/dist/puck/ExperimentPicker.d.ts +2 -1
  189. package/dist/puck/ExperimentPicker.js +62 -40
  190. package/dist/puck/ExperimentSlot.js +3 -1
  191. package/dist/puck/copy.d.ts +5 -1
  192. package/dist/puck/copy.js +5 -1
  193. package/dist/puck/editor/ConfigureTestDrawer.d.ts +25 -0
  194. package/dist/puck/editor/ConfigureTestDrawer.js +150 -0
  195. package/dist/puck/editor/CreateExperimentDrawer.d.ts +12 -2
  196. package/dist/puck/editor/CreateExperimentDrawer.js +89 -21
  197. package/dist/puck/editor/EditorControls.d.ts +14 -0
  198. package/dist/puck/editor/EditorControls.js +99 -0
  199. package/dist/puck/editor/ExperimentSlotEditor.js +951 -179
  200. package/dist/puck/editor/LeftoverVersions.d.ts +15 -0
  201. package/dist/puck/editor/LeftoverVersions.js +79 -0
  202. package/dist/puck/editor/PlacementNotice.d.ts +8 -0
  203. package/dist/puck/editor/PlacementNotice.js +22 -0
  204. package/dist/puck/editor/QuickTestActions.d.ts +6 -0
  205. package/dist/puck/editor/QuickTestActions.js +57 -0
  206. package/dist/puck/editor/ResultsReadout.d.ts +2 -1
  207. package/dist/puck/editor/ResultsReadout.js +10 -6
  208. package/dist/puck/editor/VersionBuilder.d.ts +66 -12
  209. package/dist/puck/editor/VersionBuilder.js +554 -231
  210. package/dist/puck/editor/armWrites.d.ts +11 -2
  211. package/dist/puck/editor/armWrites.js +43 -4
  212. package/dist/puck/editor/armsCache.d.ts +3 -1
  213. package/dist/puck/editor/armsCache.js +20 -4
  214. package/dist/puck/editor/blockClipboard.d.ts +16 -0
  215. package/dist/puck/editor/blockClipboard.js +20 -0
  216. package/dist/puck/editor/cloneSlot.d.ts +2 -0
  217. package/dist/puck/editor/cloneSlot.js +7 -0
  218. package/dist/puck/editor/copy.d.ts +64 -19
  219. package/dist/puck/editor/copy.js +72 -20
  220. package/dist/puck/editor/createTest.d.ts +3 -0
  221. package/dist/puck/editor/createTest.js +33 -0
  222. package/dist/puck/editor/editor.chrome.css +191 -19
  223. package/dist/puck/editor/editor.css +328 -24
  224. package/dist/puck/editor/editor.model.d.ts +17 -1
  225. package/dist/puck/editor/editor.model.js +61 -4
  226. package/dist/puck/editor/editorSurface.d.ts +10 -0
  227. package/dist/puck/editor/editorSurface.js +65 -0
  228. package/dist/puck/editor/experimentOutlinePlugin.js +96 -28
  229. package/dist/puck/editor/localPlacements.d.ts +5 -0
  230. package/dist/puck/editor/localPlacements.js +43 -0
  231. package/dist/puck/editor/outlineVersion.d.ts +5 -0
  232. package/dist/puck/editor/outlineVersion.js +36 -0
  233. package/dist/puck/editor/placementsCache.d.ts +60 -0
  234. package/dist/puck/editor/placementsCache.js +263 -0
  235. package/dist/puck/editor/sidebar.d.ts +8 -0
  236. package/dist/puck/editor/sidebar.js +74 -0
  237. package/dist/puck/editor/usePageSaveReadiness.d.ts +6 -0
  238. package/dist/puck/editor/usePageSaveReadiness.js +31 -0
  239. package/dist/puck/editor/usePlacementNotice.d.ts +3 -0
  240. package/dist/puck/editor/usePlacementNotice.js +15 -0
  241. package/dist/puck/editor/xpGoalPuckEditorField.js +105 -86
  242. package/dist/puck/experimentSlotField.d.ts +3 -0
  243. package/dist/puck/experimentSlotField.js +15 -4
  244. package/dist/puck/experimentSlug.d.ts +2 -0
  245. package/dist/puck/experimentSlug.js +3 -0
  246. package/dist/puck/nestedTestCopy.d.ts +8 -0
  247. package/dist/puck/nestedTestCopy.js +22 -0
  248. package/dist/puck/nestedTests.d.ts +17 -0
  249. package/dist/puck/nestedTests.js +30 -0
  250. package/dist/puck/slotConfig.d.ts +1 -1
  251. package/dist/puck/slotConfig.js +17 -4
  252. package/dist/puck/visibility.d.ts +20 -0
  253. package/dist/puck/visibility.js +81 -0
  254. package/dist/results/aggregate.d.ts +6 -3
  255. package/dist/results/aggregate.js +9 -9
  256. package/dist/results/health.d.ts +8 -0
  257. package/dist/results/health.js +28 -0
  258. package/dist/results/identityCredit.d.ts +1 -0
  259. package/dist/results/identityCredit.js +4 -1
  260. package/dist/results/verdict.js +2 -1
  261. package/dist/runtime/cookie.d.ts +10 -2
  262. package/dist/runtime/cookie.js +38 -6
  263. package/dist/runtime/cookieOptions.d.ts +6 -0
  264. package/dist/runtime/cookieOptions.js +14 -0
  265. package/dist/runtime/proxyRuntime.d.ts +1 -0
  266. package/dist/runtime/proxyRuntime.js +18 -8
  267. package/dist/runtime/signing.d.ts +1 -0
  268. package/dist/runtime/signing.js +5 -0
  269. package/dist/sanitizeReadinessDetail.d.ts +2 -2
  270. package/dist/sanitizeReadinessDetail.js +22 -2
  271. package/dist/server/getAssignments.js +11 -10
  272. package/dist/server/recordContentChange.d.ts +1 -1
  273. package/dist/server/recordContentChange.js +48 -22
  274. package/dist/server/resolveExperimentBlocks.js +2 -4
  275. package/dist/server/resolveExperimentData.js +8 -8
  276. package/dist/server/runResults.js +52 -14
  277. package/dist/server/startExperiment.d.ts +20 -0
  278. package/dist/server/startExperiment.js +70 -0
  279. package/dist/server/trackConversion.js +10 -13
  280. package/dist/{admin → testSurface}/PreviewLinks.js +6 -2
  281. package/dist/testSurface/actions/DecideDialog.d.ts +16 -0
  282. package/dist/{admin → testSurface}/actions/DecideDialog.js +78 -55
  283. package/dist/testSurface/actions/LifecycleAction.d.ts +16 -0
  284. package/dist/testSurface/actions/LifecycleAction.js +105 -0
  285. package/dist/{admin → testSurface}/actions/MakeContentResult.d.ts +4 -3
  286. package/dist/{admin → testSurface}/actions/MakeContentResult.js +10 -2
  287. package/dist/{admin → testSurface}/actions/actions.model.d.ts +13 -5
  288. package/dist/testSurface/actions/actions.model.js +122 -0
  289. package/dist/{admin → testSurface}/api.d.ts +20 -7
  290. package/dist/{admin → testSurface}/api.js +72 -22
  291. package/dist/testSurface/contentLocaleURL.d.ts +2 -0
  292. package/dist/testSurface/contentLocaleURL.js +3 -0
  293. package/dist/{admin → testSurface}/copy/actions.d.ts +28 -8
  294. package/dist/{admin → testSurface}/copy/actions.js +31 -11
  295. package/dist/{admin → testSurface}/copy/common.d.ts +13 -4
  296. package/dist/{admin → testSurface}/copy/common.js +18 -8
  297. package/dist/testSurface/copy/languages.d.ts +12 -0
  298. package/dist/testSurface/copy/languages.js +8 -0
  299. package/dist/{admin → testSurface}/copy/metrics.d.ts +1 -0
  300. package/dist/{admin → testSurface}/copy/metrics.js +1 -0
  301. package/dist/testSurface/copy/pages.d.ts +84 -0
  302. package/dist/testSurface/copy/pages.js +90 -0
  303. package/dist/{admin → testSurface}/copy/readiness.d.ts +38 -4
  304. package/dist/{admin → testSurface}/copy/readiness.js +52 -7
  305. package/dist/{admin → testSurface}/copy/results.d.ts +6 -3
  306. package/dist/{admin → testSurface}/copy/results.js +6 -3
  307. package/dist/{admin → testSurface}/copy/review.d.ts +1 -1
  308. package/dist/{admin → testSurface}/copy/review.js +1 -1
  309. package/dist/{admin → testSurface}/copy/surface.d.ts +11 -2
  310. package/dist/{admin → testSurface}/copy/surface.js +13 -10
  311. package/dist/{admin → testSurface}/copy/testPage.d.ts +53 -8
  312. package/dist/testSurface/copy/testPage.js +165 -0
  313. package/dist/testSurface/format/adminURL.d.ts +7 -0
  314. package/dist/testSurface/format/adminURL.js +9 -0
  315. package/dist/testSurface/placementLabel.d.ts +8 -0
  316. package/dist/testSurface/placementLabel.js +24 -0
  317. package/dist/{admin → testSurface}/placements/placementLabels.d.ts +2 -0
  318. package/dist/{admin → testSurface}/placements/placementLabels.js +3 -2
  319. package/dist/{admin → testSurface}/previewLinks.model.d.ts +1 -6
  320. package/dist/testSurface/previewLinks.model.js +4 -0
  321. package/dist/testSurface/readPreflight.d.ts +13 -0
  322. package/dist/testSurface/readPreflight.js +44 -0
  323. package/dist/testSurface/readinessRead.d.ts +53 -0
  324. package/dist/testSurface/readinessRead.js +50 -0
  325. package/dist/{admin → testSurface}/results/VerdictHero.d.ts +2 -1
  326. package/dist/{admin → testSurface}/results/VerdictHero.js +5 -1
  327. package/dist/testSurface/results/results.css +64 -0
  328. package/dist/{admin → testSurface}/results/results.model.js +6 -2
  329. package/dist/{admin → testSurface}/surface/contracts.d.ts +17 -3
  330. package/dist/testSurface/surface/editorPlacement.d.ts +26 -0
  331. package/dist/testSurface/surface/editorPlacement.js +78 -0
  332. package/dist/testSurface/surface/pageBlock/pageBlock.model.js +9 -0
  333. package/dist/{admin → testSurface}/surface/pageBlock/parts.js +39 -11
  334. package/dist/testSurface/surface/pagePicker/CopyRoute.d.ts +13 -0
  335. package/dist/testSurface/surface/pagePicker/CopyRoute.js +273 -0
  336. package/dist/testSurface/surface/pagePicker/PageCombobox.d.ts +21 -0
  337. package/dist/testSurface/surface/pagePicker/PageCombobox.js +503 -0
  338. package/dist/testSurface/surface/pagePicker/pagePicker.css +73 -0
  339. package/dist/{admin → testSurface}/surface/pagePicker/pagePicker.model.d.ts +7 -3
  340. package/dist/{admin → testSurface}/surface/pagePicker/pagePicker.model.js +17 -2
  341. package/dist/{admin → testSurface}/surface/readiness/ActionDialogs.d.ts +8 -4
  342. package/dist/testSurface/surface/readiness/ActionDialogs.js +351 -0
  343. package/dist/{admin → testSurface}/surface/readiness/Banner.d.ts +2 -3
  344. package/dist/testSurface/surface/readiness/Banner.js +187 -0
  345. package/dist/testSurface/surface/readiness/BlockerList.d.ts +11 -0
  346. package/dist/testSurface/surface/readiness/BlockerList.js +31 -0
  347. package/dist/testSurface/surface/readiness/SaveStatus.d.ts +10 -0
  348. package/dist/testSurface/surface/readiness/SaveStatus.js +66 -0
  349. package/dist/{admin → testSurface}/surface/readiness/parts.js +0 -2
  350. package/dist/{admin → testSurface}/surface/readiness/readiness.model.d.ts +28 -2
  351. package/dist/testSurface/surface/readiness/readiness.model.js +377 -0
  352. package/dist/testSurface/surface/readiness/useTransition.d.ts +16 -0
  353. package/dist/testSurface/surface/readiness/useTransition.js +141 -0
  354. package/dist/{admin → testSurface}/surface/results/ReleasePages.d.ts +6 -3
  355. package/dist/{admin → testSurface}/surface/results/ReleasePages.js +40 -40
  356. package/dist/{admin → testSurface}/surface/results/ResultsBody.d.ts +7 -3
  357. package/dist/{admin → testSurface}/surface/results/ResultsBody.js +108 -44
  358. package/dist/{admin → testSurface}/surface/results/useResults.d.ts +26 -8
  359. package/dist/{admin → testSurface}/surface/results/useResults.js +3 -2
  360. package/dist/{admin → testSurface}/surface/setting/parts.js +58 -18
  361. package/dist/testSurface/surface/setting/setting.css +17 -0
  362. package/dist/{admin → testSurface}/surface/test/AdvancedSection.js +2 -0
  363. package/dist/testSurface/surface/test/DeleteTest.d.ts +23 -0
  364. package/dist/testSurface/surface/test/DeleteTest.js +270 -0
  365. package/dist/testSurface/surface/test/GoalSection.d.ts +4 -0
  366. package/dist/{admin → testSurface}/surface/test/GoalSection.js +116 -86
  367. package/dist/testSurface/surface/test/LengthSection.d.ts +2 -0
  368. package/dist/{admin → testSurface}/surface/test/LengthSection.js +5 -1
  369. package/dist/{admin → testSurface}/surface/test/PageHoldout.js +4 -1
  370. package/dist/{admin → testSurface}/surface/test/Rail.js +7 -4
  371. package/dist/{admin → testSurface}/surface/test/ReadinessBar.d.ts +1 -0
  372. package/dist/{admin → testSurface}/surface/test/ReadinessBar.js +2 -3
  373. package/dist/{admin → testSurface}/surface/test/Section.d.ts +3 -1
  374. package/dist/testSurface/surface/test/Section.js +80 -0
  375. package/dist/{admin → testSurface}/surface/test/TargetingSection.js +82 -12
  376. package/dist/testSurface/surface/test/TestSurface.d.ts +19 -0
  377. package/dist/testSurface/surface/test/TestSurface.js +265 -0
  378. package/dist/testSurface/surface/test/VersionsSection.d.ts +5 -0
  379. package/dist/{admin → testSurface}/surface/test/VersionsSection.js +69 -35
  380. package/dist/{admin → testSurface}/surface/test/fields.d.ts +30 -7
  381. package/dist/testSurface/surface/test/fields.js +306 -0
  382. package/dist/{admin → testSurface}/surface/test/pageParts.js +27 -43
  383. package/dist/testSurface/surface/test/testPage.css +103 -0
  384. package/dist/{admin → testSurface}/surface/test/testPage.model.d.ts +1 -0
  385. package/dist/{admin → testSurface}/surface/test/testPage.model.js +6 -0
  386. package/dist/{admin → testSurface}/surface/testDocument.model.d.ts +3 -0
  387. package/dist/{admin → testSurface}/surface/testDocument.model.js +4 -1
  388. package/dist/testSurface/surface/useTestDocument.d.ts +60 -0
  389. package/dist/testSurface/surface/useTestDocument.js +782 -0
  390. package/dist/testSurface/surface/watchTestDocument.d.ts +15 -0
  391. package/dist/testSurface/surface/watchTestDocument.js +181 -0
  392. package/dist/testSurface/surfaceUrls.d.ts +7 -0
  393. package/dist/testSurface/surfaceUrls.js +19 -0
  394. package/dist/{admin → testSurface}/useApi.d.ts +21 -5
  395. package/dist/testSurface/useOnTestReturn.d.ts +2 -0
  396. package/dist/testSurface/useOnTestReturn.js +27 -0
  397. package/dist/testSurface/useReadinessPolling.d.ts +3 -0
  398. package/dist/testSurface/useReadinessPolling.js +26 -0
  399. package/dist/transitions/addMetric.d.ts +2 -5
  400. package/dist/transitions/addMetric.js +5 -1
  401. package/dist/transitions/allocate.d.ts +2 -2
  402. package/dist/transitions/allocate.js +3 -1
  403. package/dist/transitions/archive.d.ts +1 -1
  404. package/dist/transitions/archive.js +3 -2
  405. package/dist/transitions/checkStart.d.ts +6 -1
  406. package/dist/transitions/checkStart.js +133 -17
  407. package/dist/transitions/contentFields.js +9 -5
  408. package/dist/transitions/decide.d.ts +1 -1
  409. package/dist/transitions/decide.js +6 -3
  410. package/dist/transitions/deleteExperiment.d.ts +2 -2
  411. package/dist/transitions/deleteExperiment.js +17 -7
  412. package/dist/transitions/kernel.d.ts +4 -0
  413. package/dist/transitions/kernel.js +9 -4
  414. package/dist/transitions/makeContent.d.ts +2 -1
  415. package/dist/transitions/makeContent.js +41 -17
  416. package/dist/transitions/nestedPlacementNames.d.ts +5 -0
  417. package/dist/transitions/nestedPlacementNames.js +32 -0
  418. package/dist/transitions/pageAddress.d.ts +6 -0
  419. package/dist/transitions/pageAddress.js +71 -0
  420. package/dist/transitions/pageVersions.js +3 -1
  421. package/dist/transitions/phaseRecord.d.ts +2 -0
  422. package/dist/transitions/phaseRecord.js +5 -0
  423. package/dist/transitions/placementInteractions.d.ts +3 -3
  424. package/dist/transitions/placementInteractions.js +16 -12
  425. package/dist/transitions/placements.d.ts +54 -8
  426. package/dist/transitions/placements.js +304 -81
  427. package/dist/transitions/preflightData.d.ts +5 -3
  428. package/dist/transitions/preflightData.js +137 -40
  429. package/dist/transitions/releaseHoldout.d.ts +2 -1
  430. package/dist/transitions/releaseHoldout.js +3 -1
  431. package/dist/transitions/releasePages.d.ts +2 -1
  432. package/dist/transitions/releasePages.js +3 -1
  433. package/dist/transitions/resolveCaps.d.ts +2 -4
  434. package/dist/transitions/start.d.ts +6 -8
  435. package/dist/transitions/start.js +72 -35
  436. package/dist/transitions/startReads.d.ts +7 -0
  437. package/dist/transitions/startReads.js +28 -0
  438. package/dist/transitions/stop.d.ts +2 -1
  439. package/dist/transitions/stop.js +3 -2
  440. package/dist/types/contracts.d.ts +15 -3
  441. package/dist/types/endpoints.d.ts +121 -17
  442. package/dist/types/puck.d.ts +1 -0
  443. package/dist/types/runtime.d.ts +15 -9
  444. package/dist/types/snapshot.d.ts +2 -0
  445. package/dist/types/surface.d.ts +9 -9
  446. package/dist/ui/Button.js +2 -2
  447. package/dist/ui/Card.d.ts +2 -1
  448. package/dist/ui/Card.js +4 -4
  449. package/dist/ui/ChipsInput.d.ts +8 -1
  450. package/dist/ui/ChipsInput.js +17 -4
  451. package/dist/ui/Dialog.d.ts +24 -2
  452. package/dist/ui/Dialog.js +116 -6
  453. package/dist/ui/Drawer.d.ts +10 -0
  454. package/dist/ui/Drawer.js +29 -0
  455. package/dist/ui/Inputs.d.ts +4 -3
  456. package/dist/ui/Inputs.js +7 -4
  457. package/dist/ui/SelectControl.d.ts +33 -0
  458. package/dist/ui/SelectControl.js +504 -0
  459. package/dist/ui/Tabs.d.ts +4 -4
  460. package/dist/ui/Tabs.js +35 -32
  461. package/dist/ui/ui.css +49 -5
  462. package/package.json +3 -2
  463. package/dist/admin/actions/ConfirmDialog.d.ts +0 -19
  464. package/dist/admin/actions/ConfirmDialog.js +0 -149
  465. package/dist/admin/actions/DecideDialog.d.ts +0 -10
  466. package/dist/admin/actions/actions.model.js +0 -70
  467. package/dist/admin/copy/pages.d.ts +0 -26
  468. package/dist/admin/copy/pages.js +0 -26
  469. package/dist/admin/copy/testPage.js +0 -104
  470. package/dist/admin/results/results.css +0 -64
  471. package/dist/admin/styles.css +0 -10
  472. package/dist/admin/styles.d.ts +0 -2
  473. package/dist/admin/styles.js +0 -3
  474. package/dist/admin/surface/pageBlock/pageBlock.model.js +0 -8
  475. package/dist/admin/surface/pagePicker/CopyRoute.d.ts +0 -6
  476. package/dist/admin/surface/pagePicker/CopyRoute.js +0 -53
  477. package/dist/admin/surface/pagePicker/PagePicker.d.ts +0 -10
  478. package/dist/admin/surface/pagePicker/PagePicker.js +0 -172
  479. package/dist/admin/surface/readiness/ActionDialogs.js +0 -337
  480. package/dist/admin/surface/readiness/Banner.js +0 -190
  481. package/dist/admin/surface/readiness/SaveStatus.d.ts +0 -5
  482. package/dist/admin/surface/readiness/SaveStatus.js +0 -53
  483. package/dist/admin/surface/readiness/readiness.model.js +0 -205
  484. package/dist/admin/surface/readiness/useTransition.d.ts +0 -11
  485. package/dist/admin/surface/readiness/useTransition.js +0 -35
  486. package/dist/admin/surface/setting/setting.css +0 -17
  487. package/dist/admin/surface/test/GoalSection.d.ts +0 -2
  488. package/dist/admin/surface/test/LengthSection.d.ts +0 -2
  489. package/dist/admin/surface/test/Section.js +0 -47
  490. package/dist/admin/surface/test/VersionsSection.d.ts +0 -4
  491. package/dist/admin/surface/test/fields.js +0 -216
  492. package/dist/admin/surface/test/testPage.css +0 -97
  493. package/dist/admin/surface/useTestDocument.d.ts +0 -32
  494. package/dist/admin/surface/useTestDocument.js +0 -415
  495. /package/dist/{admin → testSurface}/PreviewLinks.d.ts +0 -0
  496. /package/dist/{admin → testSurface}/actions/decide.model.d.ts +0 -0
  497. /package/dist/{admin → testSurface}/actions/decide.model.js +0 -0
  498. /package/dist/{admin → testSurface}/allocation.model.d.ts +0 -0
  499. /package/dist/{admin → testSurface}/allocation.model.js +0 -0
  500. /package/dist/{admin → testSurface}/arms/arms.model.d.ts +0 -0
  501. /package/dist/{admin → testSurface}/arms/arms.model.js +0 -0
  502. /package/dist/{admin → testSurface}/arms/pageTarget.model.d.ts +0 -0
  503. /package/dist/{admin → testSurface}/arms/pageTarget.model.js +0 -0
  504. /package/dist/{admin → testSurface}/arms/params.model.d.ts +0 -0
  505. /package/dist/{admin → testSurface}/arms/params.model.js +0 -0
  506. /package/dist/{admin → testSurface}/copy/advanced.d.ts +0 -0
  507. /package/dist/{admin → testSurface}/copy/advanced.js +0 -0
  508. /package/dist/{admin → testSurface}/copy/arms.d.ts +0 -0
  509. /package/dist/{admin → testSurface}/copy/arms.js +0 -0
  510. /package/dist/{admin → testSurface}/copy/audience.d.ts +0 -0
  511. /package/dist/{admin → testSurface}/copy/audience.js +0 -0
  512. /package/dist/{admin → testSurface}/copy/recommendation.d.ts +0 -0
  513. /package/dist/{admin → testSurface}/copy/recommendation.js +0 -0
  514. /package/dist/{admin → testSurface}/copy/setting.d.ts +0 -0
  515. /package/dist/{admin → testSurface}/copy/setting.js +0 -0
  516. /package/dist/{admin → testSurface}/format/date.d.ts +0 -0
  517. /package/dist/{admin → testSurface}/format/date.js +0 -0
  518. /package/dist/{admin → testSurface}/labels.d.ts +0 -0
  519. /package/dist/{admin → testSurface}/labels.js +0 -0
  520. /package/dist/{admin → testSurface}/lockedNotice.model.d.ts +0 -0
  521. /package/dist/{admin → testSurface}/lockedNotice.model.js +0 -0
  522. /package/dist/{admin → testSurface}/metricSource.model.d.ts +0 -0
  523. /package/dist/{admin → testSurface}/metricSource.model.js +0 -0
  524. /package/dist/{admin → testSurface}/placements/placementLabels.model.d.ts +0 -0
  525. /package/dist/{admin → testSurface}/placements/placementLabels.model.js +0 -0
  526. /package/dist/{admin → testSurface}/placements/usePlacementLabels.d.ts +0 -0
  527. /package/dist/{admin → testSurface}/placements/usePlacementLabels.js +0 -0
  528. /package/dist/{admin → testSurface}/reload.d.ts +0 -0
  529. /package/dist/{admin → testSurface}/reload.js +0 -0
  530. /package/dist/{admin → testSurface}/results/CappedCell.d.ts +0 -0
  531. /package/dist/{admin → testSurface}/results/CappedCell.js +0 -0
  532. /package/dist/{admin → testSurface}/results/CiChart.d.ts +0 -0
  533. /package/dist/{admin → testSurface}/results/CiChart.js +0 -0
  534. /package/dist/{admin → testSurface}/results/DataQualityPanel.d.ts +0 -0
  535. /package/dist/{admin → testSurface}/results/DataQualityPanel.js +0 -0
  536. /package/dist/{admin → testSurface}/results/DataTable.d.ts +0 -0
  537. /package/dist/{admin → testSurface}/results/DataTable.js +0 -0
  538. /package/dist/{admin → testSurface}/results/StatTile.d.ts +0 -0
  539. /package/dist/{admin → testSurface}/results/StatTile.js +0 -0
  540. /package/dist/{admin → testSurface}/results/chart.model.d.ts +0 -0
  541. /package/dist/{admin → testSurface}/results/chart.model.js +0 -0
  542. /package/dist/{admin → testSurface}/results/format.d.ts +0 -0
  543. /package/dist/{admin → testSurface}/results/format.js +0 -0
  544. /package/dist/{admin → testSurface}/results/legacy.d.ts +0 -0
  545. /package/dist/{admin → testSurface}/results/legacy.js +0 -0
  546. /package/dist/{admin → testSurface}/results/releasePages.model.d.ts +0 -0
  547. /package/dist/{admin → testSurface}/results/releasePages.model.js +0 -0
  548. /package/dist/{admin → testSurface}/results/results.model.d.ts +0 -0
  549. /package/dist/{admin → testSurface}/results/snapshot.d.ts +0 -0
  550. /package/dist/{admin → testSurface}/results/snapshot.js +0 -0
  551. /package/dist/{admin → testSurface}/review/review.model.d.ts +0 -0
  552. /package/dist/{admin → testSurface}/review/review.model.js +0 -0
  553. /package/dist/{admin → testSurface}/surface/contracts.js +0 -0
  554. /package/dist/{admin → testSurface}/surface/pageBlock/pageBlock.model.d.ts +0 -0
  555. /package/dist/{admin → testSurface}/surface/pageBlock/parts.d.ts +0 -0
  556. /package/dist/{admin → testSurface}/surface/readiness/parts.d.ts +0 -0
  557. /package/dist/{admin → testSurface}/surface/results/recommendation.model.d.ts +0 -0
  558. /package/dist/{admin → testSurface}/surface/results/recommendation.model.js +0 -0
  559. /package/dist/{admin → testSurface}/surface/setting/parts.d.ts +0 -0
  560. /package/dist/{admin → testSurface}/surface/setting/setting.model.d.ts +0 -0
  561. /package/dist/{admin → testSurface}/surface/setting/setting.model.js +0 -0
  562. /package/dist/{admin → testSurface}/surface/test/AdvancedSection.d.ts +0 -0
  563. /package/dist/{admin → testSurface}/surface/test/PageHoldout.d.ts +0 -0
  564. /package/dist/{admin → testSurface}/surface/test/Rail.d.ts +0 -0
  565. /package/dist/{admin → testSurface}/surface/test/TargetingSection.d.ts +0 -0
  566. /package/dist/{admin → testSurface}/surface/test/jumpToSection.d.ts +0 -0
  567. /package/dist/{admin → testSurface}/surface/test/jumpToSection.js +0 -0
  568. /package/dist/{admin → testSurface}/surface/test/pageParts.d.ts +0 -0
  569. /package/dist/{admin → testSurface}/targeting/targeting.model.d.ts +0 -0
  570. /package/dist/{admin → testSurface}/targeting/targeting.model.js +0 -0
  571. /package/dist/{admin → testSurface}/theme.d.ts +0 -0
  572. /package/dist/{admin → testSurface}/theme.js +0 -0
  573. /package/dist/{admin → testSurface}/useApi.js +0 -0
@@ -1,37 +1,167 @@
1
- import { previousPublishedContent, storedContent } from '../db/appends.js';
1
+ import { refuseNewNestedTests } from './puckNestedTests.js';
2
+ import { hasLocalizedFields } from '../transitions/contentFields.js';
3
+ import { AsyncLocalStorage } from 'node:async_hooks';
4
+ import { assertReadCommitted } from '../db/adapter.js';
5
+ import { previousPublishedContent, storedContent, placementWriteContent } from '../db/appends.js';
2
6
  import { lockPlacementScope, sortLockKeys } from '../db/locks.js';
3
7
  import { txExecutor, pooledExecutor } from '../db/executor.js';
4
8
  import { normalisePath } from '../runtime/normalisePath.js';
5
9
  import { XpNoTransactionError, XpRefusal } from '../errors.js';
6
- import { placementGuardCopy, pageGuardCopy, READINESS_COPY } from '../admin/copy/readiness.js';
7
- import { placementSlugs } from '../blocks/bindings.js';
10
+ import { placementGuardCopy, pageGuardCopy, READINESS_COPY } from '../testSurface/copy/readiness.js';
11
+ import { allPlacementSlugs, mergedPlacementLocales, placementDocumentPaths } from '../blocks/placementLocale.js';
8
12
  import { isObject } from '../blocks/model.js';
9
- import { placementTests, appendPlacementDoc } from '../db/placements.js';
13
+ import { placementTests, removableBlockTests, appendPlacementDoc } from '../db/placements.js';
10
14
  import { isPageBusy } from '../db/pageBusy.js';
11
- // createLocalReq replaces context with a shallow copy on nested calls. Keep
12
- // the shared stack in that context so both the outer req and its proxies see it.
15
+ import { blockRemovalRule, releaseRemovalClaim, observeUnpublishedRemoval, releaseRestoredRemovalClaims } from './blockRemovalRule.js';
16
+ import { bulkPlacementRequest, placementOperationRequest, usesBulkDocumentTransactions } from '../db/bulkPlacementRemoval.js';
17
+ const operationIdentity = Symbol('xpPlacementOperation');
18
+ // Execution-local identity survives both concurrent bulk siblings and Payload's
19
+ // restoreVersion operation, which caches req before beforeOperation runs.
20
+ export const pageGuardOperationScope = new AsyncLocalStorage();
21
+ const entryIsFirst = (config)=>!config?.hooks?.beforeOperation || config.hooks.beforeOperation[0] === pageGuardEnterOperation;
13
22
  const operations = (req)=>req.context.xpPageGuardOperations;
23
+ const requestFrame = (req)=>req[operationIdentity];
24
+ const operationFrame = (req, slug)=>{
25
+ const ordered = entryIsFirst(req.payload.config.collections?.find((c)=>c.slug === slug));
26
+ const own = requestFrame(req);
27
+ // With broken entry order, only this operation's returned token can prove a
28
+ // draft save. Restore bypasses that token on its cached request; Payload sets
29
+ // this sticky marker there before beforeChange (restoreVersion.js:162). Any
30
+ // ambiguity runs the rule: it may refuse, but must never borrow a draft save.
31
+ if (!ordered) return !req.context.isRestoringVersion && own?.collection === slug && !own.restore && !own.complete ? own : undefined;
32
+ let frame = pageGuardOperationScope.getStore();
33
+ while(frame && (frame.complete || frame.detached))frame = frame.parent;
34
+ // The request token wins when a preceding hook breaks async entry propagation.
35
+ // Restore alone caches the original request before beforeOperation; accept its
36
+ // execution identity only when the request belongs to its ancestor operation.
37
+ if (own) {
38
+ if (frame?.scoped && frame.restore && frame.collection === slug && frame !== own) {
39
+ let parent = frame.parent;
40
+ while(parent && parent !== own)parent = parent.parent;
41
+ if (parent === own) return frame;
42
+ }
43
+ return own.collection === slug && !own.complete ? own : undefined;
44
+ }
45
+ return frame?.scoped && frame.collection === slug && (frame.restore || frame.request === req) ? frame : undefined;
46
+ };
47
+ /** Must be first: buildBeforeOperation invokes its first hook synchronously,
48
+ * before the operation registers its await continuation. Later host hooks may
49
+ * await nested operations; those keep separate async contexts. No IO here.
50
+ */ export const pageGuardEnterOperation = ({ args, operation })=>{
51
+ if (operation !== 'create' && operation !== 'update' && operation !== 'restoreVersion' && operation !== 'delete') return;
52
+ const call = args;
53
+ if (!entryIsFirst(call.collection.config)) return;
54
+ pageGuardOperationScope.enterWith({
55
+ collection: call.collection.config.slug,
56
+ request: args.req,
57
+ draft: call.draft === true,
58
+ restore: operation === 'restoreVersion',
59
+ pending: true,
60
+ scoped: true,
61
+ parent: pageGuardOperationScope.getStore()
62
+ });
63
+ };
14
64
  export const pageGuardBeforeOperation = ({ args, operation })=>{
15
- if (operation !== 'create' && operation !== 'update' && operation !== 'restoreVersion') return;
65
+ const req = args.req;
66
+ req.context.xpPlacementRemovals ??= {
67
+ transaction: undefined,
68
+ tests: new Map()
69
+ };
70
+ if (operation !== 'create' && operation !== 'update' && operation !== 'restoreVersion' && operation !== 'delete') return;
16
71
  const call = args;
17
72
  let collections = operations(call.req);
18
73
  if (!collections) call.req.context.xpPageGuardOperations = collections = new Map();
19
74
  const slug = call.collection.config.slug;
20
75
  const stack = collections.get(slug) ?? [];
21
- stack.push({
76
+ const entered = pageGuardOperationScope.getStore();
77
+ const frame = entryIsFirst(call.collection.config) && entered?.pending && entered.collection === slug ? entered : {
78
+ collection: slug,
79
+ request: req,
80
+ draft: false,
81
+ restore: false
82
+ };
83
+ const isBulk = Boolean(call.where) && (operation === 'update' || operation === 'delete');
84
+ const bulk = frame.scoped && isBulk ? {
85
+ documents: new Set(),
86
+ refusals: new Map()
87
+ } : undefined;
88
+ Object.assign(frame, {
89
+ request: req,
22
90
  draft: call.draft === true,
23
- restore: operation === 'restoreVersion'
91
+ restore: operation === 'restoreVersion',
92
+ versionId: operation === 'restoreVersion' ? call.id : undefined,
93
+ isBulk,
94
+ publishSpecificLocale: call.publishSpecificLocale,
95
+ bulk,
96
+ pending: false
24
97
  });
98
+ stack.push(frame);
25
99
  collections.set(slug, stack);
100
+ const scoped = placementOperationRequest(req, new Map([
101
+ [
102
+ operationIdentity,
103
+ frame
104
+ ]
105
+ ]), ()=>{
106
+ // Only ordered execution identity can attribute a cached-request rollback
107
+ // to a restore. An unscoped stack entry may be a stale failed restore.
108
+ const executing = pageGuardOperationScope.getStore();
109
+ if (executing?.scoped && executing.restore && !executing.complete && !executing.detached && executing.collection === slug) {
110
+ let parent = executing.parent;
111
+ while(parent && parent !== frame)parent = parent.parent;
112
+ if (parent === frame) {
113
+ finishOperation(executing.request ?? req, executing);
114
+ return;
115
+ }
116
+ }
117
+ // Payload uses the same request for per-document completion and its outer
118
+ // catch. Always detach shared tracking; the exact request token alone keeps
119
+ // bulk policy/selection for later siblings until afterOperation completes it.
120
+ if (isBulk && usesBulkDocumentTransactions(req)) detachOperation(req, frame);
121
+ else finishOperation(req, frame);
122
+ });
123
+ return {
124
+ ...args,
125
+ req: bulk ? bulkPlacementRequest(scoped, slug, call.where, call.data, call.draft === true, operation === 'delete', bulk) : scoped
126
+ };
26
127
  };
128
+ function detachOperation(req, frame) {
129
+ const collections = operations(req), stack = collections?.get(frame.collection);
130
+ const index = stack?.lastIndexOf(frame);
131
+ if (index != null && index >= 0) stack.splice(index, 1);
132
+ if (!stack?.length) collections?.delete(frame.collection);
133
+ frame.detached = true;
134
+ if (pageGuardOperationScope.getStore() === frame) pageGuardOperationScope.enterWith(frame.parent);
135
+ }
136
+ function finishOperation(req, frame) {
137
+ frame.complete = true;
138
+ detachOperation(req, frame);
139
+ }
140
+ // Collection afterError has no operation identity and is REST-only
141
+ // (Payload 3.90.2 utilities/routeError.js:69-78). Local API failures call
142
+ // killTransaction(args.req) (operations/update.js:362, delete.js:274), whose
143
+ // transactionID deletion is observed by the operation's request proxy above.
144
+ // Bulk transaction deletion detaches tracking; its request token keeps policy.
27
145
  export const pageGuardAfterOperation = ({ req, collection, operation, result })=>{
146
+ // buildAfterOperation passes args.req, including the restore's returned token
147
+ // (Payload 3.90.2 utilities/buildAfterOperation.js:11). Never finish a caller's
148
+ // token as a fallback for an unidentified restore.
149
+ const own = requestFrame(req);
150
+ const identified = own?.collection === collection.slug && !own.complete ? own : operationFrame(req, collection.slug);
151
+ const frame = operation === 'restoreVersion' && !identified?.restore ? undefined : identified;
152
+ const bulk = frame?.bulk;
28
153
  // beforeOperation reports by-id updates as 'update'; afterOperation reports 'updateByID'.
29
- if (operation === 'create' || operation === 'update' || operation === 'updateByID' || operation === 'restoreVersion') {
30
- const collections = operations(req);
31
- const stack = collections?.get(collection.slug);
32
- stack?.pop();
33
- if (!stack?.length) collections?.delete(collection.slug);
154
+ const mutates = operation === 'create' || operation === 'update' || operation === 'updateByID' || operation === 'restoreVersion' || operation === 'delete' || operation === 'deleteByID';
155
+ // Bulk Local API errors are returned per document, without invoking afterError.
156
+ if (result && typeof result === 'object' && 'errors' in result && Array.isArray(result.errors)) {
157
+ const failed = result.errors.some((error)=>error && !bulk?.refusals.has(error.message));
158
+ if (failed && bulk) for (const error of result.errors){
159
+ const conservative = bulk.refusals.get(error?.message);
160
+ if (conservative) error.message = conservative;
161
+ }
162
+ for (const error of result.errors)if (error && error.id != null) releaseRemovalClaim(req, collection.slug, error.id);
34
163
  }
164
+ if (mutates && frame) finishOperation(req, frame);
35
165
  return result;
36
166
  };
37
167
  function optionsOf(req) {
@@ -41,14 +171,9 @@ function registration(req, slug) {
41
171
  return optionsOf(req).pages?.collections.find((entry)=>entry.slug === slug);
42
172
  }
43
173
  const active = (test)=>test.status === 'running' || test.status === 'decided';
44
- const pathsOf = (req, collection, rows)=>{
174
+ const documentPathsOf = (req, collection, rows)=>{
45
175
  const page = registration(req, collection);
46
- return page ? sortLockKeys(rows.flatMap((row)=>{
47
- const path = row ? page.pathOf(row) : null;
48
- return path === null ? [] : [
49
- normalisePath(path)
50
- ];
51
- })) : [];
176
+ return page ? placementDocumentPaths(req, collection, rows, 'all-locales', (doc)=>page.pathOf(doc)) : [];
52
177
  };
53
178
  /** The later audit also recognises arm-select tags; include those ids in its lock superset. */ function taggedIds(value, ids = new Set()) {
54
179
  if (Array.isArray(value)) value.forEach((v)=>taggedIds(v, ids));
@@ -58,9 +183,15 @@ const pathsOf = (req, collection, rows)=>{
58
183
  }
59
184
  return ids;
60
185
  }
61
- export function guardExperimentIds(tests, slugs, collection, paths, held, tags = new Set()) {
186
+ export function guardExperimentIds(tests, slugs, collection, paths, held, tags = new Set(), discovered = []) {
62
187
  const excluded = new Set(Array.isArray(held) ? held.map(String) : []);
63
- return sortLockKeys(tests.filter((test)=>slugs.includes(test.slug) || tags.has(String(test.id)) || test.kind === 'page' && (!test.pageCollection || test.pageCollection === collection) && test.arms.some((a)=>typeof a.pageTarget === 'string' && paths.includes(normalisePath(a.pageTarget)))).map((test)=>String(test.id)).filter((id)=>!excluded.has(id)));
188
+ const ids = tests.filter((test)=>slugs.includes(test.slug) || tags.has(String(test.id)) || test.kind === 'page' && (!test.pageCollection || test.pageCollection === collection) && test.arms.some((a)=>typeof a.pageTarget === 'string' && paths.includes(normalisePath(a.pageTarget)))).map((test)=>String(test.id));
189
+ // A candidate may have committed after the broad audit discovery. Its indexed
190
+ // removal lookup must still contribute E, including when it is not running yet.
191
+ return sortLockKeys([
192
+ ...ids,
193
+ ...discovered.map(String)
194
+ ].filter((id)=>!excluded.has(id)));
64
195
  }
65
196
  function protect(tests, path) {
66
197
  for (const test of tests){
@@ -98,29 +229,45 @@ function mapBusy(error) {
98
229
  throw error;
99
230
  }
100
231
  export const pageGuardBeforeDelete = async ({ req, id, collection })=>{
101
- const page = registration(req, collection.slug);
102
- if (!page) return;
103
232
  try {
104
- const published = await previousPublishedContent(req, collection.slug, id);
233
+ const page = registration(req, collection.slug);
234
+ // Keep the earlier page guard's baseline read and every refusal intact.
235
+ const published = page ? await previousPublishedContent(req, collection.slug, id) : await storedContent(req, collection.slug, id);
105
236
  if (!published || published._status === 'draft') return;
106
- const paths = pathsOf(req, collection.slug, [
237
+ const paths = sortLockKeys(documentPathsOf(req, collection.slug, [
107
238
  published
108
- ]);
239
+ ]).map(normalisePath));
109
240
  const exec = await req.transactionID != null ? txExecutor(req) : pooledExecutor(req.payload);
110
- let tests = await placementTests(exec);
111
- if (await req.transactionID != null) {
112
- await lockPlacementScope(exec, guardExperimentIds(tests, placementSlugs(optionsOf(req), collection.slug, published), collection.slug, paths, req.context.xpHeldExperiments, taggedIds(published)), paths);
241
+ let tests = page ? await placementTests(exec) : undefined;
242
+ const { views, affected } = await blockRemovalRule.prepare(req, collection.slug, collection.trash && published.deletedAt != null ? undefined : published, {}, true, exec, tests);
243
+ if (!page) {
244
+ if (!affected.length) return;
245
+ if (await req.transactionID != null) {
246
+ await assertReadCommitted(req);
247
+ await lockPlacementScope(exec, guardExperimentIds([], [], collection.slug, [], req.context.xpHeldExperiments, new Set(), affected.map((test)=>test.id)), []);
248
+ tests = (await removableBlockTests(exec, affected.map((test)=>test.slug))).map((test)=>({
249
+ ...test,
250
+ kind: 'block'
251
+ }));
252
+ } else tests = affected;
253
+ } else if (await req.transactionID != null) {
254
+ await assertReadCommitted(req);
255
+ await lockPlacementScope(exec, guardExperimentIds(tests, allPlacementSlugs(req, collection.slug, published, 'all-locales'), collection.slug, paths, req.context.xpHeldExperiments, taggedIds(published), affected.map((test)=>test.id)), paths);
113
256
  tests = await placementTests(exec);
114
257
  }
115
258
  for (const path of paths)protect(tests.filter((t)=>!t.pageCollection || t.pageCollection === collection.slug), path);
259
+ if (affected.length) await blockRemovalRule.check(req, tests, affected, collection.slug, id, true, views, operationFrame(req, collection.slug)?.bulk);
116
260
  } catch (error) {
117
261
  mapBusy(error);
118
262
  }
119
263
  };
120
264
  export const pageGuardBeforeChange = async ({ req, collection, originalDoc, operation, data })=>{
121
265
  const drafts = Boolean(collection.versions && collection.versions.drafts);
122
- const call = operations(req)?.get(collection.slug)?.at(-1);
123
- if (drafts && call?.draft && (call.restore || data._status !== 'published')) return data;
266
+ const call = operationFrame(req, collection.slug);
267
+ if (drafts && call?.draft && (call.restore || data._status !== 'published')) {
268
+ await blockRemovalRule.prepare(req, collection.slug, undefined, data, false);
269
+ return data;
270
+ }
124
271
  const after = operation === 'create' ? data : {
125
272
  ...originalDoc,
126
273
  ...data
@@ -128,20 +275,33 @@ export const pageGuardBeforeChange = async ({ req, collection, originalDoc, oper
128
275
  const options = optionsOf(req);
129
276
  try {
130
277
  const published = operation === 'create' ? undefined : await previousPublishedContent(req, collection.slug, originalDoc.id);
278
+ // Preserve the localization-off path and its IO. Localized writes mirror
279
+ // the base Payload uses for this operation's unselected languages.
280
+ const stored = operation === 'create' || !hasLocalizedFields(req.payload.config.collections?.find((entry)=>entry.slug === collection.slug)?.fields ?? [], req.payload.config) ? published : await placementWriteContent(req, collection.slug, originalDoc.id, published ?? await storedContent(req, collection.slug, originalDoc.id), {
281
+ versionId: call?.versionId,
282
+ bulk: call?.isBulk,
283
+ draft: call?.draft,
284
+ publishSpecificLocale: call?.publishSpecificLocale,
285
+ trashing: Boolean(collection.trash && data.deletedAt != null)
286
+ });
131
287
  const before = published?._status === 'draft' ? undefined : published;
132
- const beforeSlugs = placementSlugs(options, collection.slug, before);
133
- const afterSlugs = placementSlugs(options, collection.slug, after);
134
- const beforePaths = pathsOf(req, collection.slug, [
288
+ const beforeSlugs = allPlacementSlugs(req, collection.slug, before, 'all-locales');
289
+ const rawAfter = mergedPlacementLocales(req, collection.slug, stored, after);
290
+ const afterSlugs = allPlacementSlugs(req, collection.slug, rawAfter, 'all-locales');
291
+ const oldPaths = documentPathsOf(req, collection.slug, [
135
292
  before
136
- ]), afterPaths = pathsOf(req, collection.slug, [
137
- after
293
+ ]), newPaths = documentPathsOf(req, collection.slug, [
294
+ rawAfter
138
295
  ]);
296
+ const beforePaths = sortLockKeys(oldPaths.map(normalisePath)), afterPaths = sortLockKeys(newPaths.map(normalisePath));
139
297
  const paths = sortLockKeys([
140
298
  ...beforePaths,
141
299
  ...afterPaths
142
300
  ]);
143
301
  const exec = await req.transactionID != null ? txExecutor(req) : pooledExecutor(req.payload);
144
302
  let tests = await placementTests(exec);
303
+ const trashing = Boolean(collection.trash && after.deletedAt != null);
304
+ const { views, affected, hidden } = await blockRemovalRule.prepare(req, collection.slug, collection.trash && before?.deletedAt != null ? undefined : before, rawAfter, trashing || drafts && after._status !== 'published', exec, tests, 'all-locales');
145
305
  const publishes = !drafts || after._status === 'published';
146
306
  const noTransaction = ()=>{
147
307
  if (publishes && tests.some((t)=>t.kind === 'block' && active(t) && afterSlugs.includes(t.slug))) throw new XpNoTransactionError('Save this page with transactions on.');
@@ -149,13 +309,14 @@ export const pageGuardBeforeChange = async ({ req, collection, originalDoc, oper
149
309
  if (await req.transactionID == null) noTransaction();
150
310
  else {
151
311
  try {
312
+ await assertReadCommitted(req);
152
313
  await lockPlacementScope(exec, guardExperimentIds(tests, [
153
314
  ...beforeSlugs,
154
315
  ...afterSlugs
155
316
  ], collection.slug, paths, req.context.xpHeldExperiments, taggedIds([
156
317
  before,
157
- after
158
- ])), paths);
318
+ rawAfter
319
+ ]), affected.map((test)=>test.id)), paths);
159
320
  tests = await placementTests(exec);
160
321
  } catch (error) {
161
322
  if (!(error instanceof XpNoTransactionError)) throw error;
@@ -166,33 +327,40 @@ export const pageGuardBeforeChange = async ({ req, collection, originalDoc, oper
166
327
  }
167
328
  }
168
329
  if (operation === 'update' && before) {
169
- const page = registration(req, collection.slug);
170
- const old = page?.pathOf(before);
171
330
  const unpublishing = drafts && data._status === 'draft';
172
331
  const trashing = collection.trash && data.deletedAt != null && !originalDoc.deletedAt;
173
- if (old != null && (unpublishing || trashing || page.pathOf(after) !== old)) protect(tests.filter((t)=>!t.pageCollection || t.pageCollection === collection.slug), normalisePath(old));
332
+ for (const old of oldPaths)if (unpublishing || trashing || !newPaths.includes(old)) protect(tests.filter((t)=>!t.pageCollection || t.pageCollection === collection.slug), normalisePath(old));
174
333
  }
334
+ if (publishes) refuseNewNestedTests(req, collection.slug, before, rawAfter, tests);
175
335
  if (publishes) refuseInteraction(tests, beforeSlugs, afterSlugs, beforePaths, afterPaths, collection.slug);
336
+ if (affected.length) await blockRemovalRule.check(req, tests, affected, collection.slug, originalDoc.id, trashing || drafts && after._status !== 'published', views, call?.bulk, hidden);
176
337
  return data;
177
338
  } catch (error) {
178
339
  mapBusy(error);
179
340
  }
180
341
  };
181
342
  /** Unwrapped: these writes must fail the publish closed, unlike the best-effort audit. */ export const pageGuardAfterChange = async ({ req, collection, doc })=>{
182
- const call = operations(req)?.get(collection.slug)?.at(-1);
343
+ const call = operationFrame(req, collection.slug);
183
344
  const drafts = Boolean(collection.versions && collection.versions.drafts);
345
+ if (!call?.draft && (drafts && doc._status !== 'published' || collection.trash && doc.deletedAt != null)) observeUnpublishedRemoval(req, collection.slug, doc.id);
184
346
  if (drafts && (doc._status !== 'published' || call?.draft && call.restore)) return doc;
185
347
  if (await req.transactionID == null) return doc;
186
348
  try {
187
349
  const stored = await storedContent(req, collection.slug, doc.id);
188
350
  if (!stored) throw new Error('The saved placement row was not found.');
189
- const slugs = placementSlugs(optionsOf(req), collection.slug, stored);
351
+ const slugs = allPlacementSlugs(req, collection.slug, stored, 'all-locales');
352
+ // A later publish in this transaction can restore an earlier removal. Only
353
+ // clear its claim once the stored published row actually contains the block.
354
+ const claims = req.context.xpPlacementRemovals;
190
355
  const exec = txExecutor(req);
191
356
  for (const test of (await placementTests(exec))){
192
357
  if (test.kind === 'block' && active(test) && slugs.includes(test.slug)) await appendPlacementDoc(exec, test.id, test.phase, {
193
358
  collection: collection.slug,
194
359
  id: doc.id
195
360
  });
361
+ if (test.kind === 'block' && claims && claims.transaction === await req.transactionID && stored._status !== 'draft' && stored.deletedAt == null) {
362
+ releaseRestoredRemovalClaims(req, collection.slug, stored, test);
363
+ }
196
364
  }
197
365
  return doc;
198
366
  } catch (error) {
@@ -0,0 +1,5 @@
1
+ import { type CollectionBeforeChangeHook } from 'payload';
2
+ /** Host component labels are not passed to the plugin; display their type as words. */
3
+ export declare function puckBlockName(rawType: string): string;
4
+ /** Validate only the Puck JSON included in a publishing write. */
5
+ export declare function puckGoalsBeforeChange(field: string): CollectionBeforeChangeHook;
@@ -0,0 +1,62 @@
1
+ import { ValidationError } from 'payload';
2
+ import { validateClickGoal } from '../goals/validate.js';
3
+ import { CLICK_KEY } from '../goals/key.js';
4
+ import { puckGoalRefusal } from '../goals/picker/copy.js';
5
+ /** Host component labels are not passed to the plugin; display their type as words. */ export function puckBlockName(rawType) {
6
+ // Cap before any regex: the type comes from saved page JSON and the first pattern backtracks on long capital runs.
7
+ const type = rawType.slice(0, 64);
8
+ const words = type.replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2').replace(/([a-z0-9])([A-Z])/g, '$1 $2').replace(/([A-Za-z])([0-9])/g, '$1 $2').replace(/[\s_-]+/g, ' ').trim();
9
+ return words ? words[0].toUpperCase() + words.slice(1) : 'Page';
10
+ }
11
+ /** Validate only the Puck JSON included in a publishing write. */ export function puckGoalsBeforeChange(field) {
12
+ return async function validatePuckGoals({ collection, data, originalDoc, req }) {
13
+ const drafts = Boolean(collection.versions && collection.versions.drafts);
14
+ if (drafts && data._status !== 'published') return data;
15
+ // Publishing a stored draft without resending its JSON publishes the draft's JSON.
16
+ let value = data[field] !== undefined ? data[field] : drafts ? originalDoc?.[field] : undefined;
17
+ if (value === undefined) return data;
18
+ if (typeof value === 'string') {
19
+ try {
20
+ value = JSON.parse(value);
21
+ } catch {
22
+ return data;
23
+ }
24
+ }
25
+ const errors = [];
26
+ let first;
27
+ // Holds the raw component type; it is humanised once, for the first refusal only.
28
+ async function walk(value, path, block = '') {
29
+ if (!value || typeof value !== 'object') return;
30
+ const item = value;
31
+ if (typeof item.type === 'string' && item.props && typeof item.props === 'object' && !Array.isArray(item.props)) {
32
+ block = item.type;
33
+ }
34
+ for (const [key, prop] of Object.entries(value)){
35
+ const propPath = `${path}.${key}`;
36
+ if (key === 'xpGoal' && typeof prop === 'string') {
37
+ const result = await validateClickGoal(prop, req);
38
+ if (result !== true) {
39
+ first ??= {
40
+ key: prop,
41
+ block
42
+ };
43
+ errors.push({
44
+ path: propPath,
45
+ message: result
46
+ });
47
+ }
48
+ } else await walk(prop, propPath, block);
49
+ }
50
+ }
51
+ await walk(value, field);
52
+ if (first) {
53
+ const error = new ValidationError({
54
+ collection: collection.slug,
55
+ errors
56
+ });
57
+ error.message = puckGoalRefusal(first.key, first.block ? puckBlockName(first.block) : 'Page', !CLICK_KEY.test(first.key), errors.length - 1);
58
+ throw error;
59
+ }
60
+ return data;
61
+ };
62
+ }
@@ -0,0 +1,8 @@
1
+ import { type PayloadRequest } from 'payload';
2
+ /** Called by the page guard with its published baseline and merged write, only on publish.
3
+ * Puck's public reducer bypasses slot disallow; this server check covers that path.
4
+ */
5
+ export declare function refuseNewNestedTests(req: PayloadRequest, collection: string, before: Record<string, unknown> | undefined, after: Record<string, unknown>, tests: readonly {
6
+ slug: string;
7
+ name: string;
8
+ }[]): void;
@@ -0,0 +1,36 @@
1
+ import { ValidationError } from 'payload';
2
+ import { placementReader } from '../blocks/placementLocale.js';
3
+ import { puckCollections } from '../options.js';
4
+ import { nestedTests, nestedTestKey, nestedTestLabel, nestedTestSlug, nearestOuterTest } from '../puck/nestedTests.js';
5
+ import { nestedTestCopy } from '../puck/nestedTestCopy.js';
6
+ /** Called by the page guard with its published baseline and merged write, only on publish.
7
+ * Puck's public reducer bypasses slot disallow; this server check covers that path.
8
+ */ export function refuseNewNestedTests(req, collection, before, after, tests) {
9
+ const options = req.payload.config.custom?.xp;
10
+ const registration = puckCollections(options).find((entry)=>entry.slug === collection);
11
+ if (!registration) return;
12
+ const reader = placementReader(req, collection, options);
13
+ for (const view of reader.views){
14
+ const read = (doc)=>{
15
+ const content = reader.read(doc, 'all-locales', view);
16
+ return content.editor === 'puck' ? nestedTests(content.doc?.[registration.field]) : [];
17
+ };
18
+ const existing = new Set(read(before).map(nestedTestKey));
19
+ const additions = read(after).filter((pair)=>!existing.has(nestedTestKey(pair)));
20
+ const added = additions[0];
21
+ if (!added) continue;
22
+ const name = (block)=>tests.find((test)=>test.slug === nestedTestSlug(block))?.name ?? nestedTestLabel(block);
23
+ const message = nestedTestCopy.publish(name(nearestOuterTest(additions, added.inner.props.id)), name(added.inner));
24
+ const error = new ValidationError({
25
+ collection,
26
+ errors: [
27
+ {
28
+ path: registration.field,
29
+ message
30
+ }
31
+ ]
32
+ });
33
+ error.message = message;
34
+ throw error;
35
+ }
36
+ }
@@ -0,0 +1,11 @@
1
+ import type { CollectionAfterChangeHook } from 'payload';
2
+ import type { DocId } from '../types/contracts.js';
3
+ declare module 'payload' {
4
+ interface RequestContext {
5
+ xpDuplicate?: {
6
+ collection: string;
7
+ created: DocId[];
8
+ };
9
+ }
10
+ }
11
+ export declare const trackPageCopies: CollectionAfterChangeHook;
@@ -0,0 +1,7 @@
1
+ export const trackPageCopies = ({ collection, context, operation, doc })=>{
2
+ const tracking = context.xpDuplicate;
3
+ if (operation === 'create' && tracking?.collection === collection.slug) {
4
+ tracking.created.push(doc.id);
5
+ }
6
+ return doc;
7
+ };
@@ -13,4 +13,4 @@ export declare class DocsResponseError extends Error {
13
13
  /** Read every Payload REST page with the caller's credentials and cancellation. Transport,
14
14
  * invalid successful responses and aborts throw; HTTP refusals retain their status/body. Keeps the first document per id; refuses
15
15
  * incomplete lists after 1000 pages with page-limit-exceeded. */
16
- export declare function fetchAllDocs<T>(url: string, options?: Pick<RequestInit, 'credentials' | 'signal'>): Promise<DocsResult<T>>;
16
+ export declare function fetchAllDocs<T>(url: string, options?: Pick<RequestInit, 'cache' | 'credentials' | 'signal'>): Promise<DocsResult<T>>;
@@ -0,0 +1,10 @@
1
+ import type { PreflightResult } from '../types/endpoints.js';
2
+ type Placement = PreflightResult['placements'][number];
3
+ export type PreviewPage = Placement & {
4
+ key: string;
5
+ slotCount: number;
6
+ };
7
+ /** Localized responses are already grouped by the server. Legacy single-language
8
+ * responses contain occurrences; preserve their page grouping and version counts. */
9
+ export declare function placementPages(placements: readonly Placement[], flagPoint?: string): PreviewPage[];
10
+ export {};
@@ -1,4 +1,12 @@
1
- /** Preview URLs identify pages; counts use the most placements in any one version. */ export function previewPages(placements, flagPoint) {
1
+ /** Localized responses are already grouped by the server. Legacy single-language
2
+ * responses contain occurrences; preserve their page grouping and version counts. */ export function placementPages(placements, flagPoint) {
3
+ if (placements.some((placement)=>placement.allLocales || placement.locales?.length)) {
4
+ return placements.map((placement, index)=>({
5
+ ...placement,
6
+ key: String(index),
7
+ slotCount: placement.slotCount ?? 1
8
+ }));
9
+ }
2
10
  const pages = new Map();
3
11
  for (const [index, placement] of placements.entries()){
4
12
  const key = `${placement.collection}\u0000${String(placement.id)}${placement.collection === flagPoint ? `\u0000${index}` : ''}`;
@@ -15,7 +23,7 @@
15
23
  page: {
16
24
  ...placement,
17
25
  key,
18
- slotCount: 1
26
+ slotCount: placement.slotCount ?? 1
19
27
  },
20
28
  versions: new Map([
21
29
  [
@@ -30,6 +38,3 @@
30
38
  ...pages.values()
31
39
  ].map(({ page })=>page);
32
40
  }
33
- /** Pages that offer something to do: a preview or an editor link. The section is hidden when none do. */ export function actionablePreviewPages(placements, flagPoint) {
34
- return previewPages(placements, flagPoint).filter((page)=>page.url || page.editorUrl);
35
- }
@@ -46,9 +46,10 @@ export interface ManifestInputs {
46
46
  excludeIds?: DocId[];
47
47
  pruneFlagDefaultIds?: DocId[];
48
48
  }
49
- export declare function loadManifestInputs(req: PayloadRequest, { excludeIds, pruneFlagDefaultIds }?: {
49
+ export declare function loadManifestInputs(req: PayloadRequest, { excludeIds, pruneFlagDefaultIds, signal }?: {
50
50
  excludeIds?: DocId[];
51
51
  pruneFlagDefaultIds?: DocId[];
52
+ signal?: AbortSignal;
52
53
  }): Promise<ManifestInputs>;
53
54
  /** Pure compiler. Assignment config comes exclusively from the frozen phase. */
54
55
  /**