@orion-studios/payload-studio 0.5.0-beta.0 → 0.5.0-beta.1

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/index.mjs CHANGED
@@ -4,18 +4,18 @@ import {
4
4
  import {
5
5
  admin_app_exports
6
6
  } from "./chunk-AAOHJDNS.mjs";
7
- import {
8
- blocks_exports
9
- } from "./chunk-PC5622T7.mjs";
10
- import {
11
- studio_exports
12
- } from "./chunk-N67KVM2S.mjs";
13
7
  import {
14
8
  nextjs_exports
15
9
  } from "./chunk-ZLLNO5FM.mjs";
16
10
  import {
17
11
  studio_pages_exports
18
12
  } from "./chunk-UJFU323N.mjs";
13
+ import {
14
+ studio_exports
15
+ } from "./chunk-N67KVM2S.mjs";
16
+ import {
17
+ blocks_exports
18
+ } from "./chunk-PC5622T7.mjs";
19
19
  import "./chunk-ETRRXURT.mjs";
20
20
  import "./chunk-6BWS3CLP.mjs";
21
21
  export {
@@ -735,7 +735,15 @@ var sectionStyleFromBlock = (block, pageDefaults) => {
735
735
  const contentGradient = `linear-gradient(${contentAngle}deg, ${contentPresetPair?.[0] || contentFrom} 0%, ${contentPresetPair?.[1] || contentTo} 100%)`;
736
736
  return {
737
737
  contentClass: `orion-builder-content is-${resolvedContentWidth}`,
738
- contentStyle: contentMode === "color" ? { background: contentColor } : contentMode === "gradient" ? { background: contentGradient } : {},
738
+ contentStyle: contentMode === "color" ? {
739
+ background: contentColor,
740
+ borderRadius: 20,
741
+ boxShadow: "0 8px 20px rgba(13, 74, 55, 0.08)"
742
+ } : contentMode === "gradient" ? {
743
+ background: contentGradient,
744
+ borderRadius: 20,
745
+ boxShadow: "0 8px 20px rgba(13, 74, 55, 0.08)"
746
+ } : {},
739
747
  sectionClass: `orion-builder-shell is-${sectionWidth} pad-${sectionPaddingY}`,
740
748
  sectionStyle: sectionMode === "color" ? { background: sectionColor } : sectionMode === "gradient" ? { background: sectionGradient } : {}
741
749
  };
@@ -1227,6 +1235,7 @@ function BuilderPageEditor({ initialDoc, pageID }) {
1227
1235
  const fallbackAlt = file.name.replace(/\.[^/.]+$/, "").trim();
1228
1236
  const resolvedAlt = uploadAltText.trim() || fallbackAlt || "Uploaded image";
1229
1237
  formData.set("_payload", JSON.stringify({ alt: resolvedAlt }));
1238
+ formData.set("alt", resolvedAlt);
1230
1239
  formData.set("file", file);
1231
1240
  const response = await fetch("/api/media", {
1232
1241
  body: formData,
@@ -1376,8 +1385,12 @@ function BuilderPageEditor({ initialDoc, pageID }) {
1376
1385
  }),
1377
1386
  [layout, pageDefaults]
1378
1387
  );
1388
+ const snapshotKey = (snapshot) => JSON.stringify({
1389
+ layout: toPersistedLayout(snapshot.layout),
1390
+ pageDefaults: snapshot.pageDefaults
1391
+ });
1379
1392
  const isDirty = (0, import_react.useMemo)(
1380
- () => JSON.stringify(currentSnapshot) !== JSON.stringify(lastSavedRef.current),
1393
+ () => snapshotKey(currentSnapshot) !== snapshotKey(lastSavedRef.current),
1381
1394
  [currentSnapshot]
1382
1395
  );
1383
1396
  const canUndo = pastSnapshots.length > 0;
@@ -707,7 +707,15 @@ var sectionStyleFromBlock = (block, pageDefaults) => {
707
707
  const contentGradient = `linear-gradient(${contentAngle}deg, ${contentPresetPair?.[0] || contentFrom} 0%, ${contentPresetPair?.[1] || contentTo} 100%)`;
708
708
  return {
709
709
  contentClass: `orion-builder-content is-${resolvedContentWidth}`,
710
- contentStyle: contentMode === "color" ? { background: contentColor } : contentMode === "gradient" ? { background: contentGradient } : {},
710
+ contentStyle: contentMode === "color" ? {
711
+ background: contentColor,
712
+ borderRadius: 20,
713
+ boxShadow: "0 8px 20px rgba(13, 74, 55, 0.08)"
714
+ } : contentMode === "gradient" ? {
715
+ background: contentGradient,
716
+ borderRadius: 20,
717
+ boxShadow: "0 8px 20px rgba(13, 74, 55, 0.08)"
718
+ } : {},
711
719
  sectionClass: `orion-builder-shell is-${sectionWidth} pad-${sectionPaddingY}`,
712
720
  sectionStyle: sectionMode === "color" ? { background: sectionColor } : sectionMode === "gradient" ? { background: sectionGradient } : {}
713
721
  };
@@ -1199,6 +1207,7 @@ function BuilderPageEditor({ initialDoc, pageID }) {
1199
1207
  const fallbackAlt = file.name.replace(/\.[^/.]+$/, "").trim();
1200
1208
  const resolvedAlt = uploadAltText.trim() || fallbackAlt || "Uploaded image";
1201
1209
  formData.set("_payload", JSON.stringify({ alt: resolvedAlt }));
1210
+ formData.set("alt", resolvedAlt);
1202
1211
  formData.set("file", file);
1203
1212
  const response = await fetch("/api/media", {
1204
1213
  body: formData,
@@ -1348,8 +1357,12 @@ function BuilderPageEditor({ initialDoc, pageID }) {
1348
1357
  }),
1349
1358
  [layout, pageDefaults]
1350
1359
  );
1360
+ const snapshotKey = (snapshot) => JSON.stringify({
1361
+ layout: toPersistedLayout(snapshot.layout),
1362
+ pageDefaults: snapshot.pageDefaults
1363
+ });
1351
1364
  const isDirty = useMemo(
1352
- () => JSON.stringify(currentSnapshot) !== JSON.stringify(lastSavedRef.current),
1365
+ () => snapshotKey(currentSnapshot) !== snapshotKey(lastSavedRef.current),
1353
1366
  [currentSnapshot]
1354
1367
  );
1355
1368
  const canUndo = pastSnapshots.length > 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orion-studios/payload-studio",
3
- "version": "0.5.0-beta.0",
3
+ "version": "0.5.0-beta.1",
4
4
  "description": "Unified Payload CMS toolkit for Orion Studios",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {