@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.
Files changed (67) hide show
  1. package/dist/{Beams-sX-ed8H5.js → Beams-B2rZmhLI.js} +40 -27
  2. package/dist/Dots-OyX1E9Ts.js +164 -0
  3. package/dist/Gradient-DOFsccBS.js +50 -0
  4. package/dist/Grid-DRZu52wi.js +191 -0
  5. package/dist/Waves-DzqlDCGx.js +183 -0
  6. package/dist/bridge/constants.d.ts +12 -0
  7. package/dist/bridge/index.d.ts +1 -0
  8. package/dist/bridge/utils.d.ts +1 -0
  9. package/dist/components/ActionWrapper.d.ts +1 -1
  10. package/dist/components/LoginForm/ErrorDisplay.d.ts +8 -0
  11. package/dist/components/LoginForm/GoogleOAuth.d.ts +10 -0
  12. package/dist/components/LoginForm/index.d.ts +7 -0
  13. package/dist/components/LoginModal/index.d.ts +7 -0
  14. package/dist/components/accessCard/EntryCard/index.d.ts +11 -0
  15. package/dist/components/accessCard/LoginCard/index.d.ts +7 -0
  16. package/dist/components/accessCard/MessageCard/index.d.ts +8 -0
  17. package/dist/components/accessCard/MessageFooter/index.d.ts +3 -0
  18. package/dist/components/accessCard/card/index.d.ts +10 -0
  19. package/dist/components/backgroundPresets/Gradient.d.ts +1 -1
  20. package/dist/components/backgroundPresets/presetSystem.d.ts +1 -1
  21. package/dist/components/shared/EmailInput/index.d.ts +10 -0
  22. package/dist/components/shared/OTPInput/index.d.ts +11 -0
  23. package/dist/components/ui/StatefulButton/index.d.ts +15 -0
  24. package/dist/contentEngine/themeUtils.d.ts +1 -1
  25. package/dist/context/ModalManager.d.ts +21 -0
  26. package/dist/core/AccessManager/index.d.ts +7 -0
  27. package/dist/elements/Container.d.ts +1 -0
  28. package/dist/elements/UserMenu.d.ts +8 -0
  29. package/dist/elements/accordion/index.d.ts +1 -1
  30. package/dist/elements/dialog/index.d.ts +16 -0
  31. package/dist/elements/index.d.ts +1 -0
  32. package/dist/elements/popover/index.d.ts +1 -1
  33. package/dist/hooks/useLogin.d.ts +29 -0
  34. package/dist/{index-DXb2tXBX.js → index-2NFcpkxw.js} +3545 -2706
  35. package/dist/index-BcbNOVub.js +30 -0
  36. package/dist/index-Ce2VNBY0.js +49 -0
  37. package/dist/index-QRx1kG5G.js +38 -0
  38. package/dist/index-RdFZytGV.js +54 -0
  39. package/dist/index-vDaUilga.js +23 -0
  40. package/dist/index.css +1 -1
  41. package/dist/index.js +82 -78
  42. package/dist/index2.css +1 -0
  43. package/dist/index3.css +1 -0
  44. package/dist/index4.css +1 -0
  45. package/dist/index5.css +1 -0
  46. package/dist/index6.css +1 -0
  47. package/dist/interfaces/block.d.ts +1 -1
  48. package/dist/interfaces/contentSchema.d.ts +11 -9
  49. package/dist/interfaces/levoBlock.d.ts +3 -2
  50. package/dist/interfaces/site.d.ts +6 -5
  51. package/dist/pixel/constants/borderRadius.d.ts +30 -0
  52. package/dist/pixel/constants/colorOptions.d.ts +30 -25
  53. package/dist/pixel/constants/fontSizeOptions.d.ts +5 -0
  54. package/dist/pixel/index.d.ts +1 -1
  55. package/dist/pixel/optionsMap.d.ts +5 -1
  56. package/dist/pixel/parserUtil.d.ts +15 -0
  57. package/dist/pixel/propertyMap.d.ts +1 -1
  58. package/dist/providers/AuthProvider.d.ts +8 -10
  59. package/dist/utils/index.d.ts +1 -1
  60. package/dist/utils/levoClient.d.ts +5 -0
  61. package/dist/utils/withBlockPropsUtils.d.ts +3 -2
  62. package/package.json +4 -4
  63. package/dist/Dots-CIprNvGi.js +0 -140
  64. package/dist/Gradient-DIn_uQLE.js +0 -42
  65. package/dist/Grid-DXjfqDT3.js +0 -162
  66. package/dist/Waves-CCDZf3yc.js +0 -127
  67. package/dist/utils/blocksLevoClient.d.ts +0 -5
