@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260328113654 → 0.8.1-dev.20260402052726

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 CHANGED
@@ -5161,6 +5161,11 @@ var ImageGalleryNode = (props) => {
5161
5161
  const intrinsicHeight = parseMaybeNumber(img.intrinsicHeight);
5162
5162
  const isHls = imageUrl.endsWith(".m3u8");
5163
5163
  const alt = img.title || "Gallery image";
5164
+ const styles = {};
5165
+ if (img.height) styles.height = img.height;
5166
+ if (img.borderRadius)
5167
+ styles.borderRadius = img.borderRadius;
5168
+ if (img.width) styles.width = img.width;
5164
5169
  return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "max-w-full", children: isHls ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5165
5170
  HlsPlayer1,
5166
5171
  {
@@ -5180,6 +5185,7 @@ var ImageGalleryNode = (props) => {
5180
5185
  "img",
5181
5186
  {
5182
5187
  loading: "lazy",
5188
+ style: styles,
5183
5189
  className: "object-cover max-w-full",
5184
5190
  src: imageUrl,
5185
5191
  width: intrinsicWidth,
@@ -5245,17 +5251,13 @@ function generateCompleteBackgroundString(layers, apiBaseUrl) {
5245
5251
  return "";
5246
5252
  }).filter((bg) => bg.trim() !== "").join(", ");
5247
5253
  }
5248
- var generateCssString = (guid, stylesObject, mobileStylesObject) => {
5249
- {
5250
- }
5251
- const gridColumns = stylesObject.gridTemplateColumns ? stylesObject.gridTemplateColumns.match(/\d+/g) : [];
5252
- const hasGridProperties = gridColumns.length > 0;
5254
+ var generateCssString = (guid, stylesObject, tabletStylesObject, mobileStylesObject) => {
5255
+ const gridColumns = stylesObject?.gridTemplateColumns ? String(stylesObject.gridTemplateColumns).match(/\d+/g) ?? [] : [];
5256
+ const hasGridProperties = (gridColumns?.length ?? 0) > 0;
5253
5257
  const largeCols = hasGridProperties ? parseInt(gridColumns[0]) : 4;
5254
5258
  const tabletColumns = hasGridProperties ? Math.ceil(parseInt(gridColumns[0]) / 2) : 2;
5255
5259
  const mobileColumns = 1;
5256
- {
5257
- }
5258
- const cssRules = Object.entries(stylesObject).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
5260
+ const cssRules = Object.entries(stylesObject || {}).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
5259
5261
  const cssKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
5260
5262
  return `${cssKey}: ${value};`;
5261
5263
  });
@@ -5264,6 +5266,20 @@ ${cssRules.join(
5264
5266
  "\n"
5265
5267
  )}
5266
5268
  transition: all 0.3s ease-in-out; }`;
5269
+ if (tabletStylesObject) {
5270
+ const tabletCssRules = Object.entries(tabletStylesObject).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
5271
+ const cssKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
5272
+ return `${cssKey}: ${value};`;
5273
+ });
5274
+ if (tabletCssRules.length > 0) {
5275
+ css += `
5276
+ @media (max-width: 768px) {
5277
+ #${guid} {
5278
+ ${tabletCssRules.join("\n")}
5279
+ }
5280
+ }`;
5281
+ }
5282
+ }
5267
5283
  if (mobileStylesObject) {
5268
5284
  const mobileCssRules = Object.entries(mobileStylesObject).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
5269
5285
  const cssKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
@@ -5271,28 +5287,39 @@ ${cssRules.join(
5271
5287
  });
5272
5288
  if (mobileCssRules.length > 0) {
5273
5289
  css += `
5274
- @media (max-width: 480px) { #${guid} {
5275
- ${mobileCssRules.join(
5276
- "\n"
5277
- )}
5278
- } }`;
5290
+ @media (max-width: 480px) {
5291
+ #${guid} {
5292
+ ${mobileCssRules.join("\n")}
5293
+ }
5294
+ }`;
5279
5295
  }
5280
5296
  }
