@levo-so/studio 0.1.59 → 0.1.61
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-0Cg_3upg.js → Beams-sKsW_tr4.js} +46 -55
- package/dist/{Dots-turX9wMO.js → Dots-BEIutbKS.js} +44 -40
- package/dist/{Gradient-Be4Kqh_1.js → Gradient-DAR7R3Mz.js} +2 -2
- package/dist/Grid-BuKIXWMJ.js +174 -0
- package/dist/MessageCard-C8v6oHmf.js +45 -0
- package/dist/{Waves-DL4kuojY.js → Waves-C8qlIS1W.js} +29 -80
- package/dist/bridge/Highlighter.d.ts +3 -5
- package/dist/bridge/StudioBlockPreview.d.ts +1 -0
- package/dist/bridge/StudioPagePreview.d.ts +2 -2
- package/dist/bridge/StudioPreview.d.ts +1 -1
- package/dist/bridge/constants.d.ts +2 -0
- package/dist/bridge/hooks/useElementTracker.d.ts +9 -0
- package/dist/bridge/index.d.ts +3 -3
- package/dist/bridge/utils.d.ts +1 -4
- package/dist/components/AnimatedBlock.d.ts +50 -0
- package/dist/components/backgroundPresets/exports.d.ts +1 -1
- package/dist/components/backgroundPresets/presetSystem.d.ts +2 -2
- package/dist/components/bookingCard/BookingCard.d.ts +65 -0
- package/dist/components/bookingCard/index.d.ts +2 -0
- package/dist/components/bookingModal/BookingConfirmation.d.ts +48 -0
- package/dist/components/bookingModal/BookingModal.d.ts +19 -0
- package/dist/components/bookingModal/BookingSummary.d.ts +34 -0
- package/dist/components/bookingModal/index.d.ts +4 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/integrationFilters/FieldRenderer.d.ts +3 -0
- package/dist/components/integrationFilters/IntegrationFilters.d.ts +1 -1
- package/dist/components/integrationFilters/fields/DropdownField.d.ts +1 -1
- package/dist/components/integrationFilters/fields/TextField.d.ts +1 -1
- package/dist/components/registerModal/AttendeeForm.d.ts +27 -0
- package/dist/components/registerModal/CouponView.d.ts +14 -0
- package/dist/components/registerModal/RegisterModal.d.ts +2 -1
- package/dist/components/registerModal/TicketSelectionStep.d.ts +15 -0
- package/dist/components/registerModal/utils.d.ts +85 -1
- package/dist/components/stripePaymentModal/StripePaymentModal.d.ts +22 -0
- package/dist/components/stripePaymentModal/index.d.ts +3 -0
- package/dist/components/ui/Calendar.d.ts +1 -1
- package/dist/components/ui/base/avatar.d.ts +13 -0
- package/dist/components/ui/base/index.d.ts +3 -0
- package/dist/components/ui/base/input.d.ts +1 -1
- package/dist/components/ui/base/skeleton.d.ts +3 -0
- package/dist/components/ui/base/textarea.d.ts +4 -0
- package/dist/components/ui/base/tooltip.d.ts +17 -0
- package/dist/components/ui/form/FormTextarea.d.ts +15 -0
- package/dist/components/ui/index.d.ts +3 -0
- package/dist/components/withBlockProps.d.ts +6 -14
- package/dist/constants/animation.d.ts +10 -0
- package/dist/contentEngine/content.d.ts +8 -3
- package/dist/contentEngine/index.d.ts +3 -3
- package/dist/contentEngine/sourceFetcher.d.ts +1 -1
- package/dist/contentEngine/themeUtils.d.ts +13 -0
- package/dist/contentEngine/types.d.ts +1 -0
- package/dist/contentEngine/useContextEngine.d.ts +11 -0
- package/dist/context/ForumContext.d.ts +48 -0
- package/dist/core/AccessManager/index.d.ts +1 -1
- package/dist/core/LevoBlock.d.ts +3 -2
- package/dist/core/LevoPage.d.ts +2 -2
- package/dist/core/index.d.ts +1 -1
- package/dist/elements/AlertDialog/index.d.ts +23 -0
- package/dist/elements/Carousel.d.ts +10 -2
- package/dist/elements/Tabs.d.ts +1 -1
- package/dist/elements/UserMenu.d.ts +1 -1
- package/dist/elements/accordion/index.d.ts +1 -1
- package/dist/elements/dialog/index.d.ts +1 -1
- package/dist/elements/forum/ForumPost.d.ts +18 -0
- package/dist/elements/forum/ForumPostContentRenderer.d.ts +8 -0
- package/dist/elements/forum/SearchInput.d.ts +5 -0
- package/dist/elements/forum/categoryFilter/CategoryFilter.d.ts +16 -0
- package/dist/elements/forum/categoryFilter/index.d.ts +2 -0
- package/dist/elements/forum/comments/Comment.d.ts +14 -0
- package/dist/elements/forum/comments/Comments.d.ts +9 -0
- package/dist/elements/forum/comments/ReplyBox.d.ts +11 -0
- package/dist/elements/forum/comments/commentUtility.d.ts +25 -0
- package/dist/elements/forum/comments/index.d.ts +2 -0
- package/dist/elements/forum/createForumPost/CreateForumPost.d.ts +9 -0
- package/dist/elements/forum/createForumPost/CreateForumPostModal.d.ts +87 -0
- package/dist/elements/forum/createForumPost/index.d.ts +2 -0
- package/dist/elements/forum/index.d.ts +8 -0
- package/dist/elements/forum/restrictionOverlays/CommentsRestrictionOverlay.d.ts +16 -0
- package/dist/elements/forum/restrictionOverlays/JoinRequestForm.d.ts +14 -0
- package/dist/elements/forum/restrictionOverlays/PendingRequestState.d.ts +11 -0
- package/dist/elements/forum/restrictionOverlays/PostsRestrictionOverlay.d.ts +16 -0
- package/dist/elements/forum/restrictionOverlays/index.d.ts +5 -0
- package/dist/elements/forum/utility/Video.d.ts +16 -0
- package/dist/elements/forum/utility/index.d.ts +49 -0
- package/dist/elements/index.d.ts +10 -9
- package/dist/elements-BxhlsyhI.js +9 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/useLogin.d.ts +1 -1
- package/dist/hooks/useStripePayment.d.ts +49 -0
- package/dist/index-BJrh8CwF.js +16197 -0
- package/dist/{index-BdswdesP.js → index-BYXw6aHi.js} +3 -4
- package/dist/index-CV5mr-8e.js +365 -0
- package/dist/index-CXtfbmpx.js +23 -0
- package/dist/index-CgUU2EbC.js +765 -0
- package/dist/index-DsAqikcl.js +29 -0
- package/dist/index-DxsNKR4p.js +56 -0
- package/dist/{index-DHHPZcEh.js → index-IcG2wuuE.js} +1 -8
- package/dist/index.d.ts +16 -13
- package/dist/index.js +159 -107
- package/dist/interfaces/block.d.ts +2 -2
- package/dist/interfaces/levoBlock.d.ts +64 -10
- package/dist/interfaces/site.d.ts +1 -193
- package/dist/interfaces/sites.d.ts +201 -3
- package/dist/interfaces/theme.d.ts +2 -0
- package/dist/pixel/parserUtil.d.ts +1 -0
- package/dist/providers/AuthProvider.d.ts +1 -0
- package/dist/providers/BlockContext.d.ts +2 -1
- package/dist/providers/LazyMotionProvider.d.ts +15 -0
- package/dist/providers/index.d.ts +1 -0
- package/dist/studio.css +1 -1
- package/dist/utils/colorUtils.d.ts +7 -0
- package/dist/utils/getKeysWithValue.d.ts +1 -1
- package/dist/utils/string.d.ts +7 -0
- package/dist/utils/withBlockPropsUtils.d.ts +6 -55
- package/package.json +13 -16
- package/dist/Grid-B0vqOT42.js +0 -184
- package/dist/MessageCard-CCngWCHS.js +0 -53
- package/dist/components/withBlockProps copy.d.ts +0 -61
- package/dist/index-CPJI9a7D.js +0 -13503
- package/dist/index-CmNhuPZp.js +0 -34
- package/dist/index-kVKDoWCh.js +0 -57
|
@@ -1,27 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { MotionProps } from 'motion/react';
|
|
3
|
-
import { IFieldConfig, AnimationConfig } from '../interfaces';
|
|
4
|
-
type MutableDeep<T> = T extends object ? {
|
|
5
|
-
-readonly [K in keyof T]: MutableDeep<T[K]>;
|
|
6
|
-
} : T;
|
|
7
|
-
/**
|
|
8
|
-
* Animation props interface for components using Framer Motion types
|
|
9
|
-
* This is the processed version of AnimationConfig used by components
|
|
10
|
-
*/
|
|
11
|
-
export interface AnimationProps {
|
|
12
|
-
initial?: MutableDeep<MotionProps["initial"]>;
|
|
13
|
-
animate?: MutableDeep<MotionProps["animate"]>;
|
|
14
|
-
whileHover?: MutableDeep<MotionProps["whileHover"]>;
|
|
15
|
-
exit?: MutableDeep<MotionProps["exit"]>;
|
|
16
|
-
}
|
|
1
|
+
import { IFieldConfig } from '../interfaces';
|
|
17
2
|
/**
|
|
18
3
|
* Extended props interface for useCommonProps return type
|
|
19
4
|
*/
|
|
20
|
-
export type ExtendedProps<P extends Record<string,
|
|
5
|
+
export type ExtendedProps<P extends Record<string, unknown>> = P & {
|
|
21
6
|
elementKey: string;
|
|
22
|
-
config:
|
|
23
|
-
styles:
|
|
24
|
-
content:
|
|
7
|
+
config: unknown;
|
|
8
|
+
styles: unknown;
|
|
9
|
+
content: unknown;
|
|
25
10
|
generatedClassName: string;
|
|
26
11
|
};
|
|
27
12
|
/**
|
|
@@ -56,29 +41,6 @@ export declare const isConfigWithVariants: (val: unknown) => val is {
|
|
|
56
41
|
* Replaces dots with dashes and removes invalid characters
|
|
57
42
|
*/
|
|
58
43
|
export declare const sanitizeElementKey: (elementKey: string) => string;
|
|
59
|
-
/**
|
|
60
|
-
* Hook to create a stable animation configuration that only updates when the config actually changes
|
|
61
|
-
* Uses deep equality comparison to prevent animation re-triggers when object references change
|
|
62
|
-
*
|
|
63
|
-
* @param animationConfig - The current animation configuration from field config
|
|
64
|
-
* @returns Stable animation configuration object
|
|
65
|
-
*/
|
|
66
|
-
export declare const useStableAnimationConfig: (animationConfig: AnimationConfig | null | undefined) => AnimationConfig | null;
|
|
67
|
-
/**
|
|
68
|
-
* Generates standardized animation props for Framer Motion components
|
|
69
|
-
*
|
|
70
|
-
* @param animationConfig - The animation configuration object
|
|
71
|
-
* @returns Object containing initial, animate, whileHover, and exit props
|
|
72
|
-
*/
|
|
73
|
-
export declare const generateAnimationProps: (animationConfig: AnimationConfig | null | undefined) => AnimationProps;
|
|
74
|
-
/**
|
|
75
|
-
* Determines the animate value based on visibility state
|
|
76
|
-
*
|
|
77
|
-
* @param isInView - Whether the element is in view
|
|
78
|
-
* @param animationProps - The animation props object
|
|
79
|
-
* @returns The appropriate animate value
|
|
80
|
-
*/
|
|
81
|
-
export declare const getAnimateValue: (isInView: boolean, animationProps: AnimationProps) => MutableDeep<MotionProps["animate"]> | undefined;
|
|
82
44
|
/**
|
|
83
45
|
* Generates variant CSS classes from selected variants configuration
|
|
84
46
|
*
|
|
@@ -106,16 +68,6 @@ export declare const generateElementClassName: (elementKey: string, blockId: str
|
|
|
106
68
|
* @returns Memoized CSS class name string
|
|
107
69
|
*/
|
|
108
70
|
export declare const useGeneratedClassName: (elementKey: string, blockId: string, configValue: IFieldConfig | undefined) => string;
|
|
109
|
-
/**
|
|
110
|
-
* Hook to create a memoized Motion component
|
|
111
|
-
* Only creates Motion component when animation config exists
|
|
112
|
-
* Recreates when animation config changes to enable animation previews
|
|
113
|
-
*
|
|
114
|
-
* @param WrappedComponent - The component to wrap with motion
|
|
115
|
-
* @param animationConfig - The animation configuration
|
|
116
|
-
* @returns Memoized Motion component or null if no animation
|
|
117
|
-
*/
|
|
118
|
-
export declare const useMotionComponent: <P extends Record<string, any>>(WrappedComponent: ComponentType<P>, animationConfig: AnimationConfig | null | undefined) => ComponentType<any> | null;
|
|
119
71
|
/**
|
|
120
72
|
* Hook to create memoized common props for components
|
|
121
73
|
* Excludes frequently changing props that don't affect animation
|
|
@@ -128,6 +80,5 @@ export declare const useMotionComponent: <P extends Record<string, any>>(Wrapped
|
|
|
128
80
|
* @param generatedClassName - The generated CSS class name
|
|
129
81
|
* @returns Memoized common props object
|
|
130
82
|
*/
|
|
131
|
-
export declare const useCommonProps: <P extends Record<string,
|
|
132
|
-
export {};
|
|
83
|
+
export declare const useCommonProps: <P extends Record<string, unknown>>(props: P, elementKey: string, configValue: unknown, stylesValue: unknown, contentValue: unknown, generatedClassName: string) => ExtendedProps<P>;
|
|
133
84
|
//# sourceMappingURL=withBlockPropsUtils.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@levo-so/studio",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.61",
|
|
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",
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
"scripts": {
|
|
17
17
|
"clean": "rimraf dist node_modules .turbo",
|
|
18
18
|
"check-types": "tsc --noEmit",
|
|
19
|
-
"lint": "eslint",
|
|
20
19
|
"build": "vite build",
|
|
21
20
|
"dev": "vite build --watch"
|
|
22
21
|
},
|
|
@@ -29,7 +28,6 @@
|
|
|
29
28
|
},
|
|
30
29
|
"dependencies": {
|
|
31
30
|
"@emotion/is-prop-valid": "1.3.1",
|
|
32
|
-
"@theinternetfolks/mate": "1.0.4",
|
|
33
31
|
"class-variance-authority": "0.7.0",
|
|
34
32
|
"culori": "4.0.1",
|
|
35
33
|
"dayjs": "1.11.13",
|
|
@@ -42,40 +40,39 @@
|
|
|
42
40
|
"formik": "2.4.6",
|
|
43
41
|
"html-react-parser": "5.2.6",
|
|
44
42
|
"isomorphic-dompurify": "2.14.0",
|
|
45
|
-
"libphonenumber-js": "1.12.
|
|
43
|
+
"libphonenumber-js": "1.12.31",
|
|
46
44
|
"lucide-react": "0.424.0",
|
|
47
45
|
"motion": "12.23.12",
|
|
48
46
|
"radix-ui": "1.4.3",
|
|
49
47
|
"react-day-picker": "9.11.1",
|
|
50
48
|
"react-icons": "5.2.1",
|
|
51
49
|
"react-international-phone": "4.6.0",
|
|
50
|
+
"react-otp-input": "3.1.1",
|
|
52
51
|
"react-razorpay": "3.0.1",
|
|
52
|
+
"@stripe/stripe-js": "^5.5.0",
|
|
53
|
+
"@stripe/react-stripe-js": "^3.1.1",
|
|
53
54
|
"react-select": "5.10.1",
|
|
54
55
|
"use-debounce": "10.0.2",
|
|
55
56
|
"yup": "1.7.1"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|
|
58
|
-
"@levo/eslint-config": "workspace:*",
|
|
59
59
|
"@levo/ts-config": "workspace:*",
|
|
60
60
|
"@levo/tw-config": "workspace:*",
|
|
61
61
|
"@types/culori": "4.0.0",
|
|
62
|
-
"@types/node": "
|
|
63
|
-
"@types/react": "19.
|
|
64
|
-
"@types/react-dom": "19.
|
|
65
|
-
"@vitejs/plugin-react": "
|
|
62
|
+
"@types/node": "24.10.1",
|
|
63
|
+
"@types/react": "19.2.5",
|
|
64
|
+
"@types/react-dom": "19.2.3",
|
|
65
|
+
"@vitejs/plugin-react": "5.1.1",
|
|
66
66
|
"rollup-preserve-directives": "1.1.1",
|
|
67
|
-
"typescript": "5.
|
|
68
|
-
"vite": "
|
|
67
|
+
"typescript": "5.9.3",
|
|
68
|
+
"vite": "7.2.4",
|
|
69
69
|
"vite-plugin-dts": "4.1.0"
|
|
70
70
|
},
|
|
71
71
|
"main": "./dist/index.js",
|
|
72
72
|
"module": "./dist/index.js",
|
|
73
73
|
"types": "./dist/index.d.ts",
|
|
74
74
|
"exports": {
|
|
75
|
-
".":
|
|
76
|
-
|
|
77
|
-
"default": "./dist/index.js"
|
|
78
|
-
},
|
|
79
|
-
"./setup.css": "./dist/studio.css"
|
|
75
|
+
".": "./src/index.ts",
|
|
76
|
+
"./setup.css": "./src/setup.css"
|
|
80
77
|
}
|
|
81
78
|
}
|
package/dist/Grid-B0vqOT42.js
DELETED
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as o, jsxs as g } from "react/jsx-runtime";
|
|
3
|
-
import n from "react";
|
|
4
|
-
import { m as w } from "./index-CPJI9a7D.js";
|
|
5
|
-
const x = n.memo(
|
|
6
|
-
({
|
|
7
|
-
className: e,
|
|
8
|
-
lineColor: t = "#333333",
|
|
9
|
-
lineWidth: r = 1,
|
|
10
|
-
spacing: i = 50,
|
|
11
|
-
// Interactive mode props
|
|
12
|
-
isInteractive: u = !1,
|
|
13
|
-
hoverColor: d = "#93c5fd",
|
|
14
|
-
rows: s = 150,
|
|
15
|
-
cols: a = 100
|
|
16
|
-
}) => {
|
|
17
|
-
const y = n.useMemo(() => new Array(s).fill(1), [s]), f = n.useMemo(() => new Array(a).fill(1), [a]), l = n.useMemo(
|
|
18
|
-
() => ({
|
|
19
|
-
rowStyle: {
|
|
20
|
-
height: `${i}px`,
|
|
21
|
-
width: `${i * 2}px`,
|
|
22
|
-
borderLeft: `${r}px solid ${t}`
|
|
23
|
-
},
|
|
24
|
-
colStyle: {
|
|
25
|
-
height: `${i}px`,
|
|
26
|
-
width: `${i * 2}px`,
|
|
27
|
-
borderTop: `${r}px solid ${t}`,
|
|
28
|
-
borderRight: `${r}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, r, t]
|
|
37
|
-
), h = n.useMemo(
|
|
38
|
-
() => ({
|
|
39
|
-
hover: {
|
|
40
|
-
backgroundColor: d,
|
|
41
|
-
transition: { duration: 0 }
|
|
42
|
-
},
|
|
43
|
-
animate: {
|
|
44
|
-
transition: { duration: 2 }
|
|
45
|
-
}
|
|
46
|
-
}),
|
|
47
|
-
[d]
|
|
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(($, c) => /* @__PURE__ */ o(
|
|
79
|
-
w.div,
|
|
80
|
-
{
|
|
81
|
-
style: { ...l.rowStyle, position: "relative" },
|
|
82
|
-
children: f.map((v, m) => /* @__PURE__ */ o(
|
|
83
|
-
w.div,
|
|
84
|
-
{
|
|
85
|
-
whileHover: h.hover,
|
|
86
|
-
animate: h.animate,
|
|
87
|
-
style: { ...l.colStyle, position: "relative" },
|
|
88
|
-
children: m % 2 === 0 && c % 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-${m}`
|
|
116
|
-
))
|
|
117
|
-
},
|
|
118
|
-
`row-${c}`
|
|
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
|
-
"path",
|
|
162
|
-
{
|
|
163
|
-
d: `M ${i} 0 L 0 0 0 ${i}`,
|
|
164
|
-
fill: "none",
|
|
165
|
-
stroke: t,
|
|
166
|
-
strokeWidth: r
|
|
167
|
-
}
|
|
168
|
-
)
|
|
169
|
-
}
|
|
170
|
-
) }),
|
|
171
|
-
/* @__PURE__ */ o("rect", { width: "100%", height: "100%", fill: "url(#grid-pattern)" })
|
|
172
|
-
]
|
|
173
|
-
}
|
|
174
|
-
)
|
|
175
|
-
}
|
|
176
|
-
);
|
|
177
|
-
},
|
|
178
|
-
// Custom comparison function for better memoization
|
|
179
|
-
(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
|
|
180
|
-
);
|
|
181
|
-
x.displayName = "BackgroundGrid";
|
|
182
|
-
export {
|
|
183
|
-
x as BackgroundGrid
|
|
184
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import { A as d } from "./index-DHHPZcEh.js";
|
|
4
|
-
import { M as n } from "./index-CmNhuPZp.js";
|
|
5
|
-
const x = ({
|
|
6
|
-
logo: a,
|
|
7
|
-
siteName: r,
|
|
8
|
-
options: t,
|
|
9
|
-
message: c
|
|
10
|
-
}) => {
|
|
11
|
-
var l;
|
|
12
|
-
return /* @__PURE__ */ s(d, { logo: a, siteName: r, maxWidth: "sm", children: [
|
|
13
|
-
/* @__PURE__ */ s("div", { className: "mb-6 px-8 sm:px-6", children: [
|
|
14
|
-
/* @__PURE__ */ e("div", { className: "mb-4 flex justify-center", children: /* @__PURE__ */ e(
|
|
15
|
-
"svg",
|
|
16
|
-
{
|
|
17
|
-
className: "h-12 w-12 text-black sm:h-10 sm:w-10",
|
|
18
|
-
fill: "none",
|
|
19
|
-
viewBox: "0 0 24 24",
|
|
20
|
-
strokeWidth: 1.5,
|
|
21
|
-
stroke: "currentColor",
|
|
22
|
-
children: /* @__PURE__ */ e(
|
|
23
|
-
"path",
|
|
24
|
-
{
|
|
25
|
-
strokeLinecap: "round",
|
|
26
|
-
strokeLinejoin: "round",
|
|
27
|
-
d: "M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"
|
|
28
|
-
}
|
|
29
|
-
)
|
|
30
|
-
}
|
|
31
|
-
) }),
|
|
32
|
-
/* @__PURE__ */ e("h1", { className: "text-text-1 m-0 mb-2 text-center text-2xl font-semibold sm:text-xl", children: "Access Restricted" }),
|
|
33
|
-
r && /* @__PURE__ */ s("p", { className: "m-0 text-center leading-6 text-[--color-text-2]", children: [
|
|
34
|
-
"Content on ",
|
|
35
|
-
/* @__PURE__ */ e("strong", { children: r }),
|
|
36
|
-
" is currently restricted"
|
|
37
|
-
] })
|
|
38
|
-
] }),
|
|
39
|
-
/* @__PURE__ */ e("div", { className: "mx-8 mb-8 rounded-lg border-l-4 border-red-300 bg-gray-50 p-4 sm:mx-6", children: /* @__PURE__ */ e(
|
|
40
|
-
"div",
|
|
41
|
-
{
|
|
42
|
-
className: "m-0 flex flex-col gap-3 leading-relaxed text-gray-700",
|
|
43
|
-
dangerouslySetInnerHTML: {
|
|
44
|
-
__html: ((l = t == null ? void 0 : t.content) == null ? void 0 : l.conditionNotFulfilled) ?? c ?? ""
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
) }),
|
|
48
|
-
/* @__PURE__ */ e(n, {})
|
|
49
|
-
] });
|
|
50
|
-
};
|
|
51
|
-
export {
|
|
52
|
-
x as default
|
|
53
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { ComponentType, ForwardRefExoticComponent, ReactElement, RefAttributes, ReactNode } from 'react';
|
|
2
|
-
import { IFieldConfig, IStyles } from '../interfaces';
|
|
3
|
-
type RenderFunction = (item: unknown, index: number) => ReactNode;
|
|
4
|
-
type BlockChildren = ReactNode | RenderFunction;
|
|
5
|
-
/**
|
|
6
|
-
* Base props interface for all studio elements
|
|
7
|
-
*
|
|
8
|
-
* These props are automatically injected by the withBlockProps HOC
|
|
9
|
-
* and provide access to element configuration, styling, and content
|
|
10
|
-
*/
|
|
11
|
-
export interface BaseElementProps {
|
|
12
|
-
elementKey: string;
|
|
13
|
-
styles?: IStyles;
|
|
14
|
-
config?: IFieldConfig;
|
|
15
|
-
content?: any;
|
|
16
|
-
generatedClassName?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface WithBlockPropsComponent<P = {}> {
|
|
19
|
-
(props: P & {
|
|
20
|
-
children?: BlockChildren;
|
|
21
|
-
}): ReactElement | null;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* withBlockProps - Higher-Order Component for Studio Elements
|
|
25
|
-
*
|
|
26
|
-
* This HOC enhances studio elements with block data and generates CSS classes
|
|
27
|
-
* for theme-based styling and targeting. It bridges the gap between block data
|
|
28
|
-
* and individual element instances.
|
|
29
|
-
*
|
|
30
|
-
* Key Features:
|
|
31
|
-
* 1. Injects element-specific config, styles, and content from block data
|
|
32
|
-
* 2. Generates CSS classes for element targeting and theme variants
|
|
33
|
-
* 3. Handles nested data access via dot-notation element keys
|
|
34
|
-
* 4. Provides consistent interface for all studio elements
|
|
35
|
-
* 5. Added support for Framer Motion animations driven by studio config
|
|
36
|
-
*
|
|
37
|
-
* CSS Class Generation:
|
|
38
|
-
* - Base class: `levo-{blockId}-{elementKey}` for unique element targeting
|
|
39
|
-
* - Variant classes: `levo-variant-{groupId}-{variantId}` for theme variants
|
|
40
|
-
*
|
|
41
|
-
* The generated classes enable:
|
|
42
|
-
* - Element-specific styling in CSS
|
|
43
|
-
* - Theme variant styling via class selectors
|
|
44
|
-
* - CSS cascade integration with theme system
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* // Element with theme variants selected
|
|
48
|
-
* <Button elementKey="hero.button" />
|
|
49
|
-
*
|
|
50
|
-
* // If config.selectedVariants = { variants: "primary", sizes: "large" }
|
|
51
|
-
* // Renders with classes:
|
|
52
|
-
* // "levo-block123-hero-button levo-variant-variants-primary levo-variant-sizes-large"
|
|
53
|
-
*
|
|
54
|
-
* @param WrappedComponent - The component to enhance with block props
|
|
55
|
-
* @returns Enhanced component with automatic prop injection
|
|
56
|
-
*/
|
|
57
|
-
export declare const withBlockProps: <P extends BaseElementProps & {
|
|
58
|
-
children?: BlockChildren;
|
|
59
|
-
}, R>(WrappedComponent: ComponentType<P> | ForwardRefExoticComponent<P & RefAttributes<R>>) => WithBlockPropsComponent<P>;
|
|
60
|
-
export {};
|
|
61
|
-
//# sourceMappingURL=withBlockProps%20copy.d.ts.map
|