@react-xp/aeiou 0.1.0-beta.12 → 0.1.0-beta.13

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.
Files changed (106) hide show
  1. package/dist/cjs/components/a/a.native.js +4 -6
  2. package/dist/cjs/components/a/a.web.js +4 -6
  3. package/dist/cjs/components/e/e.native.js +3 -12
  4. package/dist/cjs/components/e/e.web.js +3 -7
  5. package/dist/cjs/components/l/l.web.js +3 -7
  6. package/dist/cjs/components/t/t.native.js +3 -6
  7. package/dist/cjs/components/t/t.web.js +3 -6
  8. package/dist/cjs/hooks/index.js +0 -2
  9. package/dist/cjs/hooks/index.native.js +0 -2
  10. package/dist/cjs/hooks/index.web.js +0 -2
  11. package/dist/cjs/hooks/useInteractiveState/useInteractiveState.native.js +65 -5
  12. package/dist/cjs/hooks/useInteractiveState/useInteractiveState.web.js +62 -21
  13. package/dist/esm/components/a/a.native.js +5 -7
  14. package/dist/esm/components/a/a.web.js +5 -7
  15. package/dist/esm/components/e/e.native.js +4 -13
  16. package/dist/esm/components/e/e.web.js +4 -8
  17. package/dist/esm/components/l/l.web.js +4 -8
  18. package/dist/esm/components/t/t.native.js +4 -7
  19. package/dist/esm/components/t/t.web.js +4 -7
  20. package/dist/esm/hooks/index.js +0 -2
  21. package/dist/esm/hooks/index.native.js +0 -2
  22. package/dist/esm/hooks/index.web.js +0 -2
  23. package/dist/esm/hooks/useInteractiveState/useInteractiveState.native.js +66 -6
  24. package/dist/esm/hooks/useInteractiveState/useInteractiveState.web.js +62 -21
  25. package/dist/native/cjs/components/a/a.native.js +4 -6
  26. package/dist/native/cjs/components/a/a.web.js +4 -6
  27. package/dist/native/cjs/components/e/e.native.js +3 -12
  28. package/dist/native/cjs/components/e/e.web.js +3 -7
  29. package/dist/native/cjs/components/l/l.web.js +3 -7
  30. package/dist/native/cjs/components/t/t.native.js +3 -6
  31. package/dist/native/cjs/components/t/t.web.js +3 -6
  32. package/dist/native/cjs/hooks/index.js +0 -2
  33. package/dist/native/cjs/hooks/index.native.js +0 -2
  34. package/dist/native/cjs/hooks/index.web.js +0 -2
  35. package/dist/native/cjs/hooks/useInteractiveState/useInteractiveState.native.js +65 -5
  36. package/dist/native/cjs/hooks/useInteractiveState/useInteractiveState.web.js +62 -21
  37. package/dist/native/esm/components/a/a.native.js +5 -7
  38. package/dist/native/esm/components/a/a.web.js +5 -7
  39. package/dist/native/esm/components/e/e.native.js +4 -13
  40. package/dist/native/esm/components/e/e.web.js +4 -8
  41. package/dist/native/esm/components/l/l.web.js +4 -8
  42. package/dist/native/esm/components/t/t.native.js +4 -7
  43. package/dist/native/esm/components/t/t.web.js +4 -7
  44. package/dist/native/esm/hooks/index.js +0 -2
  45. package/dist/native/esm/hooks/index.native.js +0 -2
  46. package/dist/native/esm/hooks/index.web.js +0 -2
  47. package/dist/native/esm/hooks/useInteractiveState/useInteractiveState.native.js +66 -6
  48. package/dist/native/esm/hooks/useInteractiveState/useInteractiveState.web.js +62 -21
  49. package/dist/native/tsconfig.native.cjs.tsbuildinfo +1 -1
  50. package/dist/native/tsconfig.native.esm.tsbuildinfo +1 -1
  51. package/dist/tsconfig.cjs.tsbuildinfo +1 -1
  52. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  53. package/dist/types/components/a/a.native.d.ts +1 -1
  54. package/dist/types/components/a/a.native.d.ts.map +1 -1
  55. package/dist/types/components/a/a.web.d.ts +1 -1
  56. package/dist/types/components/a/a.web.d.ts.map +1 -1
  57. package/dist/types/components/e/e.native.d.ts +1 -1
  58. package/dist/types/components/e/e.native.d.ts.map +1 -1
  59. package/dist/types/components/e/e.web.d.ts +1 -1
  60. package/dist/types/components/e/e.web.d.ts.map +1 -1
  61. package/dist/types/components/i/useIUtils.d.ts +2 -2
  62. package/dist/types/components/l/l.web.d.ts +1 -1
  63. package/dist/types/components/l/l.web.d.ts.map +1 -1
  64. package/dist/types/components/t/t.native.d.ts +1 -1
  65. package/dist/types/components/t/t.native.d.ts.map +1 -1
  66. package/dist/types/components/t/t.web.d.ts +1 -1
  67. package/dist/types/components/t/t.web.d.ts.map +1 -1
  68. package/dist/types/hooks/index.d.ts +0 -2
  69. package/dist/types/hooks/index.d.ts.map +1 -1
  70. package/dist/types/hooks/index.native.d.ts +0 -2
  71. package/dist/types/hooks/index.native.d.ts.map +1 -1
  72. package/dist/types/hooks/index.web.d.ts +0 -2
  73. package/dist/types/hooks/index.web.d.ts.map +1 -1
  74. package/dist/types/hooks/useInteractiveState/useInteractiveState.native.d.ts +13 -5
  75. package/dist/types/hooks/useInteractiveState/useInteractiveState.native.d.ts.map +1 -1
  76. package/dist/types/hooks/useInteractiveState/useInteractiveState.types.d.ts +2 -2
  77. package/dist/types/hooks/useInteractiveState/useInteractiveState.types.d.ts.map +1 -1
  78. package/dist/types/hooks/useInteractiveState/useInteractiveState.web.d.ts +10 -7
  79. package/dist/types/hooks/useInteractiveState/useInteractiveState.web.d.ts.map +1 -1
  80. package/dist/types/types/base.d.ts +14 -4
  81. package/dist/types/types/base.d.ts.map +1 -1
  82. package/package.json +1 -1
  83. package/dist/cjs/hooks/useAction/types.js +0 -2
  84. package/dist/cjs/hooks/useAction/useAction.native.js +0 -18
  85. package/dist/cjs/hooks/useAction/useAction.web.js +0 -21
  86. package/dist/cjs/hooks/useOnHoverOrPress.js +0 -21
  87. package/dist/esm/hooks/useAction/types.js +0 -1
  88. package/dist/esm/hooks/useAction/useAction.native.js +0 -14
  89. package/dist/esm/hooks/useAction/useAction.web.js +0 -17
  90. package/dist/esm/hooks/useOnHoverOrPress.js +0 -17
  91. package/dist/native/cjs/hooks/useAction/types.js +0 -2
  92. package/dist/native/cjs/hooks/useAction/useAction.native.js +0 -18
  93. package/dist/native/cjs/hooks/useAction/useAction.web.js +0 -21
  94. package/dist/native/cjs/hooks/useOnHoverOrPress.js +0 -21
  95. package/dist/native/esm/hooks/useAction/types.js +0 -1
  96. package/dist/native/esm/hooks/useAction/useAction.native.js +0 -14
  97. package/dist/native/esm/hooks/useAction/useAction.web.js +0 -17
  98. package/dist/native/esm/hooks/useOnHoverOrPress.js +0 -17
  99. package/dist/types/hooks/useAction/types.d.ts +0 -7
  100. package/dist/types/hooks/useAction/types.d.ts.map +0 -1
  101. package/dist/types/hooks/useAction/useAction.native.d.ts +0 -5
  102. package/dist/types/hooks/useAction/useAction.native.d.ts.map +0 -1
  103. package/dist/types/hooks/useAction/useAction.web.d.ts +0 -5
  104. package/dist/types/hooks/useAction/useAction.web.d.ts.map +0 -1
  105. package/dist/types/hooks/useOnHoverOrPress.d.ts +0 -12
  106. package/dist/types/hooks/useOnHoverOrPress.d.ts.map +0 -1
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useAction = void 0;
4
- const react_1 = require("react");
5
- const useAction = ({ onClick, onPress, }) => {
6
- return (0, react_1.useMemo)(() => ({
7
- onAction: (event) => {
8
- if (onPress) {
9
- onPress(event);
10
- return;
11
- }
12
- if (onClick) {
13
- onClick(event);
14
- }
15
- },
16
- }), [onClick, onPress]);
17
- };
18
- exports.useAction = useAction;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useAction = void 0;
4
- const react_1 = require("react");
5
- const useAction = ({ onClick, onPress, preventDefault, }) => {
6
- return (0, react_1.useMemo)(() => ({
7
- onAction: (event) => {
8
- if (preventDefault && event && 'preventDefault' in event) {
9
- event.preventDefault();
10
- }
11
- if (onClick) {
12
- onClick(event);
13
- return;
14
- }
15
- if (onPress) {
16
- onPress(event);
17
- }
18
- },
19
- }), [onClick, onPress, preventDefault]);
20
- };
21
- exports.useAction = useAction;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useOnHoverOrPress = void 0;
4
- const react_1 = require("react");
5
- const useOnHoverOrPress = ({ onIn, onOut }) => {
6
- const value = (0, react_1.useRef)('on');
7
- return (0, react_1.useMemo)(() => ({
8
- onMouseEnter: onIn,
9
- onMouseLeave: onOut,
10
- onPress: (event) => {
11
- if (value.current === 'on') {
12
- value.current = 'off';
13
- onOut?.(event);
14
- return;
15
- }
16
- value.current = 'on';
17
- onIn?.(event);
18
- },
19
- }), [onIn, onOut]);
20
- };
21
- exports.useOnHoverOrPress = useOnHoverOrPress;
@@ -1 +0,0 @@
1
- export {};
@@ -1,14 +0,0 @@
1
- import { useMemo } from 'react';
2
- export const useAction = ({ onClick, onPress, }) => {
3
- return useMemo(() => ({
4
- onAction: (event) => {
5
- if (onPress) {
6
- onPress(event);
7
- return;
8
- }
9
- if (onClick) {
10
- onClick(event);
11
- }
12
- },
13
- }), [onClick, onPress]);
14
- };
@@ -1,17 +0,0 @@
1
- import { useMemo } from 'react';
2
- export const useAction = ({ onClick, onPress, preventDefault, }) => {
3
- return useMemo(() => ({
4
- onAction: (event) => {
5
- if (preventDefault && event && 'preventDefault' in event) {
6
- event.preventDefault();
7
- }
8
- if (onClick) {
9
- onClick(event);
10
- return;
11
- }
12
- if (onPress) {
13
- onPress(event);
14
- }
15
- },
16
- }), [onClick, onPress, preventDefault]);
17
- };
@@ -1,17 +0,0 @@
1
- import { useMemo, useRef } from 'react';
2
- export const useOnHoverOrPress = ({ onIn, onOut }) => {
3
- const value = useRef('on');
4
- return useMemo(() => ({
5
- onMouseEnter: onIn,
6
- onMouseLeave: onOut,
7
- onPress: (event) => {
8
- if (value.current === 'on') {
9
- value.current = 'off';
10
- onOut?.(event);
11
- return;
12
- }
13
- value.current = 'on';
14
- onIn?.(event);
15
- },
16
- }), [onIn, onOut]);
17
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useAction = void 0;
4
- const react_1 = require("react");
5
- const useAction = ({ onClick, onPress, }) => {
6
- return (0, react_1.useMemo)(() => ({
7
- onAction: (event) => {
8
- if (onPress) {
9
- onPress(event);
10
- return;
11
- }
12
- if (onClick) {
13
- onClick(event);
14
- }
15
- },
16
- }), [onClick, onPress]);
17
- };
18
- exports.useAction = useAction;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useAction = void 0;
4
- const react_1 = require("react");
5
- const useAction = ({ onClick, onPress, preventDefault, }) => {
6
- return (0, react_1.useMemo)(() => ({
7
- onAction: (event) => {
8
- if (preventDefault && event && 'preventDefault' in event) {
9
- event.preventDefault();
10
- }
11
- if (onClick) {
12
- onClick(event);
13
- return;
14
- }
15
- if (onPress) {
16
- onPress(event);
17
- }
18
- },
19
- }), [onClick, onPress, preventDefault]);
20
- };
21
- exports.useAction = useAction;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useOnHoverOrPress = void 0;
4
- const react_1 = require("react");
5
- const useOnHoverOrPress = ({ onIn, onOut }) => {
6
- const value = (0, react_1.useRef)('on');
7
- return (0, react_1.useMemo)(() => ({
8
- onMouseEnter: onIn,
9
- onMouseLeave: onOut,
10
- onPress: (event) => {
11
- if (value.current === 'on') {
12
- value.current = 'off';
13
- onOut?.(event);
14
- return;
15
- }
16
- value.current = 'on';
17
- onIn?.(event);
18
- },
19
- }), [onIn, onOut]);
20
- };
21
- exports.useOnHoverOrPress = useOnHoverOrPress;
@@ -1 +0,0 @@
1
- export {};
@@ -1,14 +0,0 @@
1
- import { useMemo } from 'react';
2
- export const useAction = ({ onClick, onPress, }) => {
3
- return useMemo(() => ({
4
- onAction: (event) => {
5
- if (onPress) {
6
- onPress(event);
7
- return;
8
- }
9
- if (onClick) {
10
- onClick(event);
11
- }
12
- },
13
- }), [onClick, onPress]);
14
- };
@@ -1,17 +0,0 @@
1
- import { useMemo } from 'react';
2
- export const useAction = ({ onClick, onPress, preventDefault, }) => {
3
- return useMemo(() => ({
4
- onAction: (event) => {
5
- if (preventDefault && event && 'preventDefault' in event) {
6
- event.preventDefault();
7
- }
8
- if (onClick) {
9
- onClick(event);
10
- return;
11
- }
12
- if (onPress) {
13
- onPress(event);
14
- }
15
- },
16
- }), [onClick, onPress, preventDefault]);
17
- };
@@ -1,17 +0,0 @@
1
- import { useMemo, useRef } from 'react';
2
- export const useOnHoverOrPress = ({ onIn, onOut }) => {
3
- const value = useRef('on');
4
- return useMemo(() => ({
5
- onMouseEnter: onIn,
6
- onMouseLeave: onOut,
7
- onPress: (event) => {
8
- if (value.current === 'on') {
9
- value.current = 'off';
10
- onOut?.(event);
11
- return;
12
- }
13
- value.current = 'on';
14
- onIn?.(event);
15
- },
16
- }), [onIn, onOut]);
17
- };
@@ -1,7 +0,0 @@
1
- import type { TAny } from '../../types';
2
- export type TUseActionProps<TEvent = TAny> = {
3
- onClick?: (event?: TEvent) => void;
4
- onPress?: (event?: TEvent) => void;
5
- preventDefault?: boolean;
6
- };
7
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAction/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,MAAM,eAAe,CAAC,MAAM,GAAG,IAAI,IAAI;IAC3C,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC"}
@@ -1,5 +0,0 @@
1
- import type { TUseActionProps } from './types';
2
- export declare const useAction: <TEvent>({ onClick, onPress, }: TUseActionProps<TEvent>) => {
3
- onAction: (event?: TEvent) => void;
4
- };
5
- //# sourceMappingURL=useAction.native.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAction.native.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAction/useAction.native.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,eAAO,MAAM,SAAS,GAAI,MAAM,EAAG,uBAGhC,eAAe,CAAC,MAAM,CAAC;uBAGD,MAAM;CAc9B,CAAC"}
@@ -1,5 +0,0 @@
1
- import type { TUseActionProps } from './types';
2
- export declare const useAction: <TEvent extends Event>({ onClick, onPress, preventDefault, }: TUseActionProps<TEvent>) => {
3
- onAction: (event?: TEvent) => void;
4
- };
5
- //# sourceMappingURL=useAction.web.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAction.web.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAction/useAction.web.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,eAAO,MAAM,SAAS,GAAI,MAAM,SAAS,KAAK,EAAE,uCAI7C,eAAe,CAAC,MAAM,CAAC;uBAGD,MAAM;CAiB9B,CAAC"}
@@ -1,12 +0,0 @@
1
- import type { TAny } from '../types';
2
- type TUseOnHoverOrPressProps = {
3
- onIn: ((event?: TAny) => void) | undefined;
4
- onOut: ((event?: TAny) => void) | undefined;
5
- };
6
- export declare const useOnHoverOrPress: ({ onIn, onOut }: TUseOnHoverOrPressProps) => {
7
- onMouseEnter: ((event?: TAny) => void) | undefined;
8
- onMouseLeave: ((event?: TAny) => void) | undefined;
9
- onPress: (event?: TAny) => void;
10
- };
11
- export {};
12
- //# sourceMappingURL=useOnHoverOrPress.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useOnHoverOrPress.d.ts","sourceRoot":"","sources":["../../../src/hooks/useOnHoverOrPress.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAErC,KAAK,uBAAuB,GAAG;IAC7B,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC3C,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAC7C,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,iBAAiB,uBAAuB;4BAJxD,IAAI,KAAK,IAAI;4BACZ,IAAI,KAAK,IAAI;sBAUR,IAAI;CAgB3B,CAAC"}