@levo-so/studio 0.1.108 → 0.1.110
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/{BillingStep-CJqmdIz2.js → BillingStep-CY2MHQ-L.js} +1 -1
- package/{Button-DujHjtOV.js → Button-DjphTnCg.js} +545 -97
- package/{CollectionField-BPl8E9MW.js → CollectionField-DrJuHNsg.js} +38 -38
- package/{DateTimeWidget-CbpvxQ9s.js → DateTimeWidget-BVHZh4EV.js} +13 -13
- package/{EntryCard-Drnobf4s.js → EntryCard-BYONyIm5.js} +7 -4
- package/{LoginCard-B9HKjZEk.js → LoginCard-CrtSHdaR.js} +3 -3
- package/{LoginForm-DpgxFh89.js → LoginForm-DeYsk4kd.js} +18 -18
- package/{LoginModal-CaqsScly.js → LoginModal-BbDfB4S9.js} +3 -3
- package/{MessageCard-DojQRKnf.js → MessageCard-x6jPClGi.js} +2 -2
- package/{MessageFooter-C4qC8cem.js → MessageFooter-CHuPnL_D.js} +1 -1
- package/{ModalManager-CaBZKQR2.js → ModalManager-DQVNPEuG.js} +1 -1
- package/{PendingApprovalCard-CrdOrMRu.js → PendingApprovalCard-CsnyrSsa.js} +3 -3
- package/{PhoneWidget-BxW2gL28.js → PhoneWidget-BaDSMSW5.js} +5 -5
- package/{PopupRenderer-CV5HY1dP-hICGc5AG.js → PopupRenderer-Dd9zoNIY-Cx663DmW.js} +346 -315
- package/ProfileCard-Dg5TY1Mw.js +102 -0
- package/{RichTextWidget-DCzgJ9EA.js → RichTextWidget-yaDCZwIo.js} +10 -10
- package/{RteThemeProvider-Cfepkyer.js → RteThemeProvider-LFGzAYi1.js} +2 -2
- package/{Toolbar-B5UZer_x.js → Toolbar-D3PnF7Ud.js} +4 -4
- package/{VerifyButton-DFAg6STD.js → VerifyButton-6BIXAEGp.js} +1 -1
- package/{bookingCard-BgApvrcj.js → bookingCard-D40dbgvH.js} +3 -3
- package/collection.d.ts +14 -6
- package/collection.js +6 -7
- package/dist-bHoi1bCB.js +3795 -0
- package/index.d.ts +312 -18
- package/index.js +2709 -2177
- package/{inlineCollectionTheme-WpCvMKrW.js → inlineCollectionTheme-D2w17LHX.js} +1 -1
- package/{inlineRteTheme-Ajq9PNpQ.js → inlineRteTheme-abXxag3B.js} +1 -1
- package/{nodeAlignment-DKCIjzlR.js → nodeAlignment-BC_Uferw.js} +5 -5
- package/package.json +5 -5
- package/studio.css +1 -1
- package/{utils-CUqS5dMC.js → utils-C_tr8kXV.js} +1 -1
- package/CollectionFormBuilder-BvFtiZeH.js +0 -3668
- package/dist-DZbXWctg.js +0 -97
- /package/{CollectionInput-DcNJT5Pg.js → CollectionInput-CG-Pu_51.js} +0 -0
- /package/{Popover-DOvRAGzc.js → Popover-DnZY1k6o.js} +0 -0
- /package/{StripePaymentModal-Do1xHctU.js → StripePaymentModal-BsYNQ4MB.js} +0 -0
- /package/{Tooltip-CJINDx93.js → Tooltip-DreKXbTO.js} +0 -0
- /package/{authentication-ClOFcry8.js → authentication-TdyaDNTn.js} +0 -0
- /package/{card-E2LKF9nT.js → card-D5fPArfa.js} +0 -0
- /package/{dialog-DoxC50i0.js → dialog-LRLdr3kq.js} +0 -0
- /package/{theme.cssm-BXDp-ojp.js → theme.cssm-2YTdd8Yh.js} +0 -0
- /package/{useLogin-D4A5iRey.js → useLogin-B2HHZxTi.js} +0 -0
package/index.d.ts
CHANGED
|
@@ -217,6 +217,28 @@ declare interface BaseIframeProps extends BaseElementProps, Omit<default_2.HTMLA
|
|
|
217
217
|
|
|
218
218
|
declare type BaseImageProps = ImageProps & HTMLImageProps;
|
|
219
219
|
|
|
220
|
+
/**
|
|
221
|
+
* Published-site language switcher, modeled as a studio element (like `UserMenu`).
|
|
222
|
+
*
|
|
223
|
+
* Reads the page's sibling language variants from context (via `useLocalizedPages`)
|
|
224
|
+
* — no data wiring needed — and navigates to the selected language's localized URL
|
|
225
|
+
* on a full reload. Dynamic-page placeholder slugs are resolved from the current
|
|
226
|
+
* path before navigating.
|
|
227
|
+
*
|
|
228
|
+
* Renders nothing when the page has at most one language. Hide it deliberately by
|
|
229
|
+
* setting `config.enabled = false` on its element — `withBlockProps` gates on that.
|
|
230
|
+
*/
|
|
231
|
+
export declare const BaseLanguageSwitcher: React_2.FC<BaseLanguageSwitcherProps>;
|
|
232
|
+
|
|
233
|
+
export declare interface BaseLanguageSwitcherProps extends Omit<BaseElementProps, "content"> {
|
|
234
|
+
/** Class applied to the wrapper. */
|
|
235
|
+
className?: string;
|
|
236
|
+
/** Class applied to the dropdown menu content. */
|
|
237
|
+
contentClassName?: string;
|
|
238
|
+
/** Menu alignment relative to the trigger. Defaults to "end". */
|
|
239
|
+
align?: "start" | "center" | "end";
|
|
240
|
+
}
|
|
241
|
+
|
|
220
242
|
declare interface BaseLinkProps extends BaseElementProps, Omit<React.HTMLAttributes<HTMLAnchorElement>, "content"> {
|
|
221
243
|
}
|
|
222
244
|
|
|
@@ -284,6 +306,8 @@ declare type BlockProviderInput = {
|
|
|
284
306
|
renderMode: IRenderMode;
|
|
285
307
|
workspace_id: string;
|
|
286
308
|
pageSource: IPage["source"];
|
|
309
|
+
localizedPages?: IPage["localized_pages"];
|
|
310
|
+
language?: IPage["language"];
|
|
287
311
|
};
|
|
288
312
|
|
|
289
313
|
export declare const BlockSourceModuleList: readonly ["collection", "event", "blog", "community", "context", "form", "blog_author", "blog_category", "blog_tag"];
|
|
@@ -361,6 +385,26 @@ export declare const BookingSummary: default_2.FC<IBookingSummaryProps>;
|
|
|
361
385
|
|
|
362
386
|
export declare const Box: WithBlockPropsComponent<BaseBoxProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
363
387
|
|
|
388
|
+
/**
|
|
389
|
+
* Builds the navigation target for switching to a sibling language.
|
|
390
|
+
*
|
|
391
|
+
* Static pages: the sibling's `live_url` is already concrete — return it as-is.
|
|
392
|
+
*
|
|
393
|
+
* Dynamic pages: `live_url` carries `{placeholder}` slugs (e.g.
|
|
394
|
+
* `https://x.com/fr-FR/industry/{industries}`). The current entry's `live_url`
|
|
395
|
+
* is the same template for the page being served, so aligning it segment-by-segment
|
|
396
|
+
* against the actual `currentPathname` recovers each slug's real value, which is
|
|
397
|
+
* then substituted into the target template.
|
|
398
|
+
*
|
|
399
|
+
* Falls back to the raw target `live_url` whenever alignment is not possible
|
|
400
|
+
* (no current template, unparseable URL, or mismatched segment counts).
|
|
401
|
+
*/
|
|
402
|
+
export declare const buildLocalizedHref: ({ current, target, currentPathname, }: {
|
|
403
|
+
current?: ILocalizedPage;
|
|
404
|
+
target: ILocalizedPage;
|
|
405
|
+
currentPathname: string;
|
|
406
|
+
}) => string;
|
|
407
|
+
|
|
364
408
|
/**
|
|
365
409
|
* Built-in background effect presets organized by category
|
|
366
410
|
*/
|
|
@@ -402,8 +446,6 @@ declare interface CarouselProps extends BaseElementProps {
|
|
|
402
446
|
*/
|
|
403
447
|
export declare const CategoryFilter: React.FC<ICategoryFilterProps>;
|
|
404
448
|
|
|
405
|
-
export declare const CollectionFormBuilder: default_2.FC<ICollectionFormBuilderProps>;
|
|
406
|
-
|
|
407
449
|
export declare const colorOptions: {
|
|
408
450
|
readonly brand: {
|
|
409
451
|
readonly label: "Brand";
|
|
@@ -543,6 +585,39 @@ export declare const DATA_ATTRIBUTES: {
|
|
|
543
585
|
readonly GROUP: "data-levo_group";
|
|
544
586
|
};
|
|
545
587
|
|
|
588
|
+
/**
|
|
589
|
+
* Display kind — what facet of the moment is shown.
|
|
590
|
+
* `date` and `time` are self-explanatory; `datetime` shows both;
|
|
591
|
+
* `relative` renders distance-from-now (e.g. "2 days ago").
|
|
592
|
+
*/
|
|
593
|
+
export declare const DATE_DISPLAYS: readonly ["date", "time", "datetime", "relative"];
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* Preset within a Display. Locked vocabulary so the picker is a finite list
|
|
597
|
+
* rather than a free-form format string.
|
|
598
|
+
*/
|
|
599
|
+
export declare const DATE_FORMATS: {
|
|
600
|
+
date: readonly ["full", "day", "month", "year", "day-month", "month-year"];
|
|
601
|
+
time: readonly ["clock"];
|
|
602
|
+
datetime: readonly ["full", "compact"];
|
|
603
|
+
relative: readonly ["auto"];
|
|
604
|
+
};
|
|
605
|
+
|
|
606
|
+
/** Hour cycle preference — Auto defers to the active locale's convention. */
|
|
607
|
+
export declare const DATE_HOUR12_VALUES: readonly ["auto", "12", "24"];
|
|
608
|
+
|
|
609
|
+
/** Curated locale list — Auto means "host default". */
|
|
610
|
+
export declare const DATE_LOCALES: {
|
|
611
|
+
value: string;
|
|
612
|
+
label: string;
|
|
613
|
+
}[];
|
|
614
|
+
|
|
615
|
+
/** Style — visual length of the rendering. S/M/L/XL map to Intl widths. */
|
|
616
|
+
export declare const DATE_STYLES: readonly ["S", "M", "L", "XL"];
|
|
617
|
+
|
|
618
|
+
/** Serialize a spec back to args; trims trailing defaults to keep tokens lean. */
|
|
619
|
+
export declare const dateSpecToArgs: (spec: IDateFormatSpec) => TVariableLiteral[];
|
|
620
|
+
|
|
546
621
|
declare type DeepConfig<T> = T extends Array<infer U> ? IFieldConfig & {
|
|
547
622
|
[index: number]: DeepConfig<U>;
|
|
548
623
|
} : T extends object ? IFieldConfig & {
|
|
@@ -561,6 +636,8 @@ declare type DeepStyles<T> = T extends Array<infer U> ? IStyles & {
|
|
|
561
636
|
[K in keyof T]: DeepStyles<T[K]>;
|
|
562
637
|
} : IStyles;
|
|
563
638
|
|
|
639
|
+
export declare const DEFAULT_DATE_SPEC: IDateFormatSpec;
|
|
640
|
+
|
|
564
641
|
/** Default "from" state for entry/scroll animations */
|
|
565
642
|
export declare const DEFAULT_FROM_STATE: AnimationProperties;
|
|
566
643
|
|
|
@@ -597,6 +674,9 @@ export declare interface EntryAnimationConfig {
|
|
|
597
674
|
viewport?: ViewportConfig;
|
|
598
675
|
}
|
|
599
676
|
|
|
677
|
+
/** Evaluate a parsed token against a flattened context dictionary. */
|
|
678
|
+
export declare const evaluateVariableToken: (parsed: IParsedVariableToken, context: Record<string, unknown>) => IEvaluatedVariable;
|
|
679
|
+
|
|
600
680
|
/**
|
|
601
681
|
* Extended props interface for useCommonProps return type
|
|
602
682
|
*/
|
|
@@ -629,6 +709,13 @@ export declare const fetchSource: ({ levoClient, source, workspace_id, slugs, pa
|
|
|
629
709
|
*/
|
|
630
710
|
export declare const findFieldSchema: (contentSchema: IStudioWidget[] | undefined, fieldKey: string | undefined) => IStudioWidget | undefined;
|
|
631
711
|
|
|
712
|
+
/**
|
|
713
|
+
* Flattens a hierarchical variable tree to a list of matches filtered by
|
|
714
|
+
* `query`. Recursively walks `items[*].children` so leaves at any depth
|
|
715
|
+
* surface in picker results. Empty/whitespace queries return every leaf.
|
|
716
|
+
*/
|
|
717
|
+
export declare const flattenVariableMatches: (groups: IVariableGroup[], query: string) => IFlatVariableMatch[];
|
|
718
|
+
|
|
632
719
|
export declare const Form: WithBlockPropsComponent<BaseElementProps & {
|
|
633
720
|
className?: string;
|
|
634
721
|
initialValues?: Record<string, any>;
|
|
@@ -807,6 +894,8 @@ export declare const getInitialPageContent: ({ levoClient, pageData, site, query
|
|
|
807
894
|
headCode: string;
|
|
808
895
|
}>;
|
|
809
896
|
|
|
897
|
+
export declare function getKeysWithValue(obj: Record<string, any>, maxDepth?: number): Record<string, any>;
|
|
898
|
+
|
|
810
899
|
/**
|
|
811
900
|
* Utility function to safely access nested object properties
|
|
812
901
|
*
|
|
@@ -1084,14 +1173,6 @@ export declare interface ICategoryFilterProps {
|
|
|
1084
1173
|
className?: string;
|
|
1085
1174
|
}
|
|
1086
1175
|
|
|
1087
|
-
declare interface ICollectionFormBuilderProps extends Omit<ILevoFormContext, "schema"> {
|
|
1088
|
-
formVariant?: FormVariantType;
|
|
1089
|
-
collection_id: string;
|
|
1090
|
-
hiddenFields?: string[];
|
|
1091
|
-
workspace_id?: string;
|
|
1092
|
-
account?: ILevoMembership.Account;
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
1176
|
declare interface ICollectionTheme {
|
|
1096
1177
|
form: {
|
|
1097
1178
|
maxWidth: string;
|
|
@@ -1160,6 +1241,15 @@ declare interface ICreateForumPostProps {
|
|
|
1160
1241
|
onPostCreated?: (post: IForumPost) => void;
|
|
1161
1242
|
}
|
|
1162
1243
|
|
|
1244
|
+
export declare interface IDateFormatSpec {
|
|
1245
|
+
display: TDateDisplay;
|
|
1246
|
+
format: string;
|
|
1247
|
+
style: TDateStyle;
|
|
1248
|
+
locale: string;
|
|
1249
|
+
/** Only relevant for `time` / `datetime` displays — ignored elsewhere. */
|
|
1250
|
+
hour12: TDateHour12;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1163
1253
|
declare interface IDevToolsPreviewProps {
|
|
1164
1254
|
blockInstance: IBlockInstance;
|
|
1165
1255
|
blocks: Record<string, BlockComponent>;
|
|
@@ -1175,6 +1265,13 @@ export declare interface IDevToolsProps {
|
|
|
1175
1265
|
|
|
1176
1266
|
export declare type IElementStyle = Record<string, any>;
|
|
1177
1267
|
|
|
1268
|
+
export declare interface IEvaluatedVariable {
|
|
1269
|
+
output: string;
|
|
1270
|
+
rawValue: unknown;
|
|
1271
|
+
pathExists: boolean;
|
|
1272
|
+
conditionFailed: boolean;
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1178
1275
|
export declare interface IFieldConfig {
|
|
1179
1276
|
selectedVariants?: Record<string, string>;
|
|
1180
1277
|
enabled?: boolean;
|
|
@@ -1267,6 +1364,14 @@ export declare interface IFieldConfig {
|
|
|
1267
1364
|
theme?: DeepPartial<ITheme_2 & IRteTheme & ICollectionTheme>;
|
|
1268
1365
|
}
|
|
1269
1366
|
|
|
1367
|
+
export declare interface IFlatVariableMatch {
|
|
1368
|
+
group: string;
|
|
1369
|
+
/** Parent trail for nested values (e.g. Collection field with nested keys),
|
|
1370
|
+
* joined with " › ". Undefined for top-level leaves. */
|
|
1371
|
+
parent?: string;
|
|
1372
|
+
item: IVariableItem;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1270
1375
|
/**
|
|
1271
1376
|
* Forum context
|
|
1272
1377
|
*/
|
|
@@ -1400,7 +1505,15 @@ declare interface ILevoFormContext {
|
|
|
1400
1505
|
cssReset?: boolean;
|
|
1401
1506
|
};
|
|
1402
1507
|
isLoggedIn?: boolean;
|
|
1403
|
-
|
|
1508
|
+
/**
|
|
1509
|
+
* Logged-in member's contact details, used only to prefill the schema's designated
|
|
1510
|
+
* email_field/mobile_field. Strictly the fields consumed — pass anything else via
|
|
1511
|
+
* externalInitialValues.
|
|
1512
|
+
*/
|
|
1513
|
+
account?: {
|
|
1514
|
+
email?: string | null;
|
|
1515
|
+
mobile?: string | null;
|
|
1516
|
+
};
|
|
1404
1517
|
externalInitialValues?: Record<string, any>;
|
|
1405
1518
|
onSuccess?: (v: {
|
|
1406
1519
|
schemaId: string;
|
|
@@ -1429,7 +1542,7 @@ declare interface ILevoFormContext {
|
|
|
1429
1542
|
preview?: boolean;
|
|
1430
1543
|
}
|
|
1431
1544
|
|
|
1432
|
-
export declare type ILevoPageData = Pick<IPageExpanded, "id" | "workspace_id" | "blocks" | "source" | "title" | "description" | "access" | "style_config" | "settings">;
|
|
1545
|
+
export declare type ILevoPageData = Pick<IPageExpanded, "id" | "workspace_id" | "blocks" | "source" | "title" | "description" | "access" | "style_config" | "settings" | "language" | "localized_pages">;
|
|
1433
1546
|
|
|
1434
1547
|
export declare interface ILevoPageProps {
|
|
1435
1548
|
pageData: ILevoPageData;
|
|
@@ -1443,9 +1556,31 @@ export declare interface ILevoPageProps {
|
|
|
1443
1556
|
disableBranding?: boolean;
|
|
1444
1557
|
}
|
|
1445
1558
|
|
|
1559
|
+
/**
|
|
1560
|
+
* A sibling language variant of a page.
|
|
1561
|
+
*
|
|
1562
|
+
* Two backends populate this shape:
|
|
1563
|
+
* - The studio runtime (`get-page-from-path`) sets `language_label`, `live_url`,
|
|
1564
|
+
* and `is_current` — used by the published-site language switcher.
|
|
1565
|
+
* - The dashboard editor's page-data response sets `title`, `status`, `countries`,
|
|
1566
|
+
* `url` — used by the locale/country pickers.
|
|
1567
|
+
*
|
|
1568
|
+
* Only `id` and `language` are guaranteed on both; the rest are source-specific.
|
|
1569
|
+
*/
|
|
1446
1570
|
export declare interface ILocalizedPage {
|
|
1447
1571
|
id: string;
|
|
1448
1572
|
language: string;
|
|
1573
|
+
/** Human-readable language label, e.g. "French (France)". Runtime response only. */
|
|
1574
|
+
language_label?: string;
|
|
1575
|
+
/**
|
|
1576
|
+
* Fully-localized URL for this sibling. Default language is unprefixed, others
|
|
1577
|
+
* are language-prefixed. Dynamic pages keep `{placeholder}` slugs to substitute
|
|
1578
|
+
* client-side. Runtime response only.
|
|
1579
|
+
*/
|
|
1580
|
+
live_url?: string;
|
|
1581
|
+
/** True for the page currently being served; always the first entry. Runtime response only. */
|
|
1582
|
+
is_current?: boolean;
|
|
1583
|
+
/** Editor response only — guaranteed there; absent on runtime entries (not read by the runtime). */
|
|
1449
1584
|
title: string;
|
|
1450
1585
|
status?: "published" | "draft";
|
|
1451
1586
|
countries?: string[];
|
|
@@ -1551,7 +1686,7 @@ export declare interface IPage {
|
|
|
1551
1686
|
published_at: string | null;
|
|
1552
1687
|
}
|
|
1553
1688
|
|
|
1554
|
-
export declare type IPageAccess = (IPageAccessGating | IPageAccessAuthentication) & {
|
|
1689
|
+
export declare type IPageAccess = (IPageAccessGating | IPageAccessAuthentication | IPageAccessProfile) & {
|
|
1555
1690
|
enabled: boolean;
|
|
1556
1691
|
};
|
|
1557
1692
|
|
|
@@ -1577,9 +1712,9 @@ export declare interface IPageAccessAuthenticationOptions {
|
|
|
1577
1712
|
|
|
1578
1713
|
export declare interface IPageAccessCheck {
|
|
1579
1714
|
has_access: boolean;
|
|
1580
|
-
code?: IPageAccessAuthenticationCodes | IPageAccessGatingCodes;
|
|
1715
|
+
code?: IPageAccessAuthenticationCodes | IPageAccessGatingCodes | IPageAccessProfileCodes;
|
|
1581
1716
|
message: string;
|
|
1582
|
-
options?: Pick<IPageAccessGatingOptions, "collection" | "field" | "content"> | IPageAccessAuthenticationOptions;
|
|
1717
|
+
options?: Pick<IPageAccessGatingOptions, "collection" | "field" | "content"> | Pick<IPageAccessProfileOptions, "hidden" | "content"> | IPageAccessAuthenticationOptions;
|
|
1583
1718
|
}
|
|
1584
1719
|
|
|
1585
1720
|
export declare type IPageAccessGating = {
|
|
@@ -1617,6 +1752,41 @@ export declare interface IPageAccessGatingOptions {
|
|
|
1617
1752
|
};
|
|
1618
1753
|
}
|
|
1619
1754
|
|
|
1755
|
+
export declare type IPageAccessProfile = {
|
|
1756
|
+
kind: "profile";
|
|
1757
|
+
options: IPageAccessProfileOptions;
|
|
1758
|
+
};
|
|
1759
|
+
|
|
1760
|
+
export declare type IPageAccessProfileCodes =
|
|
1761
|
+
/**
|
|
1762
|
+
* if the visitor is not logged in
|
|
1763
|
+
*/
|
|
1764
|
+
"profile.NOT_LOGGED_IN"
|
|
1765
|
+
/**
|
|
1766
|
+
* logged in, but the account does not pass `options.condition` — render the
|
|
1767
|
+
* profile-completion form. An empty condition means "no rule" → always SUCCESS.
|
|
1768
|
+
* Named to mirror gating's ENTRY_CONDITION_NOT_FULFILLED — the criteria can fail on
|
|
1769
|
+
* a filled field that simply doesn't match, so "incomplete" would be misleading.
|
|
1770
|
+
*/
|
|
1771
|
+
| "profile.CONDITION_NOT_FULFILLED" | "profile.SUCCESS";
|
|
1772
|
+
|
|
1773
|
+
/**
|
|
1774
|
+
* Profile gating is *account access*: login + the logged-in account must satisfy
|
|
1775
|
+
* `condition`. It is a sibling of `authentication`, not of `gating` — there is no
|
|
1776
|
+
* collection in the contract. The BE owns the membership account internally; the
|
|
1777
|
+
* runtime ProfileCard loads the account schema by its known key.
|
|
1778
|
+
*/
|
|
1779
|
+
export declare interface IPageAccessProfileOptions {
|
|
1780
|
+
/** "Profile is completed when" — evaluated against the caller's own account. */
|
|
1781
|
+
condition?: LevoQuery.Where;
|
|
1782
|
+
/** Account fields to hide in the profile-completion form. */
|
|
1783
|
+
hidden?: string[];
|
|
1784
|
+
content?: {
|
|
1785
|
+
/** Message shown above the profile-completion form. */
|
|
1786
|
+
entryNotFound?: string;
|
|
1787
|
+
};
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1620
1790
|
export declare type IPageContext = Record<string, unknown>;
|
|
1621
1791
|
|
|
1622
1792
|
export declare interface IPageDataContext {
|
|
@@ -1676,6 +1846,11 @@ export declare interface IPageStatMetric {
|
|
|
1676
1846
|
change: number | null;
|
|
1677
1847
|
}
|
|
1678
1848
|
|
|
1849
|
+
export declare interface IParsedVariableToken {
|
|
1850
|
+
path: string;
|
|
1851
|
+
transforms: IVariableTransform[];
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1679
1854
|
declare interface IPendingRequestStateProps {
|
|
1680
1855
|
communityName?: string;
|
|
1681
1856
|
className?: string;
|
|
@@ -1717,6 +1892,15 @@ declare type IPreviewDevice = "desktop" | "tablet" | "mobile";
|
|
|
1717
1892
|
*/
|
|
1718
1893
|
export declare type IRenderMode = "live" | "studio.page" | "studio.block";
|
|
1719
1894
|
|
|
1895
|
+
/**
|
|
1896
|
+
* Per-content responsive override. Lives on the studio content value (not on
|
|
1897
|
+
* the shared IMediaObject) so the core type stays untouched.
|
|
1898
|
+
*/
|
|
1899
|
+
declare interface IResponsiveImageContent {
|
|
1900
|
+
mobile?: IMediaObject;
|
|
1901
|
+
tablet?: IMediaObject;
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1720
1904
|
declare interface IRteTheme {
|
|
1721
1905
|
baseSpacing: string;
|
|
1722
1906
|
/** Background color for text selection and highlighted nodes. */
|
|
@@ -1790,6 +1974,10 @@ export declare interface ISite {
|
|
|
1790
1974
|
twitter?: string;
|
|
1791
1975
|
linkedin?: string;
|
|
1792
1976
|
instagram?: string;
|
|
1977
|
+
youtube?: string;
|
|
1978
|
+
tiktok?: string;
|
|
1979
|
+
pinterest?: string;
|
|
1980
|
+
threads?: string;
|
|
1793
1981
|
};
|
|
1794
1982
|
[key: string]: any;
|
|
1795
1983
|
};
|
|
@@ -2092,6 +2280,11 @@ export declare type IThemeFonts = {
|
|
|
2092
2280
|
customFonts?: Record<string, string>;
|
|
2093
2281
|
};
|
|
2094
2282
|
|
|
2283
|
+
declare interface ITransformDef {
|
|
2284
|
+
label: string;
|
|
2285
|
+
apply: (value: unknown, args: TVariableLiteral[]) => unknown;
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2095
2288
|
declare interface IUseDotButtonType {
|
|
2096
2289
|
selectedIndex: number;
|
|
2097
2290
|
scrollSnaps: number[];
|
|
@@ -2137,6 +2330,27 @@ export declare interface IUseStripePaymentReturn {
|
|
|
2137
2330
|
onComplete: (() => void) | null;
|
|
2138
2331
|
}
|
|
2139
2332
|
|
|
2333
|
+
export declare interface IVariableGroup {
|
|
2334
|
+
name: string;
|
|
2335
|
+
items: IVariableItem[];
|
|
2336
|
+
}
|
|
2337
|
+
|
|
2338
|
+
export declare interface IVariableItem {
|
|
2339
|
+
/** Display label */
|
|
2340
|
+
label: string;
|
|
2341
|
+
/** Token inserted into the editor (e.g. `context.collection.title`) */
|
|
2342
|
+
value: string;
|
|
2343
|
+
/** Optional muted preview shown under the label */
|
|
2344
|
+
preview?: string;
|
|
2345
|
+
/** Sub-fields for composite values — renders as a nested group */
|
|
2346
|
+
children?: IVariableItem[];
|
|
2347
|
+
}
|
|
2348
|
+
|
|
2349
|
+
export declare interface IVariableTransform {
|
|
2350
|
+
name: string;
|
|
2351
|
+
args: TVariableLiteral[];
|
|
2352
|
+
}
|
|
2353
|
+
|
|
2140
2354
|
/**
|
|
2141
2355
|
* Configuration for a single variant group within a component theme
|
|
2142
2356
|
*
|
|
@@ -2176,6 +2390,8 @@ export declare function KbdGroup({ className, ...props }: React.ComponentProps<"
|
|
|
2176
2390
|
|
|
2177
2391
|
export declare const KindList: readonly ["element", "group"];
|
|
2178
2392
|
|
|
2393
|
+
export declare const LanguageSwitcher: WithBlockPropsComponent<BaseLanguageSwitcherProps>;
|
|
2394
|
+
|
|
2179
2395
|
/**
|
|
2180
2396
|
* Provides LazyMotion context with domAnimation features for reduced bundle size.
|
|
2181
2397
|
*
|
|
@@ -2184,7 +2400,7 @@ export declare const KindList: readonly ["element", "group"];
|
|
|
2184
2400
|
*/
|
|
2185
2401
|
export declare const LazyMotionProvider: React.FC<ILazyMotionProviderProps>;
|
|
2186
2402
|
|
|
2187
|
-
export declare const LevoBlock: default_2.MemoExoticComponent<({ html_id, renderMode, blocks, parsedBlockData, blockData, pageContext, pageMeta, blockContext, workspace_id, pageSource, }: LevoBlockProps) => JSX.Element>;
|
|
2403
|
+
export declare const LevoBlock: default_2.MemoExoticComponent<({ html_id, renderMode, blocks, parsedBlockData, blockData, pageContext, pageMeta, blockContext, workspace_id, pageSource, localizedPages, language, }: LevoBlockProps) => JSX.Element>;
|
|
2188
2404
|
|
|
2189
2405
|
declare interface LevoBlockProps {
|
|
2190
2406
|
html_id?: string;
|
|
@@ -2197,6 +2413,8 @@ declare interface LevoBlockProps {
|
|
|
2197
2413
|
pageMeta?: TPageMeta;
|
|
2198
2414
|
blockContext?: IPageDataContext["blocks"][number];
|
|
2199
2415
|
pageSource?: IPage["source"];
|
|
2416
|
+
localizedPages?: IPage["localized_pages"];
|
|
2417
|
+
language?: IPage["language"];
|
|
2200
2418
|
}
|
|
2201
2419
|
|
|
2202
2420
|
export declare const LevoPage: default_2.FC<ILevoPageProps>;
|
|
@@ -2221,7 +2439,10 @@ declare type MediaContent = {
|
|
|
2221
2439
|
srcset?: {
|
|
2222
2440
|
path: string;
|
|
2223
2441
|
};
|
|
2224
|
-
|
|
2442
|
+
responsive?: IResponsiveImageContent;
|
|
2443
|
+
} | (IMedia & {
|
|
2444
|
+
responsive?: IResponsiveImageContent;
|
|
2445
|
+
});
|
|
2225
2446
|
|
|
2226
2447
|
declare type MediaContent_2 = {
|
|
2227
2448
|
location: string;
|
|
@@ -2229,7 +2450,10 @@ declare type MediaContent_2 = {
|
|
|
2229
2450
|
path: string;
|
|
2230
2451
|
};
|
|
2231
2452
|
type?: string;
|
|
2232
|
-
|
|
2453
|
+
responsive?: IResponsiveImageContent;
|
|
2454
|
+
} | (IMedia & {
|
|
2455
|
+
responsive?: IResponsiveImageContent;
|
|
2456
|
+
});
|
|
2233
2457
|
|
|
2234
2458
|
export declare type MediaHint = {
|
|
2235
2459
|
orientation?: "landscape" | "portrait" | "square";
|
|
@@ -2244,6 +2468,10 @@ export declare const MESSAGE_TYPES: {
|
|
|
2244
2468
|
readonly PREVIEW_MOUSE_LEAVE: "PREVIEW_MOUSE_LEAVE";
|
|
2245
2469
|
readonly PREVIEW_UNDO: "PREVIEW_UNDO";
|
|
2246
2470
|
readonly PREVIEW_REDO: "PREVIEW_REDO";
|
|
2471
|
+
readonly PREVIEW_MOVE_BLOCK: "PREVIEW_MOVE_BLOCK";
|
|
2472
|
+
readonly PREVIEW_DELETE_BLOCK: "PREVIEW_DELETE_BLOCK";
|
|
2473
|
+
readonly PREVIEW_DUPLICATE_BLOCK: "PREVIEW_DUPLICATE_BLOCK";
|
|
2474
|
+
readonly PREVIEW_OPEN_BLOCK_PANEL: "PREVIEW_OPEN_BLOCK_PANEL";
|
|
2247
2475
|
readonly STUDIO_SELECT: "STUDIO_SELECT";
|
|
2248
2476
|
readonly STUDIO_HOVER: "STUDIO_HOVER";
|
|
2249
2477
|
readonly STUDIO_AUTH_OVERRIDE: "STUDIO_AUTH_OVERRIDE";
|
|
@@ -2307,6 +2535,9 @@ export declare const oklchToRGBA: (oklchColor: OKLCHColor) => string;
|
|
|
2307
2535
|
*/
|
|
2308
2536
|
export declare const oklchToString: (oklchColor: OKLCHColor | string | undefined) => string;
|
|
2309
2537
|
|
|
2538
|
+
/** Read a structured spec out of pipe-syntax args, falling back to defaults. */
|
|
2539
|
+
export declare const parseDateSpec: (args: TVariableLiteral[]) => IDateFormatSpec | null;
|
|
2540
|
+
|
|
2310
2541
|
/**
|
|
2311
2542
|
* Parse element key to detect repeatable group context
|
|
2312
2543
|
*
|
|
@@ -2352,6 +2583,9 @@ export declare const parseVariablesFromResolvedSource: ({ levoClient, block, res
|
|
|
2352
2583
|
draft?: boolean;
|
|
2353
2584
|
}) => Promise<[IBlockInstance, Record<string, IResponseMultiple<Record<string, unknown>>>]>;
|
|
2354
2585
|
|
|
2586
|
+
/** Parse the inner expression of a `{...}` token into a path + transforms. */
|
|
2587
|
+
export declare const parseVariableToken: (raw: string) => IParsedVariableToken;
|
|
2588
|
+
|
|
2355
2589
|
/** Error code returned when account exists but is pending admin approval */
|
|
2356
2590
|
export declare const PENDING_APPROVAL_ERROR_CODE = "membership.account.ACCOUNT_PENDING_APPROVAL";
|
|
2357
2591
|
|
|
@@ -2679,6 +2913,14 @@ export declare const SimpleTooltipWrapper: React_2.FC<{
|
|
|
2679
2913
|
|
|
2680
2914
|
export declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): JSX.Element;
|
|
2681
2915
|
|
|
2916
|
+
/**
|
|
2917
|
+
* Snap a style to the nearest valid option for the current (display, format).
|
|
2918
|
+
* Used when the user changes display/format and the previously-chosen style
|
|
2919
|
+
* is no longer offered — picks the available style with the smallest index
|
|
2920
|
+
* distance in the canonical S→M→L→XL order.
|
|
2921
|
+
*/
|
|
2922
|
+
export declare const snapDateStyle: (style: TDateStyle, available: readonly TDateStyle[]) => TDateStyle;
|
|
2923
|
+
|
|
2682
2924
|
export declare interface SourceFetchOptions {
|
|
2683
2925
|
levoClient: ILevoClient;
|
|
2684
2926
|
source: IStudioSource;
|
|
@@ -2739,6 +2981,15 @@ export declare const StudioWidgetList: readonly ["BoxWidget", "ButtonWidget", "L
|
|
|
2739
2981
|
|
|
2740
2982
|
export declare const StudioWidgetMap: Record<"BoxWidget" | "ButtonWidget" | "LayoutWidget" | "HeadingWidget" | "IframeWidget" | "ImageWidget" | "IconWidget" | "MediaWidget" | "TypographyWidget" | "BlogContentWidget" | "CarouselWidget" | "FormWidget" | "ContainerWidget" | "UserMenuWidget" | "TabsListWidget" | "TabsTriggerWidget" | "TabsContentWidget" | "NavMenuWidget" | "CardWidget" | "TitleWidget" | "TextWidget" | "NumberWidget" | "URLWidget" | "ImageUploadWidget" | "MultiImageUploadWidget" | "TextareaWidget" | "RichTextWidget" | "DropdownWidget" | "SwitchWidget" | "DateWidget" | "ArrayWidget" | "RecordWidget", "BoxWidget" | "ButtonWidget" | "LayoutWidget" | "HeadingWidget" | "IframeWidget" | "ImageWidget" | "IconWidget" | "MediaWidget" | "TypographyWidget" | "BlogContentWidget" | "CarouselWidget" | "FormWidget" | "ContainerWidget" | "UserMenuWidget" | "TabsListWidget" | "TabsTriggerWidget" | "TabsContentWidget" | "NavMenuWidget" | "CardWidget" | "TitleWidget" | "TextWidget" | "NumberWidget" | "URLWidget" | "ImageUploadWidget" | "MultiImageUploadWidget" | "TextareaWidget" | "RichTextWidget" | "DropdownWidget" | "SwitchWidget" | "DateWidget" | "ArrayWidget" | "RecordWidget">;
|
|
2741
2983
|
|
|
2984
|
+
/**
|
|
2985
|
+
* Distinct Style values for a given (display, format). The four-step S/M/L/XL
|
|
2986
|
+
* vocabulary doesn't map cleanly to every Intl rendering — e.g. for `time`
|
|
2987
|
+
* S and M both produce "1:30 PM", and for `date / year` everything past S
|
|
2988
|
+
* just prints "2026". Exposing only the values that yield different output
|
|
2989
|
+
* keeps the toggle honest.
|
|
2990
|
+
*/
|
|
2991
|
+
export declare const stylesFor: (display: TDateDisplay, format: string) => readonly TDateStyle[];
|
|
2992
|
+
|
|
2742
2993
|
export declare const TabsContent: WithBlockPropsComponent<BaseTabsContentProps>;
|
|
2743
2994
|
|
|
2744
2995
|
export declare const TabsList: WithBlockPropsComponent<BaseTabsListProps>;
|
|
@@ -2747,6 +2998,14 @@ export declare const TabsRoot: React_2.ForwardRefExoticComponent<Tabs.TabsProps
|
|
|
2747
2998
|
|
|
2748
2999
|
export declare const TabsTrigger: WithBlockPropsComponent<BaseTabsTriggerProps>;
|
|
2749
3000
|
|
|
3001
|
+
export declare type TDateDisplay = (typeof DATE_DISPLAYS)[number];
|
|
3002
|
+
|
|
3003
|
+
export declare type TDateFormat<D extends TDateDisplay = TDateDisplay> = (typeof DATE_FORMATS)[D][number];
|
|
3004
|
+
|
|
3005
|
+
export declare type TDateHour12 = (typeof DATE_HOUR12_VALUES)[number];
|
|
3006
|
+
|
|
3007
|
+
export declare type TDateStyle = (typeof DATE_STYLES)[number];
|
|
3008
|
+
|
|
2750
3009
|
export declare const Tooltip: React_2.FC<Tooltip_2.TooltipProps>;
|
|
2751
3010
|
|
|
2752
3011
|
export declare const TooltipContent: React_2.ForwardRefExoticComponent<Omit<Tooltip_2.TooltipContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -2771,6 +3030,23 @@ export declare interface TransitionConfig {
|
|
|
2771
3030
|
bounce?: number;
|
|
2772
3031
|
}
|
|
2773
3032
|
|
|
3033
|
+
/**
|
|
3034
|
+
* Variable expression engine — parses and evaluates pipe-syntax tokens.
|
|
3035
|
+
*
|
|
3036
|
+
* Syntax: {path | transform:arg1:arg2 | transform:arg | …}
|
|
3037
|
+
* Examples: {user.name}
|
|
3038
|
+
* {user.name | default:"Guest" | upper | prefix:"Hi "}
|
|
3039
|
+
* {order.total | currency:INR}
|
|
3040
|
+
* {event.starts_at | date:date:day-month:L:auto}
|
|
3041
|
+
* {order.status | if:eq:"paid" | text:"Paid ✓"}
|
|
3042
|
+
*
|
|
3043
|
+
* Source of truth for the parser, transforms and date formatting. The
|
|
3044
|
+
* runtime renderer (`@levo-so/studio`) substitutes `{path}` tokens at page
|
|
3045
|
+
* render time; the dashboard's editor wires the same engine into a TipTap
|
|
3046
|
+
* NodeView so authoring and runtime stay in lockstep.
|
|
3047
|
+
*/
|
|
3048
|
+
export declare type TVariableLiteral = string | number | boolean | null;
|
|
3049
|
+
|
|
2774
3050
|
/** Available easing functions for tween transitions */
|
|
2775
3051
|
export declare type TweenEase = "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate";
|
|
2776
3052
|
|
|
@@ -2844,6 +3120,11 @@ export declare const useForumContext: () => IForumContext;
|
|
|
2844
3120
|
*/
|
|
2845
3121
|
export declare const useGeneratedClassName: (elementKey: string, blockId: string, configValue: IFieldConfig | undefined) => string;
|
|
2846
3122
|
|
|
3123
|
+
export declare const useLocalizedPages: () => {
|
|
3124
|
+
localizedPages: ILocalizedPage[];
|
|
3125
|
+
currentLanguage: string | undefined;
|
|
3126
|
+
};
|
|
3127
|
+
|
|
2847
3128
|
/**
|
|
2848
3129
|
* Pure API operations hook for authentication
|
|
2849
3130
|
* All form state management moved to components with Formik
|
|
@@ -2863,6 +3144,19 @@ export declare const UserMenu: WithBlockPropsComponent<BaseUserMenuProps>;
|
|
|
2863
3144
|
*/
|
|
2864
3145
|
export declare const useStripePayment: () => IUseStripePaymentReturn;
|
|
2865
3146
|
|
|
3147
|
+
/** Single-token regex — matches a string that is ONLY a `{...}` token. */
|
|
3148
|
+
export declare const VARIABLE_SINGLE_TOKEN_REGEX: RegExp;
|
|
3149
|
+
|
|
3150
|
+
/** Token-matching regex — matches `{anything-not-a-brace}`. Nested braces
|
|
3151
|
+
* are not supported: avoiding them prevents adjacent-pill corruption when
|
|
3152
|
+
* the user types `{` next to a variable pill. */
|
|
3153
|
+
export declare const VARIABLE_TOKEN_REGEX: RegExp;
|
|
3154
|
+
|
|
3155
|
+
export declare const VARIABLE_TRANSFORMS: Record<string, ITransformDef>;
|
|
3156
|
+
|
|
3157
|
+
/** Serialize a parsed token back to pipe syntax (without the wrapping `{}`). */
|
|
3158
|
+
export declare const variableTokenToString: (t: IParsedVariableToken) => string;
|
|
3159
|
+
|
|
2866
3160
|
/** Viewport trigger configuration for entry animations */
|
|
2867
3161
|
export declare interface ViewportConfig {
|
|
2868
3162
|
once?: boolean;
|