@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260722105036 → 0.8.1-dev.20260723122345

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.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(
@@ -2650,7 +2672,7 @@ var DivContainer = async (props) => {
2650
2672
  var DivContainer_default = DivContainer;
2651
2673
 
2652
2674
  // src/components/pageRenderingEngine/PageBodyRenderer.tsx
2653
- import { jsx as jsx35 } from "react/jsx-runtime";
2675
+ import { jsx as jsx35, jsxs as jsxs14 } from "react/jsx-runtime";
2654
2676
  var NodeTypes = {
2655
2677
  ["paragraph"]: ParagraphNode_default,
2656
2678
  ["heading"]: HeadingNode_default,
@@ -2687,46 +2709,49 @@ var PageBodyRenderer = (props) => {
2687
2709
  }
2688
2710
  return true;
2689
2711
  };
2690
- return /* @__PURE__ */ jsx35(React23.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
2691
- {
2692
- }
2693
- const SelectedNode = NodeTypes[node.type];
2694
- if (!shouldRenderNode(node)) {
2695
- return null;
2696
- }
2697
- return /* @__PURE__ */ jsx35(React23.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx35(React23.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx35(React23.Fragment, { children: /* @__PURE__ */ jsx35(
2698
- SelectedNode,
2712
+ return /* @__PURE__ */ jsxs14(React23.Fragment, { children: [
2713
+ /* @__PURE__ */ jsx35("div", { children: "Thuis isadiasdia testaststtstst" }),
2714
+ rootNode && rootNode?.children?.map((node, index) => {
2699
2715
  {
2700
- node,
2701
- firstNode: true,
2702
- routeParameters: props.routeParameters,
2703
- query: props.query,
2704
- session: props.session,
2705
- host: props.host,
2706
- path: props.path,
2707
- apiBaseUrl: props.apiBaseUrl,
2708
- serviceClient: props.serviceClient,
2709
- assetBaseUrl: props.assetBaseUrl,
2710
- device: props.device,
2711
- widgetRenderer: props.widgetRenderer
2712
2716
  }
2713
- ) }) : /* @__PURE__ */ jsx35(React23.Fragment, { children: /* @__PURE__ */ jsx35(
2714
- SelectedNode,
2715
- {
2716
- node,
2717
- routeParameters: props.routeParameters,
2718
- query: props.query,
2719
- session: props.session,
2720
- host: props.host,
2721
- path: props.path,
2722
- apiBaseUrl: props.apiBaseUrl,
2723
- serviceClient: props.serviceClient,
2724
- assetBaseUrl: props.assetBaseUrl,
2725
- device: props.device,
2726
- widgetRenderer: props.widgetRenderer
2717
+ const SelectedNode = NodeTypes[node.type];
2718
+ if (!shouldRenderNode(node)) {
2719
+ return null;
2727
2720
  }
2728
- ) }) }) }, index);
2729
- }) });
2721
+ return /* @__PURE__ */ jsx35(React23.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx35(React23.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx35(React23.Fragment, { children: /* @__PURE__ */ jsx35(
2722
+ SelectedNode,
2723
+ {
2724
+ node,
2725
+ firstNode: true,
2726
+ routeParameters: props.routeParameters,
2727
+ query: props.query,
2728
+ session: props.session,
2729
+ host: props.host,
2730
+ path: props.path,
2731
+ apiBaseUrl: props.apiBaseUrl,
2732
+ serviceClient: props.serviceClient,
2733
+ assetBaseUrl: props.assetBaseUrl,
2734
+ device: props.device,
2735
+ widgetRenderer: props.widgetRenderer
2736
+ }
2737
+ ) }) : /* @__PURE__ */ jsx35(React23.Fragment, { children: /* @__PURE__ */ jsx35(
2738
+ SelectedNode,
2739
+ {
2740
+ node,
2741
+ routeParameters: props.routeParameters,
2742
+ query: props.query,
2743
+ session: props.session,
2744
+ host: props.host,
2745
+ path: props.path,
2746
+ apiBaseUrl: props.apiBaseUrl,
2747
+ serviceClient: props.serviceClient,
2748
+ assetBaseUrl: props.assetBaseUrl,
2749
+ device: props.device,
2750
+ widgetRenderer: props.widgetRenderer
2751
+ }
2752
+ ) }) }) }, index);
2753
+ })
2754
+ ] });
2730
2755
  };
