@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260402063318 → 0.8.1-dev.20260402071330
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.js +13 -8
- package/dist/index.mjs +13 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5128,10 +5128,12 @@ var parseMaybeNumber = (value) => {
|
|
|
5128
5128
|
};
|
|
5129
5129
|
var shouldRenderForDevice = (imageDevice, currentDevice) => {
|
|
5130
5130
|
if (!imageDevice) return true;
|
|
5131
|
-
|
|
5132
|
-
return false;
|
|
5131
|
+
return imageDevice === currentDevice;
|
|
5133
5132
|
};
|
|
5134
5133
|
var ImageGalleryNode = (props) => {
|
|
5134
|
+
console.log("Gallery Component Loaded");
|
|
5135
|
+
console.log("Current Device:", props.device);
|
|
5136
|
+
console.log("Gallery Images:", props.node.images);
|
|
5135
5137
|
const resolveImageUrl = (imageUrl) => {
|
|
5136
5138
|
if (!imageUrl) return "";
|
|
5137
5139
|
if (imageUrl.startsWith("http")) return imageUrl;
|
|
@@ -5143,19 +5145,22 @@ var ImageGalleryNode = (props) => {
|
|
|
5143
5145
|
if (!posterUrl) return void 0;
|
|
5144
5146
|
return AssetUtility_default.resolveUrl(props.assetBaseUrl, posterUrl);
|
|
5145
5147
|
};
|
|
5146
|
-
const currentDevice = props.device;
|
|
5147
5148
|
const images = Array.isArray(props.node.images) ? props.node.images : [];
|
|
5148
|
-
const visibleImages = images.filter(
|
|
5149
|
-
(img) => shouldRenderForDevice(img.device, currentDevice)
|
|
5150
|
-
);
|
|
5151
|
-
if (visibleImages.length === 0) return null;
|
|
5152
5149
|
const FormatClass = {
|
|
5153
5150
|
center: "justify-center",
|
|
5154
5151
|
left: "justify-start",
|
|
5155
5152
|
right: "justify-end"
|
|
5156
5153
|
};
|
|
5157
5154
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
5158
|
-
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: `flex flex-wrap gap-4 ${formatClasses}`, children:
|
|
5155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: `flex flex-wrap gap-4 ${formatClasses}`, children: images.map((img, idx) => {
|
|
5156
|
+
console.log("Checking Image:", img.imageUrl);
|
|
5157
|
+
console.log("Image Device:", img.device);
|
|
5158
|
+
console.log("Page Device:", props.device);
|
|
5159
|
+
if (!shouldRenderForDevice(img.device, props.device)) {
|
|
5160
|
+
console.log("\u274C Skipping Image (device mismatch)");
|
|
5161
|
+
return null;
|
|
5162
|
+
}
|
|
5163
|
+
console.log("\u2705 Rendering Image");
|
|
5159
5164
|
const imageUrl = resolveImageUrl(img.imageUrl);
|
|
5160
5165
|
if (!imageUrl) return null;
|
|
5161
5166
|
const posterUrl = resolvePosterUrl(img.posterUrl);
|
package/dist/index.mjs
CHANGED
|
@@ -4160,10 +4160,12 @@ var parseMaybeNumber = (value) => {
|
|
|
4160
4160
|
};
|
|
4161
4161
|
var shouldRenderForDevice = (imageDevice, currentDevice) => {
|
|
4162
4162
|
if (!imageDevice) return true;
|
|
4163
|
-
|
|
4164
|
-
return false;
|
|
4163
|
+
return imageDevice === currentDevice;
|
|
4165
4164
|
};
|
|
4166
4165
|
var ImageGalleryNode = (props) => {
|
|
4166
|
+
console.log("Gallery Component Loaded");
|
|
4167
|
+
console.log("Current Device:", props.device);
|
|
4168
|
+
console.log("Gallery Images:", props.node.images);
|
|
4167
4169
|
const resolveImageUrl = (imageUrl) => {
|
|
4168
4170
|
if (!imageUrl) return "";
|
|
4169
4171
|
if (imageUrl.startsWith("http")) return imageUrl;
|
|
@@ -4175,19 +4177,22 @@ var ImageGalleryNode = (props) => {
|
|
|
4175
4177
|
if (!posterUrl) return void 0;
|
|
4176
4178
|
return AssetUtility_default.resolveUrl(props.assetBaseUrl, posterUrl);
|
|
4177
4179
|
};
|
|
4178
|
-
const currentDevice = props.device;
|
|
4179
4180
|
const images = Array.isArray(props.node.images) ? props.node.images : [];
|
|
4180
|
-
const visibleImages = images.filter(
|
|
4181
|
-
(img) => shouldRenderForDevice(img.device, currentDevice)
|
|
4182
|
-
);
|
|
4183
|
-
if (visibleImages.length === 0) return null;
|
|
4184
4181
|
const FormatClass = {
|
|
4185
4182
|
center: "justify-center",
|
|
4186
4183
|
left: "justify-start",
|
|
4187
4184
|
right: "justify-end"
|
|
4188
4185
|
};
|
|
4189
4186
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
4190
|
-
return /* @__PURE__ */ jsx58("div", { className: `flex flex-wrap gap-4 ${formatClasses}`, children:
|
|
4187
|
+
return /* @__PURE__ */ jsx58("div", { className: `flex flex-wrap gap-4 ${formatClasses}`, children: images.map((img, idx) => {
|
|
4188
|
+
console.log("Checking Image:", img.imageUrl);
|
|
4189
|
+
console.log("Image Device:", img.device);
|
|
4190
|
+
console.log("Page Device:", props.device);
|
|
4191
|
+
if (!shouldRenderForDevice(img.device, props.device)) {
|
|
4192
|
+
console.log("\u274C Skipping Image (device mismatch)");
|
|
4193
|
+
return null;
|
|
4194
|
+
}
|
|
4195
|
+
console.log("\u2705 Rendering Image");
|
|
4191
4196
|
const imageUrl = resolveImageUrl(img.imageUrl);
|
|
4192
4197
|
if (!imageUrl) return null;
|
|
4193
4198
|
const posterUrl = resolvePosterUrl(img.posterUrl);
|
package/package.json
CHANGED