@retinalabsllc/zairusjs 0.2.1 → 0.2.3

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/index.d.mts CHANGED
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { ToasterProps } from 'react-hot-toast';
3
2
 
4
3
  interface FaqItem {
5
4
  question: string;
@@ -20,6 +19,49 @@ interface ThreeDButtonProps {
20
19
  }
21
20
  declare const ThreeDButton: React.FC<ThreeDButtonProps>;
22
21
 
22
+ interface ThreeDActionButtonProps {
23
+ type?: 'button' | 'submit' | 'reset';
24
+ onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
25
+ disabled?: boolean;
26
+ isLoading?: boolean;
27
+ children: React.ReactNode;
28
+ className?: string;
29
+ ariaLabel?: string;
30
+ }
31
+ declare const ThreeDActionButton: React.FC<ThreeDActionButtonProps>;
32
+
33
+ type AuthMode = "LOGIN" | "SIGNUP";
34
+ interface ZairusAuthProps {
35
+ companyName: string;
36
+ workspaceLabel?: string;
37
+ termsUrl?: string;
38
+ privacyUrl?: string;
39
+ requireNames?: boolean;
40
+ requireOrganization?: boolean;
41
+ useRecaptcha?: boolean;
42
+ recaptchaSiteKey?: string;
43
+ defaultRedirectPath?: string;
44
+ onAuthRequest: (payload: {
45
+ email: string;
46
+ firstName?: string;
47
+ lastName?: string;
48
+ organizationName?: string;
49
+ mode: AuthMode;
50
+ recaptchaToken?: string;
51
+ }) => Promise<{
52
+ success: boolean;
53
+ error?: string;
54
+ }>;
55
+ onVerifyOtp: (payload: {
56
+ email: string;
57
+ code: string;
58
+ }) => Promise<{
59
+ success: boolean;
60
+ error?: string;
61
+ }>;
62
+ }
63
+ declare const ZairusAuth: React.FC<ZairusAuthProps>;
64
+
23
65
  interface HeaderLink {
24
66
  label: string;
25
67
  href: string;
@@ -289,7 +331,7 @@ interface PageSpinnerProps {
289
331
  }
290
332
  declare const PageSpinner: React.FC<PageSpinnerProps>;
291
333
 
292
- declare const ManagedToaster: React.FC<ToasterProps>;
334
+ declare const ManagedToaster: React.FC;
293
335
 
294
336
  interface ManagedNewsletterSplitBlockProps {
295
337
  tagline?: string;
@@ -381,4 +423,137 @@ interface GifFeatureCardProps {
381
423
  }
382
424
  declare const GifFeatureCard: React.FC<GifFeatureCardProps>;
383
425
 
384
- export { AITranscriptionFeature, type AITranscriptionFeatureProps, AppBento2, type AppBento2Props, type BentoFeature, type BoardMember, type CompanyDetails, type DocumentSectionData, type EmailContact, Faq, type FaqItem, type FaqProps, FeatureScroll, type FeatureScrollProps, Footer, type FooterColumn, type FooterLink, type FooterProps, GifFeatureCard, type GifFeatureCardProps, Header, type HeaderLink, type HeaderProps, HeroSection, type HeroSectionProps, ManagedBoardBlock, type ManagedBoardBlockProps, ManagedContactBlock, type ManagedContactBlockProps, ManagedDocument, type ManagedDocumentProps, ManagedNewsletterSplitBlock, type ManagedNewsletterSplitBlockProps, ManagedNotFoundBlock, type ManagedNotFoundBlockProps, ManagedPricingBlock, type ManagedPricingBlockProps, ManagedProjectsBlock, type ManagedProjectsBlockProps, ManagedToaster, NumberInput, type NumberInputProps, PageSpinner, type PageSpinnerProps, type PlatformFeatureItem, PlatformFeatures, type PlatformFeaturesProps, PortfolioHero, type PortfolioHeroProps, type PricingFeature, type PricingPlan, ProductHero, type ProductHeroProps, type ProjectItem, type ScrollFeature, type SocialContact, type SocialLink, TextInput, type TextInputProps, ThreeDButton, type ThreeDButtonProps };
426
+ interface NavItem {
427
+ name: string;
428
+ path: string;
429
+ icon: any;
430
+ }
431
+ interface UniversalSidebarProps {
432
+ /** Navigation items to render */
433
+ navItems: NavItem[];
434
+ /** The current active path to determine highlight state */
435
+ currentPath: string;
436
+ /** Mobile drawer state */
437
+ isMobileOpen: boolean;
438
+ /** Function to close the mobile drawer */
439
+ closeMobile: () => void;
440
+ /** Optional click interceptor (useful for unsaved changes warnings) */
441
+ onNavClick?: (e: React.MouseEvent<HTMLAnchorElement>, path: string) => void;
442
+ showInterceptDialog?: boolean;
443
+ onCancelIntercept?: () => void;
444
+ onConfirmIntercept?: () => void;
445
+ interceptTitle?: string;
446
+ interceptMessage?: string;
447
+ }
448
+ declare const UniversalSidebar: React.FC<UniversalSidebarProps>;
449
+
450
+ interface WorkspaceItem {
451
+ id: string;
452
+ name: string;
453
+ role: string;
454
+ }
455
+ interface UniversalHeaderProps {
456
+ /** Mobile drawer trigger */
457
+ onOpenMobile: () => void;
458
+ /** Top left typography */
459
+ title: string;
460
+ subtitle?: string;
461
+ homeUrl?: string;
462
+ /** Configuration Booleans */
463
+ showBackButton?: boolean;
464
+ backUrl?: string;
465
+ showWorkspaceSwitcher?: boolean;
466
+ workspaces?: WorkspaceItem[];
467
+ activeWorkspaceId?: string;
468
+ onSwitchWorkspace?: (orgId: string) => void;
469
+ showLogoutAction?: boolean;
470
+ onLogout?: () => Promise<void>;
471
+ }
472
+ declare const UniversalHeader: React.FC<UniversalHeaderProps>;
473
+
474
+ interface UniversalOrganizationPageProps {
475
+ initialOrgName: string;
476
+ initialSlug: string;
477
+ orgId: string;
478
+ isReadOnly?: boolean;
479
+ slugPrefixUrl?: string;
480
+ onSaveConfiguration: (payload: {
481
+ organizationId: string;
482
+ organizationName?: string;
483
+ slug?: string;
484
+ }) => Promise<{
485
+ success: boolean;
486
+ error?: string;
487
+ }>;
488
+ onCheckSlugAvailability: (slug: string) => Promise<{
489
+ available: boolean;
490
+ }>;
491
+ }
492
+ declare const UniversalOrganizationPage: React.FC<UniversalOrganizationPageProps>;
493
+
494
+ interface UniversalIdentityPageProps {
495
+ headerTitle: string;
496
+ headerDescription: string;
497
+ primaryInputLabel: string;
498
+ secondaryInputLabel?: string;
499
+ initialPrimaryValue: string;
500
+ initialSecondaryValue?: string;
501
+ resourceId: string;
502
+ isReadOnly?: boolean;
503
+ allowDeletion?: boolean;
504
+ deleteWarningText?: string;
505
+ onSaveIdentity: (payload: {
506
+ resourceId: string;
507
+ primaryValue?: string;
508
+ secondaryValue?: string;
509
+ }) => Promise<{
510
+ success: boolean;
511
+ error?: string;
512
+ }>;
513
+ onDeleteResource?: (resourceId: string) => Promise<{
514
+ success: boolean;
515
+ error?: string;
516
+ }>;
517
+ onSuccessfulDeleteRedirect?: string;
518
+ }
519
+ declare const UniversalIdentityPage: React.FC<UniversalIdentityPageProps>;
520
+
521
+ interface UniversalMember {
522
+ id: string;
523
+ userId: string;
524
+ fullName: string;
525
+ email: string;
526
+ displayImage?: string;
527
+ profileColor?: string;
528
+ role: string;
529
+ joinedAt: string | Date;
530
+ }
531
+ interface UniversalMembersPageProps {
532
+ headerTitle: string;
533
+ headerDescription: string;
534
+ currentUserId?: string;
535
+ members: UniversalMember[];
536
+ isLoading: boolean;
537
+ currentPage: number;
538
+ totalPages: number;
539
+ onPageChange: (page: number) => void;
540
+ canManage: boolean;
541
+ canChangeRoles: boolean;
542
+ availableRoles: string[];
543
+ requireNamesForInvite: boolean;
544
+ onInviteMember: (email: string, firstName?: string, lastName?: string) => Promise<{
545
+ success: boolean;
546
+ error?: string;
547
+ }>;
548
+ onRemoveMember: (member: UniversalMember) => Promise<{
549
+ success: boolean;
550
+ error?: string;
551
+ }>;
552
+ onUpdateRole: (member: UniversalMember, newRole: string) => Promise<{
553
+ success: boolean;
554
+ error?: string;
555
+ }>;
556
+ }
557
+ declare const UniversalMembersPage: React.FC<UniversalMembersPageProps>;
558
+
559
+ export { AITranscriptionFeature, type AITranscriptionFeatureProps, AppBento2, type AppBento2Props, type BentoFeature, type BoardMember, type CompanyDetails, type DocumentSectionData, type EmailContact, Faq, type FaqItem, type FaqProps, FeatureScroll, type FeatureScrollProps, Footer, type FooterColumn, type FooterLink, type FooterProps, GifFeatureCard, type GifFeatureCardProps, Header, type HeaderLink, type HeaderProps, HeroSection, type HeroSectionProps, ManagedBoardBlock, type ManagedBoardBlockProps, ManagedContactBlock, type ManagedContactBlockProps, ManagedDocument, type ManagedDocumentProps, ManagedNewsletterSplitBlock, type ManagedNewsletterSplitBlockProps, ManagedNotFoundBlock, type ManagedNotFoundBlockProps, ManagedPricingBlock, type ManagedPricingBlockProps, ManagedProjectsBlock, type ManagedProjectsBlockProps, ManagedToaster, type NavItem, NumberInput, type NumberInputProps, PageSpinner, type PageSpinnerProps, type PlatformFeatureItem, PlatformFeatures, type PlatformFeaturesProps, PortfolioHero, type PortfolioHeroProps, type PricingFeature, type PricingPlan, ProductHero, type ProductHeroProps, type ProjectItem, type ScrollFeature, type SocialContact, type SocialLink, TextInput, type TextInputProps, ThreeDActionButton, type ThreeDActionButtonProps, ThreeDButton, type ThreeDButtonProps, UniversalHeader, type UniversalHeaderProps, UniversalIdentityPage, type UniversalIdentityPageProps, type UniversalMember, UniversalMembersPage, type UniversalMembersPageProps, UniversalOrganizationPage, type UniversalOrganizationPageProps, UniversalSidebar, type UniversalSidebarProps, type WorkspaceItem, ZairusAuth, type ZairusAuthProps };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { ToasterProps } from 'react-hot-toast';
3
2
 
4
3
  interface FaqItem {
5
4
  question: string;
@@ -20,6 +19,49 @@ interface ThreeDButtonProps {
20
19
  }
21
20
  declare const ThreeDButton: React.FC<ThreeDButtonProps>;
22
21
 
22
+ interface ThreeDActionButtonProps {
23
+ type?: 'button' | 'submit' | 'reset';
24
+ onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
25
+ disabled?: boolean;
26
+ isLoading?: boolean;
27
+ children: React.ReactNode;
28
+ className?: string;
29
+ ariaLabel?: string;
30
+ }
31
+ declare const ThreeDActionButton: React.FC<ThreeDActionButtonProps>;
32
+
33
+ type AuthMode = "LOGIN" | "SIGNUP";
34
+ interface ZairusAuthProps {
35
+ companyName: string;
36
+ workspaceLabel?: string;
37
+ termsUrl?: string;
38
+ privacyUrl?: string;
39
+ requireNames?: boolean;
40
+ requireOrganization?: boolean;
41
+ useRecaptcha?: boolean;
42
+ recaptchaSiteKey?: string;
43
+ defaultRedirectPath?: string;
44
+ onAuthRequest: (payload: {
45
+ email: string;
46
+ firstName?: string;
47
+ lastName?: string;
48
+ organizationName?: string;
49
+ mode: AuthMode;
50
+ recaptchaToken?: string;
51
+ }) => Promise<{
52
+ success: boolean;
53
+ error?: string;
54
+ }>;
55
+ onVerifyOtp: (payload: {
56
+ email: string;
57
+ code: string;
58
+ }) => Promise<{
59
+ success: boolean;
60
+ error?: string;
61
+ }>;
62
+ }
63
+ declare const ZairusAuth: React.FC<ZairusAuthProps>;
64
+
23
65
  interface HeaderLink {
24
66
  label: string;
25
67
  href: string;
@@ -289,7 +331,7 @@ interface PageSpinnerProps {
289
331
  }
290
332
  declare const PageSpinner: React.FC<PageSpinnerProps>;
291
333
 
292
- declare const ManagedToaster: React.FC<ToasterProps>;
334
+ declare const ManagedToaster: React.FC;
293
335
 
294
336
  interface ManagedNewsletterSplitBlockProps {
295
337
  tagline?: string;
@@ -381,4 +423,137 @@ interface GifFeatureCardProps {
381
423
  }
382
424
  declare const GifFeatureCard: React.FC<GifFeatureCardProps>;
383
425
 
384
- export { AITranscriptionFeature, type AITranscriptionFeatureProps, AppBento2, type AppBento2Props, type BentoFeature, type BoardMember, type CompanyDetails, type DocumentSectionData, type EmailContact, Faq, type FaqItem, type FaqProps, FeatureScroll, type FeatureScrollProps, Footer, type FooterColumn, type FooterLink, type FooterProps, GifFeatureCard, type GifFeatureCardProps, Header, type HeaderLink, type HeaderProps, HeroSection, type HeroSectionProps, ManagedBoardBlock, type ManagedBoardBlockProps, ManagedContactBlock, type ManagedContactBlockProps, ManagedDocument, type ManagedDocumentProps, ManagedNewsletterSplitBlock, type ManagedNewsletterSplitBlockProps, ManagedNotFoundBlock, type ManagedNotFoundBlockProps, ManagedPricingBlock, type ManagedPricingBlockProps, ManagedProjectsBlock, type ManagedProjectsBlockProps, ManagedToaster, NumberInput, type NumberInputProps, PageSpinner, type PageSpinnerProps, type PlatformFeatureItem, PlatformFeatures, type PlatformFeaturesProps, PortfolioHero, type PortfolioHeroProps, type PricingFeature, type PricingPlan, ProductHero, type ProductHeroProps, type ProjectItem, type ScrollFeature, type SocialContact, type SocialLink, TextInput, type TextInputProps, ThreeDButton, type ThreeDButtonProps };
426
+ interface NavItem {
427
+ name: string;
428
+ path: string;
429
+ icon: any;
430
+ }
431
+ interface UniversalSidebarProps {
432
+ /** Navigation items to render */
433
+ navItems: NavItem[];
434
+ /** The current active path to determine highlight state */
435
+ currentPath: string;
436
+ /** Mobile drawer state */
437
+ isMobileOpen: boolean;
438
+ /** Function to close the mobile drawer */
439
+ closeMobile: () => void;
440
+ /** Optional click interceptor (useful for unsaved changes warnings) */
441
+ onNavClick?: (e: React.MouseEvent<HTMLAnchorElement>, path: string) => void;
442
+ showInterceptDialog?: boolean;
443
+ onCancelIntercept?: () => void;
444
+ onConfirmIntercept?: () => void;
445
+ interceptTitle?: string;
446
+ interceptMessage?: string;
447
+ }
448
+ declare const UniversalSidebar: React.FC<UniversalSidebarProps>;
449
+
450
+ interface WorkspaceItem {
451
+ id: string;
452
+ name: string;
453
+ role: string;
454
+ }
455
+ interface UniversalHeaderProps {
456
+ /** Mobile drawer trigger */
457
+ onOpenMobile: () => void;
458
+ /** Top left typography */
459
+ title: string;
460
+ subtitle?: string;
461
+ homeUrl?: string;
462
+ /** Configuration Booleans */
463
+ showBackButton?: boolean;
464
+ backUrl?: string;
465
+ showWorkspaceSwitcher?: boolean;
466
+ workspaces?: WorkspaceItem[];
467
+ activeWorkspaceId?: string;
468
+ onSwitchWorkspace?: (orgId: string) => void;
469
+ showLogoutAction?: boolean;
470
+ onLogout?: () => Promise<void>;
471
+ }
472
+ declare const UniversalHeader: React.FC<UniversalHeaderProps>;
473
+
474
+ interface UniversalOrganizationPageProps {
475
+ initialOrgName: string;
476
+ initialSlug: string;
477
+ orgId: string;
478
+ isReadOnly?: boolean;
479
+ slugPrefixUrl?: string;
480
+ onSaveConfiguration: (payload: {
481
+ organizationId: string;
482
+ organizationName?: string;
483
+ slug?: string;
484
+ }) => Promise<{
485
+ success: boolean;
486
+ error?: string;
487
+ }>;
488
+ onCheckSlugAvailability: (slug: string) => Promise<{
489
+ available: boolean;
490
+ }>;
491
+ }
492
+ declare const UniversalOrganizationPage: React.FC<UniversalOrganizationPageProps>;
493
+
494
+ interface UniversalIdentityPageProps {
495
+ headerTitle: string;
496
+ headerDescription: string;
497
+ primaryInputLabel: string;
498
+ secondaryInputLabel?: string;
499
+ initialPrimaryValue: string;
500
+ initialSecondaryValue?: string;
501
+ resourceId: string;
502
+ isReadOnly?: boolean;
503
+ allowDeletion?: boolean;
504
+ deleteWarningText?: string;
505
+ onSaveIdentity: (payload: {
506
+ resourceId: string;
507
+ primaryValue?: string;
508
+ secondaryValue?: string;
509
+ }) => Promise<{
510
+ success: boolean;
511
+ error?: string;
512
+ }>;
513
+ onDeleteResource?: (resourceId: string) => Promise<{
514
+ success: boolean;
515
+ error?: string;
516
+ }>;
517
+ onSuccessfulDeleteRedirect?: string;
518
+ }
519
+ declare const UniversalIdentityPage: React.FC<UniversalIdentityPageProps>;
520
+
521
+ interface UniversalMember {
522
+ id: string;
523
+ userId: string;
524
+ fullName: string;
525
+ email: string;
526
+ displayImage?: string;
527
+ profileColor?: string;
528
+ role: string;
529
+ joinedAt: string | Date;
530
+ }
531
+ interface UniversalMembersPageProps {
532
+ headerTitle: string;
533
+ headerDescription: string;
534
+ currentUserId?: string;
535
+ members: UniversalMember[];
536
+ isLoading: boolean;
537
+ currentPage: number;
538
+ totalPages: number;
539
+ onPageChange: (page: number) => void;
540
+ canManage: boolean;
541
+ canChangeRoles: boolean;
542
+ availableRoles: string[];
543
+ requireNamesForInvite: boolean;
544
+ onInviteMember: (email: string, firstName?: string, lastName?: string) => Promise<{
545
+ success: boolean;
546
+ error?: string;
547
+ }>;
548
+ onRemoveMember: (member: UniversalMember) => Promise<{
549
+ success: boolean;
550
+ error?: string;
551
+ }>;
552
+ onUpdateRole: (member: UniversalMember, newRole: string) => Promise<{
553
+ success: boolean;
554
+ error?: string;
555
+ }>;
556
+ }
557
+ declare const UniversalMembersPage: React.FC<UniversalMembersPageProps>;
558
+
559
+ export { AITranscriptionFeature, type AITranscriptionFeatureProps, AppBento2, type AppBento2Props, type BentoFeature, type BoardMember, type CompanyDetails, type DocumentSectionData, type EmailContact, Faq, type FaqItem, type FaqProps, FeatureScroll, type FeatureScrollProps, Footer, type FooterColumn, type FooterLink, type FooterProps, GifFeatureCard, type GifFeatureCardProps, Header, type HeaderLink, type HeaderProps, HeroSection, type HeroSectionProps, ManagedBoardBlock, type ManagedBoardBlockProps, ManagedContactBlock, type ManagedContactBlockProps, ManagedDocument, type ManagedDocumentProps, ManagedNewsletterSplitBlock, type ManagedNewsletterSplitBlockProps, ManagedNotFoundBlock, type ManagedNotFoundBlockProps, ManagedPricingBlock, type ManagedPricingBlockProps, ManagedProjectsBlock, type ManagedProjectsBlockProps, ManagedToaster, type NavItem, NumberInput, type NumberInputProps, PageSpinner, type PageSpinnerProps, type PlatformFeatureItem, PlatformFeatures, type PlatformFeaturesProps, PortfolioHero, type PortfolioHeroProps, type PricingFeature, type PricingPlan, ProductHero, type ProductHeroProps, type ProjectItem, type ScrollFeature, type SocialContact, type SocialLink, TextInput, type TextInputProps, ThreeDActionButton, type ThreeDActionButtonProps, ThreeDButton, type ThreeDButtonProps, UniversalHeader, type UniversalHeaderProps, UniversalIdentityPage, type UniversalIdentityPageProps, type UniversalMember, UniversalMembersPage, type UniversalMembersPageProps, UniversalOrganizationPage, type UniversalOrganizationPageProps, UniversalSidebar, type UniversalSidebarProps, type WorkspaceItem, ZairusAuth, type ZairusAuthProps };