@levo-so/studio 0.1.90 → 0.1.92

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 (29) hide show
  1. package/{BillingStep-DVKPpBT9.js → BillingStep-o2yIMjLk.js} +1 -1
  2. package/{Button-vQpIKPk7.js → Button-_hpg7Rxx.js} +6 -6
  3. package/{EntryCard-UWxVYAD_.js → EntryCard-B-feJvrB.js} +13 -13
  4. package/{LoginCard-BKq_s4ZT.js → LoginCard-CF9JbU-y.js} +3 -3
  5. package/{LoginForm-54dtpOlx.js → LoginForm-CdpNCQJa.js} +10 -10
  6. package/{LoginModal-DTSAYZLC.js → LoginModal-ngTHCyli.js} +4 -4
  7. package/{MessageCard-YUS-pnpe.js → MessageCard-D2uja800.js} +2 -2
  8. package/{MessageFooter-DrJ6jZ_n.js → MessageFooter-Bu-jyPkJ.js} +1 -1
  9. package/{ModalManager-DLxbnq-i.js → ModalManager-B7pCzvK1.js} +1 -1
  10. package/{PendingApprovalCard-BnteoK24.js → PendingApprovalCard-Dut-Xiw1.js} +20 -20
  11. package/{bookingCard-CPYdqA8t.js → bookingCard-CGV9svhn.js} +4 -4
  12. package/collection.d.ts +360 -0
  13. package/collection.js +28 -0
  14. package/dist-DDKHTnIW.js +3653 -0
  15. package/index.d.ts +101 -2
  16. package/index.js +1419 -1453
  17. package/package.json +14 -3
  18. package/studio.css +1 -1
  19. package/utils-KqbqLlMF.js +5 -0
  20. package/widgets-B84lq4lO.js +351 -0
  21. /package/{AuthProvider-Ch5Ny0il.js → AuthProvider-56TywIOB.js} +0 -0
  22. /package/{Beams-BqUps11n.js → Beams-CCNNOvfW.js} +0 -0
  23. /package/{Dots-BKqlE-Rv.js → Dots-89WGkd-z.js} +0 -0
  24. /package/{Gradient-hC5P0PfD.js → Gradient-vTa_uWCj.js} +0 -0
  25. /package/{Grid-DqZKCasl.js → Grid-CrtztrxK.js} +0 -0
  26. /package/{StripePaymentModal-Kk0GUsIU.js → StripePaymentModal-CajqohNM.js} +0 -0
  27. /package/{Waves-CzQRk01F.js → Waves-BhA6CLEI.js} +0 -0
  28. /package/{card-oIl95-_C.js → card-DCbhJCO9.js} +0 -0
  29. /package/{dialog-BRgfpVtv.js → dialog-CILIXExr.js} +0 -0
package/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { Accordion } from 'radix-ui';
2
2
  import { Avatar as Avatar_2 } from 'radix-ui';
3
+ import { CommonFieldInterfacesList } from '@levo-so/core';
3
4
  import { ComponentType } from 'react';
4
5
  import { DayPicker } from 'react-day-picker';
5
6
  import { default as default_2 } from 'react';
6
7
  import { default as default_3 } from 'embla-carousel-react';
7
- import { FormVariantType } from '@levo-so/react-collection';
8
8
  import { ForwardRefExoticComponent } from 'react';
9
9
  import { IComment } from '@levo-so/core';
10
10
  import { IContactInfo } from '@levo-so/core';
@@ -14,8 +14,8 @@ import { IForum } from '@levo-so/core';
14
14
  import { IForumJoinRequest } from '@levo-so/core';
15
15
  import { IForumPost } from '@levo-so/core';
16
16
  import { ILemaCollection } from '@levo-so/core';
17
+ import { ILemaField } from '@levo-so/core';
17
18
  import { ILevoClient } from '@levo-so/core';
18
- import { ILevoFormContext } from '@levo-so/react-collection';
19
19
  import { ILevoMembership } from '@levo-so/core';
20
20
  import { IMedia } from '@levo-so/core';
21
21
  import { IMediaObject } from '@levo-so/core';
@@ -621,6 +621,26 @@ export declare const FormInput: React_2.ForwardRefExoticComponent<IInputProps &
621
621
 
622
622
  export declare const FormTextarea: React_2.ForwardRefExoticComponent<ITextareaProps & React_2.RefAttributes<HTMLTextAreaElement>>;
623
623
 
624
+ declare const FormVariantOptions: readonly [{
625
+ readonly value: "default";
626
+ readonly label: "Classic";
627
+ readonly description: "All fields displayed together in a single view";
628
+ }, {
629
+ readonly value: "steps";
630
+ readonly label: "Multi-Step";
631
+ readonly description: "Each section becomes a step — navigate with next/previous buttons";
632
+ }, {
633
+ readonly value: "single-field";
634
+ readonly label: "One at a Time";
635
+ readonly description: "Typeform-style — one field per screen with smooth transitions";
636
+ }, {
637
+ readonly value: "steps-2";
638
+ readonly label: "Conversational Steps";
639
+ readonly description: "Multi-step with typeform-style field presentation";
640
+ }];
641
+
642
+ declare type FormVariantType = (typeof FormVariantOptions)[number]["value"];
643
+
624
644
  export declare const ForumPost: default_2.FC<{
625
645
  post: IForumPost;
626
646
  postDetailPageURLPattern?: string | null;
@@ -1039,6 +1059,14 @@ declare interface ICommentsRestrictionOverlayProps {
1039
1059
  className?: string;
1040
1060
  }
1041
1061
 
1062
+ declare interface ICommonRendererProps {
1063
+ schema: ILemaCollection | null;
1064
+ field: ILemaField;
1065
+ settings?: {
1066
+ enableVerification?: boolean;
1067
+ };
1068
+ }
1069
+
1042
1070
  /**
1043
1071
  * Complete theme configuration for a single component type
1044
1072
  *
@@ -1089,7 +1117,17 @@ export declare interface IFieldConfig {
1089
1117
  schema?: ILemaCollection;
1090
1118
  hidden_fields?: string[];
1091
1119
  form_variant?: FormVariantType;
1120
+ /** @deprecated Use `success.action.value` with type "redirect" instead. Kept for backward compat. */
1092
1121
  redirect_url?: string;
1122
+ success?: {
1123
+ title?: string;
1124
+ message?: string;
1125
+ action?: {
1126
+ type: "none" | "submit_another" | "redirect";
1127
+ /** URL for redirect action type. */
1128
+ value?: string;
1129
+ };
1130
+ };
1093
1131
  };
