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

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 (593) hide show
  1. package/README.md +284 -772
  2. package/dist/admin/LayerUsage.js +1 -1
  3. package/dist/admin/MetricSourceSelect.js +12 -5
  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 +21 -9
  23. package/dist/admin/copy/goals.js +28 -11
  24. package/dist/admin/copy/newTest.d.ts +7 -7
  25. package/dist/admin/copy/newTest.js +10 -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.d.ts +4 -2
  38. package/dist/admin/surface/SurfaceShell.js +29 -4
  39. package/dist/admin/surface/TestRowMenu.d.ts +13 -0
  40. package/dist/admin/surface/TestRowMenu.js +163 -0
  41. package/dist/admin/surface/TestsHome.d.ts +5 -3
  42. package/dist/admin/surface/TestsHome.js +273 -58
  43. package/dist/admin/surface/TestsSurface.js +8 -7
  44. package/dist/admin/surface/goals/DeleteGoalDialog.d.ts +7 -0
  45. package/dist/admin/surface/goals/DeleteGoalDialog.js +42 -0
  46. package/dist/admin/surface/goals/GoalForm.d.ts +2 -1
  47. package/dist/admin/surface/goals/GoalForm.js +342 -212
  48. package/dist/admin/surface/goals/GoalsList.d.ts +1 -1
  49. package/dist/admin/surface/goals/GoalsList.js +107 -37
  50. package/dist/admin/surface/goals/data.d.ts +2 -0
  51. package/dist/admin/surface/goals/data.js +11 -2
  52. package/dist/admin/surface/goals/goals.css +9 -1
  53. package/dist/admin/surface/goals/goals.model.d.ts +12 -2
  54. package/dist/admin/surface/goals/goals.model.js +39 -1
  55. package/dist/admin/surface/home.model.d.ts +10 -8
  56. package/dist/admin/surface/home.model.js +27 -22
  57. package/dist/admin/surface/newTest/NewTest.d.ts +4 -4
  58. package/dist/admin/surface/newTest/NewTest.js +149 -118
  59. package/dist/admin/surface/newTest/PageWizard.d.ts +5 -2
  60. package/dist/admin/surface/newTest/PageWizard.js +115 -80
  61. package/dist/admin/surface/newTest/newTest.css +28 -9
  62. package/dist/admin/surface/results/ResultsHeader.d.ts +3 -3
  63. package/dist/admin/surface/results/ResultsHeader.js +115 -83
  64. package/dist/admin/surface/surface.css +29 -0
  65. package/dist/admin/surface/test/TestPage.d.ts +1 -2
  66. package/dist/admin/surface/test/TestPage.js +44 -152
  67. package/dist/admin/surface/useXpStepNav.d.ts +11 -0
  68. package/dist/admin/surface/useXpStepNav.js +14 -0
  69. package/dist/admin/theme.css +2 -0
  70. package/dist/admin/views/CollectionListRedirect.d.ts +1 -0
  71. package/dist/admin/views/CollectionListRedirect.js +1 -1
  72. package/dist/admin/views/ExperimentsRootView.js +18 -165
  73. package/dist/admin/views/GoalEditRedirect.d.ts +4 -0
  74. package/dist/admin/views/GoalEditRedirect.js +14 -0
  75. package/dist/admin/views/GoalsCollectionListView.d.ts +2 -0
  76. package/dist/admin/views/GoalsCollectionListView.js +4 -0
  77. package/dist/admin/views/TestsCollectionListView.d.ts +2 -0
  78. package/dist/admin/views/TestsCollectionListView.js +4 -0
  79. package/dist/admin/views/TestsNavLinkServer.d.ts +1 -0
  80. package/dist/admin/views/TestsNavLinkServer.js +2 -2
  81. package/dist/admin/views/TestsSurfaceClient.d.ts +3 -0
  82. package/dist/admin/views/TestsSurfaceClient.js +35 -0
  83. package/dist/admin/views/buildSurfaceProps.d.ts +8 -0
  84. package/dist/admin/views/buildSurfaceProps.js +102 -0
  85. package/dist/admin/views/renderCollectionList.d.ts +2 -0
  86. package/dist/admin/views/renderCollectionList.js +34 -0
  87. package/dist/admin/views/renderTestsSurface.d.ts +3 -0
  88. package/dist/admin/views/renderTestsSurface.js +34 -0
  89. package/dist/blocks/bindings.js +8 -14
  90. package/dist/blocks/createExperimentBlock.js +1 -1
  91. package/dist/blocks/formState.js +2 -2
  92. package/dist/blocks/placementLanguages.d.ts +7 -0
  93. package/dist/blocks/placementLanguages.js +27 -0
  94. package/dist/blocks/placementLocale.d.ts +37 -0
  95. package/dist/blocks/placementLocale.js +270 -0
  96. package/dist/collections/experiments/config.js +17 -8
  97. package/dist/collections/experiments/deleteGuard.js +2 -2
  98. package/dist/collections/experiments/lockHook.js +21 -2
  99. package/dist/collections/experiments/pickSlug.js +2 -0
  100. package/dist/collections/metrics.js +28 -9
  101. package/dist/collections/metricsGuards.js +2 -0
  102. package/dist/collections/serialize.js +8 -6
  103. package/dist/constants.d.ts +1 -0
  104. package/dist/constants.js +1 -0
  105. package/dist/db/adapter.d.ts +9 -1
  106. package/dist/db/adapter.js +77 -1
  107. package/dist/db/appends.d.ts +13 -0
  108. package/dist/db/appends.js +49 -0
  109. package/dist/db/bulkPlacementRemoval.d.ts +30 -0
  110. package/dist/db/bulkPlacementRemoval.js +111 -0
  111. package/dist/db/delete.d.ts +1 -1
  112. package/dist/db/delete.js +2 -4
  113. package/dist/db/events.d.ts +9 -0
  114. package/dist/db/events.js +42 -8
  115. package/dist/db/executor.d.ts +7 -1
  116. package/dist/db/executor.js +7 -3
  117. package/dist/db/pageCopies.d.ts +5 -0
  118. package/dist/db/pageCopies.js +31 -0
  119. package/dist/db/placements.d.ts +2 -0
  120. package/dist/db/placements.js +8 -0
  121. package/dist/db/results.d.ts +5 -1
  122. package/dist/db/results.js +21 -5
  123. package/dist/db/snapshots.d.ts +2 -0
  124. package/dist/endpoints/contentLocale.d.ts +6 -0
  125. package/dist/endpoints/contentLocale.js +15 -0
  126. package/dist/endpoints/deleteImpact.d.ts +6 -0
  127. package/dist/endpoints/deleteImpact.js +207 -0
  128. package/dist/endpoints/duplicateOriginal.d.ts +38 -0
  129. package/dist/endpoints/duplicateOriginal.js +407 -0
  130. package/dist/endpoints/editorSurface.d.ts +3 -0
  131. package/dist/endpoints/editorSurface.js +31 -0
  132. package/dist/endpoints/events.js +103 -39
  133. package/dist/endpoints/index.js +57 -9
  134. package/dist/endpoints/pages.js +247 -64
  135. package/dist/endpoints/placementStatus.js +13 -5
  136. package/dist/endpoints/preflight.d.ts +1 -1
  137. package/dist/endpoints/preflight.js +17 -2
  138. package/dist/endpoints/results.d.ts +1 -1
  139. package/dist/endpoints/results.js +6 -2
  140. package/dist/endpoints/routeId.d.ts +2 -2
  141. package/dist/endpoints/routeId.js +11 -5
  142. package/dist/endpoints/summary.js +46 -12
  143. package/dist/endpoints/testVersion.d.ts +2 -0
  144. package/dist/endpoints/testVersion.js +38 -0
  145. package/dist/endpoints/transitions.js +41 -29
  146. package/dist/errors.d.ts +5 -0
  147. package/dist/errors.js +8 -0
  148. package/dist/events/request.d.ts +6 -2
  149. package/dist/events/request.js +35 -8
  150. package/dist/events/rows.d.ts +1 -1
  151. package/dist/events/rows.js +24 -8
  152. package/dist/events/writable.d.ts +9 -0
  153. package/dist/events/writable.js +13 -0
  154. package/dist/exports/adminClient.d.ts +1 -1
  155. package/dist/exports/adminClient.js +1 -1
  156. package/dist/exports/adminRsc.d.ts +3 -0
  157. package/dist/exports/adminRsc.js +3 -0
  158. package/dist/exports/index.d.ts +1 -1
  159. package/dist/exports/rsc.d.ts +1 -0
  160. package/dist/exports/rsc.js +1 -0
  161. package/dist/fields/xpGoal.js +3 -15
  162. package/dist/goals/fairness.d.ts +1 -1
  163. package/dist/goals/fairness.js +44 -35
  164. package/dist/goals/picker/clickGoalPicker.model.d.ts +8 -1
  165. package/dist/goals/picker/clickGoalPicker.model.js +20 -2
  166. package/dist/goals/picker/copy.d.ts +6 -2
  167. package/dist/goals/picker/copy.js +11 -2
  168. package/dist/goals/picker/useClickGoalPicker.d.ts +1 -1
  169. package/dist/goals/picker/useClickGoalPicker.js +4 -2
  170. package/dist/goals/sourceLabel.d.ts +2 -0
  171. package/dist/goals/sourceLabel.js +4 -0
  172. package/dist/goals/validate.d.ts +3 -0
  173. package/dist/goals/validate.js +15 -0
  174. package/dist/hooks/blockRemovalRule.d.ts +30 -0
  175. package/dist/hooks/blockRemovalRule.js +165 -0
  176. package/dist/hooks/hostHook.js +6 -2
  177. package/dist/hooks/pageGuard.d.ts +27 -2
  178. package/dist/hooks/pageGuard.js +213 -45
  179. package/dist/hooks/puckGoals.d.ts +5 -0
  180. package/dist/hooks/puckGoals.js +62 -0
  181. package/dist/hooks/puckNestedTests.d.ts +8 -0
  182. package/dist/hooks/puckNestedTests.js +36 -0
  183. package/dist/hooks/trackPageCopies.d.ts +11 -0
  184. package/dist/hooks/trackPageCopies.js +7 -0
  185. package/dist/lib/fetchAllDocs.d.ts +1 -1
  186. package/dist/lib/placementPages.d.ts +10 -0
  187. package/dist/{admin/previewLinks.model.js → lib/placementPages.js} +10 -5
  188. package/dist/manifest/compile.d.ts +2 -1
  189. package/dist/manifest/compile.js +13 -6
  190. package/dist/onInit.js +36 -0
  191. package/dist/options.d.ts +2 -0
  192. package/dist/options.js +23 -2
  193. package/dist/plugin.js +70 -21
  194. package/dist/proxy/pageNavigation.d.ts +4 -0
  195. package/dist/proxy/pageNavigation.js +28 -0
  196. package/dist/proxy/resolve.js +52 -25
  197. package/dist/puck/ExperimentPicker.d.ts +2 -1
  198. package/dist/puck/ExperimentPicker.js +62 -40
  199. package/dist/puck/ExperimentSlot.js +3 -1
  200. package/dist/puck/copy.d.ts +5 -1
  201. package/dist/puck/copy.js +5 -1
  202. package/dist/puck/editor/ConfigureTestDrawer.d.ts +25 -0
  203. package/dist/puck/editor/ConfigureTestDrawer.js +150 -0
  204. package/dist/puck/editor/CreateExperimentDrawer.d.ts +12 -2
  205. package/dist/puck/editor/CreateExperimentDrawer.js +89 -21
  206. package/dist/puck/editor/EditorControls.d.ts +14 -0
  207. package/dist/puck/editor/EditorControls.js +99 -0
  208. package/dist/puck/editor/ExperimentSlotEditor.d.ts +2 -1
  209. package/dist/puck/editor/ExperimentSlotEditor.js +1007 -182
  210. package/dist/puck/editor/LeftoverVersions.d.ts +15 -0
  211. package/dist/puck/editor/LeftoverVersions.js +79 -0
  212. package/dist/puck/editor/PlacementNotice.d.ts +8 -0
  213. package/dist/puck/editor/PlacementNotice.js +22 -0
  214. package/dist/puck/editor/QuickTestActions.d.ts +6 -0
  215. package/dist/puck/editor/QuickTestActions.js +72 -0
  216. package/dist/puck/editor/ResultsReadout.d.ts +4 -1
  217. package/dist/puck/editor/ResultsReadout.js +35 -19
  218. package/dist/puck/editor/VersionBuilder.d.ts +67 -12
  219. package/dist/puck/editor/VersionBuilder.js +560 -231
  220. package/dist/puck/editor/armWrites.d.ts +11 -2
  221. package/dist/puck/editor/armWrites.js +43 -4
  222. package/dist/puck/editor/armsCache.d.ts +3 -1
  223. package/dist/puck/editor/armsCache.js +20 -4
  224. package/dist/puck/editor/blockClipboard.d.ts +16 -0
  225. package/dist/puck/editor/blockClipboard.js +20 -0
  226. package/dist/puck/editor/cloneSlot.d.ts +2 -0
  227. package/dist/puck/editor/cloneSlot.js +7 -0
  228. package/dist/puck/editor/copy.d.ts +65 -20
  229. package/dist/puck/editor/copy.js +73 -21
  230. package/dist/puck/editor/createTest.d.ts +3 -0
  231. package/dist/puck/editor/createTest.js +33 -0
  232. package/dist/puck/editor/editor.chrome.css +200 -20
  233. package/dist/puck/editor/editor.css +338 -25
  234. package/dist/puck/editor/editor.model.d.ts +17 -1
  235. package/dist/puck/editor/editor.model.js +61 -4
  236. package/dist/puck/editor/editorSurface.d.ts +10 -0
  237. package/dist/puck/editor/editorSurface.js +65 -0
  238. package/dist/puck/editor/experimentOutlinePlugin.js +96 -28
  239. package/dist/puck/editor/localPlacements.d.ts +5 -0
  240. package/dist/puck/editor/localPlacements.js +43 -0
  241. package/dist/puck/editor/outlineVersion.d.ts +5 -0
  242. package/dist/puck/editor/outlineVersion.js +36 -0
  243. package/dist/puck/editor/placementsCache.d.ts +60 -0
  244. package/dist/puck/editor/placementsCache.js +263 -0
  245. package/dist/puck/editor/sidebar.d.ts +8 -0
  246. package/dist/puck/editor/sidebar.js +74 -0
  247. package/dist/puck/editor/usePageSaveReadiness.d.ts +6 -0
  248. package/dist/puck/editor/usePageSaveReadiness.js +31 -0
  249. package/dist/puck/editor/usePlacementNotice.d.ts +3 -0
  250. package/dist/puck/editor/usePlacementNotice.js +15 -0
  251. package/dist/puck/editor/xpGoalPuckEditorField.js +105 -86
  252. package/dist/puck/experimentSlotField.d.ts +3 -0
  253. package/dist/puck/experimentSlotField.js +15 -4
  254. package/dist/puck/experimentSlug.d.ts +2 -0
  255. package/dist/puck/experimentSlug.js +3 -0
  256. package/dist/puck/nestedTestCopy.d.ts +8 -0
  257. package/dist/puck/nestedTestCopy.js +22 -0
  258. package/dist/puck/nestedTests.d.ts +17 -0
  259. package/dist/puck/nestedTests.js +30 -0
  260. package/dist/puck/slotConfig.d.ts +2 -2
  261. package/dist/puck/slotConfig.js +18 -5
  262. package/dist/puck/visibility.d.ts +20 -0
  263. package/dist/puck/visibility.js +81 -0
  264. package/dist/results/aggregate.d.ts +6 -3
  265. package/dist/results/aggregate.js +9 -9
  266. package/dist/results/analyse.d.ts +2 -0
  267. package/dist/results/analyse.js +2 -2
  268. package/dist/results/health.d.ts +8 -0
  269. package/dist/results/health.js +28 -0
  270. package/dist/results/identityCredit.d.ts +1 -0
  271. package/dist/results/identityCredit.js +4 -1
  272. package/dist/results/verdict.d.ts +1 -1
  273. package/dist/results/verdict.js +9 -7
  274. package/dist/runtime/cookie.d.ts +10 -2
  275. package/dist/runtime/cookie.js +38 -6
  276. package/dist/runtime/cookieOptions.d.ts +6 -0
  277. package/dist/runtime/cookieOptions.js +14 -0
  278. package/dist/runtime/proxyRuntime.d.ts +1 -0
  279. package/dist/runtime/proxyRuntime.js +18 -8
  280. package/dist/runtime/signing.d.ts +1 -0
  281. package/dist/runtime/signing.js +5 -0
  282. package/dist/sanitizeReadinessDetail.d.ts +2 -2
  283. package/dist/sanitizeReadinessDetail.js +22 -2
  284. package/dist/server/getAssignments.js +11 -10
  285. package/dist/server/recordContentChange.d.ts +1 -1
  286. package/dist/server/recordContentChange.js +48 -22
  287. package/dist/server/resolveExperimentBlocks.js +2 -4
  288. package/dist/server/resolveExperimentData.js +8 -8
  289. package/dist/server/runResults.js +54 -15
  290. package/dist/server/startExperiment.d.ts +20 -0
  291. package/dist/server/startExperiment.js +70 -0
  292. package/dist/server/trackConversion.js +10 -13
  293. package/dist/{admin → testSurface}/PreviewLinks.d.ts +2 -1
  294. package/dist/{admin → testSurface}/PreviewLinks.js +9 -5
  295. package/dist/testSurface/actions/DecideDialog.d.ts +17 -0
  296. package/dist/testSurface/actions/DecideDialog.js +222 -0
  297. package/dist/testSurface/actions/LifecycleAction.d.ts +17 -0
  298. package/dist/testSurface/actions/LifecycleAction.js +107 -0
  299. package/dist/{admin → testSurface}/actions/MakeContentResult.d.ts +4 -3
  300. package/dist/{admin → testSurface}/actions/MakeContentResult.js +10 -2
  301. package/dist/{admin → testSurface}/actions/actions.model.d.ts +13 -5
  302. package/dist/testSurface/actions/actions.model.js +123 -0
  303. package/dist/{admin → testSurface}/actions/decide.model.d.ts +1 -0
  304. package/dist/{admin → testSurface}/actions/decide.model.js +1 -0
  305. package/dist/{admin → testSurface}/allocation.model.js +6 -3
  306. package/dist/{admin → testSurface}/api.d.ts +20 -7
  307. package/dist/{admin → testSurface}/api.js +72 -22
  308. package/dist/testSurface/contentLocaleURL.d.ts +2 -0
  309. package/dist/testSurface/contentLocaleURL.js +3 -0
  310. package/dist/{admin → testSurface}/copy/actions.d.ts +37 -14
  311. package/dist/{admin → testSurface}/copy/actions.js +40 -17
  312. package/dist/{admin → testSurface}/copy/advanced.d.ts +10 -0
  313. package/dist/{admin → testSurface}/copy/advanced.js +10 -0
  314. package/dist/{admin → testSurface}/copy/arms.d.ts +1 -1
  315. package/dist/{admin → testSurface}/copy/arms.js +1 -1
  316. package/dist/{admin → testSurface}/copy/audience.d.ts +4 -3
  317. package/dist/{admin → testSurface}/copy/audience.js +5 -4
  318. package/dist/{admin → testSurface}/copy/common.d.ts +15 -6
  319. package/dist/{admin → testSurface}/copy/common.js +20 -10
  320. package/dist/testSurface/copy/languages.d.ts +12 -0
  321. package/dist/testSurface/copy/languages.js +8 -0
  322. package/dist/{admin → testSurface}/copy/metrics.d.ts +7 -0
  323. package/dist/testSurface/copy/metrics.js +18 -0
  324. package/dist/testSurface/copy/pages.d.ts +84 -0
  325. package/dist/testSurface/copy/pages.js +90 -0
  326. package/dist/{admin → testSurface}/copy/readiness.d.ts +40 -6
  327. package/dist/{admin → testSurface}/copy/readiness.js +54 -9
  328. package/dist/{admin → testSurface}/copy/recommendation.d.ts +4 -4
  329. package/dist/{admin → testSurface}/copy/recommendation.js +4 -4
  330. package/dist/{admin → testSurface}/copy/results.d.ts +19 -12
  331. package/dist/{admin → testSurface}/copy/results.js +21 -12
  332. package/dist/testSurface/copy/review.d.ts +20 -0
  333. package/dist/testSurface/copy/review.js +21 -0
  334. package/dist/{admin → testSurface}/copy/setting.d.ts +1 -2
  335. package/dist/{admin → testSurface}/copy/setting.js +1 -2
  336. package/dist/{admin → testSurface}/copy/surface.d.ts +11 -2
  337. package/dist/{admin → testSurface}/copy/surface.js +14 -11
  338. package/dist/{admin → testSurface}/copy/testPage.d.ts +61 -12
  339. package/dist/testSurface/copy/testPage.js +168 -0
  340. package/dist/testSurface/format/adminURL.d.ts +7 -0
  341. package/dist/testSurface/format/adminURL.js +9 -0
  342. package/dist/{admin → testSurface}/format/date.d.ts +1 -0
  343. package/dist/testSurface/format/date.js +21 -0
  344. package/dist/{admin → testSurface}/labels.d.ts +1 -2
  345. package/dist/{admin → testSurface}/labels.js +2 -3
  346. package/dist/{admin → testSurface}/lockedNotice.model.d.ts +2 -0
  347. package/dist/{admin → testSurface}/lockedNotice.model.js +31 -0
  348. package/dist/testSurface/placementLabel.d.ts +8 -0
  349. package/dist/testSurface/placementLabel.js +24 -0
  350. package/dist/{admin → testSurface}/placements/placementLabels.d.ts +2 -0
  351. package/dist/{admin → testSurface}/placements/placementLabels.js +3 -2
  352. package/dist/{admin → testSurface}/previewLinks.model.d.ts +1 -6
  353. package/dist/testSurface/previewLinks.model.js +4 -0
  354. package/dist/testSurface/readPreflight.d.ts +13 -0
  355. package/dist/testSurface/readPreflight.js +44 -0
  356. package/dist/testSurface/readinessRead.d.ts +53 -0
  357. package/dist/testSurface/readinessRead.js +50 -0
  358. package/dist/{admin → testSurface}/results/VerdictHero.d.ts +2 -1
  359. package/dist/{admin → testSurface}/results/VerdictHero.js +5 -1
  360. package/dist/testSurface/results/results.css +64 -0
  361. package/dist/{admin → testSurface}/results/results.model.d.ts +3 -2
  362. package/dist/{admin → testSurface}/results/results.model.js +16 -11
  363. package/dist/{admin → testSurface}/surface/contracts.d.ts +17 -3
  364. package/dist/testSurface/surface/editorPlacement.d.ts +26 -0
  365. package/dist/testSurface/surface/editorPlacement.js +78 -0
  366. package/dist/testSurface/surface/pageBlock/pageBlock.model.js +9 -0
  367. package/dist/testSurface/surface/pageBlock/parts.js +107 -0
  368. package/dist/testSurface/surface/pagePicker/CopyRoute.d.ts +13 -0
  369. package/dist/testSurface/surface/pagePicker/CopyRoute.js +273 -0
  370. package/dist/testSurface/surface/pagePicker/PageCombobox.d.ts +21 -0
  371. package/dist/testSurface/surface/pagePicker/PageCombobox.js +498 -0
  372. package/dist/testSurface/surface/pagePicker/pagePicker.css +73 -0
  373. package/dist/{admin → testSurface}/surface/pagePicker/pagePicker.model.d.ts +7 -3
  374. package/dist/{admin → testSurface}/surface/pagePicker/pagePicker.model.js +17 -2
  375. package/dist/{admin → testSurface}/surface/readiness/ActionDialogs.d.ts +9 -5
  376. package/dist/testSurface/surface/readiness/ActionDialogs.js +372 -0
  377. package/dist/{admin → testSurface}/surface/readiness/Banner.d.ts +4 -3
  378. package/dist/testSurface/surface/readiness/Banner.js +198 -0
  379. package/dist/testSurface/surface/readiness/BlockerList.d.ts +11 -0
  380. package/dist/testSurface/surface/readiness/BlockerList.js +31 -0
  381. package/dist/testSurface/surface/readiness/SaveStatus.d.ts +13 -0
  382. package/dist/testSurface/surface/readiness/SaveStatus.js +67 -0
  383. package/dist/{admin → testSurface}/surface/readiness/parts.js +0 -2
  384. package/dist/{admin → testSurface}/surface/readiness/readiness.model.d.ts +28 -2
  385. package/dist/testSurface/surface/readiness/readiness.model.js +377 -0
  386. package/dist/testSurface/surface/readiness/useTransition.d.ts +16 -0
  387. package/dist/testSurface/surface/readiness/useTransition.js +141 -0
  388. package/dist/{admin → testSurface}/surface/results/ReleasePages.d.ts +6 -3
  389. package/dist/{admin → testSurface}/surface/results/ReleasePages.js +40 -40
  390. package/dist/{admin → testSurface}/surface/results/ResultsBody.d.ts +11 -4
  391. package/dist/{admin → testSurface}/surface/results/ResultsBody.js +207 -104
  392. package/dist/{admin → testSurface}/surface/results/recommendation.model.js +3 -3
  393. package/dist/{admin → testSurface}/surface/results/useResults.d.ts +26 -8
  394. package/dist/{admin → testSurface}/surface/results/useResults.js +3 -2
  395. package/dist/{admin → testSurface}/surface/setting/parts.js +89 -46
  396. package/dist/testSurface/surface/setting/setting.css +18 -0
  397. package/dist/{admin → testSurface}/surface/test/AdvancedSection.js +12 -4
  398. package/dist/testSurface/surface/test/DeleteTest.d.ts +23 -0
  399. package/dist/testSurface/surface/test/DeleteTest.js +270 -0
  400. package/dist/testSurface/surface/test/GoalSection.d.ts +4 -0
  401. package/dist/{admin → testSurface}/surface/test/GoalSection.js +119 -89
  402. package/dist/testSurface/surface/test/LengthSection.d.ts +2 -0
  403. package/dist/{admin → testSurface}/surface/test/LengthSection.js +25 -14
  404. package/dist/{admin → testSurface}/surface/test/PageHoldout.d.ts +1 -1
  405. package/dist/{admin → testSurface}/surface/test/PageHoldout.js +11 -8
  406. package/dist/{admin → testSurface}/surface/test/Rail.js +7 -4
  407. package/dist/{admin → testSurface}/surface/test/ReadinessBar.d.ts +2 -1
  408. package/dist/{admin → testSurface}/surface/test/ReadinessBar.js +4 -11
  409. package/dist/{admin → testSurface}/surface/test/Section.d.ts +3 -1
  410. package/dist/testSurface/surface/test/Section.js +88 -0
  411. package/dist/{admin → testSurface}/surface/test/TargetingSection.js +87 -12
  412. package/dist/testSurface/surface/test/TestSurface.d.ts +19 -0
  413. package/dist/testSurface/surface/test/TestSurface.js +265 -0
  414. package/dist/testSurface/surface/test/VersionsSection.d.ts +5 -0
  415. package/dist/testSurface/surface/test/VersionsSection.js +301 -0
  416. package/dist/{admin → testSurface}/surface/test/fields.d.ts +33 -9
  417. package/dist/testSurface/surface/test/fields.js +300 -0
  418. package/dist/{admin → testSurface}/surface/test/pageParts.js +30 -44
  419. package/dist/testSurface/surface/test/testPage.css +111 -0
  420. package/dist/{admin → testSurface}/surface/test/testPage.model.d.ts +1 -0
  421. package/dist/{admin → testSurface}/surface/test/testPage.model.js +6 -0
  422. package/dist/{admin → testSurface}/surface/testDocument.model.d.ts +3 -0
  423. package/dist/{admin → testSurface}/surface/testDocument.model.js +4 -1
  424. package/dist/testSurface/surface/useTestDocument.d.ts +60 -0
  425. package/dist/testSurface/surface/useTestDocument.js +782 -0
  426. package/dist/testSurface/surface/watchTestDocument.d.ts +15 -0
  427. package/dist/testSurface/surface/watchTestDocument.js +181 -0
  428. package/dist/testSurface/surfaceUrls.d.ts +8 -0
  429. package/dist/testSurface/surfaceUrls.js +23 -0
  430. package/dist/{admin → testSurface}/useApi.d.ts +21 -5
  431. package/dist/testSurface/useOnTestReturn.d.ts +2 -0
  432. package/dist/testSurface/useOnTestReturn.js +27 -0
  433. package/dist/testSurface/useReadinessPolling.d.ts +3 -0
  434. package/dist/testSurface/useReadinessPolling.js +26 -0
  435. package/dist/transitions/addMetric.d.ts +2 -5
  436. package/dist/transitions/addMetric.js +5 -1
  437. package/dist/transitions/allocate.d.ts +2 -2
  438. package/dist/transitions/allocate.js +3 -1
  439. package/dist/transitions/archive.d.ts +1 -1
  440. package/dist/transitions/archive.js +3 -2
  441. package/dist/transitions/checkStart.d.ts +6 -1
  442. package/dist/transitions/checkStart.js +133 -17
  443. package/dist/transitions/contentFields.js +9 -5
  444. package/dist/transitions/decide.d.ts +1 -1
  445. package/dist/transitions/decide.js +6 -3
  446. package/dist/transitions/deleteExperiment.d.ts +2 -2
  447. package/dist/transitions/deleteExperiment.js +17 -7
  448. package/dist/transitions/kernel.d.ts +4 -0
  449. package/dist/transitions/kernel.js +9 -4
  450. package/dist/transitions/makeContent.d.ts +2 -1
  451. package/dist/transitions/makeContent.js +41 -17
  452. package/dist/transitions/nestedPlacementNames.d.ts +5 -0
  453. package/dist/transitions/nestedPlacementNames.js +32 -0
  454. package/dist/transitions/pageAddress.d.ts +6 -0
  455. package/dist/transitions/pageAddress.js +71 -0
  456. package/dist/transitions/pageVersions.js +3 -1
  457. package/dist/transitions/phaseRecord.d.ts +2 -0
  458. package/dist/transitions/phaseRecord.js +5 -0
  459. package/dist/transitions/placementInteractions.d.ts +3 -3
  460. package/dist/transitions/placementInteractions.js +16 -12
  461. package/dist/transitions/placements.d.ts +54 -8
  462. package/dist/transitions/placements.js +304 -81
  463. package/dist/transitions/preflightData.d.ts +5 -3
  464. package/dist/transitions/preflightData.js +137 -40
  465. package/dist/transitions/releaseHoldout.d.ts +2 -1
  466. package/dist/transitions/releaseHoldout.js +3 -1
  467. package/dist/transitions/releasePages.d.ts +2 -1
  468. package/dist/transitions/releasePages.js +3 -1
  469. package/dist/transitions/resolveCaps.d.ts +2 -4
  470. package/dist/transitions/start.d.ts +6 -8
  471. package/dist/transitions/start.js +72 -35
  472. package/dist/transitions/startReads.d.ts +7 -0
  473. package/dist/transitions/startReads.js +28 -0
  474. package/dist/transitions/stop.d.ts +2 -1
  475. package/dist/transitions/stop.js +3 -2
  476. package/dist/types/contracts.d.ts +15 -3
  477. package/dist/types/endpoints.d.ts +121 -17
  478. package/dist/types/puck.d.ts +1 -0
  479. package/dist/types/runtime.d.ts +15 -9
  480. package/dist/types/snapshot.d.ts +2 -0
  481. package/dist/types/surface.d.ts +9 -9
  482. package/dist/ui/Button.js +2 -2
  483. package/dist/ui/Card.d.ts +2 -1
  484. package/dist/ui/Card.js +4 -4
  485. package/dist/ui/ChipsInput.d.ts +8 -1
  486. package/dist/ui/ChipsInput.js +17 -4
  487. package/dist/ui/Dialog.d.ts +24 -2
  488. package/dist/ui/Dialog.js +141 -6
  489. package/dist/ui/Drawer.d.ts +10 -0
  490. package/dist/ui/Drawer.js +29 -0
  491. package/dist/ui/Inputs.d.ts +4 -3
  492. package/dist/ui/Inputs.js +6 -4
  493. package/dist/ui/SelectControl.d.ts +33 -0
  494. package/dist/ui/SelectControl.js +504 -0
  495. package/dist/ui/Tabs.d.ts +4 -4
  496. package/dist/ui/Tabs.js +35 -32
  497. package/dist/ui/ui.css +50 -5
  498. package/package.json +3 -2
  499. package/dist/admin/actions/ConfirmDialog.d.ts +0 -19
  500. package/dist/admin/actions/ConfirmDialog.js +0 -149
  501. package/dist/admin/actions/DecideDialog.d.ts +0 -10
  502. package/dist/admin/actions/DecideDialog.js +0 -190
  503. package/dist/admin/actions/actions.model.js +0 -70
  504. package/dist/admin/copy/metrics.js +0 -9
  505. package/dist/admin/copy/pages.d.ts +0 -26
  506. package/dist/admin/copy/pages.js +0 -26
  507. package/dist/admin/copy/review.d.ts +0 -17
  508. package/dist/admin/copy/review.js +0 -17
  509. package/dist/admin/copy/testPage.js +0 -104
  510. package/dist/admin/format/date.js +0 -10
  511. package/dist/admin/results/results.css +0 -64
  512. package/dist/admin/styles.css +0 -10
  513. package/dist/admin/styles.d.ts +0 -2
  514. package/dist/admin/styles.js +0 -3
  515. package/dist/admin/surface/pageBlock/pageBlock.model.js +0 -8
  516. package/dist/admin/surface/pageBlock/parts.js +0 -69
  517. package/dist/admin/surface/pagePicker/CopyRoute.d.ts +0 -6
  518. package/dist/admin/surface/pagePicker/CopyRoute.js +0 -53
  519. package/dist/admin/surface/pagePicker/PagePicker.d.ts +0 -10
  520. package/dist/admin/surface/pagePicker/PagePicker.js +0 -172
  521. package/dist/admin/surface/readiness/ActionDialogs.js +0 -337
  522. package/dist/admin/surface/readiness/Banner.js +0 -190
  523. package/dist/admin/surface/readiness/SaveStatus.d.ts +0 -5
  524. package/dist/admin/surface/readiness/SaveStatus.js +0 -53
  525. package/dist/admin/surface/readiness/readiness.model.js +0 -205
  526. package/dist/admin/surface/readiness/useTransition.d.ts +0 -11
  527. package/dist/admin/surface/readiness/useTransition.js +0 -35
  528. package/dist/admin/surface/setting/setting.css +0 -17
  529. package/dist/admin/surface/test/GoalSection.d.ts +0 -2
  530. package/dist/admin/surface/test/LengthSection.d.ts +0 -2
  531. package/dist/admin/surface/test/Section.js +0 -47
  532. package/dist/admin/surface/test/VersionsSection.d.ts +0 -4
  533. package/dist/admin/surface/test/VersionsSection.js +0 -247
  534. package/dist/admin/surface/test/fields.js +0 -216
  535. package/dist/admin/surface/test/testPage.css +0 -97
  536. package/dist/admin/surface/useTestDocument.d.ts +0 -32
  537. package/dist/admin/surface/useTestDocument.js +0 -415
  538. /package/dist/{admin → testSurface}/allocation.model.d.ts +0 -0
  539. /package/dist/{admin → testSurface}/arms/arms.model.d.ts +0 -0
  540. /package/dist/{admin → testSurface}/arms/arms.model.js +0 -0
  541. /package/dist/{admin → testSurface}/arms/pageTarget.model.d.ts +0 -0
  542. /package/dist/{admin → testSurface}/arms/pageTarget.model.js +0 -0
  543. /package/dist/{admin → testSurface}/arms/params.model.d.ts +0 -0
  544. /package/dist/{admin → testSurface}/arms/params.model.js +0 -0
  545. /package/dist/{admin → testSurface}/metricSource.model.d.ts +0 -0
  546. /package/dist/{admin → testSurface}/metricSource.model.js +0 -0
  547. /package/dist/{admin → testSurface}/placements/placementLabels.model.d.ts +0 -0
  548. /package/dist/{admin → testSurface}/placements/placementLabels.model.js +0 -0
  549. /package/dist/{admin → testSurface}/placements/usePlacementLabels.d.ts +0 -0
  550. /package/dist/{admin → testSurface}/placements/usePlacementLabels.js +0 -0
  551. /package/dist/{admin → testSurface}/reload.d.ts +0 -0
  552. /package/dist/{admin → testSurface}/reload.js +0 -0
  553. /package/dist/{admin → testSurface}/results/CappedCell.d.ts +0 -0
  554. /package/dist/{admin → testSurface}/results/CappedCell.js +0 -0
  555. /package/dist/{admin → testSurface}/results/CiChart.d.ts +0 -0
  556. /package/dist/{admin → testSurface}/results/CiChart.js +0 -0
  557. /package/dist/{admin → testSurface}/results/DataQualityPanel.d.ts +0 -0
  558. /package/dist/{admin → testSurface}/results/DataQualityPanel.js +0 -0
  559. /package/dist/{admin → testSurface}/results/DataTable.d.ts +0 -0
  560. /package/dist/{admin → testSurface}/results/DataTable.js +0 -0
  561. /package/dist/{admin → testSurface}/results/StatTile.d.ts +0 -0
  562. /package/dist/{admin → testSurface}/results/StatTile.js +0 -0
  563. /package/dist/{admin → testSurface}/results/chart.model.d.ts +0 -0
  564. /package/dist/{admin → testSurface}/results/chart.model.js +0 -0
  565. /package/dist/{admin → testSurface}/results/format.d.ts +0 -0
  566. /package/dist/{admin → testSurface}/results/format.js +0 -0
  567. /package/dist/{admin → testSurface}/results/legacy.d.ts +0 -0
  568. /package/dist/{admin → testSurface}/results/legacy.js +0 -0
  569. /package/dist/{admin → testSurface}/results/releasePages.model.d.ts +0 -0
  570. /package/dist/{admin → testSurface}/results/releasePages.model.js +0 -0
  571. /package/dist/{admin → testSurface}/results/snapshot.d.ts +0 -0
  572. /package/dist/{admin → testSurface}/results/snapshot.js +0 -0
  573. /package/dist/{admin → testSurface}/review/review.model.d.ts +0 -0
  574. /package/dist/{admin → testSurface}/review/review.model.js +0 -0
  575. /package/dist/{admin → testSurface}/surface/contracts.js +0 -0
  576. /package/dist/{admin → testSurface}/surface/pageBlock/pageBlock.model.d.ts +0 -0
  577. /package/dist/{admin → testSurface}/surface/pageBlock/parts.d.ts +0 -0
  578. /package/dist/{admin → testSurface}/surface/readiness/parts.d.ts +0 -0
  579. /package/dist/{admin → testSurface}/surface/results/recommendation.model.d.ts +0 -0
  580. /package/dist/{admin → testSurface}/surface/setting/parts.d.ts +0 -0
  581. /package/dist/{admin → testSurface}/surface/setting/setting.model.d.ts +0 -0
  582. /package/dist/{admin → testSurface}/surface/setting/setting.model.js +0 -0
  583. /package/dist/{admin → testSurface}/surface/test/AdvancedSection.d.ts +0 -0
  584. /package/dist/{admin → testSurface}/surface/test/Rail.d.ts +0 -0
  585. /package/dist/{admin → testSurface}/surface/test/TargetingSection.d.ts +0 -0
  586. /package/dist/{admin → testSurface}/surface/test/jumpToSection.d.ts +0 -0
  587. /package/dist/{admin → testSurface}/surface/test/jumpToSection.js +0 -0
  588. /package/dist/{admin → testSurface}/surface/test/pageParts.d.ts +0 -0
  589. /package/dist/{admin → testSurface}/targeting/targeting.model.d.ts +0 -0
  590. /package/dist/{admin → testSurface}/targeting/targeting.model.js +0 -0
  591. /package/dist/{admin → testSurface}/theme.d.ts +0 -0
  592. /package/dist/{admin → testSurface}/theme.js +0 -0
  593. /package/dist/{admin → testSurface}/useApi.js +0 -0
@@ -1,5 +1,5 @@
1
+ import { GOAL_ROLES } from './metrics.js';
1
2
  export const RESULTS_COPY = {
2
- chooseGroup: 'Choose a group',
3
3
  tests: 'Tests',
4
4
  results: 'Results',
5
5
  test: 'Test',
@@ -39,7 +39,6 @@ export const RESULTS_COPY = {
39
39
  chanceToWin: 'Chance to win',
40
40
  risk: 'Risk',
41
41
  comparison: 'Comparison',
42
- original: 'Original',
43
42
  holdout: 'Measured, not compared',
44
43
  holdoutBaseline: 'Holdout · baseline',
45
44
  shippedGroup: 'the winner',
@@ -58,19 +57,22 @@ export const RESULTS_COPY = {
58
57
  infeasible: 'A clear answer would take more than 90 days at this traffic.',
59
58
  noCap: 'Not capped: fewer than 20 people had this outcome in the 90 days before Start, so every value counts in full.',
60
59
  quality: 'Data quality',
61
- missingWinner: 'The stored winner is missing from this round’s results.',
62
- missingWinnerNext: 'Recompute; if it persists, contact a developer before trusting these results.',
63
- srm: "Traffic isn't splitting as set. Check for caching or a page placed twice.",
60
+ missingWinner: "The stored winner is missing from this round's results.",
61
+ missingWinnerNext: 'Refresh results. If the problem continues, contact a developer before trusting these results.',
62
+ srm: "Traffic isn't splitting as set. Caching, a page placed twice, or automated traffic could affect the split.",
63
+ srmAction: "Don't trust these results. Ask a developer to check for caching, a page placed twice, or automated traffic.",
64
64
  multiGroup: 'People who saw more than one group were excluded.',
65
65
  multiGroupNext: 'Check for caching or a page placed twice before trusting the results.',
66
66
  mismatch: "Beacons that didn't match the assigned group were ignored.",
67
67
  mismatchNext: 'Check that the page reports the group it actually showed.',
68
+ rapidBrowserEvents: 'A larger share of visitors acted within seconds of arriving on one version than on another. One version may make it easier to act quickly, or some activity may be automated.',
69
+ rapidBrowserEventsNext: 'Check where the action appears in each version and ask your site team to review the traffic before choosing a winner.',
68
70
  identity: 'Some linked identities were seen in different groups.',
69
71
  identityNext: 'Check identity linking at sign-in and registration.',
70
72
  tooFew: 'Too few people have seen the compared groups.',
71
73
  tooFewNext: 'Keep collecting results until each compared group reaches the planned minimum.',
72
74
  layerFull: 'The layer has fewer slices reserved than the requested allocation.',
73
- layerNext: 'Free slices in the layer, then use "Let more people in".',
75
+ layerNext: 'Free up room in the layer to include more people.',
74
76
  unavailable: {
75
77
  'source-failed': "couldn't be read this time; the next results run will try again.",
76
78
  'source-unavailable': "can't be read because its data source is no longer available. Ask a developer to check this goal.",
@@ -81,7 +83,7 @@ export const RESULTS_COPY = {
81
83
  'not-supplied': "has no data for this results run; the next results run will try again.",
82
84
  'analysis-failed': "couldn't be calculated this time; the next results run will try again."
83
85
  },
84
- unavailableNext: 'Recompute; if it persists, contact a developer.',
86
+ unavailableNext: 'Refresh results. If the problem continues, contact a developer.',
85
87
  loading: 'Loading results…',
86
88
  refreshing: 'Refreshing…',
87
89
  retryPreview: 'Retry preview links',
@@ -89,11 +91,13 @@ export const RESULTS_COPY = {
89
91
  empty: 'No results yet — the first results appear within the hour after Start.',
90
92
  retry: 'Retry',
91
93
  round: 'Round',
92
- recompute: 'Recompute',
93
- recomputing: 'Recomputing…',
94
- primary: 'Primary outcome',
95
- secondary: 'Supporting (not used for the decision)',
96
- guardrail: 'Guardrails',
94
+ recompute: 'Refresh results',
95
+ recomputing: 'Refreshing…',
96
+ updated: (time)=>`Updated ${time}`,
97
+ previousRound: 'Choose the latest test round to decide.',
98
+ primary: GOAL_ROLES.primary,
99
+ secondary: `${GOAL_ROLES.secondary} (not used for the decision)`,
100
+ guardrail: GOAL_ROLES.guardrail,
97
101
  chart: 'Confidence interval over time',
98
102
  noHistory: 'Not enough history yet.'
99
103
  };
@@ -105,6 +109,8 @@ export const moreDays = (days)=>`About ${days} more ${days === '1' ? 'day' : 'da
105
109
  export const collectingCopy = (n, minimum, conversions, conversionMinimum)=>`${n} of ${minimum} people, ${conversions} of ${conversionMinimum} conversions`;
106
110
  export const uncappedTotal = (total)=>`Total ${total} (not capped)`;
107
111
  export const cappedCount = (count, cap)=>`${count} capped at ${cap}`;
112
+ export const revenueCapHelp = (threshold)=>`Amounts above ${threshold} are limited in the comparison. Totals include the full amounts.`;
113
+ export const percentileCapHelp = (tail)=>revenueCapHelp(tail === 0 ? 'the largest amount from the 90 days before the test' : `the cutoff for the largest ${tail}% of amounts from the 90 days before the test`);
108
114
  export const atLeast = (bound)=>`at least ${bound}`;
109
115
  export const atMost = (bound)=>`at most ${bound}`;
110
116
  export const intervalCopy = (low, high)=>`${low} to ${high}`;
@@ -120,3 +126,6 @@ export const chartSummary = (metric, groups, from, to, changes = [])=>`${metric}
120
126
  }).format(changes)}.` : ''}`;
121
127
  export const contentChangeTitle = (date)=>`Content changed ${date} by an editor`;
122
128
  export const daysOfPlan = (days, planned)=>`${days} of ${planned}`;
129
+ /** Use the frozen control label in the fixed wording stored by older verdict writers. */ export function verdictControlCopy(sentence, control) {
130
+ return sentence.replace(/^The Original is better\.(?= Decide for the Original\.$|$)/, ()=>`${control} is better.`).replace(/(^|\. )Decide for the Original(?=\.$| or restart without (?:it|them)\.$)/, (_, boundary)=>`${boundary}Decide for ${control}`).replace(/^((?:Both|All \d+ variants) beat )the Original;/, (_, lead)=>`${lead}${control};`).replace(/^(The main outcome improved compared with |This describes the shipped version compared with people still seeing )the Original\.$/, (_, lead)=>`${lead}${control}.`).replace(/(^|\. )((?:Smallest group so far|Fewest conversions so far): )Original,/g, (_, boundary, lead)=>`${boundary}${lead}${control},`);
131
+ }
@@ -0,0 +1,20 @@
1
+ export declare const REVIEW_COPY: {
2
+ readonly noBaseline: "No data yet for this goal.";
3
+ readonly preview: "Preview";
4
+ readonly previewBlocked: "Your browser blocked the preview window. Allow pop-ups for this site.";
5
+ readonly placedTimes: (n: number) => string;
6
+ readonly raise: "Raise allocation";
7
+ readonly addMetric: "Add a goal";
8
+ readonly allocationBody: "Raising allocation adds people; nobody already taking part changes group. Lowering needs a new round.";
9
+ readonly allocationInvalid: "Enter a whole percentage higher than the current allocation and no more than 100.";
10
+ readonly role: "How it counts";
11
+ readonly primary: "Main goal";
12
+ readonly supporting: "Also tracked";
13
+ readonly guardrail: "Must not get worse";
14
+ readonly metric: "Goal";
15
+ readonly chooseMetric: "Choose a goal";
16
+ readonly loadingMetrics: "Loading goals…";
17
+ readonly createGoal: "Create a goal";
18
+ readonly noMetrics: "There are no goals yet.";
19
+ readonly allMetricsAttached: "Every goal is already on this test.";
20
+ };
@@ -0,0 +1,21 @@
1
+ import { GOAL_ROLES } from './metrics.js';
2
+ export const REVIEW_COPY = {
3
+ noBaseline: 'No data yet for this goal.',
4
+ preview: 'Preview',
5
+ previewBlocked: 'Your browser blocked the preview window. Allow pop-ups for this site.',
6
+ placedTimes: (n)=>`(placed ${n} times on this page)`,
7
+ raise: 'Raise allocation',
8
+ addMetric: 'Add a goal',
9
+ allocationBody: 'Raising allocation adds people; nobody already taking part changes group. Lowering needs a new round.',
10
+ allocationInvalid: 'Enter a whole percentage higher than the current allocation and no more than 100.',
11
+ role: 'How it counts',
12
+ primary: GOAL_ROLES.primary,
13
+ supporting: GOAL_ROLES.secondary,
14
+ guardrail: GOAL_ROLES.guardrail,
15
+ metric: 'Goal',
16
+ chooseMetric: 'Choose a goal',
17
+ loadingMetrics: 'Loading goals…',
18
+ createGoal: 'Create a goal',
19
+ noMetrics: 'There are no goals yet.',
20
+ allMetricsAttached: 'Every goal is already on this test.'
21
+ };
@@ -3,8 +3,7 @@ export declare const SETTING_COPY: {
3
3
  readonly setValues: "Set values";
4
4
  readonly setting: "Setting";
5
5
  readonly choose: "Choose the setting first.";
6
- readonly current: "Current: {value}";
7
- readonly holdout: "Sees the Original.";
6
+ readonly current: "Current";
8
7
  readonly yes: "Yes";
9
8
  readonly no: "No";
10
9
  readonly empty: "Not set";
@@ -3,8 +3,7 @@ export const SETTING_COPY = {
3
3
  setValues: 'Set values',
4
4
  setting: 'Setting',
5
5
  choose: 'Choose the setting first.',
6
- current: 'Current: {value}',
7
- holdout: 'Sees the Original.',
6
+ current: 'Current',
8
7
  yes: 'Yes',
9
8
  no: 'No',
10
9
  empty: 'Not set',
@@ -18,7 +18,15 @@ export declare const SURFACE_COPY: {
18
18
  readonly retry: "Try again";
19
19
  readonly empty: "Create a test to learn what works.";
20
20
  readonly clear: "Clear";
21
- readonly groups: readonly ["Needs attention", "Running", "Ready to start", "Draft", "Decided", "Archived"];
21
+ readonly groups: {
22
+ readonly attention: "Needs attention";
23
+ readonly running: "Running";
24
+ readonly ready: "Ready to start";
25
+ readonly draft: "Draft";
26
+ readonly stopped: "Stopped";
27
+ readonly decided: "Decided";
28
+ readonly archived: "Archived";
29
+ };
22
30
  readonly kinds: {
23
31
  readonly block: "Page block";
24
32
  readonly flag: "Setting";
@@ -26,13 +34,14 @@ export declare const SURFACE_COPY: {
26
34
  readonly page: "Whole page";
27
35
  };
28
36
  readonly ready: "Ready to start";
37
+ readonly readyAgain: "Ready to start a new round";
29
38
  readonly next: "Review setup";
30
39
  readonly continue: "Continue setup";
31
40
  readonly results: "View results";
32
41
  readonly open: "Open";
33
42
  readonly health: {
34
43
  readonly red: "Needs attention";
35
- readonly amber: "Check data";
44
+ readonly amber: "Needs attention";
36
45
  readonly green: "On track";
37
46
  };
38
47
  readonly backToSetup: "Back to setup";
@@ -1,3 +1,4 @@
1
+ import { READINESS_COPY } from './readiness.js';
1
2
  export const SURFACE_COPY = {
2
3
  title: 'Tests',
3
4
  test: 'Test',
@@ -18,14 +19,15 @@ export const SURFACE_COPY = {
18
19
  retry: 'Try again',
19
20
  empty: 'Create a test to learn what works.',
20
21
  clear: 'Clear',
21
- groups: [
22
- 'Needs attention',
23
- 'Running',
24
- 'Ready to start',
25
- 'Draft',
26
- 'Decided',
27
- 'Archived'
28
- ],
22
+ groups: {
23
+ attention: READINESS_COPY.needsAttention,
24
+ running: 'Running',
25
+ ready: 'Ready to start',
26
+ draft: 'Draft',
27
+ stopped: 'Stopped',
28
+ decided: 'Decided',
29
+ archived: 'Archived'
30
+ },
29
31
  kinds: {
30
32
  block: 'Page block',
31
33
  flag: 'Setting',
@@ -33,19 +35,20 @@ export const SURFACE_COPY = {
33
35
  page: 'Whole page'
34
36
  },
35
37
  ready: 'Ready to start',
38
+ readyAgain: 'Ready to start a new round',
36
39
  next: 'Review setup',
37
40
  continue: 'Continue setup',
38
41
  results: 'View results',
39
42
  open: 'Open',
40
43
  health: {
41
- red: 'Needs attention',
42
- amber: 'Check data',
44
+ red: READINESS_COPY.needsAttention,
45
+ amber: READINESS_COPY.needsAttention,
43
46
  green: 'On track'
44
47
  },
45
48
  backToSetup: 'Back to setup'
46
49
  };
47
50
  export function runningLine(days, planned, people) {
48
- return `Running ${days} days of ${planned} · ${people} people so far`;
51
+ return `Day ${days} of ${planned} · ${people} people so far`;
49
52
  }
50
53
  export function decidedLine(date, winner) {
51
54
  return `Decided ${date}: ${winner}`;
@@ -1,9 +1,23 @@
1
+ import type { ExperimentKind } from '../../types/contracts.js';
1
2
  export declare const TEST_PAGE: {
3
+ readonly noAudienceRules: "No audience choices are available here. Everyone eligible takes part; leave this section as it is.";
4
+ readonly editVersionsOnCanvas: "Edit version content on the canvas.";
2
5
  readonly clickPageGroup: "On this test's page";
3
- readonly clickGoalsNote: "Goals inside linked documents aren't shown. Goals added in code (data-xp-goal) work but aren't listed here.";
4
6
  readonly clickGoalHelp: "A click shows interest, not the result you want.";
5
- readonly staleEdit: "Someone else changed this test. Reload to see their changes.";
7
+ readonly staleEdit: "This test changed. Reload to see the latest settings and discard your unfinished edits.";
6
8
  readonly reload: "Reload";
9
+ readonly reloadAfterError: "Reload to discard your unfinished edits and try again.";
10
+ readonly draftNotSaved: "Your edit is still unsaved.";
11
+ readonly conflictChoice: "Your edit is unsaved. Choose which value to keep. Saving your edit replaces the saved value shown below.";
12
+ readonly keepEdit: "Save my edit";
13
+ readonly retryEdit: "Try saving again";
14
+ readonly editInvalid: "Enter a valid value before saving.";
15
+ readonly detachedEdit: (field: string) => string;
16
+ readonly discardEdit: "Discard edit";
17
+ readonly savedValueChanged: "This field changed while you were editing.";
18
+ readonly savedValue: "Saved value";
19
+ readonly emptyValue: "(empty)";
20
+ readonly useSavedValue: "Use saved value";
7
21
  readonly loading: "Loading test…";
8
22
  readonly forbidden: "You don't have access to this test.";
9
23
  readonly missing: "This test no longer exists.";
@@ -36,9 +50,11 @@ export declare const TEST_PAGE: {
36
50
  };
37
51
  readonly hypothesis: "Why are you testing this? (optional)";
38
52
  readonly hypothesisPlaceholder: "We believe … will … because …";
39
- readonly notPlaced: "Not on a page yet. Open a page, add an Experiment block and choose this test.";
40
- readonly onPage: "On:";
41
- readonly openPage: "Open the page";
53
+ readonly notPlaced: "This test needs a block on a page. Add it to a Test block.";
54
+ readonly onPage: "Page:";
55
+ readonly openPage: "Open page";
56
+ readonly published: "Published";
57
+ readonly draft: "Draft";
42
58
  readonly editedOnPage: "Versions are edited on the page.";
43
59
  readonly editOnPage: "Edit on page";
44
60
  readonly empty: "Empty";
@@ -48,7 +64,7 @@ export declare const TEST_PAGE: {
48
64
  readonly emptySlot: "Nothing in this slot yet";
49
65
  readonly pageBinding: "Each version is a whole page at its own address.";
50
66
  readonly pageAddress: "Page address";
51
- readonly holdoutContent: "Sees the Original";
67
+ readonly valueColumn: "Value";
52
68
  readonly label: "Version label";
53
69
  readonly weight: "Share (%)";
54
70
  readonly balanceHelp: "Changing a share balances the other versions so the total stays at 100%.";
@@ -59,14 +75,19 @@ export declare const TEST_PAGE: {
59
75
  readonly invalidShare: "Use a whole number from 0 to 100.";
60
76
  readonly holdoutPrefix: "Holdout: ";
61
77
  readonly allocation: "How many people take part";
78
+ readonly everyoneMatches: "Everyone who matches the audience takes part.";
62
79
  readonly traffic: "How people are split";
63
- readonly goal: "Goal";
64
- readonly goalHelp: "The goal decides whether a version wins. Pick the one thing you want more of.";
65
- readonly guardrails: "Must not get worse (optional)";
66
- readonly guardrailHelp: "If a version makes one of these worse, you'll be warned.";
67
- readonly secondary: "Also keep an eye on (optional)";
80
+ readonly otherGoals: "Other goals (optional)";
81
+ readonly otherGoalsTitle: "Other goals";
82
+ readonly dontTrack: "Don't track";
83
+ readonly watch: "Also tracked";
84
+ readonly mustNotWorsen: "Must not get worse";
85
+ readonly otherGoalsHelp: "Also tracked goals appear in results. Choose Must not get worse to get a warning when a version hurts that goal.";
86
+ readonly goal: "Main goal";
87
+ readonly goalHelp: "The one thing you want more of. It decides the winner.";
88
+ readonly guardrailsShort: "Must not get worse";
89
+ readonly secondaryShort: "Also tracked";
68
90
  readonly manageGoals: "Manage goals";
69
- readonly searchGoals: "Search goals";
70
91
  readonly chooseGoal: "Choose a goal";
71
92
  readonly goalsError: "Couldn't load goals. Try again.";
72
93
  readonly noGoal: "None selected";
@@ -77,6 +98,7 @@ export declare const TEST_PAGE: {
77
98
  readonly addRule: "Add a rule";
78
99
  readonly removeRule: "Remove rule";
79
100
  readonly blockPathRule: "This rule no longer applies to page block tests; remove it.";
101
+ readonly targetingValue: (attribute: string) => string;
80
102
  readonly attribute: "Attribute";
81
103
  readonly comparison: "Comparison";
82
104
  readonly value: "Value";
@@ -85,6 +107,7 @@ export declare const TEST_PAGE: {
85
107
  readonly reach: "About how many people will see this per day?";
86
108
  readonly reachHelp: "A rough number is fine. It only sets the suggested length.";
87
109
  readonly duration: "Planned length (days)";
110
+ readonly endDate: "Planned end date";
88
111
  readonly noSuggestion: "Enter a daily number above to get a suggestion. 4 weeks is a safe default.";
89
112
  readonly chooseGoalSuggestion: "Choose a goal to get a suggestion.";
90
113
  readonly required: "(required)";
@@ -102,3 +125,29 @@ export declare const NUMBER_COMPARISONS: {
102
125
  readonly lte: "is at most";
103
126
  };
104
127
  export declare const placementCount: (count: number) => string;
128
+ export declare const DELETE_TEST: {
129
+ readonly blockWinner: (label: string) => string;
130
+ readonly currentSite: "This list reflects the site right now.";
131
+ readonly changedPages: (count: number) => string;
132
+ readonly unreadablePages: (count: number, total: number) => string;
133
+ readonly pageWinner: "These addresses will change where they send visitors:";
134
+ readonly content: "Deleting the test does not delete your page content. A Test block that used this test stays on its page and says the test was deleted.";
135
+ readonly runningSteps: readonly ["Stop the test.", "Archive the test."];
136
+ readonly archiveFirst: "You can delete this test after it is archived.";
137
+ readonly close: "Close";
138
+ readonly labelWithCode: (label: string, code: string) => string;
139
+ readonly allLocales: "All languages";
140
+ readonly locales: (names: string) => string;
141
+ readonly action: "Delete test";
142
+ readonly cancel: "Cancel";
143
+ readonly deleted: "Test deleted.";
144
+ readonly title: (name: string) => string;
145
+ readonly consequences: "This permanently deletes the test and all its rounds and results. You can't undo this.";
146
+ readonly alreadyDeleted: "This test was already deleted.";
147
+ readonly checking: "Checking what visitors will see…";
148
+ readonly checkFailed: "Couldn't check what visitors will see after deletion. You can still choose to delete this test.";
149
+ readonly noEffect: "Deleting this test will not change what visitors see.";
150
+ readonly versionChange: (before: string, after: string) => string;
151
+ readonly morePages: (count: number) => string;
152
+ };
153
+ export declare function deleteStatusCopy(status: string, kind?: ExperimentKind): string;
@@ -0,0 +1,168 @@
1
+ import { GOAL_ROLES } from './metrics.js';
2
+ import { API_MESSAGES } from './common.js';
3
+ import { PLACEMENT_LANGUAGES } from './languages.js';
4
+ export const TEST_PAGE = {
5
+ noAudienceRules: 'No audience choices are available here. Everyone eligible takes part; leave this section as it is.',
6
+ editVersionsOnCanvas: 'Edit version content on the canvas.',
7
+ clickPageGroup: "On this test's page",
8
+ clickGoalHelp: 'A click shows interest, not the result you want.',
9
+ staleEdit: 'This test changed. Reload to see the latest settings and discard your unfinished edits.',
10
+ reload: 'Reload',
11
+ reloadAfterError: 'Reload to discard your unfinished edits and try again.',
12
+ draftNotSaved: 'Your edit is still unsaved.',
13
+ conflictChoice: 'Your edit is unsaved. Choose which value to keep. Saving your edit replaces the saved value shown below.',
14
+ keepEdit: 'Save my edit',
15
+ retryEdit: 'Try saving again',
16
+ editInvalid: 'Enter a valid value before saving.',
17
+ detachedEdit: (field)=>`Your edit to “${field}” is still unsaved. Return to the field to finish it, or copy your edit and discard it here.`,
18
+ discardEdit: 'Discard edit',
19
+ savedValueChanged: 'This field changed while you were editing.',
20
+ savedValue: 'Saved value',
21
+ emptyValue: '(empty)',
22
+ useSavedValue: 'Use saved value',
23
+ loading: 'Loading test…',
24
+ forbidden: "You don't have access to this test.",
25
+ missing: 'This test no longer exists.',
26
+ error: "Couldn't load this test.",
27
+ retry: 'Try again',
28
+ name: 'Test name',
29
+ results: 'Results',
30
+ tests: 'Tests',
31
+ test: 'Test',
32
+ navigation: 'Sections',
33
+ completePrefix: 'Complete: ',
34
+ incompletePrefix: 'Incomplete: ',
35
+ complete: 'Complete',
36
+ incomplete: 'Incomplete',
37
+ completeMark: '✓',
38
+ incompleteMark: '○',
39
+ kinds: {
40
+ block: 'Page block',
41
+ page: 'Whole page',
42
+ flag: 'Setting',
43
+ code: 'Setting'
44
+ },
45
+ sections: {
46
+ what: "What you're testing",
47
+ versions: 'Versions',
48
+ win: 'What counts as a win',
49
+ who: 'Who takes part (optional)',
50
+ length: 'How long',
51
+ advanced: 'Advanced settings · for developers'
52
+ },
53
+ hypothesis: 'Why are you testing this? (optional)',
54
+ hypothesisPlaceholder: 'We believe … will … because …',
55
+ notPlaced: 'This test needs a block on a page. Add it to a Test block.',
56
+ onPage: 'Page:',
57
+ openPage: 'Open page',
58
+ published: 'Published',
59
+ draft: 'Draft',
60
+ editedOnPage: 'Versions are edited on the page.',
61
+ editOnPage: 'Edit on page',
62
+ empty: 'Empty',
63
+ pageReady: 'Page ready',
64
+ addPageAddress: 'Add a page address',
65
+ ready: 'Content ready',
66
+ emptySlot: 'Nothing in this slot yet',
67
+ pageBinding: 'Each version is a whole page at its own address.',
68
+ pageAddress: 'Page address',
69
+ valueColumn: 'Value',
70
+ label: 'Version label',
71
+ weight: 'Share (%)',
72
+ balanceHelp: 'Changing a share balances the other versions so the total stays at 100%.',
73
+ addVersion: 'Add a version',
74
+ addHoldout: 'Add a holdout',
75
+ split: 'Split evenly',
76
+ remove: 'Remove version',
77
+ invalidShare: 'Use a whole number from 0 to 100.',
78
+ holdoutPrefix: 'Holdout: ',
79
+ allocation: 'How many people take part',
80
+ everyoneMatches: 'Everyone who matches the audience takes part.',
81
+ traffic: 'How people are split',
82
+ otherGoals: 'Other goals (optional)',
83
+ otherGoalsTitle: 'Other goals',
84
+ dontTrack: "Don't track",
85
+ watch: GOAL_ROLES.secondary,
86
+ mustNotWorsen: GOAL_ROLES.guardrail,
87
+ otherGoalsHelp: "Also tracked goals appear in results. Choose Must not get worse to get a warning when a version hurts that goal.",
88
+ goal: GOAL_ROLES.primary,
89
+ goalHelp: 'The one thing you want more of. It decides the winner.',
90
+ guardrailsShort: GOAL_ROLES.guardrail,
91
+ secondaryShort: GOAL_ROLES.secondary,
92
+ manageGoals: 'Manage goals',
93
+ chooseGoal: 'Choose a goal',
94
+ goalsError: "Couldn't load goals. Try again.",
95
+ noGoal: 'None selected',
96
+ missingGoal: 'A goal that no longer exists',
97
+ goalUnavailable: 'Goal details unavailable',
98
+ everyone: 'Everyone on the pages where this appears.',
99
+ rulesSummary: 'Only people matching these rules.',
100
+ addRule: 'Add a rule',
101
+ removeRule: 'Remove rule',
102
+ blockPathRule: 'This rule no longer applies to page block tests; remove it.',
103
+ targetingValue: (attribute)=>`Value for ${attribute}`,
104
+ attribute: 'Attribute',
105
+ comparison: 'Comparison',
106
+ value: 'Value',
107
+ yes: 'Yes',
108
+ no: 'No',
109
+ reach: 'About how many people will see this per day?',
110
+ reachHelp: 'A rough number is fine. It only sets the suggested length.',
111
+ duration: 'Planned length (days)',
112
+ endDate: 'Planned end date',
113
+ noSuggestion: 'Enter a daily number above to get a suggestion. 4 weeks is a safe default.',
114
+ chooseGoalSuggestion: 'Choose a goal to get a suggestion.',
115
+ required: '(required)',
116
+ apply: 'Apply',
117
+ infeasible: 'This may need more people than are available.'
118
+ };
119
+ export const suggestedWeeks = (weeks)=>`Suggested: about ${Math.round(weeks * 10) / 10} weeks`;
120
+ export const weeksHint = (days)=>`About ${Math.round(days / 7 * 10) / 10} weeks`;
121
+ export const NUMBER_COMPARISONS = {
122
+ eq: 'is',
123
+ neq: 'is not',
124
+ gt: 'is more than',
125
+ gte: 'is at least',
126
+ lt: 'is less than',
127
+ lte: 'is at most'
128
+ };
129
+ export const placementCount = (count)=>` (placed ${count} times)`;
130
+ export const DELETE_TEST = {
131
+ action: 'Delete test',
132
+ cancel: 'Cancel',
133
+ deleted: 'Test deleted.',
134
+ title: (name)=>`Delete “${name}”?`,
135
+ consequences: "This permanently deletes the test and all its rounds and results. You can't undo this.",
136
+ alreadyDeleted: 'This test was already deleted.',
137
+ checking: 'Checking what visitors will see…',
138
+ checkFailed: "Couldn't check what visitors will see after deletion. You can still choose to delete this test.",
139
+ noEffect: 'Deleting this test will not change what visitors see.',
140
+ versionChange: (before, after)=>`${before} → ${after}`,
141
+ morePages: (count)=>`${count} more ${count === 1 ? 'page' : 'pages'}.`,
142
+ ...PLACEMENT_LANGUAGES,
143
+ blockWinner: (label)=>`On these pages, visitors will see ${label} again, or nothing where it is empty:`,
144
+ currentSite: 'This list reflects the site right now.',
145
+ changedPages: (count)=>`${count} ${count === 1 ? 'page' : 'pages'} will change`,
146
+ unreadablePages: (count, total)=>total === 1 ? "You can't open this page." : count === total ? "You can't open any of these pages." : `You can't open ${count} of these pages.`,
147
+ pageWinner: 'These addresses will change where they send visitors:',
148
+ content: 'Deleting the test does not delete your page content. A Test block that used this test stays on its page and says the test was deleted.',
149
+ runningSteps: [
150
+ 'Stop the test.',
151
+ 'Archive the test.'
152
+ ],
153
+ archiveFirst: 'You can delete this test after it is archived.',
154
+ close: 'Close'
155
+ };
156
+ export function deleteStatusCopy(status, kind) {
157
+ switch(status){
158
+ case 'running':
159
+ return DELETE_TEST.archiveFirst;
160
+ case 'stopped':
161
+ return DELETE_TEST.archiveFirst;
162
+ case 'decided':
163
+ if (!kind) return `${DELETE_TEST.archiveFirst} Open the test to see the available archive options.`;
164
+ return `${DELETE_TEST.archiveFirst} Use the archive controls on the test.`;
165
+ default:
166
+ return API_MESSAGES.deleteInvalidStatus;
167
+ }
168
+ }
@@ -0,0 +1,7 @@
1
+ /** Path-only admin URLs, preserving Payload's root-route and trailing-slash behavior.
2
+ * Source: Payload 3.90.2 utilities/formatAdminURL.ts (MIT).
3
+ */
4
+ export declare function formatAdminURL({ adminRoute, path }: {
5
+ adminRoute: string;
6
+ path?: string;
7
+ }): string;
@@ -0,0 +1,9 @@
1
+ /** Path-only admin URLs, preserving Payload's root-route and trailing-slash behavior.
2
+ * Source: Payload 3.90.2 utilities/formatAdminURL.ts (MIT).
3
+ */ export function formatAdminURL({ adminRoute, path = '' }) {
4
+ const url = `${adminRoute === '/' ? '' : adminRoute.replace(/\/$/, '')}${path}` || '/';
5
+ if (process.env.NEXT_TRAILING_SLASH !== 'true') return url;
6
+ const index = url.search(/[?#]/);
7
+ const pathname = index === -1 ? url : url.slice(0, index);
8
+ return pathname.endsWith('/') ? url : `${pathname}/${index === -1 ? '' : url.slice(index)}`;
9
+ }
@@ -1,2 +1,3 @@
1
1
  /** Shared calendar date for admin copy, chart axes and tooltips. */
2
2
  export declare function formatDate(value: unknown): string;
3
+ export declare function relativeTime(value: string, now?: number): string;
@@ -0,0 +1,21 @@
1
+ const formatter = new Intl.DateTimeFormat('en-GB', {
2
+ day: 'numeric',
3
+ month: 'short',
4
+ year: 'numeric',
5
+ timeZone: 'UTC'
6
+ });
7
+ /** Shared calendar date for admin copy, chart axes and tooltips. */ export function formatDate(value) {
8
+ const date = value instanceof Date ? value : typeof value === 'string' || typeof value === 'number' ? new Date(value) : null;
9
+ return date && Number.isFinite(date.valueOf()) ? formatter.format(date) : '—';
10
+ }
11
+ const relative = new Intl.RelativeTimeFormat('en', {
12
+ numeric: 'always'
13
+ });
14
+ export function relativeTime(value, now = Date.now()) {
15
+ const minutes = Math.max(0, Math.floor((now - Date.parse(value)) / 60_000));
16
+ if (!Number.isFinite(minutes)) return formatDate(value);
17
+ if (minutes === 0) return 'just now';
18
+ if (minutes < 60) return relative.format(-minutes, 'minute');
19
+ if (minutes < 1440) return relative.format(-Math.floor(minutes / 60), 'hour');
20
+ return relative.format(-Math.floor(minutes / 1440), 'day');
21
+ }
@@ -24,7 +24,6 @@ export declare const VERDICT_LABELS: {
24
24
  'data-problem': string;
25
25
  'guardrail-failing': string;
26
26
  collecting: string;
27
- 'original-better': string;
28
27
  'worse-none-better': string;
29
28
  winner: string;
30
29
  mixed: string;
@@ -36,5 +35,5 @@ export declare const VERDICT_LABELS: {
36
35
  export declare function armLabel(key: string, storedLabel?: string): string;
37
36
  export declare function statusLabel(status: Status): string;
38
37
  export declare function phaseKindLabel(kind: 'test' | 'rollout'): string;
39
- export declare function verdictCodeLabel(code: VerdictCode): string;
38
+ export declare function verdictCodeLabel(code: VerdictCode, controlLabel?: string): string;
40
39
  export declare function kindLabel(kind: ExperimentKind): string;
@@ -22,7 +22,6 @@ export const VERDICT_LABELS = {
22
22
  'data-problem': 'Check the data',
23
23
  'guardrail-failing': 'An important outcome got worse',
24
24
  collecting: 'Collecting results',
25
- 'original-better': 'The Original is better',
26
25
  'worse-none-better': 'No better option',
27
26
  winner: 'A winner',
28
27
  mixed: 'Mixed results',
@@ -40,8 +39,8 @@ export function statusLabel(status) {
40
39
  export function phaseKindLabel(kind) {
41
40
  return PHASE_KIND_LABELS[kind];
42
41
  }
43
- export function verdictCodeLabel(code) {
44
- return VERDICT_LABELS[code];
42
+ export function verdictCodeLabel(code, controlLabel = 'The control version') {
43
+ return code === 'original-better' ? `${controlLabel} is better` : VERDICT_LABELS[code];
45
44
  }
46
45
  export function kindLabel(kind) {
47
46
  return KIND_LABELS[kind];
@@ -1,3 +1,5 @@
1
1
  import type { Status } from '../types/contracts.js';
2
2
  import type { EditableField } from '../types/admin.js';
3
+ import type { SectionId } from './surface/contracts.js';
4
+ export declare function sectionLockNotice(status: Status, section: SectionId): string | null;
3
5
  export declare function lockedReason(status: Status, field: string, table: Record<Status, readonly EditableField[]>): string | null;