@delmaredigital/payload-experiments 0.4.0-rc.3 → 0.4.0-rc.5

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 (340) hide show
  1. package/dist/admin/LayerUsage.js +1 -1
  2. package/dist/admin/MetricSourceSelect.js +2 -2
  3. package/dist/admin/PlacementStatus.js +1 -1
  4. package/dist/admin/TestsDashboardCards.js +2 -2
  5. package/dist/admin/TestsNavLink.js +2 -2
  6. package/dist/admin/blocks/BlockPanel.js +3 -3
  7. package/dist/admin/blocks/TestBlockField.js +3 -3
  8. package/dist/admin/blocks/formApi.js +1 -1
  9. package/dist/admin/blocks/model.js +1 -1
  10. package/dist/admin/blocks/statusCache.js +1 -1
  11. package/dist/admin/components/RootViewMessage.js +1 -1
  12. package/dist/admin/copy/blocks.d.ts +2 -2
  13. package/dist/admin/copy/blocks.js +3 -2
  14. package/dist/admin/copy/goals.d.ts +5 -1
  15. package/dist/admin/copy/goals.js +9 -3
  16. package/dist/admin/goals/XpGoalField.js +155 -129
  17. package/dist/admin/goals/xpGoalField.css +2 -3
  18. package/dist/admin/status.model.js +1 -1
  19. package/dist/admin/surface/ResultsRoute.d.ts +2 -1
  20. package/dist/admin/surface/ResultsRoute.js +6 -13
  21. package/dist/admin/surface/SurfaceShell.js +2 -2
  22. package/dist/admin/surface/TestsHome.d.ts +1 -1
  23. package/dist/admin/surface/TestsHome.js +3 -3
  24. package/dist/admin/surface/TestsSurface.js +2 -2
  25. package/dist/admin/surface/goals/GoalForm.d.ts +1 -1
  26. package/dist/admin/surface/goals/GoalForm.js +55 -7
  27. package/dist/admin/surface/goals/GoalsList.d.ts +1 -1
  28. package/dist/admin/surface/goals/GoalsList.js +4 -4
  29. package/dist/admin/surface/goals/data.js +2 -2
  30. package/dist/admin/surface/goals/goals.css +7 -0
  31. package/dist/admin/surface/goals/goals.model.d.ts +11 -1
  32. package/dist/admin/surface/goals/goals.model.js +43 -0
  33. package/dist/admin/surface/home.model.d.ts +1 -1
  34. package/dist/admin/surface/home.model.js +5 -5
  35. package/dist/admin/surface/newTest/NewTest.d.ts +1 -1
  36. package/dist/admin/surface/newTest/NewTest.js +1 -1
  37. package/dist/admin/surface/newTest/PageWizard.d.ts +1 -1
  38. package/dist/admin/surface/newTest/PageWizard.js +23 -25
  39. package/dist/admin/surface/results/ResultsHeader.d.ts +2 -2
  40. package/dist/admin/surface/results/ResultsHeader.js +22 -15
  41. package/dist/admin/surface/test/TestPage.d.ts +1 -2
  42. package/dist/admin/surface/test/TestPage.js +45 -156
  43. package/dist/admin/views/ExperimentsRootView.js +1 -1
  44. package/dist/admin/views/TestsNavLinkServer.js +1 -1
  45. package/dist/admin/views/renderCollectionList.js +1 -1
  46. package/dist/admin/views/renderTestsSurface.js +1 -1
  47. package/dist/blocks/placementLocale.d.ts +21 -0
  48. package/dist/blocks/placementLocale.js +115 -0
  49. package/dist/collections/experiments/config.js +1 -1
  50. package/dist/collections/metrics.js +1 -1
  51. package/dist/db/bulkPlacementRemoval.d.ts +30 -0
  52. package/dist/db/bulkPlacementRemoval.js +107 -0
  53. package/dist/db/placements.d.ts +2 -0
  54. package/dist/db/placements.js +8 -0
  55. package/dist/endpoints/editorSurface.d.ts +3 -0
  56. package/dist/endpoints/editorSurface.js +31 -0
  57. package/dist/endpoints/index.js +28 -1
  58. package/dist/errors.d.ts +1 -0
  59. package/dist/errors.js +2 -0
  60. package/dist/fields/xpGoal.js +1 -1
  61. package/dist/goals/fairness.d.ts +1 -1
  62. package/dist/goals/fairness.js +1 -1
  63. package/dist/goals/picker/clickGoalPicker.model.d.ts +8 -1
  64. package/dist/goals/picker/clickGoalPicker.model.js +20 -2
  65. package/dist/goals/picker/copy.d.ts +4 -2
  66. package/dist/goals/picker/copy.js +4 -2
  67. package/dist/goals/picker/useClickGoalPicker.d.ts +1 -1
  68. package/dist/goals/picker/useClickGoalPicker.js +4 -2
  69. package/dist/hooks/blockRemovalRule.d.ts +29 -0
  70. package/dist/hooks/blockRemovalRule.js +141 -0
  71. package/dist/hooks/pageGuard.d.ts +24 -2
  72. package/dist/hooks/pageGuard.js +178 -24
  73. package/dist/lib/placementPages.d.ts +9 -0
  74. package/dist/{admin/previewLinks.model.js → lib/placementPages.js} +1 -4
  75. package/dist/onInit.js +22 -0
  76. package/dist/plugin.js +2 -1
  77. package/dist/puck/ExperimentPicker.js +25 -10
  78. package/dist/puck/copy.d.ts +4 -1
  79. package/dist/puck/copy.js +4 -1
  80. package/dist/puck/editor/ConfigureTestDrawer.d.ts +21 -0
  81. package/dist/puck/editor/ConfigureTestDrawer.js +147 -0
  82. package/dist/puck/editor/CreateExperimentDrawer.d.ts +11 -2
  83. package/dist/puck/editor/CreateExperimentDrawer.js +73 -9
  84. package/dist/puck/editor/EditorControls.d.ts +14 -0
  85. package/dist/puck/editor/EditorControls.js +99 -0
  86. package/dist/puck/editor/ExperimentSlotEditor.js +690 -79
  87. package/dist/puck/editor/LeftoverVersions.d.ts +13 -0
  88. package/dist/puck/editor/LeftoverVersions.js +115 -0
  89. package/dist/puck/editor/PlacementNotice.d.ts +8 -0
  90. package/dist/puck/editor/PlacementNotice.js +22 -0
  91. package/dist/puck/editor/QuickTestActions.d.ts +3 -0
  92. package/dist/puck/editor/QuickTestActions.js +50 -0
  93. package/dist/puck/editor/ResultsReadout.js +8 -5
  94. package/dist/puck/editor/VersionBuilder.d.ts +20 -6
  95. package/dist/puck/editor/VersionBuilder.js +80 -50
  96. package/dist/puck/editor/armWrites.d.ts +3 -1
  97. package/dist/puck/editor/armWrites.js +2 -1
  98. package/dist/puck/editor/armsCache.d.ts +3 -1
  99. package/dist/puck/editor/armsCache.js +20 -3
  100. package/dist/puck/editor/cloneSlot.d.ts +2 -0
  101. package/dist/puck/editor/cloneSlot.js +7 -0
  102. package/dist/puck/editor/copy.d.ts +42 -5
  103. package/dist/puck/editor/copy.js +43 -6
  104. package/dist/puck/editor/editor.chrome.css +44 -0
  105. package/dist/puck/editor/editor.css +68 -0
  106. package/dist/puck/editor/editor.model.d.ts +14 -0
  107. package/dist/puck/editor/editor.model.js +58 -1
  108. package/dist/puck/editor/editorSurface.d.ts +10 -0
  109. package/dist/puck/editor/editorSurface.js +65 -0
  110. package/dist/puck/editor/experimentOutlinePlugin.js +96 -28
  111. package/dist/puck/editor/localPlacements.d.ts +2 -0
  112. package/dist/puck/editor/localPlacements.js +29 -0
  113. package/dist/puck/editor/outlineVersion.d.ts +5 -0
  114. package/dist/puck/editor/outlineVersion.js +36 -0
  115. package/dist/puck/editor/placementsCache.d.ts +50 -0
  116. package/dist/puck/editor/placementsCache.js +258 -0
  117. package/dist/puck/editor/sidebar.d.ts +12 -0
  118. package/dist/puck/editor/sidebar.js +77 -0
  119. package/dist/puck/editor/usePlacementNotice.d.ts +3 -0
  120. package/dist/puck/editor/usePlacementNotice.js +14 -0
  121. package/dist/puck/editor/xpGoalPuckEditorField.js +109 -98
  122. package/dist/puck/experimentSlotField.d.ts +3 -0
  123. package/dist/puck/experimentSlotField.js +15 -4
  124. package/dist/{admin → testSurface}/actions/DecideDialog.d.ts +2 -1
  125. package/dist/{admin → testSurface}/actions/DecideDialog.js +6 -4
  126. package/dist/{admin → testSurface}/api.js +5 -6
  127. package/dist/{admin → testSurface}/copy/common.d.ts +3 -1
  128. package/dist/{admin → testSurface}/copy/common.js +5 -1
  129. package/dist/{admin → testSurface}/copy/readiness.d.ts +20 -1
  130. package/dist/{admin → testSurface}/copy/readiness.js +25 -1
  131. package/dist/{admin → testSurface}/copy/testPage.d.ts +4 -0
  132. package/dist/{admin → testSurface}/copy/testPage.js +8 -2
  133. package/dist/testSurface/format/adminURL.d.ts +7 -0
  134. package/dist/testSurface/format/adminURL.js +9 -0
  135. package/dist/{admin → testSurface}/placements/placementLabels.js +1 -1
  136. package/dist/{admin → testSurface}/previewLinks.model.d.ts +1 -6
  137. package/dist/testSurface/previewLinks.model.js +4 -0
  138. package/dist/testSurface/readPreflight.d.ts +9 -0
  139. package/dist/testSurface/readPreflight.js +38 -0
  140. package/dist/testSurface/readinessRead.d.ts +50 -0
  141. package/dist/testSurface/readinessRead.js +46 -0
  142. package/dist/testSurface/results/results.css +64 -0
  143. package/dist/{admin → testSurface}/surface/contracts.d.ts +7 -2
  144. package/dist/testSurface/surface/editorPlacement.d.ts +21 -0
  145. package/dist/testSurface/surface/editorPlacement.js +60 -0
  146. package/dist/{admin → testSurface}/surface/pageBlock/parts.js +19 -9
  147. package/dist/testSurface/surface/pagePicker/pagePicker.css +10 -0
  148. package/dist/{admin → testSurface}/surface/readiness/ActionDialogs.js +37 -7
  149. package/dist/testSurface/surface/readiness/Banner.d.ts +2 -0
  150. package/dist/{admin → testSurface}/surface/readiness/Banner.js +106 -68
  151. package/dist/testSurface/surface/readiness/BlockerList.d.ts +11 -0
  152. package/dist/testSurface/surface/readiness/BlockerList.js +31 -0
  153. package/dist/testSurface/surface/readiness/SaveStatus.d.ts +9 -0
  154. package/dist/testSurface/surface/readiness/SaveStatus.js +66 -0
  155. package/dist/{admin → testSurface}/surface/readiness/parts.js +0 -2
  156. package/dist/{admin → testSurface}/surface/readiness/readiness.model.d.ts +13 -0
  157. package/dist/{admin → testSurface}/surface/readiness/readiness.model.js +51 -36
  158. package/dist/{admin → testSurface}/surface/readiness/useTransition.d.ts +5 -2
  159. package/dist/testSurface/surface/readiness/useTransition.js +98 -0
  160. package/dist/{admin → testSurface}/surface/results/ResultsBody.d.ts +2 -2
  161. package/dist/{admin → testSurface}/surface/results/ResultsBody.js +18 -11
  162. package/dist/testSurface/surface/setting/setting.css +17 -0
  163. package/dist/{admin → testSurface}/surface/test/AdvancedSection.js +1 -0
  164. package/dist/testSurface/surface/test/GoalSection.d.ts +4 -0
  165. package/dist/{admin → testSurface}/surface/test/GoalSection.js +4 -2
  166. package/dist/testSurface/surface/test/LengthSection.d.ts +2 -0
  167. package/dist/{admin → testSurface}/surface/test/LengthSection.js +2 -1
  168. package/dist/{admin → testSurface}/surface/test/Rail.js +7 -4
  169. package/dist/{admin → testSurface}/surface/test/ReadinessBar.js +1 -2
  170. package/dist/{admin → testSurface}/surface/test/Section.d.ts +3 -1
  171. package/dist/testSurface/surface/test/Section.js +80 -0
  172. package/dist/{admin → testSurface}/surface/test/TargetingSection.js +5 -0
  173. package/dist/testSurface/surface/test/TestSurface.d.ts +19 -0
  174. package/dist/testSurface/surface/test/TestSurface.js +213 -0
  175. package/dist/testSurface/surface/test/VersionsSection.d.ts +5 -0
  176. package/dist/{admin → testSurface}/surface/test/VersionsSection.js +13 -6
  177. package/dist/testSurface/surface/test/testPage.css +104 -0
  178. package/dist/{admin → testSurface}/surface/useTestDocument.d.ts +9 -2
  179. package/dist/{admin → testSurface}/surface/useTestDocument.js +92 -46
  180. package/dist/{admin → testSurface}/surfaceUrls.js +1 -1
  181. package/dist/testSurface/useReadinessPolling.d.ts +3 -0
  182. package/dist/testSurface/useReadinessPolling.js +24 -0
  183. package/dist/transitions/placementInteractions.js +1 -1
  184. package/dist/transitions/placements.d.ts +27 -8
  185. package/dist/transitions/placements.js +77 -6
  186. package/dist/transitions/preflightData.js +1 -1
  187. package/dist/transitions/start.js +2 -2
  188. package/dist/types/endpoints.d.ts +1 -1
  189. package/dist/ui/Card.d.ts +2 -1
  190. package/dist/ui/Card.js +4 -4
  191. package/dist/ui/Dialog.d.ts +4 -1
  192. package/dist/ui/Dialog.js +41 -3
  193. package/dist/ui/Drawer.d.ts +10 -0
  194. package/dist/ui/Drawer.js +29 -0
  195. package/dist/ui/Tabs.d.ts +4 -3
  196. package/dist/ui/Tabs.js +47 -32
  197. package/dist/ui/ui.css +24 -0
  198. package/package.json +1 -1
  199. package/dist/admin/actions/ConfirmDialog.d.ts +0 -19
  200. package/dist/admin/actions/ConfirmDialog.js +0 -149
  201. package/dist/admin/results/results.css +0 -64
  202. package/dist/admin/styles.css +0 -10
  203. package/dist/admin/styles.d.ts +0 -2
  204. package/dist/admin/styles.js +0 -3
  205. package/dist/admin/surface/pagePicker/pagePicker.css +0 -10
  206. package/dist/admin/surface/readiness/Banner.d.ts +0 -5
  207. package/dist/admin/surface/readiness/SaveStatus.d.ts +0 -5
  208. package/dist/admin/surface/readiness/SaveStatus.js +0 -53
  209. package/dist/admin/surface/readiness/useTransition.js +0 -35
  210. package/dist/admin/surface/setting/setting.css +0 -17
  211. package/dist/admin/surface/test/GoalSection.d.ts +0 -2
  212. package/dist/admin/surface/test/LengthSection.d.ts +0 -2
  213. package/dist/admin/surface/test/Section.js +0 -48
  214. package/dist/admin/surface/test/VersionsSection.d.ts +0 -4
  215. package/dist/admin/surface/test/testPage.css +0 -92
  216. /package/dist/{admin → testSurface}/PreviewLinks.d.ts +0 -0
  217. /package/dist/{admin → testSurface}/PreviewLinks.js +0 -0
  218. /package/dist/{admin → testSurface}/actions/MakeContentResult.d.ts +0 -0
  219. /package/dist/{admin → testSurface}/actions/MakeContentResult.js +0 -0
  220. /package/dist/{admin → testSurface}/actions/actions.model.d.ts +0 -0
  221. /package/dist/{admin → testSurface}/actions/actions.model.js +0 -0
  222. /package/dist/{admin → testSurface}/actions/decide.model.d.ts +0 -0
  223. /package/dist/{admin → testSurface}/actions/decide.model.js +0 -0
  224. /package/dist/{admin → testSurface}/allocation.model.d.ts +0 -0
  225. /package/dist/{admin → testSurface}/allocation.model.js +0 -0
  226. /package/dist/{admin → testSurface}/api.d.ts +0 -0
  227. /package/dist/{admin → testSurface}/arms/arms.model.d.ts +0 -0
  228. /package/dist/{admin → testSurface}/arms/arms.model.js +0 -0
  229. /package/dist/{admin → testSurface}/arms/pageTarget.model.d.ts +0 -0
  230. /package/dist/{admin → testSurface}/arms/pageTarget.model.js +0 -0
  231. /package/dist/{admin → testSurface}/arms/params.model.d.ts +0 -0
  232. /package/dist/{admin → testSurface}/arms/params.model.js +0 -0
  233. /package/dist/{admin → testSurface}/copy/actions.d.ts +0 -0
  234. /package/dist/{admin → testSurface}/copy/actions.js +0 -0
  235. /package/dist/{admin → testSurface}/copy/advanced.d.ts +0 -0
  236. /package/dist/{admin → testSurface}/copy/advanced.js +0 -0
  237. /package/dist/{admin → testSurface}/copy/arms.d.ts +0 -0
  238. /package/dist/{admin → testSurface}/copy/arms.js +0 -0
  239. /package/dist/{admin → testSurface}/copy/audience.d.ts +0 -0
  240. /package/dist/{admin → testSurface}/copy/audience.js +0 -0
  241. /package/dist/{admin → testSurface}/copy/metrics.d.ts +0 -0
  242. /package/dist/{admin → testSurface}/copy/metrics.js +0 -0
  243. /package/dist/{admin → testSurface}/copy/pages.d.ts +0 -0
  244. /package/dist/{admin → testSurface}/copy/pages.js +0 -0
  245. /package/dist/{admin → testSurface}/copy/recommendation.d.ts +0 -0
  246. /package/dist/{admin → testSurface}/copy/recommendation.js +0 -0
  247. /package/dist/{admin → testSurface}/copy/results.d.ts +0 -0
  248. /package/dist/{admin → testSurface}/copy/results.js +0 -0
  249. /package/dist/{admin → testSurface}/copy/review.d.ts +0 -0
  250. /package/dist/{admin → testSurface}/copy/review.js +0 -0
  251. /package/dist/{admin → testSurface}/copy/setting.d.ts +0 -0
  252. /package/dist/{admin → testSurface}/copy/setting.js +0 -0
  253. /package/dist/{admin → testSurface}/copy/surface.d.ts +0 -0
  254. /package/dist/{admin → testSurface}/copy/surface.js +0 -0
  255. /package/dist/{admin → testSurface}/format/date.d.ts +0 -0
  256. /package/dist/{admin → testSurface}/format/date.js +0 -0
  257. /package/dist/{admin → testSurface}/labels.d.ts +0 -0
  258. /package/dist/{admin → testSurface}/labels.js +0 -0
  259. /package/dist/{admin → testSurface}/lockedNotice.model.d.ts +0 -0
  260. /package/dist/{admin → testSurface}/lockedNotice.model.js +0 -0
  261. /package/dist/{admin → testSurface}/metricSource.model.d.ts +0 -0
  262. /package/dist/{admin → testSurface}/metricSource.model.js +0 -0
  263. /package/dist/{admin → testSurface}/placements/placementLabels.d.ts +0 -0
  264. /package/dist/{admin → testSurface}/placements/placementLabels.model.d.ts +0 -0
  265. /package/dist/{admin → testSurface}/placements/placementLabels.model.js +0 -0
  266. /package/dist/{admin → testSurface}/placements/usePlacementLabels.d.ts +0 -0
  267. /package/dist/{admin → testSurface}/placements/usePlacementLabels.js +0 -0
  268. /package/dist/{admin → testSurface}/reload.d.ts +0 -0
  269. /package/dist/{admin → testSurface}/reload.js +0 -0
  270. /package/dist/{admin → testSurface}/results/CappedCell.d.ts +0 -0
  271. /package/dist/{admin → testSurface}/results/CappedCell.js +0 -0
  272. /package/dist/{admin → testSurface}/results/CiChart.d.ts +0 -0
  273. /package/dist/{admin → testSurface}/results/CiChart.js +0 -0
  274. /package/dist/{admin → testSurface}/results/DataQualityPanel.d.ts +0 -0
  275. /package/dist/{admin → testSurface}/results/DataQualityPanel.js +0 -0
  276. /package/dist/{admin → testSurface}/results/DataTable.d.ts +0 -0
  277. /package/dist/{admin → testSurface}/results/DataTable.js +0 -0
  278. /package/dist/{admin → testSurface}/results/StatTile.d.ts +0 -0
  279. /package/dist/{admin → testSurface}/results/StatTile.js +0 -0
  280. /package/dist/{admin → testSurface}/results/VerdictHero.d.ts +0 -0
  281. /package/dist/{admin → testSurface}/results/VerdictHero.js +0 -0
  282. /package/dist/{admin → testSurface}/results/chart.model.d.ts +0 -0
  283. /package/dist/{admin → testSurface}/results/chart.model.js +0 -0
  284. /package/dist/{admin → testSurface}/results/format.d.ts +0 -0
  285. /package/dist/{admin → testSurface}/results/format.js +0 -0
  286. /package/dist/{admin → testSurface}/results/legacy.d.ts +0 -0
  287. /package/dist/{admin → testSurface}/results/legacy.js +0 -0
  288. /package/dist/{admin → testSurface}/results/releasePages.model.d.ts +0 -0
  289. /package/dist/{admin → testSurface}/results/releasePages.model.js +0 -0
  290. /package/dist/{admin → testSurface}/results/results.model.d.ts +0 -0
  291. /package/dist/{admin → testSurface}/results/results.model.js +0 -0
  292. /package/dist/{admin → testSurface}/results/snapshot.d.ts +0 -0
  293. /package/dist/{admin → testSurface}/results/snapshot.js +0 -0
  294. /package/dist/{admin → testSurface}/review/review.model.d.ts +0 -0
  295. /package/dist/{admin → testSurface}/review/review.model.js +0 -0
  296. /package/dist/{admin → testSurface}/surface/contracts.js +0 -0
  297. /package/dist/{admin → testSurface}/surface/pageBlock/pageBlock.model.d.ts +0 -0
  298. /package/dist/{admin → testSurface}/surface/pageBlock/pageBlock.model.js +0 -0
  299. /package/dist/{admin → testSurface}/surface/pageBlock/parts.d.ts +0 -0
  300. /package/dist/{admin → testSurface}/surface/pagePicker/CopyRoute.d.ts +0 -0
  301. /package/dist/{admin → testSurface}/surface/pagePicker/CopyRoute.js +0 -0
  302. /package/dist/{admin → testSurface}/surface/pagePicker/PageCombobox.d.ts +0 -0
  303. /package/dist/{admin → testSurface}/surface/pagePicker/PageCombobox.js +0 -0
  304. /package/dist/{admin → testSurface}/surface/pagePicker/pagePicker.model.d.ts +0 -0
  305. /package/dist/{admin → testSurface}/surface/pagePicker/pagePicker.model.js +0 -0
  306. /package/dist/{admin → testSurface}/surface/readiness/ActionDialogs.d.ts +0 -0
  307. /package/dist/{admin → testSurface}/surface/readiness/parts.d.ts +0 -0
  308. /package/dist/{admin → testSurface}/surface/results/ReleasePages.d.ts +0 -0
  309. /package/dist/{admin → testSurface}/surface/results/ReleasePages.js +0 -0
  310. /package/dist/{admin → testSurface}/surface/results/recommendation.model.d.ts +0 -0
  311. /package/dist/{admin → testSurface}/surface/results/recommendation.model.js +0 -0
  312. /package/dist/{admin → testSurface}/surface/results/useResults.d.ts +0 -0
  313. /package/dist/{admin → testSurface}/surface/results/useResults.js +0 -0
  314. /package/dist/{admin → testSurface}/surface/setting/parts.d.ts +0 -0
  315. /package/dist/{admin → testSurface}/surface/setting/parts.js +0 -0
  316. /package/dist/{admin → testSurface}/surface/setting/setting.model.d.ts +0 -0
  317. /package/dist/{admin → testSurface}/surface/setting/setting.model.js +0 -0
  318. /package/dist/{admin → testSurface}/surface/test/AdvancedSection.d.ts +0 -0
  319. /package/dist/{admin → testSurface}/surface/test/PageHoldout.d.ts +0 -0
  320. /package/dist/{admin → testSurface}/surface/test/PageHoldout.js +0 -0
  321. /package/dist/{admin → testSurface}/surface/test/Rail.d.ts +0 -0
  322. /package/dist/{admin → testSurface}/surface/test/ReadinessBar.d.ts +0 -0
  323. /package/dist/{admin → testSurface}/surface/test/TargetingSection.d.ts +0 -0
  324. /package/dist/{admin → testSurface}/surface/test/fields.d.ts +0 -0
  325. /package/dist/{admin → testSurface}/surface/test/fields.js +0 -0
  326. /package/dist/{admin → testSurface}/surface/test/jumpToSection.d.ts +0 -0
  327. /package/dist/{admin → testSurface}/surface/test/jumpToSection.js +0 -0
  328. /package/dist/{admin → testSurface}/surface/test/pageParts.d.ts +0 -0
  329. /package/dist/{admin → testSurface}/surface/test/pageParts.js +0 -0
  330. /package/dist/{admin → testSurface}/surface/test/testPage.model.d.ts +0 -0
  331. /package/dist/{admin → testSurface}/surface/test/testPage.model.js +0 -0
  332. /package/dist/{admin → testSurface}/surface/testDocument.model.d.ts +0 -0
  333. /package/dist/{admin → testSurface}/surface/testDocument.model.js +0 -0
  334. /package/dist/{admin → testSurface}/surfaceUrls.d.ts +0 -0
  335. /package/dist/{admin → testSurface}/targeting/targeting.model.d.ts +0 -0
  336. /package/dist/{admin → testSurface}/targeting/targeting.model.js +0 -0
  337. /package/dist/{admin → testSurface}/theme.d.ts +0 -0
  338. /package/dist/{admin → testSurface}/theme.js +0 -0
  339. /package/dist/{admin → testSurface}/useApi.d.ts +0 -0
  340. /package/dist/{admin → testSurface}/useApi.js +0 -0
@@ -5,8 +5,8 @@ import { lockPagePaths } from '../db/locks.js';
5
5
  import { lockMetricsForFreeze } from '../db/metricUsage.js';
6
6
  import { DEFAULT_SEQUENTIAL_TUNING_PARAMETER } from '../constants.js';
7
7
  import { claimSlices } from '../db/slices.js';
8
- import { READINESS_COPY, asymmetricGoalsCopy, sameAddressCopy, interactingTestsCopy, pageInUseCopy, unpublishedPageCopy } from '../admin/copy/readiness.js';
9
- import { GROUP_LABELS } from '../admin/copy/arms.js';
8
+ import { READINESS_COPY, asymmetricGoalsCopy, sameAddressCopy, interactingTestsCopy, pageInUseCopy, unpublishedPageCopy } from '../testSurface/copy/readiness.js';
9
+ import { GROUP_LABELS } from '../testSurface/copy/arms.js';
10
10
  import { XpRefusal } from '../errors.js';
11
11
  import { isOpValid } from '../targeting/ops.js';
12
12
  import { newSeed } from '../runtime/seed.js';
@@ -183,7 +183,7 @@ export type EventBody = {
183
183
  attributes?: Record<string, string | number | boolean>;
184
184
  }>;
185
185
  };
186
- export type AccessKind = 'manage' | 'readResults' | 'manifestKey' | 'signedCookie';
186
+ export type AccessKind = 'manage' | 'readResults' | 'surface' | 'manifestKey' | 'signedCookie';
187
187
  export type EndpointContext<TUser extends {
188
188
  id: string | number;
189
189
  } = {
package/dist/ui/Card.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import type { HTMLAttributes, ReactNode } from 'react';
2
2
  import './ui.css';
3
3
  export declare function Card({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
4
- export declare function SectionCard({ number, title, complete, children, id, headingId, className }: {
4
+ export declare function SectionCard({ number, title, complete, blocked, children, id, headingId, className }: {
5
5
  number: number;
6
6
  title: string;
7
7
  complete?: boolean;
8
+ blocked?: boolean;
8
9
  children: ReactNode;
9
10
  id?: string;
10
11
  headingId?: string;
package/dist/ui/Card.js CHANGED
@@ -6,11 +6,11 @@ export function Card({ className = '', ...props }) {
6
6
  className: `xp-ui-card ${className}`
7
7
  });
8
8
  }
9
- export function SectionCard({ number, title, complete = false, children, id, headingId, className = '' }) {
9
+ export function SectionCard({ number, title, complete = false, blocked = false, children, id, headingId, className = '' }) {
10
10
  return /*#__PURE__*/ _jsxs("section", {
11
11
  id: id,
12
12
  "aria-labelledby": headingId,
13
- className: `xp-ui-card xp-ui-section ${className}`,
13
+ className: `xp-ui-card xp-ui-section ${blocked ? 'xp-ui-section--blocked' : complete ? 'xp-ui-section--complete' : ''} ${className}`,
14
14
  children: [
15
15
  /*#__PURE__*/ _jsxs("header", {
16
16
  className: "xp-ui-section-head",
@@ -26,8 +26,8 @@ export function SectionCard({ number, title, complete = false, children, id, hea
26
26
  }),
27
27
  /*#__PURE__*/ _jsx("span", {
28
28
  className: "xp-ui-section-complete",
29
- "aria-label": complete ? 'Complete' : 'Incomplete',
30
- children: complete ? '✓' : '○'
29
+ "aria-label": blocked ? 'Needs attention' : complete ? 'Complete' : 'Incomplete',
30
+ children: blocked ? '!' : complete ? '✓' : '○'
31
31
  })
32
32
  ]
33
33
  }),
@@ -3,8 +3,11 @@ import './ui.css';
3
3
  /** Native modal stays in its rendering document, including a Puck canvas iframe.
4
4
  * `initialFocus="cancel"` targets the focusable control marked `data-dialog-cancel`.
5
5
  */
6
- export declare function Dialog({ open, title, onClose, children, dismissible, initialFocus }: {
6
+ export declare function Dialog({ open, title, onClose, children, dismissible, initialFocus, className, headerActions, closeOnBackdrop }: {
7
7
  open: boolean;
8
+ className?: string;
9
+ headerActions?: ReactNode;
10
+ closeOnBackdrop?: boolean;
8
11
  dismissible?: boolean;
9
12
  initialFocus?: 'cancel';
10
13
  title: string;
package/dist/ui/Dialog.js CHANGED
@@ -16,9 +16,16 @@ function focusable(node) {
16
16
  }
17
17
  /** Native modal stays in its rendering document, including a Puck canvas iframe.
18
18
  * `initialFocus="cancel"` targets the focusable control marked `data-dialog-cancel`.
19
- */ export function Dialog({ open, title, onClose, children, dismissible = true, initialFocus }) {
19
+ */ export function Dialog({ open, title, onClose, children, dismissible = true, initialFocus, className = '', headerActions, closeOnBackdrop = false }) {
20
20
  const ref = useRef(null);
21
21
  const heading = useId();
22
+ const backdropPress = useRef(false);
23
+ const onBackdrop = (event)=>{
24
+ const node = ref.current;
25
+ if (!node || event.target !== node) return false;
26
+ const rect = node.getBoundingClientRect();
27
+ return event.clientX < rect.left || event.clientX > rect.right || event.clientY < rect.top || event.clientY > rect.bottom;
28
+ };
22
29
  const closeRequested = useRef(false);
23
30
  const requestClose = ()=>{
24
31
  if (!open || !dismissible || closeRequested.current) return;
@@ -31,11 +38,27 @@ function focusable(node) {
31
38
  const doc = node.ownerDocument;
32
39
  const previous = doc.activeElement;
33
40
  closeRequested.current = false;
41
+ // Observe before overlay portals stop pointerdown during ancestor capture.
42
+ const down = (event)=>{
43
+ backdropPress.current = onBackdrop(event);
44
+ };
45
+ const up = (event)=>{
46
+ if (!onBackdrop(event)) backdropPress.current = false;
47
+ };
48
+ const cancel = ()=>{
49
+ backdropPress.current = false;
50
+ };
51
+ doc.addEventListener('pointerdown', down, true);
52
+ doc.addEventListener('pointerup', up, true);
53
+ doc.addEventListener('pointercancel', cancel, true);
34
54
  node.showModal();
35
55
  const elements = focusable(node);
36
56
  const preferred = initialFocus === 'cancel' ? elements.find((element)=>element.hasAttribute('data-dialog-cancel')) : undefined;
37
57
  (preferred ?? elements[0] ?? node).focus();
38
58
  return ()=>{
59
+ doc.removeEventListener('pointerdown', down, true);
60
+ doc.removeEventListener('pointerup', up, true);
61
+ doc.removeEventListener('pointercancel', cancel, true);
39
62
  node.close();
40
63
  if (previous?.isConnected) previous.focus();
41
64
  };
@@ -46,12 +69,18 @@ function focusable(node) {
46
69
  return /*#__PURE__*/ _jsxs("dialog", {
47
70
  ref: ref,
48
71
  "aria-labelledby": heading,
49
- className: "xp-ui-dialog",
72
+ className: `xp-ui-dialog ${className}`,
50
73
  tabIndex: -1,
51
74
  onCancel: (event)=>{
75
+ if (event.target !== event.currentTarget) return;
52
76
  event.preventDefault();
53
77
  requestClose();
54
78
  },
79
+ onClick: (event)=>{
80
+ const startedOnBackdrop = backdropPress.current;
81
+ backdropPress.current = false;
82
+ if (closeOnBackdrop && startedOnBackdrop && onBackdrop(event)) requestClose();
83
+ },
55
84
  onKeyDown: (event)=>{
56
85
  if (event.defaultPrevented) return;
57
86
  if (event.key === 'Escape') {
@@ -75,7 +104,16 @@ function focusable(node) {
75
104
  }
76
105
  },
77
106
  children: [
78
- /*#__PURE__*/ _jsx("h2", {
107
+ headerActions ? /*#__PURE__*/ _jsxs("header", {
108
+ className: "xp-ui-dialog-header",
109
+ children: [
110
+ /*#__PURE__*/ _jsx("h2", {
111
+ id: heading,
112
+ children: title
113
+ }),
114
+ headerActions
115
+ ]
116
+ }) : /*#__PURE__*/ _jsx("h2", {
79
117
  id: heading,
80
118
  children: title
81
119
  }),
@@ -0,0 +1,10 @@
1
+ import type { ReactNode } from 'react';
2
+ import './ui.css';
3
+ /** Native modal drawer: focus trap/restoration and Escape come from Dialog. */
4
+ export declare function Drawer({ title, closeLabel, onClose, children, actions }: {
5
+ title: string;
6
+ closeLabel: string;
7
+ onClose: () => void;
8
+ children: ReactNode;
9
+ actions?: ReactNode;
10
+ }): import("react").JSX.Element;
@@ -0,0 +1,29 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Button } from './Button.js';
4
+ import { Dialog } from './Dialog.js';
5
+ import './ui.css';
6
+ /** Native modal drawer: focus trap/restoration and Escape come from Dialog. */ export function Drawer({ title, closeLabel, onClose, children, actions }) {
7
+ return /*#__PURE__*/ _jsx(Dialog, {
8
+ open: true,
9
+ title: title,
10
+ onClose: onClose,
11
+ closeOnBackdrop: true,
12
+ className: "xp-ui-drawer",
13
+ headerActions: /*#__PURE__*/ _jsxs("div", {
14
+ className: "xp-ui-button-group",
15
+ children: [
16
+ actions,
17
+ /*#__PURE__*/ _jsx(Button, {
18
+ variant: "quiet",
19
+ onClick: onClose,
20
+ children: closeLabel
21
+ })
22
+ ]
23
+ }),
24
+ children: /*#__PURE__*/ _jsx("div", {
25
+ className: "xp-ui-drawer-body",
26
+ children: children
27
+ })
28
+ });
29
+ }
package/dist/ui/Tabs.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ReactNode, Ref } from 'react';
1
+ import type { ReactNode } from 'react';
2
2
  import './ui.css';
3
3
  export interface Tab {
4
4
  id: string;
@@ -7,10 +7,11 @@ export interface Tab {
7
7
  actions?: ReactNode;
8
8
  disabled?: boolean;
9
9
  }
10
- export declare function Tabs({ items, label, value, onChange, tabListRef }: {
10
+ export declare function Tabs({ items, label, value, onChange, renderHeader, disabled }: {
11
11
  items: Tab[];
12
12
  label: string;
13
+ disabled?: boolean;
13
14
  value?: string;
14
15
  onChange?: (id: string) => void;
15
- tabListRef?: Ref<HTMLDivElement>;
16
+ renderHeader?: (children: ReactNode) => ReactNode;
16
17
  }): import("react").JSX.Element;
package/dist/ui/Tabs.js CHANGED
@@ -2,50 +2,65 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useId, useState } from 'react';
4
4
  import './ui.css';
5
- export function Tabs({ items, label, value, onChange, tabListRef }) {
5
+ export function Tabs({ items, label, value, onChange, renderHeader, disabled = false }) {
6
6
  const prefix = useId();
7
7
  const [local, setLocal] = useState(()=>items.find((item)=>!item.disabled)?.id);
8
8
  const requested = value ?? local;
9
9
  const selected = items.find((item)=>item.id === requested && !item.disabled)?.id ?? items.find((item)=>!item.disabled)?.id;
10
10
  function select(id) {
11
+ if (disabled) return;
11
12
  setLocal(id);
12
13
  onChange?.(id);
13
14
  }
15
+ const header = /*#__PURE__*/ _jsxs("div", {
16
+ className: "xp-ui-tabbar",
17
+ children: [
18
+ /*#__PURE__*/ _jsx("div", {
19
+ role: "tablist",
20
+ "aria-label": label,
21
+ "aria-disabled": disabled || undefined,
22
+ className: "xp-ui-tablist",
23
+ children: items.map((item, index)=>/*#__PURE__*/ _jsx("button", {
24
+ style: {
25
+ order: index * 2
26
+ },
27
+ type: "button",
28
+ role: "tab",
29
+ id: `${prefix}-tab-${item.id}`,
30
+ "aria-controls": `${prefix}-panel-${item.id}`,
31
+ "aria-selected": selected === item.id,
32
+ tabIndex: selected === item.id ? 0 : -1,
33
+ disabled: disabled || item.disabled,
34
+ className: "xp-ui-tab",
35
+ onClick: ()=>select(item.id),
36
+ onKeyDown: (event)=>{
37
+ if (disabled) return;
38
+ const enabled = items.filter((tab)=>!tab.disabled);
39
+ const index = enabled.findIndex((tab)=>tab.id === item.id);
40
+ const next = event.key === 'ArrowRight' ? enabled[(index + 1) % enabled.length] : event.key === 'ArrowLeft' ? enabled[(index - 1 + enabled.length) % enabled.length] : event.key === 'Home' ? enabled[0] : event.key === 'End' ? enabled.at(-1) : undefined;
41
+ if (!next) return;
42
+ event.preventDefault();
43
+ select(next.id);
44
+ event.currentTarget.ownerDocument.getElementById(`${prefix}-tab-${next.id}`)?.focus();
45
+ },
46
+ children: item.label
47
+ }, item.id))
48
+ }),
49
+ items.map((item, index)=>item.actions ? /*#__PURE__*/ _jsx("div", {
50
+ style: {
51
+ order: index * 2 + 1
52
+ },
53
+ className: "xp-ui-tab-actions",
54
+ children: item.actions
55
+ }, item.id) : null)
56
+ ]
57
+ });
14
58
  return /*#__PURE__*/ _jsxs("div", {
15
59
  className: "xp-ui-tabs",
16
60
  children: [
17
- /*#__PURE__*/ _jsxs("div", {
18
- ref: tabListRef,
61
+ renderHeader ? renderHeader(header) : /*#__PURE__*/ _jsx("div", {
19
62
  className: "xp-ui-tabs-header",
20
- children: [
21
- /*#__PURE__*/ _jsx("div", {
22
- role: "tablist",
23
- "aria-label": label,
24
- className: "xp-ui-tablist",
25
- children: items.map((item)=>/*#__PURE__*/ _jsx("button", {
26
- type: "button",
27
- role: "tab",
28
- id: `${prefix}-tab-${item.id}`,
29
- "aria-controls": `${prefix}-panel-${item.id}`,
30
- "aria-selected": selected === item.id,
31
- tabIndex: selected === item.id ? 0 : -1,
32
- disabled: item.disabled,
33
- className: "xp-ui-tab",
34
- onClick: ()=>select(item.id),
35
- onKeyDown: (event)=>{
36
- const enabled = items.filter((tab)=>!tab.disabled);
37
- const index = enabled.findIndex((tab)=>tab.id === item.id);
38
- const next = event.key === 'ArrowRight' ? enabled[(index + 1) % enabled.length] : event.key === 'ArrowLeft' ? enabled[(index - 1 + enabled.length) % enabled.length] : event.key === 'Home' ? enabled[0] : event.key === 'End' ? enabled.at(-1) : undefined;
39
- if (!next) return;
40
- event.preventDefault();
41
- select(next.id);
42
- event.currentTarget.ownerDocument.getElementById(`${prefix}-tab-${next.id}`)?.focus();
43
- },
44
- children: item.label
45
- }, item.id))
46
- }),
47
- items.find((item)=>item.id === selected)?.actions
48
- ]
63
+ children: header
49
64
  }),
50
65
  items.map((item)=>/*#__PURE__*/ _jsx("div", {
51
66
  role: "tabpanel",
package/dist/ui/ui.css CHANGED
@@ -94,3 +94,27 @@
94
94
 
95
95
  .xp-ui-field-label { display: flex; align-items: center; justify-content: space-between; gap: var(--xp-space-3); }
96
96
  .xp-ui-field-label > label { font-weight: 500; }
97
+
98
+ .xp-ui-dialog.xp-ui-drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(720px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; border-block: 0; border-inline-end: 0; padding: 0; overflow: hidden; }
99
+ .xp-ui-drawer[open] { display: flex; flex-direction: column; }
100
+ .xp-ui-drawer > .xp-ui-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: var(--xp-space-4); padding: var(--xp-space-4) var(--xp-space-5); border-bottom: 1px solid var(--xp-border); flex-shrink: 0; background: var(--xp-surface); }
101
+ .xp-ui-drawer > .xp-ui-dialog-header h2 { margin: 0; min-width: 0; overflow-wrap: anywhere; font: var(--xp-text-title); }
102
+ .xp-ui-drawer-body { min-height: 0; overflow: auto; overscroll-behavior: contain; flex: 1; background: var(--xp-bg); }
103
+
104
+ .xp-ui-section--blocked { border-color: var(--xp-error-border); }
105
+ .xp-ui-section--blocked .xp-ui-section-number, .xp-ui-section--blocked .xp-ui-section-complete { color: var(--xp-error); border-color: var(--xp-error-border); }
106
+ .xp-ui-section--complete .xp-ui-section-complete { color: var(--xp-success); }
107
+ .xp-ui-section--complete .xp-ui-section-number { color: var(--xp-success); border-color: var(--xp-success); }
108
+ .xp-ui-section--blocked h2:focus { outline-color: var(--xp-error); }
109
+
110
+ .xp-ui-section--blocked .xp-ui-section-complete { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--xp-error-border); border-radius: 50%; }
111
+
112
+ /* Actions sit beside each tab visually and outside the tablist's owned roles. */
113
+ .xp-ui-tabbar { display: flex; flex-wrap: wrap; align-items: stretch; gap: 4px; border-bottom: 1px solid var(--xp-border); }
114
+ .xp-ui-tabbar > .xp-ui-tablist { display: contents; }
115
+ .xp-ui-tab-actions { display: flex; align-items: center; flex-wrap: wrap; position: relative; }
116
+
117
+ /* One blocker-list format in the admin footer and the Puck sidebar. */
118
+ .xp-readiness__blockers, .xp-readiness__blockers a { color: var(--xp-error); }
119
+ .xp-readiness__blockers ul { margin: 0; padding-inline-start: var(--xp-space-4); }
120
+ .xp-readiness__blockers li { white-space: pre-line; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delmaredigital/payload-experiments",
3
- "version": "0.4.0-rc.3",
3
+ "version": "0.4.0-rc.5",
4
4
  "description": "No-code A/B testing for Payload CMS and Next.js: block, page and flag experiments with holdouts, layers, exposure logging and honest statistics inside the admin — no vendor",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,19 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import type { DocId } from '../../types/contracts.js';
3
- import type { ExperimentAction } from './actions.model.js';
4
- export declare function DialogFrame({ title, onClose, children, initialFocus, dismissible }: {
5
- dismissible?: boolean;
6
- initialFocus?: 'cancel';
7
- title: string;
8
- onClose: () => void;
9
- children: ReactNode;
10
- }): import("react").JSX.Element;
11
- export declare function ConfirmDialog({ id, action, winnerLabel, onClose, canManage, isDecided, apiRoute }: {
12
- apiRoute: string;
13
- canManage?: boolean;
14
- isDecided?: boolean;
15
- id: DocId;
16
- action: ExperimentAction;
17
- winnerLabel: string;
18
- onClose: () => void;
19
- }): import("react").JSX.Element;
@@ -1,149 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { useRef, useState } from 'react';
4
- import { Button } from '../../ui/Button.js';
5
- import { TextInput } from '../../ui/Inputs.js';
6
- import { Dialog } from '../../ui/Dialog.js';
7
- import { expectedConfirm, matchesConfirm } from '../../transitions/confirmPhrases.js';
8
- import { useApi } from '../useApi.js';
9
- import { reloadPage } from '../reload.js';
10
- import { ACTIONS_COPY as C } from '../copy/actions.js';
11
- import { API_MESSAGES } from '../copy/common.js';
12
- import { MakeContentResult } from './MakeContentResult.js';
13
- export function DialogFrame({ title, onClose, children, initialFocus, dismissible = true }) {
14
- return /*#__PURE__*/ _jsx(Dialog, {
15
- open: true,
16
- dismissible: dismissible,
17
- initialFocus: initialFocus,
18
- title: title,
19
- onClose: onClose,
20
- children: children
21
- });
22
- }
23
- export function ConfirmDialog({ id, action, winnerLabel, onClose, canManage = false, isDecided = false, apiRoute }) {
24
- const api = useApi(apiRoute);
25
- const [typed, setTyped] = useState('');
26
- const [busy, setBusy] = useState(false);
27
- const [reportBusy, setReportBusy] = useState(false);
28
- const inFlight = useRef(false);
29
- const [error, setError] = useState(null);
30
- const [content, setContent] = useState(null);
31
- const phrase = action.confirm.phrase ? expectedConfirm(action.confirm.phrase.action, winnerLabel) : null;
32
- const enabled = !busy && (!phrase || matchesConfirm(phrase, typed));
33
- async function submit(finish = false) {
34
- if (inFlight.current || !enabled) return;
35
- inFlight.current = true;
36
- setBusy(true);
37
- setError(null);
38
- let result;
39
- if (finish) result = await api.archive(id, {
40
- mode: 'after-content'
41
- });
42
- else if (action.archive) result = await api.archive(id, {
43
- ...action.archive,
44
- ...phrase ? {
45
- confirmation: typed.trim()
46
- } : {}
47
- });
48
- else if (action.id === 'start') result = await api.start(id);
49
- else if (action.id === 'stop') result = await api.stop(id);
50
- else if (action.id === 'release-holdout') result = await api.releaseHoldout(id);
51
- else {
52
- const response = await api.makeContent(id);
53
- if (response.ok && response.data) {
54
- setContent(response.data);
55
- inFlight.current = false;
56
- setBusy(false);
57
- return;
58
- }
59
- result = response;
60
- }
61
- if (result.ok && (finish || action.id !== 'make-content')) {
62
- reloadPage();
63
- return;
64
- }
65
- inFlight.current = false;
66
- setBusy(false);
67
- setError(!result.ok ? result : {
68
- ok: false,
69
- status: 0,
70
- message: API_MESSAGES.unreadable,
71
- retryable: true
72
- });
73
- }
74
- function close() {
75
- if (busy || reportBusy) return;
76
- if (content) reloadPage();
77
- onClose();
78
- }
79
- return /*#__PURE__*/ _jsxs(DialogFrame, {
80
- dismissible: !busy && !reportBusy,
81
- initialFocus: action.id === 'start' ? undefined : 'cancel',
82
- title: action.confirm.title,
83
- onClose: close,
84
- children: [
85
- content ? /*#__PURE__*/ _jsx(MakeContentResult, {
86
- result: content,
87
- id: id,
88
- api: api,
89
- canManage: canManage,
90
- isDecided: content.doc?.status ? content.doc.status === 'decided' : isDecided,
91
- onRetry: ()=>submit(),
92
- onFinish: ()=>submit(true),
93
- busy: busy,
94
- onBusyChange: setReportBusy,
95
- onActionStart: ()=>setError(null)
96
- }) : /*#__PURE__*/ _jsxs(_Fragment, {
97
- children: [
98
- /*#__PURE__*/ _jsx("p", {
99
- children: action.confirm.body
100
- }),
101
- phrase ? /*#__PURE__*/ _jsxs(_Fragment, {
102
- children: [
103
- /*#__PURE__*/ _jsxs("p", {
104
- children: [
105
- C.typePhrase,
106
- " ",
107
- /*#__PURE__*/ _jsx("strong", {
108
- children: phrase
109
- })
110
- ]
111
- }),
112
- /*#__PURE__*/ _jsx(TextInput, {
113
- id: "xp-confirmation",
114
- label: C.confirmation,
115
- value: typed,
116
- readOnly: busy,
117
- onChange: (event)=>setTyped(event.target.value)
118
- })
119
- ]
120
- }) : null
121
- ]
122
- }),
123
- error ? /*#__PURE__*/ _jsx("p", {
124
- role: "alert",
125
- children: error.message
126
- }) : null,
127
- content ? null : /*#__PURE__*/ _jsx(Button, {
128
- disabled: !enabled,
129
- onClick: ()=>{
130
- void submit();
131
- },
132
- children: action.label
133
- }),
134
- error?.retryable && !content ? /*#__PURE__*/ _jsx(Button, {
135
- disabled: !enabled,
136
- onClick: ()=>{
137
- void submit();
138
- },
139
- children: C.retry
140
- }) : null,
141
- /*#__PURE__*/ _jsx(Button, {
142
- "data-dialog-cancel": true,
143
- disabled: busy || reportBusy,
144
- onClick: close,
145
- children: content ? C.done : C.cancel
146
- })
147
- ]
148
- });
149
- }
@@ -1,64 +0,0 @@
1
- .xp-results { max-width: 1120px; display: grid; gap: var(--xp-space-8); min-width: 0; }
2
- .xp-results h2, .xp-results h3, .xp-results p { margin: 0; }
3
- .xp-verdict-hero { background: var(--xp-surface); border: 1px solid var(--xp-border); border-radius: var(--xp-radius-card); padding: 28px; min-width: 0; }
4
- .xp-verdict-hero h2 { font: var(--xp-text-display); letter-spacing: -0.01em; max-width: 36ch; }
5
- .xp-verdict-hero p { margin-top: var(--xp-space-2); color: var(--xp-text-2); }
6
- .xp-verdict-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--xp-space-3); margin-top: var(--xp-space-5); padding-top: var(--xp-space-4); border-top: 1px solid var(--xp-border); color: var(--xp-text-3); font: var(--xp-text-small); }
7
- .xp-round-meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--xp-space-2); min-width: 0; }
8
- .xp-round-meta .xp-ui-field { display: flex; align-items: center; gap: var(--xp-space-2); margin: 0; min-width: 0; }
9
- .xp-round-meta select { width: auto; max-width: 100%; }
10
- .xp-results-chips { display: flex; flex-wrap: wrap; gap: var(--xp-space-2); list-style: none; padding: 0; margin-bottom: 0; }
11
- .xp-stat-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--xp-border); border-radius: var(--xp-radius-card); background: var(--xp-surface); overflow: hidden; }
12
- .xp-stat-tile { padding: 20px; min-width: 0; }
13
- .xp-stat-tile + .xp-stat-tile { border-left: 1px solid var(--xp-border); }
14
- .xp-stat-tile-label, .xp-stat-tile-detail { font: var(--xp-text-small); color: var(--xp-text-2); }
15
- .xp-stat-tile-value { margin-top: 6px; font: 600 32px/36px var(--xp-font); font-variant-numeric: tabular-nums; }
16
- .xp-stat-tile-detail { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
17
- .xp-results-block { min-width: 0; }
18
- .xp-results-block-head { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
19
- .xp-results-block-head h2 { font: var(--xp-text-title); }
20
- .xp-results-block-meta { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--xp-text-2); }
21
- .xp-data-table-frame { position: relative; min-width: 0; border-radius: var(--xp-radius-card); }
22
- .xp-data-table-wrap { overflow-x: auto; overflow-y: auto; max-height: 70vh; border: 1px solid var(--xp-border); border-radius: var(--xp-radius-card); background: var(--xp-surface); }
23
- .xp-data-table-wrap:focus-visible { outline: 2px solid var(--xp-focus); outline-offset: 2px; }
24
- /* Overlays stay visible above opaque sticky headers and the highlighted row. */
25
- .xp-data-table-frame::before, .xp-data-table-frame::after { content: ''; position: absolute; top: 1px; bottom: 1px; width: var(--xp-space-6); z-index: 3; pointer-events: none; opacity: 0; }
26
- .xp-data-table-frame::before { left: 1px; border-radius: var(--xp-radius-card) 0 0 var(--xp-radius-card); background: linear-gradient(to right, var(--xp-border-strong), transparent); }
27
- .xp-data-table-frame::after { right: 1px; border-radius: 0 var(--xp-radius-card) var(--xp-radius-card) 0; background: linear-gradient(to left, var(--xp-border-strong), transparent); }
28
- .xp-data-table-frame.has-left::before, .xp-data-table-frame.has-right::after { opacity: 1; }
29
- .xp-data-table { width: 100%; border-collapse: separate; border-spacing: 0; font: 400 14px/20px var(--xp-font); }
30
- .xp-data-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
31
- .xp-data-table th, .xp-data-table td { padding: 12px 14px; white-space: nowrap; border-bottom: 1px solid var(--xp-border); text-align: left; }
32
- .xp-data-table thead th { position: sticky; top: 0; z-index: 1; background: var(--xp-surface); font: var(--xp-text-small); color: var(--xp-text-2); }
33
- .xp-data-table tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--xp-surface); }
34
- .xp-data-table thead tr > :first-child { z-index: 2; }
35
- .xp-data-table tbody th { font-weight: 400; }
36
- .xp-data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
37
- .xp-data-table .muted { color: var(--xp-text-3); }
38
- .xp-data-table tr:last-child > * { border-bottom: 0; }
39
- .xp-data-table tr.is-lead > * { background: var(--xp-surface-2); font-weight: 600; }
40
- .xp-results-group { display: inline-flex; align-items: center; gap: 8px; }
41
- .xp-results-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
42
- .xp-results-panel { border: 1px solid var(--xp-border); border-radius: var(--xp-radius-card); background: var(--xp-surface); min-width: 0; }
43
- .xp-results-panel > summary { padding: 16px 20px; cursor: pointer; font: var(--xp-text-title); }
44
- .xp-results-panel > summary:focus-visible { outline: 2px solid var(--xp-focus); outline-offset: 2px; }
45
- .xp-results-panel > summary .xp-quality-chip { margin-left: 12px; }
46
- .xp-quality-row { padding: 14px 20px; border-top: 1px solid var(--xp-border); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; }
47
- .xp-quality-row > :not(:first-child) { grid-column: 2; }
48
- .xp-quality-row ul { margin: 0; padding-left: 20px; }
49
- .xp-quality-detail, .xp-quality-next, .xp-results-cap-help { color: var(--xp-text-2); font: var(--xp-text-small); }
50
- .xp-quality-chip { display: inline-flex; align-self: start; padding: 2px 8px; border-radius: var(--xp-radius-chip); font: var(--xp-text-small); color: var(--xp-success); background: var(--xp-success-bg); }
51
- .xp-quality-chip--watch { color: var(--xp-warning); background: var(--xp-warning-bg); }
52
- .xp-quality-chip--problem { color: var(--xp-error); background: var(--xp-error-bg); }
53
- .xp-ci-chart { padding: 20px; overflow-x: auto; }
54
- .xp-ci-chart svg { display: block; min-width: 560px; }
55
- .xp-ci-chart ul { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; margin: 0; padding: 0; font: var(--xp-text-small); }
56
- .xp-preview-links { display: grid; gap: 12px; }
57
- .xp-preview-row { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--xp-border); padding-bottom: 12px; }
58
- @media (max-width: 720px) {
59
- .xp-stat-tiles { grid-template-columns: minmax(0, 1fr); }
60
- .xp-stat-tile + .xp-stat-tile { border-left: 0; border-top: 1px solid var(--xp-border); }
61
- .xp-verdict-hero { padding: 20px; }
62
- .xp-verdict-hero h2 { font-size: 24px; line-height: 30px; }
63
- }
64
- .xp-results-as-of { color: var(--xp-text-2); }
@@ -1,10 +0,0 @@
1
- /* Admin styles for the experiments plugin; loaded by src/admin/styles.ts. */
2
- .xp-status-pill { font-weight: 600; }
3
- .xp-status-pill--neutral { background: var(--xp-border); color: var(--xp-text-strong); }
4
- .xp-status-pill--success { background: var(--xp-success-bg); color: var(--xp-success-text-strong); }
5
- .xp-status-pill--warning { background: var(--xp-warning-bg); color: var(--xp-warning-text-strong); }
6
- .xp-status-pill--info { background: var(--xp-border-strong); color: var(--xp-text-emphasis); }
7
- .xp-status-pill--muted { background: var(--xp-surface-raised); color: var(--xp-text-muted); }
8
- .xp-locked-notice, .xp-notice { padding: 0.75rem; border-inline-start: 3px solid var(--xp-border-accent); background: var(--xp-surface); color: var(--xp-text-strong); }
9
- .xp-notice--warning { border-color: var(--xp-warning); background: var(--xp-warning-surface); }
10
- .xp-notice--error { border-color: var(--xp-error); background: var(--xp-error-surface); }
@@ -1,2 +0,0 @@
1
- import './theme.css';
2
- import './styles.css';
@@ -1,3 +0,0 @@
1
- // Load admin styles from mounted components so barrels stay free of side effects.
2
- import './theme.css';
3
- import './styles.css';
@@ -1,10 +0,0 @@
1
- .xp-page-combobox { position: relative; width: 100%; min-width: 0; }
2
- .xp-page-combobox input { width: 100%; }
3
- .xp-page-combobox-popup { position: absolute; inset-inline: 0; z-index: 5; max-height: 24rem; overflow-y: auto; background: var(--xp-surface); color: var(--xp-text); border: 1px solid var(--xp-border-strong); border-radius: var(--xp-radius-control); padding: var(--xp-space-1); }
4
- .xp-page-option { position: relative; display: block; width: 100%; box-sizing: border-box; text-align: left; padding: var(--xp-space-3); padding-inline-end: var(--xp-space-6); border: 2px solid transparent; border-radius: var(--xp-radius-control); cursor: pointer; color: var(--xp-text); background: var(--xp-surface); overflow-wrap: anywhere; }
5
- .xp-page-option-detail { display: block; color: var(--xp-text-2); font: var(--xp-text-small); }
6
- .xp-page-option[aria-selected='true'] { border-color: var(--xp-accent); }
7
- .xp-page-option-check { position: absolute; inset-inline-end: var(--xp-space-2); top: var(--xp-space-3); color: var(--xp-accent); }
8
- .xp-page-option[data-active='true'] { background: var(--xp-surface-2); outline: 2px solid var(--xp-focus); outline-offset: -4px; }
9
- .xp-page-option[aria-disabled='true'] { cursor: not-allowed; border-color: var(--xp-text-2); border-style: dashed; }
10
- .xp-page-option[aria-disabled='true'] strong { font-weight: 400; }
@@ -1,5 +0,0 @@
1
- import type { SectionProps } from '../contracts.js';
2
- export declare function Banner(props: SectionProps): import("react").JSX.Element | null;
3
- export declare function ReadinessContent({ test, surface, resultsVersion, bar }: SectionProps & {
4
- bar?: boolean;
5
- }): import("react").JSX.Element;
@@ -1,5 +0,0 @@
1
- import type { TestDocApi } from '../contracts.js';
2
- export declare function saveStatusMessage(test: TestDocApi): string | null;
3
- export declare function SaveStatus({ test }: {
4
- test: TestDocApi;
5
- }): import("react").JSX.Element;