@levo-so/studio 0.1.8 → 0.1.52

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 (44) hide show
  1. package/dist/{Beams-B2rZmhLI.js → Beams-CzAwDqou.js} +1 -1
  2. package/dist/{Dots-OyX1E9Ts.js → Dots-BgmklWE-.js} +1 -1
  3. package/dist/{Gradient-DOFsccBS.js → Gradient-Cr9szXfL.js} +1 -1
  4. package/dist/{Grid-DRZu52wi.js → Grid-Cd1uINyX.js} +1 -1
  5. package/dist/{Waves-DzqlDCGx.js → Waves-Q3gpYuM2.js} +1 -1
  6. package/dist/bridge/StudioBlockPreview.d.ts +2 -1
  7. package/dist/bridge/StudioPagePreview.d.ts +4 -1
  8. package/dist/bridge/StudioPreview.d.ts +4 -1
  9. package/dist/components/LoginForm/GoogleOAuth.d.ts +1 -1
  10. package/dist/components/registerModal/RegisterModal.d.ts +6 -0
  11. package/dist/components/registerModal/RegistrationConfirmationModal.d.ts +8 -0
  12. package/dist/components/registerModal/useCustomDisclosure.d.ts +18 -0
  13. package/dist/components/registerModal/utils.d.ts +2 -0
  14. package/dist/contentEngine/config.d.ts +5 -1
  15. package/dist/contentEngine/content.d.ts +30 -6
  16. package/dist/contentEngine/getPage.d.ts +3 -1
  17. package/dist/contentEngine/head_code.d.ts +2 -2
  18. package/dist/contentEngine/sourceFetcher.d.ts +8 -5
  19. package/dist/contentEngine/types.d.ts +2 -1
  20. package/dist/contentEngine/urlBuilder.d.ts +7 -1
  21. package/dist/core/AccessManager/index.d.ts +4 -2
  22. package/dist/core/LevoPage.d.ts +7 -4
  23. package/dist/{index-RdFZytGV.js → index-4Hm8Nq1K.js} +3 -3
  24. package/dist/{index-Ce2VNBY0.js → index-BEa73Nqa.js} +2 -2
  25. package/dist/index-CICXXChN.js +10185 -0
  26. package/dist/{index-BcbNOVub.js → index-CpL9yDVW.js} +1 -1
  27. package/dist/{index-vDaUilga.js → index-FPch-n1w.js} +2 -2
  28. package/dist/index.d.ts +1 -0
  29. package/dist/index.js +51 -51
  30. package/dist/interfaces/levoBlock.d.ts +6 -2
  31. package/dist/interfaces/site.d.ts +0 -2
  32. package/dist/providers/BlockContext.d.ts +1 -0
  33. package/dist/studio.css +1 -0
  34. package/dist/utils/index.d.ts +0 -1
  35. package/package.json +8 -5
  36. package/dist/index-2NFcpkxw.js +0 -9543
  37. package/dist/index.css +0 -1
  38. package/dist/index2.css +0 -1
  39. package/dist/index3.css +0 -1
  40. package/dist/index4.css +0 -1
  41. package/dist/index5.css +0 -1
  42. package/dist/index6.css +0 -1
  43. package/dist/utils/levoClient.d.ts +0 -5
  44. /package/dist/{index-QRx1kG5G.js → index-DHHPZcEh.js} +0 -0
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as C, jsxs as a } from "react/jsx-runtime";
3
3
  import r from "react";
