aidos-ui 3.0.20 → 3.0.21

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/OnVisible.js CHANGED
@@ -22,7 +22,7 @@ export function OnVisible({ children, onVisible, }) {
22
22
  intersectionObserverRef.current = null;
23
23
  };
24
24
  // eslint-disable-next-line
25
- }, []);
25
+ }, [onVisible]);
26
26
  return children(refCallback);
27
27
  }
28
28
  //# sourceMappingURL=OnVisible.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OnVisible.js","sourceRoot":"","sources":["../src/OnVisible.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,MAAM,EAAE,WAAW,EAAgB,MAAM,OAAO,CAAC;AAEjE,MAAM,UAAU,SAAS,CAAC,EACxB,QAAQ,EACR,SAAS,GAIV;IACC,MAAM,uBAAuB,GAAG,MAAM,CAA8B,IAAI,CAAC,CAAC;IAE1E,MAAM,WAAW,GAAG,WAAW,CAAC,CAAC,OAAO,EAAE,EAAE;QAC1C,IAAI,OAAO,IAAI,IAAI,EAAE;YACnB,OAAO;SACR;QAED,MAAM,oBAAoB,GAAG,IAAI,oBAAoB,CACnD,CAAC,OAAO,EAAE,EAAE;YACV,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;gBACxB,IAAI,KAAK,CAAC,cAAc,IAAI,KAAK,CAAC,iBAAiB,GAAG,CAAC,EAAE;oBACvD,SAAS,EAAE,CAAC;iBACb;YACH,CAAC,CAAC,CAAC;QACL,CAAC,EACD;YACE,IAAI,EAAE,IAAI;YACV,UAAU,EAAE,KAAK;SAClB,CACF,CAAC;QAEF,uBAAuB,CAAC,OAAO,GAAG,oBAAoB,CAAC;QACvD,oBAAoB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAEtC,OAAO,GAAG,EAAE;YACV,oBAAoB,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;YACxC,uBAAuB,CAAC,OAAO,GAAG,IAAI,C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reference types="next/image-types/global" />
3
3
 
4
4
  // NOTE: This file should not be edited
5
- // see https://nextjs.org/docs/basic-features/typescript for more information.
5
+ // see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aidos-ui",
3
- "version": "3.0.20",
3
+ "version": "3.0.21",
4
4
  "description": "A simple UI framework",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -125,7 +125,7 @@ export function getInteractableJSStyles({
125
125
  export const getGlyphColor = (
126
126
  color: InteractableColor,
127
127
  disabled: boolean | undefined,
128
- bare: boolean | undefined
128
+ bare: boolean | undefined,
129
129
  ): TextColor => {
130
130
  if (disabled) {
131
131
  return "subtle";
@@ -148,7 +148,7 @@ export const getGlyphColor = (
148
148
  export const getCSSColor = (
149
149
  color: InteractableColor,
150
150
  disabled: boolean | undefined,
151
- bare: boolean | undefined
151
+ bare: boolean | undefined,
152
152
  ): string => {
153
153
  if (disabled) {
154
154
  return cssVar("--subtle-text");
package/src/OnVisible.tsx CHANGED
@@ -9,34 +9,37 @@ export function OnVisible({
9
9
  }) {
10
10
  const intersectionObserverRef = useRef<IntersectionObserver | null>(null);
11
11
 
12
- const refCallback = useCallback((element) => {
13
- if (element == null) {
14
- return;
15
- }
16
-
17
- const intersectionObserver = new IntersectionObserver(
18
- (entries) => {
19
- entries.forEach((entry) => {
20
- if (entry.isIntersecting || entry.intersectionRatio > 0) {
21
- onVisible();
22
- }
23
- });
24
- },
25
- {
26
- root: null,
27
- rootMargin: "0px",
12
+ const refCallback = useCallback(
13
+ (element) => {
14
+ if (element == null) {
15
+ return;
28
16
  }
29
- );
30
17
 
31
- intersectionObserverRef.current = intersectionObserver;
32
- intersectionObserver.observe(element);
18
+ const intersectionObserver = new IntersectionObserver(
19
+ (entries) => {
20
+ entries.forEach((entry) => {
21
+ if (entry.isIntersecting || entry.intersectionRatio > 0) {
22
+ onVisible();
23
+ }
24
+ });
25
+ },
26
+ {
27
+ root: null,
28
+ rootMargin: "0px",
29
+ },
30
+ );
31
+
32
+ intersectionObserverRef.current = intersectionObserver;
33
+ intersectionObserver.observe(element);
33
34
 
34
- return () => {
35
- intersectionObserver.unobserve(element);
36
- intersectionObserverRef.current = null;
37
- };
38
- // eslint-disable-next-line
39
- }, []);
35
+ return () => {
36
+ intersectionObserver.unobserve(element);
37
+ intersectionObserverRef.current = null;
38
+ };
39
+ // eslint-disable-next-line
40
+ },
41
+ [onVisible],
42
+ );
40
43
 
41
44
  return children(refCallback);
42
45
  }