@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260722112436 → 0.8.1-dev.20260723123821

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/server.js CHANGED
@@ -852,7 +852,9 @@ var init_Button = __esm({
852
852
  event.preventDefault();
853
853
  event.stopPropagation();
854
854
  if (props.confirm) {
855
- const confirmed = await showConfirmation("Are you sure you want to delete this item?");
855
+ const confirmed = await showConfirmation(
856
+ "Are you sure you want to delete this item?"
857
+ );
856
858
  setShowModal(null);
857
859
  if (!confirmed) {
858
860
  return;
@@ -867,7 +869,9 @@ var init_Button = __esm({
867
869
  isValid = await props.onValidate();
868
870
  if (!isValid) {
869
871
  setInProgress(false);
870
- ToastService_default.showError("There are errors in the form. Please fix them before proceeding.");
872
+ ToastService_default.showError(
873
+ "There are errors in the form. Please fix them before proceeding."
874
+ );
871
875
  return;
872
876
  }
873
877
  }
@@ -891,7 +895,16 @@ var init_Button = __esm({
891
895
  return new Promise((resolve) => {
892
896
  const onConfirm = () => resolve(true);
893
897
  const onCancel = () => resolve(false);
894
- setShowModal(/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Confirm_default, { message: props.confirmationMessage, onConfirm, onCancel }));
898
+ setShowModal(
899
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
900
+ Confirm_default,
901
+ {
902
+ message: props.confirmationMessage,
903
+ onConfirm,
904
+ onCancel
905
+ }
906
+ )
907
+ );
895
908
  });
896
909
  };
897
910
  let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
@@ -905,13 +918,39 @@ var init_Button = __esm({
905
918
  onClick: execute,
906
919
  disabled: props.disabled,
907
920
  title: isDisabled ? "The button is disabled to prevent any action" : "",
908
- className: buttonClass + " relative " + props.className,
921
+ className: `${buttonClass} relative inline-flex items-center justify-center gap-2 ${props.className ?? ""}`,
909
922
  children: [
910
923
  isActionPerformed && props.oneTimeAction && responseMessage ? responseMessage : props.children,
911
- inProgress && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react4.default.Fragment, { children: props.hideProgressIndicator === true ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "absolute bottom-0 left-0 h-0.5 bg-gray-400 rounded animate-progress" }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("svg", { className: "animate-spin ml-2 mr-3 h-5 w-5 " + progressClass, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
912
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
913
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
914
- ] }) })
924
+ inProgress && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: props.hideProgressIndicator ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "absolute bottom-0 left-0 h-0.5 bg-gray-400 rounded animate-progress" }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
925
+ "svg",
926
+ {
927
+ className: `animate-spin h-5 w-5 flex-shrink-0 ${progressClass}`,
928
+ xmlns: "http://www.w3.org/2000/svg",
929
+ fill: "none",
930
+ viewBox: "0 0 24 24",
931
+ children: [
932
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
933
+ "circle",
934
+ {
935
+ className: "opacity-25",
936
+ cx: "12",
937
+ cy: "12",
938
+ r: "10",
939
+ stroke: "currentColor",
940
+ strokeWidth: "4"
941
+ }
942
+ ),
943
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
944
+ "path",
945
+ {
946
+ className: "opacity-75",
947
+ fill: "currentColor",
948
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
949
+ }
950
+ )
951
+ ]
952
+ }
953
+ ) })
915
954
  ]
916
955
  }
917
956
  ),