@@ -1,16 +1,15 @@
1
1
  "use client";
2
- import { jsx as C, jsxs as e } from "react/jsx-runtime";
3
- import i from "react";
4
- import { cn as f } from "@levo-so/react";
5
- import { m as c } from "./index-DXb2tXBX.js";
6
- const h = i.memo(
2
+ import { jsx as C, jsxs as a } from "react/jsx-runtime";
3
+ import r from "react";
4
+ import { m as c } from "./index-2NFcpkxw.js";
5
+ const h = r.memo(
7
6
  ({
8
- className: a,
7
+ className: o,
9
8
  primaryColor: t = "#00ff00",
10
9
  secondaryColor: n = "#ff0000",
11
10
  lineColor: l = "#121212"
12
11
  }) => {
13
- const o = i.useMemo(
12
+ const e = r.useMemo(
14
13
  () => [
15
14
  "M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875",
16
15
  "M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867",
@@ -64,26 +63,40 @@ const h = i.memo(
64
63
  "M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483"
65
64
  ],
66
65
  []
67
- ), s = i.useMemo(
68
- () => o.map((r, M) => ({
66
+ ), s = r.useMemo(
67
+ () => e.map((i, M) => ({
69
68
  duration: Math.random() * 10 + 10,
70
69
  delay: Math.random() * 10,
71
70
  endY: `${93 + Math.random() * 8}%`
72
71
  })),
73
- [o]
72
+ [e]
74
73
  );
75
74
  return /* @__PURE__ */ C(
76
75
  "div",
77
76
  {
78
- className: f(
79
- "absolute inset-0 flex h-full w-full items-center justify-center [mask-repeat:no-repeat] [mask-size:40px]",
80
- "z-[-1]",
81
- a
82
- ),
83
- children: /* @__PURE__ */ e(
77
+ className: o,
78
+ style: {
79
+ position: "absolute",
80
+ inset: 0,
81
+ display: "flex",
82
+ height: "100%",
83
+ width: "100%",
84
+ alignItems: "center",
85
+ justifyContent: "center",
86
+ maskRepeat: "no-repeat",
87
+ maskSize: "40px",
88
+ zIndex: -1
89
+ },
90
+ children: /* @__PURE__ */ a(
84
91
  "svg",
85
92
  {
86
- className: "pointer-events-none absolute z-0 h-full w-full",
93
+ style: {
94
+ pointerEvents: "none",
95
+ position: "absolute",
96
+ zIndex: 0,
97
+ height: "100%",
98
+ width: "100%"
99
+ },
87
100
  width: "100%",
88
101
  height: "100%",
89
102
  viewBox: "0 0 696 316",
@@ -99,20 +112,20 @@ const h = i.memo(
99
112
  strokeWidth: "0.5"
100
113
  }
101
114
  ),
102
- o.map((r, M) => /* @__PURE__ */ C(
115
+ e.map((i, M) => /* @__PURE__ */ C(
103
116
  c.path,
104
117
  {
105
- d: r,
118
+ d: i,
106
119
  stroke: `url(#linearGradient-${M})`,
107
120
  strokeOpacity: "0.4",
108
121
  strokeWidth: "0.5"
109
122
  },
110
123
  "path-" + M
111
124
  )),
112
- /* @__PURE__ */ e("defs", { children: [
113
- o.map((r, M) => {
114
- var p, d, m;
115
- return /* @__PURE__ */ e(
125
+ /* @__PURE__ */ a("defs", { children: [
126
+ e.map((i, M) => {
127
+ var d, p, m;
128
+ return /* @__PURE__ */ a(
116
129
  c.linearGradient,
117
130
  {
118
131
  id: `linearGradient-${M}`,
@@ -126,10 +139,10 @@ const h = i.memo(
126
139
  x1: ["0%", "100%"],
127
140
  x2: ["0%", "95%"],
128
141
  y1: ["0%", "100%"],
129
- y2: ["0%", ((p = s[M]) == null ? void 0 : p.endY) || "100%"]
142
+ y2: ["0%", ((d = s[M]) == null ? void 0 : d.endY) || "100%"]
130
143
  },
131
144
  transition: {
132
- duration: ((d = s[M]) == null ? void 0 : d.duration) || 15,
145
+ duration: ((p = s[M]) == null ? void 0 : p.duration) || 15,
133
146
  ease: "easeInOut",
134
147
  repeat: 1 / 0,
135
148
  delay: ((m = s[M]) == null ? void 0 : m.delay) || 0
@@ -151,7 +164,7 @@ const h = i.memo(
151
164
  `gradient-${M}`
152
165
  );
153
166
  }),
154
- /* @__PURE__ */ e(
167
+ /* @__PURE__ */ a(
155
168
  "radialGradient",
156
169
  {
157
170
  id: "paint0_radial_242_278",
@@ -175,7 +188,7 @@ const h = i.memo(
175
188
  );
176
189
  },
177
190
  // Custom comparison function for better memoization
178
- (a, t) => a.className === t.className && a.primaryColor === t.primaryColor && a.secondaryColor === t.secondaryColor && a.lineColor === t.lineColor
191
+ (o, t) => o.className === t.className && o.primaryColor === t.primaryColor && o.secondaryColor === t.secondaryColor && o.lineColor === t.lineColor
179
192
  );
180
193
  h.displayName = "BackgroundBeams";
181
194
  export {
@@ -0,0 +1,164 @@
1
+ "use client";
2
+ import { jsx as l, jsxs as w } from "react/jsx-runtime";
3
+ import h from "react";
4
+ import { m as x } from "./index-2NFcpkxw.js";
5
+ const g = h.memo(
6
+ ({
7
+ className: i,
8
+ dotColor: n = "#00ff00",
9
+ dotSize: o = 2,
10
+ spacing: e = 30,
11
+ isAnimated: d = !1,
12
+ speed: m = 1
13
+ }) => {
14
+ const a = h.useMemo(
15
+ () => ({
16
+ cx: e / 2,
17
+ cy: e / 2,
18
+ r: o,
19
+ width: e,
20
+ height: e
21
+ }),
22
+ [e, o]
23
+ ), c = h.useMemo(
24
+ () => `dots-pattern-${Math.random().toString(36).substring(2, 11)}`,
25
+ []
26
+ ), u = h.useMemo(() => {
27
+ if (!d) return [];
28
+ const t = [], y = Math.ceil(100 / (e / 10)), f = Math.ceil(100 / (e / 10));
29
+ for (let s = 0; s < y; s++)
30
+ for (let r = 0; r < f; r++)
31
+ t.push({
32
+ id: `${s}-${r}`,
33
+ x: r * e / 10 + Math.random() * 5,
34
+ y: s * e / 10 + Math.random() * 5,
35
+ delay: Math.random() * 3,
36
+ amplitude: 2 + Math.random() * 3
37
+ });
38
+ return t;
39
+ }, [d, e]);
40
+ return d ? /* @__PURE__ */ l(
41
+ "div",
42
+ {
43
+ className: i,
44
+ style: {
45
+ position: "absolute",
46
+ inset: 0,
47
+ display: "flex",
48
+ height: "100%",
49
+ width: "100%",
50
+ alignItems: "center",
51
+ justifyContent: "center",
52
+ overflow: "hidden",
53
+ zIndex: -1
54
+ },
55
+ children: /* @__PURE__ */ l(
56
+ "svg",
57
+ {
58
+ style: {
59
+ pointerEvents: "none",
60
+ position: "absolute",
61
+ zIndex: 0,
62
+ height: "100%",
63
+ width: "100%"
64
+ },
65
+ width: "100%",
66
+ height: "100%",
67
+ xmlns: "http://www.w3.org/2000/svg",
68
+ children: u.map((t) => /* @__PURE__ */ l(
69
+ x.circle,
70
+ {
71
+ cx: `${t.x}%`,
72
+ cy: `${t.y}%`,
73
+ r: o,
74
+ fill: n,
75
+ initial: { opacity: 0.3 },
76
+ animate: {
77
+ opacity: [0.3, 0.8, 0.3],
78
+ cx: [
79
+ `${t.x}%`,
80
+ `${t.x + t.amplitude}%`,
81
+ `${t.x - t.amplitude}%`,
82
+ `${t.x}%`
83
+ ],
84
+ cy: [
85
+ `${t.y}%`,
86
+ `${t.y - t.amplitude}%`,
87
+ `${t.y + t.amplitude}%`,
88
+ `${t.y}%`
89
+ ]
90
+ },
91
+ transition: {
92
+ duration: 8 / m,
93
+ repeat: 1 / 0,
94
+ ease: "easeInOut",
95
+ delay: t.delay
96
+ }
97
+ },
98
+ t.id
99
+ ))
100
+ }
101
+ )
102
+ }
103
+ ) : /* @__PURE__ */ l(
104
+ "div",
105
+ {
106
+ className: i,
107
+ style: {
108
+ position: "absolute",
109
+ inset: 0,
110
+ display: "flex",
111
+ height: "100%",
112
+ width: "100%",
113
+ alignItems: "center",
114
+ justifyContent: "center",
115
+ zIndex: -1
116
+ },
117
+ children: /* @__PURE__ */ w(
118
+ "svg",
119
+ {
120
+ style: {
121
+ pointerEvents: "none",
122
+ position: "absolute",
123
+ zIndex: 0,
124
+ height: "100%",
125
+ width: "100%"
126
+ },
127
+ width: "100%",
128
+ height: "100%",
129
+ xmlns: "http://www.w3.org/2000/svg",
130
+ children: [
131
+ /* @__PURE__ */ l("defs", { children: /* @__PURE__ */ l(
132
+ "pattern",
133
+ {
134
+ id: c,
135
+ x: "0",
136
+ y: "0",
137
+ width: a.width,
138
+ height: a.height,
139
+ patternUnits: "userSpaceOnUse",
140
+ children: /* @__PURE__ */ l(
141
+ "circle",
142
+ {
143
+ cx: a.cx,
144
+ cy: a.cy,
145
+ r: a.r,
146
+ fill: n
147
+ }
148
+ )
149
+ }
150
+ ) }),
151
+ /* @__PURE__ */ l("rect", { width: "100%", height: "100%", fill: `url(#${c})` })
152
+ ]
153
+ }
154
+ )
155
+ }
156
+ );
157
+ },
158
+ // Custom comparison function for better memoization
159
+ (i, n) => i.className === n.className && i.dotColor === n.dotColor && i.dotSize === n.dotSize && i.spacing === n.spacing && i.isAnimated === n.isAnimated && i.speed === n.speed
160
+ );
161
+ g.displayName = "BackgroundDots";
162
+ export {
163
+ g as BackgroundDots
164
+ };
@@ -0,0 +1,50 @@
1
+ "use client";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import o from "react";
4
+ import { m as r } from "./index-2NFcpkxw.js";
5
+ const s = o.memo(
6
+ ({
7
+ className: e,
8
+ fromColor: i = "#ff0000",
9
+ toColor: n = "#00ff00",
10
+ direction: a = "45deg"
11
+ }) => /* @__PURE__ */ t(
12
+ "div",
13
+ {
14
+ className: e,
15
+ style: {
16
+ position: "absolute",
17
+ inset: 0,
18
+ display: "flex",
19
+ height: "100%",
20
+ width: "100%",
21
+ alignItems: "center",
22
+ justifyContent: "center",
23
+ zIndex: -1
24
+ },
25
+ children: /* @__PURE__ */ t(
26
+ r.div,
27
+ {
28
+ style: {
29
+ position: "absolute",
30
+ inset: 0,
31
+ height: "100%",
32
+ width: "100%",
33
+ background: `linear-gradient(${a}, ${i}, ${n})`
34
+ },
35
+ initial: { opacity: 0.8 },
36
+ animate: { opacity: [0.8, 0.9, 0.8] },
37
+ transition: {
38
+ duration: 4,
39
+ repeat: 1 / 0,
40
+ ease: "easeInOut"
41
+ }
42
+ }
43
+ )
44
+ }
45
+ )
46
+ );
47
+ s.displayName = "BackgroundGradient";
48
+ export {
49
+ s as BackgroundGradient
50
+ };
@@ -0,0 +1,191 @@
1
+ "use client";
2
+ import { jsx as o, jsxs as g } from "react/jsx-runtime";
3
+ import r from "react";
4
+ import { m as d } from "./index-2NFcpkxw.js";
5
+ const p = r.memo(
6
+ ({
7
+ className: e,
8
+ lineColor: t = "#333333",
9
+ lineWidth: n = 1,
10
+ spacing: i = 50,
11
+ // Interactive mode props
12
+ isInteractive: u = !1,
13
+ hoverColor: s = "#93c5fd",
14
+ rows: a = 150,
15
+ cols: h = 100
16
+ }) => {
17
+ const y = r.useMemo(() => new Array(a).fill(1), [a]), f = r.useMemo(() => new Array(h).fill(1), [h]), l = r.useMemo(
18
+ () => ({
19
+ rowStyle: {
20
+ height: `${i}px`,
21
+ width: `${i * 2}px`,
22
+ borderLeft: `${n}px solid ${t}`
23
+ },
24
+ colStyle: {
25
+ height: `${i}px`,
26
+ width: `${i * 2}px`,
27
+ borderTop: `${n}px solid ${t}`,
28
+ borderRight: `${n}px solid ${t}`
29
+ },
30
+ iconStyle: {
31
+ top: `${-i / 3.8}px`,
32
+ left: `${-i / 2.4}px`,
33
+ color: t
34
+ }
35
+ }),
36
+ [i, n, t]
37
+ ), c = r.useMemo(
38
+ () => ({
39
+ hover: {
40
+ backgroundColor: s,
41
+ transition: { duration: 0 }
42
+ },
43
+ animate: {
44
+ transition: { duration: 2 }
45
+ }
46
+ }),
47
+ [s]
48
+ );
49
+ return u ? /* @__PURE__ */ o(
50
+ "div",
51
+ {
52
+ className: e,
53
+ style: {
54
+ position: "absolute",
55
+ inset: 0,
56
+ display: "flex",
57
+ height: "100%",
58
+ width: "100%",
59
+ alignItems: "center",
60
+ justifyContent: "center",
61
+ overflow: "hidden",
62
+ zIndex: -1
63
+ },
64
+ children: /* @__PURE__ */ o(
65
+ "div",
66
+ {
67
+ style: {
68
+ transform: "translate(-40%,-60%) skewX(-48deg) skewY(14deg) scale(0.675) rotate(0deg) translateZ(0)",
69
+ position: "absolute",
70
+ top: "-25%",
71
+ left: "25%",
72
+ zIndex: 0,
73
+ display: "flex",
74
+ height: "100%",
75
+ width: "100%",
76
+ padding: "1rem"
77
+ },
78
+ children: y.map((x, m) => /* @__PURE__ */ o(
79
+ d.div,
80
+ {
81
+ style: { ...l.rowStyle, position: "relative" },
82
+ children: f.map(($, w) => /* @__PURE__ */ o(
83
+ d.div,
84
+ {
85
+ whileHover: c.hover,
86
+ animate: c.animate,
87
+ style: { ...l.colStyle, position: "relative" },
88
+ children: w % 2 === 0 && m % 2 === 0 ? /* @__PURE__ */ o(
89
+ "svg",
90
+ {
91
+ xmlns: "http://www.w3.org/2000/svg",
92
+ fill: "none",
93
+ viewBox: "0 0 24 24",
94
+ strokeWidth: "1.5",
95
+ stroke: "currentColor",
96
+ style: {
97
+ ...l.iconStyle,
98
+ pointerEvents: "none",
99
+ position: "absolute",
100
+ height: "1.5rem",
101
+ width: "2.5rem",
102
+ strokeWidth: "1px"
103
+ },
104
+ children: /* @__PURE__ */ o(
105
+ "path",
106
+ {
107
+ strokeLinecap: "round",
108
+ strokeLinejoin: "round",
109
+ d: "M12 6v12m6-6H6"
110
+ }
111
+ )
112
+ }
113
+ ) : null
114
+ },
115
+ `col-${w}`
116
+ ))
117
+ },
118
+ `row-${m}`
119
+ ))
120
+ }
121
+ )
122
+ }
123
+ ) : /* @__PURE__ */ o(
124
+ "div",
125
+ {
126
+ className: e,
127
+ style: {
128
+ position: "absolute",
129
+ inset: 0,
130
+ display: "flex",
131
+ height: "100%",
132
+ width: "100%",
133
+ alignItems: "center",
134
+ justifyContent: "center",
135
+ zIndex: -1
136
+ },
137
+ children: /* @__PURE__ */ g(
138
+ "svg",
139
+ {
140
+ style: {
141
+ pointerEvents: "none",
142
+ position: "absolute",
143
+ zIndex: 0,
144
+ height: "100%",
145
+ width: "100%"
146
+ },
147
+ width: "100%",
148
+ height: "100%",
149
+ xmlns: "http://www.w3.org/2000/svg",
150
+ children: [
151
+ /* @__PURE__ */ o("defs", { children: /* @__PURE__ */ o(
152
+ "pattern",
153
+ {
154
+ id: "grid-pattern",
155
+ x: "0",
156
+ y: "0",
157
+ width: i,
158
+ height: i,
159
+ patternUnits: "userSpaceOnUse",
160
+ children: /* @__PURE__ */ o(
161
+ d.path,
162
+ {
163
+ d: `M ${i} 0 L 0 0 0 ${i}`,
164
+ fill: "none",
165
+ stroke: t,
166
+ strokeWidth: n,
167
+ initial: { opacity: 0.2 },
168
+ animate: { opacity: [0.2, 0.5, 0.2] },
169
+ transition: {
170
+ duration: 3,
171
+ repeat: 1 / 0,
172
+ ease: "easeInOut"
173
+ }
174
+ }
175
+ )
176
+ }
177
+ ) }),
178
+ /* @__PURE__ */ o("rect", { width: "100%", height: "100%", fill: "url(#grid-pattern)" })
179
+ ]
180
+ }
181
+ )
182
+ }
183
+ );
184
+ },
185
+ // Custom comparison function for better memoization
186
+ (e, t) => e.className === t.className && e.lineColor === t.lineColor && e.lineWidth === t.lineWidth && e.spacing === t.spacing && e.isInteractive === t.isInteractive && e.hoverColor === t.hoverColor && e.rows === t.rows && e.cols === t.cols
187
+ );
188
+ p.displayName = "BackgroundGrid";
189
+ export {
190
+ p as BackgroundGrid
191
+ };