@levo-so/studio 0.1.60 → 0.1.61
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/dist/{Beams-BMno1Tvc.js → Beams-sKsW_tr4.js} +22 -28
- package/dist/{Dots-DTupNond.js → Dots-BEIutbKS.js} +44 -40
- package/dist/{Gradient-BzroE-hh.js → Gradient-DAR7R3Mz.js} +2 -2
- package/dist/Grid-BuKIXWMJ.js +174 -0
- package/dist/{MessageCard-D9UDjWQS.js → MessageCard-C8v6oHmf.js} +7 -12
- package/dist/{Waves-E46HcLxm.js → Waves-C8qlIS1W.js} +29 -80
- package/dist/bridge/Highlighter.d.ts +3 -5
- package/dist/bridge/StudioPagePreview.d.ts +2 -2
- package/dist/bridge/StudioPreview.d.ts +1 -1
- package/dist/bridge/hooks/useElementTracker.d.ts +9 -0
- package/dist/bridge/index.d.ts +3 -3
- package/dist/bridge/utils.d.ts +1 -4
- package/dist/components/AnimatedBlock.d.ts +50 -0
- package/dist/components/backgroundPresets/exports.d.ts +1 -1
- package/dist/components/backgroundPresets/presetSystem.d.ts +2 -2
- package/dist/components/bookingCard/BookingCard.d.ts +65 -0
- package/dist/components/bookingCard/index.d.ts +2 -0
- package/dist/components/bookingModal/BookingConfirmation.d.ts +48 -0
- package/dist/components/bookingModal/BookingModal.d.ts +19 -0
- package/dist/components/bookingModal/BookingSummary.d.ts +34 -0
- package/dist/components/bookingModal/index.d.ts +4 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/integrationFilters/FieldRenderer.d.ts +3 -0
- package/dist/components/integrationFilters/IntegrationFilters.d.ts +1 -1
- package/dist/components/integrationFilters/fields/DropdownField.d.ts +1 -1
- package/dist/components/integrationFilters/fields/TextField.d.ts +1 -1
- package/dist/components/registerModal/AttendeeForm.d.ts +27 -0
- package/dist/components/registerModal/CouponView.d.ts +14 -0
- package/dist/components/registerModal/TicketSelectionStep.d.ts +15 -0
- package/dist/components/registerModal/utils.d.ts +85 -1
- package/dist/components/stripePaymentModal/StripePaymentModal.d.ts +22 -0
- package/dist/components/stripePaymentModal/index.d.ts +3 -0
- package/dist/components/ui/Calendar.d.ts +1 -1
- package/dist/components/ui/base/avatar.d.ts +1 -1
- package/dist/components/ui/base/index.d.ts +2 -1
- package/dist/components/ui/base/input.d.ts +1 -1
- package/dist/components/ui/base/textarea.d.ts +1 -1
- package/dist/components/ui/base/tooltip.d.ts +17 -0
- package/dist/components/ui/index.d.ts +2 -1
- package/dist/components/withBlockProps.d.ts +6 -14
- package/dist/constants/animation.d.ts +10 -0
- package/dist/contentEngine/content.d.ts +8 -4
- package/dist/contentEngine/index.d.ts +3 -3
- package/dist/contentEngine/themeUtils.d.ts +13 -0
- package/dist/context/ForumContext.d.ts +48 -0
- package/dist/core/AccessManager/index.d.ts +1 -1
- package/dist/core/LevoBlock.d.ts +1 -1
- package/dist/core/LevoPage.d.ts +2 -2
- package/dist/core/index.d.ts +1 -1
- package/dist/elements/AlertDialog/index.d.ts +23 -0
- package/dist/elements/Carousel.d.ts +1 -1
- package/dist/elements/Tabs.d.ts +1 -1
- package/dist/elements/UserMenu.d.ts +1 -1
- package/dist/elements/accordion/index.d.ts +1 -1
- package/dist/elements/dialog/index.d.ts +1 -1
- package/dist/elements/forum/ForumPost.d.ts +2 -0
- package/dist/elements/forum/SearchInput.d.ts +5 -0
- package/dist/elements/forum/categoryFilter/CategoryFilter.d.ts +16 -0
- package/dist/elements/forum/categoryFilter/index.d.ts +2 -0
- package/dist/elements/forum/comments/Comment.d.ts +4 -1
- package/dist/elements/forum/comments/Comments.d.ts +1 -0
- package/dist/elements/forum/comments/ReplyBox.d.ts +1 -0
- package/dist/elements/forum/comments/commentUtility.d.ts +4 -1
- package/dist/elements/forum/createForumPost/CreateForumPost.d.ts +9 -0
- package/dist/elements/forum/createForumPost/CreateForumPostModal.d.ts +87 -0
- package/dist/elements/forum/createForumPost/index.d.ts +2 -0
- package/dist/elements/forum/index.d.ts +6 -1
- package/dist/elements/forum/restrictionOverlays/CommentsRestrictionOverlay.d.ts +16 -0
- package/dist/elements/forum/restrictionOverlays/JoinRequestForm.d.ts +14 -0
- package/dist/elements/forum/restrictionOverlays/PendingRequestState.d.ts +11 -0
- package/dist/elements/forum/restrictionOverlays/PostsRestrictionOverlay.d.ts +16 -0
- package/dist/elements/forum/restrictionOverlays/index.d.ts +5 -0
- package/dist/elements/forum/utility/index.d.ts +15 -1
- package/dist/elements/index.d.ts +10 -10
- package/dist/elements-BxhlsyhI.js +9 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/useLogin.d.ts +1 -1
- package/dist/hooks/useStripePayment.d.ts +49 -0
- package/dist/index-BJrh8CwF.js +16197 -0
- package/dist/{index-BkICuRR-.js → index-BYXw6aHi.js} +3 -4
- package/dist/index-CV5mr-8e.js +365 -0
- package/dist/{index-a__5b49U.js → index-CXtfbmpx.js} +5 -15
- package/dist/index-CgUU2EbC.js +765 -0
- package/dist/index-DsAqikcl.js +29 -0
- package/dist/{index-BNwqk7Nf.js → index-DxsNKR4p.js} +3 -3
- package/dist/{index-DHHPZcEh.js → index-IcG2wuuE.js} +1 -8
- package/dist/index.d.ts +16 -13
- package/dist/index.js +159 -121
- package/dist/interfaces/block.d.ts +1 -1
- package/dist/interfaces/levoBlock.d.ts +61 -3
- package/dist/interfaces/sites.d.ts +5 -3
- package/dist/interfaces/theme.d.ts +2 -0
- package/dist/pixel/parserUtil.d.ts +1 -0
- package/dist/providers/AuthProvider.d.ts +1 -0
- package/dist/providers/BlockContext.d.ts +1 -1
- package/dist/providers/LazyMotionProvider.d.ts +15 -0
- package/dist/providers/index.d.ts +1 -0
- package/dist/studio.css +1 -1
- package/dist/utils/colorUtils.d.ts +7 -0
- package/dist/utils/getKeysWithValue.d.ts +1 -1
- package/dist/utils/string.d.ts +7 -0
- package/dist/utils/withBlockPropsUtils.d.ts +6 -55
- package/package.json +19 -19
- package/dist/Grid-t3zbAQxh.js +0 -184
- package/dist/blockSmith/ContentSchemaGenerator.d.ts.map +0 -1
- package/dist/blockSmith/DefaultContentGenerator.d.ts.map +0 -1
- package/dist/blockSmith/DefaultStylesGenerator.d.ts.map +0 -1
- package/dist/blockSmith/index.d.ts.map +0 -1
- package/dist/blockSmith/variablePropertMap.d.ts.map +0 -1
- package/dist/bridge/Highlighter.d.ts.map +0 -1
- package/dist/bridge/PreviewHighlighter.d.ts.map +0 -1
- package/dist/bridge/StudioBlockPreview.d.ts.map +0 -1
- package/dist/bridge/StudioPagePreview.d.ts.map +0 -1
- package/dist/bridge/StudioPreview.d.ts.map +0 -1
- package/dist/bridge/constants.d.ts.map +0 -1
- package/dist/bridge/index.d.ts.map +0 -1
- package/dist/bridge/types.d.ts.map +0 -1
- package/dist/bridge/utils.d.ts.map +0 -1
- package/dist/components/ActionWrapper.d.ts.map +0 -1
- package/dist/components/BackgroundVideo.d.ts.map +0 -1
- package/dist/components/LoginForm/AuthMethodRenderer.d.ts.map +0 -1
- package/dist/components/LoginForm/ErrorDisplay.d.ts.map +0 -1
- package/dist/components/LoginForm/GoogleOAuth.d.ts.map +0 -1
- package/dist/components/LoginForm/MagicLinkAuthForm.d.ts.map +0 -1
- package/dist/components/LoginForm/OAuthSection.d.ts.map +0 -1
- package/dist/components/LoginForm/OtpAuthForm.d.ts.map +0 -1
- package/dist/components/LoginForm/WhatsAppAuthForm.d.ts.map +0 -1
- package/dist/components/LoginForm/index.d.ts.map +0 -1
- package/dist/components/LoginModal/index.d.ts.map +0 -1
- package/dist/components/accessCard/EntryCard/index.d.ts.map +0 -1
- package/dist/components/accessCard/LoginCard/index.d.ts.map +0 -1
- package/dist/components/accessCard/MessageCard.d.ts.map +0 -1
- package/dist/components/accessCard/MessageFooter/index.d.ts.map +0 -1
- package/dist/components/accessCard/card/index.d.ts.map +0 -1
- package/dist/components/backgroundPresets/Beams.d.ts.map +0 -1
- package/dist/components/backgroundPresets/Dots.d.ts.map +0 -1
- package/dist/components/backgroundPresets/Gradient.d.ts.map +0 -1
- package/dist/components/backgroundPresets/Grid.d.ts.map +0 -1
- package/dist/components/backgroundPresets/Waves.d.ts.map +0 -1
- package/dist/components/backgroundPresets/exports.d.ts.map +0 -1
- package/dist/components/backgroundPresets/index.d.ts.map +0 -1
- package/dist/components/backgroundPresets/presetSystem.d.ts.map +0 -1
- package/dist/components/backgroundPresets/presetUtils.d.ts.map +0 -1
- package/dist/components/backgroundPresets/presets.d.ts.map +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/integrationFilters/FieldRenderer.d.ts.map +0 -1
- package/dist/components/integrationFilters/IntegrationFilters.d.ts.map +0 -1
- package/dist/components/integrationFilters/fields/DropdownField.d.ts.map +0 -1
- package/dist/components/integrationFilters/fields/TextField.d.ts.map +0 -1
- package/dist/components/registerModal/RegisterModal.d.ts.map +0 -1
- package/dist/components/registerModal/RegistrationConfirmationModal.d.ts.map +0 -1
- package/dist/components/registerModal/useCustomDisclosure.d.ts.map +0 -1
- package/dist/components/registerModal/utils.d.ts.map +0 -1
- package/dist/components/shared/EmailInput/index.d.ts.map +0 -1
- package/dist/components/shared/MagicLinkSuccess/index.d.ts.map +0 -1
- package/dist/components/shared/OTPInput/index.d.ts.map +0 -1
- package/dist/components/shared/PhoneInput/index.d.ts.map +0 -1
- package/dist/components/ui/Calendar.d.ts.map +0 -1
- package/dist/components/ui/FlippingText.d.ts.map +0 -1
- package/dist/components/ui/StatefulButton/index.d.ts.map +0 -1
- package/dist/components/ui/base/avatar.d.ts.map +0 -1
- package/dist/components/ui/base/index.d.ts.map +0 -1
- package/dist/components/ui/base/input.d.ts.map +0 -1
- package/dist/components/ui/base/skeleton.d.ts.map +0 -1
- package/dist/components/ui/base/textarea.d.ts.map +0 -1
- package/dist/components/ui/form/FormInput.d.ts.map +0 -1
- package/dist/components/ui/form/FormSelect.d.ts.map +0 -1
- package/dist/components/ui/form/FormTextarea.d.ts.map +0 -1
- package/dist/components/ui/form/utils/FieldError.d.ts.map +0 -1
- package/dist/components/ui/form/utils/FieldWrapper.d.ts.map +0 -1
- package/dist/components/ui/form/utils/FormHelperText.d.ts.map +0 -1
- package/dist/components/ui/form/utils/FormLabel.d.ts.map +0 -1
- package/dist/components/ui/index.d.ts.map +0 -1
- package/dist/components/withBlockProps copy.d.ts +0 -61
- package/dist/components/withBlockProps copy.d.ts.map +0 -1
- package/dist/components/withBlockProps.d.ts.map +0 -1
- package/dist/constants/authentication.d.ts.map +0 -1
- package/dist/contentEngine/cache.d.ts.map +0 -1
- package/dist/contentEngine/content.d.ts.map +0 -1
- package/dist/contentEngine/getPage.d.ts.map +0 -1
- package/dist/contentEngine/head_code.d.ts.map +0 -1
- package/dist/contentEngine/index.d.ts.map +0 -1
- package/dist/contentEngine/sourceFetcher.d.ts.map +0 -1
- package/dist/contentEngine/themeUtils.d.ts.map +0 -1
- package/dist/contentEngine/types.d.ts.map +0 -1
- package/dist/contentEngine/urlBuilder.d.ts.map +0 -1
- package/dist/contentEngine/useContentEngine.d.ts.map +0 -1
- package/dist/contentEngine/useContextEngine.d.ts.map +0 -1
- package/dist/context/ModalManager.d.ts.map +0 -1
- package/dist/core/AccessManager/index.d.ts.map +0 -1
- package/dist/core/BlockRegistry.d.ts.map +0 -1
- package/dist/core/LevoBlock.d.ts.map +0 -1
- package/dist/core/LevoPage.d.ts.map +0 -1
- package/dist/core/index.d.ts.map +0 -1
- package/dist/elements/Box.d.ts.map +0 -1
- package/dist/elements/Button.d.ts.map +0 -1
- package/dist/elements/Carousel.d.ts.map +0 -1
- package/dist/elements/Container.d.ts.map +0 -1
- package/dist/elements/EditForm.d.ts.map +0 -1
- package/dist/elements/Form.d.ts.map +0 -1
- package/dist/elements/Heading.d.ts.map +0 -1
- package/dist/elements/Icon.d.ts.map +0 -1
- package/dist/elements/Iframe.d.ts.map +0 -1
- package/dist/elements/Image.d.ts.map +0 -1
- package/dist/elements/Link.d.ts.map +0 -1
- package/dist/elements/Media.d.ts.map +0 -1
- package/dist/elements/Section.d.ts.map +0 -1
- package/dist/elements/Tabs.d.ts.map +0 -1
- package/dist/elements/Typography.d.ts.map +0 -1
- package/dist/elements/UserMenu.d.ts.map +0 -1
- package/dist/elements/accordion/index.d.ts.map +0 -1
- package/dist/elements/dialog/index.d.ts.map +0 -1
- package/dist/elements/forum/ForumPost.d.ts.map +0 -1
- package/dist/elements/forum/ForumPostContentRenderer.d.ts.map +0 -1
- package/dist/elements/forum/comments/Comment.d.ts.map +0 -1
- package/dist/elements/forum/comments/Comments.d.ts.map +0 -1
- package/dist/elements/forum/comments/ReplyBox.d.ts.map +0 -1
- package/dist/elements/forum/comments/commentUtility.d.ts.map +0 -1
- package/dist/elements/forum/comments/index.d.ts.map +0 -1
- package/dist/elements/forum/index.d.ts.map +0 -1
- package/dist/elements/forum/utility/Video.d.ts.map +0 -1
- package/dist/elements/forum/utility/index.d.ts.map +0 -1
- package/dist/elements/index.d.ts.map +0 -1
- package/dist/elements/popover/index.d.ts.map +0 -1
- package/dist/hooks/useLogin.d.ts.map +0 -1
- package/dist/index-D-C30ZH_.js +0 -14748
- package/dist/interfaces/block.d.ts.map +0 -1
- package/dist/interfaces/contentSchema.d.ts.map +0 -1
- package/dist/interfaces/form.d.ts.map +0 -1
- package/dist/interfaces/index.d.ts.map +0 -1
- package/dist/interfaces/levoBlock.d.ts.map +0 -1
- package/dist/interfaces/site.d.ts.map +0 -1
- package/dist/interfaces/sites.d.ts.map +0 -1
- package/dist/interfaces/theme.d.ts.map +0 -1
- package/dist/pixel/constants/borderRadius.d.ts.map +0 -1
- package/dist/pixel/constants/colorOptions.d.ts.map +0 -1
- package/dist/pixel/constants/fontSizeOptions.d.ts.map +0 -1
- package/dist/pixel/constants/marginOptions.d.ts.map +0 -1
- package/dist/pixel/constants/spaceOptions.d.ts.map +0 -1
- package/dist/pixel/index.d.ts.map +0 -1
- package/dist/pixel/optionsMap.d.ts.map +0 -1
- package/dist/pixel/parserUtil.d.ts.map +0 -1
- package/dist/pixel/propertyMap.d.ts.map +0 -1
- package/dist/providers/AuthProvider.d.ts.map +0 -1
- package/dist/providers/BlockContext.d.ts.map +0 -1
- package/dist/providers/index.d.ts.map +0 -1
- package/dist/schemas/authSchemas.d.ts.map +0 -1
- package/dist/theme/defaultTheme.d.ts.map +0 -1
- package/dist/utils/blockHelpers.d.ts.map +0 -1
- package/dist/utils/colorUtils.d.ts.map +0 -1
- package/dist/utils/findFieldSchema.d.ts.map +0 -1
- package/dist/utils/getKeysWithValue.d.ts.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/withBlockPropsUtils.d.ts.map +0 -1
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { ILevoClient, IResponseMultiple } from '@levo-so/core';
|
|
2
|
-
import { IBlockInstance,
|
|
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" | "style_config"
|
|
5
|
-
export declare const resolveVariables: ({ skeleton, blockFetchedContent, blockSources, pageContext, currentPath, }: {
|
|
4
|
+
export type ILevoPageData = Pick<IPageExpanded, "id" | "workspace_id" | "blocks" | "source" | "title" | "description" | "access" | "style_config">;
|
|
5
|
+
export declare const resolveVariables: ({ skeleton, blockFetchedContent, blockSources, pageContext, siteData, currentPath, _resolvedKeys, _contextKeys, }: {
|
|
6
6
|
skeleton: any;
|
|
7
7
|
blockFetchedContent: Record<string, any>;
|
|
8
8
|
blockSources: IStudioSource[];
|
|
9
9
|
pageContext: Record<string, any>;
|
|
10
|
+
siteData?: Record<string, any>;
|
|
10
11
|
currentPath?: string;
|
|
12
|
+
_resolvedKeys?: Record<string, any>;
|
|
13
|
+
_contextKeys?: Record<string, any>;
|
|
11
14
|
}) => any;
|
|
12
15
|
export declare const resolveStyles: ({ skeleton, blockFetchedContent, blockSources, currentPath, }: {
|
|
13
16
|
skeleton: any;
|
|
@@ -25,12 +28,13 @@ export declare const getPageSource: ({ levoClient, pageData, slugs, cookies, dra
|
|
|
25
28
|
pageContext: IPageContext;
|
|
26
29
|
pageNotFound: boolean;
|
|
27
30
|
}>;
|
|
28
|
-
export declare const parseVariablesFromResolvedSource: ({ levoClient, block, resolvedSources, pageContext, cookies, draft, workspace_id, }: {
|
|
31
|
+
export declare const parseVariablesFromResolvedSource: ({ levoClient, block, resolvedSources, pageContext, siteData, cookies, draft, workspace_id, }: {
|
|
29
32
|
levoClient: ILevoClient;
|
|
30
33
|
block: IBlockInstance;
|
|
31
34
|
resolvedSources: IBlockInstance["source"];
|
|
32
35
|
workspace_id: string;
|
|
33
36
|
pageContext?: IPageContext;
|
|
37
|
+
siteData?: Record<string, any>;
|
|
34
38
|
cookies?: string;
|
|
35
39
|
draft?: boolean;
|
|
36
40
|
}) => Promise<[IBlockInstance, Record<string, IResponseMultiple<Record<string, unknown>>>]>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './content';
|
|
2
|
-
export * from './sourceFetcher';
|
|
3
|
-
export * from './useContentEngine';
|
|
4
|
-
export * from './types';
|
|
5
2
|
export * from './getPage';
|
|
3
|
+
export * from './sourceFetcher';
|
|
6
4
|
export * from './themeUtils';
|
|
5
|
+
export * from './types';
|
|
6
|
+
export * from './useContentEngine';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -30,6 +30,18 @@ export declare const processFonts: (theme: ITheme) => {
|
|
|
30
30
|
fontUrl: string;
|
|
31
31
|
fontTags: string;
|
|
32
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* Normalizes a custom color name to a valid CSS variable suffix
|
|
35
|
+
* Replaces spaces with underscores, converts to lowercase
|
|
36
|
+
* Example: "Primary Accent" -> "primary_accent"
|
|
37
|
+
*/
|
|
38
|
+
export declare const normalizeColorName: (name: string) => string;
|
|
39
|
+
/**
|
|
40
|
+
* Normalizes a custom font name to a valid CSS variable suffix
|
|
41
|
+
* Replaces spaces with underscores, converts to lowercase
|
|
42
|
+
* Example: "Code Font" -> "code_font"
|
|
43
|
+
*/
|
|
44
|
+
export declare const normalizeFontName: (name: string) => string;
|
|
33
45
|
/**
|
|
34
46
|
* CSS Custom Properties Generation
|
|
35
47
|
*
|
|
@@ -41,6 +53,7 @@ export declare const processFonts: (theme: ITheme) => {
|
|
|
41
53
|
* - var(--color-brand) for theme colors
|
|
42
54
|
* - var(--font-heading) for theme fonts
|
|
43
55
|
* - var(--base-spacing) for theme sizes
|
|
56
|
+
* - var(--color-custom-{name}) for custom colors
|
|
44
57
|
*
|
|
45
58
|
* @param theme - Theme configuration object
|
|
46
59
|
* @returns Object mapping CSS property names to values
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { IForum, IForumJoinRequest } from '@levo-so/core';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Forum context
|
|
5
|
+
*/
|
|
6
|
+
interface IForumContext {
|
|
7
|
+
forum: IForum | null;
|
|
8
|
+
isMember: boolean;
|
|
9
|
+
isLoadingMembership: boolean;
|
|
10
|
+
isInviteOnly: boolean;
|
|
11
|
+
/** Whether user can interact with posts (upvote/downvote) */
|
|
12
|
+
canInteractWithPosts: boolean;
|
|
13
|
+
/** Whether user can interact with comments (reply/vote) */
|
|
14
|
+
canInteractWithComments: boolean;
|
|
15
|
+
/** Current user's pending join request, if any */
|
|
16
|
+
joinRequest: IForumJoinRequest | null;
|
|
17
|
+
/** Whether user has a pending join request */
|
|
18
|
+
isJoinRequestPending: boolean;
|
|
19
|
+
/** Whether the forum allows join requests */
|
|
20
|
+
allowJoinRequests: boolean;
|
|
21
|
+
/** Submit a join request for the current user */
|
|
22
|
+
submitJoinRequest: (message?: string) => Promise<boolean>;
|
|
23
|
+
/** Refresh membership status from the server */
|
|
24
|
+
refreshMembershipStatus: () => Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Forum provider
|
|
28
|
+
*/
|
|
29
|
+
export declare const ForumProvider: React.FC<{
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
forum: IForum | null;
|
|
32
|
+
isMember: boolean;
|
|
33
|
+
isLoadingMembership: boolean;
|
|
34
|
+
isInviteOnly: boolean;
|
|
35
|
+
canInteractWithPosts: boolean;
|
|
36
|
+
canInteractWithComments: boolean;
|
|
37
|
+
joinRequest?: IForumJoinRequest | null;
|
|
38
|
+
isJoinRequestPending?: boolean;
|
|
39
|
+
allowJoinRequests?: boolean;
|
|
40
|
+
submitJoinRequest?: (message?: string) => Promise<boolean>;
|
|
41
|
+
refreshMembershipStatus?: () => Promise<void>;
|
|
42
|
+
}>;
|
|
43
|
+
/**
|
|
44
|
+
* Hook to use forum context
|
|
45
|
+
*/
|
|
46
|
+
export declare const useForumContext: () => IForumContext;
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=ForumContext.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { ILevoPageData } from '../../contentEngine';
|
|
1
2
|
import { ISite } from '../../interfaces';
|
|
2
3
|
import { IAuthOverride } from '../../providers/AuthProvider';
|
|
3
|
-
import { ILevoPageData } from '../../contentEngine';
|
|
4
4
|
declare const AccessManager: React.FC<{
|
|
5
5
|
page: ILevoPageData;
|
|
6
6
|
site: ISite;
|
package/dist/core/LevoBlock.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { IBlockInstance, ILevoBlockProps } from '../interfaces';
|
|
3
2
|
import { IPageContext, IPageDataContext } from '../contentEngine';
|
|
3
|
+
import { IBlockInstance, ILevoBlockProps } from '../interfaces';
|
|
4
4
|
interface LevoBlockProps {
|
|
5
5
|
html_id?: string;
|
|
6
6
|
isBuilder?: boolean;
|
package/dist/core/LevoPage.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { IWorkspace } from '@levo-so/core';
|
|
3
|
-
import {
|
|
2
|
+
import { default as React } from 'react';
|
|
4
3
|
import { ILevoPageData, IPageDataContext } from '../contentEngine';
|
|
4
|
+
import { BlockComponent, ISite } from '../interfaces';
|
|
5
5
|
import { IAuthOverride } from '../providers';
|
|
6
6
|
export interface ILevoPageProps {
|
|
7
7
|
pageData: ILevoPageData;
|
package/dist/core/index.d.ts
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Alert dialog props
|
|
4
|
+
*/
|
|
5
|
+
interface IAlertDialogProps {
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
setIsOpen: (open: boolean) => void;
|
|
8
|
+
title: string;
|
|
9
|
+
description: string;
|
|
10
|
+
onCancel?: () => void;
|
|
11
|
+
onConfirm: () => void;
|
|
12
|
+
isLoading?: boolean;
|
|
13
|
+
cancelText?: string;
|
|
14
|
+
confirmText?: string;
|
|
15
|
+
confirmButtonClassName?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Alert dialog component using Dialog component
|
|
19
|
+
*/
|
|
20
|
+
declare const AlertDialog: React.FC<IAlertDialogProps>;
|
|
21
|
+
export { AlertDialog };
|
|
22
|
+
export type { IAlertDialogProps };
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { default as useEmblaCarousel, UseEmblaCarouselType } from 'embla-carousel-react';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
3
|
import { BaseElementProps } from '../components/withBlockProps';
|
|
4
4
|
import { BaseButtonProps } from './Button';
|
|
5
5
|
type CarouselApi = UseEmblaCarouselType[1];
|
package/dist/elements/Tabs.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Tabs as TabsPrimitive } from 'radix-ui';
|
|
2
2
|
import { BaseElementProps } from '../components/withBlockProps';
|
|
3
|
-
import * as React from "react";
|
|
3
|
+
import type * as React from "react";
|
|
4
4
|
declare const TabsRoot: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
type TypeTabsListComponentProps = React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>;
|
|
6
6
|
interface BaseTabsListProps extends BaseElementProps, Omit<TypeTabsListComponentProps, "content"> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseElementProps } from '../components/withBlockProps';
|
|
2
|
-
import * as React from "react";
|
|
2
|
+
import type * as React from "react";
|
|
3
3
|
export interface BaseUserMenuProps extends React.HTMLAttributes<HTMLDivElement>, Omit<BaseElementProps, "content"> {
|
|
4
4
|
}
|
|
5
5
|
export declare const BaseUserMenu: React.FC<BaseUserMenuProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Accordion as AccordionPrimitive } from 'radix-ui';
|
|
2
2
|
import { BaseElementProps } from '../../components/withBlockProps';
|
|
3
|
-
import * as React from "react";
|
|
3
|
+
import type * as React from "react";
|
|
4
4
|
type TypeAccordionComponentProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Root>;
|
|
5
5
|
interface BaseAccordionRootProps extends BaseElementProps, Omit<TypeAccordionComponentProps, "content"> {
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dialog as DialogPrimitive } from 'radix-ui';
|
|
2
|
-
import * as React from "react";
|
|
2
|
+
import type * as React from "react";
|
|
3
3
|
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,6 +6,8 @@ declare const ForumPost: React.FC<{
|
|
|
6
6
|
postDetailPageBaseURL?: string | null;
|
|
7
7
|
isRenderedSolo?: boolean;
|
|
8
8
|
actionsLoadingState?: IPostActionsLoadingState;
|
|
9
|
+
forumKey?: string;
|
|
10
|
+
wrapperStyles?: string;
|
|
9
11
|
}>;
|
|
10
12
|
export { ForumPost };
|
|
11
13
|
export declare const PostLinkWrapper: React.FC<{
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface ICategoryFilterProps {
|
|
2
|
+
/** The forum key/slug to fetch categories for */
|
|
3
|
+
forumKey: string;
|
|
4
|
+
/** Currently selected category IDs */
|
|
5
|
+
selectedCategories: string[];
|
|
6
|
+
/** Callback when category selection changes */
|
|
7
|
+
onCategoryToggle: (categoryId: string) => void;
|
|
8
|
+
/** Optional className for the container */
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* CategoryFilter displays a list of selectable category pills for filtering forum posts.
|
|
13
|
+
* Fetches categories from the API and renders them as toggleable buttons.
|
|
14
|
+
*/
|
|
15
|
+
export declare const CategoryFilter: React.FC<ICategoryFilterProps>;
|
|
16
|
+
//# sourceMappingURL=CategoryFilter.d.ts.map
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { IComment, IForumPost } from '@levo-so/core';
|
|
1
|
+
import { IComment, ICommentsUserEngagement, IForumPost } from '@levo-so/core';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
declare const Comment: React.FC<{
|
|
4
4
|
post: IForumPost;
|
|
5
5
|
comment: IComment;
|
|
6
6
|
isRoot?: boolean;
|
|
7
7
|
index?: number;
|
|
8
|
+
forumKey: string;
|
|
8
9
|
onChildReplyAdded?: () => void;
|
|
10
|
+
userEngagementHashMap?: Record<string, ICommentsUserEngagement>;
|
|
11
|
+
setUserEngagementHashMap?: React.Dispatch<React.SetStateAction<Record<string, ICommentsUserEngagement>>>;
|
|
9
12
|
}>;
|
|
10
13
|
export default Comment;
|
|
11
14
|
//# sourceMappingURL=Comment.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IComment, IForumPost } from '@levo-so/core';
|
|
1
|
+
import { IComment, ICommentsUserEngagement, IForumPost } from '@levo-so/core';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
export declare const CommentAvatar: React.FC<{
|
|
4
4
|
comment: IComment;
|
|
@@ -16,7 +16,10 @@ declare const CommentAction: React.FC<{
|
|
|
16
16
|
replyCount?: number;
|
|
17
17
|
onReplyAdded?: (reply: IComment) => void;
|
|
18
18
|
onToggleReplies?: () => void;
|
|
19
|
+
forumKey: string;
|
|
19
20
|
showReplyBox?: boolean;
|
|
21
|
+
userEngagementHashMap?: Record<string, ICommentsUserEngagement>;
|
|
22
|
+
setUserEngagementHashMap?: React.Dispatch<React.SetStateAction<Record<string, ICommentsUserEngagement>>>;
|
|
20
23
|
}>;
|
|
21
24
|
export { CommentAction, CommentHeader };
|
|
22
25
|
//# sourceMappingURL=commentUtility.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IForumPost } from '@levo-so/core';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
interface ICreateForumPostProps {
|
|
4
|
+
forumKey: string;
|
|
5
|
+
onPostCreated?: (post: IForumPost) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const CreateForumPost: React.FC<ICreateForumPostProps>;
|
|
8
|
+
export { CreateForumPost };
|
|
9
|
+
//# sourceMappingURL=CreateForumPost.d.ts.map
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { IForumPost } from '@levo-so/core';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
declare const CreateForumPostModal: React.FC<{
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
triggerContainerStyles?: string;
|
|
6
|
+
useCustomOpenState?: boolean;
|
|
7
|
+
isOpen?: boolean;
|
|
8
|
+
handleCreateForumPostModalOpen?: (open: boolean) => void;
|
|
9
|
+
isCreateForumPostModalReady?: boolean;
|
|
10
|
+
forumKey: string;
|
|
11
|
+
onSuccess?: (post: IForumPost) => void;
|
|
12
|
+
onClose?: () => void;
|
|
13
|
+
mode?: "create" | "edit";
|
|
14
|
+
initialValues?: IForumPost;
|
|
15
|
+
}>;
|
|
16
|
+
export default CreateForumPostModal;
|
|
17
|
+
/**
|
|
18
|
+
* PostAsSelector - Commented out for future use
|
|
19
|
+
* This component was previously used to select whether to post as yourself or as the workspace.
|
|
20
|
+
*
|
|
21
|
+
* interface IPostAsSelectorProps {
|
|
22
|
+
* postAs: "myself" | "workspace";
|
|
23
|
+
* setPostAs: (value: "myself" | "workspace") => void;
|
|
24
|
+
* isPostAsOpen: boolean;
|
|
25
|
+
* setIsPostAsOpen: (open: boolean) => void;
|
|
26
|
+
* workspace?: { name?: string };
|
|
27
|
+
* }
|
|
28
|
+
*
|
|
29
|
+
* const PostAsSelector: React.FC<IPostAsSelectorProps> = ({
|
|
30
|
+
* postAs,
|
|
31
|
+
* setPostAs,
|
|
32
|
+
* isPostAsOpen,
|
|
33
|
+
* setIsPostAsOpen,
|
|
34
|
+
* workspace,
|
|
35
|
+
* }) => {
|
|
36
|
+
* const postAsOptions = [
|
|
37
|
+
* { label: "Myself", value: "myself" },
|
|
38
|
+
* { label: workspace?.name || "Workspace", value: "workspace" },
|
|
39
|
+
* ];
|
|
40
|
+
*
|
|
41
|
+
* return (
|
|
42
|
+
* <div className="flex items-center gap-2">
|
|
43
|
+
* <p className="text-text-1 text-sm font-medium">Post as</p>
|
|
44
|
+
* <PopoverRoot open={isPostAsOpen} onOpenChange={setIsPostAsOpen}>
|
|
45
|
+
* <PopoverTrigger elementKey="post-as-trigger" asChild>
|
|
46
|
+
* <button
|
|
47
|
+
* autoFocus={false}
|
|
48
|
+
* className="flex items-center gap-1.5 rounded-md border border-[#D1D6E1] bg-white px-3 py-1.5 text-sm font-medium transition-colors hover:bg-gray-50"
|
|
49
|
+
* >
|
|
50
|
+
* <span className="text-text-1">
|
|
51
|
+
* {postAsOptions.find((opt) => opt.value === postAs)?.label}
|
|
52
|
+
* </span>
|
|
53
|
+
* <ChevronDown className="text-text-2 size-4" />
|
|
54
|
+
* </button>
|
|
55
|
+
* </PopoverTrigger>
|
|
56
|
+
* <PopoverContent
|
|
57
|
+
* elementKey="post-as-content"
|
|
58
|
+
* align="start"
|
|
59
|
+
* className="!w-[unset] min-w-36 rounded-lg border border-gray-200 bg-white !p-1 shadow-lg"
|
|
60
|
+
* >
|
|
61
|
+
* {postAsOptions.map((option) => (
|
|
62
|
+
* <button
|
|
63
|
+
* key={option.value}
|
|
64
|
+
* onClick={() => {
|
|
65
|
+
* setPostAs(option.value as "myself" | "workspace");
|
|
66
|
+
* setIsPostAsOpen(false);
|
|
67
|
+
* }}
|
|
68
|
+
* className={cn(
|
|
69
|
+
* "flex w-full cursor-pointer items-center justify-between rounded-md px-3 py-2 text-left text-sm transition-colors hover:bg-gray-100",
|
|
70
|
+
* postAs === option.value
|
|
71
|
+
* ? "text-text-1 font-medium"
|
|
72
|
+
* : "text-text-2",
|
|
73
|
+
* )}
|
|
74
|
+
* >
|
|
75
|
+
* <span>{option.label}</span>
|
|
76
|
+
* {postAs === option.value && (
|
|
77
|
+
* <Check className="text-brand size-4" />
|
|
78
|
+
* )}
|
|
79
|
+
* </button>
|
|
80
|
+
* ))}
|
|
81
|
+
* </PopoverContent>
|
|
82
|
+
* </PopoverRoot>
|
|
83
|
+
* </div>
|
|
84
|
+
* );
|
|
85
|
+
* };
|
|
86
|
+
*/
|
|
87
|
+
//# sourceMappingURL=CreateForumPostModal.d.ts.map
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './categoryFilter';
|
|
2
2
|
export * from './comments';
|
|
3
|
+
export * from './createForumPost';
|
|
4
|
+
export * from './ForumPost';
|
|
5
|
+
export * from './restrictionOverlays';
|
|
6
|
+
export * from './SearchInput';
|
|
7
|
+
export * from './utility';
|
|
3
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Sample comment skeleton for background display */
|
|
3
|
+
declare const SampleCommentSkeleton: React.FC<{
|
|
4
|
+
opacity?: number;
|
|
5
|
+
}>;
|
|
6
|
+
interface ICommentsRestrictionOverlayProps {
|
|
7
|
+
communityName?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Absolutely positioned overlay shown over comments section
|
|
12
|
+
* when non-member cannot view comments in invite-only community
|
|
13
|
+
*/
|
|
14
|
+
declare const CommentsRestrictionOverlay: React.FC<ICommentsRestrictionOverlayProps>;
|
|
15
|
+
export { CommentsRestrictionOverlay, SampleCommentSkeleton };
|
|
16
|
+
//# sourceMappingURL=CommentsRestrictionOverlay.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface IJoinRequestFormProps {
|
|
3
|
+
onSubmit: (message?: string) => Promise<boolean>;
|
|
4
|
+
isSubmitting: boolean;
|
|
5
|
+
error: string | null;
|
|
6
|
+
communityName?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Form for submitting a join request to an invite-only community
|
|
11
|
+
*/
|
|
12
|
+
declare const JoinRequestForm: React.FC<IJoinRequestFormProps>;
|
|
13
|
+
export { JoinRequestForm };
|
|
14
|
+
//# sourceMappingURL=JoinRequestForm.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface IPendingRequestStateProps {
|
|
3
|
+
communityName?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Display state shown when user has a pending join request
|
|
8
|
+
*/
|
|
9
|
+
declare const PendingRequestState: React.FC<IPendingRequestStateProps>;
|
|
10
|
+
export { PendingRequestState };
|
|
11
|
+
//# sourceMappingURL=PendingRequestState.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Sample post skeleton for background display */
|
|
3
|
+
declare const SamplePostSkeleton: React.FC<{
|
|
4
|
+
opacity?: number;
|
|
5
|
+
}>;
|
|
6
|
+
interface IPostsRestrictionOverlayProps {
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
communityName?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Dialog overlay shown when non-member tries to view posts in invite-only community
|
|
13
|
+
*/
|
|
14
|
+
declare const PostsRestrictionOverlay: React.FC<IPostsRestrictionOverlayProps>;
|
|
15
|
+
export { PostsRestrictionOverlay, SamplePostSkeleton };
|
|
16
|
+
//# sourceMappingURL=PostsRestrictionOverlay.d.ts.map
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
import { IComment, IForumPost } from '@levo-so/core';
|
|
1
2
|
import { default as React } from 'react';
|
|
2
|
-
import { IForumPost } from '@levo-so/core';
|
|
3
3
|
export declare const PostHeader: React.FC<{
|
|
4
4
|
post: IForumPost;
|
|
5
5
|
isRenderedSolo?: boolean;
|
|
6
|
+
forumKey?: string;
|
|
7
|
+
postDetailPageBaseURL?: string | null;
|
|
8
|
+
onEditClick?: () => void;
|
|
9
|
+
onPostUpdated?: (updatedPost: IForumPost) => void;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const PostCategory: React.FC<{
|
|
12
|
+
post: IForumPost;
|
|
6
13
|
}>;
|
|
7
14
|
export declare const PostTitle: React.FC<{
|
|
8
15
|
post: IForumPost;
|
|
@@ -21,6 +28,7 @@ export declare const PostActions: React.FC<{
|
|
|
21
28
|
postDetailPageBaseURL?: string | null;
|
|
22
29
|
isRenderedSolo?: boolean;
|
|
23
30
|
actionsLoadingState?: IPostActionsLoadingState;
|
|
31
|
+
forumKey: string;
|
|
24
32
|
}>;
|
|
25
33
|
export declare const PostLink: React.FC<{
|
|
26
34
|
post: IForumPost;
|
|
@@ -32,4 +40,10 @@ export declare const PostGallery: React.FC<{
|
|
|
32
40
|
export declare const PostPoll: React.FC<{
|
|
33
41
|
post: IForumPost;
|
|
34
42
|
}>;
|
|
43
|
+
export declare const PostStatusBadge: React.FC<{
|
|
44
|
+
post: IForumPost;
|
|
45
|
+
}>;
|
|
46
|
+
export declare const CommentStatusBadge: React.FC<{
|
|
47
|
+
comment: IComment;
|
|
48
|
+
}>;
|
|
35
49
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/elements/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
+
export * from './accordion';
|
|
1
2
|
export * from './Box';
|
|
2
3
|
export * from './Button';
|
|
3
|
-
export * from './Container';
|
|
4
4
|
export * from './Carousel';
|
|
5
|
+
export * from './Container';
|
|
6
|
+
export * from './EditForm';
|
|
7
|
+
export * from './Form';
|
|
8
|
+
export * from './forum';
|
|
5
9
|
export * from './Heading';
|
|
10
|
+
export * from './Icon';
|
|
6
11
|
export * from './Iframe';
|
|
7
12
|
export * from './Image';
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './Section';
|
|
10
|
-
export * from './Typography';
|
|
13
|
+
export * from './Link';
|
|
11
14
|
export * from './Media';
|
|
12
|
-
export * from './accordion';
|
|
13
15
|
export * from './popover';
|
|
14
|
-
export * from './
|
|
15
|
-
export * from './Form';
|
|
16
|
-
export * from './EditForm';
|
|
17
|
-
export * from './UserMenu';
|
|
16
|
+
export * from './Section';
|
|
18
17
|
export * from './Tabs';
|
|
19
|
-
export * from './
|
|
18
|
+
export * from './Typography';
|
|
19
|
+
export * from './UserMenu';
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/hooks/useLogin.d.ts
CHANGED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Stripe } from '@stripe/stripe-js';
|
|
2
|
+
/**
|
|
3
|
+
* Payment metadata from API - for Stripe Embedded Checkout
|
|
4
|
+
*/
|
|
5
|
+
export interface IStripePaymentMeta {
|
|
6
|
+
/** Stripe publishable key (pk_xxx) */
|
|
7
|
+
key: string;
|
|
8
|
+
/** Checkout Session client_secret (for embedded mode) */
|
|
9
|
+
client_secret: string;
|
|
10
|
+
/** Amount in smallest denomination (cents/paise) */
|
|
11
|
+
amount: number;
|
|
12
|
+
/** ISO currency code */
|
|
13
|
+
currency: string;
|
|
14
|
+
/** Payment provider */
|
|
15
|
+
provider: "stripe";
|
|
16
|
+
/** Internal reference ID */
|
|
17
|
+
reference_id: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Config passed to StripePaymentModal
|
|
21
|
+
*/
|
|
22
|
+
export interface IStripePaymentConfig {
|
|
23
|
+
clientSecret: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Return type for useStripePayment hook
|
|
27
|
+
*/
|
|
28
|
+
export interface IUseStripePaymentReturn {
|
|
29
|
+
/** Stripe Promise for EmbeddedCheckoutProvider */
|
|
30
|
+
stripePromise: Promise<Stripe | null> | null;
|
|
31
|
+
/** Config for payment modal */
|
|
32
|
+
config: IStripePaymentConfig | null;
|
|
33
|
+
/** Whether modal is open */
|
|
34
|
+
isOpen: boolean;
|
|
35
|
+
/** Open the Stripe embedded checkout modal */
|
|
36
|
+
openStripeCheckout: (meta: IStripePaymentMeta) => Promise<void>;
|
|
37
|
+
/** Close the modal */
|
|
38
|
+
closeStripeCheckout: () => void;
|
|
39
|
+
/** Set completion callback */
|
|
40
|
+
setOnComplete: (callback: () => void) => void;
|
|
41
|
+
/** Completion callback */
|
|
42
|
+
onComplete: (() => void) | null;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Hook for managing Stripe Embedded Checkout modal
|
|
46
|
+
* Lazy loads Stripe SDK and manages modal state
|
|
47
|
+
*/
|
|
48
|
+
export declare const useStripePayment: () => IUseStripePaymentReturn;
|
|
49
|
+
//# sourceMappingURL=useStripePayment.d.ts.map
|