@levo-so/studio 0.2.3 → 0.3.2

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/index.d.ts CHANGED
@@ -49,6 +49,28 @@ collapsible?: boolean;
49
49
 
50
50
  export declare const AccordionTrigger: WithBlockPropsComponent<BaseAccordionTriggerProps>;
51
51
 
52
+ /**
53
+ * Optional attendee fields. Each is hidden unless its `key` is listed in the
54
+ * `additionalFields` prop, so every event can collect exactly what it needs.
55
+ * Rendered in this order regardless of the order keys are passed in.
56
+ */
57
+ declare const ADDITIONAL_FIELDS: readonly [{
58
+ readonly key: "designation";
59
+ readonly label: "Designation";
60
+ readonly placeholder: "Product Manager";
61
+ readonly type: "text";
62
+ }, {
63
+ readonly key: "mobile";
64
+ readonly label: "Phone Number";
65
+ readonly placeholder: "+91 98765 43210";
66
+ readonly type: "tel";
67
+ }, {
68
+ readonly key: "organization";
69
+ readonly label: "Company Name";
70
+ readonly placeholder: "Acme Corporation";
71
+ readonly type: "text";
72
+ }];
73
+
52
74
  /**
53
75
  * Alternate method values for quick checking
54
76
  */
@@ -308,6 +330,13 @@ declare type BlockProviderInput = {
308
330
  workspace_id: string;
309
331
  pageSource: IPage["source"];
310
332
  languageVariants?: IPage["language_variants"];
333
+ /**
334
+ * The page's resolved locale (e.g. "fr-FR"). Client-side re-fetches
335
+ * (pagination, search, filter changes) forward it as `?_language=` so a
336
+ * localized page keeps rendering its own locale after the first interaction.
337
+ * Without it, page 2 of a French grid comes back in the default locale.
338
+ */
339
+ language?: string;
311
340
  };
312
341
 
313
342
  export declare const BlockSourceModuleList: readonly ["collection", "event", "blog", "community", "context", "form", "blog_author", "blog_category", "blog_tag"];
@@ -981,6 +1010,9 @@ declare type HTMLImageProps_2 = Omit<React.DetailedHTMLProps<React.ImgHTMLAttrib
981
1010
 
982
1011
  declare type HTMLVideoProps = Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "src" | keyof BaseElementProps>;
983
1012
 
1013
+ /** Keys accepted by the `additionalFields` prop. */
1014
+ declare type IAdditionalFieldKey = (typeof ADDITIONAL_FIELDS)[number]["key"];
1015
+
984
1016
  declare interface IAuthActions {
985
1017
  setAuthState: (updates: Partial<IAuthState>) => void;
986
1018
  resetAuth: () => void;
@@ -1572,7 +1604,7 @@ declare interface ILevoFormContext {
1572
1604
  preview?: boolean;
1573
1605
  }
1574
1606
 
1575
- export declare type ILevoPageData = Pick<IPageExpanded, "id" | "workspace_id" | "blocks" | "source" | "title" | "description" | "access" | "style_config" | "settings" | "language_variants">;
1607
+ export declare type ILevoPageData = Pick<IPageExpanded, "id" | "workspace_id" | "blocks" | "source" | "title" | "description" | "access" | "style_config" | "settings" | "language_variants" | "language">;
1576
1608
 
1577
1609
  export declare interface ILevoPageProps {
1578
1610
  pageData: ILevoPageData;
@@ -2431,7 +2463,7 @@ export declare const LanguageSwitcher: WithBlockPropsComponent<BaseLanguageSwitc
2431
2463
  */
2432
2464
  export declare const LazyMotionProvider: React.FC<ILazyMotionProviderProps>;
2433
2465
 
2434
- export declare const LevoBlock: default_2.MemoExoticComponent<({ html_id, renderMode, blocks, parsedBlockData, blockData, pageContext, pageMeta, blockContext, workspace_id, pageSource, languageVariants, }: LevoBlockProps) => JSX.Element>;
2466
+ export declare const LevoBlock: default_2.MemoExoticComponent<({ html_id, renderMode, blocks, parsedBlockData, blockData, pageContext, pageMeta, blockContext, workspace_id, pageSource, languageVariants, language, }: LevoBlockProps) => JSX.Element>;
2435
2467
 
2436
2468
  declare interface LevoBlockProps {
2437
2469
  html_id?: string;
@@ -2445,6 +2477,8 @@ declare interface LevoBlockProps {
2445
2477
  blockContext?: IPageDataContext["blocks"][number];
2446
2478
  pageSource?: IPage["source"];
2447
2479
  languageVariants?: IPage["language_variants"];
2480
+ /** Page's resolved locale — forwarded so client-side re-fetches stay in it. */
2481
+ language?: string;
2448
2482
  }
2449
2483
 
2450
2484
  export declare const LevoPage: default_2.FC<ILevoPageProps>;
@@ -2815,11 +2849,13 @@ export declare const processTheme: ({ pageTheme, blocks, pageID, device, }: {
2815
2849
  html: string;
2816
2850
  };
2817
2851
 
2818
- export declare const RegisterModal: ({ eventID, title, external, buttonText, }: {
2852
+ export declare const RegisterModal: ({ eventID, title, external, buttonText, additionalFields, }: {
2819
2853
  eventID: string;
2820
2854
  title?: string;
2821
2855
  external?: string;
2822
2856
  buttonText?: string;
2857
+ /** Optional attendee fields to collect ("designation" | "mobile" | "organization"). Hidden unless listed. */
2858
+ additionalFields?: IAdditionalFieldKey[];
2823
2859
  }) => JSX.Element;
2824
2860
 
2825
2861
  /**