@orion-studios/payload-studio 0.6.0-beta.134 → 0.6.0-beta.135
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/index.mjs +2 -2
- package/dist/builder-v2/client.js +20 -3
- package/dist/builder-v2/client.mjs +20 -3
- package/dist/index.mjs +9 -9
- package/dist/studio-pages/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/{chunk-KHK6RTGC.mjs → chunk-JC3UV74N.mjs} +3 -3
- package/dist/{chunk-276KAPGM.mjs → chunk-NGLIA2OE.mjs} +3 -3
package/dist/admin/index.mjs
CHANGED
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
socialMediaConnectionsField,
|
|
8
8
|
themePreferenceField,
|
|
9
9
|
withTooltips
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-JC3UV74N.mjs";
|
|
11
|
+
import "../chunk-W2UOCJDX.mjs";
|
|
11
12
|
import {
|
|
12
13
|
SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM,
|
|
13
14
|
SOCIAL_MEDIA_ICON_OPTIONS,
|
|
14
15
|
SOCIAL_MEDIA_PLATFORMS,
|
|
15
16
|
SOCIAL_MEDIA_PLATFORM_LABELS
|
|
16
17
|
} from "../chunk-ZTXJG4K5.mjs";
|
|
17
|
-
import "../chunk-W2UOCJDX.mjs";
|
|
18
18
|
import "../chunk-6BWS3CLP.mjs";
|
|
19
19
|
export {
|
|
20
20
|
SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM,
|
|
@@ -1314,7 +1314,7 @@ var decorateBuilderSettingHelp = (root = document) => {
|
|
|
1314
1314
|
trigger.className = "orion-builder-v2-help-trigger";
|
|
1315
1315
|
trigger.dataset.builderHelpText = help;
|
|
1316
1316
|
trigger.role = "button";
|
|
1317
|
-
trigger.tabIndex =
|
|
1317
|
+
trigger.tabIndex = -1;
|
|
1318
1318
|
trigger.textContent = "?";
|
|
1319
1319
|
element.appendChild(trigger);
|
|
1320
1320
|
}
|
|
@@ -1356,6 +1356,7 @@ var decorateBuilderColorEyeDroppers = (root = document) => {
|
|
|
1356
1356
|
button.dataset.orionColorEyedropper = "true";
|
|
1357
1357
|
button.setAttribute("aria-label", "Pick color from screen");
|
|
1358
1358
|
button.setAttribute("title", "Pick color from screen");
|
|
1359
|
+
button.tabIndex = -1;
|
|
1359
1360
|
button.innerHTML = '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M14.7 4.3a2.4 2.4 0 0 1 3.4 0l1.6 1.6a2.4 2.4 0 0 1 0 3.4l-1.2 1.2 1 1a1 1 0 1 1-1.4 1.4l-1-1-8.9 8.9H4v-4.2l8.9-8.9-1-1a1 1 0 0 1 1.4-1.4l1 1 1.4-1.4Zm-.4 4.8-8.3 8.3V19h1.6l8.3-8.3-1.6-1.6Z" fill="currentColor"/></svg>';
|
|
1360
1361
|
swatch.insertAdjacentElement("afterend", button);
|
|
1361
1362
|
});
|
|
@@ -1373,6 +1374,7 @@ var decorateBuilderNumericSteppers = (root = document) => {
|
|
|
1373
1374
|
return;
|
|
1374
1375
|
}
|
|
1375
1376
|
field.classList.add("has-orion-builder-stepper");
|
|
1377
|
+
field.querySelector("select")?.setAttribute("tabindex", "-1");
|
|
1376
1378
|
const stepper = document.createElement("span");
|
|
1377
1379
|
stepper.className = "orion-builder-v2-stepper";
|
|
1378
1380
|
const updateValue = (direction) => {
|
|
@@ -1390,6 +1392,7 @@ var decorateBuilderNumericSteppers = (root = document) => {
|
|
|
1390
1392
|
button.type = "button";
|
|
1391
1393
|
button.className = `orion-builder-v2-stepper-button ${step.className}`;
|
|
1392
1394
|
button.setAttribute("aria-label", `${step.label} ${property.replace(/-/g, " ")}`);
|
|
1395
|
+
button.tabIndex = -1;
|
|
1393
1396
|
button.textContent = step.text;
|
|
1394
1397
|
button.addEventListener("click", (event) => {
|
|
1395
1398
|
event.preventDefault();
|
|
@@ -2142,6 +2145,7 @@ function GrapesPageEditor({
|
|
|
2142
2145
|
const stylePanelEditActiveRef = (0, import_react.useRef)(false);
|
|
2143
2146
|
const historyRestoreActiveRef = (0, import_react.useRef)(false);
|
|
2144
2147
|
const stylePanelHistoryBeforeRef = (0, import_react.useRef)(null);
|
|
2148
|
+
const historyReadyRef = (0, import_react.useRef)(false);
|
|
2145
2149
|
const lastComponentSnapshotRef = (0, import_react.useRef)(/* @__PURE__ */ new WeakMap());
|
|
2146
2150
|
const customUndoStackRef = (0, import_react.useRef)([]);
|
|
2147
2151
|
const customRedoStackRef = (0, import_react.useRef)([]);
|
|
@@ -3102,8 +3106,18 @@ function GrapesPageEditor({
|
|
|
3102
3106
|
registerOrionBuilderV2Blocks(editor);
|
|
3103
3107
|
}
|
|
3104
3108
|
registerProjectDynamicComponents(editor, adapter);
|
|
3109
|
+
historyReadyRef.current = false;
|
|
3105
3110
|
editor.loadProjectData(projectData);
|
|
3106
3111
|
void loadPayloadMediaAssets(editor);
|
|
3112
|
+
window.setTimeout(() => {
|
|
3113
|
+
customUndoStackRef.current = [];
|
|
3114
|
+
customRedoStackRef.current = [];
|
|
3115
|
+
lastComponentSnapshotRef.current = /* @__PURE__ */ new WeakMap();
|
|
3116
|
+
clearNativeUndoHistory();
|
|
3117
|
+
editor.clearDirtyCount?.();
|
|
3118
|
+
updateHistoryState(editor);
|
|
3119
|
+
historyReadyRef.current = true;
|
|
3120
|
+
}, 0);
|
|
3107
3121
|
editor.on("update", () => {
|
|
3108
3122
|
const hasDirtyChanges = editor.getDirtyCount() > 0;
|
|
3109
3123
|
refreshSelectedState(selectedComponentRef.current);
|
|
@@ -3122,6 +3136,9 @@ function GrapesPageEditor({
|
|
|
3122
3136
|
}, autosaveIntervalMs);
|
|
3123
3137
|
});
|
|
3124
3138
|
editor.on("orion:component-history", (entry) => {
|
|
3139
|
+
if (!historyReadyRef.current) {
|
|
3140
|
+
return;
|
|
3141
|
+
}
|
|
3125
3142
|
if (!entry || typeof entry !== "object" || !("component" in entry) || !("before" in entry) || !("after" in entry)) {
|
|
3126
3143
|
return;
|
|
3127
3144
|
}
|
|
@@ -3143,7 +3160,7 @@ function GrapesPageEditor({
|
|
|
3143
3160
|
);
|
|
3144
3161
|
});
|
|
3145
3162
|
editor.on("component:add", (component) => {
|
|
3146
|
-
if (historyRestoreActiveRef.current) {
|
|
3163
|
+
if (!historyReadyRef.current || historyRestoreActiveRef.current) {
|
|
3147
3164
|
return;
|
|
3148
3165
|
}
|
|
3149
3166
|
const typed = component;
|
|
@@ -3151,7 +3168,7 @@ function GrapesPageEditor({
|
|
|
3151
3168
|
return;
|
|
3152
3169
|
}
|
|
3153
3170
|
window.setTimeout(() => {
|
|
3154
|
-
if (historyRestoreActiveRef.current) {
|
|
3171
|
+
if (!historyReadyRef.current || historyRestoreActiveRef.current) {
|
|
3155
3172
|
return;
|
|
3156
3173
|
}
|
|
3157
3174
|
pushCustomHistoryEntry(null, snapshotComponent(typed));
|
|
@@ -1190,7 +1190,7 @@ var decorateBuilderSettingHelp = (root = document) => {
|
|
|
1190
1190
|
trigger.className = "orion-builder-v2-help-trigger";
|
|
1191
1191
|
trigger.dataset.builderHelpText = help;
|
|
1192
1192
|
trigger.role = "button";
|
|
1193
|
-
trigger.tabIndex =
|
|
1193
|
+
trigger.tabIndex = -1;
|
|
1194
1194
|
trigger.textContent = "?";
|
|
1195
1195
|
element.appendChild(trigger);
|
|
1196
1196
|
}
|
|
@@ -1232,6 +1232,7 @@ var decorateBuilderColorEyeDroppers = (root = document) => {
|
|
|
1232
1232
|
button.dataset.orionColorEyedropper = "true";
|
|
1233
1233
|
button.setAttribute("aria-label", "Pick color from screen");
|
|
1234
1234
|
button.setAttribute("title", "Pick color from screen");
|
|
1235
|
+
button.tabIndex = -1;
|
|
1235
1236
|
button.innerHTML = '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M14.7 4.3a2.4 2.4 0 0 1 3.4 0l1.6 1.6a2.4 2.4 0 0 1 0 3.4l-1.2 1.2 1 1a1 1 0 1 1-1.4 1.4l-1-1-8.9 8.9H4v-4.2l8.9-8.9-1-1a1 1 0 0 1 1.4-1.4l1 1 1.4-1.4Zm-.4 4.8-8.3 8.3V19h1.6l8.3-8.3-1.6-1.6Z" fill="currentColor"/></svg>';
|
|
1236
1237
|
swatch.insertAdjacentElement("afterend", button);
|
|
1237
1238
|
});
|
|
@@ -1249,6 +1250,7 @@ var decorateBuilderNumericSteppers = (root = document) => {
|
|
|
1249
1250
|
return;
|
|
1250
1251
|
}
|
|
1251
1252
|
field.classList.add("has-orion-builder-stepper");
|
|
1253
|
+
field.querySelector("select")?.setAttribute("tabindex", "-1");
|
|
1252
1254
|
const stepper = document.createElement("span");
|
|
1253
1255
|
stepper.className = "orion-builder-v2-stepper";
|
|
1254
1256
|
const updateValue = (direction) => {
|
|
@@ -1266,6 +1268,7 @@ var decorateBuilderNumericSteppers = (root = document) => {
|
|
|
1266
1268
|
button.type = "button";
|
|
1267
1269
|
button.className = `orion-builder-v2-stepper-button ${step.className}`;
|
|
1268
1270
|
button.setAttribute("aria-label", `${step.label} ${property.replace(/-/g, " ")}`);
|
|
1271
|
+
button.tabIndex = -1;
|
|
1269
1272
|
button.textContent = step.text;
|
|
1270
1273
|
button.addEventListener("click", (event) => {
|
|
1271
1274
|
event.preventDefault();
|
|
@@ -2018,6 +2021,7 @@ function GrapesPageEditor({
|
|
|
2018
2021
|
const stylePanelEditActiveRef = useRef(false);
|
|
2019
2022
|
const historyRestoreActiveRef = useRef(false);
|
|
2020
2023
|
const stylePanelHistoryBeforeRef = useRef(null);
|
|
2024
|
+
const historyReadyRef = useRef(false);
|
|
2021
2025
|
const lastComponentSnapshotRef = useRef(/* @__PURE__ */ new WeakMap());
|
|
2022
2026
|
const customUndoStackRef = useRef([]);
|
|
2023
2027
|
const customRedoStackRef = useRef([]);
|
|
@@ -2978,8 +2982,18 @@ function GrapesPageEditor({
|
|
|
2978
2982
|
registerOrionBuilderV2Blocks(editor);
|
|
2979
2983
|
}
|
|
2980
2984
|
registerProjectDynamicComponents(editor, adapter);
|
|
2985
|
+
historyReadyRef.current = false;
|
|
2981
2986
|
editor.loadProjectData(projectData);
|
|
2982
2987
|
void loadPayloadMediaAssets(editor);
|
|
2988
|
+
window.setTimeout(() => {
|
|
2989
|
+
customUndoStackRef.current = [];
|
|
2990
|
+
customRedoStackRef.current = [];
|
|
2991
|
+
lastComponentSnapshotRef.current = /* @__PURE__ */ new WeakMap();
|
|
2992
|
+
clearNativeUndoHistory();
|
|
2993
|
+
editor.clearDirtyCount?.();
|
|
2994
|
+
updateHistoryState(editor);
|
|
2995
|
+
historyReadyRef.current = true;
|
|
2996
|
+
}, 0);
|
|
2983
2997
|
editor.on("update", () => {
|
|
2984
2998
|
const hasDirtyChanges = editor.getDirtyCount() > 0;
|
|
2985
2999
|
refreshSelectedState(selectedComponentRef.current);
|
|
@@ -2998,6 +3012,9 @@ function GrapesPageEditor({
|
|
|
2998
3012
|
}, autosaveIntervalMs);
|
|
2999
3013
|
});
|
|
3000
3014
|
editor.on("orion:component-history", (entry) => {
|
|
3015
|
+
if (!historyReadyRef.current) {
|
|
3016
|
+
return;
|
|
3017
|
+
}
|
|
3001
3018
|
if (!entry || typeof entry !== "object" || !("component" in entry) || !("before" in entry) || !("after" in entry)) {
|
|
3002
3019
|
return;
|
|
3003
3020
|
}
|
|
@@ -3019,7 +3036,7 @@ function GrapesPageEditor({
|
|
|
3019
3036
|
);
|
|
3020
3037
|
});
|
|
3021
3038
|
editor.on("component:add", (component) => {
|
|
3022
|
-
if (historyRestoreActiveRef.current) {
|
|
3039
|
+
if (!historyReadyRef.current || historyRestoreActiveRef.current) {
|
|
3023
3040
|
return;
|
|
3024
3041
|
}
|
|
3025
3042
|
const typed = component;
|
|
@@ -3027,7 +3044,7 @@ function GrapesPageEditor({
|
|
|
3027
3044
|
return;
|
|
3028
3045
|
}
|
|
3029
3046
|
window.setTimeout(() => {
|
|
3030
|
-
if (historyRestoreActiveRef.current) {
|
|
3047
|
+
if (!historyReadyRef.current || historyRestoreActiveRef.current) {
|
|
3031
3048
|
return;
|
|
3032
3049
|
}
|
|
3033
3050
|
pushCustomHistoryEntry(null, snapshotComponent(typed));
|
package/dist/index.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
admin_exports
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JC3UV74N.mjs";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
admin_app_exports
|
|
6
|
+
} from "./chunk-RKTIFEUY.mjs";
|
|
7
|
+
import "./chunk-W2UOCJDX.mjs";
|
|
8
8
|
import {
|
|
9
9
|
blocks_exports
|
|
10
10
|
} from "./chunk-JQAHXYAM.mjs";
|
|
11
11
|
import {
|
|
12
|
-
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
nextjs_exports
|
|
13
|
+
} from "./chunk-ZADL33R6.mjs";
|
|
14
|
+
import "./chunk-ZTXJG4K5.mjs";
|
|
15
15
|
import {
|
|
16
16
|
studio_pages_exports
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-7ZMXZRBP.mjs";
|
|
17
|
+
} from "./chunk-NGLIA2OE.mjs";
|
|
19
18
|
import "./chunk-OQSEJXC4.mjs";
|
|
19
|
+
import "./chunk-7ZMXZRBP.mjs";
|
|
20
20
|
import {
|
|
21
21
|
studio_exports
|
|
22
22
|
} from "./chunk-ADIIWIYL.mjs";
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
pageStudioModuleManifest,
|
|
8
8
|
resolveBuilderThemeTokens,
|
|
9
9
|
toEditorInitialDoc
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-NGLIA2OE.mjs";
|
|
11
|
+
import "../chunk-OQSEJXC4.mjs";
|
|
11
12
|
import {
|
|
12
13
|
createDefaultStudioDocument,
|
|
13
14
|
defaultBuilderThemeTokens,
|
|
14
15
|
layoutToStudioDocument,
|
|
15
16
|
studioDocumentToLayout
|
|
16
17
|
} from "../chunk-7ZMXZRBP.mjs";
|
|
17
|
-
import "../chunk-OQSEJXC4.mjs";
|
|
18
18
|
import "../chunk-ADIIWIYL.mjs";
|
|
19
19
|
import "../chunk-6BWS3CLP.mjs";
|
|
20
20
|
export {
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
adminNavIcons
|
|
3
|
+
} from "./chunk-W2UOCJDX.mjs";
|
|
1
4
|
import {
|
|
2
5
|
SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM,
|
|
3
6
|
SOCIAL_MEDIA_ICON_OPTIONS,
|
|
4
7
|
SOCIAL_MEDIA_PLATFORMS,
|
|
5
8
|
SOCIAL_MEDIA_PLATFORM_LABELS
|
|
6
9
|
} from "./chunk-ZTXJG4K5.mjs";
|
|
7
|
-
import {
|
|
8
|
-
adminNavIcons
|
|
9
|
-
} from "./chunk-W2UOCJDX.mjs";
|
|
10
10
|
import {
|
|
11
11
|
__export,
|
|
12
12
|
__require
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sectionStyleDefaults
|
|
3
|
+
} from "./chunk-OQSEJXC4.mjs";
|
|
1
4
|
import {
|
|
2
5
|
createDefaultStudioDocument,
|
|
3
6
|
defaultBuilderThemeTokens,
|
|
@@ -5,9 +8,6 @@ import {
|
|
|
5
8
|
migrateBlockToSettingsV2,
|
|
6
9
|
studioDocumentToLayout
|
|
7
10
|
} from "./chunk-7ZMXZRBP.mjs";
|
|
8
|
-
import {
|
|
9
|
-
sectionStyleDefaults
|
|
10
|
-
} from "./chunk-OQSEJXC4.mjs";
|
|
11
11
|
import {
|
|
12
12
|
assertStudioDocumentV1,
|
|
13
13
|
compileStudioDocument,
|