@@ -1154,6 +1193,8 @@ var init_LinkNodeButton = __esm({
1154
1193
  LinkNodeButton = (props) => {
1155
1194
  const { node, dataitem, children, linkText, linkType, linkUrl } = props;
1156
1195
  const [isLoading, setIsLoading] = (0, import_react5.useState)(false);
1196
+ const [successMessage, setSuccessMessage] = (0, import_react5.useState)(null);
1197
+ console.log("LinkNodeButton props:", props);
1157
1198
  const extractFieldNames = (0, import_react5.useCallback)((template) => {
1158
1199
  if (!template) return [];
1159
1200
  const regex = /\{(\{\})?([a-zA-Z_$][a-zA-Z0-9_$]*)(?:\}\})?\}/g;
@@ -1161,35 +1202,38 @@ var init_LinkNodeButton = __esm({
1161
1202
  const fieldNames = matches.map((match) => match[2] || match[1]).filter((name, index, self) => self.indexOf(name) === index);
1162
1203
  return fieldNames;
1163
1204
  }, []);
1164
- const replaceTemplateVariables = (0, import_react5.useCallback)((template, responseData) => {
1165
- if (!template) return template;
1166
- let result = template;
1167
- const fieldNames = extractFieldNames(template);
1168
- if (responseData) {
1169
- fieldNames.forEach((fieldName) => {
1170
- const value = getNestedValue7(responseData, fieldName);
1171
- if (value !== void 0) {
1172
- const regex1 = new RegExp(`\\{${fieldName}\\}`, "g");
1173
- const regex2 = new RegExp(`\\{\\{${fieldName}\\}\\}`, "g");
1174
- result = result.replace(regex1, String(value));
1175
- result = result.replace(regex2, String(value));
1176
- }
1177
- });
1178
- }
1179
- if (props.routeParameters) {
1180
- Object.entries(props.routeParameters).forEach(([key, value]) => {
1181
- const regex = new RegExp(`\\{\\{${key}\\}\\}`, "g");
1182
- result = result.replace(regex, String(value));
1183
- });
1184
- }
1185
- if (dataitem) {
1186
- Object.entries(dataitem).forEach(([key, value]) => {
1187
- const regex = new RegExp(`\\{\\{${key}\\}\\}`, "g");
1188
- result = result.replace(regex, String(value));
1189
- });
1190
- }
1191
- return result;
1192
- }, [props.routeParameters, dataitem, extractFieldNames]);
1205
+ const replaceTemplateVariables = (0, import_react5.useCallback)(
1206
+ (template, responseData) => {
1207
+ if (!template) return template;
1208
+ let result = template;
1209
+ const fieldNames = extractFieldNames(template);
1210
+ if (responseData) {
1211
+ fieldNames.forEach((fieldName) => {
1212
+ const value = getNestedValue7(responseData, fieldName);
1213
+ if (value !== void 0) {
1214
+ const regex1 = new RegExp(`\\{${fieldName}\\}`, "g");
1215
+ const regex2 = new RegExp(`\\{\\{${fieldName}\\}\\}`, "g");
1216
+ result = result.replace(regex1, String(value));
1217
+ result = result.replace(regex2, String(value));
1218
+ }
1219
+ });
1220
+ }
1221
+ if (props.routeParameters) {
1222
+ Object.entries(props.routeParameters).forEach(([key, value]) => {
1223
+ const regex = new RegExp(`\\{\\{${key}\\}\\}`, "g");
1224
+ result = result.replace(regex, String(value));
1225
+ });
1226
+ }
1227
+ if (dataitem) {
1228
+ Object.entries(dataitem).forEach(([key, value]) => {
1229
+ const regex = new RegExp(`\\{\\{${key}\\}\\}`, "g");
1230
+ result = result.replace(regex, String(value));
1231
+ });
1232
+ }
1233
+ return result;
1234
+ },
1235
+ [props.routeParameters, dataitem, extractFieldNames]
1236
+ );
1193
1237
  const getNestedValue7 = (0, import_react5.useCallback)((obj, path) => {
1194
1238
  if (!obj || !path) return void 0;
1195
1239
  if (obj[path] !== void 0) {
@@ -1207,7 +1251,10 @@ var init_LinkNodeButton = __esm({
1207
1251
  }, []);
1208
1252
  const onClick = (0, import_react5.useCallback)(async () => {
1209
1253
  if (!node.postUrl) {
1210
- return { isSuccessful: false, message: "No POST URL configured for this button" };
1254
+ return {
1255
+ isSuccessful: false,
1256
+ message: "No POST URL configured for this button"
1257
+ };
1211
1258
  }
1212
1259
  setIsLoading(true);
1213
1260
  try {
@@ -1233,6 +1280,7 @@ var init_LinkNodeButton = __esm({
1233
1280
  }
1234
1281
  if (response?.message) {
1235
1282
  ToastService_default.showSuccess(response.message);
1283
+ setSuccessMessage(response.message);
1236
1284
  }
1237
1285
  if (response && node.redirectUrl) {
1238
1286
  const fieldNames = extractFieldNames(node.redirectUrl);
@@ -1255,7 +1303,9 @@ var init_LinkNodeButton = __esm({
1255
1303
  }
1256
1304
  });
1257
1305
  console.log("Field value map:", fieldValueMap);
1258
- const missingFields = fieldNames.filter((fieldName) => !fieldValueMap[fieldName]);
1306
+ const missingFields = fieldNames.filter(
1307
+ (fieldName) => !fieldValueMap[fieldName]
1308
+ );
1259
1309
  if (missingFields.length > 0) {
1260
1310
  console.warn(`Missing field values for: ${missingFields.join(", ")}`);
1261
1311
  }
@@ -1266,7 +1316,10 @@ var init_LinkNodeButton = __esm({
1266
1316
  resolvedRedirectUrl = resolvedRedirectUrl.replace(regex1, value);
1267
1317
  resolvedRedirectUrl = resolvedRedirectUrl.replace(regex2, value);
1268
1318
  });
1269
- resolvedRedirectUrl = replaceTemplateVariables(resolvedRedirectUrl, response);
1319
+ resolvedRedirectUrl = replaceTemplateVariables(
1320
+ resolvedRedirectUrl,
1321
+ response
1322
+ );
1270
1323
  console.log("Final redirect URL:", resolvedRedirectUrl);
1271
1324
  if (resolvedRedirectUrl && !resolvedRedirectUrl.includes("{")) {
1272
1325
  window.location.href = resolvedRedirectUrl;
@@ -1277,14 +1330,27 @@ var init_LinkNodeButton = __esm({
1277
1330
  return { isSuccessful: false, message: errorMessage };
1278
1331
  }
1279
1332
  setIsLoading(false);
1280
- return { isSuccessful: true, message: response?.message, result: response };
1333
+ return {
1334
+ isSuccessful: true,
1335
+ message: response?.message,
1336
+ result: response
1337
+ };
1281
1338
  } catch (err) {
1282
1339
  console.error("Button API call failed:", err);
1283
1340
  const errorMessage = err.message || "An unexpected error occurred";
1284
1341
  setIsLoading(false);
1285
1342
  return { isSuccessful: false, message: errorMessage };
1286
1343
  }
1287
- }, [node.postUrl, node.payload, node.redirectUrl, replaceTemplateVariables, extractFieldNames, getNestedValue7, props.apiBaseUrl, props.session]);
1344
+ }, [
1345
+ node.postUrl,
1346
+ node.payload,
1347
+ node.redirectUrl,
1348
+ replaceTemplateVariables,
1349
+ extractFieldNames,
1350
+ getNestedValue7,
1351
+ props.apiBaseUrl,
1352
+ props.session
1353
+ ]);
1288
1354
  const renderButtonContent = () => {
1289
1355
  if (children) {
1290
1356
  return children;
@@ -1294,14 +1360,41 @@ var init_LinkNodeButton = __esm({
1294
1360
  }
1295
1361
  return node.title || "Button";
1296
1362
  };
1363
+ const fontSize = node.children?.[0]?.style?.match(/font-size:\s*([^;]+)/)?.[1];
1297
1364
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "link-button-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1298
1365
  Button_default,
1299
1366
  {
1300
1367
  ButtonType: linkType,
1301
1368
  onClick,
1302
- disabled: isLoading,
1369
+ disabled: isLoading || !!successMessage,
1303
1370
  className: "w-full",
1304
- children: renderButtonContent()
1371
+ children: successMessage ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1372
+ "span",
1373
+ {
1374
+ style: fontSize ? { fontSize } : void 0,
1375
+ className: "inline-flex items-center gap-2",
1376
+ children: [
1377
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1378
+ "svg",
1379
+ {
1380
+ xmlns: "http://www.w3.org/2000/svg",
1381
+ viewBox: "0 0 20 20",
1382
+ fill: "currentColor",
1383
+ className: "w-5 h-5",
1384
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1385
+ "path",
1386
+ {
1387
+ fillRule: "evenodd",
1388
+ d: "M16.704 5.29a1 1 0 010 1.42l-7.25 7.25a1 1 0 01-1.415 0L3.29 9.21a1 1 0 111.415-1.414l4.042 4.042 6.543-6.543a1 1 0 011.414 0z",
1389
+ clipRule: "evenodd"
1390
+ }
1391
+ )
1392
+ }
1393
+ ),
1394
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: successMessage })
1395
+ ]
1396
+ }
1397
+ ) : renderButtonContent()
1305
1398
  }
1306
1399
  ) });
1307
1400
  };
