@delmaredigital/payload-experiments 0.4.0-rc.5 → 0.4.0-rc.6
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/dist/admin/copy/newTest.d.ts +1 -1
- package/dist/admin/copy/newTest.js +1 -1
- package/dist/admin/surface/newTest/NewTest.js +16 -18
- package/dist/admin/surface/newTest/newTest.css +3 -1
- package/dist/blocks/bindings.js +6 -13
- package/dist/blocks/placementLocale.d.ts +2 -0
- package/dist/blocks/placementLocale.js +16 -12
- package/dist/goals/fairness.js +8 -6
- package/dist/hooks/blockRemovalRule.d.ts +2 -1
- package/dist/hooks/blockRemovalRule.js +27 -5
- package/dist/hooks/pageGuard.js +2 -2
- package/dist/puck/ExperimentPicker.d.ts +2 -1
- package/dist/puck/ExperimentPicker.js +34 -30
- package/dist/puck/ExperimentSlot.js +3 -1
- package/dist/puck/copy.d.ts +1 -0
- package/dist/puck/copy.js +1 -0
- package/dist/puck/editor/CreateExperimentDrawer.d.ts +2 -1
- package/dist/puck/editor/CreateExperimentDrawer.js +24 -20
- package/dist/puck/editor/EditorControls.d.ts +1 -1
- package/dist/puck/editor/EditorControls.js +1 -1
- package/dist/puck/editor/ExperimentSlotEditor.js +354 -374
- package/dist/puck/editor/LeftoverVersions.d.ts +3 -1
- package/dist/puck/editor/LeftoverVersions.js +45 -63
- package/dist/puck/editor/QuickTestActions.js +2 -2
- package/dist/puck/editor/VersionBuilder.d.ts +24 -13
- package/dist/puck/editor/VersionBuilder.js +264 -205
- package/dist/puck/editor/armWrites.d.ts +9 -2
- package/dist/puck/editor/armWrites.js +40 -2
- package/dist/puck/editor/armsCache.d.ts +1 -1
- package/dist/puck/editor/armsCache.js +2 -1
- package/dist/puck/editor/copy.d.ts +19 -25
- package/dist/puck/editor/copy.js +19 -25
- package/dist/puck/editor/createTest.d.ts +3 -0
- package/dist/puck/editor/createTest.js +33 -0
- package/dist/puck/editor/editor.chrome.css +24 -17
- package/dist/puck/editor/editor.css +33 -21
- package/dist/puck/editor/editor.model.d.ts +1 -1
- package/dist/puck/editor/editor.model.js +2 -2
- package/dist/puck/editor/experimentOutlinePlugin.js +1 -1
- package/dist/puck/editor/localPlacements.d.ts +4 -2
- package/dist/puck/editor/localPlacements.js +20 -18
- package/dist/puck/editor/sidebar.d.ts +2 -6
- package/dist/puck/editor/sidebar.js +3 -6
- package/dist/puck/visibility.d.ts +21 -0
- package/dist/puck/visibility.js +77 -0
- package/dist/server/recordContentChange.js +3 -1
- package/dist/server/resolveExperimentData.js +4 -1
- package/dist/testSurface/copy/readiness.d.ts +1 -0
- package/dist/testSurface/copy/readiness.js +1 -0
- package/dist/testSurface/copy/testPage.d.ts +7 -6
- package/dist/testSurface/copy/testPage.js +7 -6
- package/dist/testSurface/results/results.css +1 -1
- package/dist/testSurface/results/results.model.d.ts +1 -1
- package/dist/testSurface/surface/readiness/ActionDialogs.js +28 -34
- package/dist/testSurface/surface/test/GoalSection.js +101 -74
- package/dist/testSurface/surface/test/fields.d.ts +1 -3
- package/dist/testSurface/surface/test/fields.js +5 -35
- package/dist/transitions/makeContent.js +24 -5
- package/dist/transitions/placements.js +23 -34
- package/dist/types/puck.d.ts +1 -0
- package/dist/ui/Inputs.js +8 -5
- package/dist/ui/Tabs.d.ts +0 -1
- package/dist/ui/Tabs.js +28 -40
- package/dist/ui/ui.css +9 -4
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect, useId, useState } from 'react';
|
|
4
|
-
import { TextInput, NumberInput, Textarea, Select,
|
|
4
|
+
import { TextInput, NumberInput, Textarea, Select, CheckboxList as UICheckboxList } from '../../../ui/Inputs.js';
|
|
5
5
|
import { TEST_PAGE as C } from '../../copy/testPage.js';
|
|
6
6
|
import { EDITABLE_BY_STATUS } from '../../../collections/experiments/editability.js';
|
|
7
7
|
import { lockedReason } from '../../lockedNotice.model.js';
|
|
@@ -128,52 +128,22 @@ export function SelectEdit({ label, value, options, groups, reason, onCommit, re
|
|
|
128
128
|
}, option.value))
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
export function CheckboxList({ label, value, options,
|
|
131
|
+
export function CheckboxList({ label, value, options, reason, onToggle, readOnlyValue }) {
|
|
132
132
|
const id = useId();
|
|
133
|
-
const [query, setQuery] = useState('');
|
|
134
|
-
const visible = searchable ? options.filter((option)=>value.includes(option.value) || option.label.toLowerCase().includes(query.toLowerCase())) : options;
|
|
135
133
|
if (reason) return /*#__PURE__*/ _jsx(ReadOnly, {
|
|
136
134
|
label: label,
|
|
137
135
|
reason: reason,
|
|
138
136
|
value: readOnlyValue ?? value.map((v)=>options.find((o)=>o.value === v)?.label ?? v).join(', ')
|
|
139
137
|
});
|
|
140
|
-
return /*#__PURE__*/
|
|
138
|
+
return /*#__PURE__*/ _jsx(UICheckboxList, {
|
|
141
139
|
id: id,
|
|
142
140
|
label: label,
|
|
143
141
|
value: value,
|
|
144
|
-
options:
|
|
142
|
+
options: options,
|
|
145
143
|
onChange: (next)=>{
|
|
146
144
|
const changed = options.find((option)=>next.includes(option.value) !== value.includes(option.value));
|
|
147
145
|
if (changed) onToggle(changed.value, next.includes(changed.value));
|
|
148
|
-
}
|
|
149
|
-
children: [
|
|
150
|
-
searchable ? /*#__PURE__*/ _jsx(SearchInput, {
|
|
151
|
-
id: `${id}-search`,
|
|
152
|
-
label: C.searchGoals,
|
|
153
|
-
value: query,
|
|
154
|
-
onChange: (event)=>setQuery(event.target.value)
|
|
155
|
-
}) : null,
|
|
156
|
-
groups ? groups.map((group, index)=>{
|
|
157
|
-
const items = group.options.filter((option)=>visible.some((item)=>item.value === option.value));
|
|
158
|
-
return items.length ? /*#__PURE__*/ _jsxs("div", {
|
|
159
|
-
children: [
|
|
160
|
-
group.label ? /*#__PURE__*/ _jsx("h3", {
|
|
161
|
-
children: group.label
|
|
162
|
-
}) : null,
|
|
163
|
-
/*#__PURE__*/ _jsx("ul", {
|
|
164
|
-
children: items.map((option)=>/*#__PURE__*/ _jsx("li", {
|
|
165
|
-
children: /*#__PURE__*/ _jsx(Checkbox, {
|
|
166
|
-
id: `${id}-${index}-${option.value}`,
|
|
167
|
-
label: option.label,
|
|
168
|
-
checked: value.includes(option.value),
|
|
169
|
-
onChange: (event)=>onToggle(option.value, event.target.checked)
|
|
170
|
-
})
|
|
171
|
-
}, option.value))
|
|
172
|
-
})
|
|
173
|
-
]
|
|
174
|
-
}, index) : null;
|
|
175
|
-
}) : null
|
|
176
|
-
]
|
|
146
|
+
}
|
|
177
147
|
});
|
|
178
148
|
}
|
|
179
149
|
export function TestName({ test }) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { puckVisibility, hiddenOnSizes, visibilitySizes } from '../puck/visibility.js';
|
|
1
2
|
import { Forbidden, NotFound, ValidationError, Locked, commitTransaction, initTransaction, killTransaction } from 'payload';
|
|
2
3
|
import { latestDraftContent, publishedContent as readPublishedContent } from '../db/publishedContent.js';
|
|
3
4
|
import { EXPERIMENT_BLOCK_SLUG, hostBlocks, slotBlocks } from '../blocks/model.js';
|
|
@@ -30,23 +31,41 @@ class LocalizedContent extends Error {
|
|
|
30
31
|
}
|
|
31
32
|
const isNotFound = (error)=>contentFailureReason(error) === 'not-found' || Boolean(error && typeof error === 'object' && 'status' in error && error.status === 404);
|
|
32
33
|
const object = (value)=>value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
33
|
-
/** Flatten selected slots in every content array, including nested selected slots. */ function unwrap(value, slug, slot) {
|
|
34
|
+
/** Flatten selected slots in every content array, including nested selected slots. */ function unwrap(value, slug, slot, visibility = puckVisibility(value)) {
|
|
34
35
|
if (Array.isArray(value)) return value.flatMap((node)=>{
|
|
36
|
+
if (object(node) && visibility.get(node)?.hidden) return [
|
|
37
|
+
node
|
|
38
|
+
];
|
|
35
39
|
if (object(node) && node.type === 'ExperimentSlot' && object(node.props)) {
|
|
36
40
|
const ref = node.props.experiment;
|
|
37
41
|
if ((typeof ref === 'string' ? ref : object(ref) ? ref.slug : undefined) === slug) {
|
|
38
42
|
const content = node.props[slot];
|
|
39
43
|
if (!Array.isArray(content)) throw new Error('The winning content slot is missing.');
|
|
40
|
-
|
|
44
|
+
const selected = unwrap(content, slug, slot, visibility);
|
|
45
|
+
const hideOn = hiddenOnSizes(node.props._visibility);
|
|
46
|
+
return hideOn.length ? selected.map((child)=>{
|
|
47
|
+
if (!object(child) || !object(child.props)) return child;
|
|
48
|
+
const current = object(child.props._visibility) ? child.props._visibility : {};
|
|
49
|
+
return {
|
|
50
|
+
...child,
|
|
51
|
+
props: {
|
|
52
|
+
...child.props,
|
|
53
|
+
_visibility: {
|
|
54
|
+
...current,
|
|
55
|
+
hideOn: visibilitySizes.filter((size)=>hideOn.includes(size) || hiddenOnSizes(current).includes(size))
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}) : selected;
|
|
41
60
|
}
|
|
42
61
|
}
|
|
43
62
|
return [
|
|
44
|
-
unwrap(node, slug, slot)
|
|
63
|
+
unwrap(node, slug, slot, visibility)
|
|
45
64
|
];
|
|
46
65
|
});
|
|
47
|
-
if (object(value)) return Object.fromEntries(Object.entries(value).map(([key, child])=>[
|
|
66
|
+
if (object(value)) return visibility.get(value)?.hidden ? value : Object.fromEntries(Object.entries(value).map(([key, child])=>[
|
|
48
67
|
key,
|
|
49
|
-
unwrap(child, slug, slot)
|
|
68
|
+
unwrap(child, slug, slot, visibility)
|
|
50
69
|
]));
|
|
51
70
|
return value;
|
|
52
71
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { walkVisiblePuck } from '../puck/visibility.js';
|
|
1
2
|
import { BLOCK_SLOTS, EXPERIMENT_BLOCK_SLUG, hostBlocks, slotBlocks } from '../blocks/model.js';
|
|
2
3
|
import { safeError } from '../log.js';
|
|
3
4
|
import { pageVersionContent } from '../db/pageContent.js';
|
|
@@ -152,17 +153,18 @@ export async function scanBlockPlacements(req, args) {
|
|
|
152
153
|
}
|
|
153
154
|
}, collection, doc);
|
|
154
155
|
if (editor !== 'puck') continue;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
156
|
+
const offsets = new Map([
|
|
157
|
+
...placements
|
|
158
|
+
].map(([slug, list])=>[
|
|
159
|
+
slug,
|
|
160
|
+
list.length
|
|
161
|
+
]));
|
|
162
|
+
walkVisiblePuck(doc[field], (node, visibility)=>{
|
|
163
|
+
if (visibility.hidden) return;
|
|
162
164
|
const props = node.props;
|
|
163
|
-
const ref = props
|
|
165
|
+
const ref = props.experiment;
|
|
164
166
|
const experiment = typeof ref === 'string' ? ref : ref && typeof ref === 'object' && 'slug' in ref ? ref.slug : null;
|
|
165
|
-
if (node.type === 'ExperimentSlot' &&
|
|
167
|
+
if (node.type === 'ExperimentSlot' && typeof experiment === 'string' && slugs.has(experiment)) {
|
|
166
168
|
placements.get(experiment).push({
|
|
167
169
|
collection,
|
|
168
170
|
id: doc.id,
|
|
@@ -183,36 +185,23 @@ export async function scanBlockPlacements(req, args) {
|
|
|
183
185
|
locked: doc._isLocked === true || doc.locked === true
|
|
184
186
|
});
|
|
185
187
|
}
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
const offsets = new Map([
|
|
189
|
-
...placements
|
|
190
|
-
].map(([slug, list])=>[
|
|
191
|
-
slug,
|
|
192
|
-
list.length
|
|
193
|
-
]));
|
|
194
|
-
walk(doc[field]);
|
|
188
|
+
});
|
|
195
189
|
if (args.compareVersions && !draft && [
|
|
196
190
|
...placements
|
|
197
191
|
].some(([slug, list])=>list.length > offsets.get(slug))) {
|
|
198
192
|
const raw = await comparisonContent(req, collection, doc.id);
|
|
199
193
|
const rawSlots = new Map();
|
|
200
|
-
const collect = (value)=>{
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
list.push(props);
|
|
212
|
-
rawSlots.set(slug, list);
|
|
213
|
-
}
|
|
214
|
-
Object.values(node).forEach(collect);
|
|
215
|
-
};
|
|
194
|
+
const collect = (value)=>walkVisiblePuck(value, (node, visibility)=>{
|
|
195
|
+
if (visibility.hidden) return;
|
|
196
|
+
const props = node.props;
|
|
197
|
+
const ref = props?.experiment;
|
|
198
|
+
const slug = typeof ref === 'string' ? ref : ref && typeof ref === 'object' && 'slug' in ref ? ref.slug : undefined;
|
|
199
|
+
if (node.type === 'ExperimentSlot' && props && typeof slug === 'string') {
|
|
200
|
+
const list = rawSlots.get(slug) ?? [];
|
|
201
|
+
list.push(props);
|
|
202
|
+
rawSlots.set(slug, list);
|
|
203
|
+
}
|
|
204
|
+
});
|
|
216
205
|
if (raw && raw._status !== 'draft') collect(raw[field]);
|
|
217
206
|
for (const [slug, list] of placements)list.slice(offsets.get(slug)).forEach((placement, index)=>{
|
|
218
207
|
const props = rawSlots.get(slug)?.[index];
|
package/dist/types/puck.d.ts
CHANGED
package/dist/ui/Inputs.js
CHANGED
|
@@ -80,11 +80,14 @@ export function Select({ label, labelAction, help, error, className = '', ...pro
|
|
|
80
80
|
return /*#__PURE__*/ _jsx(Field, {
|
|
81
81
|
...field,
|
|
82
82
|
labelAction: labelAction,
|
|
83
|
-
children: /*#__PURE__*/ _jsx("
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
children: /*#__PURE__*/ _jsx("span", {
|
|
84
|
+
className: "xp-ui-select-wrap",
|
|
85
|
+
children: /*#__PURE__*/ _jsx("select", {
|
|
86
|
+
...props,
|
|
87
|
+
className: `xp-ui-input xp-ui-select ${className}`,
|
|
88
|
+
"aria-invalid": Boolean(error) || undefined,
|
|
89
|
+
"aria-describedby": described(field, props['aria-describedby'])
|
|
90
|
+
})
|
|
88
91
|
})
|
|
89
92
|
});
|
|
90
93
|
}
|
package/dist/ui/Tabs.d.ts
CHANGED
package/dist/ui/Tabs.js
CHANGED
|
@@ -12,48 +12,36 @@ export function Tabs({ items, label, value, onChange, renderHeader, disabled = f
|
|
|
12
12
|
setLocal(id);
|
|
13
13
|
onChange?.(id);
|
|
14
14
|
}
|
|
15
|
-
const header = /*#__PURE__*/
|
|
15
|
+
const header = /*#__PURE__*/ _jsx("div", {
|
|
16
16
|
className: "xp-ui-tabbar",
|
|
17
|
-
children:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
if (!next) return;
|
|
42
|
-
event.preventDefault();
|
|
43
|
-
select(next.id);
|
|
44
|
-
event.currentTarget.ownerDocument.getElementById(`${prefix}-tab-${next.id}`)?.focus();
|
|
45
|
-
},
|
|
46
|
-
children: item.label
|
|
47
|
-
}, item.id))
|
|
48
|
-
}),
|
|
49
|
-
items.map((item, index)=>item.actions ? /*#__PURE__*/ _jsx("div", {
|
|
50
|
-
style: {
|
|
51
|
-
order: index * 2 + 1
|
|
17
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
18
|
+
role: "tablist",
|
|
19
|
+
"aria-label": label,
|
|
20
|
+
"aria-disabled": disabled || undefined,
|
|
21
|
+
className: "xp-ui-tablist",
|
|
22
|
+
children: items.map((item)=>/*#__PURE__*/ _jsx("button", {
|
|
23
|
+
type: "button",
|
|
24
|
+
role: "tab",
|
|
25
|
+
id: `${prefix}-tab-${item.id}`,
|
|
26
|
+
"aria-controls": `${prefix}-panel-${item.id}`,
|
|
27
|
+
"aria-selected": selected === item.id,
|
|
28
|
+
tabIndex: selected === item.id ? 0 : -1,
|
|
29
|
+
disabled: disabled || item.disabled,
|
|
30
|
+
className: "xp-ui-tab",
|
|
31
|
+
onClick: ()=>select(item.id),
|
|
32
|
+
onKeyDown: (event)=>{
|
|
33
|
+
if (disabled) return;
|
|
34
|
+
const enabled = items.filter((tab)=>!tab.disabled);
|
|
35
|
+
const index = enabled.findIndex((tab)=>tab.id === item.id);
|
|
36
|
+
const next = event.key === 'ArrowRight' ? enabled[(index + 1) % enabled.length] : event.key === 'ArrowLeft' ? enabled[(index - 1 + enabled.length) % enabled.length] : event.key === 'Home' ? enabled[0] : event.key === 'End' ? enabled.at(-1) : undefined;
|
|
37
|
+
if (!next) return;
|
|
38
|
+
event.preventDefault();
|
|
39
|
+
select(next.id);
|
|
40
|
+
event.currentTarget.ownerDocument.getElementById(`${prefix}-tab-${next.id}`)?.focus();
|
|
52
41
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
]
|
|
42
|
+
children: item.label
|
|
43
|
+
}, item.id))
|
|
44
|
+
})
|
|
57
45
|
});
|
|
58
46
|
return /*#__PURE__*/ _jsxs("div", {
|
|
59
47
|
className: "xp-ui-tabs",
|
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; }
|
|
@@ -22,7 +22,10 @@
|
|
|
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
24
|
.xp-ui-input--number { text-align: right; font-variant-numeric: tabular-nums; }
|
|
25
|
-
|
|
25
|
+
/* The same token-based dropdown chrome in the admin and isolated editor. */
|
|
26
|
+
.xp-ui-select-wrap { display: block; position: relative; min-width: 0; }
|
|
27
|
+
.xp-ui-select-wrap::after { content: ''; position: absolute; inset-inline-end: 14px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--xp-text-2); border-bottom: 2px solid var(--xp-text-2); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
|
|
28
|
+
.xp-ui-select { cursor: pointer; appearance: none; padding-inline-end: 36px; }
|
|
26
29
|
.xp-ui-help { margin: 0; color: var(--xp-text-2); font: var(--xp-text-small); }
|
|
27
30
|
.xp-ui-error { margin: 0; color: var(--xp-error); font: var(--xp-text-small); }
|
|
28
31
|
.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 +41,7 @@
|
|
|
38
41
|
.xp-ui-section-body { padding: 20px; }
|
|
39
42
|
.xp-ui-tabs { color: var(--xp-text); font: var(--xp-text-body); }
|
|
40
43
|
.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; }
|
|
44
|
+
.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
45
|
.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
46
|
.xp-ui-tab:disabled { opacity: .5; cursor: not-allowed; }
|
|
44
47
|
.xp-ui-tabpanel { padding-block: 16px; }
|
|
@@ -112,9 +115,11 @@
|
|
|
112
115
|
/* Actions sit beside each tab visually and outside the tablist's owned roles. */
|
|
113
116
|
.xp-ui-tabbar { display: flex; flex-wrap: wrap; align-items: stretch; gap: 4px; border-bottom: 1px solid var(--xp-border); }
|
|
114
117
|
.xp-ui-tabbar > .xp-ui-tablist { display: contents; }
|
|
115
|
-
.xp-ui-tab-actions { display: flex; align-items: center; flex-wrap: wrap; position: relative; }
|
|
116
118
|
|
|
117
119
|
/* One blocker-list format in the admin footer and the Puck sidebar. */
|
|
118
120
|
.xp-readiness__blockers, .xp-readiness__blockers a { color: var(--xp-error); }
|
|
119
121
|
.xp-readiness__blockers ul { margin: 0; padding-inline-start: var(--xp-space-4); }
|
|
120
122
|
.xp-readiness__blockers li { white-space: pre-line; }
|
|
123
|
+
|
|
124
|
+
.xp-other-goals summary { cursor: pointer; font-weight: 600; }
|
|
125
|
+
.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.6",
|
|
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",
|