4
- import { m as c } from "./index-2NFcpkxw.js";
4
+ import { m as c } from "./index-CICXXChN.js";
5
5
  const h = r.memo(
6
6
  ({
7
7
  className: o,
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as l, jsxs as w } from "react/jsx-runtime";
3
3
  import h from "react";
4
- import { m as x } from "./index-2NFcpkxw.js";
4
+ import { m as x } from "./index-CICXXChN.js";
5
5
  const g = h.memo(
6
6
  ({
7
7
  className: i,
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  import o from "react";
4
- import { m as r } from "./index-2NFcpkxw.js";
4
+ import { m as r } from "./index-CICXXChN.js";
5
5
  const s = o.memo(
6
6
  ({
7
7
  className: e,
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as o, jsxs as g } from "react/jsx-runtime";
3
3
  import r from "react";
4
- import { m as d } from "./index-2NFcpkxw.js";
4
+ import { m as d } from "./index-CICXXChN.js";
5
5
  const p = r.memo(
6
6
  ({
7
7
  className: e,
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as e, jsxs as a } from "react/jsx-runtime";
3
3
  import u from "react";
4
- import { m as d } from "./index-2NFcpkxw.js";
4
+ import { m as d } from "./index-CICXXChN.js";
5
5
  const g = u.memo(
6
6
  ({
7
7
  className: p,
@@ -1,7 +1,8 @@
1
- import { BlockComponent } from '../interfaces';
1
+ import { BlockComponent, ISite } from '../interfaces';
2
2
  import { StudioData } from './StudioPreview';
3
3
  export declare const StudioBlockPreview: React.FC<{
4
4
  blocks: Record<string, BlockComponent>;
5
5
  studioData: StudioData["blockData"] | undefined;
6
+ site: ISite;
6
7
  }>;
7
8
  //# sourceMappingURL=StudioBlockPreview.d.ts.map
@@ -1,4 +1,5 @@
1
- import { IPageExpanded } from '../interfaces';
1
+ import { IWorkspace } from '@levo-so/core';
2
+ import { IPageExpanded, ISite } from '../interfaces';
2
3
  import { ILevoPageProps } from '../core';
3
4
  import { IPageDataContext } from '../contentEngine';
4
5
  interface StudioPageData {
@@ -11,6 +12,8 @@ export declare const StudioPagePreview: React.FC<{
11
12
  blocks: ILevoPageProps["blocks"];
12
13
  renderHighlights?: boolean;
13
14
  studioData: StudioPageData | undefined;
15
+ workspace: IWorkspace;
16
+ site: ISite;
14
17
  }>;
15
18
  export {};
16
19
  //# sourceMappingURL=StudioPagePreview.d.ts.map
@@ -1,4 +1,5 @@
1
- import { IBlockInstance, IPageExpanded, ITheme, BlockComponent } from '../interfaces';
1
+ import { IWorkspace } from '@levo-so/core';
2
+ import { IBlockInstance, IPageExpanded, ITheme, BlockComponent, ISite } from '../interfaces';
2
3
  import { IPageDataContext } from '../contentEngine';
3
4
  export type StudioData = {
4
5
  pageData?: {
@@ -13,6 +14,8 @@ export type StudioData = {
13
14
  context?: IPageDataContext;
14
15
  theme?: ITheme;
15
16
  };
17
+ workspace?: IWorkspace;
18
+ site?: ISite;
16
19
  };
17
20
  export declare const StudioPreview: React.FC<{
18
21
  blocks: Record<string, BlockComponent>;
@@ -5,6 +5,6 @@ interface IGoogleOAuthProps {
5
5
  onOAuthSuccess?: () => void;
6
6
  onOAuthError?: (error?: LevoError) => void;
7
7
  }
8
- export declare const GoogleOAuth: React.FC<IGoogleOAuthProps>;
8
+ export declare const OAuthButtons: React.FC<IGoogleOAuthProps>;
9
9
  export {};
10
10
  //# sourceMappingURL=GoogleOAuth.d.ts.map
@@ -0,0 +1,6 @@
1
+ export declare const RegisterModal: ({ eventID, title, buttonText, }: {
2
+ eventID: string;
3
+ title?: string;
4
+ buttonText?: string;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=RegisterModal.d.ts.map
@@ -0,0 +1,8 @@
1
+ import { LevoEvent } from '@levo-so/core';
2
+ declare const RegistrationConfirmationModal: ({ ticketData, paymentData, type, }: {
3
+ paymentData: LevoEvent.Booking.Root;
4
+ ticketData: LevoEvent.Ticket.Root[];
5
+ type: string;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ export default RegistrationConfirmationModal;
8
+ //# sourceMappingURL=RegistrationConfirmationModal.d.ts.map
@@ -0,0 +1,18 @@
1
+ interface UseDisclosureProps {
2
+ isOpen?: boolean;
3
+ defaultIsOpen?: boolean;
4
+ onClose?(): void;
5
+ onOpen?(): void;
6
+ id?: string;
7
+ }
8
+ declare function useCustomDisclosure(props?: UseDisclosureProps): {
9
+ isOpen: boolean;
10
+ onOpen: () => void;
11
+ onClose: () => void;
12
+ onToggle: () => void;
13
+ isControlled: boolean;
14
+ getButtonProps: (props?: any) => any;
15
+ getDisclosureProps: (props?: any) => any;
16
+ };
17
+ export default useCustomDisclosure;
18
+ //# sourceMappingURL=useCustomDisclosure.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const currencySymbol: any;
2
+ //# sourceMappingURL=utils.d.ts.map
@@ -1,3 +1,7 @@
1
+ import { ILevoClient } from '@levo-so/core';
1
2
  import { IBlockInstance } from '../interfaces';
2
- export declare const parseConfig: (block: IBlockInstance) => Promise<IBlockInstance>;
3
+ export declare const parseConfig: ({ levoClient, block, }: {
4
+ levoClient: ILevoClient;
5
+ block: IBlockInstance;
6
+ }) => Promise<IBlockInstance>;
3
7
  //# sourceMappingURL=config.d.ts.map
@@ -1,19 +1,43 @@
1
- import { IResponseMultiple } from '@levo-so/core';
2
- import { IBlockInstance, IPageExpanded, IStudioSource } from '../interfaces';
1
+ import { ILevoClient, IResponseMultiple } from '@levo-so/core';
2
+ import { IBlockInstance, IPageExpanded, ISite, IStudioSource } from '../interfaces';
3
3
  import { IPageContext, IPageDataContext } from './types';
4
+ export type ILevoPageData = Pick<IPageExpanded, "id" | "workspace_id" | "blocks" | "source" | "title" | "description" | "access">;
4
5
  export declare const resolveVariables: ({ skeleton, blockFetchedContent, blockSource, pageContext, }: {
5
6
  skeleton: any;
6
7
  blockFetchedContent?: Record<string, any>;
7
8
  blockSource?: IStudioSource;
8
9
  pageContext?: Record<string, any>;
9
10
  }) => any;
10
- export declare const getPageSource: (pageData: IPageExpanded, slugs: Record<string, string>) => Promise<{
11
+ export declare const resolveStyles: ({ skeleton, blockFetchedContent, blockSource, }: {
12
+ skeleton: any;
13
+ blockFetchedContent?: Record<string, any>;
14
+ blockSource?: IStudioSource;
15
+ }) => any;
16
+ export declare const getPageSource: ({ levoClient, pageData, slugs, }: {
17
+ levoClient: ILevoClient;
18
+ pageData: IPageExpanded;
19
+ slugs: Record<string, string>;
20
+ }) => Promise<{
11
21
  pageContext: IPageContext;
12
22
  pageNotFound: boolean;
13
23
  }>;
14
- export declare const parseVariablesFromResolvedSource: (block: IBlockInstance, params: Record<string, unknown>, resolvedSource?: IBlockInstance["source"][0], pageContext?: IPageContext) => Promise<[IBlockInstance, IResponseMultiple["content"] | null]>;
15
- export declare const getInitialPageContent: (pageData: IPageExpanded, querySlugs: Record<string, string>, urlSlugs: string[]) => Promise<{
16
- parsedPageData: IPageExpanded;
24
+ export declare const parseVariablesFromResolvedSource: ({ levoClient, block, params, resolvedSource, pageContext, }: {
25
+ levoClient: ILevoClient;
26
+ block: IBlockInstance;
27
+ params: Record<string, unknown>;
28
+ resolvedSource?: IBlockInstance["source"][0];
29
+ pageContext?: IPageContext;
30
+ }) => Promise<[IBlockInstance, IResponseMultiple["content"] | null]>;
31
+ export declare const getInitialPageContent: ({ levoClient, pageData, site, querySlugs, urlSlugs, minifyResponse, }: {
32
+ levoClient: ILevoClient;
33
+ pageData: IPageExpanded;
34
+ site: ISite;
35
+ querySlugs: Record<string, string>;
36
+ urlSlugs: string[];
37
+ minifyResponse?: boolean;
38
+ }) => Promise<{
39
+ parsedPageData: ILevoPageData;
40
+ transformedPageData: ILevoPageData;
17
41
  context?: IPageDataContext;
18
42
  notFound: boolean;
19
43
  headCode: string;
@@ -1,5 +1,7 @@
1
+ import { ILevoClient } from '@levo-so/core';
1
2
  import { IPageFromPath } from '../interfaces';
2
- export declare const getPageData: ({ workspace, url, draft, visitorParams, }: {
3
+ export declare const getPageData: ({ levoClient, workspace, url, draft, visitorParams, }: {
4
+ levoClient: ILevoClient;
3
5
  workspace: string;
4
6
  url: string;
5
7
  draft?: boolean;
@@ -1,3 +1,3 @@
1
- import { IPageExpanded } from '../interfaces';
2
- export declare const generateHeadContent: (pageData: IPageExpanded, url: string) => string;
1
+ import { IPageExpanded, ISite } from '../interfaces';
2
+ export declare const generateHeadContent: (pageData: IPageExpanded, site: ISite, url: string) => string;
3
3
  //# sourceMappingURL=head_code.d.ts.map
@@ -1,9 +1,12 @@
1
- import { ILemaCollection, IResponseMultiple, IResponseSingle } from '@levo-so/core';
1
+ import { ILemaCollection, ILevoClient, IResponseMultiple, IResponseSingle } from '@levo-so/core';
2
2
  import { SourceFetchOptions } from './types';
3
- export declare const fetchSource: ({ source, slugs, params, }: SourceFetchOptions) => Promise<IResponseMultiple | IResponseSingle | null>;
4
- export declare const fetchCollectionSchema: (source: {
5
- workspace_id: string;
6
- collection_id: string;
3
+ export declare const fetchSource: ({ levoClient, source, slugs, params, }: SourceFetchOptions) => Promise<IResponseMultiple | IResponseSingle | null>;
4
+ export declare const fetchCollectionSchema: ({ levoClient, source, }: {
5
+ levoClient: ILevoClient;
6
+ source: {
7
+ workspace_id: string;
8
+ collection_id: string;
9
+ };
7
10
  }) => Promise<{
8
11
  content: {
9
12
  data: ILemaCollection | null;
@@ -1,4 +1,4 @@
1
- import { IResponseMultiple } from '@levo-so/core';
1
+ import { ILevoClient, IResponseMultiple } from '@levo-so/core';
2
2
  import { IStudioSource } from '../interfaces';
3
3
  export interface SourceURL {
4
4
  baseUrl: string;
@@ -6,6 +6,7 @@ export interface SourceURL {
6
6
  query?: Record<string, unknown>;
7
7
  }
8
8
  export interface SourceFetchOptions {
9
+ levoClient: ILevoClient;
9
10
  source: IStudioSource;
10
11
  slugs?: Record<string, string>;
11
12
  params?: Record<string, unknown>;
@@ -1,3 +1,9 @@
1
+ import { ILevoClient } from '@levo-so/core';
1
2
  import { IStudioSource } from '../interfaces';
2
- export declare const createSourceUrl: (source: IStudioSource, slug?: string, query?: Record<string, unknown>) => string;
3
+ export declare const createSourceUrl: ({ levoClient, source, slug, query, }: {
4
+ levoClient: ILevoClient;
5
+ source: IStudioSource;
6
+ slug?: string;
7
+ query?: Record<string, unknown>;
8
+ }) => string;
3
9
  //# sourceMappingURL=urlBuilder.d.ts.map
@@ -1,6 +1,8 @@
1
- import { IPageExpanded } from '../../interfaces';
1
+ import { ISite } from '../../interfaces';
2
+ import { ILevoPageData } from '../../contentEngine';
2
3
  declare const AccessManager: React.FC<{
3
- page: IPageExpanded;
4
+ page: ILevoPageData;
5
+ site: ISite;
4
6
  children: React.ReactNode;
5
7
  }>;
6
8
  export default AccessManager;
@@ -1,12 +1,15 @@
1
1
  import { default as React } from 'react';
2
- import { IPageExpanded, BlockComponent } from '../interfaces';
3
- import { IPageDataContext } from '../contentEngine';
2
+ import { IWorkspace } from '@levo-so/core';
3
+ import { ISite, BlockComponent } from '../interfaces';
4
+ import { ILevoPageData, IPageDataContext } from '../contentEngine';
4
5
  export interface ILevoPageProps {
5
- pageData: IPageExpanded;
6
- parsedPageData: IPageExpanded;
6
+ pageData: ILevoPageData;
7
+ parsedPageData: ILevoPageData;
7
8
  isBuilder?: boolean;
8
9
  context?: IPageDataContext;
9
10
  blocks: Record<string, BlockComponent>;
11
+ workspace: IWorkspace;
12
+ site: ISite;
10
13
  }
11
14
  export declare const LevoPage: React.FC<ILevoPageProps>;
12
15
  //# sourceMappingURL=LevoPage.d.ts.map
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { jsxs as a, jsx as r } from "react/jsx-runtime";
3
3
  import { CollectionFormBuilder as c } from "@levo-so/react-collection";
4
- import { A as n } from "./index-QRx1kG5G.js";
5
- import { M as o } from "./index-BcbNOVub.js";
6
- import { u as h } from "./index-2NFcpkxw.js";
4
+ import { A as n } from "./index-DHHPZcEh.js";
5
+ import { M as o } from "./index-CpL9yDVW.js";
6
+ import { u as h } from "./index-CICXXChN.js";
7
7
  const u = "_header_emo7t_1", f = "_title_emo7t_8", _ = "_subtitle_emo7t_15", C = "_formContainer_emo7t_21", i = {
8
8
  header: u,
9
9
  title: f,
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsxs as n, jsx as e } from "react/jsx-runtime";
3
- import { A as o } from "./index-QRx1kG5G.js";
4
- import { M as r } from "./index-BcbNOVub.js";
3
+ import { A as o } from "./index-DHHPZcEh.js";
4
+ import { M as r } from "./index-CpL9yDVW.js";
5
5
  const c = "_header_1vjty_1", l = "_iconContainer_1vjty_6", d = "_icon_1vjty_6", m = "_title_1vjty_18", _ = "_subtitle_1vjty_26", h = "_messageContainer_1vjty_33", v = "_message_1vjty_33", s = {
6
6
  header: c,
7
7
  iconContainer: l,