@@ -1314,13 +1407,42 @@ var DateViewClient_exports = {};
1314
1407
  __export(DateViewClient_exports, {
1315
1408
  default: () => DateViewClient_default
1316
1409
  });
1317
- var import_react8, import_jsx_runtime15, DateViewClient, DateViewClient_default;
1410
+ var import_react8, import_jsx_runtime15, dateFormatter, timeFormatterNoSeconds, timeFormatterWithSeconds, dateTimeFormatterNoSeconds, dateTimeFormatterWithSeconds, DateViewClient, DateViewClient_default;
1318
1411
  var init_DateViewClient = __esm({
1319
1412
  "src/components/controls/view/DateViewClient.tsx"() {
1320
1413
  "use strict";
1321
1414
  "use client";
1322
1415
  import_react8 = require("react");
1323
1416
  import_jsx_runtime15 = require("react/jsx-runtime");
1417
+ dateFormatter = new Intl.DateTimeFormat("en", {
1418
+ day: "2-digit",
1419
+ month: "short",
1420
+ year: "numeric"
1421
+ });
1422
+ timeFormatterNoSeconds = new Intl.DateTimeFormat("en", {
1423
+ hour: "2-digit",
1424
+ minute: "2-digit"
1425
+ });
1426
+ timeFormatterWithSeconds = new Intl.DateTimeFormat("en", {
1427
+ hour: "2-digit",
1428
+ minute: "2-digit",
1429
+ second: "2-digit"
1430
+ });
1431
+ dateTimeFormatterNoSeconds = new Intl.DateTimeFormat("en", {
1432
+ day: "2-digit",
1433
+ month: "short",
1434
+ year: "numeric",
1435
+ hour: "2-digit",
1436
+ minute: "2-digit"
1437
+ });
1438
+ dateTimeFormatterWithSeconds = new Intl.DateTimeFormat("en", {
1439
+ day: "2-digit",
1440
+ month: "short",
1441
+ year: "numeric",
1442
+ hour: "2-digit",
1443
+ minute: "2-digit",
1444
+ second: "2-digit"
1445
+ });
1324
1446
  DateViewClient = (props) => {
1325
1447
  const [timeZoneAbbr, setTimeZoneAbbr] = (0, import_react8.useState)("");
1326
1448
  (0, import_react8.useEffect)(() => {
@@ -1345,37 +1467,13 @@ var init_DateViewClient = __esm({
1345
1467
  return date;
1346
1468
  };
1347
1469
  const formatDate = (date) => {
1348
- return new Intl.DateTimeFormat("en", {
1349
- day: "2-digit",
1350
- month: "short",
1351
- year: "numeric"
1352
- }).format(date);
1470
+ return dateFormatter.format(date);
1353
1471
  };
1354
1472
  const formatTime = (date) => {
1355
- return date.getSeconds() === 0 ? new Intl.DateTimeFormat("en", {
1356
- hour: "2-digit",
1357
- minute: "2-digit"
1358
- }).format(date) : new Intl.DateTimeFormat("en", {
1359
- hour: "2-digit",
1360
- minute: "2-digit",
1361
- second: "2-digit"
1362
- }).format(date);
1473
+ return date.getSeconds() === 0 ? timeFormatterNoSeconds.format(date) : timeFormatterWithSeconds.format(date);
1363
1474
  };
1364
1475
  const formatDateTime = (date) => {
1365
- return date.getSeconds() === 0 ? new Intl.DateTimeFormat("en", {
1366
- day: "2-digit",
1367
- month: "short",
1368
- year: "numeric",
1369
- hour: "2-digit",
1370
- minute: "2-digit"
1371
- }).format(date) : new Intl.DateTimeFormat("en", {
1372
- day: "2-digit",
1373
- month: "short",
1374
- year: "numeric",
1375
- hour: "2-digit",
1376
- minute: "2-digit",
1377
- second: "2-digit"
1378
- }).format(date);
1476
+ return date.getSeconds() === 0 ? dateTimeFormatterNoSeconds.format(date) : dateTimeFormatterWithSeconds.format(date);
1379
1477
  };
1380
1478
  const getTimePeriod = (date) => {
1381
1479
  const hours = date.getHours();
@@ -3632,6 +3730,17 @@ var EmbedNode_default = EmbedNode;
3632
3730
  init_ServiceClient();
3633
3731
 
3634
3732
  // src/components/utilities/AnimationUtility.tsx
3733
+ var normalizeSelector = (guid) => {
3734
+ const trimmedGuid = guid?.trim();
3735
+ if (!trimmedGuid) {
3736
+ return ".animation-fallback";
3737
+ }
3738
+ const baseValue = trimmedGuid.replace(/^#/, "").replace(/^\./, "");
3739
+ if (typeof CSS !== "undefined" && typeof CSS.escape === "function") {
3740
+ return `#${CSS.escape(baseValue)}`;
3741
+ }
3742
+ return `#${baseValue}`;
3743
+ };
3635
3744
  var AnimationUtility = class {
3636
3745
  static generateAnimationCSS(config, guid) {
3637
3746
  const {
@@ -3646,10 +3755,12 @@ var AnimationUtility = class {
3646
3755
  speedPerChar = 100,
3647
3756
  cursor = true,
3648
3757
  mode = "enter",
3649
- direction = "left"
3650
- // Default direction
3758
+ direction = "left",
3759
+ backgroundColor,
3760
+ borderColor
3651
3761
  } = config;
3652
3762
  let base = "", visible = "", keyframes = "";
3763
+ const selector = normalizeSelector(guid);
3653
3764
  switch (config.animation) {
3654
3765
  case "Fade":
3655
3766
  base = `opacity:0; transition:opacity ${duration}ms ${easing} ${delay}ms;`;
@@ -3683,12 +3794,20 @@ var AnimationUtility = class {
3683
3794
  `;
3684
3795
  if (mode === "enter") {
3685
3796
  base = `opacity:0;`;
3686
- visible = `opacity:1; animation:bounce ${duration}ms ${easing} ${delay}ms ${repeat};`;
3797
+ visible = `opacity:1; animation: bounce ${duration}ms ${easing} ${delay}ms ${repeat};`;
3687
3798
  } else {
3688
3799
  base = ``;
3689
- visible = `animation:bounce ${duration / 1e3}s ${easing} ${delay / 1e3}s ${repeat};`;
3800
+ visible = `animation: bounce ${duration / 1e3}s ${easing} ${delay / 1e3}s ${repeat};`;
3690
3801
  }
3691
3802
  break;
3803
+ case "Background":
3804
+ base = `transition: background-color ${duration}ms ${easing} ${delay}ms;`;
3805
+ visible = `background-color: ${backgroundColor};`;
3806
+ break;
3807
+ case "Border":
3808
+ base = `transition: border-color ${duration}ms ${easing} ${delay}ms;`;
3809
+ visible = `border-color: ${borderColor};`;
3810
+ break;
3692
3811
  case "Typewriter":
3693
3812
  keyframes = `
3694
3813
  @keyframes typewriter { from { width: 0 } to { width: 100% } }
@@ -3710,14 +3829,14 @@ var AnimationUtility = class {
3710
3829
  if (mode === "hover") {
3711
3830
  return `
3712
3831
  ${keyframes}
3713
- ${guid} { ${base} }
3714
- ${guid}:hover { ${visible} }
3832
+ ${selector} { ${base} }
3833
+ ${selector}:hover { ${visible} }
3715
3834
  `;
3716
3835
  } else {
3717
3836
  return `
3718
3837
  ${keyframes}
3719
- ${guid} { ${base} }
3720
- ${guid}.visible { ${visible} }
3838
+ ${selector} { ${base} }
3839
+ ${selector}.visible { ${visible} }
3721
3840
  `;
3722
3841
  }
3723
3842
  }
@@ -4847,6 +4966,7 @@ var DivContainer = async (props) => {
4847
4966
  }
4848
4967
  const updatedStyle = { ...updatedStyles };
4849
4968
  const guid = "css" + crypto.randomUUID().toLocaleLowerCase();
4969
+ const animationSelector = `#${guid}`;
4850
4970
  const { enterAnimation, exitAnimation, hoverAnimation } = props.node;
4851
4971
  let animationCSS = "";
4852
4972
  if (enterAnimation?.name) {
@@ -4856,7 +4976,7 @@ var DivContainer = async (props) => {
4856
4976
  mode: "enter",
4857
4977
  ...enterAnimation.properties
4858
4978
  },
4859
- `#${guid}`
4979
+ animationSelector
4860
4980
  );
4861
4981
  }
4862
4982
  if (hoverAnimation?.name) {
@@ -4866,7 +4986,7 @@ var DivContainer = async (props) => {
4866
4986
  mode: "hover",
4867
4987
  ...hoverAnimation.properties
4868
4988
  },
4869
- `#${guid}`
4989
+ animationSelector
4870
4990
  );
4871
4991
  }
4872
4992
  const isHidden = !shouldRenderContainer(
package/dist/server.mjs CHANGED
@@ -305,7 +305,7 @@ var ImageNode_default = ImageNode;
305
305
  // src/components/pageRenderingEngine/nodes/LinkNode.tsx
306
306
  import dynamic3 from "next/dynamic";
307
307
  import { Fragment, jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
308
- var LinkNodeButton = dynamic3(() => import("./LinkNodeButton-U7T2NP22.mjs"), {
308
+ var LinkNodeButton = dynamic3(() => import("./LinkNodeButton-KZRNRJRI.mjs"), {
309
309
  ssr: false
310
310
  });
311
311
  function getNestedValue2(obj, path) {
@@ -513,7 +513,7 @@ var NumberView_default = NumberView;
513
513
 
514
514
  // src/components/controls/view/DateView.tsx
515
515
  import dynamic4 from "next/dynamic";
516
- var DateView = dynamic4(() => import("./DateViewClient-ELEHLGWS.mjs"), {
516
+ var DateView = dynamic4(() => import("./DateViewClient-4CTEMOMJ.mjs"), {
517
517
  ssr: false
518
518
  });
519
519
  var DateView_default = DateView;
@@ -725,7 +725,7 @@ var AiGeneratedSummary_default = AiGeneratedSummary;
725
725
 
726
726
  // src/components/controls/view/DateTimeVew.tsx
727
727
  import dynamic5 from "next/dynamic";
728
- var DateTimeView = dynamic5(() => import("./DateTimeViewClient-22GW4AD7.mjs"), {
728
+ var DateTimeView = dynamic5(() => import("./DateTimeViewClient-K5FE5VSN.mjs"), {
729
729
  ssr: false
730
730
  });
731
731
  var DateTimeVew_default = DateTimeView;
@@ -1193,6 +1193,17 @@ var EmbedNode = (props) => {
1193
1193
  var EmbedNode_default = EmbedNode;
1194
1194
 
1195
1195
  // src/components/utilities/AnimationUtility.tsx
1196
+ var normalizeSelector = (guid) => {
1197
+ const trimmedGuid = guid?.trim();
1198
+ if (!trimmedGuid) {
1199
+ return ".animation-fallback";
1200
+ }
1201
+ const baseValue = trimmedGuid.replace(/^#/, "").replace(/^\./, "");
1202
+ if (typeof CSS !== "undefined" && typeof CSS.escape === "function") {
1203
+ return `#${CSS.escape(baseValue)}`;
1204
+ }
1205
+ return `#${baseValue}`;
1206
+ };
1196
1207
  var AnimationUtility = class {
1197
1208
  static generateAnimationCSS(config, guid) {
1198
1209
  const {
@@ -1207,10 +1218,12 @@ var AnimationUtility = class {
1207
1218
  speedPerChar = 100,
1208
1219
  cursor = true,
1209
1220
  mode = "enter",
1210
- direction = "left"
1211
- // Default direction
1221
+ direction = "left",
1222
+ backgroundColor,
1223
+ borderColor
1212
1224
  } = config;
1213
1225
  let base = "", visible = "", keyframes = "";
1226
+ const selector = normalizeSelector(guid);
1214
1227
  switch (config.animation) {
1215
1228
  case "Fade":
1216
1229
  base = `opacity:0; transition:opacity ${duration}ms ${easing} ${delay}ms;`;
@@ -1244,12 +1257,20 @@ var AnimationUtility = class {
1244
1257
  `;
1245
1258
  if (mode === "enter") {
1246
1259
  base = `opacity:0;`;
1247
- visible = `opacity:1; animation:bounce ${duration}ms ${easing} ${delay}ms ${repeat};`;
1260
+ visible = `opacity:1; animation: bounce ${duration}ms ${easing} ${delay}ms ${repeat};`;
1248
1261
  } else {
1249
1262
  base = ``;
1250
- visible = `animation:bounce ${duration / 1e3}s ${easing} ${delay / 1e3}s ${repeat};`;
1263
+ visible = `animation: bounce ${duration / 1e3}s ${easing} ${delay / 1e3}s ${repeat};`;
1251
1264
  }
1252
1265
  break;
1266
+ case "Background":
1267
+ base = `transition: background-color ${duration}ms ${easing} ${delay}ms;`;
1268
+ visible = `background-color: ${backgroundColor};`;
1269
+ break;
1270
+ case "Border":
1271
+ base = `transition: border-color ${duration}ms ${easing} ${delay}ms;`;
1272
+ visible = `border-color: ${borderColor};`;
1273
+ break;
1253
1274
  case "Typewriter":
1254
1275
  keyframes = `
1255
1276
  @keyframes typewriter { from { width: 0 } to { width: 100% } }
@@ -1271,14 +1292,14 @@ var AnimationUtility = class {
1271
1292
  if (mode === "hover") {
1272
1293
  return `
1273
1294
  ${keyframes}
1274
- ${guid} { ${base} }
1275
- ${guid}:hover { ${visible} }
1295
+ ${selector} { ${base} }
1296
+ ${selector}:hover { ${visible} }
1276
1297
  `;
1277
1298
  } else {
1278
1299
  return `
1279
1300
  ${keyframes}
1280
- ${guid} { ${base} }
1281
- ${guid}.visible { ${visible} }
1301
+ ${selector} { ${base} }
1302
+ ${selector}.visible { ${visible} }
1282
1303
  `;
1283
1304
  }
1284
1305
  }
@@ -2405,6 +2426,7 @@ var DivContainer = async (props) => {
2405
2426
  }
2406
2427
  const updatedStyle = { ...updatedStyles };
2407
2428
  const guid = "css" + crypto.randomUUID().toLocaleLowerCase();
2429
+ const animationSelector = `#${guid}`;
2408
2430
  const { enterAnimation, exitAnimation, hoverAnimation } = props.node;
2409
2431
  let animationCSS = "";
2410
2432
  if (enterAnimation?.name) {
@@ -2414,7 +2436,7 @@ var DivContainer = async (props) => {
2414
2436
  mode: "enter",
2415
2437
  ...enterAnimation.properties
2416
2438
  },
2417
- `#${guid}`
2439
+ animationSelector
2418
2440
  );
2419
2441
  }
2420
2442
  if (hoverAnimation?.name) {
@@ -2424,7 +2446,7 @@ var DivContainer = async (props) => {
2424
2446
  mode: "hover",
2425
2447
  ...hoverAnimation.properties
2426
2448
  },
2427
- `#${guid}`
2449
+ animationSelector
2428
2450
  );
2429
2451
  }
2430
2452
  const isHidden = !shouldRenderContainer(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clyrex-digital/clyrex-controls-dev",
3
- "version": "0.8.1-dev.20260722112436",
3
+ "version": "0.8.1-dev.20260723123821",
4
4
  "description": "Reusable React components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -23,10 +23,12 @@
23
23
  "scripts": {
24
24
  "build": "tsup",
25
25
  "build:clean": "node -e \"require('fs').rmSync('dist',{ recursive:true, force:true })\" && tsup",
26
- "dev": "tsup --watch"
26
+ "dev": "tsup --watch",
27
+ "prepack": "npm run build:clean"
27
28
  },
28
29
  "peerDependencies": {
29
30
  "katex": "^0.16.0",
31
+ "next": "^14 || ^15 || ^16",
30
32
  "react": "^18 || ^19",
31
33
  "react-dom": "^18 || ^19"
32
34
  },
@@ -36,9 +38,10 @@
36
38
  }
37
39
  },
38
40
  "devDependencies": {
39
- "@types/node": "^26.1.1",
41
+ "@types/node": "^20.19.43",
40
42
  "@types/react": "^19.2.17",
41
43
  "@types/react-dom": "^19.2.3",
44
+ "next": "^15.5.21",
42
45
  "tsup": "^8.5.1",
43
46
  "typescript": "^5.9.3"
44
47
  },
@@ -63,10 +66,8 @@
63
66
  "load-tsconfig": "^0.2.5",
64
67
  "magic-string": "^0.30.21",
65
68
  "mlly": "^1.8.0",
66
- "moment-timezone": "^0.6.3",
67
69
  "ms": "^2.1.3",
68
70
  "mz": "^2.7.0",
69
- "next": "^15.5.21",
70
71
  "object-assign": "^4.1.1",
71
72
  "pathe": "^2.0.3",
72
73
  "picocolors": "^1.1.1",
@@ -1,14 +0,0 @@
1
- "use client";
2
- import {
3
- DateViewClient_default
4
- } from "./chunk-XG6SXZWP.mjs";
5
-
6
- // src/components/controls/view/DateTimeViewClient.tsx
7
- import { jsx } from "react/jsx-runtime";
8
- var DateTimeViewClient = (props) => {
9
- return /* @__PURE__ */ jsx(DateViewClient_default, { ...props, controlType: "datetime" });
10
- };
11
- var DateTimeViewClient_default = DateTimeViewClient;
12
- export {
13
- DateTimeViewClient_default as default
14
- };
@@ -1,16 +0,0 @@
1
- "use client";
2
-
3
- "use client";
4
- import {
5
- DateViewClient_default
6
- } from "./chunk-SPRVN5IM.mjs";
7
-
8
- // src/components/controls/view/DateTimeViewClient.tsx
9
- import { jsx } from "react/jsx-runtime";
10
- var DateTimeViewClient = (props) => {
11
- return /* @__PURE__ */ jsx(DateViewClient_default, { ...props, controlType: "datetime" });
12
- };
13
- var DateTimeViewClient_default = DateTimeViewClient;
14
- export {
15
- DateTimeViewClient_default as default
16
- };
@@ -1,7 +0,0 @@
1
- "use client";
2
- import {
3
- DateViewClient_default
4
- } from "./chunk-XG6SXZWP.mjs";
5
- export {
6
- DateViewClient_default as default
7
- };