5281
5297
  if (hasGridProperties) {
5282
- css += `
5283
- @media (max-width: 1279px) { #${guid} { grid-template-columns: repeat(${tabletColumns}, minmax(0, 1fr)); } }`;
5284
- css += `
5285
- @media (max-width: 768px) { #${guid} { grid-template-columns: repeat(${tabletColumns}, minmax(0, 1fr)); } }`;
5286
- css += `
5287
- @media (max-width: 480px) { #${guid} { grid-template-columns: repeat(${mobileColumns}, minmax(0, 1fr)); } }`;
5298
+ const tabletHasGrid = tabletStylesObject?.gridTemplateColumns !== void 0;
5299
+ const mobileHasGrid = mobileStylesObject?.gridTemplateColumns !== void 0;
5300
+ if (!tabletHasGrid) {
5301
+ css += `
5302
+ @media (max-width: 768px) {
5303
+ #${guid} {
5304
+ grid-template-columns: repeat(${tabletColumns}, minmax(0, 1fr));
5305
+ }
5306
+ }`;
5307
+ }
5308
+ if (!mobileHasGrid) {
5309
+ css += `
5310
+ @media (max-width: 480px) {
5311
+ #${guid} {
5312
+ grid-template-columns: repeat(${mobileColumns}, minmax(0, 1fr));
5313
+ }
5314
+ }`;
5315
+ }
5288
5316
  }
5289
- const output = {
5317
+ return {
5290
5318
  css,
5291
5319
  gridColsLarge: largeCols,
5292
5320
  gridColsMedium: tabletColumns,
5293
5321
  gridColsSmall: mobileColumns
5294
5322
  };
5295
- return output;
5296
5323
  };
