@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260722072620 → 0.8.1-dev.20260722074927

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.
@@ -0,0 +1,45 @@
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
+ };
@@ -0,0 +1,47 @@
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
+ };
@@ -644,32 +644,32 @@ var SwitchInput_default = SwitchInput;
644
644
 
645
645
  // src/components/controls/edit/InputControlClient.tsx
646
646
  import { jsx as jsx5 } from "react/jsx-runtime";
647
- var ControlComponents = {
648
- [InputControlType_default.lineTextInput]: LineTextInput_default,
649
- [InputControlType_default.emailInput]: EmailInput_default,
650
- [InputControlType_default.multilineTextInput]: MultilineTextInput_default,
651
- [InputControlType_default.moneyInput]: MoneyInput_default,
652
- [InputControlType_default.select]: Select_default,
653
- [InputControlType_default.percentageInput]: PercentageInput_default,
654
- [InputControlType_default.phoneInput]: PhoneInput_default,
655
- [InputControlType_default.numberInput]: NumberInput_default,
656
- [InputControlType_default.checkboxInput]: CheckboxInput_default,
657
- [InputControlType_default.otpInput]: OtpInput_default,
658
- [InputControlType_default.datetimeInput]: DateTimeInput_default,
659
- [InputControlType_default.colorInput]: ColorInput_default,
660
- [InputControlType_default.selectWithSearchInput]: SelectWithSearchInput_default,
661
- [InputControlType_default.selectWithSearchPanel]: SelectWithSearchPanel_default,
662
- [InputControlType_default.booleanSelect]: BooleanSelect_default,
663
- [InputControlType_default.timeInput]: TimeInput_default,
664
- [InputControlType_default.asset]: AssetUpload_default,
665
- [InputControlType_default.switchInput]: SwitchInput_default
666
- };
667
- var InputControl = React5.memo(React5.forwardRef(
647
+ var InputControl = React5.forwardRef(
668
648
  (props, ref) => {
649
+ const ControlComponents = {
650
+ [InputControlType_default.lineTextInput]: LineTextInput_default,
651
+ [InputControlType_default.emailInput]: EmailInput_default,
652
+ [InputControlType_default.multilineTextInput]: MultilineTextInput_default,
653
+ [InputControlType_default.moneyInput]: MoneyInput_default,
654
+ [InputControlType_default.select]: Select_default,
655
+ [InputControlType_default.percentageInput]: PercentageInput_default,
656
+ [InputControlType_default.phoneInput]: PhoneInput_default,
657
+ [InputControlType_default.numberInput]: NumberInput_default,
658
+ [InputControlType_default.checkboxInput]: CheckboxInput_default,
659
+ [InputControlType_default.otpInput]: OtpInput_default,
660
+ [InputControlType_default.datetimeInput]: DateTimeInput_default,
661
+ [InputControlType_default.colorInput]: ColorInput_default,
662
+ [InputControlType_default.selectWithSearchInput]: SelectWithSearchInput_default,
663
+ [InputControlType_default.selectWithSearchPanel]: SelectWithSearchPanel_default,
664
+ [InputControlType_default.booleanSelect]: BooleanSelect_default,
665
+ [InputControlType_default.timeInput]: TimeInput_default,
666
+ [InputControlType_default.asset]: AssetUpload_default,
667
+ [InputControlType_default.switchInput]: SwitchInput_default
668
+ };
669
669
  const SelectedControlComponent = ControlComponents[props.controlType];
670
670
  return /* @__PURE__ */ jsx5(React5.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx5(SelectedControlComponent, { ...props }) : "Control not found" });
671
671
  }
672
- ));
672
+ );
673
673
  InputControl.displayName = "InputControl";
674
674
  var InputControlClient_default = InputControl;
675
675
  export {