@levo-so/studio 0.1.6 → 0.1.8
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/{Beams-sX-ed8H5.js → Beams-B2rZmhLI.js} +40 -27
- package/dist/Dots-OyX1E9Ts.js +164 -0
- package/dist/Gradient-DOFsccBS.js +50 -0
- package/dist/Grid-DRZu52wi.js +191 -0
- package/dist/Waves-DzqlDCGx.js +183 -0
- package/dist/bridge/constants.d.ts +12 -0
- package/dist/bridge/index.d.ts +1 -0
- package/dist/bridge/utils.d.ts +1 -0
- package/dist/components/ActionWrapper.d.ts +1 -1
- package/dist/components/LoginForm/ErrorDisplay.d.ts +8 -0
- package/dist/components/LoginForm/GoogleOAuth.d.ts +10 -0
- package/dist/components/LoginForm/index.d.ts +7 -0
- package/dist/components/LoginModal/index.d.ts +7 -0
- package/dist/components/accessCard/EntryCard/index.d.ts +11 -0
- package/dist/components/accessCard/LoginCard/index.d.ts +7 -0
- package/dist/components/accessCard/MessageCard/index.d.ts +8 -0
- package/dist/components/accessCard/MessageFooter/index.d.ts +3 -0
- package/dist/components/accessCard/card/index.d.ts +10 -0
- package/dist/components/backgroundPresets/Gradient.d.ts +1 -1
- package/dist/components/backgroundPresets/presetSystem.d.ts +1 -1
- package/dist/components/shared/EmailInput/index.d.ts +10 -0
- package/dist/components/shared/OTPInput/index.d.ts +11 -0
- package/dist/components/ui/StatefulButton/index.d.ts +15 -0
- package/dist/contentEngine/themeUtils.d.ts +1 -1
- package/dist/context/ModalManager.d.ts +21 -0
- package/dist/core/AccessManager/index.d.ts +7 -0
- package/dist/elements/Container.d.ts +1 -0
- package/dist/elements/UserMenu.d.ts +8 -0
- package/dist/elements/accordion/index.d.ts +1 -1
- package/dist/elements/dialog/index.d.ts +16 -0
- package/dist/elements/index.d.ts +1 -0
- package/dist/elements/popover/index.d.ts +1 -1
- package/dist/hooks/useLogin.d.ts +29 -0
- package/dist/{index-DXb2tXBX.js → index-2NFcpkxw.js} +3545 -2706
- package/dist/index-BcbNOVub.js +30 -0
- package/dist/index-Ce2VNBY0.js +49 -0
- package/dist/index-QRx1kG5G.js +38 -0
- package/dist/index-RdFZytGV.js +54 -0
- package/dist/index-vDaUilga.js +23 -0
- package/dist/index.css +1 -1
- package/dist/index.js +82 -78
- package/dist/index2.css +1 -0
- package/dist/index3.css +1 -0
- package/dist/index4.css +1 -0
- package/dist/index5.css +1 -0
- package/dist/index6.css +1 -0
- package/dist/interfaces/block.d.ts +1 -1
- package/dist/interfaces/contentSchema.d.ts +11 -9
- package/dist/interfaces/levoBlock.d.ts +3 -2
- package/dist/interfaces/site.d.ts +6 -5
- package/dist/pixel/constants/borderRadius.d.ts +30 -0
- package/dist/pixel/constants/colorOptions.d.ts +30 -25
- package/dist/pixel/constants/fontSizeOptions.d.ts +5 -0
- package/dist/pixel/index.d.ts +1 -1
- package/dist/pixel/optionsMap.d.ts +5 -1
- package/dist/pixel/parserUtil.d.ts +15 -0
- package/dist/pixel/propertyMap.d.ts +1 -1
- package/dist/providers/AuthProvider.d.ts +8 -10
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/levoClient.d.ts +5 -0
- package/dist/utils/withBlockPropsUtils.d.ts +3 -2
- package/package.json +4 -4
- package/dist/Dots-CIprNvGi.js +0 -140
- package/dist/Gradient-DIn_uQLE.js +0 -42
- package/dist/Grid-DXjfqDT3.js +0 -162
- package/dist/Waves-CCDZf3yc.js +0 -127
- package/dist/utils/blocksLevoClient.d.ts +0 -5
|
@@ -1,29 +1,4 @@
|
|
|
1
1
|
export declare const colorOptions: {
|
|
2
|
-
readonly black: {
|
|
3
|
-
readonly label: "Black";
|
|
4
|
-
readonly value: "black";
|
|
5
|
-
readonly css: "#000000";
|
|
6
|
-
};
|
|
7
|
-
readonly white: {
|
|
8
|
-
readonly label: "White";
|
|
9
|
-
readonly value: "white";
|
|
10
|
-
readonly css: "#FFFFFF";
|
|
11
|
-
};
|
|
12
|
-
readonly "text-1": {
|
|
13
|
-
readonly label: "Text 1";
|
|
14
|
-
readonly value: "text-1";
|
|
15
|
-
readonly css: "var(--color-text-1)";
|
|
16
|
-
};
|
|
17
|
-
readonly "text-2": {
|
|
18
|
-
readonly label: "Text 2";
|
|
19
|
-
readonly value: "text-2";
|
|
20
|
-
readonly css: "var(--color-text-2)";
|
|
21
|
-
};
|
|
22
|
-
readonly "text-3": {
|
|
23
|
-
readonly label: "Text 3";
|
|
24
|
-
readonly value: "text-3";
|
|
25
|
-
readonly css: "var(--color-text-3)";
|
|
26
|
-
};
|
|
27
2
|
readonly brand: {
|
|
28
3
|
readonly label: "Brand";
|
|
29
4
|
readonly value: "brand";
|
|
@@ -44,6 +19,21 @@ export declare const colorOptions: {
|
|
|
44
19
|
readonly value: "brandSecondaryForeground";
|
|
45
20
|
readonly css: "var(--color-brand-secondary-foreground)";
|
|
46
21
|
};
|
|
22
|
+
readonly "text-1": {
|
|
23
|
+
readonly label: "Text 1";
|
|
24
|
+
readonly value: "text-1";
|
|
25
|
+
readonly css: "var(--color-text-1)";
|
|
26
|
+
};
|
|
27
|
+
readonly "text-2": {
|
|
28
|
+
readonly label: "Text 2";
|
|
29
|
+
readonly value: "text-2";
|
|
30
|
+
readonly css: "var(--color-text-2)";
|
|
31
|
+
};
|
|
32
|
+
readonly "text-3": {
|
|
33
|
+
readonly label: "Text 3";
|
|
34
|
+
readonly value: "text-3";
|
|
35
|
+
readonly css: "var(--color-text-3)";
|
|
36
|
+
};
|
|
47
37
|
readonly "background-1": {
|
|
48
38
|
readonly label: "Background 1";
|
|
49
39
|
readonly value: "background-1";
|
|
@@ -59,6 +49,21 @@ export declare const colorOptions: {
|
|
|
59
49
|
readonly value: "background-3";
|
|
60
50
|
readonly css: "var(--color-background-3)";
|
|
61
51
|
};
|
|
52
|
+
readonly page: {
|
|
53
|
+
readonly label: "Page";
|
|
54
|
+
readonly value: "page";
|
|
55
|
+
readonly css: "var(--color-page)";
|
|
56
|
+
};
|
|
57
|
+
readonly black: {
|
|
58
|
+
readonly label: "Black";
|
|
59
|
+
readonly value: "black";
|
|
60
|
+
readonly css: "#000000";
|
|
61
|
+
};
|
|
62
|
+
readonly white: {
|
|
63
|
+
readonly label: "White";
|
|
64
|
+
readonly value: "white";
|
|
65
|
+
readonly css: "#FFFFFF";
|
|
66
|
+
};
|
|
62
67
|
readonly "icon-primary": {
|
|
63
68
|
readonly label: "Icon Primary";
|
|
64
69
|
readonly value: "icon-primary";
|
|
@@ -54,5 +54,10 @@ export declare const fontSizeOptions: {
|
|
|
54
54
|
readonly value: "7xl";
|
|
55
55
|
readonly css: "calc(var(--base-font-size, 1rem) * 4.5)";
|
|
56
56
|
};
|
|
57
|
+
readonly "8xl": {
|
|
58
|
+
readonly label: "8 XL";
|
|
59
|
+
readonly value: "8xl";
|
|
60
|
+
readonly css: "calc(var(--base-font-size, 1rem) * 6)";
|
|
61
|
+
};
|
|
57
62
|
};
|
|
58
63
|
//# sourceMappingURL=fontSizeOptions.d.ts.map
|
package/dist/pixel/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CSSStyleKeys } from './propertyMap';
|
|
2
|
-
export declare const styleObjectToCss: (styleObj: Record<CSSStyleKeys,
|
|
2
|
+
export declare const styleObjectToCss: (styleObj: Record<CSSStyleKeys, unknown>, isNested?: boolean) => string;
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -5,10 +5,14 @@ type CSSOption = {
|
|
|
5
5
|
css?: string;
|
|
6
6
|
};
|
|
7
7
|
export type CSSOptionsRecord = Record<string, CSSOption>;
|
|
8
|
+
type ParseResult = {
|
|
9
|
+
value: string;
|
|
10
|
+
prefix: string;
|
|
11
|
+
};
|
|
8
12
|
export declare const cssOptionsMap: Partial<Record<CSSStyleKeys, {
|
|
9
13
|
options: CSSOptionsRecord;
|
|
10
14
|
skip?: boolean;
|
|
11
|
-
parser?: (value: any) =>
|
|
15
|
+
parser?: (value: any) => ParseResult;
|
|
12
16
|
}>>;
|
|
13
17
|
export default cssOptionsMap;
|
|
14
18
|
//# sourceMappingURL=optionsMap.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface IShadowConfig {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
blur: number;
|
|
5
|
+
spread?: number;
|
|
6
|
+
color?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface IFilterConfig {
|
|
9
|
+
"drop-shadow"?: IShadowConfig;
|
|
10
|
+
blur?: number;
|
|
11
|
+
brightness?: number;
|
|
12
|
+
contrast?: number;
|
|
13
|
+
}
|
|
14
|
+
export declare const formatShadow: (config: IShadowConfig, includeSpread?: boolean) => string;
|
|
15
|
+
//# sourceMappingURL=parserUtil.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type CSSStyleKeys = "font-size" | "font-weight" | "text-align" | "text-decoration" | "line-height" | "letter-spacing" | "color" | "display" | "flex-direction" | "justify-content" | "align-items" | "column-gap" | "row-gap" | "gap" | "grid-template-columns" | "grid-template-rows" | "width" | "min-width" | "max-width" | "height" | "filter" | "min-height" | "max-height" | "object-fit" | "border-radius" | "border-style" | "border-width" | "border-color" | "background-color" | "background-size" | "background-position" | "box-shadow" | "padding" | "padding-top" | "padding-bottom" | "padding-left" | "padding-right" | "margin" | "margin-top" | "margin-bottom" | "margin-left" | "margin-right" | "opacity" | "font" | "background-image" | "overflow" | "-webkit-line-clamp" | "-webkit-box-orient" | "font-family" | "number_of_slides" | "background_video_overlay_color" | "background_video_position";
|
|
1
|
+
export type CSSStyleKeys = "font-size" | "font-weight" | "text-align" | "text-decoration" | "line-height" | "letter-spacing" | "color" | "display" | "flex-direction" | "justify-content" | "align-items" | "column-gap" | "row-gap" | "gap" | "grid-template-columns" | "grid-template-rows" | "width" | "min-width" | "max-width" | "height" | "filter" | "min-height" | "max-height" | "object-fit" | "border-radius" | "border-style" | "border-width" | "border-top-width" | "border-right-width" | "border-bottom-width" | "border-left-width" | "border-color" | "background-color" | "background-size" | "background-position" | "box-shadow" | "padding" | "padding-top" | "padding-bottom" | "padding-left" | "padding-right" | "margin" | "margin-top" | "margin-bottom" | "margin-left" | "margin-right" | "opacity" | "font" | "background-image" | "overflow" | "-webkit-line-clamp" | "-webkit-box-orient" | "font-family" | "number_of_slides" | "background_video_overlay_color" | "background_video_position";
|
|
2
2
|
//# sourceMappingURL=propertyMap.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ILevoMembership, IWorkspace } from '@levo-so/core';
|
|
2
|
-
interface
|
|
2
|
+
interface IAuthState {
|
|
3
3
|
isLoggedIn: boolean;
|
|
4
4
|
account: ILevoMembership.Account | null;
|
|
5
5
|
workspace: IWorkspace | null;
|
|
@@ -7,19 +7,17 @@ interface AuthProviderInterface {
|
|
|
7
7
|
isAuthLoading: boolean;
|
|
8
8
|
isSignOutLoading: boolean;
|
|
9
9
|
isVerifying: boolean;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
onVerifyError?: (() => void) | undefined;
|
|
17
|
-
}) => void;
|
|
10
|
+
}
|
|
11
|
+
interface IAuthActions {
|
|
12
|
+
setAuthState: (updates: Partial<IAuthState>) => void;
|
|
13
|
+
resetAuth: () => void;
|
|
14
|
+
}
|
|
15
|
+
interface IAuthProviderInterface extends IAuthState, IAuthActions {
|
|
18
16
|
}
|
|
19
17
|
export declare const AuthProvider: React.FC<{
|
|
20
18
|
children: React.ReactNode;
|
|
21
19
|
workspace: IWorkspace | null;
|
|
22
20
|
}>;
|
|
23
21
|
export default AuthProvider;
|
|
24
|
-
export declare const useAuth: () =>
|
|
22
|
+
export declare const useAuth: () => IAuthProviderInterface;
|
|
25
23
|
//# sourceMappingURL=AuthProvider.d.ts.map
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
|
-
import { IFieldConfig, AnimationConfig } from '../interfaces';
|
|
3
2
|
import { MotionProps } from 'motion/react';
|
|
3
|
+
import { IFieldConfig, AnimationConfig } from '../interfaces';
|
|
4
4
|
type MutableDeep<T> = T extends object ? {
|
|
5
5
|
-readonly [K in keyof T]: MutableDeep<T[K]>;
|
|
6
6
|
} : T;
|
|
@@ -108,7 +108,8 @@ export declare const generateElementClassName: (elementKey: string, blockId: str
|
|
|
108
108
|
export declare const useGeneratedClassName: (elementKey: string, blockId: string, configValue: IFieldConfig | undefined) => string;
|
|
109
109
|
/**
|
|
110
110
|
* Hook to create a memoized Motion component
|
|
111
|
-
* Only
|
|
111
|
+
* Only creates Motion component when animation config exists
|
|
112
|
+
* Recreates when animation config changes to enable animation previews
|
|
112
113
|
*
|
|
113
114
|
* @param WrappedComponent - The component to wrap with motion
|
|
114
115
|
* @param animationConfig - The animation configuration
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@levo-so/studio",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"author": "Levo Engineering <devs@theinternetfolks.com>",
|
|
5
5
|
"description": "Levo Studio components and utilities for building block-based pages",
|
|
6
6
|
"type": "module",
|
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@emotion/is-prop-valid": "1.3.1",
|
|
32
|
-
"
|
|
33
|
-
"@radix-ui/react-popover": "1.1.1",
|
|
32
|
+
"radix-ui": "1.4.3",
|
|
34
33
|
"@theinternetfolks/mate": "1.0.4",
|
|
35
34
|
"class-variance-authority": "0.7.0",
|
|
36
35
|
"culori": "4.0.1",
|
|
@@ -68,6 +67,7 @@
|
|
|
68
67
|
".": {
|
|
69
68
|
"types": "./dist/index.d.ts",
|
|
70
69
|
"default": "./dist/index.js"
|
|
71
|
-
}
|
|
70
|
+
},
|
|
71
|
+
"./index.css": "./dist/index.css"
|
|
72
72
|
}
|
|
73
73
|
}
|
package/dist/Dots-CIprNvGi.js
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as a, jsxs as x } from "react/jsx-runtime";
|
|
3
|
-
import c from "react";
|
|
4
|
-
import { cn as o } from "@levo-so/react";
|
|
5
|
-
import { m as $ } from "./index-DXb2tXBX.js";
|
|
6
|
-
const M = c.memo(
|
|
7
|
-
({
|
|
8
|
-
className: l,
|
|
9
|
-
dotColor: i = "#00ff00",
|
|
10
|
-
dotSize: h = 2,
|
|
11
|
-
spacing: t = 30,
|
|
12
|
-
isAnimated: m = !1,
|
|
13
|
-
speed: d = 1
|
|
14
|
-
}) => {
|
|
15
|
-
const r = c.useMemo(
|
|
16
|
-
() => ({
|
|
17
|
-
cx: t / 2,
|
|
18
|
-
cy: t / 2,
|
|
19
|
-
r: h,
|
|
20
|
-
width: t,
|
|
21
|
-
height: t
|
|
22
|
-
}),
|
|
23
|
-
[t, h]
|
|
24
|
-
), u = c.useMemo(
|
|
25
|
-
() => `dots-pattern-${Math.random().toString(36).substr(2, 9)}`,
|
|
26
|
-
[]
|
|
27
|
-
), f = c.useMemo(() => {
|
|
28
|
-
if (!m) return [];
|
|
29
|
-
const e = [], y = Math.ceil(100 / (t / 10)), w = Math.ceil(100 / (t / 10));
|
|
30
|
-
for (let n = 0; n < y; n++)
|
|
31
|
-
for (let s = 0; s < w; s++)
|
|
32
|
-
e.push({
|
|
33
|
-
id: `${n}-${s}`,
|
|
34
|
-
x: s * t / 10 + Math.random() * 5,
|
|
35
|
-
y: n * t / 10 + Math.random() * 5,
|
|
36
|
-
delay: Math.random() * 3,
|
|
37
|
-
amplitude: 2 + Math.random() * 3
|
|
38
|
-
});
|
|
39
|
-
return e;
|
|
40
|
-
}, [m, t]);
|
|
41
|
-
return m ? /* @__PURE__ */ a(
|
|
42
|
-
"div",
|
|
43
|
-
{
|
|
44
|
-
className: o(
|
|
45
|
-
"absolute inset-0 flex h-full w-full items-center justify-center overflow-hidden",
|
|
46
|
-
"z-[-1]",
|
|
47
|
-
l
|
|
48
|
-
),
|
|
49
|
-
children: /* @__PURE__ */ a(
|
|
50
|
-
"svg",
|
|
51
|
-
{
|
|
52
|
-
className: "pointer-events-none absolute z-0 h-full w-full",
|
|
53
|
-
width: "100%",
|
|
54
|
-
height: "100%",
|
|
55
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
56
|
-
children: f.map((e) => /* @__PURE__ */ a(
|
|
57
|
-
$.circle,
|
|
58
|
-
{
|
|
59
|
-
cx: `${e.x}%`,
|
|
60
|
-
cy: `${e.y}%`,
|
|
61
|
-
r: h,
|
|
62
|
-
fill: i,
|
|
63
|
-
initial: { opacity: 0.3 },
|
|
64
|
-
animate: {
|
|
65
|
-
opacity: [0.3, 0.8, 0.3],
|
|
66
|
-
cx: [
|
|
67
|
-
`${e.x}%`,
|
|
68
|
-
`${e.x + e.amplitude}%`,
|
|
69
|
-
`${e.x - e.amplitude}%`,
|
|
70
|
-
`${e.x}%`
|
|
71
|
-
],
|
|
72
|
-
cy: [
|
|
73
|
-
`${e.y}%`,
|
|
74
|
-
`${e.y - e.amplitude}%`,
|
|
75
|
-
`${e.y + e.amplitude}%`,
|
|
76
|
-
`${e.y}%`
|
|
77
|
-
]
|
|
78
|
-
},
|
|
79
|
-
transition: {
|
|
80
|
-
duration: 8 / d,
|
|
81
|
-
repeat: 1 / 0,
|
|
82
|
-
ease: "easeInOut",
|
|
83
|
-
delay: e.delay
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
e.id
|
|
87
|
-
))
|
|
88
|
-
}
|
|
89
|
-
)
|
|
90
|
-
}
|
|
91
|
-
) : /* @__PURE__ */ a(
|
|
92
|
-
"div",
|
|
93
|
-
{
|
|
94
|
-
className: o(
|
|
95
|
-
"absolute inset-0 flex h-full w-full items-center justify-center",
|
|
96
|
-
"z-[-1]",
|
|
97
|
-
l
|
|
98
|
-
),
|
|
99
|
-
children: /* @__PURE__ */ x(
|
|
100
|
-
"svg",
|
|
101
|
-
{
|
|
102
|
-
className: "pointer-events-none absolute z-0 h-full w-full",
|
|
103
|
-
width: "100%",
|
|
104
|
-
height: "100%",
|
|
105
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
106
|
-
children: [
|
|
107
|
-
/* @__PURE__ */ a("defs", { children: /* @__PURE__ */ a(
|
|
108
|
-
"pattern",
|
|
109
|
-
{
|
|
110
|
-
id: u,
|
|
111
|
-
x: "0",
|
|
112
|
-
y: "0",
|
|
113
|
-
width: r.width,
|
|
114
|
-
height: r.height,
|
|
115
|
-
patternUnits: "userSpaceOnUse",
|
|
116
|
-
children: /* @__PURE__ */ a(
|
|
117
|
-
"circle",
|
|
118
|
-
{
|
|
119
|
-
cx: r.cx,
|
|
120
|
-
cy: r.cy,
|
|
121
|
-
r: r.r,
|
|
122
|
-
fill: i
|
|
123
|
-
}
|
|
124
|
-
)
|
|
125
|
-
}
|
|
126
|
-
) }),
|
|
127
|
-
/* @__PURE__ */ a("rect", { width: "100%", height: "100%", fill: `url(#${u})` })
|
|
128
|
-
]
|
|
129
|
-
}
|
|
130
|
-
)
|
|
131
|
-
}
|
|
132
|
-
);
|
|
133
|
-
},
|
|
134
|
-
// Custom comparison function for better memoization
|
|
135
|
-
(l, i) => l.className === i.className && l.dotColor === i.dotColor && l.dotSize === i.dotSize && l.spacing === i.spacing && l.isAnimated === i.isAnimated && l.speed === i.speed
|
|
136
|
-
);
|
|
137
|
-
M.displayName = "BackgroundDots";
|
|
138
|
-
export {
|
|
139
|
-
M as BackgroundDots
|
|
140
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import r from "react";
|
|
4
|
-
import { cn as o } from "@levo-so/react";
|
|
5
|
-
import { m as l } from "./index-DXb2tXBX.js";
|
|
6
|
-
const s = r.memo(
|
|
7
|
-
({
|
|
8
|
-
className: t,
|
|
9
|
-
fromColor: i = "#ff0000",
|
|
10
|
-
toColor: a = "#00ff00",
|
|
11
|
-
direction: n = "45deg"
|
|
12
|
-
}) => /* @__PURE__ */ e(
|
|
13
|
-
"div",
|
|
14
|
-
{
|
|
15
|
-
className: o(
|
|
16
|
-
"absolute inset-0 flex h-full w-full items-center justify-center",
|
|
17
|
-
"z-[-1]",
|
|
18
|
-
t
|
|
19
|
-
),
|
|
20
|
-
children: /* @__PURE__ */ e(
|
|
21
|
-
l.div,
|
|
22
|
-
{
|
|
23
|
-
className: "absolute inset-0 h-full w-full",
|
|
24
|
-
style: {
|
|
25
|
-
background: `linear-gradient(${n}, ${i}, ${a})`
|
|
26
|
-
},
|
|
27
|
-
initial: { opacity: 0.8 },
|
|
28
|
-
animate: { opacity: [0.8, 0.9, 0.8] },
|
|
29
|
-
transition: {
|
|
30
|
-
duration: 4,
|
|
31
|
-
repeat: 1 / 0,
|
|
32
|
-
ease: "easeInOut"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
)
|
|
36
|
-
}
|
|
37
|
-
)
|
|
38
|
-
);
|
|
39
|
-
s.displayName = "BackgroundGradient";
|
|
40
|
-
export {
|
|
41
|
-
s as BackgroundGradient
|
|
42
|
-
};
|
package/dist/Grid-DXjfqDT3.js
DELETED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as r, jsxs as v } from "react/jsx-runtime";
|
|
3
|
-
import a from "react";
|
|
4
|
-
import { cn as f } from "@levo-so/react";
|
|
5
|
-
import { m as n } from "./index-DXb2tXBX.js";
|
|
6
|
-
const x = a.memo(
|
|
7
|
-
({
|
|
8
|
-
className: t,
|
|
9
|
-
lineColor: e = "#333333",
|
|
10
|
-
lineWidth: i = 1,
|
|
11
|
-
spacing: l = 50,
|
|
12
|
-
// Interactive mode props
|
|
13
|
-
isInteractive: w = !1,
|
|
14
|
-
hoverColor: s = "#93c5fd",
|
|
15
|
-
rows: d = 150,
|
|
16
|
-
cols: c = 100
|
|
17
|
-
}) => {
|
|
18
|
-
const y = a.useMemo(() => new Array(d).fill(1), [d]), $ = a.useMemo(() => new Array(c).fill(1), [c]), o = a.useMemo(
|
|
19
|
-
() => ({
|
|
20
|
-
rowStyle: {
|
|
21
|
-
height: `${l}px`,
|
|
22
|
-
width: `${l * 2}px`,
|
|
23
|
-
borderLeft: `${i}px solid ${e}`
|
|
24
|
-
},
|
|
25
|
-
colStyle: {
|
|
26
|
-
height: `${l}px`,
|
|
27
|
-
width: `${l * 2}px`,
|
|
28
|
-
borderTop: `${i}px solid ${e}`,
|
|
29
|
-
borderRight: `${i}px solid ${e}`
|
|
30
|
-
},
|
|
31
|
-
iconStyle: {
|
|
32
|
-
top: `${-l / 3.8}px`,
|
|
33
|
-
left: `${-l / 2.4}px`,
|
|
34
|
-
color: e
|
|
35
|
-
}
|
|
36
|
-
}),
|
|
37
|
-
[l, i, e]
|
|
38
|
-
), h = a.useMemo(
|
|
39
|
-
() => ({
|
|
40
|
-
hover: {
|
|
41
|
-
backgroundColor: s,
|
|
42
|
-
transition: { duration: 0 }
|
|
43
|
-
},
|
|
44
|
-
animate: {
|
|
45
|
-
transition: { duration: 2 }
|
|
46
|
-
}
|
|
47
|
-
}),
|
|
48
|
-
[s]
|
|
49
|
-
);
|
|
50
|
-
return w ? /* @__PURE__ */ r(
|
|
51
|
-
"div",
|
|
52
|
-
{
|
|
53
|
-
className: f(
|
|
54
|
-
"absolute inset-0 flex h-full w-full items-center justify-center overflow-hidden",
|
|
55
|
-
"z-[-1]",
|
|
56
|
-
t
|
|
57
|
-
),
|
|
58
|
-
children: /* @__PURE__ */ r(
|
|
59
|
-
"div",
|
|
60
|
-
{
|
|
61
|
-
style: {
|
|
62
|
-
transform: "translate(-40%,-60%) skewX(-48deg) skewY(14deg) scale(0.675) rotate(0deg) translateZ(0)"
|
|
63
|
-
},
|
|
64
|
-
className: "absolute -top-1/4 left-1/4 z-0 flex h-full w-full -translate-x-1/2 -translate-y-1/2 p-4",
|
|
65
|
-
children: y.map((g, m) => /* @__PURE__ */ r(
|
|
66
|
-
n.div,
|
|
67
|
-
{
|
|
68
|
-
className: "relative",
|
|
69
|
-
style: o.rowStyle,
|
|
70
|
-
children: $.map((k, u) => /* @__PURE__ */ r(
|
|
71
|
-
n.div,
|
|
72
|
-
{
|
|
73
|
-
whileHover: h.hover,
|
|
74
|
-
animate: h.animate,
|
|
75
|
-
className: "relative",
|
|
76
|
-
style: o.colStyle,
|
|
77
|
-
children: u % 2 === 0 && m % 2 === 0 ? /* @__PURE__ */ r(
|
|
78
|
-
"svg",
|
|
79
|
-
{
|
|
80
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
81
|
-
fill: "none",
|
|
82
|
-
viewBox: "0 0 24 24",
|
|
83
|
-
strokeWidth: "1.5",
|
|
84
|
-
stroke: "currentColor",
|
|
85
|
-
className: "pointer-events-none absolute h-6 w-10 stroke-[1px]",
|
|
86
|
-
style: o.iconStyle,
|
|
87
|
-
children: /* @__PURE__ */ r(
|
|
88
|
-
"path",
|
|
89
|
-
{
|
|
90
|
-
strokeLinecap: "round",
|
|
91
|
-
strokeLinejoin: "round",
|
|
92
|
-
d: "M12 6v12m6-6H6"
|
|
93
|
-
}
|
|
94
|
-
)
|
|
95
|
-
}
|
|
96
|
-
) : null
|
|
97
|
-
},
|
|
98
|
-
`col-${u}`
|
|
99
|
-
))
|
|
100
|
-
},
|
|
101
|
-
`row-${m}`
|
|
102
|
-
))
|
|
103
|
-
}
|
|
104
|
-
)
|
|
105
|
-
}
|
|
106
|
-
) : /* @__PURE__ */ r(
|
|
107
|
-
"div",
|
|
108
|
-
{
|
|
109
|
-
className: f(
|
|
110
|
-
"absolute inset-0 flex h-full w-full items-center justify-center",
|
|
111
|
-
"z-[-1]",
|
|
112
|
-
t
|
|
113
|
-
),
|
|
114
|
-
children: /* @__PURE__ */ v(
|
|
115
|
-
"svg",
|
|
116
|
-
{
|
|
117
|
-
className: "pointer-events-none absolute z-0 h-full w-full",
|
|
118
|
-
width: "100%",
|
|
119
|
-
height: "100%",
|
|
120
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
121
|
-
children: [
|
|
122
|
-
/* @__PURE__ */ r("defs", { children: /* @__PURE__ */ r(
|
|
123
|
-
"pattern",
|
|
124
|
-
{
|
|
125
|
-
id: "grid-pattern",
|
|
126
|
-
x: "0",
|
|
127
|
-
y: "0",
|
|
128
|
-
width: l,
|
|
129
|
-
height: l,
|
|
130
|
-
patternUnits: "userSpaceOnUse",
|
|
131
|
-
children: /* @__PURE__ */ r(
|
|
132
|
-
n.path,
|
|
133
|
-
{
|
|
134
|
-
d: `M ${l} 0 L 0 0 0 ${l}`,
|
|
135
|
-
fill: "none",
|
|
136
|
-
stroke: e,
|
|
137
|
-
strokeWidth: i,
|
|
138
|
-
initial: { opacity: 0.2 },
|
|
139
|
-
animate: { opacity: [0.2, 0.5, 0.2] },
|
|
140
|
-
transition: {
|
|
141
|
-
duration: 3,
|
|
142
|
-
repeat: 1 / 0,
|
|
143
|
-
ease: "easeInOut"
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
)
|
|
147
|
-
}
|
|
148
|
-
) }),
|
|
149
|
-
/* @__PURE__ */ r("rect", { width: "100%", height: "100%", fill: "url(#grid-pattern)" })
|
|
150
|
-
]
|
|
151
|
-
}
|
|
152
|
-
)
|
|
153
|
-
}
|
|
154
|
-
);
|
|
155
|
-
},
|
|
156
|
-
// Custom comparison function for better memoization
|
|
157
|
-
(t, e) => t.className === e.className && t.lineColor === e.lineColor && t.lineWidth === e.lineWidth && t.spacing === e.spacing && t.isInteractive === e.isInteractive && t.hoverColor === e.hoverColor && t.rows === e.rows && t.cols === e.cols
|
|
158
|
-
);
|
|
159
|
-
x.displayName = "BackgroundGrid";
|
|
160
|
-
export {
|
|
161
|
-
x as BackgroundGrid
|
|
162
|
-
};
|