2731
2756
  var PageBodyRenderer_default = PageBodyRenderer;
2732
2757
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clyrex-digital/clyrex-controls-dev",
3
- "version": "0.8.1-dev.20260722105036",
3
+ "version": "0.8.1-dev.20260723122345",
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
- };
@@ -1,9 +0,0 @@
1
- "use client";
2
-
3
- "use client";
4
- import {
5
- DateViewClient_default
6
- } from "./chunk-SPRVN5IM.mjs";
7
- export {
8
- DateViewClient_default as default
9
- };
@@ -1,45 +0,0 @@
1
- "use client";
2
-
3
- // src/components/pageRenderingEngine/nodes/EnterAnimationClient.tsx
4
- import React, { useEffect, useRef } from "react";
5
- import { Fragment, jsx } from "react/jsx-runtime";
6
- function EnterAnimationClient({ hasEnterAnimation, children }) {
7
- const ref = useRef(null);
8
- console.log("render");
9
- useEffect(() => {
10
- console.log("effect");
11
- console.log("ref", ref.current);
12
- if (!hasEnterAnimation) {
13
- console.log("no animation");
14
- return;
15
- }
16
- if (!ref.current) {
17
- console.log("no ref");
18
- return;
19
- }
20
- console.log("observer started");
21
- }, []);
22
- useEffect(() => {
23
- if (!hasEnterAnimation || !ref.current) return;
24
- const observer = new IntersectionObserver(
25
- (entries) => {
26
- entries.forEach((entry) => {
27
- if (entry.isIntersecting) {
28
- entry.target.classList.add("visible");
29
- observer.unobserve(entry.target);
30
- }
31
- });
32
- },
33
- { threshold: 0.1 }
34
- );
35
- observer.observe(ref.current);
36
- return () => observer.disconnect();
37
- }, [hasEnterAnimation]);
38
- if (!children) return null;
39
- return /* @__PURE__ */ jsx(Fragment, { children: children && // enforce passing the ref to Wrapper
40
- //@ts-ignore
41
- React.cloneElement(children, { ref }) });
42
- }
43
- export {
44
- EnterAnimationClient as default
45
- };
@@ -1,47 +0,0 @@
1
- "use client";
2
-
3
- "use client";
4
-
5
- // src/components/pageRenderingEngine/nodes/EnterAnimationClient.tsx
6
- import React, { useEffect, useRef } from "react";
7
- import { Fragment, jsx } from "react/jsx-runtime";
8
- function EnterAnimationClient({ hasEnterAnimation, children }) {
9
- const ref = useRef(null);
10
- console.log("render");
11
- useEffect(() => {
12
- console.log("effect");
13
- console.log("ref", ref.current);
14
- if (!hasEnterAnimation) {
15
- console.log("no animation");
16
- return;
17
- }
18
- if (!ref.current) {
19
- console.log("no ref");
20
- return;
21
- }
22
- console.log("observer started");
23
- }, []);
24
- useEffect(() => {
25
- if (!hasEnterAnimation || !ref.current) return;
26
- const observer = new IntersectionObserver(
27
- (entries) => {
28
- entries.forEach((entry) => {
29
- if (entry.isIntersecting) {
30
- entry.target.classList.add("visible");
31
- observer.unobserve(entry.target);
32
- }
33
- });
34
- },
35
- { threshold: 0.1 }
36
- );
37
- observer.observe(ref.current);
38
- return () => observer.disconnect();
39
- }, [hasEnterAnimation]);
40
- if (!children) return null;
41
- return /* @__PURE__ */ jsx(Fragment, { children: children && // enforce passing the ref to Wrapper
42
- //@ts-ignore
43
- React.cloneElement(children, { ref }) });
44
- }
45
- export {
46
- EnterAnimationClient as default
47
- };