@orion-studios/payload-studio 0.5.0-beta.75 → 0.5.0-beta.76
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/{chunk-HXGAG6I7.mjs → chunk-ADIIWIYL.mjs} +0 -3
- package/dist/{chunk-C6VEFZVY.mjs → chunk-C2NV4VHU.mjs} +31 -1
- package/dist/{chunk-6H4JTVPY.mjs → chunk-J25NGORF.mjs} +4 -4
- package/dist/index.js +28 -4
- package/dist/index.mjs +5 -5
- package/dist/nextjs/index.mjs +3 -3
- package/dist/studio/index.js +0 -3
- package/dist/studio/index.mjs +1 -1
- package/dist/studio-pages/client.js +780 -755
- package/dist/studio-pages/client.mjs +772 -747
- package/dist/studio-pages/index.js +83 -1
- package/dist/studio-pages/index.mjs +2 -1
- package/package.json +1 -1
|
@@ -299,9 +299,6 @@ function compileStudioDocument(document, modules) {
|
|
|
299
299
|
}
|
|
300
300
|
function migrateStudioDocument(value, migrations) {
|
|
301
301
|
const sorted = [...migrations].sort((a, b) => a.fromVersion - b.fromVersion);
|
|
302
|
-
if (isRecord(value) && value.schemaVersion === 1) {
|
|
303
|
-
return assertStudioDocumentV1(value);
|
|
304
|
-
}
|
|
305
302
|
let current = value;
|
|
306
303
|
for (const migration of sorted) {
|
|
307
304
|
if (!isRecord(current) || current.schemaVersion !== migration.fromVersion) {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sectionStyleDefaults
|
|
3
3
|
} from "./chunk-SIL2J5MF.mjs";
|
|
4
|
+
import {
|
|
5
|
+
assertStudioDocumentV1
|
|
6
|
+
} from "./chunk-ADIIWIYL.mjs";
|
|
4
7
|
import {
|
|
5
8
|
__export
|
|
6
9
|
} from "./chunk-6BWS3CLP.mjs";
|
|
@@ -745,6 +748,33 @@ var inspectorDefinitionByBlockType = {
|
|
|
745
748
|
// src/studio-pages/builder/settings-v2/BlockInspectorRenderer.tsx
|
|
746
749
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
747
750
|
|
|
751
|
+
// src/studio-pages/migrations.ts
|
|
752
|
+
var migratePageNodeToSettingsV2 = (node) => {
|
|
753
|
+
const normalized = migrateBlockToSettingsV2({
|
|
754
|
+
blockType: node.type,
|
|
755
|
+
...node.data
|
|
756
|
+
});
|
|
757
|
+
const { blockType: _ignoredBlockType, ...data } = normalized;
|
|
758
|
+
return {
|
|
759
|
+
...node,
|
|
760
|
+
data
|
|
761
|
+
};
|
|
762
|
+
};
|
|
763
|
+
var migratePageDocumentSettingsToV2 = (value) => {
|
|
764
|
+
const current = assertStudioDocumentV1(value);
|
|
765
|
+
return {
|
|
766
|
+
...current,
|
|
767
|
+
nodes: current.nodes.map(migratePageNodeToSettingsV2)
|
|
768
|
+
};
|
|
769
|
+
};
|
|
770
|
+
var pageStudioMigrations = [
|
|
771
|
+
{
|
|
772
|
+
fromVersion: 1,
|
|
773
|
+
migrate: migratePageDocumentSettingsToV2,
|
|
774
|
+
toVersion: 1
|
|
775
|
+
}
|
|
776
|
+
];
|
|
777
|
+
|
|
748
778
|
// src/studio-pages/index.ts
|
|
749
779
|
var withSectionStyleDefaults = (value) => ({
|
|
750
780
|
...sectionStyleDefaults,
|
|
@@ -994,7 +1024,7 @@ var pageStudioModuleManifest = {
|
|
|
994
1024
|
paletteGroups: pagePaletteGroups,
|
|
995
1025
|
inspectorPanels: pageInspectorPanels,
|
|
996
1026
|
validators: [validatePageDocument],
|
|
997
|
-
migrations:
|
|
1027
|
+
migrations: pageStudioMigrations,
|
|
998
1028
|
compiler: {
|
|
999
1029
|
compileNode: (node) => {
|
|
1000
1030
|
const normalized = migrateBlockToSettingsV2({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
assertStudioDocumentV1
|
|
3
|
-
} from "./chunk-HXGAG6I7.mjs";
|
|
4
1
|
import {
|
|
5
2
|
studioDocumentToLayout
|
|
6
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-C2NV4VHU.mjs";
|
|
4
|
+
import {
|
|
5
|
+
assertStudioDocumentV1
|
|
6
|
+
} from "./chunk-ADIIWIYL.mjs";
|
|
7
7
|
import {
|
|
8
8
|
__export
|
|
9
9
|
} from "./chunk-6BWS3CLP.mjs";
|
package/dist/index.js
CHANGED
|
@@ -2685,9 +2685,6 @@ function compileStudioDocument(document, modules) {
|
|
|
2685
2685
|
}
|
|
2686
2686
|
function migrateStudioDocument(value, migrations) {
|
|
2687
2687
|
const sorted = [...migrations].sort((a, b) => a.fromVersion - b.fromVersion);
|
|
2688
|
-
if (isRecord(value) && value.schemaVersion === 1) {
|
|
2689
|
-
return assertStudioDocumentV1(value);
|
|
2690
|
-
}
|
|
2691
2688
|
let current = value;
|
|
2692
2689
|
for (const migration of sorted) {
|
|
2693
2690
|
if (!isRecord(current) || current.schemaVersion !== migration.fromVersion) {
|
|
@@ -3438,6 +3435,33 @@ var inspectorDefinitionByBlockType = {
|
|
|
3438
3435
|
// src/studio-pages/builder/settings-v2/BlockInspectorRenderer.tsx
|
|
3439
3436
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
3440
3437
|
|
|
3438
|
+
// src/studio-pages/migrations.ts
|
|
3439
|
+
var migratePageNodeToSettingsV2 = (node) => {
|
|
3440
|
+
const normalized = migrateBlockToSettingsV2({
|
|
3441
|
+
blockType: node.type,
|
|
3442
|
+
...node.data
|
|
3443
|
+
});
|
|
3444
|
+
const { blockType: _ignoredBlockType, ...data } = normalized;
|
|
3445
|
+
return {
|
|
3446
|
+
...node,
|
|
3447
|
+
data
|
|
3448
|
+
};
|
|
3449
|
+
};
|
|
3450
|
+
var migratePageDocumentSettingsToV2 = (value) => {
|
|
3451
|
+
const current = assertStudioDocumentV1(value);
|
|
3452
|
+
return {
|
|
3453
|
+
...current,
|
|
3454
|
+
nodes: current.nodes.map(migratePageNodeToSettingsV2)
|
|
3455
|
+
};
|
|
3456
|
+
};
|
|
3457
|
+
var pageStudioMigrations = [
|
|
3458
|
+
{
|
|
3459
|
+
fromVersion: 1,
|
|
3460
|
+
migrate: migratePageDocumentSettingsToV2,
|
|
3461
|
+
toVersion: 1
|
|
3462
|
+
}
|
|
3463
|
+
];
|
|
3464
|
+
|
|
3441
3465
|
// src/studio-pages/index.ts
|
|
3442
3466
|
var withSectionStyleDefaults = (value) => ({
|
|
3443
3467
|
...sectionStyleDefaults,
|
|
@@ -3687,7 +3711,7 @@ var pageStudioModuleManifest = {
|
|
|
3687
3711
|
paletteGroups: pagePaletteGroups,
|
|
3688
3712
|
inspectorPanels: pageInspectorPanels,
|
|
3689
3713
|
validators: [validatePageDocument],
|
|
3690
|
-
migrations:
|
|
3714
|
+
migrations: pageStudioMigrations,
|
|
3691
3715
|
compiler: {
|
|
3692
3716
|
compileNode: (node) => {
|
|
3693
3717
|
const normalized = migrateBlockToSettingsV2({
|
package/dist/index.mjs
CHANGED
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
} from "./chunk-XK3K5GRP.mjs";
|
|
10
10
|
import {
|
|
11
11
|
nextjs_exports
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import {
|
|
14
|
-
studio_exports
|
|
15
|
-
} from "./chunk-HXGAG6I7.mjs";
|
|
12
|
+
} from "./chunk-J25NGORF.mjs";
|
|
16
13
|
import {
|
|
17
14
|
studio_pages_exports
|
|
18
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-C2NV4VHU.mjs";
|
|
19
16
|
import "./chunk-SIL2J5MF.mjs";
|
|
17
|
+
import {
|
|
18
|
+
studio_exports
|
|
19
|
+
} from "./chunk-ADIIWIYL.mjs";
|
|
20
20
|
import "./chunk-6BWS3CLP.mjs";
|
|
21
21
|
export {
|
|
22
22
|
admin_exports as admin,
|
package/dist/nextjs/index.mjs
CHANGED
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
createPayloadClient,
|
|
5
5
|
createSiteQueries,
|
|
6
6
|
resolveMedia
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-C6VEFZVY.mjs";
|
|
7
|
+
} from "../chunk-J25NGORF.mjs";
|
|
8
|
+
import "../chunk-C2NV4VHU.mjs";
|
|
10
9
|
import "../chunk-SIL2J5MF.mjs";
|
|
10
|
+
import "../chunk-ADIIWIYL.mjs";
|
|
11
11
|
import "../chunk-6BWS3CLP.mjs";
|
|
12
12
|
export {
|
|
13
13
|
WEBSITE_CONTENT_TAG,
|
package/dist/studio/index.js
CHANGED
|
@@ -315,9 +315,6 @@ function compileStudioDocument(document, modules) {
|
|
|
315
315
|
}
|
|
316
316
|
function migrateStudioDocument(value, migrations) {
|
|
317
317
|
const sorted = [...migrations].sort((a, b) => a.fromVersion - b.fromVersion);
|
|
318
|
-
if (isRecord(value) && value.schemaVersion === 1) {
|
|
319
|
-
return assertStudioDocumentV1(value);
|
|
320
|
-
}
|
|
321
318
|
let current = value;
|
|
322
319
|
for (const migration of sorted) {
|
|
323
320
|
if (!isRecord(current) || current.schemaVersion !== migration.fromVersion) {
|
package/dist/studio/index.mjs
CHANGED