@amplifyup/sdk 0.1.64 → 0.1.66
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/AmplifyRenderer.js +15 -6
- package/dist/AmplifyRenderer.js.map +1 -1
- package/dist/AmplifyRenderer.mjs +15 -6
- package/dist/AmplifyRenderer.mjs.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -1
- package/dist/index.mjs.map +1 -1
- package/dist/react.js +85 -35
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +85 -35
- package/dist/react.mjs.map +1 -1
- package/dist/server.js +10 -1
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +10 -1
- package/dist/server.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -423,9 +423,14 @@ function isFieldEnvelope(value) {
|
|
|
423
423
|
const rec = value;
|
|
424
424
|
return typeof rec.name === "string" && "value" in rec && !("url" in rec);
|
|
425
425
|
}
|
|
426
|
+
function isPageResourceSentinel(value) {
|
|
427
|
+
return !!value && typeof value === "object" && !Array.isArray(value) && typeof value.__amplifyupPageResource === "string";
|
|
428
|
+
}
|
|
426
429
|
function isPortableImageShape(value) {
|
|
427
430
|
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
428
|
-
|
|
431
|
+
if ("url" in value) return true;
|
|
432
|
+
const rec = value;
|
|
433
|
+
return rec._type === "image" || rec.asset != null;
|
|
429
434
|
}
|
|
430
435
|
function isIdentifierKey(key) {
|
|
431
436
|
return IDENTIFIER_KEYS.has(key);
|
|
@@ -523,6 +528,10 @@ function toFieldEnvelopes(source, prefix = "", scope) {
|
|
|
523
528
|
continue;
|
|
524
529
|
}
|
|
525
530
|
const path = joinPath(prefix, key);
|
|
531
|
+
if (isPageResourceSentinel(raw)) {
|
|
532
|
+
out[key] = withLeaf({ value: raw, name: path }, ctx);
|
|
533
|
+
continue;
|
|
534
|
+
}
|
|
526
535
|
if (isFieldEnvelope(raw)) {
|
|
527
536
|
const inner = raw.value;
|
|
528
537
|
if (isRecordList(inner)) {
|