@delmaredigital/payload-experiments 0.4.0-rc.1 → 0.4.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +284 -772
- package/dist/admin/LayerUsage.js +1 -1
- package/dist/admin/MetricSourceSelect.js +2 -2
- package/dist/admin/PlacementStatus.js +1 -1
- package/dist/admin/TestsDashboardCards.d.ts +1 -0
- package/dist/admin/TestsDashboardCards.js +5 -9
- package/dist/admin/TestsNavLink.d.ts +1 -0
- package/dist/admin/TestsNavLink.js +5 -11
- package/dist/admin/blocks/BlockPanel.d.ts +1 -0
- package/dist/admin/blocks/BlockPanel.js +129 -37
- package/dist/admin/blocks/TestBlockField.js +3 -3
- package/dist/admin/blocks/formApi.d.ts +3 -0
- package/dist/admin/blocks/formApi.js +10 -4
- package/dist/admin/blocks/inject.js +1 -0
- package/dist/admin/blocks/model.d.ts +3 -2
- package/dist/admin/blocks/model.js +10 -6
- package/dist/admin/blocks/statusCache.d.ts +2 -0
- package/dist/admin/blocks/statusCache.js +12 -3
- package/dist/admin/components/RootViewMessage.js +1 -1
- package/dist/admin/copy/blocks.d.ts +21 -1
- package/dist/admin/copy/blocks.js +40 -6
- package/dist/admin/copy/goals.d.ts +6 -1
- package/dist/admin/copy/goals.js +10 -3
- package/dist/admin/copy/newTest.d.ts +6 -7
- package/dist/admin/copy/newTest.js +9 -7
- package/dist/admin/goals/XpGoalField.d.ts +2 -0
- package/dist/admin/goals/XpGoalField.js +156 -114
- package/dist/admin/goals/xpGoalField.css +47 -0
- package/dist/admin/pageCollections.d.ts +1 -0
- package/dist/admin/pageCollections.js +3 -0
- package/dist/admin/paths.d.ts +3 -0
- package/dist/admin/paths.js +3 -0
- package/dist/admin/placementStatus.model.js +1 -1
- package/dist/admin/status.model.js +1 -1
- package/dist/admin/surface/ResultsRoute.d.ts +2 -1
- package/dist/admin/surface/ResultsRoute.js +20 -24
- package/dist/admin/surface/SurfaceShell.js +5 -2
- package/dist/admin/surface/TestRowMenu.d.ts +6 -0
- package/dist/admin/surface/TestRowMenu.js +156 -0
- package/dist/admin/surface/TestsHome.d.ts +5 -3
- package/dist/admin/surface/TestsHome.js +266 -58
- package/dist/admin/surface/TestsSurface.js +8 -7
- package/dist/admin/surface/goals/GoalForm.d.ts +1 -1
- package/dist/admin/surface/goals/GoalForm.js +95 -54
- package/dist/admin/surface/goals/GoalsList.d.ts +1 -1
- package/dist/admin/surface/goals/GoalsList.js +5 -4
- package/dist/admin/surface/goals/data.js +2 -2
- package/dist/admin/surface/goals/goals.css +7 -0
- package/dist/admin/surface/goals/goals.model.d.ts +11 -1
- package/dist/admin/surface/goals/goals.model.js +43 -0
- package/dist/admin/surface/home.model.d.ts +9 -8
- package/dist/admin/surface/home.model.js +22 -21
- package/dist/admin/surface/newTest/NewTest.d.ts +4 -4
- package/dist/admin/surface/newTest/NewTest.js +98 -94
- package/dist/admin/surface/newTest/PageWizard.d.ts +2 -1
- package/dist/admin/surface/newTest/PageWizard.js +111 -76
- package/dist/admin/surface/newTest/newTest.css +28 -9
- package/dist/admin/surface/results/ResultsHeader.d.ts +2 -2
- package/dist/admin/surface/results/ResultsHeader.js +58 -54
- package/dist/admin/surface/surface.css +10 -0
- package/dist/admin/surface/test/TestPage.d.ts +1 -2
- package/dist/admin/surface/test/TestPage.js +42 -162
- package/dist/admin/theme.css +2 -0
- package/dist/admin/views/CollectionListRedirect.d.ts +1 -0
- package/dist/admin/views/CollectionListRedirect.js +1 -1
- package/dist/admin/views/ExperimentsRootView.js +18 -165
- package/dist/admin/views/GoalEditRedirect.d.ts +4 -0
- package/dist/admin/views/GoalEditRedirect.js +14 -0
- package/dist/admin/views/GoalsCollectionListView.d.ts +2 -0
- package/dist/admin/views/GoalsCollectionListView.js +4 -0
- package/dist/admin/views/TestsCollectionListView.d.ts +2 -0
- package/dist/admin/views/TestsCollectionListView.js +4 -0
- package/dist/admin/views/TestsNavLinkServer.d.ts +1 -0
- package/dist/admin/views/TestsNavLinkServer.js +2 -2
- package/dist/admin/views/TestsSurfaceClient.d.ts +3 -0
- package/dist/admin/views/TestsSurfaceClient.js +11 -0
- package/dist/admin/views/buildSurfaceProps.d.ts +8 -0
- package/dist/admin/views/buildSurfaceProps.js +102 -0
- package/dist/admin/views/renderCollectionList.d.ts +2 -0
- package/dist/admin/views/renderCollectionList.js +34 -0
- package/dist/admin/views/renderTestsSurface.d.ts +3 -0
- package/dist/admin/views/renderTestsSurface.js +34 -0
- package/dist/blocks/bindings.js +8 -14
- package/dist/blocks/formState.js +1 -1
- package/dist/blocks/placementLanguages.d.ts +7 -0
- package/dist/blocks/placementLanguages.js +27 -0
- package/dist/blocks/placementLocale.d.ts +37 -0
- package/dist/blocks/placementLocale.js +270 -0
- package/dist/collections/experiments/config.js +17 -8
- package/dist/collections/experiments/deleteGuard.js +2 -2
- package/dist/collections/experiments/lockHook.js +21 -2
- package/dist/collections/experiments/pickSlug.js +2 -0
- package/dist/collections/metrics.js +16 -4
- package/dist/collections/metricsGuards.js +2 -0
- package/dist/collections/serialize.js +5 -4
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/db/adapter.d.ts +9 -1
- package/dist/db/adapter.js +77 -1
- package/dist/db/appends.d.ts +13 -0
- package/dist/db/appends.js +49 -0
- package/dist/db/bulkPlacementRemoval.d.ts +30 -0
- package/dist/db/bulkPlacementRemoval.js +111 -0
- package/dist/db/delete.d.ts +1 -1
- package/dist/db/delete.js +2 -4
- package/dist/db/events.d.ts +9 -0
- package/dist/db/events.js +42 -8
- package/dist/db/executor.d.ts +7 -1
- package/dist/db/executor.js +7 -3
- package/dist/db/pageCopies.d.ts +5 -0
- package/dist/db/pageCopies.js +31 -0
- package/dist/db/placements.d.ts +2 -0
- package/dist/db/placements.js +8 -0
- package/dist/db/results.d.ts +5 -1
- package/dist/db/results.js +21 -5
- package/dist/db/snapshots.d.ts +1 -0
- package/dist/endpoints/contentLocale.d.ts +6 -0
- package/dist/endpoints/contentLocale.js +15 -0
- package/dist/endpoints/deleteImpact.d.ts +6 -0
- package/dist/endpoints/deleteImpact.js +207 -0
- package/dist/endpoints/duplicateOriginal.d.ts +38 -0
- package/dist/endpoints/duplicateOriginal.js +407 -0
- package/dist/endpoints/editorSurface.d.ts +3 -0
- package/dist/endpoints/editorSurface.js +31 -0
- package/dist/endpoints/events.js +103 -39
- package/dist/endpoints/index.js +57 -9
- package/dist/endpoints/pages.js +247 -64
- package/dist/endpoints/placementStatus.js +13 -5
- package/dist/endpoints/preflight.d.ts +1 -1
- package/dist/endpoints/preflight.js +17 -2
- package/dist/endpoints/results.d.ts +1 -1
- package/dist/endpoints/results.js +6 -2
- package/dist/endpoints/routeId.d.ts +2 -2
- package/dist/endpoints/routeId.js +11 -5
- package/dist/endpoints/summary.js +46 -12
- package/dist/endpoints/testVersion.d.ts +2 -0
- package/dist/endpoints/testVersion.js +38 -0
- package/dist/endpoints/transitions.js +41 -29
- package/dist/errors.d.ts +5 -0
- package/dist/errors.js +8 -0
- package/dist/events/request.d.ts +6 -2
- package/dist/events/request.js +35 -8
- package/dist/events/rows.d.ts +1 -1
- package/dist/events/rows.js +24 -8
- package/dist/events/writable.d.ts +9 -0
- package/dist/events/writable.js +13 -0
- package/dist/exports/adminClient.d.ts +1 -1
- package/dist/exports/adminClient.js +1 -1
- package/dist/exports/adminRsc.d.ts +3 -0
- package/dist/exports/adminRsc.js +3 -0
- package/dist/exports/index.d.ts +1 -1
- package/dist/exports/rsc.d.ts +1 -0
- package/dist/exports/rsc.js +1 -0
- package/dist/fields/xpGoal.js +3 -15
- package/dist/goals/fairness.d.ts +1 -1
- package/dist/goals/fairness.js +44 -35
- package/dist/goals/picker/clickGoalPicker.model.d.ts +8 -1
- package/dist/goals/picker/clickGoalPicker.model.js +20 -2
- package/dist/goals/picker/copy.d.ts +6 -2
- package/dist/goals/picker/copy.js +11 -2
- package/dist/goals/picker/useClickGoalPicker.d.ts +1 -1
- package/dist/goals/picker/useClickGoalPicker.js +4 -2
- package/dist/goals/validate.d.ts +3 -0
- package/dist/goals/validate.js +15 -0
- package/dist/hooks/blockRemovalRule.d.ts +30 -0
- package/dist/hooks/blockRemovalRule.js +165 -0
- package/dist/hooks/hostHook.js +6 -2
- package/dist/hooks/pageGuard.d.ts +27 -2
- package/dist/hooks/pageGuard.js +213 -45
- package/dist/hooks/puckGoals.d.ts +5 -0
- package/dist/hooks/puckGoals.js +62 -0
- package/dist/hooks/puckNestedTests.d.ts +8 -0
- package/dist/hooks/puckNestedTests.js +36 -0
- package/dist/hooks/trackPageCopies.d.ts +11 -0
- package/dist/hooks/trackPageCopies.js +7 -0
- package/dist/lib/fetchAllDocs.d.ts +1 -1
- package/dist/lib/placementPages.d.ts +10 -0
- package/dist/{admin/previewLinks.model.js → lib/placementPages.js} +10 -5
- package/dist/manifest/compile.d.ts +2 -1
- package/dist/manifest/compile.js +13 -6
- package/dist/onInit.js +36 -0
- package/dist/options.d.ts +2 -0
- package/dist/options.js +23 -2
- package/dist/plugin.js +19 -20
- package/dist/proxy/pageNavigation.d.ts +4 -0
- package/dist/proxy/pageNavigation.js +28 -0
- package/dist/proxy/resolve.js +52 -25
- package/dist/puck/ExperimentPicker.d.ts +2 -1
- package/dist/puck/ExperimentPicker.js +62 -40
- package/dist/puck/ExperimentSlot.js +3 -1
- package/dist/puck/copy.d.ts +5 -1
- package/dist/puck/copy.js +5 -1
- package/dist/puck/editor/ConfigureTestDrawer.d.ts +25 -0
- package/dist/puck/editor/ConfigureTestDrawer.js +150 -0
- package/dist/puck/editor/CreateExperimentDrawer.d.ts +12 -2
- package/dist/puck/editor/CreateExperimentDrawer.js +89 -21
- package/dist/puck/editor/EditorControls.d.ts +14 -0
- package/dist/puck/editor/EditorControls.js +99 -0
- package/dist/puck/editor/ExperimentSlotEditor.js +951 -179
- package/dist/puck/editor/LeftoverVersions.d.ts +15 -0
- package/dist/puck/editor/LeftoverVersions.js +79 -0
- package/dist/puck/editor/PlacementNotice.d.ts +8 -0
- package/dist/puck/editor/PlacementNotice.js +22 -0
- package/dist/puck/editor/QuickTestActions.d.ts +6 -0
- package/dist/puck/editor/QuickTestActions.js +57 -0
- package/dist/puck/editor/ResultsReadout.d.ts +2 -1
- package/dist/puck/editor/ResultsReadout.js +10 -6
- package/dist/puck/editor/VersionBuilder.d.ts +66 -12
- package/dist/puck/editor/VersionBuilder.js +554 -231
- package/dist/puck/editor/armWrites.d.ts +11 -2
- package/dist/puck/editor/armWrites.js +43 -4
- package/dist/puck/editor/armsCache.d.ts +3 -1
- package/dist/puck/editor/armsCache.js +20 -4
- package/dist/puck/editor/blockClipboard.d.ts +16 -0
- package/dist/puck/editor/blockClipboard.js +20 -0
- package/dist/puck/editor/cloneSlot.d.ts +2 -0
- package/dist/puck/editor/cloneSlot.js +7 -0
- package/dist/puck/editor/copy.d.ts +64 -19
- package/dist/puck/editor/copy.js +72 -20
- package/dist/puck/editor/createTest.d.ts +3 -0
- package/dist/puck/editor/createTest.js +33 -0
- package/dist/puck/editor/editor.chrome.css +191 -19
- package/dist/puck/editor/editor.css +328 -24
- package/dist/puck/editor/editor.model.d.ts +17 -1
- package/dist/puck/editor/editor.model.js +61 -4
- package/dist/puck/editor/editorSurface.d.ts +10 -0
- package/dist/puck/editor/editorSurface.js +65 -0
- package/dist/puck/editor/experimentOutlinePlugin.js +96 -28
- package/dist/puck/editor/localPlacements.d.ts +5 -0
- package/dist/puck/editor/localPlacements.js +43 -0
- package/dist/puck/editor/outlineVersion.d.ts +5 -0
- package/dist/puck/editor/outlineVersion.js +36 -0
- package/dist/puck/editor/placementsCache.d.ts +60 -0
- package/dist/puck/editor/placementsCache.js +263 -0
- package/dist/puck/editor/sidebar.d.ts +8 -0
- package/dist/puck/editor/sidebar.js +74 -0
- package/dist/puck/editor/usePageSaveReadiness.d.ts +6 -0
- package/dist/puck/editor/usePageSaveReadiness.js +31 -0
- package/dist/puck/editor/usePlacementNotice.d.ts +3 -0
- package/dist/puck/editor/usePlacementNotice.js +15 -0
- package/dist/puck/editor/xpGoalPuckEditorField.js +105 -86
- package/dist/puck/experimentSlotField.d.ts +3 -0
- package/dist/puck/experimentSlotField.js +15 -4
- package/dist/puck/experimentSlug.d.ts +2 -0
- package/dist/puck/experimentSlug.js +3 -0
- package/dist/puck/nestedTestCopy.d.ts +8 -0
- package/dist/puck/nestedTestCopy.js +22 -0
- package/dist/puck/nestedTests.d.ts +17 -0
- package/dist/puck/nestedTests.js +30 -0
- package/dist/puck/slotConfig.d.ts +1 -1
- package/dist/puck/slotConfig.js +17 -4
- package/dist/puck/visibility.d.ts +20 -0
- package/dist/puck/visibility.js +81 -0
- package/dist/results/aggregate.d.ts +6 -3
- package/dist/results/aggregate.js +9 -9
- package/dist/results/health.d.ts +8 -0
- package/dist/results/health.js +28 -0
- package/dist/results/identityCredit.d.ts +1 -0
- package/dist/results/identityCredit.js +4 -1
- package/dist/results/verdict.js +2 -1
- package/dist/runtime/cookie.d.ts +10 -2
- package/dist/runtime/cookie.js +38 -6
- package/dist/runtime/cookieOptions.d.ts +6 -0
- package/dist/runtime/cookieOptions.js +14 -0
- package/dist/runtime/proxyRuntime.d.ts +1 -0
- package/dist/runtime/proxyRuntime.js +18 -8
- package/dist/runtime/signing.d.ts +1 -0
- package/dist/runtime/signing.js +5 -0
- package/dist/sanitizeReadinessDetail.d.ts +2 -2
- package/dist/sanitizeReadinessDetail.js +22 -2
- package/dist/server/getAssignments.js +11 -10
- package/dist/server/recordContentChange.d.ts +1 -1
- package/dist/server/recordContentChange.js +48 -22
- package/dist/server/resolveExperimentBlocks.js +2 -4
- package/dist/server/resolveExperimentData.js +8 -8
- package/dist/server/runResults.js +52 -14
- package/dist/server/startExperiment.d.ts +20 -0
- package/dist/server/startExperiment.js +70 -0
- package/dist/server/trackConversion.js +10 -13
- package/dist/{admin → testSurface}/PreviewLinks.js +6 -2
- package/dist/testSurface/actions/DecideDialog.d.ts +16 -0
- package/dist/{admin → testSurface}/actions/DecideDialog.js +78 -55
- package/dist/testSurface/actions/LifecycleAction.d.ts +16 -0
- package/dist/testSurface/actions/LifecycleAction.js +105 -0
- package/dist/{admin → testSurface}/actions/MakeContentResult.d.ts +4 -3
- package/dist/{admin → testSurface}/actions/MakeContentResult.js +10 -2
- package/dist/{admin → testSurface}/actions/actions.model.d.ts +13 -5
- package/dist/testSurface/actions/actions.model.js +122 -0
- package/dist/{admin → testSurface}/api.d.ts +20 -7
- package/dist/{admin → testSurface}/api.js +72 -22
- package/dist/testSurface/contentLocaleURL.d.ts +2 -0
- package/dist/testSurface/contentLocaleURL.js +3 -0
- package/dist/{admin → testSurface}/copy/actions.d.ts +28 -8
- package/dist/{admin → testSurface}/copy/actions.js +31 -11
- package/dist/{admin → testSurface}/copy/common.d.ts +13 -4
- package/dist/{admin → testSurface}/copy/common.js +18 -8
- package/dist/testSurface/copy/languages.d.ts +12 -0
- package/dist/testSurface/copy/languages.js +8 -0
- package/dist/{admin → testSurface}/copy/metrics.d.ts +1 -0
- package/dist/{admin → testSurface}/copy/metrics.js +1 -0
- package/dist/testSurface/copy/pages.d.ts +84 -0
- package/dist/testSurface/copy/pages.js +90 -0
- package/dist/{admin → testSurface}/copy/readiness.d.ts +38 -4
- package/dist/{admin → testSurface}/copy/readiness.js +52 -7
- package/dist/{admin → testSurface}/copy/results.d.ts +6 -3
- package/dist/{admin → testSurface}/copy/results.js +6 -3
- package/dist/{admin → testSurface}/copy/review.d.ts +1 -1
- package/dist/{admin → testSurface}/copy/review.js +1 -1
- package/dist/{admin → testSurface}/copy/surface.d.ts +11 -2
- package/dist/{admin → testSurface}/copy/surface.js +13 -10
- package/dist/{admin → testSurface}/copy/testPage.d.ts +53 -8
- package/dist/testSurface/copy/testPage.js +165 -0
- package/dist/testSurface/format/adminURL.d.ts +7 -0
- package/dist/testSurface/format/adminURL.js +9 -0
- package/dist/testSurface/placementLabel.d.ts +8 -0
- package/dist/testSurface/placementLabel.js +24 -0
- package/dist/{admin → testSurface}/placements/placementLabels.d.ts +2 -0
- package/dist/{admin → testSurface}/placements/placementLabels.js +3 -2
- package/dist/{admin → testSurface}/previewLinks.model.d.ts +1 -6
- package/dist/testSurface/previewLinks.model.js +4 -0
- package/dist/testSurface/readPreflight.d.ts +13 -0
- package/dist/testSurface/readPreflight.js +44 -0
- package/dist/testSurface/readinessRead.d.ts +53 -0
- package/dist/testSurface/readinessRead.js +50 -0
- package/dist/{admin → testSurface}/results/VerdictHero.d.ts +2 -1
- package/dist/{admin → testSurface}/results/VerdictHero.js +5 -1
- package/dist/testSurface/results/results.css +64 -0
- package/dist/{admin → testSurface}/results/results.model.js +6 -2
- package/dist/{admin → testSurface}/surface/contracts.d.ts +17 -3
- package/dist/testSurface/surface/editorPlacement.d.ts +26 -0
- package/dist/testSurface/surface/editorPlacement.js +78 -0
- package/dist/testSurface/surface/pageBlock/pageBlock.model.js +9 -0
- package/dist/{admin → testSurface}/surface/pageBlock/parts.js +39 -11
- package/dist/testSurface/surface/pagePicker/CopyRoute.d.ts +13 -0
- package/dist/testSurface/surface/pagePicker/CopyRoute.js +273 -0
- package/dist/testSurface/surface/pagePicker/PageCombobox.d.ts +21 -0
- package/dist/testSurface/surface/pagePicker/PageCombobox.js +503 -0
- package/dist/testSurface/surface/pagePicker/pagePicker.css +73 -0
- package/dist/{admin → testSurface}/surface/pagePicker/pagePicker.model.d.ts +7 -3
- package/dist/{admin → testSurface}/surface/pagePicker/pagePicker.model.js +17 -2
- package/dist/{admin → testSurface}/surface/readiness/ActionDialogs.d.ts +8 -4
- package/dist/testSurface/surface/readiness/ActionDialogs.js +351 -0
- package/dist/{admin → testSurface}/surface/readiness/Banner.d.ts +2 -3
- package/dist/testSurface/surface/readiness/Banner.js +187 -0
- package/dist/testSurface/surface/readiness/BlockerList.d.ts +11 -0
- package/dist/testSurface/surface/readiness/BlockerList.js +31 -0
- package/dist/testSurface/surface/readiness/SaveStatus.d.ts +10 -0
- package/dist/testSurface/surface/readiness/SaveStatus.js +66 -0
- package/dist/{admin → testSurface}/surface/readiness/parts.js +0 -2
- package/dist/{admin → testSurface}/surface/readiness/readiness.model.d.ts +28 -2
- package/dist/testSurface/surface/readiness/readiness.model.js +377 -0
- package/dist/testSurface/surface/readiness/useTransition.d.ts +16 -0
- package/dist/testSurface/surface/readiness/useTransition.js +141 -0
- package/dist/{admin → testSurface}/surface/results/ReleasePages.d.ts +6 -3
- package/dist/{admin → testSurface}/surface/results/ReleasePages.js +40 -40
- package/dist/{admin → testSurface}/surface/results/ResultsBody.d.ts +7 -3
- package/dist/{admin → testSurface}/surface/results/ResultsBody.js +108 -44
- package/dist/{admin → testSurface}/surface/results/useResults.d.ts +26 -8
- package/dist/{admin → testSurface}/surface/results/useResults.js +3 -2
- package/dist/{admin → testSurface}/surface/setting/parts.js +58 -18
- package/dist/testSurface/surface/setting/setting.css +17 -0
- package/dist/{admin → testSurface}/surface/test/AdvancedSection.js +2 -0
- package/dist/testSurface/surface/test/DeleteTest.d.ts +23 -0
- package/dist/testSurface/surface/test/DeleteTest.js +270 -0
- package/dist/testSurface/surface/test/GoalSection.d.ts +4 -0
- package/dist/{admin → testSurface}/surface/test/GoalSection.js +116 -86
- package/dist/testSurface/surface/test/LengthSection.d.ts +2 -0
- package/dist/{admin → testSurface}/surface/test/LengthSection.js +5 -1
- package/dist/{admin → testSurface}/surface/test/PageHoldout.js +4 -1
- package/dist/{admin → testSurface}/surface/test/Rail.js +7 -4
- package/dist/{admin → testSurface}/surface/test/ReadinessBar.d.ts +1 -0
- package/dist/{admin → testSurface}/surface/test/ReadinessBar.js +2 -3
- package/dist/{admin → testSurface}/surface/test/Section.d.ts +3 -1
- package/dist/testSurface/surface/test/Section.js +80 -0
- package/dist/{admin → testSurface}/surface/test/TargetingSection.js +82 -12
- package/dist/testSurface/surface/test/TestSurface.d.ts +19 -0
- package/dist/testSurface/surface/test/TestSurface.js +265 -0
- package/dist/testSurface/surface/test/VersionsSection.d.ts +5 -0
- package/dist/{admin → testSurface}/surface/test/VersionsSection.js +69 -35
- package/dist/{admin → testSurface}/surface/test/fields.d.ts +30 -7
- package/dist/testSurface/surface/test/fields.js +306 -0
- package/dist/{admin → testSurface}/surface/test/pageParts.js +27 -43
- package/dist/testSurface/surface/test/testPage.css +103 -0
- package/dist/{admin → testSurface}/surface/test/testPage.model.d.ts +1 -0
- package/dist/{admin → testSurface}/surface/test/testPage.model.js +6 -0
- package/dist/{admin → testSurface}/surface/testDocument.model.d.ts +3 -0
- package/dist/{admin → testSurface}/surface/testDocument.model.js +4 -1
- package/dist/testSurface/surface/useTestDocument.d.ts +60 -0
- package/dist/testSurface/surface/useTestDocument.js +782 -0
- package/dist/testSurface/surface/watchTestDocument.d.ts +15 -0
- package/dist/testSurface/surface/watchTestDocument.js +181 -0
- package/dist/testSurface/surfaceUrls.d.ts +7 -0
- package/dist/testSurface/surfaceUrls.js +19 -0
- package/dist/{admin → testSurface}/useApi.d.ts +21 -5
- package/dist/testSurface/useOnTestReturn.d.ts +2 -0
- package/dist/testSurface/useOnTestReturn.js +27 -0
- package/dist/testSurface/useReadinessPolling.d.ts +3 -0
- package/dist/testSurface/useReadinessPolling.js +26 -0
- package/dist/transitions/addMetric.d.ts +2 -5
- package/dist/transitions/addMetric.js +5 -1
- package/dist/transitions/allocate.d.ts +2 -2
- package/dist/transitions/allocate.js +3 -1
- package/dist/transitions/archive.d.ts +1 -1
- package/dist/transitions/archive.js +3 -2
- package/dist/transitions/checkStart.d.ts +6 -1
- package/dist/transitions/checkStart.js +133 -17
- package/dist/transitions/contentFields.js +9 -5
- package/dist/transitions/decide.d.ts +1 -1
- package/dist/transitions/decide.js +6 -3
- package/dist/transitions/deleteExperiment.d.ts +2 -2
- package/dist/transitions/deleteExperiment.js +17 -7
- package/dist/transitions/kernel.d.ts +4 -0
- package/dist/transitions/kernel.js +9 -4
- package/dist/transitions/makeContent.d.ts +2 -1
- package/dist/transitions/makeContent.js +41 -17
- package/dist/transitions/nestedPlacementNames.d.ts +5 -0
- package/dist/transitions/nestedPlacementNames.js +32 -0
- package/dist/transitions/pageAddress.d.ts +6 -0
- package/dist/transitions/pageAddress.js +71 -0
- package/dist/transitions/pageVersions.js +3 -1
- package/dist/transitions/phaseRecord.d.ts +2 -0
- package/dist/transitions/phaseRecord.js +5 -0
- package/dist/transitions/placementInteractions.d.ts +3 -3
- package/dist/transitions/placementInteractions.js +16 -12
- package/dist/transitions/placements.d.ts +54 -8
- package/dist/transitions/placements.js +304 -81
- package/dist/transitions/preflightData.d.ts +5 -3
- package/dist/transitions/preflightData.js +137 -40
- package/dist/transitions/releaseHoldout.d.ts +2 -1
- package/dist/transitions/releaseHoldout.js +3 -1
- package/dist/transitions/releasePages.d.ts +2 -1
- package/dist/transitions/releasePages.js +3 -1
- package/dist/transitions/resolveCaps.d.ts +2 -4
- package/dist/transitions/start.d.ts +6 -8
- package/dist/transitions/start.js +72 -35
- package/dist/transitions/startReads.d.ts +7 -0
- package/dist/transitions/startReads.js +28 -0
- package/dist/transitions/stop.d.ts +2 -1
- package/dist/transitions/stop.js +3 -2
- package/dist/types/contracts.d.ts +15 -3
- package/dist/types/endpoints.d.ts +121 -17
- package/dist/types/puck.d.ts +1 -0
- package/dist/types/runtime.d.ts +15 -9
- package/dist/types/snapshot.d.ts +2 -0
- package/dist/types/surface.d.ts +9 -9
- package/dist/ui/Button.js +2 -2
- package/dist/ui/Card.d.ts +2 -1
- package/dist/ui/Card.js +4 -4
- package/dist/ui/ChipsInput.d.ts +8 -1
- package/dist/ui/ChipsInput.js +17 -4
- package/dist/ui/Dialog.d.ts +24 -2
- package/dist/ui/Dialog.js +116 -6
- package/dist/ui/Drawer.d.ts +10 -0
- package/dist/ui/Drawer.js +29 -0
- package/dist/ui/Inputs.d.ts +4 -3
- package/dist/ui/Inputs.js +7 -4
- package/dist/ui/SelectControl.d.ts +33 -0
- package/dist/ui/SelectControl.js +504 -0
- package/dist/ui/Tabs.d.ts +4 -4
- package/dist/ui/Tabs.js +35 -32
- package/dist/ui/ui.css +49 -5
- package/package.json +3 -2
- package/dist/admin/actions/ConfirmDialog.d.ts +0 -19
- package/dist/admin/actions/ConfirmDialog.js +0 -149
- package/dist/admin/actions/DecideDialog.d.ts +0 -10
- package/dist/admin/actions/actions.model.js +0 -70
- package/dist/admin/copy/pages.d.ts +0 -26
- package/dist/admin/copy/pages.js +0 -26
- package/dist/admin/copy/testPage.js +0 -104
- package/dist/admin/results/results.css +0 -64
- package/dist/admin/styles.css +0 -10
- package/dist/admin/styles.d.ts +0 -2
- package/dist/admin/styles.js +0 -3
- package/dist/admin/surface/pageBlock/pageBlock.model.js +0 -8
- package/dist/admin/surface/pagePicker/CopyRoute.d.ts +0 -6
- package/dist/admin/surface/pagePicker/CopyRoute.js +0 -53
- package/dist/admin/surface/pagePicker/PagePicker.d.ts +0 -10
- package/dist/admin/surface/pagePicker/PagePicker.js +0 -172
- package/dist/admin/surface/readiness/ActionDialogs.js +0 -337
- package/dist/admin/surface/readiness/Banner.js +0 -190
- package/dist/admin/surface/readiness/SaveStatus.d.ts +0 -5
- package/dist/admin/surface/readiness/SaveStatus.js +0 -53
- package/dist/admin/surface/readiness/readiness.model.js +0 -205
- package/dist/admin/surface/readiness/useTransition.d.ts +0 -11
- package/dist/admin/surface/readiness/useTransition.js +0 -35
- package/dist/admin/surface/setting/setting.css +0 -17
- package/dist/admin/surface/test/GoalSection.d.ts +0 -2
- package/dist/admin/surface/test/LengthSection.d.ts +0 -2
- package/dist/admin/surface/test/Section.js +0 -47
- package/dist/admin/surface/test/VersionsSection.d.ts +0 -4
- package/dist/admin/surface/test/fields.js +0 -216
- package/dist/admin/surface/test/testPage.css +0 -97
- package/dist/admin/surface/useTestDocument.d.ts +0 -32
- package/dist/admin/surface/useTestDocument.js +0 -415
- /package/dist/{admin → testSurface}/PreviewLinks.d.ts +0 -0
- /package/dist/{admin → testSurface}/actions/decide.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/actions/decide.model.js +0 -0
- /package/dist/{admin → testSurface}/allocation.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/allocation.model.js +0 -0
- /package/dist/{admin → testSurface}/arms/arms.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/arms/arms.model.js +0 -0
- /package/dist/{admin → testSurface}/arms/pageTarget.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/arms/pageTarget.model.js +0 -0
- /package/dist/{admin → testSurface}/arms/params.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/arms/params.model.js +0 -0
- /package/dist/{admin → testSurface}/copy/advanced.d.ts +0 -0
- /package/dist/{admin → testSurface}/copy/advanced.js +0 -0
- /package/dist/{admin → testSurface}/copy/arms.d.ts +0 -0
- /package/dist/{admin → testSurface}/copy/arms.js +0 -0
- /package/dist/{admin → testSurface}/copy/audience.d.ts +0 -0
- /package/dist/{admin → testSurface}/copy/audience.js +0 -0
- /package/dist/{admin → testSurface}/copy/recommendation.d.ts +0 -0
- /package/dist/{admin → testSurface}/copy/recommendation.js +0 -0
- /package/dist/{admin → testSurface}/copy/setting.d.ts +0 -0
- /package/dist/{admin → testSurface}/copy/setting.js +0 -0
- /package/dist/{admin → testSurface}/format/date.d.ts +0 -0
- /package/dist/{admin → testSurface}/format/date.js +0 -0
- /package/dist/{admin → testSurface}/labels.d.ts +0 -0
- /package/dist/{admin → testSurface}/labels.js +0 -0
- /package/dist/{admin → testSurface}/lockedNotice.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/lockedNotice.model.js +0 -0
- /package/dist/{admin → testSurface}/metricSource.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/metricSource.model.js +0 -0
- /package/dist/{admin → testSurface}/placements/placementLabels.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/placements/placementLabels.model.js +0 -0
- /package/dist/{admin → testSurface}/placements/usePlacementLabels.d.ts +0 -0
- /package/dist/{admin → testSurface}/placements/usePlacementLabels.js +0 -0
- /package/dist/{admin → testSurface}/reload.d.ts +0 -0
- /package/dist/{admin → testSurface}/reload.js +0 -0
- /package/dist/{admin → testSurface}/results/CappedCell.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/CappedCell.js +0 -0
- /package/dist/{admin → testSurface}/results/CiChart.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/CiChart.js +0 -0
- /package/dist/{admin → testSurface}/results/DataQualityPanel.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/DataQualityPanel.js +0 -0
- /package/dist/{admin → testSurface}/results/DataTable.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/DataTable.js +0 -0
- /package/dist/{admin → testSurface}/results/StatTile.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/StatTile.js +0 -0
- /package/dist/{admin → testSurface}/results/chart.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/chart.model.js +0 -0
- /package/dist/{admin → testSurface}/results/format.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/format.js +0 -0
- /package/dist/{admin → testSurface}/results/legacy.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/legacy.js +0 -0
- /package/dist/{admin → testSurface}/results/releasePages.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/releasePages.model.js +0 -0
- /package/dist/{admin → testSurface}/results/results.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/snapshot.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/snapshot.js +0 -0
- /package/dist/{admin → testSurface}/review/review.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/review/review.model.js +0 -0
- /package/dist/{admin → testSurface}/surface/contracts.js +0 -0
- /package/dist/{admin → testSurface}/surface/pageBlock/pageBlock.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/pageBlock/parts.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/readiness/parts.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/results/recommendation.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/results/recommendation.model.js +0 -0
- /package/dist/{admin → testSurface}/surface/setting/parts.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/setting/setting.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/setting/setting.model.js +0 -0
- /package/dist/{admin → testSurface}/surface/test/AdvancedSection.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/PageHoldout.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/Rail.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/TargetingSection.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/jumpToSection.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/jumpToSection.js +0 -0
- /package/dist/{admin → testSurface}/surface/test/pageParts.d.ts +0 -0
- /package/dist/{admin → testSurface}/targeting/targeting.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/targeting/targeting.model.js +0 -0
- /package/dist/{admin → testSurface}/theme.d.ts +0 -0
- /package/dist/{admin → testSurface}/theme.js +0 -0
- /package/dist/{admin → testSurface}/useApi.js +0 -0
package/dist/ui/ui.css
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
.xp-ui-button--sm { height: 30px; padding: 0 10px; font-size: 13px; }
|
|
14
14
|
.xp-ui-button--link { height: auto; min-height: 0; padding-inline: 0; color: var(--xp-accent-text); text-decoration: var(--xp-accent-text-decoration); }
|
|
15
15
|
.xp-ui-button--link:hover { text-decoration: underline; }
|
|
16
|
-
.xp-ui-button:disabled, .xp-ui-button[aria-disabled='true'], .xp-ui-input:disabled, .xp-ui-toggle:disabled { opacity: .5; cursor: not-allowed; }
|
|
16
|
+
.xp-ui-button:disabled, .xp-ui-button[aria-disabled='true'], .xp-ui-input:disabled, .xp-ui-input[aria-disabled='true'], .xp-ui-toggle:disabled { opacity: .5; cursor: not-allowed; }
|
|
17
17
|
.xp-ui-button:focus-visible, .xp-ui-input:focus-visible, .xp-ui-toggle:focus-visible, .xp-ui-tab:focus-visible, .xp-ui-tabpanel:focus-visible, .xp-ui-breadcrumb a:focus-visible, .xp-ui-dialog:focus-visible { outline: 2px solid var(--xp-focus); outline-offset: 2px; }
|
|
18
18
|
.xp-ui-field { min-width: 0; max-width: 100%; display: grid; gap: 6px; color: var(--xp-text); font: var(--xp-text-body); }
|
|
19
19
|
.xp-ui-field > label { font-weight: 500; }
|
|
@@ -21,8 +21,19 @@
|
|
|
21
21
|
.xp-ui-input::placeholder { color: var(--xp-text-3); }
|
|
22
22
|
.xp-ui-input:hover { border-color: var(--xp-text-3); }
|
|
23
23
|
.xp-ui-input[aria-invalid='true'] { border-color: var(--xp-error); }
|
|
24
|
-
.xp-ui-input--number { text-align:
|
|
25
|
-
|
|
24
|
+
.xp-ui-input--number { text-align: end; font-variant-numeric: tabular-nums; }
|
|
25
|
+
/* The open menu inherits the control's tokens, even in a dialog or canvas iframe. */
|
|
26
|
+
.xp-ui-combobox-wrap { display: block; position: relative; min-width: 0; max-width: 100%; }
|
|
27
|
+
.xp-ui-combobox { display: flex; align-items: center; justify-content: space-between; gap: var(--xp-space-2); cursor: pointer; text-align: start; }
|
|
28
|
+
.xp-ui-combobox > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
29
|
+
.xp-ui-combobox-chevron { flex: 0 0 auto; width: 7px; height: 7px; margin-inline-end: 4px; border-right: 2px solid var(--xp-text-2); border-bottom: 2px solid var(--xp-text-2); transform: translateY(-2px) rotate(45deg); }
|
|
30
|
+
.xp-ui-combobox-popup { box-sizing: border-box; position: fixed; inset: auto; margin: 0; padding: var(--xp-space-1); overflow: auto; overscroll-behavior: contain; border: 1px solid var(--xp-border-strong); border-radius: var(--xp-radius-control); background: var(--xp-surface); color: var(--xp-text); font: var(--xp-text-body); z-index: 2147483647; }
|
|
31
|
+
.xp-ui-combobox-popup:popover-open { display: block; }
|
|
32
|
+
.xp-ui-combobox-option { padding: var(--xp-space-2); border-radius: var(--xp-space-1); cursor: pointer; overflow-wrap: anywhere; }
|
|
33
|
+
.xp-ui-combobox-option[data-active='true'] { background: var(--xp-surface-3); outline: 1px solid var(--xp-border-strong); outline-offset: -1px; }
|
|
34
|
+
.xp-ui-combobox-option[aria-disabled='true'] { color: var(--xp-text-3); cursor: not-allowed; }
|
|
35
|
+
.xp-ui-combobox-group { padding: var(--xp-space-2); color: var(--xp-text-2); font: var(--xp-text-small); }
|
|
36
|
+
.xp-ui-combobox-validation { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
|
|
26
37
|
.xp-ui-help { margin: 0; color: var(--xp-text-2); font: var(--xp-text-small); }
|
|
27
38
|
.xp-ui-error { margin: 0; color: var(--xp-error); font: var(--xp-text-small); }
|
|
28
39
|
.xp-ui-toggle { appearance: none; display: inline-block; width: 32px; height: 20px; margin: 0; padding: 2px; border-radius: 20px; border: 1px solid var(--xp-border-strong); background: var(--xp-surface-3); cursor: pointer; transition: background-color var(--xp-motion); }
|
|
@@ -38,7 +49,7 @@
|
|
|
38
49
|
.xp-ui-section-body { padding: 20px; }
|
|
39
50
|
.xp-ui-tabs { color: var(--xp-text); font: var(--xp-text-body); }
|
|
40
51
|
.xp-ui-tablist { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--xp-border); }
|
|
41
|
-
.xp-ui-tab { appearance: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 10px 12px; background: transparent; color: var(--xp-text-2); font: var(--xp-text-body); cursor: pointer; }
|
|
52
|
+
.xp-ui-tab { min-width: 0; max-width: 100%; overflow-wrap: anywhere; white-space: normal; appearance: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 10px 12px; background: transparent; color: var(--xp-text-2); font: var(--xp-text-body); cursor: pointer; }
|
|
42
53
|
.xp-ui-tab[aria-selected='true'] { color: var(--xp-accent-text); text-decoration: var(--xp-accent-text-decoration); border-bottom-color: var(--xp-accent-text); font-weight: 600; }
|
|
43
54
|
.xp-ui-tab:disabled { opacity: .5; cursor: not-allowed; }
|
|
44
55
|
.xp-ui-tabpanel { padding-block: 16px; }
|
|
@@ -58,7 +69,7 @@
|
|
|
58
69
|
.xp-ui-breadcrumb a:hover { color: var(--xp-text); }
|
|
59
70
|
.xp-ui-breadcrumb [aria-current] { color: var(--xp-text); }
|
|
60
71
|
.xp-ui-dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; padding: 24px; border: 1px solid var(--xp-border); border-radius: var(--xp-radius-card); background: var(--xp-surface); color: var(--xp-text); font: var(--xp-text-body); box-shadow: 0 16px 48px var(--xp-overlay); }
|
|
61
|
-
.xp-ui-dialog h2 { margin: 0 0 16px; font: var(--xp-text-title); }
|
|
72
|
+
.xp-ui-dialog h2 { margin: 0 0 16px; font: var(--xp-text-title); overflow-wrap: anywhere; }
|
|
62
73
|
.xp-ui-dialog::backdrop { background: var(--xp-overlay); }
|
|
63
74
|
.xp-ui-chips { width: 100%; max-width: 100%; min-width: 0; display: grid; gap: var(--xp-space-2); margin-block: var(--xp-space-4); color: var(--xp-text); font-family: var(--xp-font-body); }
|
|
64
75
|
.xp-ui-chips-control { width: 100%; max-width: 100%; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: var(--xp-space-1); padding: var(--xp-space-2); border: 1px solid var(--xp-border-control); border-radius: var(--xp-radius); background: var(--xp-input-bg); }
|
|
@@ -74,6 +85,13 @@
|
|
|
74
85
|
.xp-ui-chips p:not(.xp-ui-error) { margin: 0; color: var(--xp-text-muted); font-size: var(--xp-font-size-small); }
|
|
75
86
|
/* Quiet actions and breadcrumb links stay neutral; only the selected tab takes the text accent. */
|
|
76
87
|
.xp-ui-button-group { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; max-width: 100%; }
|
|
88
|
+
.xp-ui-confirm-actions { justify-content: flex-end; gap: var(--xp-space-2); margin-block-start: var(--xp-space-4); }
|
|
89
|
+
.xp-lifecycle-action { display: inline-flex; flex-direction: column; align-items: flex-start; gap: var(--xp-space-1); min-width: 0; }
|
|
90
|
+
.xp-lifecycle-action > .xp-ui-help { margin: 0; max-width: 24ch; }
|
|
91
|
+
.xp-ui-inline-row { display: flex; flex-wrap: wrap; align-items: end; gap: var(--xp-space-3); min-width: 0; }
|
|
92
|
+
.xp-ui-inline-row > .xp-ui-field { flex: 1 1 auto; min-width: 0; }
|
|
93
|
+
.xp-ui-inline-row > .xp-ui-button { flex: 0 0 auto; }
|
|
94
|
+
.xp-ui-subpanel { display: grid; gap: var(--xp-space-3); border: 1px solid var(--xp-border); border-radius: var(--xp-radius-card); padding: var(--xp-space-4); }
|
|
77
95
|
@media (prefers-reduced-motion: reduce) {
|
|
78
96
|
.xp-ui-button, .xp-ui-input, .xp-ui-toggle, .xp-ui-toggle::before, .xp-ui-chips-control { transition: none; }
|
|
79
97
|
}
|
|
@@ -90,3 +108,29 @@
|
|
|
90
108
|
|
|
91
109
|
.xp-ui-field-label { display: flex; align-items: center; justify-content: space-between; gap: var(--xp-space-3); }
|
|
92
110
|
.xp-ui-field-label > label { font-weight: 500; }
|
|
111
|
+
|
|
112
|
+
.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; }
|
|
113
|
+
.xp-ui-drawer[open] { display: flex; flex-direction: column; }
|
|
114
|
+
.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); }
|
|
115
|
+
.xp-ui-drawer > .xp-ui-dialog-header h2 { margin: 0; min-width: 0; overflow-wrap: anywhere; font: var(--xp-text-title); }
|
|
116
|
+
.xp-ui-drawer-body { min-height: 0; overflow: auto; overscroll-behavior: contain; flex: 1; background: var(--xp-bg); }
|
|
117
|
+
|
|
118
|
+
.xp-ui-section--blocked { border-color: var(--xp-error-border); }
|
|
119
|
+
.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); }
|
|
120
|
+
.xp-ui-section--complete .xp-ui-section-complete { color: var(--xp-success); }
|
|
121
|
+
.xp-ui-section--complete .xp-ui-section-number { color: var(--xp-success); border-color: var(--xp-success); }
|
|
122
|
+
.xp-ui-section--blocked h2:focus { outline-color: var(--xp-error); }
|
|
123
|
+
|
|
124
|
+
.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%; }
|
|
125
|
+
|
|
126
|
+
/* Actions sit beside each tab visually and outside the tablist's owned roles. */
|
|
127
|
+
.xp-ui-tabbar { display: flex; flex-wrap: wrap; align-items: stretch; gap: 4px; border-bottom: 1px solid var(--xp-border); }
|
|
128
|
+
.xp-ui-tabbar > .xp-ui-tablist { display: contents; }
|
|
129
|
+
|
|
130
|
+
/* One blocker-list format in the admin footer and the Puck sidebar. */
|
|
131
|
+
.xp-readiness__blockers, .xp-readiness__blockers a { color: var(--xp-error); }
|
|
132
|
+
.xp-readiness__blockers ul { margin: 0; padding-inline-start: var(--xp-space-4); }
|
|
133
|
+
.xp-readiness__blockers li { white-space: pre-line; }
|
|
134
|
+
|
|
135
|
+
.xp-other-goals summary { cursor: pointer; font-weight: 600; }
|
|
136
|
+
.xp-other-goal-list { display: grid; gap: var(--xp-space-3); padding-block: var(--xp-space-3); }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@delmaredigital/payload-experiments",
|
|
3
|
-
"version": "0.4.0-rc.
|
|
3
|
+
"version": "0.4.0-rc.10",
|
|
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",
|
|
@@ -100,6 +100,7 @@
|
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
102
|
"dependencies": {
|
|
103
|
+
"@payloadcms/translations": ">=3.90.0 <4",
|
|
103
104
|
"@delmaredigital/experiments-stats": "0.1.0"
|
|
104
105
|
},
|
|
105
106
|
"keywords": [
|
|
@@ -126,7 +127,7 @@
|
|
|
126
127
|
},
|
|
127
128
|
"homepage": "https://delmaredigital.com/developers",
|
|
128
129
|
"devDependencies": {
|
|
129
|
-
"@delmaredigital/payload-puck": "0.
|
|
130
|
+
"@delmaredigital/payload-puck": "0.12.5",
|
|
130
131
|
"payload": "^3.90.2",
|
|
131
132
|
"@payloadcms/db-postgres": "^3.90.2",
|
|
132
133
|
"@payloadcms/ui": "^3.90.2",
|
|
@@ -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,10 +0,0 @@
|
|
|
1
|
-
import type { DocId } from '../../types/contracts.js';
|
|
2
|
-
import type { PreflightResult } from '../../types/endpoints.js';
|
|
3
|
-
import type { ActionGroup } from './actions.model.js';
|
|
4
|
-
export declare function DecideDialog({ id, arms, checks, onClose, apiRoute }: {
|
|
5
|
-
apiRoute: string;
|
|
6
|
-
id: DocId;
|
|
7
|
-
arms: readonly ActionGroup[];
|
|
8
|
-
checks?: PreflightResult['checks'];
|
|
9
|
-
onClose: () => void;
|
|
10
|
-
}): import("react").JSX.Element;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { contentDone } from '../../contentDone.js';
|
|
2
|
-
import { armLabel } from '../labels.js';
|
|
3
|
-
import { ACTIONS_COPY as C, hardCodedLabel, makeContentCopy, releaseCopy } from '../copy/actions.js';
|
|
4
|
-
import { REVIEW_COPY } from '../copy/review.js';
|
|
5
|
-
export function actionGroupLabel(key, storedLabel) {
|
|
6
|
-
return storedLabel?.trim() || armLabel(key);
|
|
7
|
-
}
|
|
8
|
-
export function availableActions({ status, kind, arms, decision, canManage }) {
|
|
9
|
-
if (!canManage) return [];
|
|
10
|
-
const action = (id, label, body, tone = 'secondary', archive, phrase)=>({
|
|
11
|
-
id,
|
|
12
|
-
label,
|
|
13
|
-
tone,
|
|
14
|
-
confirm: {
|
|
15
|
-
title: label,
|
|
16
|
-
body,
|
|
17
|
-
...phrase ? {
|
|
18
|
-
phrase: {
|
|
19
|
-
action: phrase
|
|
20
|
-
}
|
|
21
|
-
} : {}
|
|
22
|
-
},
|
|
23
|
-
...archive ? {
|
|
24
|
-
archive
|
|
25
|
-
} : {}
|
|
26
|
-
});
|
|
27
|
-
const start = action('start', status === 'stopped' ? C.restart : C.start, status === 'stopped' ? C.restartBody : C.startBody, 'primary');
|
|
28
|
-
const decide = action('decide', C.decide, '', 'primary');
|
|
29
|
-
if (status === 'draft') return [
|
|
30
|
-
start
|
|
31
|
-
];
|
|
32
|
-
if (status === 'running') return [
|
|
33
|
-
action('stop', C.stop, C.stopBody, 'danger'),
|
|
34
|
-
decide,
|
|
35
|
-
action('allocate', REVIEW_COPY.raise, REVIEW_COPY.allocationBody),
|
|
36
|
-
action('add-metric', REVIEW_COPY.addMetric, '')
|
|
37
|
-
];
|
|
38
|
-
if (status === 'stopped') return [
|
|
39
|
-
start,
|
|
40
|
-
decide,
|
|
41
|
-
action('archive', C.archive, C.archiveBody, 'secondary', {
|
|
42
|
-
mode: 'stopped'
|
|
43
|
-
})
|
|
44
|
-
];
|
|
45
|
-
if (status !== 'decided') return [];
|
|
46
|
-
const winner = arms.find((group)=>group.key === decision?.winnerArm);
|
|
47
|
-
const label = actionGroupLabel(decision?.winnerArm ?? 'control', winner?.label);
|
|
48
|
-
const rolloutOpen = arms.some((group)=>group.key === 'holdout') && Boolean(decision?.winnerArm) && decision?.winnerArm !== 'control' && !decision?.holdoutReleasedAt;
|
|
49
|
-
return [
|
|
50
|
-
...rolloutOpen ? [
|
|
51
|
-
action('release-holdout', C.release, releaseCopy(label))
|
|
52
|
-
] : [],
|
|
53
|
-
...kind !== 'code' ? [
|
|
54
|
-
action('make-content', C.makeContent, makeContentCopy(label, kind), 'primary')
|
|
55
|
-
] : [],
|
|
56
|
-
...contentDone(decision?.contentReport) ? [
|
|
57
|
-
action('after-content', C.finish, C.finishBody, 'secondary', {
|
|
58
|
-
mode: 'after-content'
|
|
59
|
-
})
|
|
60
|
-
] : [],
|
|
61
|
-
action('discard', C.discard, C.discardBody, 'danger', {
|
|
62
|
-
mode: 'discard'
|
|
63
|
-
}, 'discard'),
|
|
64
|
-
...kind === 'code' ? [
|
|
65
|
-
action('hard-coded', hardCodedLabel(label), hardCodedLabel(label), 'primary', {
|
|
66
|
-
mode: 'hard-coded'
|
|
67
|
-
}, 'hard-coded')
|
|
68
|
-
] : []
|
|
69
|
-
];
|
|
70
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export declare const PAGE_COPY: {
|
|
2
|
-
readonly search: "Search pages by title";
|
|
3
|
-
readonly more: "More";
|
|
4
|
-
readonly loading: "Loading pages…";
|
|
5
|
-
readonly empty: "There are no pages here yet.";
|
|
6
|
-
readonly error: "Couldn't load pages. Try again.";
|
|
7
|
-
readonly retry: "Try again";
|
|
8
|
-
readonly draft: "Draft";
|
|
9
|
-
readonly noPath: "This page has no address yet.";
|
|
10
|
-
readonly choose: "Choose a page";
|
|
11
|
-
readonly change: "Change";
|
|
12
|
-
readonly close: "Close";
|
|
13
|
-
readonly where: "Where it shows";
|
|
14
|
-
readonly open: "Open";
|
|
15
|
-
readonly preview: "Preview";
|
|
16
|
-
readonly contentChecksOff: "Content checks are off for this page type.";
|
|
17
|
-
readonly duplicateStep: "Choose Duplicate from the document's actions. Keep the Original's title on the copy, unless the title is what you're testing.";
|
|
18
|
-
readonly ownAddress: "Give the copy its own address and save it as a draft. Publish it when it's ready; the test can't start until it is.";
|
|
19
|
-
readonly thenChoose: "Then choose the page you made.";
|
|
20
|
-
readonly noPage: "No page chosen yet.";
|
|
21
|
-
};
|
|
22
|
-
export declare const usedPageCopy: (label: string) => string;
|
|
23
|
-
export declare const usedAddressCopy: (label: string, path: string, collection: string) => string;
|
|
24
|
-
export declare const openOriginalCopy: (collection: string) => string;
|
|
25
|
-
export declare const openCollectionCopy: (collection: string) => string;
|
|
26
|
-
export declare const pageStepCopy: (label: string) => string;
|
package/dist/admin/copy/pages.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export const PAGE_COPY = {
|
|
2
|
-
search: 'Search pages by title',
|
|
3
|
-
more: 'More',
|
|
4
|
-
loading: 'Loading pages…',
|
|
5
|
-
empty: 'There are no pages here yet.',
|
|
6
|
-
error: "Couldn't load pages. Try again.",
|
|
7
|
-
retry: 'Try again',
|
|
8
|
-
draft: 'Draft',
|
|
9
|
-
noPath: 'This page has no address yet.',
|
|
10
|
-
choose: 'Choose a page',
|
|
11
|
-
change: 'Change',
|
|
12
|
-
close: 'Close',
|
|
13
|
-
where: 'Where it shows',
|
|
14
|
-
open: 'Open',
|
|
15
|
-
preview: 'Preview',
|
|
16
|
-
contentChecksOff: 'Content checks are off for this page type.',
|
|
17
|
-
duplicateStep: "Choose Duplicate from the document's actions. Keep the Original's title on the copy, unless the title is what you're testing.",
|
|
18
|
-
ownAddress: "Give the copy its own address and save it as a draft. Publish it when it's ready; the test can't start until it is.",
|
|
19
|
-
thenChoose: 'Then choose the page you made.',
|
|
20
|
-
noPage: 'No page chosen yet.'
|
|
21
|
-
};
|
|
22
|
-
export const usedPageCopy = (label)=>`This is ${label}.`;
|
|
23
|
-
export const usedAddressCopy = (label, path, collection)=>`Same address as ${label} (${path}). Change this page's address in ${collection}, publish it, then choose it.`;
|
|
24
|
-
export const openOriginalCopy = (collection)=>`Open the Original in ${collection}.`;
|
|
25
|
-
export const openCollectionCopy = (collection)=>`Open ${collection}`;
|
|
26
|
-
export const pageStepCopy = (label)=>`A page for ${label}`;
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
export const TEST_PAGE = {
|
|
2
|
-
clickPageGroup: "On this test's page",
|
|
3
|
-
clickGoalsNote: "Goals inside linked documents aren't shown. Goals added in code (data-xp-goal) work but aren't listed here.",
|
|
4
|
-
clickGoalHelp: 'A click shows interest, not the result you want.',
|
|
5
|
-
staleEdit: 'Someone else changed this test. Reload to see their changes.',
|
|
6
|
-
reload: 'Reload',
|
|
7
|
-
loading: 'Loading test…',
|
|
8
|
-
forbidden: "You don't have access to this test.",
|
|
9
|
-
missing: 'This test no longer exists.',
|
|
10
|
-
error: "Couldn't load this test.",
|
|
11
|
-
retry: 'Try again',
|
|
12
|
-
name: 'Test name',
|
|
13
|
-
results: 'Results',
|
|
14
|
-
tests: 'Tests',
|
|
15
|
-
test: 'Test',
|
|
16
|
-
navigation: 'Sections',
|
|
17
|
-
completePrefix: 'Complete: ',
|
|
18
|
-
incompletePrefix: 'Incomplete: ',
|
|
19
|
-
complete: 'Complete',
|
|
20
|
-
incomplete: 'Incomplete',
|
|
21
|
-
completeMark: '✓',
|
|
22
|
-
incompleteMark: '○',
|
|
23
|
-
kinds: {
|
|
24
|
-
block: 'Page block',
|
|
25
|
-
page: 'Whole page',
|
|
26
|
-
flag: 'Setting',
|
|
27
|
-
code: 'Setting'
|
|
28
|
-
},
|
|
29
|
-
sections: {
|
|
30
|
-
what: "What you're testing",
|
|
31
|
-
versions: 'Versions',
|
|
32
|
-
win: 'What counts as a win',
|
|
33
|
-
who: 'Who takes part (optional)',
|
|
34
|
-
length: 'How long',
|
|
35
|
-
advanced: 'Advanced settings · for developers'
|
|
36
|
-
},
|
|
37
|
-
hypothesis: 'Why are you testing this? (optional)',
|
|
38
|
-
hypothesisPlaceholder: 'We believe … will … because …',
|
|
39
|
-
notPlaced: 'Not on a page yet. Open a page, add an Experiment block and choose this test.',
|
|
40
|
-
onPage: 'On:',
|
|
41
|
-
openPage: 'Open the page',
|
|
42
|
-
editedOnPage: 'Versions are edited on the page.',
|
|
43
|
-
editOnPage: 'Edit on page',
|
|
44
|
-
empty: 'Empty',
|
|
45
|
-
pageReady: 'Page ready',
|
|
46
|
-
addPageAddress: 'Add a page address',
|
|
47
|
-
ready: 'Content ready',
|
|
48
|
-
emptySlot: 'Nothing in this slot yet',
|
|
49
|
-
pageBinding: 'Each version is a whole page at its own address.',
|
|
50
|
-
pageAddress: 'Page address',
|
|
51
|
-
holdoutContent: 'Sees the Original',
|
|
52
|
-
label: 'Version label',
|
|
53
|
-
weight: 'Share (%)',
|
|
54
|
-
balanceHelp: 'Changing a share balances the other versions so the total stays at 100%.',
|
|
55
|
-
addVersion: 'Add a version',
|
|
56
|
-
addHoldout: 'Add a holdout',
|
|
57
|
-
split: 'Split evenly',
|
|
58
|
-
remove: 'Remove version',
|
|
59
|
-
invalidShare: 'Use a whole number from 0 to 100.',
|
|
60
|
-
holdoutPrefix: 'Holdout: ',
|
|
61
|
-
allocation: 'How many people take part',
|
|
62
|
-
traffic: 'How people are split',
|
|
63
|
-
goal: 'Goal',
|
|
64
|
-
goalHelp: 'The goal decides whether a version wins. Pick the one thing you want more of.',
|
|
65
|
-
guardrails: 'Must not get worse (optional)',
|
|
66
|
-
guardrailHelp: "If a version makes one of these worse, you'll be warned.",
|
|
67
|
-
secondary: 'Also keep an eye on (optional)',
|
|
68
|
-
manageGoals: 'Manage goals',
|
|
69
|
-
searchGoals: 'Search goals',
|
|
70
|
-
chooseGoal: 'Choose a goal',
|
|
71
|
-
goalsError: "Couldn't load goals. Try again.",
|
|
72
|
-
noGoal: 'None selected',
|
|
73
|
-
missingGoal: 'A goal that no longer exists',
|
|
74
|
-
goalUnavailable: 'Goal details unavailable',
|
|
75
|
-
everyone: 'Everyone on the pages where this appears.',
|
|
76
|
-
rulesSummary: 'Only people matching these rules.',
|
|
77
|
-
addRule: 'Add a rule',
|
|
78
|
-
removeRule: 'Remove rule',
|
|
79
|
-
blockPathRule: 'This rule no longer applies to page block tests; remove it.',
|
|
80
|
-
attribute: 'Attribute',
|
|
81
|
-
comparison: 'Comparison',
|
|
82
|
-
value: 'Value',
|
|
83
|
-
yes: 'Yes',
|
|
84
|
-
no: 'No',
|
|
85
|
-
reach: 'About how many people will see this per day?',
|
|
86
|
-
reachHelp: 'A rough number is fine. It only sets the suggested length.',
|
|
87
|
-
duration: 'Planned length (days)',
|
|
88
|
-
noSuggestion: 'Enter a daily number above to get a suggestion. 4 weeks is a safe default.',
|
|
89
|
-
chooseGoalSuggestion: 'Choose a goal to get a suggestion.',
|
|
90
|
-
required: '(required)',
|
|
91
|
-
apply: 'Apply',
|
|
92
|
-
infeasible: 'This may need more people than are available.'
|
|
93
|
-
};
|
|
94
|
-
export const suggestedWeeks = (weeks)=>`Suggested: about ${Math.round(weeks * 10) / 10} weeks`;
|
|
95
|
-
export const weeksHint = (days)=>`About ${Math.round(days / 7 * 10) / 10} weeks`;
|
|
96
|
-
export const NUMBER_COMPARISONS = {
|
|
97
|
-
eq: 'is',
|
|
98
|
-
neq: 'is not',
|
|
99
|
-
gt: 'is more than',
|
|
100
|
-
gte: 'is at least',
|
|
101
|
-
lt: 'is less than',
|
|
102
|
-
lte: 'is at most'
|
|
103
|
-
};
|
|
104
|
-
export const placementCount = (count)=>` (placed ${count} times)`;
|
|
@@ -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); }
|
package/dist/admin/styles.css
DELETED
|
@@ -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); }
|
package/dist/admin/styles.d.ts
DELETED
package/dist/admin/styles.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { TEST_PAGE as C } from '../../copy/testPage.js';
|
|
2
|
-
export function placementLine(placement) {
|
|
3
|
-
return `${C.onPage} ${placement.title} (${placement.detail === 'Published' ? 'Published' : 'Draft'})`;
|
|
4
|
-
}
|
|
5
|
-
export function slotReady(placement, arm) {
|
|
6
|
-
const slot = arm.kind === 'holdout' ? 'control' : arm.slot;
|
|
7
|
-
return Boolean(slot && (placement.slots?.[slot] ?? 0) > 0);
|
|
8
|
-
}
|