@elytracms/next 0.0.97 → 0.0.98
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.d.ts +10 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1415,7 +1415,16 @@ interface NextImageOptions {
|
|
|
1415
1415
|
*
|
|
1416
1416
|
* Which entry fills the role is decided by core's one registration rule (the first
|
|
1417
1417
|
* valid claimant — `ComponentRegistry.roleComponent('image')`), so the swap can
|
|
1418
|
-
* never land on a different entry than the one the registry resolves.
|
|
1418
|
+
* never land on a different entry than the one the registry resolves.
|
|
1419
|
+
*
|
|
1420
|
+
* It registers the list BEFORE `createElytraHost` resolves the entry through the config
|
|
1421
|
+
* gate, so it must not be the first place a broken list is read (EC-678): the
|
|
1422
|
+
* registration never throws — a malformed manifest is a located finding, and the gate
|
|
1423
|
+
* reads the same registration — so a broken list comes back from here unchanged and the
|
|
1424
|
+
* host's boot throws the gate's LOCATED error (`invalid-config-shape at
|
|
1425
|
+
* components.N.manifest.props.p: …`), the same one `elytra doctor` `config-valid` and the
|
|
1426
|
+
* studio report. (Measured on `6310b7b4`: a prop that was not a field-def threw here,
|
|
1427
|
+
* unlocated, before the gate ran.) Use it on
|
|
1419
1428
|
* the DELIVERY side only (the studio's canvas runs on Vite, where `next/image`
|
|
1420
1429
|
* does not exist) — the scaffold's host seam file does it in one line:
|
|
1421
1430
|
*
|
package/dist/index.js
CHANGED
|
@@ -1074,7 +1074,9 @@ function withNextImage(components, options = {}) {
|
|
|
1074
1074
|
const image = registerComponents(list).registry.roleComponent("image");
|
|
1075
1075
|
if (!image) return list;
|
|
1076
1076
|
const implementation = createNextImage(options);
|
|
1077
|
-
return list.map(
|
|
1077
|
+
return list.map(
|
|
1078
|
+
(entry) => entry?.manifest === image ? { manifest: entry.manifest, implementation } : entry
|
|
1079
|
+
);
|
|
1078
1080
|
}
|
|
1079
1081
|
function elytraHostImage(options = {}) {
|
|
1080
1082
|
return ({ asset, alt, className, priority, sizes, loading }) => /* @__PURE__ */ jsx(
|