@teamvortexsoftware/vortex-react-native 1.0.0 → 1.0.1
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/InviteFormCore-D4HkMMo0.d.mts +721 -0
- package/dist/InviteFormCore-D9oUCbu7.d.ts +721 -0
- package/dist/VortexClient.js +192 -0
- package/dist/VortexClient.js.map +1 -0
- package/dist/VortexDeferredLinks.js +127 -0
- package/dist/VortexDeferredLinks.js.map +1 -0
- package/dist/clientInfo.js +45 -0
- package/dist/clientInfo.js.map +1 -0
- package/dist/components/ContactsPickerModal.js +182 -0
- package/dist/components/ContactsPickerModal.js.map +1 -0
- package/dist/components/InviteFormCore.js +2141 -0
- package/dist/components/InviteFormCore.js.map +1 -0
- package/dist/components/InviteFormMobile.js +463 -0
- package/dist/components/InviteFormMobile.js.map +1 -0
- package/dist/components/InviteFormWeb.js +295 -0
- package/dist/components/InviteFormWeb.js.map +1 -0
- package/dist/components/PlacedItemToolbar.js +147 -0
- package/dist/components/PlacedItemToolbar.js.map +1 -0
- package/dist/components/ShareButtons.js +181 -0
- package/dist/components/ShareButtons.js.map +1 -0
- package/dist/components/VrtxContactsImport.js +234 -0
- package/dist/components/VrtxContactsImport.js.map +1 -0
- package/dist/components/VrtxEmailInvitations.js +341 -0
- package/dist/components/VrtxEmailInvitations.js.map +1 -0
- package/dist/components/VrtxFindFriends.js +400 -0
- package/dist/components/VrtxFindFriends.js.map +1 -0
- package/dist/components/VrtxHeading.js +58 -0
- package/dist/components/VrtxHeading.js.map +1 -0
- package/dist/components/VrtxIncomingInvitations.js +657 -0
- package/dist/components/VrtxIncomingInvitations.js.map +1 -0
- package/dist/components/VrtxInvitationSuggestions.js +506 -0
- package/dist/components/VrtxInvitationSuggestions.js.map +1 -0
- package/dist/components/VrtxInviteContacts.js +512 -0
- package/dist/components/VrtxInviteContacts.js.map +1 -0
- package/dist/components/VrtxOutgoingInvitations.js +572 -0
- package/dist/components/VrtxOutgoingInvitations.js.map +1 -0
- package/dist/components/VrtxSearchBox.js +487 -0
- package/dist/components/VrtxSearchBox.js.map +1 -0
- package/dist/components/VrtxSelect.js +27 -0
- package/dist/components/VrtxSelect.js.map +1 -0
- package/dist/components/VrtxShareOptions.js +435 -0
- package/dist/components/VrtxShareOptions.js.map +1 -0
- package/dist/components/VrtxSubmit.js +132 -0
- package/dist/components/VrtxSubmit.js.map +1 -0
- package/dist/components/VrtxText.js +146 -0
- package/dist/components/VrtxText.js.map +1 -0
- package/dist/constants/mockData.d.mts +7 -0
- package/dist/constants/mockData.d.ts +7 -0
- package/dist/constants/mockData.js +48 -0
- package/dist/constants/mockData.js.map +1 -0
- package/dist/constants/mockData.mjs +22 -0
- package/dist/constants/mockData.mjs.map +1 -0
- package/dist/context/VortexModulesContext.js +135 -0
- package/dist/context/VortexModulesContext.js.map +1 -0
- package/dist/hooks/useInvitationFormLogic.d.mts +2 -0
- package/dist/hooks/useInvitationFormLogic.d.ts +2 -0
- package/dist/hooks/useInvitationFormLogic.js +300 -0
- package/dist/hooks/useInvitationFormLogic.js.map +1 -0
- package/dist/hooks/useInvitationFormLogic.mjs +276 -0
- package/dist/hooks/useInvitationFormLogic.mjs.map +1 -0
- package/dist/hooks/usePrefetchWidgetConfiguration.js +117 -0
- package/dist/hooks/usePrefetchWidgetConfiguration.js.map +1 -0
- package/dist/hooks/useThemeStyles.js +41 -0
- package/dist/hooks/useThemeStyles.js.map +1 -0
- package/dist/hooks/useVortexInvite.js +732 -0
- package/dist/hooks/useVortexInvite.js.map +1 -0
- package/dist/index-web.d.mts +93 -0
- package/dist/index-web.d.ts +93 -0
- package/dist/index-web.js +7397 -0
- package/dist/index-web.js.map +1 -0
- package/dist/index-web.mjs +7445 -0
- package/dist/index-web.mjs.map +1 -0
- package/dist/index.d.mts +656 -0
- package/dist/index.d.ts +656 -0
- package/dist/index.js +10206 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +10244 -0
- package/dist/index.mjs.map +1 -0
- package/dist/types/VortexClient.d.ts +106 -0
- package/dist/types/VortexClient.d.ts.map +1 -0
- package/dist/types/VortexDeferredLinks.d.ts +73 -0
- package/dist/types/VortexDeferredLinks.d.ts.map +1 -0
- package/dist/types/clientInfo.d.ts +5 -0
- package/dist/types/clientInfo.d.ts.map +1 -0
- package/dist/types/components/ContactsPickerModal.d.ts +18 -0
- package/dist/types/components/ContactsPickerModal.d.ts.map +1 -0
- package/dist/types/components/InviteFormCore.d.ts +166 -0
- package/dist/types/components/InviteFormCore.d.ts.map +1 -0
- package/dist/types/components/InviteFormMobile.d.ts +42 -0
- package/dist/types/components/InviteFormMobile.d.ts.map +1 -0
- package/dist/types/components/InviteFormWeb.d.ts +87 -0
- package/dist/types/components/InviteFormWeb.d.ts.map +1 -0
- package/dist/types/components/PlacedItemToolbar.d.ts +16 -0
- package/dist/types/components/PlacedItemToolbar.d.ts.map +1 -0
- package/dist/types/components/ShareButtons.d.ts +29 -0
- package/dist/types/components/ShareButtons.d.ts.map +1 -0
- package/dist/types/components/VrtxContactsImport.d.ts +14 -0
- package/dist/types/components/VrtxContactsImport.d.ts.map +1 -0
- package/dist/types/components/VrtxEmailInvitations.d.ts +31 -0
- package/dist/types/components/VrtxEmailInvitations.d.ts.map +1 -0
- package/dist/types/components/VrtxFindFriends.d.ts +25 -0
- package/dist/types/components/VrtxFindFriends.d.ts.map +1 -0
- package/dist/types/components/VrtxHeading.d.ts +6 -0
- package/dist/types/components/VrtxHeading.d.ts.map +1 -0
- package/dist/types/components/VrtxIncomingInvitations.d.ts +27 -0
- package/dist/types/components/VrtxIncomingInvitations.d.ts.map +1 -0
- package/dist/types/components/VrtxInvitationSuggestions.d.ts +25 -0
- package/dist/types/components/VrtxInvitationSuggestions.d.ts.map +1 -0
- package/dist/types/components/VrtxInviteContacts.d.ts +24 -0
- package/dist/types/components/VrtxInviteContacts.d.ts.map +1 -0
- package/dist/types/components/VrtxOutgoingInvitations.d.ts +27 -0
- package/dist/types/components/VrtxOutgoingInvitations.d.ts.map +1 -0
- package/dist/types/components/VrtxSearchBox.d.ts +28 -0
- package/dist/types/components/VrtxSearchBox.d.ts.map +1 -0
- package/dist/types/components/VrtxSelect.d.ts +6 -0
- package/dist/types/components/VrtxSelect.d.ts.map +1 -0
- package/dist/types/components/VrtxShareOptions.d.ts +41 -0
- package/dist/types/components/VrtxShareOptions.d.ts.map +1 -0
- package/dist/types/components/VrtxSubmit.d.ts +18 -0
- package/dist/types/components/VrtxSubmit.d.ts.map +1 -0
- package/dist/types/components/VrtxText.d.ts +8 -0
- package/dist/types/components/VrtxText.d.ts.map +1 -0
- package/dist/types/constants/mockData.d.ts +4 -0
- package/dist/types/constants/mockData.d.ts.map +1 -0
- package/dist/types/context/VortexModulesContext.d.ts +238 -0
- package/dist/types/context/VortexModulesContext.d.ts.map +1 -0
- package/dist/types/findFriends.js +10 -0
- package/dist/types/findFriends.js.map +1 -0
- package/dist/types/hooks/useInvitationFormLogic.d.ts +55 -0
- package/dist/types/hooks/useInvitationFormLogic.d.ts.map +1 -0
- package/dist/types/hooks/usePrefetchWidgetConfiguration.d.ts +39 -0
- package/dist/types/hooks/usePrefetchWidgetConfiguration.d.ts.map +1 -0
- package/dist/types/hooks/useThemeStyles.d.ts +35 -0
- package/dist/types/hooks/useThemeStyles.d.ts.map +1 -0
- package/dist/types/hooks/useVortexInvite.d.ts +86 -0
- package/dist/types/hooks/useVortexInvite.d.ts.map +1 -0
- package/dist/types/index-web.d.ts +23 -0
- package/dist/types/index-web.d.ts.map +1 -0
- package/dist/types/index.d.ts +23 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/invitations.js +13 -0
- package/dist/types/invitations.js.map +1 -0
- package/dist/types/inviteContacts.js +14 -0
- package/dist/types/inviteContacts.js.map +1 -0
- package/dist/types/platformOperations.js +3 -0
- package/dist/types/platformOperations.js.map +1 -0
- package/dist/types/searchBox.js +11 -0
- package/dist/types/searchBox.js.map +1 -0
- package/dist/types/types/findFriends.d.ts +101 -0
- package/dist/types/types/findFriends.d.ts.map +1 -0
- package/dist/types/types/invitations.d.ts +301 -0
- package/dist/types/types/invitations.d.ts.map +1 -0
- package/dist/types/types/inviteContacts.d.ts +86 -0
- package/dist/types/types/inviteContacts.d.ts.map +1 -0
- package/dist/types/types/platformOperations.d.ts +185 -0
- package/dist/types/types/platformOperations.d.ts.map +1 -0
- package/dist/types/types/searchBox.d.ts +69 -0
- package/dist/types/types/searchBox.d.ts.map +1 -0
- package/dist/types/types/unfurlConfig.d.ts +34 -0
- package/dist/types/types/unfurlConfig.d.ts.map +1 -0
- package/dist/types/unfurlConfig.js +21 -0
- package/dist/types/unfurlConfig.js.map +1 -0
- package/dist/types/utils/analytics.d.ts +54 -0
- package/dist/types/utils/analytics.d.ts.map +1 -0
- package/dist/types/utils/configCache.d.ts +34 -0
- package/dist/types/utils/configCache.d.ts.map +1 -0
- package/dist/types/utils/contactUtils.d.ts +9 -0
- package/dist/types/utils/contactUtils.d.ts.map +1 -0
- package/dist/types/utils/featureWarnings.d.ts +56 -0
- package/dist/types/utils/featureWarnings.d.ts.map +1 -0
- package/dist/types/utils/formUtils.d.ts +93 -0
- package/dist/types/utils/formUtils.d.ts.map +1 -0
- package/dist/types/utils/gradientUtils.d.ts +67 -0
- package/dist/types/utils/gradientUtils.d.ts.map +1 -0
- package/dist/types/utils/invitationEvents.d.ts +21 -0
- package/dist/types/utils/invitationEvents.d.ts.map +1 -0
- package/dist/types/utils/moduleLoaders.d.ts +115 -0
- package/dist/types/utils/moduleLoaders.d.ts.map +1 -0
- package/dist/types/utils/moduleLoaders.web.d.ts +73 -0
- package/dist/types/utils/moduleLoaders.web.d.ts.map +1 -0
- package/dist/types/utils/nameUtils.d.ts +15 -0
- package/dist/types/utils/nameUtils.d.ts.map +1 -0
- package/dist/types/utils/themeUtils.d.ts +38 -0
- package/dist/types/utils/themeUtils.d.ts.map +1 -0
- package/dist/types/vortexInvite.d.ts +165 -0
- package/dist/types/vortexInvite.d.ts.map +1 -0
- package/dist/useInvitationFormLogic-Ct73M19B.d.mts +242 -0
- package/dist/useInvitationFormLogic-Ct73M19B.d.ts +242 -0
- package/dist/utils/analytics.js +92 -0
- package/dist/utils/analytics.js.map +1 -0
- package/dist/utils/configCache.js +68 -0
- package/dist/utils/configCache.js.map +1 -0
- package/dist/utils/contactUtils.d.mts +12 -0
- package/dist/utils/contactUtils.d.ts +12 -0
- package/dist/utils/contactUtils.js +37 -0
- package/dist/utils/contactUtils.js.map +1 -0
- package/dist/utils/contactUtils.mjs +12 -0
- package/dist/utils/contactUtils.mjs.map +1 -0
- package/dist/utils/featureWarnings.js +214 -0
- package/dist/utils/featureWarnings.js.map +1 -0
- package/dist/utils/formUtils.js +284 -0
- package/dist/utils/formUtils.js.map +1 -0
- package/dist/utils/gradientUtils.js +120 -0
- package/dist/utils/gradientUtils.js.map +1 -0
- package/dist/utils/invitationEvents.js +45 -0
- package/dist/utils/invitationEvents.js.map +1 -0
- package/dist/utils/moduleLoaders.js +275 -0
- package/dist/utils/moduleLoaders.js.map +1 -0
- package/dist/utils/moduleLoaders.web.js +72 -0
- package/dist/utils/moduleLoaders.web.js.map +1 -0
- package/dist/utils/nameUtils.js +51 -0
- package/dist/utils/nameUtils.js.map +1 -0
- package/dist/utils/themeUtils.js +141 -0
- package/dist/utils/themeUtils.js.map +1 -0
- package/dist/vortexInvite.js +83 -0
- package/dist/vortexInvite.js.map +1 -0
- package/package.json +21 -56
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for Open Graph unfurl metadata.
|
|
3
|
+
* Used to customize link previews when sharing invitation links.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* <VortexInvite
|
|
8
|
+
* componentId="abc123"
|
|
9
|
+
* unfurlConfig={{
|
|
10
|
+
* title: "Join our team!",
|
|
11
|
+
* description: "You've been invited to collaborate",
|
|
12
|
+
* image: "https://example.com/preview.png",
|
|
13
|
+
* siteName: "My App",
|
|
14
|
+
* }}
|
|
15
|
+
* />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export interface UnfurlConfig {
|
|
19
|
+
/** The title for the link preview (og:title) */
|
|
20
|
+
title?: string;
|
|
21
|
+
/** The description for the link preview (og:description) */
|
|
22
|
+
description?: string;
|
|
23
|
+
/** URL to an image for the link preview (og:image) */
|
|
24
|
+
image?: string;
|
|
25
|
+
/** The site name for the link preview (og:site_name) */
|
|
26
|
+
siteName?: string;
|
|
27
|
+
/** The type of content (og:type), defaults to "website" */
|
|
28
|
+
type?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Converts UnfurlConfig to the metadata format expected by the API.
|
|
32
|
+
*/
|
|
33
|
+
export declare function unfurlConfigToMetadata(config: UnfurlConfig): Record<string, string>;
|
|
34
|
+
//# sourceMappingURL=unfurlConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unfurlConfig.d.ts","sourceRoot":"","sources":["../../../src/types/unfurlConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,YAAY;IAC3B,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQnF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.unfurlConfigToMetadata = unfurlConfigToMetadata;
|
|
4
|
+
/**
|
|
5
|
+
* Converts UnfurlConfig to the metadata format expected by the API.
|
|
6
|
+
*/
|
|
7
|
+
function unfurlConfigToMetadata(config) {
|
|
8
|
+
const metadata = {};
|
|
9
|
+
if (config.title)
|
|
10
|
+
metadata['og:title'] = config.title;
|
|
11
|
+
if (config.description)
|
|
12
|
+
metadata['og:description'] = config.description;
|
|
13
|
+
if (config.image)
|
|
14
|
+
metadata['og:image'] = config.image;
|
|
15
|
+
if (config.siteName)
|
|
16
|
+
metadata['og:site_name'] = config.siteName;
|
|
17
|
+
if (config.type)
|
|
18
|
+
metadata['og:type'] = config.type;
|
|
19
|
+
return metadata;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=unfurlConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unfurlConfig.js","sourceRoot":"","sources":["../../src/types/unfurlConfig.ts"],"names":[],"mappings":";;AAiCA,wDAQC;AAXD;;GAEG;AACH,SAAgB,sBAAsB,CAAC,MAAoB;IACzD,MAAM,QAAQ,GAA2B,EAAE,CAAC;IAC5C,IAAI,MAAM,CAAC,KAAK;QAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC;IACtD,IAAI,MAAM,CAAC,WAAW;QAAE,QAAQ,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC;IACxE,IAAI,MAAM,CAAC,KAAK;QAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC;IACtD,IAAI,MAAM,CAAC,QAAQ;QAAE,QAAQ,CAAC,cAAc,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;IAChE,IAAI,MAAM,CAAC,IAAI;QAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC;IACnD,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["/**\n * Configuration for Open Graph unfurl metadata.\n * Used to customize link previews when sharing invitation links.\n *\n * @example\n * ```tsx\n * <VortexInvite\n * componentId=\"abc123\"\n * unfurlConfig={{\n * title: \"Join our team!\",\n * description: \"You've been invited to collaborate\",\n * image: \"https://example.com/preview.png\",\n * siteName: \"My App\",\n * }}\n * />\n * ```\n */\nexport interface UnfurlConfig {\n /** The title for the link preview (og:title) */\n title?: string;\n /** The description for the link preview (og:description) */\n description?: string;\n /** URL to an image for the link preview (og:image) */\n image?: string;\n /** The site name for the link preview (og:site_name) */\n siteName?: string;\n /** The type of content (og:type), defaults to \"website\" */\n type?: string;\n}\n\n/**\n * Converts UnfurlConfig to the metadata format expected by the API.\n */\nexport function unfurlConfigToMetadata(config: UnfurlConfig): Record<string, string> {\n const metadata: Record<string, string> = {};\n if (config.title) metadata['og:title'] = config.title;\n if (config.description) metadata['og:description'] = config.description;\n if (config.image) metadata['og:image'] = config.image;\n if (config.siteName) metadata['og:site_name'] = config.siteName;\n if (config.type) metadata['og:type'] = config.type;\n return metadata;\n}\n"]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { EventName } from '@teamvortexsoftware/analytics-client';
|
|
2
|
+
export declare const DEFAULT_ANALYTICS_URL = "https://collector.vortexsoftware.com";
|
|
3
|
+
/**
|
|
4
|
+
* Analytics event interface for React Native SDK
|
|
5
|
+
* Based on AnalyticsEvent from analytics-client with additional mobile-specific fields
|
|
6
|
+
*/
|
|
7
|
+
export interface VortexAnalyticsEvent {
|
|
8
|
+
name: EventName;
|
|
9
|
+
widgetConfigurationId: string;
|
|
10
|
+
deploymentId: string;
|
|
11
|
+
environmentId: string;
|
|
12
|
+
platform: string;
|
|
13
|
+
segmentation?: Record<string, any>;
|
|
14
|
+
payload?: Record<string, any>;
|
|
15
|
+
groups?: Array<{
|
|
16
|
+
type: string;
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
}>;
|
|
20
|
+
timestamp: number;
|
|
21
|
+
sessionId?: string;
|
|
22
|
+
useragent?: string;
|
|
23
|
+
foreignUserId?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Simplified analytics event for components that emit minimal events.
|
|
27
|
+
* These components emit (name + segmentation) and the parent
|
|
28
|
+
* is responsible for enriching with widgetConfigurationId, deploymentId, etc.
|
|
29
|
+
*/
|
|
30
|
+
export interface SimpleAnalyticsEvent {
|
|
31
|
+
name: EventName;
|
|
32
|
+
segmentation?: Record<string, any>;
|
|
33
|
+
payload?: Record<string, any>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Group DTO for analytics events
|
|
37
|
+
*/
|
|
38
|
+
export interface GroupDTO {
|
|
39
|
+
type: string;
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Generates a device info / user agent string for analytics
|
|
45
|
+
* Format: VortexSDK-RN/{version} ({OS} {osVersion})
|
|
46
|
+
*/
|
|
47
|
+
export declare function getDeviceInfo(): string;
|
|
48
|
+
/**
|
|
49
|
+
* Extracts the foreign user ID from a JWT token
|
|
50
|
+
* Checks claims in order: userId, sub, user_id
|
|
51
|
+
* Handles both standard JWTs and raw-data format (insecure development JWTs)
|
|
52
|
+
*/
|
|
53
|
+
export declare function extractForeignUserId(jwt?: string): string | undefined;
|
|
54
|
+
//# sourceMappingURL=analytics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../src/utils/analytics.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAMtE,eAAO,MAAM,qBAAqB,yCAAyC,CAAC;AAE5E;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IAEnC,IAAI,EAAE,SAAS,CAAC;IAChB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,MAAM,CAAC,EAAE,KAAK,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;IAEH,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAKtC;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CA+BrE"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { WidgetConfiguration } from '@teamvortexsoftware/vortex-types';
|
|
2
|
+
export declare const configCache: {
|
|
3
|
+
/**
|
|
4
|
+
* Get a cached widget configuration by component ID.
|
|
5
|
+
* @param componentId - The widget component ID
|
|
6
|
+
* @returns The cached configuration, or undefined if not found
|
|
7
|
+
*/
|
|
8
|
+
get: (componentId: string) => WidgetConfiguration | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Store a widget configuration in the cache.
|
|
11
|
+
* @param componentId - The widget component ID
|
|
12
|
+
* @param config - The widget configuration to cache
|
|
13
|
+
*/
|
|
14
|
+
set: (componentId: string, config: WidgetConfiguration) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Clear cached configuration(s).
|
|
17
|
+
* @param componentId - Optional component ID to clear specific config. If omitted, clears all.
|
|
18
|
+
*/
|
|
19
|
+
clear: (componentId?: string) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Check if a configuration exists in the cache.
|
|
22
|
+
* @param componentId - The widget component ID
|
|
23
|
+
* @returns True if configuration is cached, false otherwise
|
|
24
|
+
*/
|
|
25
|
+
has: (componentId: string) => boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Get cache statistics for debugging.
|
|
28
|
+
*/
|
|
29
|
+
stats: () => {
|
|
30
|
+
size: number;
|
|
31
|
+
keys: string[];
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=configCache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configCache.d.ts","sourceRoot":"","sources":["../../../src/utils/configCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAevE,eAAO,MAAM,WAAW;IACtB;;;;OAIG;uBACgB,MAAM,KAAG,mBAAmB,GAAG,SAAS;IAI3D;;;;OAIG;uBACgB,MAAM,UAAU,mBAAmB,KAAG,IAAI;IAS7D;;;OAGG;0BACmB,MAAM,KAAG,IAAI;IAUnC;;;;OAIG;uBACgB,MAAM,KAAG,OAAO;IAInC;;OAEG;;;;;CAKJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Contact } from '../hooks/useInvitationFormLogic';
|
|
2
|
+
/**
|
|
3
|
+
* Filters contacts based on a search query
|
|
4
|
+
* @param contacts Array of contacts to filter
|
|
5
|
+
* @param searchQuery Query string to filter by
|
|
6
|
+
* @returns Filtered array of contacts
|
|
7
|
+
*/
|
|
8
|
+
export declare function filterContacts(contacts: Contact[], searchQuery: string): Contact[];
|
|
9
|
+
//# sourceMappingURL=contactUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contactUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/contactUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAE/D;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,EAAE,CAQlF"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature Warnings
|
|
3
|
+
*
|
|
4
|
+
* This module provides feature detection and helpful warnings for missing module configurations.
|
|
5
|
+
* It scans widget configuration to detect which features are required and prints actionable
|
|
6
|
+
* warnings when the corresponding module props are not specified.
|
|
7
|
+
*
|
|
8
|
+
* Warnings are only printed in development mode (__DEV__) and on native platforms.
|
|
9
|
+
*/
|
|
10
|
+
import type { VortexModulesConfig } from '../context/VortexModulesContext';
|
|
11
|
+
/**
|
|
12
|
+
* Features that may be required based on widget configuration
|
|
13
|
+
*/
|
|
14
|
+
export interface FeatureRequirements {
|
|
15
|
+
needsGradient: boolean;
|
|
16
|
+
needsQRCode: boolean;
|
|
17
|
+
needsHaptics: boolean;
|
|
18
|
+
needsClipboard: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Detects which features are required based on widget configuration.
|
|
22
|
+
*
|
|
23
|
+
* @param widgetConfiguration - The widget configuration from the API
|
|
24
|
+
* @returns Object indicating which features are needed
|
|
25
|
+
*/
|
|
26
|
+
export declare function detectRequiredFeatures(widgetConfiguration: any): FeatureRequirements;
|
|
27
|
+
/**
|
|
28
|
+
* Prints helpful warnings for missing module configurations.
|
|
29
|
+
* Only prints in development mode and on native platforms.
|
|
30
|
+
* Uses deduplication helpers to prevent warnings from printing on every render.
|
|
31
|
+
*
|
|
32
|
+
* @param requirements - The detected feature requirements
|
|
33
|
+
* @param moduleConfig - The current module configuration from props
|
|
34
|
+
*/
|
|
35
|
+
export declare function printFeatureWarnings(requirements: FeatureRequirements, moduleConfig: VortexModulesConfig): void;
|
|
36
|
+
/**
|
|
37
|
+
* Prints a warning only once per session.
|
|
38
|
+
* Useful for warnings that shouldn't spam the console on every render.
|
|
39
|
+
*
|
|
40
|
+
* @param key - Unique key for this warning
|
|
41
|
+
* @param message - The warning message to print
|
|
42
|
+
*/
|
|
43
|
+
export declare function printWarningOnce(key: string, message: string): void;
|
|
44
|
+
/**
|
|
45
|
+
* Prints an info message only once per session.
|
|
46
|
+
*
|
|
47
|
+
* @param key - Unique key for this message
|
|
48
|
+
* @param message - The info message to print
|
|
49
|
+
*/
|
|
50
|
+
export declare function printInfoOnce(key: string, message: string): void;
|
|
51
|
+
/**
|
|
52
|
+
* Clears the printed warnings cache.
|
|
53
|
+
* Useful for testing or when you want warnings to be printed again.
|
|
54
|
+
*/
|
|
55
|
+
export declare function clearWarningsCache(): void;
|
|
56
|
+
//# sourceMappingURL=featureWarnings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"featureWarnings.d.ts","sourceRoot":"","sources":["../../../src/utils/featureWarnings.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;CACzB;AAsED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,mBAAmB,EAAE,GAAG,GAAG,mBAAmB,CAkBpF;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,mBAAmB,EACjC,YAAY,EAAE,mBAAmB,GAChC,IAAI,CAkFN;AAOD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAKnE;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAKhE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { WidgetConfiguration } from '@teamvortexsoftware/vortex-types';
|
|
2
|
+
import { ThemeColors } from './themeUtils';
|
|
3
|
+
export interface FormComponentStyle {
|
|
4
|
+
[key: string]: {
|
|
5
|
+
label?: string;
|
|
6
|
+
value?: string | number;
|
|
7
|
+
computedValue?: string;
|
|
8
|
+
unit?: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface FormComponentSettings {
|
|
12
|
+
action?: {
|
|
13
|
+
type: string;
|
|
14
|
+
value: string;
|
|
15
|
+
target?: string;
|
|
16
|
+
};
|
|
17
|
+
size?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface FormComponent {
|
|
20
|
+
id: string;
|
|
21
|
+
type: string;
|
|
22
|
+
subtype?: string;
|
|
23
|
+
label?: string;
|
|
24
|
+
hint?: string;
|
|
25
|
+
name?: string;
|
|
26
|
+
required?: boolean;
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
style?: FormComponentStyle;
|
|
29
|
+
settings?: FormComponentSettings;
|
|
30
|
+
vortex?: {
|
|
31
|
+
role?: string;
|
|
32
|
+
canRemove?: boolean;
|
|
33
|
+
};
|
|
34
|
+
children?: FormComponent[];
|
|
35
|
+
multiValue?: boolean;
|
|
36
|
+
validation?: Array<{
|
|
37
|
+
type: string;
|
|
38
|
+
value: string;
|
|
39
|
+
operator: string;
|
|
40
|
+
canRemove: boolean;
|
|
41
|
+
errorMessage: string;
|
|
42
|
+
}>;
|
|
43
|
+
tagName?: string;
|
|
44
|
+
textContent?: string;
|
|
45
|
+
attributes?: {
|
|
46
|
+
[key: string]: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export interface FormConfiguration {
|
|
50
|
+
value: FormComponent[];
|
|
51
|
+
valueType: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Extracts the form configuration from the widget configuration
|
|
55
|
+
*/
|
|
56
|
+
export declare function extractFormConfiguration(widgetConfiguration?: WidgetConfiguration): FormComponent[] | null;
|
|
57
|
+
/**
|
|
58
|
+
* Converts form component style object to React Native styles
|
|
59
|
+
*/
|
|
60
|
+
export declare function convertFormStyleToRNStyle(style?: FormComponentStyle | Record<string, any>): Record<string, string | number>;
|
|
61
|
+
/**
|
|
62
|
+
* Find a specific component by role in the form configuration
|
|
63
|
+
*/
|
|
64
|
+
export declare function findComponentByRole(formConfig: FormComponent[] | null, role: string): FormComponent | null;
|
|
65
|
+
/**
|
|
66
|
+
* Merges theme styles with component-specific styles from form configuration
|
|
67
|
+
*/
|
|
68
|
+
export declare function mergeThemeAndComponentStyles(themeStyles: Record<string, Record<string, string | number>>, themeColors: ThemeColors, formConfig: FormComponent[] | null): Record<string, Record<string, string | number>>;
|
|
69
|
+
/**
|
|
70
|
+
* Get email input placeholder from form configuration
|
|
71
|
+
*/
|
|
72
|
+
export declare function getEmailPlaceholder(formConfig: FormComponent[] | null): string;
|
|
73
|
+
/**
|
|
74
|
+
* Get submit button label from form configuration
|
|
75
|
+
*/
|
|
76
|
+
export declare function getSubmitButtonLabel(formConfig: FormComponent[] | null): string;
|
|
77
|
+
/**
|
|
78
|
+
* Determines if the form layout uses a grid structure
|
|
79
|
+
*/
|
|
80
|
+
export declare function hasGridLayout(formConfig: FormComponent[] | null): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Determines if email and share components are in separate grid items
|
|
83
|
+
*/
|
|
84
|
+
export declare function hasEmailAndShareInSeparateColumns(formConfig: FormComponent[] | null): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Extract role options from form configuration (e.g., vrtx-select with attributes.name === 'role')
|
|
87
|
+
*/
|
|
88
|
+
export declare function getRoleOptions(formConfig: FormComponent[] | null): Array<{
|
|
89
|
+
id?: string;
|
|
90
|
+
label: string;
|
|
91
|
+
value: string;
|
|
92
|
+
}>;
|
|
93
|
+
//# sourceMappingURL=formUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/formUtils.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gradient Parsing Utilities
|
|
3
|
+
*
|
|
4
|
+
* Pure JavaScript utilities for parsing CSS gradients.
|
|
5
|
+
* These are shared between native (moduleLoaders.ts) and web (moduleLoaders.web.ts)
|
|
6
|
+
* implementations to avoid code duplication.
|
|
7
|
+
*
|
|
8
|
+
* These utilities have NO native dependencies and are safe to import from anywhere.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Parsed gradient data structure
|
|
12
|
+
*/
|
|
13
|
+
export interface ParsedGradient {
|
|
14
|
+
type: 'linear';
|
|
15
|
+
angle: number;
|
|
16
|
+
colors: string[];
|
|
17
|
+
locations: number[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Gradient points for LinearGradient component
|
|
21
|
+
*/
|
|
22
|
+
export interface GradientPoints {
|
|
23
|
+
start: {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
};
|
|
27
|
+
end: {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Parses a CSS linear-gradient string into a structured format.
|
|
34
|
+
*
|
|
35
|
+
* Supports formats like:
|
|
36
|
+
* - "linear-gradient(90deg, #ff0000 0%, #0000ff 100%)"
|
|
37
|
+
* - "linear-gradient(to right, #ff0000 0%, #0000ff 100%)"
|
|
38
|
+
* - "linear-gradient(135deg, rgba(255,0,0,1) 0%, rgba(0,0,255,1) 100%)"
|
|
39
|
+
*
|
|
40
|
+
* @param css - CSS linear-gradient string
|
|
41
|
+
* @returns Parsed gradient data or null if parsing fails
|
|
42
|
+
*/
|
|
43
|
+
export declare function parseCSSLinearGradient(css: string): ParsedGradient | null;
|
|
44
|
+
/**
|
|
45
|
+
* Converts a CSS gradient angle to start/end points for LinearGradient component.
|
|
46
|
+
*
|
|
47
|
+
* CSS gradient angles:
|
|
48
|
+
* - 0deg = bottom to top
|
|
49
|
+
* - 90deg = left to right
|
|
50
|
+
* - 180deg = top to bottom
|
|
51
|
+
* - 270deg = right to left
|
|
52
|
+
*
|
|
53
|
+
* LinearGradient uses normalized coordinates (0-1) for start/end points.
|
|
54
|
+
*
|
|
55
|
+
* @param angle - CSS gradient angle in degrees
|
|
56
|
+
* @returns Start and end points for LinearGradient
|
|
57
|
+
*/
|
|
58
|
+
export declare function angleToGradientPoints(angle: number): GradientPoints;
|
|
59
|
+
/**
|
|
60
|
+
* Extracts the first color from a CSS gradient string.
|
|
61
|
+
* Used as a fallback when gradient libraries are not available.
|
|
62
|
+
*
|
|
63
|
+
* @param gradientString - CSS linear-gradient string
|
|
64
|
+
* @returns First color from the gradient or null
|
|
65
|
+
*/
|
|
66
|
+
export declare function parseGradientFirstColor(gradientString: string): string | null;
|
|
67
|
+
//# sourceMappingURL=gradientUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gradientUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/gradientUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChC,GAAG,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAuDzE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,CAWnE;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAgB7E"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simple event emitter for invitation-related events.
|
|
3
|
+
* Used to notify components (like VrtxOutgoingInvitations) when invitations are created
|
|
4
|
+
* so they can refresh their data.
|
|
5
|
+
*/
|
|
6
|
+
type InvitationEventType = 'invitationCreated' | 'invitationRevoked' | 'invitationAccepted' | 'invitationDeleted';
|
|
7
|
+
type InvitationEventListener = () => void;
|
|
8
|
+
/**
|
|
9
|
+
* Subscribe to an invitation event.
|
|
10
|
+
* @param event The event type to listen for
|
|
11
|
+
* @param listener The callback to invoke when the event is emitted
|
|
12
|
+
* @returns A function to unsubscribe
|
|
13
|
+
*/
|
|
14
|
+
export declare function subscribeToInvitationEvent(event: InvitationEventType, listener: InvitationEventListener): () => void;
|
|
15
|
+
/**
|
|
16
|
+
* Emit an invitation event to notify all subscribers.
|
|
17
|
+
* @param event The event type to emit
|
|
18
|
+
*/
|
|
19
|
+
export declare function emitInvitationEvent(event: InvitationEventType): void;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=invitationEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invitationEvents.d.ts","sourceRoot":"","sources":["../../../src/utils/invitationEvents.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,KAAK,mBAAmB,GAAG,mBAAmB,GAAG,mBAAmB,GAAG,oBAAoB,GAAG,mBAAmB,CAAC;AAElH,KAAK,uBAAuB,GAAG,MAAM,IAAI,CAAC;AAI1C;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,mBAAmB,EAC1B,QAAQ,EAAE,uBAAuB,GAChC,MAAM,IAAI,CAUZ;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,CAWpE"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module Loaders
|
|
3
|
+
*
|
|
4
|
+
* This module provides explicit module loading for optional dependencies.
|
|
5
|
+
* Instead of auto-detecting which libraries are installed (which causes Metro bundler issues),
|
|
6
|
+
* users explicitly specify which module they want to use via props.
|
|
7
|
+
*
|
|
8
|
+
* This approach:
|
|
9
|
+
* - Avoids Metro static analysis issues with optional dependencies
|
|
10
|
+
* - Gives users explicit control over which libraries to use
|
|
11
|
+
* - Provides clear error messages when a module is specified but not installed
|
|
12
|
+
* - Only requires the module that the user explicitly specifies
|
|
13
|
+
*/
|
|
14
|
+
import type { ComponentType } from 'react';
|
|
15
|
+
import type { GradientModuleName, HapticsModuleName, QRCodeModuleName, ClipboardModuleName } from '../context/VortexModulesContext';
|
|
16
|
+
/**
|
|
17
|
+
* Props for gradient components (compatible with both expo and react-native-linear-gradient)
|
|
18
|
+
*/
|
|
19
|
+
export interface GradientProps {
|
|
20
|
+
colors: string[];
|
|
21
|
+
locations?: number[];
|
|
22
|
+
start?: {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
};
|
|
26
|
+
end?: {
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
};
|
|
30
|
+
style?: any;
|
|
31
|
+
children?: React.ReactNode;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Props for QR code components
|
|
35
|
+
*/
|
|
36
|
+
export interface QRCodeProps {
|
|
37
|
+
value: string;
|
|
38
|
+
size?: number;
|
|
39
|
+
color?: string;
|
|
40
|
+
backgroundColor?: string;
|
|
41
|
+
style?: any;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Haptic feedback style
|
|
45
|
+
*/
|
|
46
|
+
export type HapticStyle = 'light' | 'medium' | 'heavy';
|
|
47
|
+
/**
|
|
48
|
+
* Loads the gradient component based on the specified module name.
|
|
49
|
+
*
|
|
50
|
+
* @param moduleName - The gradient module to load ('expo-linear-gradient' or 'react-native-linear-gradient')
|
|
51
|
+
* @returns The gradient component or null if not available
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```tsx
|
|
55
|
+
* const GradientComponent = loadGradientComponent('expo-linear-gradient');
|
|
56
|
+
* if (GradientComponent) {
|
|
57
|
+
* return <GradientComponent colors={['#ff0000', '#0000ff']} style={styles.button} />;
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export declare function loadGradientComponent(moduleName: GradientModuleName | undefined): ComponentType<GradientProps> | null;
|
|
62
|
+
/**
|
|
63
|
+
* Creates a haptic feedback trigger function based on the specified module.
|
|
64
|
+
*
|
|
65
|
+
* @param moduleName - The haptics module to use ('expo-haptics')
|
|
66
|
+
* @returns A function to trigger haptic feedback, or null if not available
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```tsx
|
|
70
|
+
* const triggerHaptic = loadHapticsTrigger('expo-haptics');
|
|
71
|
+
* if (triggerHaptic) {
|
|
72
|
+
* await triggerHaptic('light');
|
|
73
|
+
* }
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
export declare function loadHapticsTrigger(moduleName: HapticsModuleName | undefined): ((style: HapticStyle) => Promise<void>) | null;
|
|
77
|
+
/**
|
|
78
|
+
* Loads the QR code component based on the specified module name.
|
|
79
|
+
*
|
|
80
|
+
* @param moduleName - The QR code module to load ('react-native-qrcode-svg' or 'react-qr-code')
|
|
81
|
+
* @returns The QR code component or null if not available
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```tsx
|
|
85
|
+
* const QRCodeComponent = loadQRCodeComponent('react-native-qrcode-svg');
|
|
86
|
+
* if (QRCodeComponent) {
|
|
87
|
+
* return <QRCodeComponent value="https://example.com" size={200} />;
|
|
88
|
+
* }
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
export declare function loadQRCodeComponent(moduleName: QRCodeModuleName | undefined): ComponentType<QRCodeProps> | null;
|
|
92
|
+
/**
|
|
93
|
+
* Clipboard operations interface
|
|
94
|
+
*/
|
|
95
|
+
export interface ClipboardOperations {
|
|
96
|
+
setString: (text: string) => Promise<void>;
|
|
97
|
+
getString: () => Promise<string>;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Loads clipboard operations based on the specified module.
|
|
101
|
+
*
|
|
102
|
+
* @param moduleName - The clipboard module to use ('expo-clipboard' or '@react-native-clipboard/clipboard')
|
|
103
|
+
* @returns Clipboard operations object or null if not available
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```tsx
|
|
107
|
+
* const clipboard = loadClipboardOperations('expo-clipboard');
|
|
108
|
+
* if (clipboard) {
|
|
109
|
+
* await clipboard.setString('Hello, world!');
|
|
110
|
+
* }
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
export declare function loadClipboardOperations(moduleName: ClipboardModuleName | undefined): ClipboardOperations | null;
|
|
114
|
+
export { parseCSSLinearGradient, angleToGradientPoints, parseGradientFirstColor, type ParsedGradient, type GradientPoints, } from './gradientUtils';
|
|
115
|
+
//# sourceMappingURL=moduleLoaders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moduleLoaders.d.ts","sourceRoot":"","sources":["../../../src/utils/moduleLoaders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AAMzC;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,GAAG,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/B,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAgGvD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,kBAAkB,GAAG,SAAS,GACzC,aAAa,CAAC,aAAa,CAAC,GAAG,IAAI,CAwBrC;AAMD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,iBAAiB,GAAG,SAAS,GACxC,CAAC,CAAC,KAAK,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CA6BhD;AAMD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,gBAAgB,GAAG,SAAS,GACvC,aAAa,CAAC,WAAW,CAAC,GAAG,IAAI,CAanC;AAMD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,SAAS,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;CAClC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,mBAAmB,GAAG,SAAS,GAC1C,mBAAmB,GAAG,IAAI,CAgC5B;AAQD,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Web-Safe Module Loaders
|
|
3
|
+
*
|
|
4
|
+
* This module provides stub implementations for web environments.
|
|
5
|
+
* On web, we use CSS gradients directly, browser clipboard APIs, etc.
|
|
6
|
+
* All loader functions return null, and components use CSS/browser fallbacks.
|
|
7
|
+
*
|
|
8
|
+
* This file is used by InviteFormWeb (web entry point) to avoid
|
|
9
|
+
* importing native modules that would cause Next.js/webpack build errors.
|
|
10
|
+
*/
|
|
11
|
+
import type { ComponentType } from 'react';
|
|
12
|
+
import type { GradientModuleName, HapticsModuleName, QRCodeModuleName, ClipboardModuleName } from '../context/VortexModulesContext';
|
|
13
|
+
/**
|
|
14
|
+
* Props for gradient components
|
|
15
|
+
*/
|
|
16
|
+
export interface GradientProps {
|
|
17
|
+
colors: string[];
|
|
18
|
+
locations?: number[];
|
|
19
|
+
start?: {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
};
|
|
23
|
+
end?: {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
};
|
|
27
|
+
style?: any;
|
|
28
|
+
children?: React.ReactNode;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Props for QR code components
|
|
32
|
+
*/
|
|
33
|
+
export interface QRCodeProps {
|
|
34
|
+
value: string;
|
|
35
|
+
size?: number;
|
|
36
|
+
color?: string;
|
|
37
|
+
backgroundColor?: string;
|
|
38
|
+
style?: any;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Haptic feedback style
|
|
42
|
+
*/
|
|
43
|
+
export type HapticStyle = 'light' | 'medium' | 'heavy';
|
|
44
|
+
/**
|
|
45
|
+
* Clipboard operations interface
|
|
46
|
+
*/
|
|
47
|
+
export interface ClipboardOperations {
|
|
48
|
+
setString: (text: string) => Promise<void>;
|
|
49
|
+
getString: () => Promise<string>;
|
|
50
|
+
}
|
|
51
|
+
export type { ParsedGradient, GradientPoints } from './gradientUtils';
|
|
52
|
+
/**
|
|
53
|
+
* Web-safe gradient loader - always returns null.
|
|
54
|
+
* On web, CSS gradients are used directly via the `background` style property.
|
|
55
|
+
*/
|
|
56
|
+
export declare function loadGradientComponent(_moduleName: GradientModuleName | undefined): ComponentType<GradientProps> | null;
|
|
57
|
+
/**
|
|
58
|
+
* Web-safe haptics loader - always returns null.
|
|
59
|
+
* Haptic feedback doesn't make sense on web.
|
|
60
|
+
*/
|
|
61
|
+
export declare function loadHapticsTrigger(_moduleName: HapticsModuleName | undefined): ((style: HapticStyle) => Promise<void>) | null;
|
|
62
|
+
/**
|
|
63
|
+
* Web-safe QR code loader - returns null for native modules.
|
|
64
|
+
* For web, react-qr-code can be loaded if needed.
|
|
65
|
+
*/
|
|
66
|
+
export declare function loadQRCodeComponent(moduleName: QRCodeModuleName | undefined): ComponentType<QRCodeProps> | null;
|
|
67
|
+
/**
|
|
68
|
+
* Web-safe clipboard loader - always returns null.
|
|
69
|
+
* Web uses navigator.clipboard API directly.
|
|
70
|
+
*/
|
|
71
|
+
export declare function loadClipboardOperations(_moduleName: ClipboardModuleName | undefined): ClipboardOperations | null;
|
|
72
|
+
export { parseCSSLinearGradient, angleToGradientPoints, parseGradientFirstColor, } from './gradientUtils';
|
|
73
|
+
//# sourceMappingURL=moduleLoaders.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moduleLoaders.web.d.ts","sourceRoot":"","sources":["../../../src/utils/moduleLoaders.web.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AAMzC;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,GAAG,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/B,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,SAAS,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;CAClC;AAGD,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAMtE;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,kBAAkB,GAAG,SAAS,GAC1C,aAAa,CAAC,aAAa,CAAC,GAAG,IAAI,CAGrC;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,iBAAiB,GAAG,SAAS,GACzC,CAAC,CAAC,KAAK,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAGhD;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,gBAAgB,GAAG,SAAS,GACvC,aAAa,CAAC,WAAW,CAAC,GAAG,IAAI,CAYnC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,mBAAmB,GAAG,SAAS,GAC3C,mBAAmB,GAAG,IAAI,CAG5B;AAQD,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infers a human-readable name from an email address
|
|
3
|
+
* Handles common separators like dots, dashes, underscores
|
|
4
|
+
*
|
|
5
|
+
* @param email - The email address to extract a name from
|
|
6
|
+
* @returns A capitalized name or the email if extraction fails
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* inferNameFromEmail('john@foo.com') // 'John'
|
|
10
|
+
* inferNameFromEmail('john.doe@example.com') // 'John Doe'
|
|
11
|
+
* inferNameFromEmail('mary-jane@test.com') // 'Mary Jane'
|
|
12
|
+
* inferNameFromEmail('bob_smith123@mail.com') // 'Bob Smith'
|
|
13
|
+
*/
|
|
14
|
+
export declare function inferNameFromEmail(email: string): string;
|
|
15
|
+
//# sourceMappingURL=nameUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nameUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/nameUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CA0BxD"}
|