ublo-lib 1.37.4 → 1.37.5

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.
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
2
  type CmsMode = "connected" | "info" | "editing";
3
- export default function useInView(ref: React.MutableRefObject<HTMLElement>, cmsMode: CmsMode, selector: string, repeat?: boolean, intersectionValue?: number): void;
3
+ export default function useInView(ref: React.MutableRefObject<HTMLElement>, cmsMode: CmsMode, selector: string, repeat?: boolean, intersectionValue?: number, dependencyKey?: any): void;
4
4
  export {};
5
5
  //# sourceMappingURL=use-in-view.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-in-view.d.ts","sourceRoot":"","sources":["../../../src/common/hooks/use-in-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,OAAO,GAAG,WAAW,GAAG,MAAM,GAAG,SAAS,CAAC;AAOhD,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,GAAG,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,CAAC,EACxC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,OAAc,EACtB,iBAAiB,GAAE,MAAY,QAmFhC"}
1
+ {"version":3,"file":"use-in-view.d.ts","sourceRoot":"","sources":["../../../src/common/hooks/use-in-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,OAAO,GAAG,WAAW,GAAG,MAAM,GAAG,SAAS,CAAC;AAOhD,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,GAAG,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,CAAC,EACxC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,OAAc,EACtB,iBAAiB,GAAE,MAAY,EAC/B,aAAa,CAAC,EAAE,GAAG,QAmFpB"}
@@ -4,7 +4,7 @@ const options = {
4
4
  rootMargin: "0px",
5
5
  threshold: ratio(100),
6
6
  };
7
- export default function useInView(ref, cmsMode, selector, repeat = true, intersectionValue = 0.2) {
7
+ export default function useInView(ref, cmsMode, selector, repeat = true, intersectionValue = 0.2, dependencyKey) {
8
8
  const { lang, path } = useUbloContext();
9
9
  const [compatible, setCompatible] = React.useState(false);
10
10
  const callback = React.useCallback((entries) => {
@@ -76,7 +76,7 @@ export default function useInView(ref, cmsMode, selector, repeat = true, interse
76
76
  }
77
77
  }
78
78
  }
79
- }, [callback, cmsMode, compatible, lang, path, ref, selector]);
79
+ }, [callback, cmsMode, compatible, lang, path, ref, selector, dependencyKey]);
80
80
  }
81
81
  function ratio(steps) {
82
82
  return Array.from({ length: steps + 1 }).map((_, i) => i / steps);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.37.4",
3
+ "version": "1.37.5",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.9.9",
6
6
  "leaflet": "^1.9.1",