1094
1132
  filters?: {
1095
1133
  schema?: ILemaCollection;
@@ -1251,6 +1289,60 @@ export declare interface ILevoBlockProps<ContentType = Record<string, any>> exte
1251
1289
  source: IStudioSource[];
1252
1290
  }
1253
1291
 
1292
+ declare interface ILevoFormContext {
1293
+ schema: ILemaCollection | null;
1294
+ isDisabled?: boolean;
1295
+ containerStyles?: string;
1296
+ submitButtonConfig: {
1297
+ text?: string;
1298
+ show?: boolean;
1299
+ styles?: string;
1300
+ };
1301
+ uiConfig?: {
1302
+ hideSectionHeadings?: boolean;
1303
+ hideFormHeading?: boolean;
1304
+ };
1305
+ toastConfig?: {
1306
+ showSuccessToast?: boolean;
1307
+ successToastText?: string;
1308
+ suppressOnBooking?: boolean;
1309
+ };
1310
+ onError?: (v: any) => void;
1311
+ disableCaptcha?: boolean;
1312
+ enableVerification?: boolean;
1313
+ theme?: {
1314
+ className?: string;
1315
+ style?: React.CSSProperties;
1316
+ cssReset?: boolean;
1317
+ };
1318
+ isLoggedIn?: boolean;
1319
+ account?: ILevoMembership.Account;
1320
+ externalInitialValues?: Record<string, any>;
1321
+ onSuccess?: (v: {
1322
+ schemaId: string;
1323
+ response: any;
1324
+ meta?: any;
1325
+ }) => void;
1326
+ onFormView?: (v: {
1327
+ schemaId: string;
1328
+ }) => void;
1329
+ onFormDirty?: (v: {
1330
+ schemaId: string;
1331
+ }) => void;
1332
+ widgets?: Partial<IWidgetRegistry>;
1333
+ /** Success screen config from props. Priority: this > schema.settings.success_message > defaults. */
1334
+ successConfig?: {
1335
+ title?: string;
1336
+ message?: string;
1337
+ action?: {
1338
+ type: "none" | "submit_another" | "redirect";
1339
+ /** URL for redirect action type. */
1340
+ value?: string;
1341
+ };
1342
+ };
1343
+ debug?: boolean;
1344
+ }
1345
+
1254
1346
  export declare type ILevoPageData = Pick<IPageExpanded, "id" | "workspace_id" | "blocks" | "source" | "title" | "description" | "access" | "style_config">;
1255
1347
 
1256
1348
  export declare interface ILevoPageProps {
@@ -1328,6 +1420,7 @@ export declare interface IPage {
1328
1420
  parent_id?: string;
1329
1421
  language?: string;
1330
1422
  is_generating?: boolean;
1423
+ generation_cancelled?: boolean;
1331
1424
  localized_pages?: ILocalizedPage[];
1332
1425
  style_config?: ISiteStyleConfig | null;
1333
1426
  countries?: string[];
@@ -1899,6 +1992,8 @@ export declare interface IVariantGroupConfig {
1899
1992
  variants: Record<string, IElementStyle>;
1900
1993
  }
1901
1994
 
1995
+ declare type IWidgetRegistry = Record<(typeof CommonFieldInterfacesList)[number], WidgetComponent>;
1996
+
1902
1997
  /**
1903
1998
  * Form for submitting a join request to an invite-only community
1904
1999
  */
@@ -1978,6 +2073,7 @@ export declare const MESSAGE_TYPES: {
1978
2073
  readonly LEVO_BLOCK_DATA: "LEVO_BLOCK_DATA";
1979
2074
  readonly FRAME_HEIGHT: "FRAME_HEIGHT";
1980
2075
  readonly LEVO_USERS: "LEVO_USERS";
2076
+ readonly STOP_GENERATION: "STOP_GENERATION";
1981
2077
  };
1982
2078
 
1983
2079
  declare type MutableDeep<T> = T extends readonly (infer U)[] ? MutableDeep<U>[] : T extends object ? {
@@ -2191,6 +2287,7 @@ export declare const PreviewHighlighter: React.FC<PreviewHighlighterProps>;
2191
2287
 
2192
2288
  declare interface PreviewHighlighterProps {
2193
2289
  isPageGenerating?: boolean;
2290
+ isGenerationCancelled?: boolean;
2194
2291
  totalBlocksCount?: number;
2195
2292
  blocksGenerationInfo?: IBlockGenerationInfo[];
2196
2293
  }
@@ -2572,6 +2669,8 @@ export declare interface ViewportConfig {
2572
2669
  margin?: string;
2573
2670
  }
2574
2671
 
2672
+ declare type WidgetComponent = default_2.FC<ICommonRendererProps>;
2673
+
2575
2674
  declare type WithBlockPropsComponent<P = {}> = (props: P & {
2576
2675
  children?: BlockChildren;
2577
2676
  }) => ReactElement | null;