@levo-so/studio 0.1.101 → 0.1.103
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/{AuthProvider-56TywIOB.js → AuthProvider-C6bvedwF.js} +16 -16
- package/Beams-DboMUgCv.js +102 -0
- package/{BillingStep-Brc1Mzo3.js → BillingStep-BA3H9BVu.js} +1 -1
- package/{Button-XTKnNIl9.js → Button-CZycqusY.js} +249 -138
- package/Button-lUfKisu8.js +116 -0
- package/CollectionField-xa-jed3_.js +232 -0
- package/CollectionInput-CpNGIXJx.js +147 -0
- package/DateTimeWidget-DP_nMhqe.js +256 -0
- package/Dialog-IrII0ugb.js +130 -0
- package/Dots-a8xSboDv.js +100 -0
- package/{EntryCard-DTcx6wfA.js → EntryCard-CQpKNX7G.js} +4 -4
- package/Grid-BJQvxnks.js +99 -0
- package/{LoginCard-CnHmCKUF.js → LoginCard-Cyvm-y_q.js} +3 -3
- package/{LoginForm-Ck-xFaDg.js → LoginForm-_44FtvWg.js} +207 -206
- package/{LoginModal-BdYM8INu.js → LoginModal-Cyw_XKvz.js} +4 -4
- package/{MessageCard-ChDBqLVG.js → MessageCard-C2lNTxFx.js} +2 -2
- package/{MessageFooter-AzAtJWMo.js → MessageFooter-59Pziq3i.js} +2 -2
- package/{ModalManager-SggxCIno.js → ModalManager-DHkd0Zdb.js} +1 -1
- package/{PendingApprovalCard-C6ORDqrY.js → PendingApprovalCard-C8iZjo06.js} +3 -3
- package/PhoneWidget-CxxxDXkz.js +100 -0
- package/{Popover-BdKCElnb.js → Popover-DOvRAGzc.js} +19 -20
- package/PopupRenderer-C7OHYphU-Ct5T6tWM.js +2668 -0
- package/RichTextWidget-BqlcssWt.js +113 -0
- package/RteThemeProvider-Cfepkyer.js +20 -0
- package/{StripePaymentModal-BHIBBvRj.js → StripePaymentModal-DrLMN18M.js} +17 -17
- package/Toolbar-BwxoYWO_.js +738 -0
- package/Tooltip-NEMQqPyr.js +67 -0
- package/VerifyButton-TNkt-SDu.js +177 -0
- package/authentication-hnV1BI8s.js +36 -0
- package/bookingCard-BDyuBC6X.js +636 -0
- package/collection.d.ts +83 -0
- package/collection.js +9 -8
- package/{dialog-Dw6n_36P.js → dialog-C8-iHixJ.js} +32 -32
- package/dist-CG-pwDW0.js +3188 -0
- package/generateRadiusScale-BpcgkGtN.js +71 -0
- package/getFieldValidations-CSkSV2hW.js +90 -0
- package/index.d.ts +96 -9
- package/index.js +6021 -7731
- package/inlineRteTheme-Ajq9PNpQ.js +9 -0
- package/{nodeAlignment-BZbdafVA.js → nodeAlignment-DKCIjzlR.js} +41 -62
- package/package.json +38 -40
- package/studio.css +1 -1
- package/useLogin-B2qE8710.js +127 -0
- package/{utils-kDaDLLGt.js → utils-CZLafTgN.js} +1 -1
- package/{widgets-CWDiqXm9.js → widgets-eu5zXTf-.js} +58 -125
- package/Beams-B0O3uyYF.js +0 -118
- package/CollectionInput-cmJ0RXzG.js +0 -132
- package/DateTimeWidget-B5lBr0_R.js +0 -255
- package/Dots-DjezbpLp.js +0 -137
- package/Grid-C9aUfXM-.js +0 -145
- package/Input-Btdc1Dee.js +0 -293
- package/PhoneWidget-BRIAve47.js +0 -100
- package/RichTextWidget-CjEoGecM.js +0 -1136
- package/Tooltip-BOq5vSOW.js +0 -68
- package/VerifyButton-Bl2QqMpB.js +0 -273
- package/bookingCard-D3ZSjq-P.js +0 -577
- package/dist-DuTd566a.js +0 -3112
- package/getFieldValidations-DZnDgNI0.js +0 -159
- /package/{Gradient-B1K9Yi04.js → Gradient-NacpoDCM.js} +0 -0
- /package/{Waves-BkaAfGqA.js → Waves-DUuT_IFr.js} +0 -0
- /package/{card-BQr9258p.js → card-E2LKF9nT.js} +0 -0
- /package/{theme.cssm-2YTdd8Yh.js → theme.cssm-BXDp-ojp.js} +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
//#region ../../libraries/levocn/dist/styles/theme/themeVars.cssm.js
|
|
2
|
+
var e = {
|
|
3
|
+
colors: {
|
|
4
|
+
background: "var(--_1i5egzy0)",
|
|
5
|
+
foreground: "var(--_1i5egzy1)",
|
|
6
|
+
text: "var(--_1i5egzy2)",
|
|
7
|
+
heading: "var(--_1i5egzy3)",
|
|
8
|
+
card: "var(--_1i5egzy4)",
|
|
9
|
+
cardForeground: "var(--_1i5egzy5)",
|
|
10
|
+
popover: "var(--_1i5egzy6)",
|
|
11
|
+
popoverForeground: "var(--_1i5egzy7)",
|
|
12
|
+
primary: "var(--_1i5egzy8)",
|
|
13
|
+
primaryForeground: "var(--_1i5egzy9)",
|
|
14
|
+
secondary: "var(--_1i5egzya)",
|
|
15
|
+
secondaryForeground: "var(--_1i5egzyb)",
|
|
16
|
+
muted: "var(--_1i5egzyc)",
|
|
17
|
+
mutedForeground: "var(--_1i5egzyd)",
|
|
18
|
+
accent: "var(--_1i5egzye)",
|
|
19
|
+
accentForeground: "var(--_1i5egzyf)",
|
|
20
|
+
destructive: "var(--_1i5egzyg)",
|
|
21
|
+
border: "var(--_1i5egzyh)",
|
|
22
|
+
input: "var(--_1i5egzyi)",
|
|
23
|
+
inputForeground: "var(--_1i5egzyj)",
|
|
24
|
+
ring: "var(--_1i5egzyk)"
|
|
25
|
+
},
|
|
26
|
+
radius: "var(--_1i5egzyl)",
|
|
27
|
+
radiusScale: {
|
|
28
|
+
sm: "var(--_1i5egzym)",
|
|
29
|
+
base: "var(--_1i5egzyn)",
|
|
30
|
+
md: "var(--_1i5egzyo)",
|
|
31
|
+
lg: "var(--_1i5egzyp)",
|
|
32
|
+
xl: "var(--_1i5egzyq)",
|
|
33
|
+
"2xl": "var(--_1i5egzyr)",
|
|
34
|
+
"3xl": "var(--_1i5egzys)",
|
|
35
|
+
"4xl": "var(--_1i5egzyt)",
|
|
36
|
+
"5xl": "var(--_1i5egzyu)",
|
|
37
|
+
"6xl": "var(--_1i5egzyv)",
|
|
38
|
+
"7xl": "var(--_1i5egzyw)",
|
|
39
|
+
"8xl": "var(--_1i5egzyx)",
|
|
40
|
+
full: "var(--_1i5egzyy)"
|
|
41
|
+
},
|
|
42
|
+
baseFontSize: "var(--_1i5egzyz)",
|
|
43
|
+
fonts: {
|
|
44
|
+
body: "var(--_1i5egzy10)",
|
|
45
|
+
heading: "var(--_1i5egzy11)"
|
|
46
|
+
},
|
|
47
|
+
shadow: {
|
|
48
|
+
xs: "var(--_1i5egzy12)",
|
|
49
|
+
sm: "var(--_1i5egzy13)",
|
|
50
|
+
md: "var(--_1i5egzy14)",
|
|
51
|
+
lg: "var(--_1i5egzy15)",
|
|
52
|
+
xl: "var(--_1i5egzy16)",
|
|
53
|
+
inner: "var(--_1i5egzy17)"
|
|
54
|
+
}
|
|
55
|
+
}, t = (e) => ({
|
|
56
|
+
sm: `calc(${e} * 0.5)`,
|
|
57
|
+
base: e,
|
|
58
|
+
md: `calc(${e} * 1.5)`,
|
|
59
|
+
lg: `calc(${e} * 2)`,
|
|
60
|
+
xl: `calc(${e} * 3)`,
|
|
61
|
+
"2xl": `calc(${e} * 4)`,
|
|
62
|
+
"3xl": `calc(${e} * 6)`,
|
|
63
|
+
"4xl": `calc(${e} * 8)`,
|
|
64
|
+
"5xl": `calc(${e} * 12)`,
|
|
65
|
+
"6xl": `calc(${e} * 16)`,
|
|
66
|
+
"7xl": `calc(${e} * 20)`,
|
|
67
|
+
"8xl": `calc(${e} * 24)`,
|
|
68
|
+
full: "100%"
|
|
69
|
+
});
|
|
70
|
+
//#endregion
|
|
71
|
+
export { e as n, t };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { FieldInterfaces as e } from "@levo-so/core";
|
|
2
|
+
import { isValidPhoneNumber as t } from "react-phone-number-input";
|
|
3
|
+
import * as n from "yup";
|
|
4
|
+
//#region ../../libraries/react-collection/dist/utils/getFieldValidations.js
|
|
5
|
+
var r = (r, i) => {
|
|
6
|
+
let a = (r?.label || r?.key || "")?.replace(/_/g, " ");
|
|
7
|
+
if (a?.endsWith("Id") && (a = a?.replace("Id", "")), a.includes(".")) {
|
|
8
|
+
let [e] = a.split(".");
|
|
9
|
+
e && (a = e);
|
|
10
|
+
}
|
|
11
|
+
let o = (e) => {
|
|
12
|
+
let t = e;
|
|
13
|
+
return r.max !== void 0 && r.max !== null && r.max !== "" && (t = t.max(Number(r.max), `The ${a} value is too large (max ${r.max})`)), r.min !== void 0 && r.min !== null && r.min !== "" && (t = t.min(Number(r.min), `The ${a} value is too small (min ${r.min})`)), t;
|
|
14
|
+
}, s;
|
|
15
|
+
switch (r.field_interface) {
|
|
16
|
+
case e.NumberWidget:
|
|
17
|
+
s = o(n.number());
|
|
18
|
+
break;
|
|
19
|
+
case e.ArrayWidget:
|
|
20
|
+
s = o(n.array().typeError("The field must be an array"));
|
|
21
|
+
break;
|
|
22
|
+
case e.RecordWidget:
|
|
23
|
+
s = n.object();
|
|
24
|
+
break;
|
|
25
|
+
case e.EmailWidget:
|
|
26
|
+
s = o(n.string().email("The email address is not valid"));
|
|
27
|
+
break;
|
|
28
|
+
case e.PhoneWidget:
|
|
29
|
+
s = o(n.string().test("phone", "The phone number has incorrect format", (e) => {
|
|
30
|
+
if (e) try {
|
|
31
|
+
return t(e);
|
|
32
|
+
} catch {
|
|
33
|
+
return !1;
|
|
34
|
+
}
|
|
35
|
+
return !0;
|
|
36
|
+
}));
|
|
37
|
+
break;
|
|
38
|
+
case e.URLWidget:
|
|
39
|
+
s = o(n.string().matches(/^(?:https?:\/\/)?(?:[a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+(?:\.[a-zA-Z]{2,})+(?:\/[^\s?#]*)?(?:\?[^\s]*)?$/, "The URL is not valid"));
|
|
40
|
+
break;
|
|
41
|
+
case e.ImageUploadWidget:
|
|
42
|
+
case e.FileUploadWidget:
|
|
43
|
+
case e.GeocoderWidget:
|
|
44
|
+
s = n.object();
|
|
45
|
+
break;
|
|
46
|
+
case e.MultiImageUploadWidget:
|
|
47
|
+
case e.MultiFileUploadWidget:
|
|
48
|
+
case e.MultiGeocoderWidget:
|
|
49
|
+
s = n.array().of(n.object());
|
|
50
|
+
break;
|
|
51
|
+
case e.JSONWidget:
|
|
52
|
+
case e.DropdownWidget:
|
|
53
|
+
s = n.string();
|
|
54
|
+
break;
|
|
55
|
+
case e.MultiTextWidget:
|
|
56
|
+
case e.MultiDropdownWidget:
|
|
57
|
+
case e.CheckboxWidget:
|
|
58
|
+
s = n.array().of(n.string());
|
|
59
|
+
break;
|
|
60
|
+
case e.ToggleCheckboxWidget:
|
|
61
|
+
s = n.boolean();
|
|
62
|
+
break;
|
|
63
|
+
case e.CollectionWidget:
|
|
64
|
+
s = r.options.current_have_many_connected ? n.array() : n.object();
|
|
65
|
+
break;
|
|
66
|
+
default:
|
|
67
|
+
s = o(n.string());
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
if (r.options?.validationsPresets && Array.isArray(r.options.validationsPresets)) {
|
|
71
|
+
let t = r.options.validationsPresets;
|
|
72
|
+
(r.field_interface === e.TextWidget || r.field_interface === e.TextareaWidget) && (t.includes("exclude_special_chars") && (s = s.matches(/^[a-zA-Z0-9\s]*$/, "Special characters are not allowed")), t.includes("exclude_numbers") && (s = s.matches(/^[^0-9]*$/, "Numbers are not allowed")));
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
required: {
|
|
76
|
+
value: !!r?.required,
|
|
77
|
+
message: `The ${a} field is required`
|
|
78
|
+
},
|
|
79
|
+
validate: (e) => {
|
|
80
|
+
if (r?.options?.disableValidation || e === "" || e == null) return !0;
|
|
81
|
+
try {
|
|
82
|
+
return s.validateSync(e), i ? i(e) : !0;
|
|
83
|
+
} catch (e) {
|
|
84
|
+
return e instanceof n.ValidationError ? e.message : !0;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
//#endregion
|
|
90
|
+
export { r as t };
|
package/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ import { IMeta } from '@levo-so/core';
|
|
|
23
23
|
import { IResponseMultiple } from '@levo-so/core';
|
|
24
24
|
import { IResponseSingle } from '@levo-so/core';
|
|
25
25
|
import { IWorkspace } from '@levo-so/core';
|
|
26
|
+
import { JSONContent } from '@tiptap/core';
|
|
26
27
|
import { JSX } from 'react/jsx-runtime';
|
|
27
28
|
import { LazyExoticComponent } from 'react';
|
|
28
29
|
import { LevoError } from '@levo-so/core';
|
|
@@ -96,12 +97,18 @@ export declare const AuthProvider: React.FC<{
|
|
|
96
97
|
|
|
97
98
|
export declare function Avatar({ className, ...props }: React_2.ComponentProps<typeof Avatar_2.Root>): JSX.Element;
|
|
98
99
|
|
|
100
|
+
export declare function AvatarBadge({ className, ...props }: React_2.ComponentProps<"span">): JSX.Element;
|
|
101
|
+
|
|
99
102
|
export declare function AvatarFallback({ className, isActive, ...props }: React_2.ComponentProps<typeof Avatar_2.Fallback> & {
|
|
100
103
|
isActive?: boolean;
|
|
101
104
|
}): JSX.Element;
|
|
102
105
|
|
|
103
106
|
export declare function AvatarFallbackV2({ className, ...props }: React_2.ComponentProps<typeof Avatar_2.Fallback>): JSX.Element;
|
|
104
107
|
|
|
108
|
+
export declare function AvatarGroup({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
|
|
109
|
+
|
|
110
|
+
export declare function AvatarGroupCount({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
|
|
111
|
+
|
|
105
112
|
export declare function AvatarImage({ className, isActive, ...props }: React_2.ComponentProps<typeof Avatar_2.Image> & {
|
|
106
113
|
isActive?: boolean;
|
|
107
114
|
}): JSX.Element;
|
|
@@ -124,8 +131,6 @@ export declare interface BackgroundEffectConfig {
|
|
|
124
131
|
frequency?: number;
|
|
125
132
|
speed?: number;
|
|
126
133
|
isInteractive?: boolean;
|
|
127
|
-
rows?: number;
|
|
128
|
-
cols?: number;
|
|
129
134
|
gridSize?: number;
|
|
130
135
|
hoverColor?: string;
|
|
131
136
|
lineWidth?: number;
|
|
@@ -273,13 +278,15 @@ declare type BlockProviderInput = {
|
|
|
273
278
|
parsedBlockData?: IBlockInstance;
|
|
274
279
|
blockData?: IBlockInstance;
|
|
275
280
|
pageContext?: IPageContext;
|
|
281
|
+
/** Per-source API response meta keyed by source identifier, parallel to pageContext */
|
|
282
|
+
pageMeta?: TPageMeta;
|
|
276
283
|
blockContext?: IBlockContext;
|
|
277
284
|
renderMode: IRenderMode;
|
|
278
285
|
workspace_id: string;
|
|
279
286
|
pageSource: IPage["source"];
|
|
280
287
|
};
|
|
281
288
|
|
|
282
|
-
export declare const BlockSourceModuleList: readonly ["collection", "event", "blog", "community", "context", "form"];
|
|
289
|
+
export declare const BlockSourceModuleList: readonly ["collection", "event", "blog", "community", "context", "form", "blog_author", "blog_category", "blog_tag"];
|
|
283
290
|
|
|
284
291
|
export declare class BlocksRegistry {
|
|
285
292
|
private static instance;
|
|
@@ -506,6 +513,8 @@ export declare type ContentHint = {
|
|
|
506
513
|
|
|
507
514
|
export declare type ContentUsecase = "main_title" | "sub_title" | "description" | "label" | "button" | "person_name" | "designation" | "testimonial" | "cta_button" | "price" | "currency" | "interval" | "feature" | "title" | "stat_number" | "stat_label" | "question" | "answer" | "category" | "date" | "reading_time" | "author" | "address" | "phone" | "email" | "link_url" | "link_text";
|
|
508
515
|
|
|
516
|
+
export declare const convertHtmlToJSON: (html: string) => JSONContent;
|
|
517
|
+
|
|
509
518
|
export declare const convertKeysToPascalCase: (key: string) => string;
|
|
510
519
|
|
|
511
520
|
export declare const CreateForumPost: default_2.FC<ICreateForumPostProps>;
|
|
@@ -568,6 +577,8 @@ export declare const DEMO_SCHEMA: ILemaCollection;
|
|
|
568
577
|
|
|
569
578
|
export declare const DevTools: React.FC<IDevToolsProps>;
|
|
570
579
|
|
|
580
|
+
export declare const DevToolsPreview: React.FC<IDevToolsPreviewProps>;
|
|
581
|
+
|
|
571
582
|
export declare const EditForm: WithBlockPropsComponent<BaseElementProps & {
|
|
572
583
|
className?: string;
|
|
573
584
|
initialValues?: Record<string, any>;
|
|
@@ -679,6 +690,17 @@ export declare const generateAccentColor: (oklch: OKLCHColor) => {
|
|
|
679
690
|
hex: string;
|
|
680
691
|
};
|
|
681
692
|
|
|
693
|
+
/**
|
|
694
|
+
* Concatenates site-level and page-level `body_code` settings.
|
|
695
|
+
* Rendered at the end of the page body — typically used for tracking pixels,
|
|
696
|
+
* chat widgets, or any third-party script that must load after content.
|
|
697
|
+
*/
|
|
698
|
+
export declare const generateBodyContent: (pageData: {
|
|
699
|
+
settings?: {
|
|
700
|
+
body_code?: string;
|
|
701
|
+
};
|
|
702
|
+
} | null | undefined, site: ISite | null | undefined) => string;
|
|
703
|
+
|
|
682
704
|
export declare const generateDefaultContent: (contentSchema: any[]) => any;
|
|
683
705
|
|
|
684
706
|
export declare const generateSchemaFromJSX: (jsx: string) => IBlock["content_schema"];
|
|
@@ -816,6 +838,7 @@ export declare const getPageSource: ({ levoClient, pageData, slugs, cookies, dra
|
|
|
816
838
|
draft?: boolean;
|
|
817
839
|
}) => Promise<{
|
|
818
840
|
pageContext: IPageContext;
|
|
841
|
+
pageMeta: TPageMeta;
|
|
819
842
|
pageNotFound: boolean;
|
|
820
843
|
}>;
|
|
821
844
|
|
|
@@ -1127,6 +1150,12 @@ declare interface ICreateForumPostProps {
|
|
|
1127
1150
|
onPostCreated?: (post: IForumPost) => void;
|
|
1128
1151
|
}
|
|
1129
1152
|
|
|
1153
|
+
declare interface IDevToolsPreviewProps {
|
|
1154
|
+
blockInstance: IBlockInstance;
|
|
1155
|
+
blocks: Record<string, BlockComponent>;
|
|
1156
|
+
theme?: ITheme;
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1130
1159
|
export declare interface IDevToolsProps {
|
|
1131
1160
|
schema: IBlock;
|
|
1132
1161
|
component: React.ComponentType<any>;
|
|
@@ -1164,8 +1193,10 @@ export declare interface IFieldConfig {
|
|
|
1164
1193
|
selected_fields?: string[];
|
|
1165
1194
|
};
|
|
1166
1195
|
action?: {
|
|
1167
|
-
type: "page" | "external_link" | "email" | "phone" | "login" | "none";
|
|
1196
|
+
type: "page" | "external_link" | "email" | "phone" | "login" | "popup" | "none";
|
|
1197
|
+
/** For type "popup", holds the popup id to open. */
|
|
1168
1198
|
value: string;
|
|
1199
|
+
alt?: string;
|
|
1169
1200
|
options: {
|
|
1170
1201
|
openInNewTab?: boolean;
|
|
1171
1202
|
};
|
|
@@ -1287,6 +1318,8 @@ export declare interface IInputProps extends IBaseInputProps {
|
|
|
1287
1318
|
leftIconBoxStyles?: string;
|
|
1288
1319
|
rightIconBoxStyles?: string;
|
|
1289
1320
|
inputContainerStyles?: string;
|
|
1321
|
+
leftIconBoxProps?: Omit<React_2.ComponentProps<"div">, "children" | "className">;
|
|
1322
|
+
rightIconBoxProps?: Omit<React_2.ComponentProps<"div">, "children" | "className">;
|
|
1290
1323
|
}
|
|
1291
1324
|
|
|
1292
1325
|
declare interface IJoinRequestFormProps {
|
|
@@ -1297,6 +1330,12 @@ declare interface IJoinRequestFormProps {
|
|
|
1297
1330
|
className?: string;
|
|
1298
1331
|
}
|
|
1299
1332
|
|
|
1333
|
+
declare interface IJsonEditorProps {
|
|
1334
|
+
label: string;
|
|
1335
|
+
value: Record<string, any>;
|
|
1336
|
+
onChange: (value: Record<string, any>) => void;
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1300
1339
|
declare interface ILazyMotionProviderProps {
|
|
1301
1340
|
children: ReactNode;
|
|
1302
1341
|
/** Enforce m component usage - throws if motion component is used */
|
|
@@ -1380,7 +1419,7 @@ declare interface ILevoFormContext {
|
|
|
1380
1419
|
preview?: boolean;
|
|
1381
1420
|
}
|
|
1382
1421
|
|
|
1383
|
-
export declare type ILevoPageData = Pick<IPageExpanded, "id" | "workspace_id" | "blocks" | "source" | "title" | "description" | "access" | "style_config">;
|
|
1422
|
+
export declare type ILevoPageData = Pick<IPageExpanded, "id" | "workspace_id" | "blocks" | "source" | "title" | "description" | "access" | "style_config" | "settings">;
|
|
1384
1423
|
|
|
1385
1424
|
export declare interface ILevoPageProps {
|
|
1386
1425
|
pageData: ILevoPageData;
|
|
@@ -1391,6 +1430,7 @@ export declare interface ILevoPageProps {
|
|
|
1391
1430
|
workspace: IWorkspace;
|
|
1392
1431
|
site: ISite;
|
|
1393
1432
|
authOverride?: IAuthOverride | null;
|
|
1433
|
+
disableBranding?: boolean;
|
|
1394
1434
|
}
|
|
1395
1435
|
|
|
1396
1436
|
export declare interface ILocalizedPage {
|
|
@@ -1402,6 +1442,10 @@ export declare interface ILocalizedPage {
|
|
|
1402
1442
|
url?: string;
|
|
1403
1443
|
}
|
|
1404
1444
|
|
|
1445
|
+
declare interface IMadeWithLevoProps {
|
|
1446
|
+
site: ISite;
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1405
1449
|
declare const Image_2: WithBlockPropsComponent<Omit<BaseImageProps, "ref"> & RefAttributes<HTMLImageElement>>;
|
|
1406
1450
|
export { Image_2 as Image }
|
|
1407
1451
|
|
|
@@ -1567,6 +1611,7 @@ export declare type IPageContext = Record<string, unknown>;
|
|
|
1567
1611
|
|
|
1568
1612
|
export declare interface IPageDataContext {
|
|
1569
1613
|
page?: IPageContext;
|
|
1614
|
+
meta?: TPageMeta;
|
|
1570
1615
|
blocks: Record<string, IBlockContext>;
|
|
1571
1616
|
}
|
|
1572
1617
|
|
|
@@ -1587,7 +1632,7 @@ export declare interface IPageFromPath {
|
|
|
1587
1632
|
access: IPageAccessCheck | null;
|
|
1588
1633
|
}
|
|
1589
1634
|
|
|
1590
|
-
export declare type IPageKind = "blog.page" | "collection.page" | "community.page" | "event.page" | "static";
|
|
1635
|
+
export declare type IPageKind = "blog.page" | "blog.author.page" | "blog.category.page" | "blog.tag.page" | "collection.page" | "community.page" | "event.page" | "static";
|
|
1591
1636
|
|
|
1592
1637
|
export declare interface IPageMeta {
|
|
1593
1638
|
meta_title: string;
|
|
@@ -1603,6 +1648,8 @@ export declare interface IPageMeta {
|
|
|
1603
1648
|
|
|
1604
1649
|
export declare interface IPageSettings {
|
|
1605
1650
|
structured_data_json?: string;
|
|
1651
|
+
head_code?: string;
|
|
1652
|
+
body_code?: string;
|
|
1606
1653
|
[key: string]: any;
|
|
1607
1654
|
}
|
|
1608
1655
|
|
|
@@ -1624,6 +1671,17 @@ declare interface IPendingRequestStateProps {
|
|
|
1624
1671
|
className?: string;
|
|
1625
1672
|
}
|
|
1626
1673
|
|
|
1674
|
+
declare interface IPopupLoaderProps {
|
|
1675
|
+
siteId?: string;
|
|
1676
|
+
/**
|
|
1677
|
+
* Id of the page definition currently being rendered. Levo-hosted sites
|
|
1678
|
+
* know this at render time and should pass it through so page-bound
|
|
1679
|
+
* targeting rules (e.g. "show on all blog posts") can match.
|
|
1680
|
+
* External-site SDK consumers leave this undefined.
|
|
1681
|
+
*/
|
|
1682
|
+
pageId?: string;
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1627
1685
|
export declare interface IPostActionsLoadingState {
|
|
1628
1686
|
engagements?: boolean;
|
|
1629
1687
|
comments?: boolean;
|
|
@@ -1713,6 +1771,7 @@ export declare interface ISite {
|
|
|
1713
1771
|
theme: ITheme;
|
|
1714
1772
|
settings: {
|
|
1715
1773
|
head_code?: string;
|
|
1774
|
+
body_code?: string;
|
|
1716
1775
|
studio_preview_url?: string;
|
|
1717
1776
|
staging_preview_url?: string;
|
|
1718
1777
|
contact_info?: IContactInfo;
|
|
@@ -1812,8 +1871,10 @@ export declare type IStudioSource = {
|
|
|
1812
1871
|
field_key: string;
|
|
1813
1872
|
params?: Record<string, any>;
|
|
1814
1873
|
options?: {
|
|
1815
|
-
sub_module?: "popular_posts" | "related_posts";
|
|
1816
|
-
|
|
1874
|
+
sub_module?: "latest_posts" | "popular_posts" | "related_posts" | "author_posts" | "category_posts" | "tag_posts";
|
|
1875
|
+
post_id?: string;
|
|
1876
|
+
/** Blog slug for the blog_author module */
|
|
1877
|
+
blog_identifier?: string;
|
|
1817
1878
|
context_key?: string;
|
|
1818
1879
|
filters?: {
|
|
1819
1880
|
enabled?: boolean;
|
|
@@ -2097,6 +2158,8 @@ declare type IWidgetRegistry = Record<(typeof CommonFieldInterfacesList)[number]
|
|
|
2097
2158
|
*/
|
|
2098
2159
|
export declare const JoinRequestForm: default_2.FC<IJoinRequestFormProps>;
|
|
2099
2160
|
|
|
2161
|
+
export declare const JsonEditor: React.FC<IJsonEditorProps>;
|
|
2162
|
+
|
|
2100
2163
|
export declare function Kbd({ className, ...props }: React.ComponentProps<"kbd">): JSX.Element;
|
|
2101
2164
|
|
|
2102
2165
|
export declare function KbdGroup({ className, ...props }: React.ComponentProps<"div">): JSX.Element;
|
|
@@ -2111,7 +2174,7 @@ export declare const KindList: readonly ["element", "group"];
|
|
|
2111
2174
|
*/
|
|
2112
2175
|
export declare const LazyMotionProvider: React.FC<ILazyMotionProviderProps>;
|
|
2113
2176
|
|
|
2114
|
-
export declare const LevoBlock: default_2.MemoExoticComponent<({ html_id, renderMode, blocks, parsedBlockData, blockData, pageContext, blockContext, workspace_id, pageSource, }: LevoBlockProps) => JSX.Element>;
|
|
2177
|
+
export declare const LevoBlock: default_2.MemoExoticComponent<({ html_id, renderMode, blocks, parsedBlockData, blockData, pageContext, pageMeta, blockContext, workspace_id, pageSource, }: LevoBlockProps) => JSX.Element>;
|
|
2115
2178
|
|
|
2116
2179
|
declare interface LevoBlockProps {
|
|
2117
2180
|
html_id?: string;
|
|
@@ -2121,6 +2184,7 @@ declare interface LevoBlockProps {
|
|
|
2121
2184
|
workspace_id: string;
|
|
2122
2185
|
blockData?: IBlockInstance;
|
|
2123
2186
|
pageContext?: IPageContext;
|
|
2187
|
+
pageMeta?: TPageMeta;
|
|
2124
2188
|
blockContext?: IPageDataContext["blocks"][number];
|
|
2125
2189
|
pageSource?: IPage["source"];
|
|
2126
2190
|
}
|
|
@@ -2129,6 +2193,13 @@ export declare const LevoPage: default_2.FC<ILevoPageProps>;
|
|
|
2129
2193
|
|
|
2130
2194
|
export declare const Link: WithBlockPropsComponent<BaseLinkProps & RefAttributes<HTMLAnchorElement>>;
|
|
2131
2195
|
|
|
2196
|
+
/**
|
|
2197
|
+
* "Made with Levo" badge fixed to the bottom-right of a rendered page,
|
|
2198
|
+
* with a click-through promotional popup. Gated by `workspace.feature_flag.branding`
|
|
2199
|
+
* at the call site (LevoPage).
|
|
2200
|
+
*/
|
|
2201
|
+
export declare const MadeWithLevo: React.FC<IMadeWithLevoProps>;
|
|
2202
|
+
|
|
2132
2203
|
export declare const Media: WithBlockPropsComponent<(Omit<BaseMediaProps & HTMLImageProps_2 & {
|
|
2133
2204
|
isVideo?: false;
|
|
2134
2205
|
}, "ref"> | Omit<BaseMediaProps & HTMLVideoProps & {
|
|
@@ -2288,6 +2359,15 @@ export declare const PopoverRoot: React_2.FC<Popover.PopoverProps>;
|
|
|
2288
2359
|
|
|
2289
2360
|
export declare const PopoverTrigger: WithBlockPropsComponent<BasePopoverTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
2290
2361
|
|
|
2362
|
+
/**
|
|
2363
|
+
* Plug-and-play popup integration for React apps.
|
|
2364
|
+
* Waits for identity context (session hydrated + identity resolved), then
|
|
2365
|
+
* fetches active popups and lazy-loads the renderer only when popups exist.
|
|
2366
|
+
* Works without insights network — gates on local readiness, not /welcome.
|
|
2367
|
+
* Must be placed inside a `<LevoProvider>`.
|
|
2368
|
+
*/
|
|
2369
|
+
export declare const PopupLoader: React.FC<IPopupLoaderProps>;
|
|
2370
|
+
|
|
2291
2371
|
export declare const PostActions: default_2.FC<{
|
|
2292
2372
|
post: IForumPost;
|
|
2293
2373
|
postDetailPageURLPattern?: string | null;
|
|
@@ -2388,6 +2468,7 @@ declare interface PreviewHighlighterProps {
|
|
|
2388
2468
|
isGenerationCancelled?: boolean;
|
|
2389
2469
|
totalBlocksCount?: number;
|
|
2390
2470
|
blocksGenerationInfo?: IBlockGenerationInfo[];
|
|
2471
|
+
contrastColor?: "black" | "white";
|
|
2391
2472
|
}
|
|
2392
2473
|
|
|
2393
2474
|
/**
|
|
@@ -2666,6 +2747,9 @@ export declare const TooltipProvider: React_2.FC<Tooltip_2.TooltipProviderProps>
|
|
|
2666
2747
|
|
|
2667
2748
|
export declare const TooltipTrigger: React_2.ForwardRefExoticComponent<Tooltip_2.TooltipTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
2668
2749
|
|
|
2750
|
+
/** Per-source API response meta (pagination counts, etc.) keyed by source identifier */
|
|
2751
|
+
export declare type TPageMeta = Record<string, unknown>;
|
|
2752
|
+
|
|
2669
2753
|
/** Transition configuration for animations */
|
|
2670
2754
|
export declare interface TransitionConfig {
|
|
2671
2755
|
type?: "spring" | "tween" | "keyframes";
|
|
@@ -2758,6 +2842,9 @@ export declare const useLogin: () => IUseLoginReturn;
|
|
|
2758
2842
|
|
|
2759
2843
|
export declare const usePageContext: (module: IStudioSource["module"]) => any;
|
|
2760
2844
|
|
|
2845
|
+
/** Returns the API response meta (pagination counts, etc.) for the page-level source matching the given module */
|
|
2846
|
+
export declare const usePageMeta: (module: IStudioSource["module"]) => unknown;
|
|
2847
|
+
|
|
2761
2848
|
export declare const UserMenu: WithBlockPropsComponent<BaseUserMenuProps>;
|
|
2762
2849
|
|
|
2763
2850
|
/**
|