@fuf-stack/pixels 1.5.1 → 1.6.0
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/AvatarGroup/index.cjs +2 -2
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/Progress/index.cjs +3 -3
- package/dist/Progress/index.js +2 -2
- package/dist/ProgressCircular/index.cjs +3 -3
- package/dist/ProgressCircular/index.js +2 -2
- package/dist/{chunk-P65SZZSE.js → chunk-4SBEERL5.js} +2 -2
- package/dist/chunk-4SBEERL5.js.map +1 -0
- package/dist/chunk-EJKGMMBT.cjs +23 -0
- package/dist/chunk-EJKGMMBT.cjs.map +1 -0
- package/dist/{chunk-VVQI6XOB.cjs → chunk-FQJ32476.cjs} +3 -3
- package/dist/chunk-FQJ32476.cjs.map +1 -0
- package/dist/chunk-GKYJUGD4.js +14 -0
- package/dist/chunk-GKYJUGD4.js.map +1 -0
- package/dist/{chunk-SZGVYMRD.js → chunk-HSREBNZV.js} +11 -9
- package/dist/chunk-HSREBNZV.js.map +1 -0
- package/dist/{chunk-HQ7KVEQQ.cjs → chunk-IXBNFKOS.cjs} +19 -40
- package/dist/chunk-IXBNFKOS.cjs.map +1 -0
- package/dist/{chunk-DBHL7ETR.cjs → chunk-K5VPNWIJ.cjs} +3 -3
- package/dist/chunk-K5VPNWIJ.cjs.map +1 -0
- package/dist/chunk-M3Y2DZZE.js +62 -0
- package/dist/chunk-M3Y2DZZE.js.map +1 -0
- package/dist/{chunk-FA476DJO.js → chunk-OFZQFYUT.js} +2 -2
- package/dist/chunk-OFZQFYUT.js.map +1 -0
- package/dist/chunk-ON3PVFZY.cjs +14 -0
- package/dist/chunk-ON3PVFZY.cjs.map +1 -0
- package/dist/chunk-U5J6GTQE.js +123 -0
- package/dist/chunk-U5J6GTQE.js.map +1 -0
- package/dist/{chunk-S4O4KDC3.cjs → chunk-VHESFBAQ.cjs} +11 -9
- package/dist/chunk-VHESFBAQ.cjs.map +1 -0
- package/dist/chunk-WCE3O6UA.cjs +123 -0
- package/dist/chunk-WCE3O6UA.cjs.map +1 -0
- package/dist/chunk-XLR7LQR6.js +23 -0
- package/dist/chunk-XLR7LQR6.js.map +1 -0
- package/dist/hooks/useDebounce/index.cjs +8 -0
- package/dist/hooks/useDebounce/index.cjs.map +1 -0
- package/dist/hooks/useDebounce/index.d.cts +9 -0
- package/dist/hooks/useDebounce/index.d.ts +9 -0
- package/dist/hooks/useDebounce/index.js +8 -0
- package/dist/hooks/useIsInitialRenderCycle/index.cjs +8 -0
- package/dist/hooks/useIsInitialRenderCycle/index.cjs.map +1 -0
- package/dist/hooks/useIsInitialRenderCycle/index.d.cts +8 -0
- package/dist/hooks/useIsInitialRenderCycle/index.d.ts +8 -0
- package/dist/hooks/useIsInitialRenderCycle/index.js +8 -0
- package/dist/hooks/useIsInitialRenderCycle/index.js.map +1 -0
- package/dist/hooks/useLocalStorage/index.cjs +8 -0
- package/dist/hooks/useLocalStorage/index.cjs.map +1 -0
- package/dist/hooks/useLocalStorage/index.d.cts +5 -0
- package/dist/hooks/useLocalStorage/index.d.ts +5 -0
- package/dist/hooks/useLocalStorage/index.js +8 -0
- package/dist/hooks/useLocalStorage/index.js.map +1 -0
- package/dist/index.cjs +15 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +19 -11
- package/dist/utils/createWithSuspense/index.cjs +8 -0
- package/dist/utils/createWithSuspense/index.cjs.map +1 -0
- package/dist/utils/createWithSuspense/index.d.cts +72 -0
- package/dist/utils/createWithSuspense/index.d.ts +72 -0
- package/dist/utils/createWithSuspense/index.js +8 -0
- package/dist/utils/createWithSuspense/index.js.map +1 -0
- package/package.json +22 -6
- package/dist/chunk-DBHL7ETR.cjs.map +0 -1
- package/dist/chunk-FA476DJO.js.map +0 -1
- package/dist/chunk-HQ7KVEQQ.cjs.map +0 -1
- package/dist/chunk-P65SZZSE.js.map +0 -1
- package/dist/chunk-S4O4KDC3.cjs.map +0 -1
- package/dist/chunk-SZGVYMRD.js.map +0 -1
- package/dist/chunk-ULHU2VZO.js +0 -83
- package/dist/chunk-ULHU2VZO.js.map +0 -1
- package/dist/chunk-VVQI6XOB.cjs.map +0 -1
- package/dist/hooks/index.cjs +0 -12
- package/dist/hooks/index.cjs.map +0 -1
- package/dist/hooks/index.d.cts +0 -20
- package/dist/hooks/index.d.ts +0 -20
- package/dist/hooks/index.js +0 -12
- /package/dist/hooks/{index.js.map → useDebounce/index.js.map} +0 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__spreadValues
|
|
3
|
+
} from "./chunk-OAIRL2FN.js";
|
|
4
|
+
|
|
5
|
+
// src/utils/createWithSuspense/createWithSuspense.tsx
|
|
6
|
+
import { Component, Suspense } from "react";
|
|
7
|
+
import { motion, useReducedMotion } from "@fuf-stack/pixel-motion";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var ErrorBoundary = class extends Component {
|
|
10
|
+
constructor(props) {
|
|
11
|
+
super(props);
|
|
12
|
+
this.state = { error: null, errorInfo: null };
|
|
13
|
+
}
|
|
14
|
+
static getDerivedStateFromError(error) {
|
|
15
|
+
return { error };
|
|
16
|
+
}
|
|
17
|
+
componentDidCatch(error, errorInfo) {
|
|
18
|
+
const { onError } = this.props;
|
|
19
|
+
this.setState({ errorInfo });
|
|
20
|
+
onError == null ? void 0 : onError(error, errorInfo);
|
|
21
|
+
}
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/promise-function-async
|
|
23
|
+
render() {
|
|
24
|
+
const { error, errorInfo } = this.state;
|
|
25
|
+
const { fallback, children, shouldAnimate } = this.props;
|
|
26
|
+
if (error) {
|
|
27
|
+
const errorFallback = fallback(
|
|
28
|
+
error,
|
|
29
|
+
errorInfo != null ? errorInfo : { componentStack: "" }
|
|
30
|
+
);
|
|
31
|
+
if (!shouldAnimate) {
|
|
32
|
+
return errorFallback;
|
|
33
|
+
}
|
|
34
|
+
return /* @__PURE__ */ jsx(
|
|
35
|
+
motion.div,
|
|
36
|
+
{
|
|
37
|
+
animate: { height: "auto", opacity: 1 },
|
|
38
|
+
initial: { height: 0, opacity: 0 },
|
|
39
|
+
style: { overflow: "hidden" },
|
|
40
|
+
transition: {
|
|
41
|
+
height: { duration: 0.2, ease: "easeInOut" },
|
|
42
|
+
opacity: { duration: 0.2, delay: 0.2 }
|
|
43
|
+
},
|
|
44
|
+
children: errorFallback
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
return children;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
function createWithSuspense(config = {}) {
|
|
52
|
+
const {
|
|
53
|
+
defaultFallback = null,
|
|
54
|
+
disableAnimation: defaultDisableAnimation = false,
|
|
55
|
+
errorFallback: defaultErrorFallback,
|
|
56
|
+
onError: defaultOnError
|
|
57
|
+
} = config;
|
|
58
|
+
return function withSuspense(WrappedComponent, options) {
|
|
59
|
+
var _a, _b, _c, _d, _e, _f;
|
|
60
|
+
const fallback = (_a = options == null ? void 0 : options.fallback) != null ? _a : defaultFallback;
|
|
61
|
+
const errorFallback = (_b = options == null ? void 0 : options.errorFallback) != null ? _b : defaultErrorFallback;
|
|
62
|
+
const disableErrorBoundary = (_c = options == null ? void 0 : options.disableErrorBoundary) != null ? _c : false;
|
|
63
|
+
const disableAnimation = (_d = options == null ? void 0 : options.disableAnimation) != null ? _d : defaultDisableAnimation;
|
|
64
|
+
const WithSuspenseComponent = (props) => {
|
|
65
|
+
const prefersReducedMotion = useReducedMotion();
|
|
66
|
+
const shouldAnimate = !disableAnimation && !prefersReducedMotion;
|
|
67
|
+
const wrapWithMotion = (children) => {
|
|
68
|
+
if (!shouldAnimate) {
|
|
69
|
+
return children;
|
|
70
|
+
}
|
|
71
|
+
return /* @__PURE__ */ jsx(
|
|
72
|
+
motion.div,
|
|
73
|
+
{
|
|
74
|
+
animate: { height: "auto", opacity: 1 },
|
|
75
|
+
exit: { height: 0, opacity: 0 },
|
|
76
|
+
initial: { height: 0, opacity: 0 },
|
|
77
|
+
style: { overflow: "hidden" },
|
|
78
|
+
transition: {
|
|
79
|
+
height: { duration: 0.2, ease: "easeInOut" },
|
|
80
|
+
opacity: { duration: 0.2, delay: 0.2 }
|
|
81
|
+
// Fade in after height animation
|
|
82
|
+
},
|
|
83
|
+
children
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
const animatedFallback = shouldAnimate ? /* @__PURE__ */ jsx(
|
|
88
|
+
motion.div,
|
|
89
|
+
{
|
|
90
|
+
exit: { height: 0, opacity: 0 },
|
|
91
|
+
initial: { height: "auto", opacity: 1 },
|
|
92
|
+
style: { overflow: "hidden" },
|
|
93
|
+
transition: {
|
|
94
|
+
height: { duration: 0.3, ease: "easeInOut" },
|
|
95
|
+
opacity: { duration: 0.2 }
|
|
96
|
+
},
|
|
97
|
+
children: fallback
|
|
98
|
+
},
|
|
99
|
+
"fallback"
|
|
100
|
+
) : fallback;
|
|
101
|
+
const content = /* @__PURE__ */ jsx(Suspense, { fallback: animatedFallback, children: wrapWithMotion(/* @__PURE__ */ jsx(WrappedComponent, __spreadValues({}, props))) });
|
|
102
|
+
if (!errorFallback || disableErrorBoundary) {
|
|
103
|
+
return content;
|
|
104
|
+
}
|
|
105
|
+
return /* @__PURE__ */ jsx(
|
|
106
|
+
ErrorBoundary,
|
|
107
|
+
{
|
|
108
|
+
fallback: errorFallback,
|
|
109
|
+
onError: defaultOnError,
|
|
110
|
+
shouldAnimate,
|
|
111
|
+
children: content
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
};
|
|
115
|
+
WithSuspenseComponent.displayName = `withSuspense(${(_f = (_e = WrappedComponent.displayName) != null ? _e : WrappedComponent.name) != null ? _f : "Component"})`;
|
|
116
|
+
return WithSuspenseComponent;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export {
|
|
121
|
+
createWithSuspense
|
|
122
|
+
};
|
|
123
|
+
//# sourceMappingURL=chunk-U5J6GTQE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/createWithSuspense/createWithSuspense.tsx"],"sourcesContent":["import type { ComponentType, ErrorInfo, ReactNode } from 'react';\n\nimport React, { Component, Suspense } from 'react';\n\nimport { motion, useReducedMotion } from '@fuf-stack/pixel-motion';\n\ninterface ErrorBoundaryProps {\n children: ReactNode;\n fallback: (error: Error, errorInfo: ErrorInfo) => ReactNode;\n // eslint-disable-next-line react/require-default-props\n shouldAnimate?: boolean;\n // eslint-disable-next-line react/require-default-props\n onError?: (error: Error, errorInfo: ErrorInfo) => void;\n}\n\ninterface ErrorBoundaryState {\n error: Error | null;\n errorInfo: ErrorInfo | null;\n}\n\nclass ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = { error: null, errorInfo: null };\n }\n\n static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState> {\n return { error };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n const { onError } = this.props;\n this.setState({ errorInfo });\n onError?.(error, errorInfo);\n }\n\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n render() {\n const { error, errorInfo } = this.state;\n const { fallback, children, shouldAnimate } = this.props;\n\n if (error) {\n // errorInfo might not be set yet in getDerivedStateFromError,\n // so we provide a default empty errorInfo to prevent errors from bubbling up\n const errorFallback = fallback(\n error,\n errorInfo ?? { componentStack: '' },\n );\n\n if (!shouldAnimate) {\n return errorFallback;\n }\n\n return (\n <motion.div\n animate={{ height: 'auto', opacity: 1 }}\n initial={{ height: 0, opacity: 0 }}\n style={{ overflow: 'hidden' }}\n transition={{\n height: { duration: 0.2, ease: 'easeInOut' },\n opacity: { duration: 0.2, delay: 0.2 },\n }}\n >\n {errorFallback}\n </motion.div>\n );\n }\n\n return children;\n }\n}\n\nexport interface CreateWithSuspenseConfig {\n /**\n * Default fallback to show while suspending\n */\n defaultFallback?: ReactNode;\n /**\n * Disable height animation between loading and loaded states\n * @default false\n */\n disableAnimation?: boolean;\n /**\n * Error boundary fallback renderer\n * @param error - The error that was caught\n * @param errorInfo - Additional error information\n */\n errorFallback?: (error: Error, errorInfo: ErrorInfo) => ReactNode;\n /**\n * Callback when an error is caught\n * @param error - The error that was caught\n * @param errorInfo - Additional error information\n */\n onError?: (error: Error, errorInfo: ErrorInfo) => void;\n}\n\nexport interface WithSuspenseOptions {\n /**\n * Override the default fallback for this specific component\n */\n fallback?: ReactNode;\n /**\n * Override the error boundary for this specific component\n */\n errorFallback?: (error: Error, errorInfo: ErrorInfo) => ReactNode;\n /**\n * Disable height animation for this specific component\n */\n disableAnimation?: boolean;\n /**\n * Disable error boundary for this specific component\n */\n disableErrorBoundary?: boolean;\n}\n\n/**\n * Factory function to create a project-specific withSuspense HOC with default configuration.\n *\n * @example\n * ```tsx\n * // In your project setup file\n * export const withSuspense = createWithSuspense({\n * defaultFallback: <YourSpinner />,\n * errorFallback: (error) => <YourErrorComponent error={error} />,\n * onError: (error, errorInfo) => {\n * console.error('Caught error:', error, errorInfo);\n * // Send to error tracking service\n * },\n * });\n *\n * // Then use throughout your project\n * const MyComponent = withSuspense(({ userId }) => {\n * const user = use(fetchUser(userId));\n * return <div>{user.name}</div>;\n * });\n * ```\n */\nexport function createWithSuspense(config: CreateWithSuspenseConfig = {}) {\n const {\n defaultFallback = null,\n disableAnimation: defaultDisableAnimation = false,\n errorFallback: defaultErrorFallback,\n onError: defaultOnError,\n } = config;\n\n return function withSuspense<P extends object>(\n WrappedComponent: ComponentType<P>,\n options?: WithSuspenseOptions,\n ) {\n const fallback = options?.fallback ?? defaultFallback;\n const errorFallback = options?.errorFallback ?? defaultErrorFallback;\n const disableErrorBoundary = options?.disableErrorBoundary ?? false;\n const disableAnimation =\n options?.disableAnimation ?? defaultDisableAnimation;\n\n const WithSuspenseComponent = (props: P) => {\n const prefersReducedMotion = useReducedMotion();\n const shouldAnimate = !disableAnimation && !prefersReducedMotion;\n\n // Wrap content in motion wrapper if animation is enabled\n const wrapWithMotion = (children: ReactNode): ReactNode => {\n if (!shouldAnimate) {\n return children;\n }\n\n return (\n <motion.div\n animate={{ height: 'auto', opacity: 1 }}\n exit={{ height: 0, opacity: 0 }}\n initial={{ height: 0, opacity: 0 }}\n style={{ overflow: 'hidden' }}\n transition={{\n height: { duration: 0.2, ease: 'easeInOut' },\n opacity: { duration: 0.2, delay: 0.2 }, // Fade in after height animation\n }}\n >\n {children}\n </motion.div>\n );\n };\n\n const animatedFallback = shouldAnimate ? (\n <motion.div\n key=\"fallback\"\n exit={{ height: 0, opacity: 0 }}\n initial={{ height: 'auto', opacity: 1 }}\n style={{ overflow: 'hidden' }}\n transition={{\n height: { duration: 0.3, ease: 'easeInOut' },\n opacity: { duration: 0.2 },\n }}\n >\n {fallback}\n </motion.div>\n ) : (\n fallback\n );\n\n const content = (\n <Suspense fallback={animatedFallback}>\n {wrapWithMotion(<WrappedComponent {...props} />)}\n </Suspense>\n );\n\n // If no error boundary configured or explicitly disabled, return just Suspense\n if (!errorFallback || disableErrorBoundary) {\n return content;\n }\n\n return (\n <ErrorBoundary\n fallback={errorFallback}\n onError={defaultOnError}\n shouldAnimate={shouldAnimate}\n >\n {content}\n </ErrorBoundary>\n );\n };\n\n WithSuspenseComponent.displayName = `withSuspense(${\n WrappedComponent.displayName ?? WrappedComponent.name ?? 'Component'\n })`;\n\n return WithSuspenseComponent;\n };\n}\n"],"mappings":";;;;;AAEA,SAAgB,WAAW,gBAAgB;AAE3C,SAAS,QAAQ,wBAAwB;AAkDjC;AAlCR,IAAM,gBAAN,cAA4B,UAAkD;AAAA,EAC5E,YAAY,OAA2B;AACrC,UAAM,KAAK;AACX,SAAK,QAAQ,EAAE,OAAO,MAAM,WAAW,KAAK;AAAA,EAC9C;AAAA,EAEA,OAAO,yBAAyB,OAA2C;AACzE,WAAO,EAAE,MAAM;AAAA,EACjB;AAAA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|
|
@@ -4,6 +4,7 @@ var _chunk77J7NZYBcjs = require('./chunk-77J7NZYB.cjs');
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
|
|
7
8
|
var _chunkAHEA4IJVcjs = require('./chunk-AHEA4IJV.cjs');
|
|
8
9
|
|
|
9
10
|
// src/AvatarGroup/AvatarGroup.tsx
|
|
@@ -28,25 +29,26 @@ var AvatarGroup = ({
|
|
|
28
29
|
max,
|
|
29
30
|
radius: rounded,
|
|
30
31
|
size,
|
|
31
|
-
children: avatars == null ? void 0 : avatars.map((avatar) => {
|
|
32
|
-
|
|
32
|
+
children: avatars == null ? void 0 : avatars.map((avatar, index) => {
|
|
33
|
+
const avatarKey = avatar.src ? `${avatar.src}-${index}` : `avatar-${index}`;
|
|
34
|
+
const _a = avatar, { wrapperProps } = _a, avatarProps = _chunkAHEA4IJVcjs.__objRest.call(void 0, _a, ["wrapperProps"]);
|
|
35
|
+
return AvatarWrapper ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarWrapper, _chunkAHEA4IJVcjs.__spreadProps.call(void 0, _chunkAHEA4IJVcjs.__spreadValues.call(void 0, {}, wrapperProps), { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
33
36
|
_chunk77J7NZYBcjs.Avatar_default,
|
|
34
|
-
_chunkAHEA4IJVcjs.__spreadProps.call(void 0, _chunkAHEA4IJVcjs.__spreadValues.call(void 0, {},
|
|
37
|
+
_chunkAHEA4IJVcjs.__spreadProps.call(void 0, _chunkAHEA4IJVcjs.__spreadValues.call(void 0, {}, avatarProps), {
|
|
35
38
|
bordered,
|
|
36
39
|
disabled: disabled || (avatar == null ? void 0 : avatar.disabled),
|
|
37
40
|
rounded,
|
|
38
41
|
size
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
) })) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
42
|
+
})
|
|
43
|
+
) }), avatarKey) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
42
44
|
_chunk77J7NZYBcjs.Avatar_default,
|
|
43
|
-
_chunkAHEA4IJVcjs.__spreadProps.call(void 0, _chunkAHEA4IJVcjs.__spreadValues.call(void 0, {},
|
|
45
|
+
_chunkAHEA4IJVcjs.__spreadProps.call(void 0, _chunkAHEA4IJVcjs.__spreadValues.call(void 0, {}, avatarProps), {
|
|
44
46
|
bordered,
|
|
45
47
|
disabled: disabled || (avatar == null ? void 0 : avatar.disabled),
|
|
46
48
|
rounded,
|
|
47
49
|
size
|
|
48
50
|
}),
|
|
49
|
-
|
|
51
|
+
avatarKey
|
|
50
52
|
);
|
|
51
53
|
})
|
|
52
54
|
}
|
|
@@ -61,4 +63,4 @@ var AvatarGroup_default2 = AvatarGroup_default;
|
|
|
61
63
|
|
|
62
64
|
|
|
63
65
|
exports.AvatarGroup_default = AvatarGroup_default; exports.AvatarGroup_default2 = AvatarGroup_default2;
|
|
64
|
-
//# sourceMappingURL=chunk-
|
|
66
|
+
//# sourceMappingURL=chunk-VHESFBAQ.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-VHESFBAQ.cjs","../src/AvatarGroup/AvatarGroup.tsx","../src/AvatarGroup/index.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACNA,wCAA+C;AAuDnC,+CAAA;AA1BZ,IAAM,YAAA,EAAc,CAAC;AAAA,EACnB,SAAA,EAAW,KAAA;AAAA,EACX,QAAA,EAAU,MAAA;AAAA,EACV,UAAA,EAAY,EAAA;AAAA,EACZ,SAAA,EAAW,KAAA;AAAA,EACX,KAAA,EAAO,IAAA;AAAA,EACP,QAAA,EAAU,CAAC,CAAA;AAAA,EACX,IAAA,EAAM,CAAA;AAAA,EACN,aAAA,EAAe,cAAA,EAAgB,KAAA;AACjC,CAAA,EAAA,GAAwB;AACtB,EAAA,uBACE,6BAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,SAAA;AAAA,MACA,UAAA,EAAY,QAAA;AAAA,MACZ,UAAA,EAAY,QAAA;AAAA,MACZ,GAAA;AAAA,MACA,MAAA,EAAQ,OAAA;AAAA,MACR,IAAA;AAAA,MAEC,QAAA,EAAA,QAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,OAAA,CAAS,GAAA,CAAI,CAAC,MAAA,EAAQ,KAAA,EAAA,GAAU;AAC/B,QAAA,MAAM,UAAA,EAAY,MAAA,CAAO,IAAA,EACrB,CAAA,EAAA;AAEI,QAAA;AAEN,QAAA;AACG,UAAA;AAAA,UAAA;AAEC,YAAA;AACsB,YAAA;AACtB,YAAA;AACA,YAAA;AAAA,UAAA;AAIJ,QAAA;AAAC,UAAA;AAAA,UAAA;AAGC,YAAA;AACsB,YAAA;AACtB,YAAA;AACA,YAAA;AAAA,UAAA;AALK,UAAA;AAMP,QAAA;AAEJ,MAAA;AAAA,IAAA;AACF,EAAA;AAEJ;AAEe;ADxByB;AACA;AEpDzB;AFsDyB;AACA;AACA;AACA;AACA","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-VHESFBAQ.cjs","sourcesContent":[null,"import type { JSX } from 'react';\nimport type { AvatarProps } from '../Avatar/Avatar';\n\nimport { AvatarGroup as HeroAvatarGroup } from '@heroui/avatar';\n\nimport { Avatar } from '../Avatar';\n\nexport interface AvatarGroupProps {\n /* Display a border ring around the Avatar */\n bordered?: boolean;\n /* Roundness of the border around the Avatar */\n rounded?: 'none' | 'sm' | 'md' | 'lg' | 'full';\n /** CSS class name */\n className?: string;\n /* Disables the Avatar */\n disabled?: boolean;\n /* Size of the Avatar */\n size?: 'sm' | 'md' | 'lg';\n /* Maximum number of avatars to display before +X is displayed */\n max?: number;\n /* Array of avatarProps */\n avatars?: (Omit<AvatarProps, 'size' | 'rounded' | 'bordered'> & {\n /* Custom wrapperProps for each avatarWrapper */\n wrapperProps?: Record<string, unknown>;\n })[];\n /* Custom wrapper for each avatar */\n avatarWrapper?: JSX.ElementType;\n}\n\n/**\n * AvatarGroup component based on [HeroUI AvatarGroup](https://www.heroui.com//docs/components/avatar)\n */\nconst AvatarGroup = ({\n bordered = false,\n rounded = 'full',\n className = '',\n disabled = false,\n size = 'md',\n avatars = [],\n max = 3,\n avatarWrapper: AvatarWrapper = undefined,\n}: AvatarGroupProps) => {\n return (\n <HeroAvatarGroup\n className={className}\n isBordered={bordered}\n isDisabled={disabled}\n max={max}\n radius={rounded}\n size={size}\n >\n {avatars?.map((avatar, index) => {\n const avatarKey = avatar.src\n ? `${avatar.src}-${index}`\n : `avatar-${index}`;\n const { wrapperProps, ...avatarProps } = avatar;\n return AvatarWrapper ? (\n <AvatarWrapper key={avatarKey} {...wrapperProps}>\n <Avatar\n {...avatarProps}\n bordered={bordered}\n disabled={disabled || avatar?.disabled}\n rounded={rounded}\n size={size}\n />\n </AvatarWrapper>\n ) : (\n <Avatar\n key={avatarKey}\n {...avatarProps}\n bordered={bordered}\n disabled={disabled || avatar?.disabled}\n rounded={rounded}\n size={size}\n />\n );\n })}\n </HeroAvatarGroup>\n );\n};\n\nexport default AvatarGroup;\n","import AvatarGroup from './AvatarGroup';\n\nexport type { AvatarGroupProps } from './AvatarGroup';\n\nexport { AvatarGroup };\n\nexport default AvatarGroup;\n"]}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkAHEA4IJVcjs = require('./chunk-AHEA4IJV.cjs');
|
|
4
|
+
|
|
5
|
+
// src/utils/createWithSuspense/createWithSuspense.tsx
|
|
6
|
+
var _react = require('react');
|
|
7
|
+
var _pixelmotion = require('@fuf-stack/pixel-motion');
|
|
8
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
9
|
+
var ErrorBoundary = class extends _react.Component {
|
|
10
|
+
constructor(props) {
|
|
11
|
+
super(props);
|
|
12
|
+
this.state = { error: null, errorInfo: null };
|
|
13
|
+
}
|
|
14
|
+
static getDerivedStateFromError(error) {
|
|
15
|
+
return { error };
|
|
16
|
+
}
|
|
17
|
+
componentDidCatch(error, errorInfo) {
|
|
18
|
+
const { onError } = this.props;
|
|
19
|
+
this.setState({ errorInfo });
|
|
20
|
+
onError == null ? void 0 : onError(error, errorInfo);
|
|
21
|
+
}
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/promise-function-async
|
|
23
|
+
render() {
|
|
24
|
+
const { error, errorInfo } = this.state;
|
|
25
|
+
const { fallback, children, shouldAnimate } = this.props;
|
|
26
|
+
if (error) {
|
|
27
|
+
const errorFallback = fallback(
|
|
28
|
+
error,
|
|
29
|
+
errorInfo != null ? errorInfo : { componentStack: "" }
|
|
30
|
+
);
|
|
31
|
+
if (!shouldAnimate) {
|
|
32
|
+
return errorFallback;
|
|
33
|
+
}
|
|
34
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
35
|
+
_pixelmotion.motion.div,
|
|
36
|
+
{
|
|
37
|
+
animate: { height: "auto", opacity: 1 },
|
|
38
|
+
initial: { height: 0, opacity: 0 },
|
|
39
|
+
style: { overflow: "hidden" },
|
|
40
|
+
transition: {
|
|
41
|
+
height: { duration: 0.2, ease: "easeInOut" },
|
|
42
|
+
opacity: { duration: 0.2, delay: 0.2 }
|
|
43
|
+
},
|
|
44
|
+
children: errorFallback
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
return children;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
function createWithSuspense(config = {}) {
|
|
52
|
+
const {
|
|
53
|
+
defaultFallback = null,
|
|
54
|
+
disableAnimation: defaultDisableAnimation = false,
|
|
55
|
+
errorFallback: defaultErrorFallback,
|
|
56
|
+
onError: defaultOnError
|
|
57
|
+
} = config;
|
|
58
|
+
return function withSuspense(WrappedComponent, options) {
|
|
59
|
+
var _a, _b, _c, _d, _e, _f;
|
|
60
|
+
const fallback = (_a = options == null ? void 0 : options.fallback) != null ? _a : defaultFallback;
|
|
61
|
+
const errorFallback = (_b = options == null ? void 0 : options.errorFallback) != null ? _b : defaultErrorFallback;
|
|
62
|
+
const disableErrorBoundary = (_c = options == null ? void 0 : options.disableErrorBoundary) != null ? _c : false;
|
|
63
|
+
const disableAnimation = (_d = options == null ? void 0 : options.disableAnimation) != null ? _d : defaultDisableAnimation;
|
|
64
|
+
const WithSuspenseComponent = (props) => {
|
|
65
|
+
const prefersReducedMotion = _pixelmotion.useReducedMotion.call(void 0, );
|
|
66
|
+
const shouldAnimate = !disableAnimation && !prefersReducedMotion;
|
|
67
|
+
const wrapWithMotion = (children) => {
|
|
68
|
+
if (!shouldAnimate) {
|
|
69
|
+
return children;
|
|
70
|
+
}
|
|
71
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
72
|
+
_pixelmotion.motion.div,
|
|
73
|
+
{
|
|
74
|
+
animate: { height: "auto", opacity: 1 },
|
|
75
|
+
exit: { height: 0, opacity: 0 },
|
|
76
|
+
initial: { height: 0, opacity: 0 },
|
|
77
|
+
style: { overflow: "hidden" },
|
|
78
|
+
transition: {
|
|
79
|
+
height: { duration: 0.2, ease: "easeInOut" },
|
|
80
|
+
opacity: { duration: 0.2, delay: 0.2 }
|
|
81
|
+
// Fade in after height animation
|
|
82
|
+
},
|
|
83
|
+
children
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
const animatedFallback = shouldAnimate ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
88
|
+
_pixelmotion.motion.div,
|
|
89
|
+
{
|
|
90
|
+
exit: { height: 0, opacity: 0 },
|
|
91
|
+
initial: { height: "auto", opacity: 1 },
|
|
92
|
+
style: { overflow: "hidden" },
|
|
93
|
+
transition: {
|
|
94
|
+
height: { duration: 0.3, ease: "easeInOut" },
|
|
95
|
+
opacity: { duration: 0.2 }
|
|
96
|
+
},
|
|
97
|
+
children: fallback
|
|
98
|
+
},
|
|
99
|
+
"fallback"
|
|
100
|
+
) : fallback;
|
|
101
|
+
const content = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Suspense, { fallback: animatedFallback, children: wrapWithMotion(/* @__PURE__ */ _jsxruntime.jsx.call(void 0, WrappedComponent, _chunkAHEA4IJVcjs.__spreadValues.call(void 0, {}, props))) });
|
|
102
|
+
if (!errorFallback || disableErrorBoundary) {
|
|
103
|
+
return content;
|
|
104
|
+
}
|
|
105
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
106
|
+
ErrorBoundary,
|
|
107
|
+
{
|
|
108
|
+
fallback: errorFallback,
|
|
109
|
+
onError: defaultOnError,
|
|
110
|
+
shouldAnimate,
|
|
111
|
+
children: content
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
};
|
|
115
|
+
WithSuspenseComponent.displayName = `withSuspense(${(_f = (_e = WrappedComponent.displayName) != null ? _e : WrappedComponent.name) != null ? _f : "Component"})`;
|
|
116
|
+
return WithSuspenseComponent;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
exports.createWithSuspense = createWithSuspense;
|
|
123
|
+
//# sourceMappingURL=chunk-WCE3O6UA.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-WCE3O6UA.cjs","../src/utils/createWithSuspense/createWithSuspense.tsx"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACFA,8BAA2C;AAE3C,sDAAyC;AAkDjC,+CAAA;AAlCR,IAAM,cAAA,EAAN,MAAA,QAA4B,iBAAkD;AAAA,EAC5E,WAAA,CAAY,KAAA,EAA2B;AACrC,IAAA,KAAA,CAAM,KAAK,CAAA;AACX,IAAA,IAAA,CAAK,MAAA,EAAQ,EAAE,KAAA,EAAO,IAAA,EAAM,SAAA,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5B,UAAA,EAAY;AAAA,YACV,MAAA,EAAQ,EAAE,QAAA,EAAU,GAAA,EAAK,IAAA,EAAM,YAAY,CAAA;AAAA,YAC3C,OAAA,EAAS,EAAE,QAAA,EAAU,IAAI;AAAA,UAC3B,CAAA;AAAA,UAEC,QAAA,EAAA;AAAA,QAAA,CAAA;AAAA,QATG;AAAA,MAUN,EAAA,EAEA,QAAA;AAGF,MAAA,MAAM,QAAA,kBACJ,6BAAA,eAAC,EAAA,EAAS,QAAA,EAAU,gBAAA,EACjB,QAAA,EAAA,cAAA,iBAAe,6BAAA,gBAAC,EAAA,8CAAA,CAAA,CAAA,EAAqB,KAAA,CAAO,CAAE,EAAA,CACjD,CAAA;AAIF,MAAA,GAAA,CAAI,CAAC,cAAA,GAAiB,oBAAA,EAAsB;AAC1C,QAAA,OAAO,OAAA;AAAA,MACT;AAEA,MAAA,uBACE,6BAAA;AAAA,QAAC,aAAA;AAAA,QAAA;AAAA,UACC,QAAA,EAAU,aAAA;AAAA,UACV,OAAA,EAAS,cAAA;AAAA,UACT,aAAA;AAAA,UAEC,QAAA,EAAA;AAAA,QAAA;AAAA,MACH,CAAA;AAAA,IAEJ,CAAA;AAEA,IAAA,qBAAA,CAAsB,YAAA,EAAc,CAAA,aAAA,EAAA,CAClC,GAAA,EAAA,CAAA,GAAA,EAAA,gBAAA,CAAiB,WAAA,EAAA,GAAjB,KAAA,EAAA,GAAA,EAAgC,gBAAA,CAAiB,IAAA,EAAA,GAAjD,KAAA,EAAA,GAAA,EAAyD,WAC3D,CAAA,CAAA,CAAA;AAEA,IAAA,OAAO,qBAAA;AAAA,EACT,CAAA;AACF;AD5GA;AACA;AACE;AACF,gDAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-WCE3O6UA.cjs","sourcesContent":[null,"import type { ComponentType, ErrorInfo, ReactNode } from 'react';\n\nimport React, { Component, Suspense } from 'react';\n\nimport { motion, useReducedMotion } from '@fuf-stack/pixel-motion';\n\ninterface ErrorBoundaryProps {\n children: ReactNode;\n fallback: (error: Error, errorInfo: ErrorInfo) => ReactNode;\n // eslint-disable-next-line react/require-default-props\n shouldAnimate?: boolean;\n // eslint-disable-next-line react/require-default-props\n onError?: (error: Error, errorInfo: ErrorInfo) => void;\n}\n\ninterface ErrorBoundaryState {\n error: Error | null;\n errorInfo: ErrorInfo | null;\n}\n\nclass ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = { error: null, errorInfo: null };\n }\n\n static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState> {\n return { error };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n const { onError } = this.props;\n this.setState({ errorInfo });\n onError?.(error, errorInfo);\n }\n\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n render() {\n const { error, errorInfo } = this.state;\n const { fallback, children, shouldAnimate } = this.props;\n\n if (error) {\n // errorInfo might not be set yet in getDerivedStateFromError,\n // so we provide a default empty errorInfo to prevent errors from bubbling up\n const errorFallback = fallback(\n error,\n errorInfo ?? { componentStack: '' },\n );\n\n if (!shouldAnimate) {\n return errorFallback;\n }\n\n return (\n <motion.div\n animate={{ height: 'auto', opacity: 1 }}\n initial={{ height: 0, opacity: 0 }}\n style={{ overflow: 'hidden' }}\n transition={{\n height: { duration: 0.2, ease: 'easeInOut' },\n opacity: { duration: 0.2, delay: 0.2 },\n }}\n >\n {errorFallback}\n </motion.div>\n );\n }\n\n return children;\n }\n}\n\nexport interface CreateWithSuspenseConfig {\n /**\n * Default fallback to show while suspending\n */\n defaultFallback?: ReactNode;\n /**\n * Disable height animation between loading and loaded states\n * @default false\n */\n disableAnimation?: boolean;\n /**\n * Error boundary fallback renderer\n * @param error - The error that was caught\n * @param errorInfo - Additional error information\n */\n errorFallback?: (error: Error, errorInfo: ErrorInfo) => ReactNode;\n /**\n * Callback when an error is caught\n * @param error - The error that was caught\n * @param errorInfo - Additional error information\n */\n onError?: (error: Error, errorInfo: ErrorInfo) => void;\n}\n\nexport interface WithSuspenseOptions {\n /**\n * Override the default fallback for this specific component\n */\n fallback?: ReactNode;\n /**\n * Override the error boundary for this specific component\n */\n errorFallback?: (error: Error, errorInfo: ErrorInfo) => ReactNode;\n /**\n * Disable height animation for this specific component\n */\n disableAnimation?: boolean;\n /**\n * Disable error boundary for this specific component\n */\n disableErrorBoundary?: boolean;\n}\n\n/**\n * Factory function to create a project-specific withSuspense HOC with default configuration.\n *\n * @example\n * ```tsx\n * // In your project setup file\n * export const withSuspense = createWithSuspense({\n * defaultFallback: <YourSpinner />,\n * errorFallback: (error) => <YourErrorComponent error={error} />,\n * onError: (error, errorInfo) => {\n * console.error('Caught error:', error, errorInfo);\n * // Send to error tracking service\n * },\n * });\n *\n * // Then use throughout your project\n * const MyComponent = withSuspense(({ userId }) => {\n * const user = use(fetchUser(userId));\n * return <div>{user.name}</div>;\n * });\n * ```\n */\nexport function createWithSuspense(config: CreateWithSuspenseConfig = {}) {\n const {\n defaultFallback = null,\n disableAnimation: defaultDisableAnimation = false,\n errorFallback: defaultErrorFallback,\n onError: defaultOnError,\n } = config;\n\n return function withSuspense<P extends object>(\n WrappedComponent: ComponentType<P>,\n options?: WithSuspenseOptions,\n ) {\n const fallback = options?.fallback ?? defaultFallback;\n const errorFallback = options?.errorFallback ?? defaultErrorFallback;\n const disableErrorBoundary = options?.disableErrorBoundary ?? false;\n const disableAnimation =\n options?.disableAnimation ?? defaultDisableAnimation;\n\n const WithSuspenseComponent = (props: P) => {\n const prefersReducedMotion = useReducedMotion();\n const shouldAnimate = !disableAnimation && !prefersReducedMotion;\n\n // Wrap content in motion wrapper if animation is enabled\n const wrapWithMotion = (children: ReactNode): ReactNode => {\n if (!shouldAnimate) {\n return children;\n }\n\n return (\n <motion.div\n animate={{ height: 'auto', opacity: 1 }}\n exit={{ height: 0, opacity: 0 }}\n initial={{ height: 0, opacity: 0 }}\n style={{ overflow: 'hidden' }}\n transition={{\n height: { duration: 0.2, ease: 'easeInOut' },\n opacity: { duration: 0.2, delay: 0.2 }, // Fade in after height animation\n }}\n >\n {children}\n </motion.div>\n );\n };\n\n const animatedFallback = shouldAnimate ? (\n <motion.div\n key=\"fallback\"\n exit={{ height: 0, opacity: 0 }}\n initial={{ height: 'auto', opacity: 1 }}\n style={{ overflow: 'hidden' }}\n transition={{\n height: { duration: 0.3, ease: 'easeInOut' },\n opacity: { duration: 0.2 },\n }}\n >\n {fallback}\n </motion.div>\n ) : (\n fallback\n );\n\n const content = (\n <Suspense fallback={animatedFallback}>\n {wrapWithMotion(<WrappedComponent {...props} />)}\n </Suspense>\n );\n\n // If no error boundary configured or explicitly disabled, return just Suspense\n if (!errorFallback || disableErrorBoundary) {\n return content;\n }\n\n return (\n <ErrorBoundary\n fallback={errorFallback}\n onError={defaultOnError}\n shouldAnimate={shouldAnimate}\n >\n {content}\n </ErrorBoundary>\n );\n };\n\n WithSuspenseComponent.displayName = `withSuspense(${\n WrappedComponent.displayName ?? WrappedComponent.name ?? 'Component'\n })`;\n\n return WithSuspenseComponent;\n };\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/hooks/useDebounce/useDebounce.ts
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
var useDebounce = (value, delay) => {
|
|
4
|
+
const [debouncedValue, setDebouncedValue] = useState(value);
|
|
5
|
+
useEffect(
|
|
6
|
+
() => {
|
|
7
|
+
const handler = setTimeout(() => {
|
|
8
|
+
setDebouncedValue(value);
|
|
9
|
+
}, delay);
|
|
10
|
+
return () => {
|
|
11
|
+
clearTimeout(handler);
|
|
12
|
+
};
|
|
13
|
+
},
|
|
14
|
+
[value, delay]
|
|
15
|
+
// Only re-call effect if value or delay changes
|
|
16
|
+
);
|
|
17
|
+
return debouncedValue;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export {
|
|
21
|
+
useDebounce
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=chunk-XLR7LQR6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hooks/useDebounce/useDebounce.ts"],"sourcesContent":["/* eslint-disable import-x/prefer-default-export */\n\nimport { useEffect, useState } from 'react';\n\n/**\n * Hook that debounces a value\n * @param value - The value to debounce\n * @param delay - Delay in milliseconds\n * @returns The debounced value\n */\nexport const useDebounce = <Value>(value: Value, delay: number) => {\n // State and setters for debounced value\n const [debouncedValue, setDebouncedValue] = useState(value);\n\n useEffect(\n () => {\n // Update debounced value after delay\n const handler = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n\n // Cancel the timeout if value changes (also on delay change or unmount)\n // This is how we prevent debounced value from updating if value is changed ...\n // .. within the delay period. Timeout gets cleared and restarted.\n return () => {\n clearTimeout(handler);\n };\n },\n [value, delay], // Only re-call effect if value or delay changes\n );\n\n return debouncedValue;\n};\n"],"mappings":";AAEA,SAAS,WAAW,gBAAgB;AAQ7B,IAAM,cAAc,CAAQ,OAAc,UAAkB;AAEjE,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAAS,KAAK;AAE1D;AAAA,IACE,MAAM;AAEJ,YAAM,UAAU,WAAW,MAAM;AAC/B,0BAAkB,KAAK;AAAA,MACzB,GAAG,KAAK;AAKR,aAAO,MAAM;AACX,qBAAa,OAAO;AAAA,MACtB;AAAA,IACF;AAAA,IACA,CAAC,OAAO,KAAK;AAAA;AAAA,EACf;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkEJKGMMBTcjs = require('../../chunk-EJKGMMBT.cjs');
|
|
4
|
+
require('../../chunk-AHEA4IJV.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.useDebounce = _chunkEJKGMMBTcjs.useDebounce;
|
|
8
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/hooks/useDebounce/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,4DAAiC;AACjC,oCAAiC;AACjC;AACE;AACF,oDAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/hooks/useDebounce/index.cjs"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkON3PVFZYcjs = require('../../chunk-ON3PVFZY.cjs');
|
|
4
|
+
require('../../chunk-AHEA4IJV.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.useIsInitialRenderCycle = _chunkON3PVFZYcjs.useIsInitialRenderCycle;
|
|
8
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/hooks/useIsInitialRenderCycle/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,4DAAiC;AACjC,oCAAiC;AACjC;AACE;AACF,4EAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/hooks/useIsInitialRenderCycle/index.cjs"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkIXBNFKOScjs = require('../../chunk-IXBNFKOS.cjs');
|
|
4
|
+
require('../../chunk-AHEA4IJV.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.useLocalStorage = _chunkIXBNFKOScjs.useLocalStorage;
|
|
8
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/hooks/useLocalStorage/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,4DAAiC;AACjC,oCAAiC;AACjC;AACE;AACF,4DAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/hooks/useLocalStorage/index.cjs"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/index.cjs
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
+
var _chunkEJKGMMBTcjs = require('./chunk-EJKGMMBT.cjs');
|
|
3
4
|
|
|
4
|
-
var _chunkDBHL7ETRcjs = require('./chunk-DBHL7ETR.cjs');
|
|
5
5
|
|
|
6
|
+
var _chunkIXBNFKOScjs = require('./chunk-IXBNFKOS.cjs');
|
|
6
7
|
|
|
7
8
|
|
|
8
|
-
var
|
|
9
|
+
var _chunkWCE3O6UAcjs = require('./chunk-WCE3O6UA.cjs');
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
|
|
13
|
+
var _chunkK5VPNWIJcjs = require('./chunk-K5VPNWIJ.cjs');
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
var _chunkFQJ32476cjs = require('./chunk-FQJ32476.cjs');
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
var _chunkON3PVFZYcjs = require('./chunk-ON3PVFZY.cjs');
|
|
14
21
|
|
|
15
22
|
|
|
16
23
|
|
|
@@ -71,7 +78,7 @@ var _chunkNSYHAJM2cjs = require('./chunk-NSYHAJM2.cjs');
|
|
|
71
78
|
var _chunkK25U4BJOcjs = require('./chunk-K25U4BJO.cjs');
|
|
72
79
|
|
|
73
80
|
|
|
74
|
-
var
|
|
81
|
+
var _chunkVHESFBAQcjs = require('./chunk-VHESFBAQ.cjs');
|
|
75
82
|
|
|
76
83
|
|
|
77
84
|
var _chunk77J7NZYBcjs = require('./chunk-77J7NZYB.cjs');
|
|
@@ -81,11 +88,11 @@ var _chunkHG7AE6Q2cjs = require('./chunk-HG7AE6Q2.cjs');
|
|
|
81
88
|
|
|
82
89
|
|
|
83
90
|
|
|
84
|
-
var
|
|
91
|
+
var _chunkIBX6A72Pcjs = require('./chunk-IBX6A72P.cjs');
|
|
85
92
|
|
|
86
93
|
|
|
87
94
|
|
|
88
|
-
var
|
|
95
|
+
var _chunkFVQDVD3Ecjs = require('./chunk-FVQDVD3E.cjs');
|
|
89
96
|
require('./chunk-AHEA4IJV.cjs');
|
|
90
97
|
|
|
91
98
|
|
|
@@ -131,5 +138,6 @@ require('./chunk-AHEA4IJV.cjs');
|
|
|
131
138
|
|
|
132
139
|
|
|
133
140
|
|
|
134
|
-
|
|
141
|
+
|
|
142
|
+
exports.Accordion = _chunkNSYHAJM2cjs.Accordion_default; exports.Alert = _chunkK25U4BJOcjs.Alert_default; exports.Avatar = _chunk77J7NZYBcjs.Avatar_default; exports.AvatarGroup = _chunkVHESFBAQcjs.AvatarGroup_default; exports.Badge = _chunkHG7AE6Q2cjs.Badge_default; exports.Breadcrumb = _chunkIBX6A72Pcjs.Breadcrumb_default; exports.Button = _chunkFVQDVD3Ecjs.Button_default; exports.ButtonGroup = _chunkY3RSI2KVcjs.ButtonGroup_default; exports.Card = _chunk6PCFYEJHcjs.Card_default; exports.Drawer = _chunkOLU26V56cjs.Drawer_default; exports.Json = _chunkIBP3GUEAcjs.Json_default; exports.Label = _chunkBPBEZCSPcjs.Label_default; exports.Menu = _chunk5ZT7C5IPcjs.Menu_default; exports.Modal = _chunkB2PDISUUcjs.Modal_default; exports.Popover = _chunkRPULU7LCcjs.Popover_default; exports.Progress = _chunkK5VPNWIJcjs.Progress_default; exports.ProgressCircular = _chunkFQJ32476cjs.ProgressCircular_default; exports.Table = _chunkYUR6N2RBcjs.Table_default; exports.Tabs = _chunkG3YTOGEGcjs.Tabs_default; exports.Toast = _chunk56CIU4EGcjs.Toast; exports.ToastProvider = _chunk56CIU4EGcjs.ToastProvider_default; exports.Tooltip = _chunkZIAB3EXUcjs.Tooltip_default; exports.accordionVariants = _chunkNSYHAJM2cjs.accordionVariants; exports.addToast = _chunk56CIU4EGcjs.addToast; exports.alertVariants = _chunkK25U4BJOcjs.alertVariants; exports.breadcrumbVariants = _chunkIBX6A72Pcjs.breadcrumbVariants; exports.buttonVariants = _chunkFVQDVD3Ecjs.buttonVariants; exports.cardVariants = _chunk6PCFYEJHcjs.cardVariants; exports.createWithSuspense = _chunkWCE3O6UAcjs.createWithSuspense; exports.drawerBackdrops = _chunkOLU26V56cjs.drawerBackdrops; exports.drawerPlacements = _chunkOLU26V56cjs.drawerPlacements; exports.drawerRadii = _chunkOLU26V56cjs.drawerRadii; exports.drawerSizes = _chunkOLU26V56cjs.drawerSizes; exports.drawerVariants = _chunkOLU26V56cjs.drawerVariants; exports.labelVariants = _chunkBPBEZCSPcjs.labelVariants; exports.modalVariants = _chunkB2PDISUUcjs.modalVariants; exports.progressCircularVariants = _chunkFQJ32476cjs.progressCircularVariants; exports.progressVariants = _chunkK5VPNWIJcjs.progressVariants; exports.tableVariants = _chunkYUR6N2RBcjs.tableVariants; exports.tabsVariants = _chunkG3YTOGEGcjs.tabsVariants; exports.toastVariants = _chunk56CIU4EGcjs.toastVariants; exports.useDebounce = _chunkEJKGMMBTcjs.useDebounce; exports.useIsInitialRenderCycle = _chunkON3PVFZYcjs.useIsInitialRenderCycle; exports.useLocalStorage = _chunkIXBNFKOScjs.useLocalStorage;
|
|
135
143
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/index.cjs"],"names":[],"mappings":"AAAA;AACE;
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,m7EAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/index.cjs"}
|
package/dist/index.d.cts
CHANGED
|
@@ -20,7 +20,10 @@ export { b as TabProps, T as Tabs, a as TabsProps, t as tabsVariants } from './T
|
|
|
20
20
|
export { Toast } from '@heroui/toast';
|
|
21
21
|
export { A as AddToastVariantProps, b as ToastProps, T as ToastProvider, c as ToastProviderProps, a as addToast, t as toastVariants } from './ToastProvider-BaynjNgq.cjs';
|
|
22
22
|
export { T as Tooltip, b as TooltipPlacement, a as TooltipProps } from './Tooltip-DoIaNgTC.cjs';
|
|
23
|
-
export { useDebounce
|
|
23
|
+
export { useDebounce } from './hooks/useDebounce/index.cjs';
|
|
24
|
+
export { useIsInitialRenderCycle } from './hooks/useIsInitialRenderCycle/index.cjs';
|
|
25
|
+
export { useLocalStorage } from './hooks/useLocalStorage/index.cjs';
|
|
26
|
+
export { CreateWithSuspenseConfig, WithSuspenseOptions, createWithSuspense } from './utils/createWithSuspense/index.cjs';
|
|
24
27
|
export { ButtonGroupProps } from '@heroui/button';
|
|
25
28
|
import 'react/jsx-runtime';
|
|
26
29
|
import 'tailwind-variants';
|
package/dist/index.d.ts
CHANGED
|
@@ -20,7 +20,10 @@ export { b as TabProps, T as Tabs, a as TabsProps, t as tabsVariants } from './T
|
|
|
20
20
|
export { Toast } from '@heroui/toast';
|
|
21
21
|
export { A as AddToastVariantProps, b as ToastProps, T as ToastProvider, c as ToastProviderProps, a as addToast, t as toastVariants } from './ToastProvider-BaynjNgq.js';
|
|
22
22
|
export { T as Tooltip, b as TooltipPlacement, a as TooltipProps } from './Tooltip-DoIaNgTC.js';
|
|
23
|
-
export { useDebounce
|
|
23
|
+
export { useDebounce } from './hooks/useDebounce/index.js';
|
|
24
|
+
export { useIsInitialRenderCycle } from './hooks/useIsInitialRenderCycle/index.js';
|
|
25
|
+
export { useLocalStorage } from './hooks/useLocalStorage/index.js';
|
|
26
|
+
export { CreateWithSuspenseConfig, WithSuspenseOptions, createWithSuspense } from './utils/createWithSuspense/index.js';
|
|
24
27
|
export { ButtonGroupProps } from '@heroui/button';
|
|
25
28
|
import 'react/jsx-runtime';
|
|
26
29
|
import 'tailwind-variants';
|