@delmaredigital/payload-experiments 0.4.0-rc.1 → 0.4.0-rc.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +284 -772
- package/dist/admin/LayerUsage.js +1 -1
- package/dist/admin/MetricSourceSelect.js +12 -5
- 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 +21 -9
- package/dist/admin/copy/goals.js +28 -11
- package/dist/admin/copy/newTest.d.ts +7 -7
- package/dist/admin/copy/newTest.js +10 -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.d.ts +4 -2
- package/dist/admin/surface/SurfaceShell.js +29 -4
- package/dist/admin/surface/TestRowMenu.d.ts +13 -0
- package/dist/admin/surface/TestRowMenu.js +163 -0
- package/dist/admin/surface/TestsHome.d.ts +5 -3
- package/dist/admin/surface/TestsHome.js +273 -58
- package/dist/admin/surface/TestsSurface.js +8 -7
- package/dist/admin/surface/goals/DeleteGoalDialog.d.ts +7 -0
- package/dist/admin/surface/goals/DeleteGoalDialog.js +42 -0
- package/dist/admin/surface/goals/GoalForm.d.ts +2 -1
- package/dist/admin/surface/goals/GoalForm.js +342 -212
- package/dist/admin/surface/goals/GoalsList.d.ts +1 -1
- package/dist/admin/surface/goals/GoalsList.js +107 -37
- package/dist/admin/surface/goals/data.d.ts +2 -0
- package/dist/admin/surface/goals/data.js +11 -2
- package/dist/admin/surface/goals/goals.css +9 -1
- package/dist/admin/surface/goals/goals.model.d.ts +12 -2
- package/dist/admin/surface/goals/goals.model.js +39 -1
- package/dist/admin/surface/home.model.d.ts +10 -8
- package/dist/admin/surface/home.model.js +27 -22
- package/dist/admin/surface/newTest/NewTest.d.ts +4 -4
- package/dist/admin/surface/newTest/NewTest.js +149 -118
- package/dist/admin/surface/newTest/PageWizard.d.ts +5 -2
- package/dist/admin/surface/newTest/PageWizard.js +115 -80
- package/dist/admin/surface/newTest/newTest.css +28 -9
- package/dist/admin/surface/results/ResultsHeader.d.ts +3 -3
- package/dist/admin/surface/results/ResultsHeader.js +115 -83
- package/dist/admin/surface/surface.css +29 -0
- package/dist/admin/surface/test/TestPage.d.ts +1 -2
- package/dist/admin/surface/test/TestPage.js +44 -152
- package/dist/admin/surface/useXpStepNav.d.ts +11 -0
- package/dist/admin/surface/useXpStepNav.js +14 -0
- 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 +35 -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/createExperimentBlock.js +1 -1
- package/dist/blocks/formState.js +2 -2
- 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 +28 -9
- package/dist/collections/metricsGuards.js +2 -0
- package/dist/collections/serialize.js +8 -6
- 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 +2 -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/sourceLabel.d.ts +2 -0
- package/dist/goals/sourceLabel.js +4 -0
- 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 +70 -21
- 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.d.ts +2 -1
- package/dist/puck/editor/ExperimentSlotEditor.js +1007 -182
- 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 +72 -0
- package/dist/puck/editor/ResultsReadout.d.ts +4 -1
- package/dist/puck/editor/ResultsReadout.js +35 -19
- package/dist/puck/editor/VersionBuilder.d.ts +67 -12
- package/dist/puck/editor/VersionBuilder.js +560 -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 +65 -20
- package/dist/puck/editor/copy.js +73 -21
- package/dist/puck/editor/createTest.d.ts +3 -0
- package/dist/puck/editor/createTest.js +33 -0
- package/dist/puck/editor/editor.chrome.css +200 -20
- package/dist/puck/editor/editor.css +338 -25
- 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 +2 -2
- package/dist/puck/slotConfig.js +18 -5
- 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/analyse.d.ts +2 -0
- package/dist/results/analyse.js +2 -2
- 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.d.ts +1 -1
- package/dist/results/verdict.js +9 -7
- 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 +54 -15
- 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.d.ts +2 -1
- package/dist/{admin → testSurface}/PreviewLinks.js +9 -5
- package/dist/testSurface/actions/DecideDialog.d.ts +17 -0
- package/dist/testSurface/actions/DecideDialog.js +222 -0
- package/dist/testSurface/actions/LifecycleAction.d.ts +17 -0
- package/dist/testSurface/actions/LifecycleAction.js +107 -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 +123 -0
- package/dist/{admin → testSurface}/actions/decide.model.d.ts +1 -0
- package/dist/{admin → testSurface}/actions/decide.model.js +1 -0
- package/dist/{admin → testSurface}/allocation.model.js +6 -3
- 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 +37 -14
- package/dist/{admin → testSurface}/copy/actions.js +40 -17
- package/dist/{admin → testSurface}/copy/advanced.d.ts +10 -0
- package/dist/{admin → testSurface}/copy/advanced.js +10 -0
- package/dist/{admin → testSurface}/copy/arms.d.ts +1 -1
- package/dist/{admin → testSurface}/copy/arms.js +1 -1
- package/dist/{admin → testSurface}/copy/audience.d.ts +4 -3
- package/dist/{admin → testSurface}/copy/audience.js +5 -4
- package/dist/{admin → testSurface}/copy/common.d.ts +15 -6
- package/dist/{admin → testSurface}/copy/common.js +20 -10
- 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 +7 -0
- package/dist/testSurface/copy/metrics.js +18 -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 +40 -6
- package/dist/{admin → testSurface}/copy/readiness.js +54 -9
- package/dist/{admin → testSurface}/copy/recommendation.d.ts +4 -4
- package/dist/{admin → testSurface}/copy/recommendation.js +4 -4
- package/dist/{admin → testSurface}/copy/results.d.ts +19 -12
- package/dist/{admin → testSurface}/copy/results.js +21 -12
- package/dist/testSurface/copy/review.d.ts +20 -0
- package/dist/testSurface/copy/review.js +21 -0
- package/dist/{admin → testSurface}/copy/setting.d.ts +1 -2
- package/dist/{admin → testSurface}/copy/setting.js +1 -2
- package/dist/{admin → testSurface}/copy/surface.d.ts +11 -2
- package/dist/{admin → testSurface}/copy/surface.js +14 -11
- package/dist/{admin → testSurface}/copy/testPage.d.ts +61 -12
- package/dist/testSurface/copy/testPage.js +168 -0
- package/dist/testSurface/format/adminURL.d.ts +7 -0
- package/dist/testSurface/format/adminURL.js +9 -0
- package/dist/{admin → testSurface}/format/date.d.ts +1 -0
- package/dist/testSurface/format/date.js +21 -0
- package/dist/{admin → testSurface}/labels.d.ts +1 -2
- package/dist/{admin → testSurface}/labels.js +2 -3
- package/dist/{admin → testSurface}/lockedNotice.model.d.ts +2 -0
- package/dist/{admin → testSurface}/lockedNotice.model.js +31 -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.d.ts +3 -2
- package/dist/{admin → testSurface}/results/results.model.js +16 -11
- 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/testSurface/surface/pageBlock/parts.js +107 -0
- 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 +498 -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 +9 -5
- package/dist/testSurface/surface/readiness/ActionDialogs.js +372 -0
- package/dist/{admin → testSurface}/surface/readiness/Banner.d.ts +4 -3
- package/dist/testSurface/surface/readiness/Banner.js +198 -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 +13 -0
- package/dist/testSurface/surface/readiness/SaveStatus.js +67 -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 +11 -4
- package/dist/{admin → testSurface}/surface/results/ResultsBody.js +207 -104
- package/dist/{admin → testSurface}/surface/results/recommendation.model.js +3 -3
- 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 +89 -46
- package/dist/testSurface/surface/setting/setting.css +18 -0
- package/dist/{admin → testSurface}/surface/test/AdvancedSection.js +12 -4
- 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 +119 -89
- package/dist/testSurface/surface/test/LengthSection.d.ts +2 -0
- package/dist/{admin → testSurface}/surface/test/LengthSection.js +25 -14
- package/dist/{admin → testSurface}/surface/test/PageHoldout.d.ts +1 -1
- package/dist/{admin → testSurface}/surface/test/PageHoldout.js +11 -8
- package/dist/{admin → testSurface}/surface/test/Rail.js +7 -4
- package/dist/{admin → testSurface}/surface/test/ReadinessBar.d.ts +2 -1
- package/dist/{admin → testSurface}/surface/test/ReadinessBar.js +4 -11
- package/dist/{admin → testSurface}/surface/test/Section.d.ts +3 -1
- package/dist/testSurface/surface/test/Section.js +88 -0
- package/dist/{admin → testSurface}/surface/test/TargetingSection.js +87 -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/testSurface/surface/test/VersionsSection.js +301 -0
- package/dist/{admin → testSurface}/surface/test/fields.d.ts +33 -9
- package/dist/testSurface/surface/test/fields.js +300 -0
- package/dist/{admin → testSurface}/surface/test/pageParts.js +30 -44
- package/dist/testSurface/surface/test/testPage.css +111 -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 +8 -0
- package/dist/testSurface/surfaceUrls.js +23 -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 +141 -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 +6 -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 +50 -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/DecideDialog.js +0 -190
- package/dist/admin/actions/actions.model.js +0 -70
- package/dist/admin/copy/metrics.js +0 -9
- package/dist/admin/copy/pages.d.ts +0 -26
- package/dist/admin/copy/pages.js +0 -26
- package/dist/admin/copy/review.d.ts +0 -17
- package/dist/admin/copy/review.js +0 -17
- package/dist/admin/copy/testPage.js +0 -104
- package/dist/admin/format/date.js +0 -10
- 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/pageBlock/parts.js +0 -69
- 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/VersionsSection.js +0 -247
- 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}/allocation.model.d.ts +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}/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/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/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/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
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
--xp-space-3: 12px;
|
|
56
56
|
--xp-space-4: 16px;
|
|
57
57
|
--xp-space-5: 20px;
|
|
58
|
+
--xp-field-gap: calc((20 / 13) * 1rem);
|
|
58
59
|
--xp-space-6: 24px;
|
|
59
60
|
--xp-space-7: 28px;
|
|
60
61
|
--xp-space-8: 32px;
|
|
@@ -141,6 +142,7 @@
|
|
|
141
142
|
--xp-space-3: 12px;
|
|
142
143
|
--xp-space-4: 16px;
|
|
143
144
|
--xp-space-5: 20px;
|
|
145
|
+
--xp-field-gap: calc((20 / 13) * 1rem);
|
|
144
146
|
--xp-space-6: 24px;
|
|
145
147
|
--xp-space-7: 28px;
|
|
146
148
|
--xp-space-8: 32px;
|
|
@@ -170,6 +172,92 @@
|
|
|
170
172
|
--xp-font-size-body: 15px;
|
|
171
173
|
}
|
|
172
174
|
|
|
175
|
+
[class*="_PuckFields"] .xp-slot-root {
|
|
176
|
+
--xp-bg: rgb(245, 245, 245);
|
|
177
|
+
--xp-surface: rgb(255, 255, 255);
|
|
178
|
+
--xp-surface-2: rgb(235, 235, 235);
|
|
179
|
+
--xp-surface-3: rgb(221, 221, 221);
|
|
180
|
+
--xp-border: rgb(235, 235, 235);
|
|
181
|
+
--xp-border-strong: rgb(195, 195, 195);
|
|
182
|
+
--xp-text: rgb(34, 34, 34);
|
|
183
|
+
--xp-text-2: rgb(87, 87, 87);
|
|
184
|
+
--xp-text-3: rgb(141, 141, 141);
|
|
185
|
+
--xp-accent: rgb(47, 47, 47);
|
|
186
|
+
--xp-accent-hover: rgb(20, 20, 20);
|
|
187
|
+
--xp-accent-active: rgb(7, 7, 7);
|
|
188
|
+
--xp-accent-subtle: rgb(208, 208, 208);
|
|
189
|
+
--xp-accent-fg: rgb(255, 255, 255);
|
|
190
|
+
--xp-accent-text: rgb(34, 34, 34);
|
|
191
|
+
--xp-accent-text-decoration: none;
|
|
192
|
+
--xp-focus: rgb(47, 47, 47);
|
|
193
|
+
--xp-series-muted: rgb(181, 181, 181);
|
|
194
|
+
--xp-success: #1a6a3a;
|
|
195
|
+
--xp-success-bg: #e8f4ec;
|
|
196
|
+
--xp-success-border: #bddfc9;
|
|
197
|
+
--xp-warning: #8a5a0b;
|
|
198
|
+
--xp-warning-bg: #fbf3e1;
|
|
199
|
+
--xp-warning-border: #ecd6a2;
|
|
200
|
+
--xp-error: #a63030;
|
|
201
|
+
--xp-error-bg: #fbeaea;
|
|
202
|
+
--xp-error-border: #efc3c3;
|
|
203
|
+
--xp-series-a: #2a78d6;
|
|
204
|
+
--xp-series-b: #eb6834;
|
|
205
|
+
--xp-series-c: #8056b3;
|
|
206
|
+
--xp-radius-control: 8px;
|
|
207
|
+
--xp-radius-card: 12px;
|
|
208
|
+
--xp-radius-chip: 6px;
|
|
209
|
+
--xp-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
210
|
+
--xp-mono: 'SF Mono', Menlo, Consolas, Monaco, monospace;
|
|
211
|
+
--xp-text-display: 600 28px/32px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
212
|
+
--xp-text-title: 600 20px/28px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
213
|
+
--xp-text-body: 400 15px/22px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
214
|
+
--xp-text-small: 400 13px/18px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
215
|
+
--xp-motion: 120ms;
|
|
216
|
+
--xp-space-half: 2px;
|
|
217
|
+
--xp-space-one-half: 6px;
|
|
218
|
+
--xp-version-share-width: 96px;
|
|
219
|
+
--xp-version-share-width-mobile: 84px;
|
|
220
|
+
--xp-version-state-width: 192px;
|
|
221
|
+
--xp-version-remove-width: 128px;
|
|
222
|
+
--xp-targeting-attribute-width: 150px;
|
|
223
|
+
--xp-targeting-comparison-width: 140px;
|
|
224
|
+
--xp-legend-key-size: 10px;
|
|
225
|
+
--xp-legend-key-radius: 3px;
|
|
226
|
+
--xp-space-1: 4px;
|
|
227
|
+
--xp-space-2: 8px;
|
|
228
|
+
--xp-space-3: 12px;
|
|
229
|
+
--xp-space-4: 16px;
|
|
230
|
+
--xp-space-5: 20px;
|
|
231
|
+
--xp-field-gap: calc((20 / 13) * 1rem);
|
|
232
|
+
--xp-space-6: 24px;
|
|
233
|
+
--xp-space-7: 28px;
|
|
234
|
+
--xp-space-8: 32px;
|
|
235
|
+
--xp-surface-raised: rgb(235, 235, 235);
|
|
236
|
+
--xp-border-control: rgb(195, 195, 195);
|
|
237
|
+
--xp-input-border: rgb(181, 181, 181);
|
|
238
|
+
--xp-border-accent: rgb(154, 154, 154);
|
|
239
|
+
--xp-text-muted: rgb(87, 87, 87);
|
|
240
|
+
--xp-text-strong: rgb(34, 34, 34);
|
|
241
|
+
--xp-text-emphasis: rgb(34, 34, 34);
|
|
242
|
+
--xp-input-bg: rgb(255, 255, 255);
|
|
243
|
+
--xp-overlay: rgba(5, 5, 5, 0.5);
|
|
244
|
+
--xp-success-surface: #e8f4ec;
|
|
245
|
+
--xp-success-text: #1a6a3a;
|
|
246
|
+
--xp-success-text-strong: #1a6a3a;
|
|
247
|
+
--xp-warning-surface: #fbf3e1;
|
|
248
|
+
--xp-warning-text: #8a5a0b;
|
|
249
|
+
--xp-warning-text-strong: #8a5a0b;
|
|
250
|
+
--xp-error-surface: #fbeaea;
|
|
251
|
+
--xp-error-text: #a63030;
|
|
252
|
+
--xp-radius: 8px;
|
|
253
|
+
--xp-radius-large: 12px;
|
|
254
|
+
--xp-dash-card-gap: 12px;
|
|
255
|
+
--xp-dash-card-gap-small: 8px;
|
|
256
|
+
--xp-font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
257
|
+
--xp-font-size-small: 13px;
|
|
258
|
+
--xp-font-size-body: 15px;
|
|
259
|
+
}
|
|
260
|
+
|
|
173
261
|
/* Shared primitives: no host palette references, and no global element resets. */
|
|
174
262
|
.xp-ui-chips, .xp-ui-chips-control, .xp-ui-chips-item, .xp-ui-button, .xp-ui-input, .xp-ui-toggle, .xp-ui-tab, .xp-ui-dialog, .xp-ui-card { box-sizing: border-box; }
|
|
175
263
|
.xp-ui-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 7px 14px; border-radius: var(--xp-radius-control); border: 1px solid transparent; font: 500 14px/20px var(--xp-font); color: var(--xp-text); background: transparent; cursor: pointer; white-space: normal; overflow-wrap: anywhere; max-width: 100%; min-width: 0; text-decoration: none; transition: background-color var(--xp-motion), border-color var(--xp-motion), color var(--xp-motion); }
|
|
@@ -185,7 +273,7 @@
|
|
|
185
273
|
.xp-ui-button--sm { height: 30px; padding: 0 10px; font-size: 13px; }
|
|
186
274
|
.xp-ui-button--link { height: auto; min-height: 0; padding-inline: 0; color: var(--xp-accent-text); text-decoration: var(--xp-accent-text-decoration); }
|
|
187
275
|
.xp-ui-button--link:hover { text-decoration: underline; }
|
|
188
|
-
.xp-ui-button:disabled, .xp-ui-button[aria-disabled='true'], .xp-ui-input:disabled, .xp-ui-toggle:disabled { opacity: .5; cursor: not-allowed; }
|
|
276
|
+
.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; }
|
|
189
277
|
.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; }
|
|
190
278
|
.xp-ui-field { min-width: 0; max-width: 100%; display: grid; gap: 6px; color: var(--xp-text); font: var(--xp-text-body); }
|
|
191
279
|
.xp-ui-field > label { font-weight: 500; }
|
|
@@ -193,8 +281,19 @@
|
|
|
193
281
|
.xp-ui-input::placeholder { color: var(--xp-text-3); }
|
|
194
282
|
.xp-ui-input:hover { border-color: var(--xp-text-3); }
|
|
195
283
|
.xp-ui-input[aria-invalid='true'] { border-color: var(--xp-error); }
|
|
196
|
-
.xp-ui-input--number { text-align:
|
|
197
|
-
|
|
284
|
+
.xp-ui-input--number { text-align: end; font-variant-numeric: tabular-nums; }
|
|
285
|
+
/* The open menu inherits the control's tokens, even in a dialog or canvas iframe. */
|
|
286
|
+
.xp-ui-combobox-wrap { display: block; position: relative; min-width: 0; max-width: 100%; }
|
|
287
|
+
.xp-ui-combobox { display: flex; align-items: center; justify-content: space-between; gap: var(--xp-space-2); cursor: pointer; text-align: start; }
|
|
288
|
+
.xp-ui-combobox > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
289
|
+
.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); }
|
|
290
|
+
.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; }
|
|
291
|
+
.xp-ui-combobox-popup:popover-open { display: block; }
|
|
292
|
+
.xp-ui-combobox-option { padding: var(--xp-space-2); border-radius: var(--xp-space-1); cursor: pointer; overflow-wrap: anywhere; }
|
|
293
|
+
.xp-ui-combobox-option[data-active='true'] { background: var(--xp-surface-3); outline: 1px solid var(--xp-border-strong); outline-offset: -1px; }
|
|
294
|
+
.xp-ui-combobox-option[aria-disabled='true'] { color: var(--xp-text-3); cursor: not-allowed; }
|
|
295
|
+
.xp-ui-combobox-group { padding: var(--xp-space-2); color: var(--xp-text-2); font: var(--xp-text-small); }
|
|
296
|
+
.xp-ui-combobox-validation { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
|
|
198
297
|
.xp-ui-help { margin: 0; color: var(--xp-text-2); font: var(--xp-text-small); }
|
|
199
298
|
.xp-ui-error { margin: 0; color: var(--xp-error); font: var(--xp-text-small); }
|
|
200
299
|
.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); }
|
|
@@ -210,7 +309,7 @@
|
|
|
210
309
|
.xp-ui-section-body { padding: 20px; }
|
|
211
310
|
.xp-ui-tabs { color: var(--xp-text); font: var(--xp-text-body); }
|
|
212
311
|
.xp-ui-tablist { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--xp-border); }
|
|
213
|
-
.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; }
|
|
312
|
+
.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; }
|
|
214
313
|
.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; }
|
|
215
314
|
.xp-ui-tab:disabled { opacity: .5; cursor: not-allowed; }
|
|
216
315
|
.xp-ui-tabpanel { padding-block: 16px; }
|
|
@@ -230,7 +329,8 @@
|
|
|
230
329
|
.xp-ui-breadcrumb a:hover { color: var(--xp-text); }
|
|
231
330
|
.xp-ui-breadcrumb [aria-current] { color: var(--xp-text); }
|
|
232
331
|
.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); }
|
|
233
|
-
.xp-ui-dialog h2 { margin: 0 0 16px; font: var(--xp-text-title); }
|
|
332
|
+
.xp-ui-dialog h2 { margin: 0 0 16px; font: var(--xp-text-title); overflow-wrap: anywhere; }
|
|
333
|
+
.xp-ui-dialog > [id]:has(+ :is(.xp-ui-field, .xp-ui-banner)), .xp-ui-dialog > .xp-ui-banner:has(+ .xp-ui-field) { margin-block-end: var(--xp-space-4); }
|
|
234
334
|
.xp-ui-dialog::backdrop { background: var(--xp-overlay); }
|
|
235
335
|
.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); }
|
|
236
336
|
.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); }
|
|
@@ -246,6 +346,13 @@
|
|
|
246
346
|
.xp-ui-chips p:not(.xp-ui-error) { margin: 0; color: var(--xp-text-muted); font-size: var(--xp-font-size-small); }
|
|
247
347
|
/* Quiet actions and breadcrumb links stay neutral; only the selected tab takes the text accent. */
|
|
248
348
|
.xp-ui-button-group { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; max-width: 100%; }
|
|
349
|
+
.xp-ui-confirm-actions { justify-content: flex-end; gap: var(--xp-space-2); margin-block-start: var(--xp-space-4); }
|
|
350
|
+
.xp-lifecycle-action { display: inline-flex; flex-direction: column; align-items: flex-start; gap: var(--xp-space-1); min-width: 0; }
|
|
351
|
+
.xp-lifecycle-action > .xp-ui-help { margin: 0; max-width: 24ch; }
|
|
352
|
+
.xp-ui-inline-row { display: flex; flex-wrap: wrap; align-items: end; gap: var(--xp-space-3); min-width: 0; }
|
|
353
|
+
.xp-ui-inline-row > .xp-ui-field { flex: 1 1 auto; min-width: 0; }
|
|
354
|
+
.xp-ui-inline-row > .xp-ui-button { flex: 0 0 auto; }
|
|
355
|
+
.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); }
|
|
249
356
|
@media (prefers-reduced-motion: reduce) {
|
|
250
357
|
.xp-ui-button, .xp-ui-input, .xp-ui-toggle, .xp-ui-toggle::before, .xp-ui-chips-control { transition: none; }
|
|
251
358
|
}
|
|
@@ -263,6 +370,32 @@
|
|
|
263
370
|
.xp-ui-field-label { display: flex; align-items: center; justify-content: space-between; gap: var(--xp-space-3); }
|
|
264
371
|
.xp-ui-field-label > label { font-weight: 500; }
|
|
265
372
|
|
|
373
|
+
.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; }
|
|
374
|
+
.xp-ui-drawer[open] { display: flex; flex-direction: column; }
|
|
375
|
+
.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); }
|
|
376
|
+
.xp-ui-drawer > .xp-ui-dialog-header h2 { margin: 0; min-width: 0; overflow-wrap: anywhere; font: var(--xp-text-title); }
|
|
377
|
+
.xp-ui-drawer-body { min-height: 0; overflow: auto; overscroll-behavior: contain; flex: 1; background: var(--xp-bg); }
|
|
378
|
+
|
|
379
|
+
.xp-ui-section--blocked { border-color: var(--xp-error-border); }
|
|
380
|
+
.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); }
|
|
381
|
+
.xp-ui-section--complete .xp-ui-section-complete { color: var(--xp-success); }
|
|
382
|
+
.xp-ui-section--complete .xp-ui-section-number { color: var(--xp-success); border-color: var(--xp-success); }
|
|
383
|
+
.xp-ui-section--blocked h2:focus { outline-color: var(--xp-error); }
|
|
384
|
+
|
|
385
|
+
.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%; }
|
|
386
|
+
|
|
387
|
+
/* Actions sit beside each tab visually and outside the tablist's owned roles. */
|
|
388
|
+
.xp-ui-tabbar { display: flex; flex-wrap: wrap; align-items: stretch; gap: 4px; border-bottom: 1px solid var(--xp-border); }
|
|
389
|
+
.xp-ui-tabbar > .xp-ui-tablist { display: contents; }
|
|
390
|
+
|
|
391
|
+
/* One blocker-list format in the admin footer and the Puck sidebar. */
|
|
392
|
+
.xp-readiness__blockers, .xp-readiness__blockers a { color: var(--xp-error); }
|
|
393
|
+
.xp-readiness__blockers ul { margin: 0; padding-inline-start: var(--xp-space-4); }
|
|
394
|
+
.xp-readiness__blockers li { white-space: pre-line; }
|
|
395
|
+
|
|
396
|
+
.xp-other-goals summary { cursor: pointer; font-weight: 600; }
|
|
397
|
+
.xp-other-goal-list { display: grid; gap: var(--xp-space-3); padding-block: var(--xp-space-3); }
|
|
398
|
+
|
|
266
399
|
/* Shared UI controls are assembled into editor.css for the isolated canvas. */
|
|
267
400
|
.xp-slot-editor {
|
|
268
401
|
min-width: 0;
|
|
@@ -283,9 +416,20 @@
|
|
|
283
416
|
|
|
284
417
|
.xp-slot-header {
|
|
285
418
|
display: flex;
|
|
286
|
-
flex-wrap:
|
|
419
|
+
flex-wrap: nowrap;
|
|
287
420
|
align-items: center;
|
|
288
421
|
gap: var(--xp-space-2);
|
|
422
|
+
cursor: pointer;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.xp-slot-chrome[data-selected='true'] {
|
|
426
|
+
border-color: var(--xp-focus);
|
|
427
|
+
box-shadow: inset 0 0 0 2px var(--xp-focus);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.xp-slot-header:focus-visible {
|
|
431
|
+
outline: 2px solid var(--xp-focus);
|
|
432
|
+
outline-offset: 2px;
|
|
289
433
|
}
|
|
290
434
|
|
|
291
435
|
.xp-slot-title {
|
|
@@ -293,7 +437,11 @@
|
|
|
293
437
|
color: var(--xp-text);
|
|
294
438
|
font: inherit;
|
|
295
439
|
font-weight: 600;
|
|
296
|
-
|
|
440
|
+
min-width: 0;
|
|
441
|
+
flex: 1;
|
|
442
|
+
white-space: nowrap;
|
|
443
|
+
overflow: hidden;
|
|
444
|
+
text-overflow: ellipsis;
|
|
297
445
|
}
|
|
298
446
|
|
|
299
447
|
.xp-slot-editor > .xp-ui-tabs > .xp-ui-tabs-header {
|
|
@@ -348,13 +496,6 @@
|
|
|
348
496
|
gap: var(--xp-space-4);
|
|
349
497
|
}
|
|
350
498
|
|
|
351
|
-
.xp-slot-confirm {
|
|
352
|
-
padding: var(--xp-space-2) var(--xp-space-3);
|
|
353
|
-
border: 1px solid var(--xp-warning);
|
|
354
|
-
border-radius: var(--xp-radius);
|
|
355
|
-
background: var(--xp-warning-surface);
|
|
356
|
-
}
|
|
357
|
-
|
|
358
499
|
/* Tailwind's preflight runs before these controls in the canvas document. */
|
|
359
500
|
.xp-slot-editor .xp-ui-button,
|
|
360
501
|
.xp-slot-editor .xp-ui-tab,
|
|
@@ -368,20 +509,192 @@
|
|
|
368
509
|
}
|
|
369
510
|
|
|
370
511
|
.xp-slot-editor .xp-ui-tabs-header { display: flex; flex-wrap: wrap; align-items: stretch; }
|
|
371
|
-
.xp-slot-version-actions { display: contents; }
|
|
372
|
-
.xp-slot-version-anchor { position: relative; display: flex; align-items: center; border-bottom: 1px solid var(--xp-border); }
|
|
373
|
-
.xp-slot-version-rename { flex: 1 0 100%; min-width: 0; padding-top: var(--xp-space-2); }
|
|
374
|
-
.xp-slot-version-menu {
|
|
375
|
-
position: absolute; top: 100%; inset-inline-end: 0; z-index: 5;
|
|
376
|
-
display: grid; min-width: 180px; padding: var(--xp-space-2);
|
|
377
|
-
box-shadow: 0 8px 24px var(--xp-overlay);
|
|
378
|
-
background: var(--xp-surface); border: 1px solid var(--xp-border); border-radius: var(--xp-radius);
|
|
379
|
-
}
|
|
380
|
-
.xp-slot-version-menu .xp-ui-button { justify-content: start; }
|
|
381
512
|
.xp-slot-weight-inputs, .xp-slot-people { display: flex; flex-wrap: wrap; gap: var(--xp-space-3); }
|
|
382
513
|
.xp-slot-weight-inputs { align-items: flex-start; }
|
|
383
514
|
.xp-slot-weight-inputs .xp-ui-field { flex: 1 1 120px; max-width: 200px; }
|
|
384
515
|
.xp-slot-readout { display: grid; gap: var(--xp-space-2); }
|
|
385
|
-
.xp-slot-readout
|
|
516
|
+
.xp-slot-readout-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: start; gap: var(--xp-space-2); }
|
|
517
|
+
.xp-slot-readout-status { grid-column: 2; padding-block: var(--xp-space-2); font: var(--xp-text-small); }
|
|
518
|
+
.xp-slot-readout-refresh { grid-column: 3; }
|
|
519
|
+
.xp-slot-more { grid-column: 1; min-width: 0; }
|
|
520
|
+
.xp-slot-more > button { gap: var(--xp-space-2); }
|
|
521
|
+
.xp-slot-more > button[aria-expanded='true'] svg { transform: rotate(180deg); }
|
|
522
|
+
.xp-slot-more > div > button { white-space: normal; }
|
|
523
|
+
.xp-slot-lock-detail { margin: var(--xp-space-2) 0 0; }
|
|
386
524
|
.xp-slot-editor .xp-ui-tablist { flex: 1 1 auto; min-width: 0; flex-wrap: wrap; }
|
|
387
525
|
.xp-slot-root.xp-puck-field { display: grid; gap: var(--xp-space-3); min-width: 0; }
|
|
526
|
+
|
|
527
|
+
/* Puck's inline field sidebar stays light, including under Payload's dark-mode text overrides. */
|
|
528
|
+
[class*="_PuckFields"] .xp-slot-root .xp-ui-button--secondary { color: var(--xp-text); }
|
|
529
|
+
[class*="_PuckFields"] .xp-slot-root .xp-ui-button--primary { color: var(--xp-accent-fg); }
|
|
530
|
+
[class*="_PuckFields"] .xp-slot-root .xp-ui-button--danger { color: var(--xp-error); }
|
|
531
|
+
[class*="_PuckFields"] .xp-slot-root .xp-ui-error { color: var(--xp-error); }
|
|
532
|
+
[class*="_PuckFields"] .xp-slot-root .xp-ui-help { color: var(--xp-text-2); }
|
|
533
|
+
[class*="_PuckFields"] .xp-slot-root .xp-ui-field label { color: var(--xp-text); }
|
|
534
|
+
/* Native popovers keep this ancestry in the top layer. The fallback portals to
|
|
535
|
+
the nearest open dialog or owner-document body, copying the trigger's --xp-*
|
|
536
|
+
tokens; outside the field subtree, shared ui.css supplies the menu colors. */
|
|
537
|
+
[class*="_PuckFields"] .xp-slot-root .xp-ui-combobox { color: var(--xp-text); background: var(--xp-surface); border-color: var(--xp-border-strong); }
|
|
538
|
+
[class*="_PuckFields"] .xp-slot-root .xp-ui-combobox:hover { border-color: var(--xp-text-3); }
|
|
539
|
+
[class*="_PuckFields"] .xp-slot-root .xp-ui-combobox:focus-visible { outline: 2px solid var(--xp-focus); }
|
|
540
|
+
[class*="_PuckFields"] .xp-slot-root .xp-ui-combobox[aria-invalid='true'] { border-color: var(--xp-error); }
|
|
541
|
+
[class*="_PuckFields"] .xp-slot-root .xp-ui-combobox:disabled { opacity: 1; color: var(--xp-text-2); background: var(--xp-surface-3); border-color: var(--xp-border-strong); }
|
|
542
|
+
[class*="_PuckFields"] .xp-slot-root .xp-ui-combobox > span:first-child { color: inherit; }
|
|
543
|
+
[class*="_PuckFields"] .xp-slot-root .xp-ui-combobox-chevron { border-right-color: var(--xp-text-2); border-bottom-color: var(--xp-text-2); }
|
|
544
|
+
[class*="_PuckFields"] .xp-slot-root .xp-ui-combobox-popup { color: var(--xp-text); background: var(--xp-surface); border-color: var(--xp-border-strong); }
|
|
545
|
+
[class*="_PuckFields"] .xp-slot-root .xp-ui-combobox-option { color: var(--xp-text); }
|
|
546
|
+
[class*="_PuckFields"] .xp-slot-root .xp-ui-combobox-option[data-active='true'] { color: var(--xp-text); background: var(--xp-surface-3); outline: 1px solid var(--xp-border-strong); }
|
|
547
|
+
[class*="_PuckFields"] .xp-slot-root .xp-ui-combobox-option[aria-disabled='true'] { color: var(--xp-text-3); }
|
|
548
|
+
[class*="_PuckFields"] .xp-slot-root .xp-ui-combobox-group { color: var(--xp-text-2); }
|
|
549
|
+
[class*="_PuckFields"] .xp-puck-field .xp-ui-button:disabled,
|
|
550
|
+
[class*="_PuckFields"] .xp-puck-field .xp-ui-button[aria-disabled='true'] {
|
|
551
|
+
opacity: 1;
|
|
552
|
+
background: var(--xp-surface-3);
|
|
553
|
+
border-color: var(--xp-border-strong);
|
|
554
|
+
color: var(--xp-text-2);
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
.xp-slot-control-events { display: contents; }
|
|
558
|
+
|
|
559
|
+
/* The configure surface is opt-in and always outside the Puck component tree. */
|
|
560
|
+
.xp-slot-editor.xp-configure-host .xp-ui-drawer { margin: 0; }
|
|
561
|
+
.xp-configure-panel { font: var(--xp-text-body); color: var(--xp-text); }
|
|
562
|
+
.xp-configure-panel .xp-test-page { margin: 0; padding: var(--xp-space-5); min-width: 0; }
|
|
563
|
+
.xp-configure-panel .xp-test-layout { grid-template-columns: minmax(0, 1fr); gap: var(--xp-space-5); }
|
|
564
|
+
.xp-configure-panel .xp-test-content { max-width: none; gap: var(--xp-space-5); }
|
|
565
|
+
.xp-configure-panel .xp-test-rail { position: static; }
|
|
566
|
+
.xp-configure-panel .xp-test-rail-list { flex-direction: row; overflow-x: auto; }
|
|
567
|
+
.xp-configure-panel .xp-test-rail-item { white-space: nowrap; }
|
|
568
|
+
.xp-configure-panel .xp-test-rail-item--advanced { margin-top: 0; }
|
|
569
|
+
.xp-configure-panel .xp-test-readiness-bar { position: sticky; bottom: 0; margin: var(--xp-space-5) calc(-1 * var(--xp-space-5)) calc(-1 * var(--xp-space-5)); }
|
|
570
|
+
.xp-configure-panel .xp-readiness--bar { grid-template-columns: minmax(0, 1fr); padding: var(--xp-space-4) var(--xp-space-5); }
|
|
571
|
+
.xp-configure-panel .xp-readiness--bar > .xp-readiness__actions { grid-column: 1; grid-row: auto; justify-content: flex-start; }
|
|
572
|
+
.xp-configure-panel .xp-readiness__separator { display: none; }
|
|
573
|
+
.xp-configure-panel .xp-targeting-row { grid-template-columns: minmax(0, 1fr); }
|
|
574
|
+
.xp-configure-panel .xp-targeting-row > * { min-width: 0; }
|
|
575
|
+
.xp-configure-panel .xp-version-rows { grid-template-columns: minmax(0, 1fr) var(--xp-version-share-width-mobile); }
|
|
576
|
+
.xp-configure-panel .xp-version-content, .xp-configure-panel .xp-version-remove { grid-column: 1 / -1; }
|
|
577
|
+
.xp-configure-panel .xp-version-grid-head > :nth-child(n+3) { display: none; }
|
|
578
|
+
|
|
579
|
+
.xp-slot-editor .xp-ui-tabbar { flex: 1 1 auto; min-width: 0; }
|
|
580
|
+
|
|
581
|
+
.xp-slot-sidebar { display: grid; gap: var(--xp-space-4); }
|
|
582
|
+
.xp-slot-sidebar section, .xp-slot-sidebar section > div { display: grid; gap: var(--xp-space-3); }
|
|
583
|
+
.xp-slot-sidebar .xp-slot-weight-inputs { display: grid; }
|
|
584
|
+
.xp-slot-sidebar .xp-slot-weight-inputs .xp-ui-field { max-width: none; flex: 1 1 100%; }
|
|
585
|
+
|
|
586
|
+
/* Grid stretching must not turn a status chip into a full-width bar. */
|
|
587
|
+
.xp-slot-sidebar .xp-ui-status { justify-self: start; width: max-content; }
|
|
588
|
+
.xp-slot-sidebar fieldset { min-width: 0; }
|
|
589
|
+
|
|
590
|
+
.xp-slot-header .xp-ui-status { flex: none; }
|
|
591
|
+
|
|
592
|
+
.xp-slot-title-sentence {
|
|
593
|
+
white-space: normal;
|
|
594
|
+
overflow: visible;
|
|
595
|
+
overflow-wrap: anywhere;
|
|
596
|
+
text-overflow: clip;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/* Compact field cards fit the Puck sidebar and wrap by their own available width. */
|
|
600
|
+
.xp-slot-sidebar .xp-slot-test-heading {
|
|
601
|
+
display: grid;
|
|
602
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
603
|
+
align-items: start;
|
|
604
|
+
gap: var(--xp-space-2);
|
|
605
|
+
}
|
|
606
|
+
.xp-slot-test-heading > strong { min-width: 0; overflow-wrap: anywhere; }
|
|
607
|
+
.xp-slot-sidebar .xp-ui-banner {
|
|
608
|
+
min-width: 0;
|
|
609
|
+
padding: var(--xp-space-2) var(--xp-space-3);
|
|
610
|
+
gap: var(--xp-space-2);
|
|
611
|
+
font: var(--xp-text-small);
|
|
612
|
+
overflow-wrap: anywhere;
|
|
613
|
+
}
|
|
614
|
+
.xp-slot-sidebar .xp-ui-banner > p { min-width: 0; }
|
|
615
|
+
.xp-slot-version-controls, .xp-slot-weights { display: grid; gap: var(--xp-space-2); min-width: 0; }
|
|
616
|
+
.xp-slot-sidebar .xp-slot-weight-inputs { gap: var(--xp-space-2); }
|
|
617
|
+
.xp-slot-version-item { min-width: 0; }
|
|
618
|
+
.xp-slot-version-group {
|
|
619
|
+
display: grid;
|
|
620
|
+
gap: var(--xp-space-2);
|
|
621
|
+
padding: var(--xp-space-2);
|
|
622
|
+
border: 1px solid var(--xp-border-strong);
|
|
623
|
+
border-radius: var(--xp-radius-control);
|
|
624
|
+
background: var(--xp-surface);
|
|
625
|
+
min-width: 0;
|
|
626
|
+
container-type: inline-size;
|
|
627
|
+
}
|
|
628
|
+
.xp-slot-version-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 72px; align-items: start; gap: var(--xp-space-half) var(--xp-space-2); min-width: 0; }
|
|
629
|
+
.xp-slot-version-open {
|
|
630
|
+
position: relative;
|
|
631
|
+
grid-area: 1 / 1;
|
|
632
|
+
min-width: 24px;
|
|
633
|
+
min-height: 32px;
|
|
634
|
+
padding: 0;
|
|
635
|
+
border: 0;
|
|
636
|
+
border-radius: var(--xp-radius-control);
|
|
637
|
+
background: transparent;
|
|
638
|
+
cursor: pointer;
|
|
639
|
+
}
|
|
640
|
+
.xp-slot-version-open::before { content: ''; position: absolute; inset-block: 4px; inset-inline-start: 0; width: 3px; border-radius: 2px; background: var(--xp-border-strong); }
|
|
641
|
+
.xp-slot-version-open[aria-pressed='true']::before { background: var(--xp-focus); }
|
|
642
|
+
.xp-slot-version-open:focus-visible { outline: 2px solid var(--xp-focus); outline-offset: 2px; }
|
|
643
|
+
.xp-slot-version-open:disabled { cursor: not-allowed; }
|
|
644
|
+
/* Flatten only field layout boxes so their feedback uses the entire card row. */
|
|
645
|
+
.xp-slot-version-name, .xp-slot-version-traffic, .xp-slot-version-row .xp-ui-field { display: contents; }
|
|
646
|
+
.xp-slot-version-name .xp-ui-input { grid-area: 1 / 2; min-width: 0; font-weight: 600; }
|
|
647
|
+
.xp-slot-version-traffic .xp-ui-input { grid-area: 1 / 3; min-width: 0; }
|
|
648
|
+
.xp-slot-version-label { grid-area: 1 / 2 / auto / -1; align-self: center; min-width: 0; overflow-wrap: anywhere; }
|
|
649
|
+
.xp-slot-version-row .xp-field-draft-notice,
|
|
650
|
+
.xp-slot-version-row .xp-ui-error { grid-column: 1 / -1; margin: 0; }
|
|
651
|
+
/* Reserve one feedback line. Visibility preserves geometry between saves. */
|
|
652
|
+
.xp-slot-version-saved { grid-column: 1 / -1; min-height: 16px; margin: 0; font: var(--xp-text-small); }
|
|
653
|
+
.xp-slot-version-row:has(.xp-ui-error) .xp-slot-version-saved { display: none; }
|
|
654
|
+
.xp-slot-version-row > .xp-slot-version-actions, .xp-slot-version-help { grid-column: 1 / -1; margin: 0; }
|
|
655
|
+
@container (max-width: 220px) {
|
|
656
|
+
.xp-slot-version-group > .xp-slot-version-row { grid-template-columns: 24px minmax(0, 1fr); }
|
|
657
|
+
.xp-slot-version-traffic .xp-ui-input { grid-area: 2 / 2; width: 72px; justify-self: end; }
|
|
658
|
+
.xp-slot-version-traffic .xp-slot-percent { grid-area: 2 / 2; }
|
|
659
|
+
}
|
|
660
|
+
.xp-slot-version-row .xp-ui-field > label {
|
|
661
|
+
position: absolute;
|
|
662
|
+
width: 1px;
|
|
663
|
+
height: 1px;
|
|
664
|
+
padding: 0;
|
|
665
|
+
margin: -1px;
|
|
666
|
+
overflow: hidden;
|
|
667
|
+
clip-path: inset(50%);
|
|
668
|
+
white-space: nowrap;
|
|
669
|
+
}
|
|
670
|
+
.xp-slot-version-row .xp-ui-input { height: 32px; padding-inline: var(--xp-space-2); font-size: 13px; }
|
|
671
|
+
.xp-slot-version-row .xp-ui-input--number { padding-inline-end: 22px; appearance: textfield; }
|
|
672
|
+
.xp-slot-version-row .xp-ui-input--number::-webkit-inner-spin-button,
|
|
673
|
+
.xp-slot-version-row .xp-ui-input--number::-webkit-outer-spin-button { appearance: none; margin: 0; }
|
|
674
|
+
.xp-slot-percent { position: relative; grid-area: 1 / 3; justify-self: end; inset-inline-end: var(--xp-space-2); top: 6px; font: var(--xp-text-small); color: var(--xp-text-2); pointer-events: none; }
|
|
675
|
+
.xp-slot-version-actions { display: flex; align-items: stretch; gap: var(--xp-space-one-half); min-width: 0; }
|
|
676
|
+
.xp-slot-version-actions > * { flex: 1 1 0; min-width: 0; }
|
|
677
|
+
.xp-slot-version-actions > div { display: flex; }
|
|
678
|
+
.xp-slot-version-actions .xp-ui-button { flex: 1; height: auto; min-height: 30px; padding: var(--xp-space-1) var(--xp-space-one-half); font-size: 12px; line-height: 16px; }
|
|
679
|
+
/* Match the solid disabled-button pattern without fading readable field values. */
|
|
680
|
+
.xp-slot-sidebar .xp-ui-input[aria-disabled='true'] {
|
|
681
|
+
opacity: 1;
|
|
682
|
+
background: var(--xp-surface-3);
|
|
683
|
+
border-color: var(--xp-border-strong);
|
|
684
|
+
color: var(--xp-text-2);
|
|
685
|
+
cursor: not-allowed;
|
|
686
|
+
}
|
|
687
|
+
.xp-slot-lock-notice {
|
|
688
|
+
padding: var(--xp-space-2) var(--xp-space-3);
|
|
689
|
+
border: 1px solid var(--xp-warning-border);
|
|
690
|
+
border-radius: var(--xp-radius-control);
|
|
691
|
+
background: var(--xp-warning-bg);
|
|
692
|
+
color: var(--xp-warning);
|
|
693
|
+
font: var(--xp-text-small);
|
|
694
|
+
overflow-wrap: anywhere;
|
|
695
|
+
scroll-margin-block: var(--xp-space-3);
|
|
696
|
+
}
|
|
697
|
+
.xp-slot-lock-notice[data-attention='true'] { border-color: var(--xp-error-border); background: var(--xp-error-bg); color: var(--xp-error); outline: 2px solid var(--xp-error); outline-offset: 2px; }
|
|
698
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
699
|
+
.xp-slot-lock-notice { transition: outline-color 180ms; }
|
|
700
|
+
}
|
|
@@ -1,19 +1,34 @@
|
|
|
1
1
|
import type { Arm, DocId, Status, UnitType } from '../../types/contracts.js';
|
|
2
2
|
import type { ArmSlot } from '../../types/puck.js';
|
|
3
|
+
import type { PreflightResult } from '../../types/endpoints.js';
|
|
3
4
|
export type EditorExperiment = {
|
|
4
5
|
name: string;
|
|
6
|
+
phase?: number;
|
|
5
7
|
updatedAt?: string;
|
|
6
8
|
status: Status;
|
|
7
9
|
arms: Array<Pick<Arm, 'key' | 'kind' | 'label'> & Partial<Arm>>;
|
|
8
10
|
decision?: {
|
|
9
11
|
winnerArm?: string;
|
|
12
|
+
discardedAt?: string;
|
|
10
13
|
} | null;
|
|
11
14
|
};
|
|
12
15
|
export declare function tabsFor(experiment?: Pick<EditorExperiment, 'arms'> | null): Array<{
|
|
13
16
|
slot: ArmSlot;
|
|
14
17
|
label: string;
|
|
15
18
|
}>;
|
|
16
|
-
export declare function bannerFor(status?: Status | null, winner?: string): string;
|
|
19
|
+
export declare function bannerFor(status?: Status | null, winner?: string, original?: string, decision?: EditorExperiment['decision']): string;
|
|
20
|
+
/** Preserve the block's populated slots and the current test's versions, without carrying test settings. */
|
|
21
|
+
export declare function armsFromBlock(experiment: Pick<EditorExperiment, 'arms'>, content: Partial<Record<ArmSlot, unknown>>): Arm[];
|
|
22
|
+
/** The host's Payload Puck editor route identifies the saved document, including in an iframe. */
|
|
23
|
+
export declare function currentPuckDocument(pathname: string, admin: string, placements?: PreflightResult['placements']): {
|
|
24
|
+
collection: string;
|
|
25
|
+
id: string;
|
|
26
|
+
} | undefined;
|
|
27
|
+
/** Saved placements elsewhere are shared; current-page multiplicity comes from live Puck data. */
|
|
28
|
+
export declare function isSharedTest(placements: PreflightResult['placements'], current?: {
|
|
29
|
+
collection: string;
|
|
30
|
+
id: DocId;
|
|
31
|
+
}): boolean;
|
|
17
32
|
export declare function slugify(name: string): string;
|
|
18
33
|
/** Complete draft defaults, shared by the page hand-off and setting creation. */
|
|
19
34
|
export declare function newTestBody(input: {
|
|
@@ -25,6 +40,7 @@ export declare function newTestBody(input: {
|
|
|
25
40
|
flagPoint?: string;
|
|
26
41
|
layer?: DocId;
|
|
27
42
|
hypothesis?: string;
|
|
43
|
+
arms?: Arm[];
|
|
28
44
|
}): {
|
|
29
45
|
hypothesis?: string | undefined;
|
|
30
46
|
layer?: DocId | undefined;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { placementPages } from '../../lib/placementPages.js';
|
|
2
|
+
import { splitEvenly } from '../../arms/model.js';
|
|
1
3
|
import { editorCopy } from './copy.js';
|
|
2
4
|
export function tabsFor(experiment) {
|
|
3
5
|
if (!experiment) return [
|
|
@@ -13,27 +15,82 @@ export function tabsFor(experiment) {
|
|
|
13
15
|
}
|
|
14
16
|
]).sort((a, b)=>Number(b.slot === 'control') - Number(a.slot === 'control'));
|
|
15
17
|
}
|
|
16
|
-
export function bannerFor(status, winner = editorCopy.labels.control) {
|
|
18
|
+
export function bannerFor(status, winner = editorCopy.labels.control, original = editorCopy.labels.control, decision) {
|
|
17
19
|
switch(status){
|
|
18
20
|
case 'draft':
|
|
19
21
|
case 'stopped':
|
|
20
|
-
return editorCopy.draft;
|
|
22
|
+
return editorCopy.draft(original);
|
|
21
23
|
case 'running':
|
|
22
24
|
return editorCopy.running;
|
|
23
25
|
case 'decided':
|
|
24
26
|
return editorCopy.decided(winner);
|
|
25
27
|
case 'archived':
|
|
26
|
-
return editorCopy.archived;
|
|
28
|
+
return decision?.winnerArm && !decision.discardedAt ? editorCopy.archived(winner) : editorCopy.archivedOriginal(original, Boolean(decision?.discardedAt));
|
|
27
29
|
default:
|
|
28
30
|
return editorCopy.unbound;
|
|
29
31
|
}
|
|
30
32
|
}
|
|
33
|
+
/** Preserve the block's populated slots and the current test's versions, without carrying test settings. */ export function armsFromBlock(experiment, content) {
|
|
34
|
+
const slots = [
|
|
35
|
+
'control',
|
|
36
|
+
'variantA',
|
|
37
|
+
'variantB',
|
|
38
|
+
'variantC'
|
|
39
|
+
];
|
|
40
|
+
return splitEvenly(slots.flatMap((slot)=>{
|
|
41
|
+
const arm = experiment.arms.find((arm)=>arm.key === slot && arm.kind !== 'holdout');
|
|
42
|
+
if (slot !== 'control' && !arm && !(Array.isArray(content[slot]) && content[slot].length > 0)) return [];
|
|
43
|
+
return [
|
|
44
|
+
{
|
|
45
|
+
key: slot,
|
|
46
|
+
slot,
|
|
47
|
+
kind: slot === 'control' ? 'control' : 'variant',
|
|
48
|
+
label: arm?.label.trim() || editorCopy.labels[slot],
|
|
49
|
+
weight: 0
|
|
50
|
+
}
|
|
51
|
+
];
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
/** The host's Payload Puck editor route identifies the saved document, including in an iframe. */ export function currentPuckDocument(pathname, admin, placements = []) {
|
|
55
|
+
const linked = placements.find((page)=>{
|
|
56
|
+
try {
|
|
57
|
+
return page.editorUrl && new URL(page.editorUrl, 'https://puck.local').pathname === pathname;
|
|
58
|
+
} catch {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
if (linked) return {
|
|
63
|
+
collection: linked.collection,
|
|
64
|
+
id: String(linked.id)
|
|
65
|
+
};
|
|
66
|
+
if (!pathname.startsWith(`${admin}/`)) return;
|
|
67
|
+
let parts;
|
|
68
|
+
try {
|
|
69
|
+
parts = pathname.slice(admin.length + 1).split('/').map(decodeURIComponent);
|
|
70
|
+
} catch {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (![
|
|
74
|
+
'puck',
|
|
75
|
+
'puck-editor',
|
|
76
|
+
'collections'
|
|
77
|
+
].includes(parts[0] ?? '') || !parts[1] || !parts[2] || parts[2] === 'create') return;
|
|
78
|
+
return {
|
|
79
|
+
collection: parts[1],
|
|
80
|
+
id: parts[2]
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
/** Saved placements elsewhere are shared; current-page multiplicity comes from live Puck data. */ export function isSharedTest(placements, current) {
|
|
84
|
+
return placementPages(placements).some((page)=>page.collection !== current?.collection || String(page.id) !== String(current.id));
|
|
85
|
+
}
|
|
31
86
|
export function slugify(name) {
|
|
32
87
|
return name.normalize('NFKD').replace(/[\u0300-\u036f]/g, '').toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '').slice(0, 64).replace(/-+$/g, '');
|
|
33
88
|
}
|
|
34
89
|
/** Complete draft defaults, shared by the page hand-off and setting creation. */ export function newTestBody(input) {
|
|
35
90
|
const { kind, name, slug, unitType, flagPoint, layer, hypothesis, pageCollection } = input;
|
|
36
|
-
const arms =
|
|
91
|
+
const arms = input.arms?.map((arm)=>({
|
|
92
|
+
...arm
|
|
93
|
+
})) ?? [
|
|
37
94
|
{
|
|
38
95
|
key: 'control',
|
|
39
96
|
kind: 'control',
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SurfaceProps } from '../../testSurface/surface/contracts.js';
|
|
2
|
+
export type SurfaceState = {
|
|
3
|
+
surface?: SurfaceProps;
|
|
4
|
+
error?: 'forbidden' | 'unavailable';
|
|
5
|
+
};
|
|
6
|
+
export declare function readSurface(api: string): Promise<SurfaceState>;
|
|
7
|
+
/** Share only pending requests across canvas blocks and sidebar controls. */
|
|
8
|
+
export declare function useEditorSurface(api: string): SurfaceState & {
|
|
9
|
+
retry: () => void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
3
|
+
const pending = new Map();
|
|
4
|
+
export function readSurface(api) {
|
|
5
|
+
let request = pending.get(api);
|
|
6
|
+
if (!request) {
|
|
7
|
+
request = fetch(`${api}/xp/editor-surface`, {
|
|
8
|
+
credentials: 'include',
|
|
9
|
+
cache: 'no-store'
|
|
10
|
+
}).then(async (response)=>{
|
|
11
|
+
if (response.status === 401 || response.status === 403) return {
|
|
12
|
+
error: 'forbidden'
|
|
13
|
+
};
|
|
14
|
+
if (!response.ok) throw new Error('surface');
|
|
15
|
+
const surface = await response.json();
|
|
16
|
+
if (!surface || typeof surface.canManage !== 'boolean' || typeof surface.canReadResults !== 'boolean') throw new Error('surface');
|
|
17
|
+
return {
|
|
18
|
+
surface
|
|
19
|
+
};
|
|
20
|
+
}).catch(()=>({
|
|
21
|
+
error: 'unavailable'
|
|
22
|
+
}));
|
|
23
|
+
pending.set(api, request);
|
|
24
|
+
const release = ()=>{
|
|
25
|
+
if (pending.get(api) === request) pending.delete(api);
|
|
26
|
+
};
|
|
27
|
+
void request.then(release, release);
|
|
28
|
+
}
|
|
29
|
+
return request;
|
|
30
|
+
}
|
|
31
|
+
/** Share only pending requests across canvas blocks and sidebar controls. */ export function useEditorSurface(api) {
|
|
32
|
+
const [loaded, setLoaded] = useState();
|
|
33
|
+
const [attempt, setAttempt] = useState(0);
|
|
34
|
+
const retry = useCallback(()=>{
|
|
35
|
+
setLoaded(undefined);
|
|
36
|
+
setAttempt((value)=>value + 1);
|
|
37
|
+
}, []);
|
|
38
|
+
useEffect(()=>{
|
|
39
|
+
let active = true;
|
|
40
|
+
const load = ()=>{
|
|
41
|
+
void readSurface(api).then((state)=>{
|
|
42
|
+
if (active) setLoaded({
|
|
43
|
+
api,
|
|
44
|
+
state
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
load();
|
|
49
|
+
const onVisible = ()=>{
|
|
50
|
+
if (document.visibilityState === 'visible') load();
|
|
51
|
+
};
|
|
52
|
+
document.addEventListener('visibilitychange', onVisible);
|
|
53
|
+
return ()=>{
|
|
54
|
+
active = false;
|
|
55
|
+
document.removeEventListener('visibilitychange', onVisible);
|
|
56
|
+
};
|
|
57
|
+
}, [
|
|
58
|
+
api,
|
|
59
|
+
attempt
|
|
60
|
+
]);
|
|
61
|
+
return {
|
|
62
|
+
...loaded?.api === api ? loaded.state : {},
|
|
63
|
+
retry
|
|
64
|
+
};
|
|
65
|
+
}
|