@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260714124630 → 0.8.1-dev.20260715061446

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
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  "use strict";
2
4
  var __create = Object.create;
3
5
  var __defProp = Object.defineProperty;
@@ -5340,6 +5342,17 @@ init_AssetUtility();
5340
5342
  init_ServiceClient();
5341
5343
 
5342
5344
  // src/components/utilities/AnimationUtility.tsx
5345
+ var normalizeSelector = (guid) => {
5346
+ const trimmedGuid = guid?.trim();
5347
+ if (!trimmedGuid) {
5348
+ return ".animation-fallback";
5349
+ }
5350
+ const baseValue = trimmedGuid.replace(/^#/, "").replace(/^\./, "");
5351
+ if (typeof CSS !== "undefined" && typeof CSS.escape === "function") {
5352
+ return `#${CSS.escape(baseValue)}`;
5353
+ }
5354
+ return `#${baseValue}`;
5355
+ };
5343
5356
  var AnimationUtility = class {
5344
5357
  static generateAnimationCSS(config, guid) {
5345
5358
  const {
@@ -5359,6 +5372,7 @@ var AnimationUtility = class {
5359
5372
  borderColor
5360
5373
  } = config;
5361
5374
  let base = "", visible = "", keyframes = "";
5375
+ const selector = normalizeSelector(guid);
5362
5376
  switch (config.animation) {
5363
5377
  case "Fade":
5364
5378
  base = `opacity:0; transition:opacity ${duration}ms ${easing} ${delay}ms;`;
@@ -5436,14 +5450,14 @@ background-color: ${backgroundColor};
5436
5450
  if (mode === "hover") {
5437
5451
  return `
5438
5452
  ${keyframes}
5439
- ${guid} { ${base} }
5440
- ${guid}:hover { ${visible} }
5453
+ ${selector} { ${base} }
5454
+ ${selector}:hover { ${visible} }
5441
5455
  `;
5442
5456
  } else {
5443
5457
  return `
5444
5458
  ${keyframes}
5445
- ${guid} { ${base} }
5446
- ${guid}.visible { ${visible} }
5459
+ ${selector} { ${base} }
5460
+ ${selector}.visible { ${visible} }
5447
5461
  `;
5448
5462
  }
5449
5463
  }
@@ -6575,6 +6589,7 @@ var DivContainer = async (props) => {
6575
6589
  }
6576
6590
  const updatedStyle = { ...updatedStyles };
6577
6591
  const guid = "css" + crypto.randomUUID().toLocaleLowerCase();
6592
+ const animationSelector = `#${guid}`;
6578
6593
  const { enterAnimation, exitAnimation, hoverAnimation } = props.node;
6579
6594
  let animationCSS = "";
6580
6595
  if (enterAnimation?.name) {
@@ -6584,7 +6599,7 @@ var DivContainer = async (props) => {
6584
6599
  mode: "enter",
6585
6600
  ...enterAnimation.properties
6586
6601
  },
6587
- `#${guid}`
6602
+ animationSelector
6588
6603
  );
6589
6604
  }
6590
6605
  if (hoverAnimation?.name) {
@@ -6594,7 +6609,7 @@ var DivContainer = async (props) => {
6594
6609
  mode: "hover",
6595
6610
  ...hoverAnimation.properties
6596
6611
  },
6597
- `#${guid}`
6612
+ animationSelector
6598
6613
  );
6599
6614
  }
6600
6615
  const isHidden = !shouldRenderContainer(
package/dist/index.mjs CHANGED
@@ -1206,6 +1206,17 @@ var EmbedNode = (props) => {
1206
1206
  var EmbedNode_default = EmbedNode;
1207
1207
 
1208
1208
  // src/components/utilities/AnimationUtility.tsx
1209
+ var normalizeSelector = (guid) => {
1210
+ const trimmedGuid = guid?.trim();
1211
+ if (!trimmedGuid) {
1212
+ return ".animation-fallback";
1213
+ }
1214
+ const baseValue = trimmedGuid.replace(/^#/, "").replace(/^\./, "");
1215
+ if (typeof CSS !== "undefined" && typeof CSS.escape === "function") {
1216
+ return `#${CSS.escape(baseValue)}`;
1217
+ }
1218
+ return `#${baseValue}`;
1219
+ };
1209
1220
  var AnimationUtility = class {
1210
1221
  static generateAnimationCSS(config, guid) {
1211
1222
  const {
@@ -1225,6 +1236,7 @@ var AnimationUtility = class {
1225
1236
  borderColor
1226
1237
  } = config;
1227
1238
  let base = "", visible = "", keyframes = "";
1239
+ const selector = normalizeSelector(guid);
1228
1240
  switch (config.animation) {
1229
1241
  case "Fade":
1230
1242
  base = `opacity:0; transition:opacity ${duration}ms ${easing} ${delay}ms;`;
@@ -1302,14 +1314,14 @@ background-color: ${backgroundColor};
1302
1314
  if (mode === "hover") {
1303
1315
  return `
1304
1316
  ${keyframes}
1305
- ${guid} { ${base} }
1306
- ${guid}:hover { ${visible} }
1317
+ ${selector} { ${base} }
1318
+ ${selector}:hover { ${visible} }
1307
1319
  `;
1308
1320
  } else {
1309
1321
  return `
1310
1322
  ${keyframes}
1311
- ${guid} { ${base} }
1312
- ${guid}.visible { ${visible} }
1323
+ ${selector} { ${base} }
1324
+ ${selector}.visible { ${visible} }
1313
1325
  `;
1314
1326
  }
1315
1327
  }
@@ -2436,6 +2448,7 @@ var DivContainer = async (props) => {
2436
2448
  }
2437
2449
  const updatedStyle = { ...updatedStyles };
2438
2450
  const guid = "css" + crypto.randomUUID().toLocaleLowerCase();
2451
+ const animationSelector = `#${guid}`;
2439
2452
  const { enterAnimation, exitAnimation, hoverAnimation } = props.node;
2440
2453
  let animationCSS = "";
2441
2454
  if (enterAnimation?.name) {
@@ -2445,7 +2458,7 @@ var DivContainer = async (props) => {
2445
2458
  mode: "enter",
2446
2459
  ...enterAnimation.properties
2447
2460
  },
2448
- `#${guid}`
2461
+ animationSelector
2449
2462
  );
2450
2463
  }
2451
2464
  if (hoverAnimation?.name) {
@@ -2455,7 +2468,7 @@ var DivContainer = async (props) => {
2455
2468
  mode: "hover",
2456
2469
  ...hoverAnimation.properties
2457
2470
  },
2458
- `#${guid}`
2471
+ animationSelector
2459
2472
  );
2460
2473
  }
2461
2474
  const isHidden = !shouldRenderContainer(
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.20260714124630",
3
+ "version": "0.8.1-dev.20260715061446",
4
4
  "description": "Reusable React components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",