5297
5324
  var DivContainer = async (props) => {
5298
5325
  const NodeTypes2 = {
@@ -5313,6 +5340,7 @@ var DivContainer = async (props) => {
5313
5340
  };
5314
5341
  const styles = props.node.cssProperties;
5315
5342
  const mobileStyles = props.node.mobileCssProperties;
5343
+ const tabletStyles = props.node.tabletCssProperties;
5316
5344
  const dataBindingProperties = props.node.dataBinding;
5317
5345
  const updatedStyles = convertKeysToCamelCase(styles);
5318
5346
  const background = generateCompleteBackgroundString(props.node.backgroundLayers, props.assetBaseUrl);
@@ -5383,7 +5411,12 @@ var DivContainer = async (props) => {
5383
5411
  childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
5384
5412
  }
5385
5413
  }
5386
- const cssResult = generateCssString(guid, updatedStyle, mobileStyles);
5414
+ const cssResult = generateCssString(
5415
+ guid,
5416
+ updatedStyle,
5417
+ tabletStyles,
5418
+ mobileStyles
5419
+ );
5387
5420
  function renderNode(node, props2, dataitem, key, href) {
5388
5421
  {
5389
5422
  }
package/dist/index.mjs CHANGED
@@ -4193,6 +4193,11 @@ var ImageGalleryNode = (props) => {
4193
4193
  const intrinsicHeight = parseMaybeNumber(img.intrinsicHeight);
4194
4194
  const isHls = imageUrl.endsWith(".m3u8");
4195
4195
  const alt = img.title || "Gallery image";
4196
+ const styles = {};
4197
+ if (img.height) styles.height = img.height;
4198
+ if (img.borderRadius)
4199
+ styles.borderRadius = img.borderRadius;
4200
+ if (img.width) styles.width = img.width;
4196
4201
  return /* @__PURE__ */ jsx58("div", { className: "max-w-full", children: isHls ? /* @__PURE__ */ jsx58(
4197
4202
  HlsPlayer1,
4198
4203
  {
@@ -4212,6 +4217,7 @@ var ImageGalleryNode = (props) => {
4212
4217
  "img",
4213
4218
  {
4214
4219
  loading: "lazy",
4220
+ style: styles,
4215
4221
  className: "object-cover max-w-full",
4216
4222
  src: imageUrl,
4217
4223
  width: intrinsicWidth,
@@ -4277,17 +4283,13 @@ function generateCompleteBackgroundString(layers, apiBaseUrl) {
4277
4283
  return "";
4278
4284
  }).filter((bg) => bg.trim() !== "").join(", ");
4279
4285
  }
4280
- var generateCssString = (guid, stylesObject, mobileStylesObject) => {
4281
- {
4282
- }
4283
- const gridColumns = stylesObject.gridTemplateColumns ? stylesObject.gridTemplateColumns.match(/\d+/g) : [];
4284
- const hasGridProperties = gridColumns.length > 0;
4286
+ var generateCssString = (guid, stylesObject, tabletStylesObject, mobileStylesObject) => {
4287
+ const gridColumns = stylesObject?.gridTemplateColumns ? String(stylesObject.gridTemplateColumns).match(/\d+/g) ?? [] : [];
4288
+ const hasGridProperties = (gridColumns?.length ?? 0) > 0;
4285
4289
  const largeCols = hasGridProperties ? parseInt(gridColumns[0]) : 4;
4286
4290
  const tabletColumns = hasGridProperties ? Math.ceil(parseInt(gridColumns[0]) / 2) : 2;
4287
4291
  const mobileColumns = 1;
4288
- {
4289
- }
4290
- const cssRules = Object.entries(stylesObject).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
4292
+ const cssRules = Object.entries(stylesObject || {}).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
4291
4293
  const cssKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
4292
4294
  return `${cssKey}: ${value};`;
4293
4295
  });
@@ -4296,6 +4298,20 @@ ${cssRules.join(
4296
4298
  "\n"
4297
4299
  )}
4298
4300
  transition: all 0.3s ease-in-out; }`;
4301
+ if (tabletStylesObject) {
4302
+ const tabletCssRules = Object.entries(tabletStylesObject).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
4303
+ const cssKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
4304
+ return `${cssKey}: ${value};`;
4305
+ });
4306
+ if (tabletCssRules.length > 0) {
4307
+ css += `
4308
+ @media (max-width: 768px) {
4309
+ #${guid} {
4310
+ ${tabletCssRules.join("\n")}
4311
+ }
4312
+ }`;
4313
+ }
4314
+ }
4299
4315
  if (mobileStylesObject) {
4300
4316
  const mobileCssRules = Object.entries(mobileStylesObject).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
4301
4317
  const cssKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
@@ -4303,28 +4319,39 @@ ${cssRules.join(
4303
4319
  });
4304
4320
  if (mobileCssRules.length > 0) {
4305
4321
  css += `
4306
- @media (max-width: 480px) { #${guid} {
4307
- ${mobileCssRules.join(
4308
- "\n"
4309
- )}
4310
- } }`;
4322
+ @media (max-width: 480px) {
4323
+ #${guid} {
4324
+ ${mobileCssRules.join("\n")}
4325
+ }
4326
+ }`;
4311
4327
  }
4312
4328
  }
4313
4329
  if (hasGridProperties) {
4314
- css += `
4315
- @media (max-width: 1279px) { #${guid} { grid-template-columns: repeat(${tabletColumns}, minmax(0, 1fr)); } }`;
4316
- css += `
4317
- @media (max-width: 768px) { #${guid} { grid-template-columns: repeat(${tabletColumns}, minmax(0, 1fr)); } }`;
4318
- css += `
4319
- @media (max-width: 480px) { #${guid} { grid-template-columns: repeat(${mobileColumns}, minmax(0, 1fr)); } }`;
4330
+ const tabletHasGrid = tabletStylesObject?.gridTemplateColumns !== void 0;
4331
+ const mobileHasGrid = mobileStylesObject?.gridTemplateColumns !== void 0;
4332
+ if (!tabletHasGrid) {
4333
+ css += `
4334
+ @media (max-width: 768px) {
4335
+ #${guid} {
4336
+ grid-template-columns: repeat(${tabletColumns}, minmax(0, 1fr));
4337
+ }
4338
+ }`;
4339
+ }
4340
+ if (!mobileHasGrid) {
4341
+ css += `
4342
+ @media (max-width: 480px) {
4343
+ #${guid} {
4344
+ grid-template-columns: repeat(${mobileColumns}, minmax(0, 1fr));
4345
+ }
4346
+ }`;
4347
+ }
4320
4348
  }
4321
- const output = {
4349
+ return {
4322
4350
  css,
4323
4351
  gridColsLarge: largeCols,
4324
4352
  gridColsMedium: tabletColumns,
4325
4353
  gridColsSmall: mobileColumns
4326
4354
  };
4327
- return output;
4328
4355
  };
4329
4356
  var DivContainer = async (props) => {
4330
4357
  const NodeTypes2 = {
@@ -4345,6 +4372,7 @@ var DivContainer = async (props) => {
4345
4372
  };
4346
4373
  const styles = props.node.cssProperties;
4347
4374
  const mobileStyles = props.node.mobileCssProperties;
4375
+ const tabletStyles = props.node.tabletCssProperties;
4348
4376
  const dataBindingProperties = props.node.dataBinding;
4349
4377
  const updatedStyles = convertKeysToCamelCase(styles);
4350
4378
  const background = generateCompleteBackgroundString(props.node.backgroundLayers, props.assetBaseUrl);
@@ -4415,7 +4443,12 @@ var DivContainer = async (props) => {
4415
4443
  childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
4416
4444
  }
4417
4445
  }
4418
- const cssResult = generateCssString(guid, updatedStyle, mobileStyles);
4446
+ const cssResult = generateCssString(
4447
+ guid,
4448
+ updatedStyle,
4449
+ tabletStyles,
4450
+ mobileStyles
4451
+ );
4419
4452
  function renderNode(node, props2, dataitem, key, href) {
4420
4453
  {
4421
4454
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acoustte-digital-services/digitalstore-controls-dev",
3
- "version": "0.8.1-dev.20260328113654",
3
+ "version": "0.8.1-dev.20260402052726",
4
4
  "description": "Reusable React components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",