@fayz-ai/saas 0.1.6
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/app/AdminShell.d.ts +31 -0
- package/dist/app/AdminShell.d.ts.map +1 -0
- package/dist/app/LoginPage.d.ts +17 -0
- package/dist/app/LoginPage.d.ts.map +1 -0
- package/dist/app/config.d.ts +83 -0
- package/dist/app/config.d.ts.map +1 -0
- package/dist/app/createFayzApp.d.ts +11 -0
- package/dist/app/createFayzApp.d.ts.map +1 -0
- package/dist/app/routing.d.ts +10 -0
- package/dist/app/routing.d.ts.map +1 -0
- package/dist/app/scaffold.d.ts +17 -0
- package/dist/app/scaffold.d.ts.map +1 -0
- package/dist/archetype-lookup.d.ts +30 -0
- package/dist/archetype-lookup.d.ts.map +1 -0
- package/dist/billing/index.cjs +12 -0
- package/dist/billing/index.cjs.map +1 -0
- package/dist/billing/index.d.ts +3 -0
- package/dist/billing/index.d.ts.map +1 -0
- package/dist/billing/index.js +3 -0
- package/dist/billing/index.js.map +1 -0
- package/dist/billing/store.d.ts +35 -0
- package/dist/billing/store.d.ts.map +1 -0
- package/dist/chunk-4XTQ4V5L.cjs +124 -0
- package/dist/chunk-4XTQ4V5L.cjs.map +1 -0
- package/dist/chunk-5GYQK5IW.js +21 -0
- package/dist/chunk-5GYQK5IW.js.map +1 -0
- package/dist/chunk-DJW67TCY.js +781 -0
- package/dist/chunk-DJW67TCY.js.map +1 -0
- package/dist/chunk-KYID2MR6.cjs +23 -0
- package/dist/chunk-KYID2MR6.cjs.map +1 -0
- package/dist/chunk-QGMDVLLW.cjs +816 -0
- package/dist/chunk-QGMDVLLW.cjs.map +1 -0
- package/dist/chunk-XNWCGJYH.js +97 -0
- package/dist/chunk-XNWCGJYH.js.map +1 -0
- package/dist/components/shared/PersonLink.d.ts +18 -0
- package/dist/components/shared/PersonLink.d.ts.map +1 -0
- package/dist/crud/CrudCardGrid.d.ts +13 -0
- package/dist/crud/CrudCardGrid.d.ts.map +1 -0
- package/dist/crud/CrudDetailPage.d.ts +18 -0
- package/dist/crud/CrudDetailPage.d.ts.map +1 -0
- package/dist/crud/CrudFormPage.d.ts +18 -0
- package/dist/crud/CrudFormPage.d.ts.map +1 -0
- package/dist/crud/CrudListView.d.ts +51 -0
- package/dist/crud/CrudListView.d.ts.map +1 -0
- package/dist/crud/CrudPage.d.ts +20 -0
- package/dist/crud/CrudPage.d.ts.map +1 -0
- package/dist/crud/DeleteConfirmDialog.d.ts +11 -0
- package/dist/crud/DeleteConfirmDialog.d.ts.map +1 -0
- package/dist/crud/EntityOverview.d.ts +14 -0
- package/dist/crud/EntityOverview.d.ts.map +1 -0
- package/dist/crud/ImportWizard.d.ts +18 -0
- package/dist/crud/ImportWizard.d.ts.map +1 -0
- package/dist/crud/archetypes/ActiveToggle.d.ts +8 -0
- package/dist/crud/archetypes/ActiveToggle.d.ts.map +1 -0
- package/dist/crud/archetypes/ArchetypeStatusBar.d.ts +11 -0
- package/dist/crud/archetypes/ArchetypeStatusBar.d.ts.map +1 -0
- package/dist/crud/archetypes/BlockSettingsPopover.d.ts +15 -0
- package/dist/crud/archetypes/BlockSettingsPopover.d.ts.map +1 -0
- package/dist/crud/archetypes/EntityLink.d.ts +32 -0
- package/dist/crud/archetypes/EntityLink.d.ts.map +1 -0
- package/dist/crud/archetypes/LocationDetailTabs.d.ts +11 -0
- package/dist/crud/archetypes/LocationDetailTabs.d.ts.map +1 -0
- package/dist/crud/archetypes/LocationFormLayout.d.ts +12 -0
- package/dist/crud/archetypes/LocationFormLayout.d.ts.map +1 -0
- package/dist/crud/archetypes/PersonDetailTabs.d.ts +22 -0
- package/dist/crud/archetypes/PersonDetailTabs.d.ts.map +1 -0
- package/dist/crud/archetypes/PersonFormLayout.d.ts +13 -0
- package/dist/crud/archetypes/PersonFormLayout.d.ts.map +1 -0
- package/dist/crud/archetypes/PersonPicker.d.ts +23 -0
- package/dist/crud/archetypes/PersonPicker.d.ts.map +1 -0
- package/dist/crud/archetypes/ProductDetailTabs.d.ts +11 -0
- package/dist/crud/archetypes/ProductDetailTabs.d.ts.map +1 -0
- package/dist/crud/archetypes/ProductFormLayout.d.ts +12 -0
- package/dist/crud/archetypes/ProductFormLayout.d.ts.map +1 -0
- package/dist/crud/archetypes/ScheduleEditor.d.ts +7 -0
- package/dist/crud/archetypes/ScheduleEditor.d.ts.map +1 -0
- package/dist/crud/archetypes/ServiceDetailTabs.d.ts +10 -0
- package/dist/crud/archetypes/ServiceDetailTabs.d.ts.map +1 -0
- package/dist/crud/archetypes/ServiceFormLayout.d.ts +12 -0
- package/dist/crud/archetypes/ServiceFormLayout.d.ts.map +1 -0
- package/dist/crud/archetypes/SubjectDetailTabs.d.ts +12 -0
- package/dist/crud/archetypes/SubjectDetailTabs.d.ts.map +1 -0
- package/dist/crud/archetypes/SubjectFormLayout.d.ts +14 -0
- package/dist/crud/archetypes/SubjectFormLayout.d.ts.map +1 -0
- package/dist/crud/createCrudPage.d.ts +20 -0
- package/dist/crud/createCrudPage.d.ts.map +1 -0
- package/dist/crud/csv-export.d.ts +3 -0
- package/dist/crud/csv-export.d.ts.map +1 -0
- package/dist/crud/fieldToColumn.d.ts +14 -0
- package/dist/crud/fieldToColumn.d.ts.map +1 -0
- package/dist/crud/index.d.ts +12 -0
- package/dist/crud/index.d.ts.map +1 -0
- package/dist/hooks/useFieldRules.d.ts +5 -0
- package/dist/hooks/useFieldRules.d.ts.map +1 -0
- package/dist/hooks/useModuleNavigation.d.ts +25 -0
- package/dist/hooks/useModuleNavigation.d.ts.map +1 -0
- package/dist/hooks/usePluginPrefs.d.ts +23 -0
- package/dist/hooks/usePluginPrefs.d.ts.map +1 -0
- package/dist/index.cjs +13880 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13730 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/currency.d.ts +13 -0
- package/dist/lib/currency.d.ts.map +1 -0
- package/dist/lib/entity-routes.d.ts +24 -0
- package/dist/lib/entity-routes.d.ts.map +1 -0
- package/dist/lib/schedule-config.d.ts +32 -0
- package/dist/lib/schedule-config.d.ts.map +1 -0
- package/dist/lib/schedule-service.d.ts +76 -0
- package/dist/lib/schedule-service.d.ts.map +1 -0
- package/dist/org/adapters/mock.d.ts +4 -0
- package/dist/org/adapters/mock.d.ts.map +1 -0
- package/dist/org/adapters/supabase.d.ts +7 -0
- package/dist/org/adapters/supabase.d.ts.map +1 -0
- package/dist/org/context.d.ts +29 -0
- package/dist/org/context.d.ts.map +1 -0
- package/dist/org/index.cjs +44 -0
- package/dist/org/index.cjs.map +1 -0
- package/dist/org/index.d.ts +8 -0
- package/dist/org/index.d.ts.map +1 -0
- package/dist/org/index.js +3 -0
- package/dist/org/index.js.map +1 -0
- package/dist/org/store.d.ts +16 -0
- package/dist/org/store.d.ts.map +1 -0
- package/dist/permissions/PermissionGate.d.ts +12 -0
- package/dist/permissions/PermissionGate.d.ts.map +1 -0
- package/dist/permissions/context.d.ts +37 -0
- package/dist/permissions/context.d.ts.map +1 -0
- package/dist/permissions/index.cjs +32 -0
- package/dist/permissions/index.cjs.map +1 -0
- package/dist/permissions/index.d.ts +5 -0
- package/dist/permissions/index.d.ts.map +1 -0
- package/dist/permissions/index.js +3 -0
- package/dist/permissions/index.js.map +1 -0
- package/dist/permissions/store.d.ts +21 -0
- package/dist/permissions/store.d.ts.map +1 -0
- package/dist/placeholder.d.ts +7 -0
- package/dist/placeholder.d.ts.map +1 -0
- package/dist/plugins/ModuleActionBar.d.ts +27 -0
- package/dist/plugins/ModuleActionBar.d.ts.map +1 -0
- package/dist/plugins/PluginRegistryManager.d.ts +13 -0
- package/dist/plugins/PluginRegistryManager.d.ts.map +1 -0
- package/dist/plugins/QuickActionsButton.d.ts +12 -0
- package/dist/plugins/QuickActionsButton.d.ts.map +1 -0
- package/dist/plugins/SettingsGroup.d.ts +25 -0
- package/dist/plugins/SettingsGroup.d.ts.map +1 -0
- package/dist/plugins/WidgetSlot.d.ts +8 -0
- package/dist/plugins/WidgetSlot.d.ts.map +1 -0
- package/dist/plugins/createPluginContext.d.ts +28 -0
- package/dist/plugins/createPluginContext.d.ts.map +1 -0
- package/dist/plugins/createViewRouter.d.ts +38 -0
- package/dist/plugins/createViewRouter.d.ts.map +1 -0
- package/dist/shell/components/auth/CenteredLogin.d.ts +13 -0
- package/dist/shell/components/auth/CenteredLogin.d.ts.map +1 -0
- package/dist/shell/components/auth/LoginForm.d.ts +12 -0
- package/dist/shell/components/auth/LoginForm.d.ts.map +1 -0
- package/dist/shell/components/auth/LoginPage.d.ts +15 -0
- package/dist/shell/components/auth/LoginPage.d.ts.map +1 -0
- package/dist/shell/components/auth/OAuthButtons.d.ts +10 -0
- package/dist/shell/components/auth/OAuthButtons.d.ts.map +1 -0
- package/dist/shell/components/auth/ProtectedRoute.d.ts +11 -0
- package/dist/shell/components/auth/ProtectedRoute.d.ts.map +1 -0
- package/dist/shell/components/auth/RecoveryForm.d.ts +9 -0
- package/dist/shell/components/auth/RecoveryForm.d.ts.map +1 -0
- package/dist/shell/components/auth/SignupForm.d.ts +10 -0
- package/dist/shell/components/auth/SignupForm.d.ts.map +1 -0
- package/dist/shell/components/auth/SplitLogin.d.ts +14 -0
- package/dist/shell/components/auth/SplitLogin.d.ts.map +1 -0
- package/dist/shell/components/auth/index.d.ts +7 -0
- package/dist/shell/components/auth/index.d.ts.map +1 -0
- package/dist/shell/components/billing/BillingPage.d.ts +7 -0
- package/dist/shell/components/billing/BillingPage.d.ts.map +1 -0
- package/dist/shell/components/billing/InvoiceList.d.ts +9 -0
- package/dist/shell/components/billing/InvoiceList.d.ts.map +1 -0
- package/dist/shell/components/billing/PaywallGate.d.ts +11 -0
- package/dist/shell/components/billing/PaywallGate.d.ts.map +1 -0
- package/dist/shell/components/billing/PlanSelector.d.ts +13 -0
- package/dist/shell/components/billing/PlanSelector.d.ts.map +1 -0
- package/dist/shell/components/billing/SubscriptionCard.d.ts +12 -0
- package/dist/shell/components/billing/SubscriptionCard.d.ts.map +1 -0
- package/dist/shell/components/billing/index.d.ts +6 -0
- package/dist/shell/components/billing/index.d.ts.map +1 -0
- package/dist/shell/components/chat/ChatFab.d.ts +9 -0
- package/dist/shell/components/chat/ChatFab.d.ts.map +1 -0
- package/dist/shell/components/chat/ChatPanel.d.ts +10 -0
- package/dist/shell/components/chat/ChatPanel.d.ts.map +1 -0
- package/dist/shell/components/chat/ChatSuggestions.d.ts +14 -0
- package/dist/shell/components/chat/ChatSuggestions.d.ts.map +1 -0
- package/dist/shell/components/chat/index.d.ts +3 -0
- package/dist/shell/components/chat/index.d.ts.map +1 -0
- package/dist/shell/components/crud/archetypes/ClientOrdersTab.d.ts +16 -0
- package/dist/shell/components/crud/archetypes/ClientOrdersTab.d.ts.map +1 -0
- package/dist/shell/components/layout/BottomNav.d.ts +24 -0
- package/dist/shell/components/layout/BottomNav.d.ts.map +1 -0
- package/dist/shell/components/layout/CommandPalette.d.ts +29 -0
- package/dist/shell/components/layout/CommandPalette.d.ts.map +1 -0
- package/dist/shell/components/layout/LocationSwitchOverlay.d.ts +3 -0
- package/dist/shell/components/layout/LocationSwitchOverlay.d.ts.map +1 -0
- package/dist/shell/components/layout/MockModeBanner.d.ts +3 -0
- package/dist/shell/components/layout/MockModeBanner.d.ts.map +1 -0
- package/dist/shell/components/layout/PrintChrome.d.ts +10 -0
- package/dist/shell/components/layout/PrintChrome.d.ts.map +1 -0
- package/dist/shell/components/layout/index.d.ts +6 -0
- package/dist/shell/components/layout/index.d.ts.map +1 -0
- package/dist/shell/components/notifications/ChangelogFeed.d.ts +8 -0
- package/dist/shell/components/notifications/ChangelogFeed.d.ts.map +1 -0
- package/dist/shell/components/notifications/NotificationBell.d.ts +9 -0
- package/dist/shell/components/notifications/NotificationBell.d.ts.map +1 -0
- package/dist/shell/components/notifications/NotificationInbox.d.ts +13 -0
- package/dist/shell/components/notifications/NotificationInbox.d.ts.map +1 -0
- package/dist/shell/components/notifications/ToastProvider.d.ts +2 -0
- package/dist/shell/components/notifications/ToastProvider.d.ts.map +1 -0
- package/dist/shell/components/notifications/index.d.ts +5 -0
- package/dist/shell/components/notifications/index.d.ts.map +1 -0
- package/dist/shell/components/organization/ImpersonationBanner.d.ts +3 -0
- package/dist/shell/components/organization/ImpersonationBanner.d.ts.map +1 -0
- package/dist/shell/components/organization/InviteMemberDialog.d.ts +10 -0
- package/dist/shell/components/organization/InviteMemberDialog.d.ts.map +1 -0
- package/dist/shell/components/organization/OrgInitializer.d.ts +7 -0
- package/dist/shell/components/organization/OrgInitializer.d.ts.map +1 -0
- package/dist/shell/components/organization/OrgSwitcher.d.ts +7 -0
- package/dist/shell/components/organization/OrgSwitcher.d.ts.map +1 -0
- package/dist/shell/components/organization/PermissionGate.d.ts +11 -0
- package/dist/shell/components/organization/PermissionGate.d.ts.map +1 -0
- package/dist/shell/components/organization/PermissionMatrixEditor.d.ts +17 -0
- package/dist/shell/components/organization/PermissionMatrixEditor.d.ts.map +1 -0
- package/dist/shell/components/organization/PermissionProfilesTab.d.ts +3 -0
- package/dist/shell/components/organization/PermissionProfilesTab.d.ts.map +1 -0
- package/dist/shell/components/organization/TeamTab.d.ts +3 -0
- package/dist/shell/components/organization/TeamTab.d.ts.map +1 -0
- package/dist/shell/components/organization/TenantOnboarding.d.ts +9 -0
- package/dist/shell/components/organization/TenantOnboarding.d.ts.map +1 -0
- package/dist/shell/components/organization/index.d.ts +8 -0
- package/dist/shell/components/organization/index.d.ts.map +1 -0
- package/dist/shell/components/plugins/PluginSettingsPanel.d.ts +23 -0
- package/dist/shell/components/plugins/PluginSettingsPanel.d.ts.map +1 -0
- package/dist/shell/components/settings/BrandingSettings.d.ts +12 -0
- package/dist/shell/components/settings/BrandingSettings.d.ts.map +1 -0
- package/dist/shell/components/settings/CompanySettings.d.ts +13 -0
- package/dist/shell/components/settings/CompanySettings.d.ts.map +1 -0
- package/dist/shell/components/settings/ConnectedBrandingSettings.d.ts +2 -0
- package/dist/shell/components/settings/ConnectedBrandingSettings.d.ts.map +1 -0
- package/dist/shell/components/settings/ConnectedCompanySettings.d.ts +2 -0
- package/dist/shell/components/settings/ConnectedCompanySettings.d.ts.map +1 -0
- package/dist/shell/components/settings/ConnectedFieldRulesSettings.d.ts +2 -0
- package/dist/shell/components/settings/ConnectedFieldRulesSettings.d.ts.map +1 -0
- package/dist/shell/components/settings/ConnectedHolidaysSettings.d.ts +3 -0
- package/dist/shell/components/settings/ConnectedHolidaysSettings.d.ts.map +1 -0
- package/dist/shell/components/settings/ConnectedLocationsOverview.d.ts +3 -0
- package/dist/shell/components/settings/ConnectedLocationsOverview.d.ts.map +1 -0
- package/dist/shell/components/settings/ConnectedSecuritySettings.d.ts +2 -0
- package/dist/shell/components/settings/ConnectedSecuritySettings.d.ts.map +1 -0
- package/dist/shell/components/settings/ConnectedUserProfile.d.ts +2 -0
- package/dist/shell/components/settings/ConnectedUserProfile.d.ts.map +1 -0
- package/dist/shell/components/settings/FieldRulesSettings.d.ts +11 -0
- package/dist/shell/components/settings/FieldRulesSettings.d.ts.map +1 -0
- package/dist/shell/components/settings/HolidaysSettings.d.ts +21 -0
- package/dist/shell/components/settings/HolidaysSettings.d.ts.map +1 -0
- package/dist/shell/components/settings/LocationsCrudPage.d.ts +6 -0
- package/dist/shell/components/settings/LocationsCrudPage.d.ts.map +1 -0
- package/dist/shell/components/settings/LocationsOverview.d.ts +19 -0
- package/dist/shell/components/settings/LocationsOverview.d.ts.map +1 -0
- package/dist/shell/components/settings/SecuritySettings.d.ts +17 -0
- package/dist/shell/components/settings/SecuritySettings.d.ts.map +1 -0
- package/dist/shell/components/settings/SettingsPage.d.ts +18 -0
- package/dist/shell/components/settings/SettingsPage.d.ts.map +1 -0
- package/dist/shell/components/settings/UserProfile.d.ts +12 -0
- package/dist/shell/components/settings/UserProfile.d.ts.map +1 -0
- package/dist/shell/components/settings/index.d.ts +11 -0
- package/dist/shell/components/settings/index.d.ts.map +1 -0
- package/dist/shell/config/index.d.ts +7 -0
- package/dist/shell/config/index.d.ts.map +1 -0
- package/dist/shell/config/permissions.d.ts +7 -0
- package/dist/shell/config/permissions.d.ts.map +1 -0
- package/dist/shell/config/tailwind-preset.d.ts +4 -0
- package/dist/shell/config/tailwind-preset.d.ts.map +1 -0
- package/dist/shell/config/theme/dark.d.ts +3 -0
- package/dist/shell/config/theme/dark.d.ts.map +1 -0
- package/dist/shell/config/theme/index.d.ts +6 -0
- package/dist/shell/config/theme/index.d.ts.map +1 -0
- package/dist/shell/config/theme/light.d.ts +3 -0
- package/dist/shell/config/theme/light.d.ts.map +1 -0
- package/dist/shell/config/theme/tokens.d.ts +97 -0
- package/dist/shell/config/theme/tokens.d.ts.map +1 -0
- package/dist/shell/config/theme/utils.d.ts +23 -0
- package/dist/shell/config/theme/utils.d.ts.map +1 -0
- package/dist/shell/createSaasApp.d.ts +145 -0
- package/dist/shell/createSaasApp.d.ts.map +1 -0
- package/dist/shell/hooks/index.d.ts +19 -0
- package/dist/shell/hooks/index.d.ts.map +1 -0
- package/dist/shell/hooks/useAITools.d.ts +21 -0
- package/dist/shell/hooks/useAITools.d.ts.map +1 -0
- package/dist/shell/hooks/useAuth.d.ts +16 -0
- package/dist/shell/hooks/useAuth.d.ts.map +1 -0
- package/dist/shell/hooks/useBilling.d.ts +14 -0
- package/dist/shell/hooks/useBilling.d.ts.map +1 -0
- package/dist/shell/hooks/useChat.d.ts +16 -0
- package/dist/shell/hooks/useChat.d.ts.map +1 -0
- package/dist/shell/hooks/useFieldRules.d.ts +6 -0
- package/dist/shell/hooks/useFieldRules.d.ts.map +1 -0
- package/dist/shell/hooks/useFormatters.d.ts +7 -0
- package/dist/shell/hooks/useFormatters.d.ts.map +1 -0
- package/dist/shell/hooks/useLayout.d.ts +16 -0
- package/dist/shell/hooks/useLayout.d.ts.map +1 -0
- package/dist/shell/hooks/useModuleNavigation.d.ts +25 -0
- package/dist/shell/hooks/useModuleNavigation.d.ts.map +1 -0
- package/dist/shell/hooks/useNotifications.d.ts +11 -0
- package/dist/shell/hooks/useNotifications.d.ts.map +1 -0
- package/dist/shell/hooks/usePermission.d.ts +16 -0
- package/dist/shell/hooks/usePermission.d.ts.map +1 -0
- package/dist/shell/hooks/usePluginPrefs.d.ts +23 -0
- package/dist/shell/hooks/usePluginPrefs.d.ts.map +1 -0
- package/dist/shell/hooks/usePlugins.d.ts +5 -0
- package/dist/shell/hooks/usePlugins.d.ts.map +1 -0
- package/dist/shell/hooks/useTenant.d.ts +23 -0
- package/dist/shell/hooks/useTenant.d.ts.map +1 -0
- package/dist/shell/hooks/useTenantPlugins.d.ts +10 -0
- package/dist/shell/hooks/useTenantPlugins.d.ts.map +1 -0
- package/dist/shell/hooks/useTranslation.d.ts +5 -0
- package/dist/shell/hooks/useTranslation.d.ts.map +1 -0
- package/dist/shell/lib/api.d.ts +28 -0
- package/dist/shell/lib/api.d.ts.map +1 -0
- package/dist/shell/lib/apply-field-rules.d.ts +4 -0
- package/dist/shell/lib/apply-field-rules.d.ts.map +1 -0
- package/dist/shell/lib/auth-adapters/mock.d.ts +3 -0
- package/dist/shell/lib/auth-adapters/mock.d.ts.map +1 -0
- package/dist/shell/lib/auth-adapters/supabase.d.ts +3 -0
- package/dist/shell/lib/auth-adapters/supabase.d.ts.map +1 -0
- package/dist/shell/lib/auth-context.d.ts +5 -0
- package/dist/shell/lib/auth-context.d.ts.map +1 -0
- package/dist/shell/lib/cache.d.ts +18 -0
- package/dist/shell/lib/cache.d.ts.map +1 -0
- package/dist/shell/lib/cn.d.ts +2 -0
- package/dist/shell/lib/cn.d.ts.map +1 -0
- package/dist/shell/lib/core-ai-tools.d.ts +15 -0
- package/dist/shell/lib/core-ai-tools.d.ts.map +1 -0
- package/dist/shell/lib/create-client-orders-provider.d.ts +3 -0
- package/dist/shell/lib/create-client-orders-provider.d.ts.map +1 -0
- package/dist/shell/lib/csv.d.ts +14 -0
- package/dist/shell/lib/csv.d.ts.map +1 -0
- package/dist/shell/lib/dedup.d.ts +2 -0
- package/dist/shell/lib/dedup.d.ts.map +1 -0
- package/dist/shell/lib/entity-registry.d.ts +19 -0
- package/dist/shell/lib/entity-registry.d.ts.map +1 -0
- package/dist/shell/lib/entity-routes.d.ts +24 -0
- package/dist/shell/lib/entity-routes.d.ts.map +1 -0
- package/dist/shell/lib/format.d.ts +7 -0
- package/dist/shell/lib/format.d.ts.map +1 -0
- package/dist/shell/lib/i18n.d.ts +4 -0
- package/dist/shell/lib/i18n.d.ts.map +1 -0
- package/dist/shell/lib/locale-config.d.ts +8 -0
- package/dist/shell/lib/locale-config.d.ts.map +1 -0
- package/dist/shell/lib/org-adapters/mock.d.ts +4 -0
- package/dist/shell/lib/org-adapters/mock.d.ts.map +1 -0
- package/dist/shell/lib/org-adapters/supabase.d.ts +3 -0
- package/dist/shell/lib/org-adapters/supabase.d.ts.map +1 -0
- package/dist/shell/lib/org-context.d.ts +5 -0
- package/dist/shell/lib/org-context.d.ts.map +1 -0
- package/dist/shell/lib/plugins.d.ts +2 -0
- package/dist/shell/lib/plugins.d.ts.map +1 -0
- package/dist/shell/lib/router.d.ts +15 -0
- package/dist/shell/lib/router.d.ts.map +1 -0
- package/dist/shell/lib/schedule-config.d.ts +32 -0
- package/dist/shell/lib/schedule-config.d.ts.map +1 -0
- package/dist/shell/lib/schedule-service.d.ts +76 -0
- package/dist/shell/lib/schedule-service.d.ts.map +1 -0
- package/dist/shell/lib/supabase.d.ts +9 -0
- package/dist/shell/lib/supabase.d.ts.map +1 -0
- package/dist/shell/stores/auth.store.d.ts +12 -0
- package/dist/shell/stores/auth.store.d.ts.map +1 -0
- package/dist/shell/stores/billing.store.d.ts +2 -0
- package/dist/shell/stores/billing.store.d.ts.map +1 -0
- package/dist/shell/stores/chat.store.d.ts +20 -0
- package/dist/shell/stores/chat.store.d.ts.map +1 -0
- package/dist/shell/stores/index.d.ts +13 -0
- package/dist/shell/stores/index.d.ts.map +1 -0
- package/dist/shell/stores/invite.store.d.ts +11 -0
- package/dist/shell/stores/invite.store.d.ts.map +1 -0
- package/dist/shell/stores/layout.store.d.ts +2 -0
- package/dist/shell/stores/layout.store.d.ts.map +1 -0
- package/dist/shell/stores/locale.store.d.ts +7 -0
- package/dist/shell/stores/locale.store.d.ts.map +1 -0
- package/dist/shell/stores/location.store.d.ts +20 -0
- package/dist/shell/stores/location.store.d.ts.map +1 -0
- package/dist/shell/stores/notifications.store.d.ts +12 -0
- package/dist/shell/stores/notifications.store.d.ts.map +1 -0
- package/dist/shell/stores/organization.store.d.ts +2 -0
- package/dist/shell/stores/organization.store.d.ts.map +1 -0
- package/dist/shell/stores/permissions.store.d.ts +2 -0
- package/dist/shell/stores/permissions.store.d.ts.map +1 -0
- package/dist/shell/stores/plugin.store.d.ts +24 -0
- package/dist/shell/stores/plugin.store.d.ts.map +1 -0
- package/dist/shell/stores/tenant.store.d.ts +11 -0
- package/dist/shell/stores/tenant.store.d.ts.map +1 -0
- package/dist/shell/stores/theme.store.d.ts +17 -0
- package/dist/shell/stores/theme.store.d.ts.map +1 -0
- package/dist/shell/test-setup.d.ts +2 -0
- package/dist/shell/test-setup.d.ts.map +1 -0
- package/dist/shell/types/auth-adapter.d.ts +14 -0
- package/dist/shell/types/auth-adapter.d.ts.map +1 -0
- package/dist/shell/types/auth.d.ts +34 -0
- package/dist/shell/types/auth.d.ts.map +1 -0
- package/dist/shell/types/billing.d.ts +74 -0
- package/dist/shell/types/billing.d.ts.map +1 -0
- package/dist/shell/types/client-orders.d.ts +43 -0
- package/dist/shell/types/client-orders.d.ts.map +1 -0
- package/dist/shell/types/crud.d.ts +122 -0
- package/dist/shell/types/crud.d.ts.map +1 -0
- package/dist/shell/types/entities.d.ts +150 -0
- package/dist/shell/types/entities.d.ts.map +1 -0
- package/dist/shell/types/entity-lookup.d.ts +18 -0
- package/dist/shell/types/entity-lookup.d.ts.map +1 -0
- package/dist/shell/types/index.d.ts +17 -0
- package/dist/shell/types/index.d.ts.map +1 -0
- package/dist/shell/types/integrations.d.ts +48 -0
- package/dist/shell/types/integrations.d.ts.map +1 -0
- package/dist/shell/types/invite.d.ts +23 -0
- package/dist/shell/types/invite.d.ts.map +1 -0
- package/dist/shell/types/layout.d.ts +26 -0
- package/dist/shell/types/layout.d.ts.map +1 -0
- package/dist/shell/types/notifications.d.ts +31 -0
- package/dist/shell/types/notifications.d.ts.map +1 -0
- package/dist/shell/types/org-adapter.d.ts +72 -0
- package/dist/shell/types/org-adapter.d.ts.map +1 -0
- package/dist/shell/types/permissions.d.ts +39 -0
- package/dist/shell/types/permissions.d.ts.map +1 -0
- package/dist/shell/types/platform.d.ts +25 -0
- package/dist/shell/types/platform.d.ts.map +1 -0
- package/dist/shell/types/plugins.d.ts +308 -0
- package/dist/shell/types/plugins.d.ts.map +1 -0
- package/dist/shell/types/tenant.d.ts +74 -0
- package/dist/shell/types/tenant.d.ts.map +1 -0
- package/dist/stores/createCrudStore.d.ts +32 -0
- package/dist/stores/createCrudStore.d.ts.map +1 -0
- package/dist/supabase/client.d.ts +18 -0
- package/dist/supabase/client.d.ts.map +1 -0
- package/package.json +72 -0
- package/src/app/AdminShell.tsx +449 -0
- package/src/app/LoginPage.tsx +264 -0
- package/src/app/config.ts +146 -0
- package/src/app/createFayzApp.tsx +254 -0
- package/src/app/routing.tsx +65 -0
- package/src/app/scaffold.tsx +175 -0
- package/src/archetype-lookup.ts +160 -0
- package/src/billing/index.ts +7 -0
- package/src/billing/store.ts +62 -0
- package/src/components/shared/PersonLink.tsx +199 -0
- package/src/crud/CrudCardGrid.tsx +92 -0
- package/src/crud/CrudDetailPage.tsx +366 -0
- package/src/crud/CrudFormPage.tsx +467 -0
- package/src/crud/CrudListView.tsx +223 -0
- package/src/crud/CrudPage.tsx +491 -0
- package/src/crud/DeleteConfirmDialog.tsx +41 -0
- package/src/crud/EntityOverview.tsx +230 -0
- package/src/crud/ImportWizard.tsx +690 -0
- package/src/crud/archetypes/ActiveToggle.tsx +23 -0
- package/src/crud/archetypes/ArchetypeStatusBar.tsx +58 -0
- package/src/crud/archetypes/BlockSettingsPopover.tsx +322 -0
- package/src/crud/archetypes/EntityLink.tsx +74 -0
- package/src/crud/archetypes/LocationDetailTabs.tsx +72 -0
- package/src/crud/archetypes/LocationFormLayout.tsx +173 -0
- package/src/crud/archetypes/PersonDetailTabs.tsx +87 -0
- package/src/crud/archetypes/PersonFormLayout.tsx +184 -0
- package/src/crud/archetypes/PersonPicker.tsx +299 -0
- package/src/crud/archetypes/ProductDetailTabs.tsx +72 -0
- package/src/crud/archetypes/ProductFormLayout.tsx +197 -0
- package/src/crud/archetypes/ScheduleEditor.tsx +796 -0
- package/src/crud/archetypes/ServiceDetailTabs.tsx +60 -0
- package/src/crud/archetypes/ServiceFormLayout.tsx +155 -0
- package/src/crud/archetypes/SubjectDetailTabs.tsx +142 -0
- package/src/crud/archetypes/SubjectFormLayout.tsx +164 -0
- package/src/crud/createCrudPage.tsx +65 -0
- package/src/crud/csv-export.ts +17 -0
- package/src/crud/fieldToColumn.tsx +109 -0
- package/src/crud/index.ts +11 -0
- package/src/hooks/useFieldRules.ts +10 -0
- package/src/hooks/useModuleNavigation.ts +124 -0
- package/src/hooks/usePluginPrefs.ts +113 -0
- package/src/index.ts +168 -0
- package/src/lib/currency.ts +19 -0
- package/src/lib/entity-routes.ts +53 -0
- package/src/lib/schedule-config.ts +42 -0
- package/src/lib/schedule-service.ts +307 -0
- package/src/org/adapters/mock.ts +353 -0
- package/src/org/adapters/supabase.ts +509 -0
- package/src/org/context.tsx +174 -0
- package/src/org/index.ts +19 -0
- package/src/org/store.ts +70 -0
- package/src/permissions/PermissionGate.tsx +17 -0
- package/src/permissions/context.tsx +126 -0
- package/src/permissions/index.ts +13 -0
- package/src/permissions/store.ts +68 -0
- package/src/placeholder.ts +32 -0
- package/src/plugins/ModuleActionBar.tsx +57 -0
- package/src/plugins/PluginRegistryManager.tsx +110 -0
- package/src/plugins/QuickActionsButton.tsx +73 -0
- package/src/plugins/SettingsGroup.tsx +100 -0
- package/src/plugins/WidgetSlot.tsx +38 -0
- package/src/plugins/createPluginContext.tsx +68 -0
- package/src/plugins/createViewRouter.tsx +45 -0
- package/src/shell/components/auth/CenteredLogin.tsx +86 -0
- package/src/shell/components/auth/LoginForm.tsx +129 -0
- package/src/shell/components/auth/LoginPage.tsx +22 -0
- package/src/shell/components/auth/OAuthButtons.tsx +66 -0
- package/src/shell/components/auth/ProtectedRoute.tsx +52 -0
- package/src/shell/components/auth/RecoveryForm.tsx +110 -0
- package/src/shell/components/auth/SignupForm.tsx +170 -0
- package/src/shell/components/auth/SplitLogin.tsx +124 -0
- package/src/shell/components/auth/index.ts +6 -0
- package/src/shell/components/billing/BillingPage.tsx +56 -0
- package/src/shell/components/billing/InvoiceList.tsx +123 -0
- package/src/shell/components/billing/PaywallGate.tsx +80 -0
- package/src/shell/components/billing/PlanSelector.tsx +125 -0
- package/src/shell/components/billing/SubscriptionCard.tsx +108 -0
- package/src/shell/components/billing/index.ts +5 -0
- package/src/shell/components/chat/ChatFab.tsx +195 -0
- package/src/shell/components/chat/ChatPanel.tsx +170 -0
- package/src/shell/components/chat/ChatSuggestions.tsx +102 -0
- package/src/shell/components/chat/index.ts +2 -0
- package/src/shell/components/crud/archetypes/ClientOrdersTab.tsx +212 -0
- package/src/shell/components/layout/BottomNav.tsx +131 -0
- package/src/shell/components/layout/CommandPalette.tsx +257 -0
- package/src/shell/components/layout/LocationSwitchOverlay.tsx +64 -0
- package/src/shell/components/layout/MockModeBanner.tsx +17 -0
- package/src/shell/components/layout/PrintChrome.tsx +200 -0
- package/src/shell/components/layout/index.ts +5 -0
- package/src/shell/components/notifications/ChangelogFeed.tsx +85 -0
- package/src/shell/components/notifications/NotificationBell.tsx +44 -0
- package/src/shell/components/notifications/NotificationInbox.tsx +175 -0
- package/src/shell/components/notifications/ToastProvider.tsx +2 -0
- package/src/shell/components/notifications/index.ts +4 -0
- package/src/shell/components/organization/ImpersonationBanner.tsx +29 -0
- package/src/shell/components/organization/InviteMemberDialog.tsx +161 -0
- package/src/shell/components/organization/OrgInitializer.tsx +179 -0
- package/src/shell/components/organization/OrgSwitcher.tsx +177 -0
- package/src/shell/components/organization/PermissionGate.tsx +16 -0
- package/src/shell/components/organization/PermissionMatrixEditor.tsx +206 -0
- package/src/shell/components/organization/PermissionProfilesTab.tsx +148 -0
- package/src/shell/components/organization/TeamTab.tsx +243 -0
- package/src/shell/components/organization/TenantOnboarding.tsx +179 -0
- package/src/shell/components/organization/index.ts +7 -0
- package/src/shell/components/plugins/PluginSettingsPanel.tsx +189 -0
- package/src/shell/components/settings/BrandingSettings.tsx +255 -0
- package/src/shell/components/settings/CompanySettings.tsx +188 -0
- package/src/shell/components/settings/ConnectedBrandingSettings.tsx +82 -0
- package/src/shell/components/settings/ConnectedCompanySettings.tsx +63 -0
- package/src/shell/components/settings/ConnectedFieldRulesSettings.tsx +47 -0
- package/src/shell/components/settings/ConnectedHolidaysSettings.tsx +99 -0
- package/src/shell/components/settings/ConnectedLocationsOverview.tsx +57 -0
- package/src/shell/components/settings/ConnectedSecuritySettings.tsx +59 -0
- package/src/shell/components/settings/ConnectedUserProfile.tsx +59 -0
- package/src/shell/components/settings/FieldRulesSettings.tsx +511 -0
- package/src/shell/components/settings/HolidaysSettings.tsx +141 -0
- package/src/shell/components/settings/LocationsCrudPage.ts +36 -0
- package/src/shell/components/settings/LocationsOverview.tsx +171 -0
- package/src/shell/components/settings/SecuritySettings.tsx +208 -0
- package/src/shell/components/settings/SettingsPage.tsx +162 -0
- package/src/shell/components/settings/UserProfile.tsx +151 -0
- package/src/shell/components/settings/index.ts +10 -0
- package/src/shell/config/index.ts +6 -0
- package/src/shell/config/permissions.ts +31 -0
- package/src/shell/config/tailwind-preset.ts +164 -0
- package/src/shell/config/theme/dark.ts +63 -0
- package/src/shell/config/theme/index.ts +5 -0
- package/src/shell/config/theme/light.ts +63 -0
- package/src/shell/config/theme/tokens.ts +105 -0
- package/src/shell/config/theme/utils.ts +249 -0
- package/src/shell/createSaasApp.tsx +922 -0
- package/src/shell/hooks/index.ts +18 -0
- package/src/shell/hooks/useAITools.ts +139 -0
- package/src/shell/hooks/useAuth.ts +109 -0
- package/src/shell/hooks/useBilling.ts +151 -0
- package/src/shell/hooks/useChat.ts +84 -0
- package/src/shell/hooks/useFieldRules.ts +19 -0
- package/src/shell/hooks/useFormatters.ts +56 -0
- package/src/shell/hooks/useLayout.ts +76 -0
- package/src/shell/hooks/useModuleNavigation.ts +124 -0
- package/src/shell/hooks/useNotifications.ts +114 -0
- package/src/shell/hooks/usePermission.ts +101 -0
- package/src/shell/hooks/usePluginPrefs.ts +113 -0
- package/src/shell/hooks/usePlugins.ts +18 -0
- package/src/shell/hooks/useTenant.ts +106 -0
- package/src/shell/hooks/useTenantPlugins.ts +103 -0
- package/src/shell/hooks/useTranslation.ts +10 -0
- package/src/shell/lib/api.ts +67 -0
- package/src/shell/lib/apply-field-rules.ts +14 -0
- package/src/shell/lib/auth-adapters/mock.ts +97 -0
- package/src/shell/lib/auth-adapters/supabase.ts +96 -0
- package/src/shell/lib/auth-context.ts +18 -0
- package/src/shell/lib/cache.ts +124 -0
- package/src/shell/lib/cn.ts +1 -0
- package/src/shell/lib/core-ai-tools.ts +90 -0
- package/src/shell/lib/create-client-orders-provider.ts +105 -0
- package/src/shell/lib/csv.ts +54 -0
- package/src/shell/lib/dedup.ts +17 -0
- package/src/shell/lib/entity-registry.ts +39 -0
- package/src/shell/lib/entity-routes.ts +53 -0
- package/src/shell/lib/format.ts +58 -0
- package/src/shell/lib/i18n.ts +3723 -0
- package/src/shell/lib/locale-config.ts +14 -0
- package/src/shell/lib/org-adapters/mock.ts +318 -0
- package/src/shell/lib/org-adapters/supabase.ts +533 -0
- package/src/shell/lib/org-context.ts +18 -0
- package/src/shell/lib/plugins.ts +11 -0
- package/src/shell/lib/router.ts +86 -0
- package/src/shell/lib/schedule-config.ts +42 -0
- package/src/shell/lib/schedule-service.ts +307 -0
- package/src/shell/lib/supabase.ts +19 -0
- package/src/shell/stores/auth.store.ts +29 -0
- package/src/shell/stores/billing.store.ts +1 -0
- package/src/shell/stores/chat.store.ts +45 -0
- package/src/shell/stores/index.ts +12 -0
- package/src/shell/stores/invite.store.ts +18 -0
- package/src/shell/stores/layout.store.ts +1 -0
- package/src/shell/stores/locale.store.ts +24 -0
- package/src/shell/stores/location.store.ts +89 -0
- package/src/shell/stores/notifications.store.ts +48 -0
- package/src/shell/stores/organization.store.ts +3 -0
- package/src/shell/stores/permissions.store.ts +1 -0
- package/src/shell/stores/plugin.store.ts +50 -0
- package/src/shell/stores/tenant.store.ts +26 -0
- package/src/shell/stores/theme.store.ts +162 -0
- package/src/shell/styles.css +433 -0
- package/src/shell/test-setup.ts +1 -0
- package/src/shell/types/auth-adapter.ts +11 -0
- package/src/shell/types/auth.ts +38 -0
- package/src/shell/types/billing.ts +90 -0
- package/src/shell/types/client-orders.ts +58 -0
- package/src/shell/types/crud.ts +134 -0
- package/src/shell/types/entities.ts +169 -0
- package/src/shell/types/entity-lookup.ts +25 -0
- package/src/shell/types/index.ts +16 -0
- package/src/shell/types/integrations.ts +51 -0
- package/src/shell/types/invite.ts +23 -0
- package/src/shell/types/layout.ts +29 -0
- package/src/shell/types/notifications.ts +33 -0
- package/src/shell/types/org-adapter.ts +72 -0
- package/src/shell/types/permissions.ts +64 -0
- package/src/shell/types/platform.ts +25 -0
- package/src/shell/types/plugins.ts +359 -0
- package/src/shell/types/tenant.ts +79 -0
- package/src/stores/createCrudStore.ts +138 -0
- package/src/supabase/client.ts +54 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { create, type StoreApi, type UseBoundStore } from 'zustand'
|
|
2
|
+
import type { ThemeTokens } from '../config/theme/tokens'
|
|
3
|
+
import { lightTheme } from '../config/theme/light'
|
|
4
|
+
import { darkTheme } from '../config/theme/dark'
|
|
5
|
+
import { applyTheme } from '../config/theme/utils'
|
|
6
|
+
import type { CreateThemeOptions } from '../config/theme/utils'
|
|
7
|
+
|
|
8
|
+
type ThemeMode = 'light' | 'dark' | 'system'
|
|
9
|
+
|
|
10
|
+
const STORAGE_KEY = 'saas-core:theme-mode'
|
|
11
|
+
|
|
12
|
+
interface ThemeState {
|
|
13
|
+
mode: ThemeMode
|
|
14
|
+
resolvedMode: 'light' | 'dark'
|
|
15
|
+
/** Only the user's partial overrides — NOT a full theme */
|
|
16
|
+
overrides: CreateThemeOptions | null
|
|
17
|
+
setMode: (mode: ThemeMode) => void
|
|
18
|
+
setOverrides: (overrides: CreateThemeOptions | null) => void
|
|
19
|
+
initialize: () => void
|
|
20
|
+
// Keep old API name working
|
|
21
|
+
setCustomTheme: (theme: ThemeTokens | null) => void
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function getSystemPreference(): 'light' | 'dark' {
|
|
25
|
+
if (typeof window === 'undefined') return 'light'
|
|
26
|
+
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function getSavedMode(): ThemeMode {
|
|
30
|
+
if (typeof window === 'undefined') return 'light'
|
|
31
|
+
const saved = localStorage.getItem(STORAGE_KEY)
|
|
32
|
+
if (saved === 'light' || saved === 'dark' || saved === 'system') return saved
|
|
33
|
+
return 'light'
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function resolveMode(mode: ThemeMode): 'light' | 'dark' {
|
|
37
|
+
return mode === 'system' ? getSystemPreference() : mode
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Merge base theme (light or dark) with user's partial overrides */
|
|
41
|
+
function buildTheme(base: ThemeTokens, overrides: CreateThemeOptions | null): ThemeTokens {
|
|
42
|
+
if (!overrides) return base
|
|
43
|
+
|
|
44
|
+
const isDark = base.name === 'dark'
|
|
45
|
+
const colors = { ...base.colors }
|
|
46
|
+
|
|
47
|
+
// Brand shorthand: derive primary, ring, accent from single HSL
|
|
48
|
+
if (overrides.brand) {
|
|
49
|
+
colors.primary = overrides.brand
|
|
50
|
+
colors.primaryForeground = '0 0% 100%'
|
|
51
|
+
colors.ring = overrides.brand
|
|
52
|
+
const parts = overrides.brand.split(' ')
|
|
53
|
+
if (parts.length >= 3) {
|
|
54
|
+
const hue = (parseFloat(parts[0]) - 50 + 360) % 360
|
|
55
|
+
colors.accent = `${hue} ${parts[1]} ${parts[2]}`
|
|
56
|
+
colors.accentForeground = '0 0% 100%'
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Apply explicit color overrides.
|
|
61
|
+
// In dark mode, use darkColors if provided; otherwise skip light-only colors.
|
|
62
|
+
const colorOverrides = isDark && overrides.darkColors
|
|
63
|
+
? overrides.darkColors
|
|
64
|
+
: overrides.colors
|
|
65
|
+
|
|
66
|
+
if (colorOverrides) {
|
|
67
|
+
for (const [key, value] of Object.entries(colorOverrides)) {
|
|
68
|
+
if (value !== undefined) {
|
|
69
|
+
(colors as any)[key] = value
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
name: overrides.name ?? base.name,
|
|
76
|
+
colors,
|
|
77
|
+
perception: {
|
|
78
|
+
...base.perception,
|
|
79
|
+
...(overrides.perception ?? {}),
|
|
80
|
+
},
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const STORE_KEY = '__saas_core_theme_store__'
|
|
85
|
+
|
|
86
|
+
function createThemeStore(): UseBoundStore<StoreApi<ThemeState>> {
|
|
87
|
+
// Window-level singleton to survive linked-package dual-module loading
|
|
88
|
+
if (typeof window !== 'undefined' && (window as any)[STORE_KEY]) {
|
|
89
|
+
return (window as any)[STORE_KEY]
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const store = create<ThemeState>((set, get) => ({
|
|
93
|
+
mode: getSavedMode(),
|
|
94
|
+
resolvedMode: 'light',
|
|
95
|
+
overrides: null,
|
|
96
|
+
|
|
97
|
+
setMode: (mode) => {
|
|
98
|
+
const resolved = resolveMode(mode)
|
|
99
|
+
set({ mode, resolvedMode: resolved })
|
|
100
|
+
|
|
101
|
+
// Persist to localStorage
|
|
102
|
+
if (typeof window !== 'undefined') {
|
|
103
|
+
localStorage.setItem(STORAGE_KEY, mode)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const { overrides } = get()
|
|
107
|
+
const baseTheme = resolved === 'dark' ? darkTheme : lightTheme
|
|
108
|
+
const theme = buildTheme(baseTheme, overrides)
|
|
109
|
+
|
|
110
|
+
if (typeof document !== 'undefined') {
|
|
111
|
+
// Enable color transition before applying changes
|
|
112
|
+
document.documentElement.classList.add('theme-transitioning')
|
|
113
|
+
|
|
114
|
+
applyTheme(theme)
|
|
115
|
+
document.documentElement.classList.toggle('dark', resolved === 'dark')
|
|
116
|
+
|
|
117
|
+
// Remove transition class after animation completes
|
|
118
|
+
setTimeout(() => {
|
|
119
|
+
document.documentElement.classList.remove('theme-transitioning')
|
|
120
|
+
}, 450)
|
|
121
|
+
} else {
|
|
122
|
+
applyTheme(theme)
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
setOverrides: (overrides) => {
|
|
127
|
+
set({ overrides })
|
|
128
|
+
const { resolvedMode } = get()
|
|
129
|
+
const baseTheme = resolvedMode === 'dark' ? darkTheme : lightTheme
|
|
130
|
+
const theme = buildTheme(baseTheme, overrides)
|
|
131
|
+
applyTheme(theme)
|
|
132
|
+
},
|
|
133
|
+
|
|
134
|
+
// Legacy compat — if someone passes a full ThemeTokens, store it as overrides
|
|
135
|
+
setCustomTheme: (_theme) => {
|
|
136
|
+
// Ignore — callers should use setOverrides now
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
initialize: () => {
|
|
140
|
+
const { mode, setMode } = get()
|
|
141
|
+
setMode(mode)
|
|
142
|
+
|
|
143
|
+
// Listen for OS theme changes when in 'system' mode
|
|
144
|
+
if (typeof window !== 'undefined') {
|
|
145
|
+
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
|
|
146
|
+
const current = get()
|
|
147
|
+
if (current.mode === 'system') {
|
|
148
|
+
current.setMode('system')
|
|
149
|
+
}
|
|
150
|
+
})
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
}))
|
|
154
|
+
|
|
155
|
+
if (typeof window !== 'undefined') {
|
|
156
|
+
(window as any)[STORE_KEY] = store
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
return store
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export const useThemeStore = createThemeStore()
|
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
@layer base {
|
|
6
|
+
:root {
|
|
7
|
+
/* Polaris "Sail" light — page #f1f1f1, cards #ffffff, near-black brand #303030 */
|
|
8
|
+
--primary: 0 0% 18.8%;
|
|
9
|
+
--primary-foreground: 0 0% 100%;
|
|
10
|
+
--secondary: 0 0% 96.9%;
|
|
11
|
+
--secondary-foreground: 0 0% 18.8%;
|
|
12
|
+
--accent: 0 0% 94.5%;
|
|
13
|
+
--accent-foreground: 0 0% 18.8%;
|
|
14
|
+
--background: 0 0% 94.5%;
|
|
15
|
+
--foreground: 0 0% 18.8%;
|
|
16
|
+
--card: 0 0% 100%;
|
|
17
|
+
--card-foreground: 0 0% 18.8%;
|
|
18
|
+
--muted: 0 0% 96.9%;
|
|
19
|
+
--muted-foreground: 0 0% 38%;
|
|
20
|
+
--border: 0 0% 89%;
|
|
21
|
+
--input: 0 0% 54.1%;
|
|
22
|
+
--ring: 214 100% 41.4%;
|
|
23
|
+
--popover: 0 0% 100%;
|
|
24
|
+
--popover-foreground: 0 0% 18.8%;
|
|
25
|
+
--destructive: 354 92% 41%;
|
|
26
|
+
--destructive-foreground: 0 0% 100%;
|
|
27
|
+
--success: 167 95% 25.1%;
|
|
28
|
+
--success-foreground: 0 0% 100%;
|
|
29
|
+
--warning: 43 100% 50%;
|
|
30
|
+
--warning-foreground: 0 0% 18.8%;
|
|
31
|
+
|
|
32
|
+
/* Info + Magic — Polaris semantic accents (full strength, used for icons/links) */
|
|
33
|
+
--info: 214 100% 41.4%; /* #005bd3 */
|
|
34
|
+
--info-foreground: 0 0% 100%;
|
|
35
|
+
--magic: 257 100% 65.7%; /* #8051ff */
|
|
36
|
+
--magic-foreground: 0 0% 100%;
|
|
37
|
+
|
|
38
|
+
/* Polaris soft status pairs — desaturated tints used on badges/banners
|
|
39
|
+
so status reads calmly inside cards. */
|
|
40
|
+
--info-soft: 212 100% 95.9%; /* #ebf5ff */
|
|
41
|
+
--info-soft-foreground: 200 100% 24.3%; /* #00527c */
|
|
42
|
+
--success-soft: 126 96% 90%; /* #cdfed4 */
|
|
43
|
+
--success-soft-foreground: 153 74% 18.6%; /* #0c5132 */
|
|
44
|
+
--warning-soft: 51 100% 92.7%; /* #fff8db */
|
|
45
|
+
--warning-soft-foreground: 39 73% 31.4%; /* #8a6116 */
|
|
46
|
+
--destructive-soft: 351 91% 95.5%; /* #fee8eb */
|
|
47
|
+
--destructive-soft-foreground: 350 86% 30%; /* #8e0b21 */
|
|
48
|
+
--magic-soft: 257 100% 96.7%; /* #f3eeff */
|
|
49
|
+
--magic-soft-foreground: 256 64% 45%; /* #4f2bbb */
|
|
50
|
+
|
|
51
|
+
/* Layout surfaces — light gray sidebar with raised-white active items */
|
|
52
|
+
--sidebar: 0 0% 92.2%;
|
|
53
|
+
--sidebar-foreground: 0 0% 18.8%;
|
|
54
|
+
--sidebar-border: 0 0% 86.3%;
|
|
55
|
+
--sidebar-accent: 0 0% 100%;
|
|
56
|
+
--sidebar-accent-foreground: 0 0% 18.8%;
|
|
57
|
+
--sidebar-muted: 0 0% 38%;
|
|
58
|
+
--content: 0 0% 94.5%;
|
|
59
|
+
|
|
60
|
+
/* UI Perception Tokens */
|
|
61
|
+
--button-radius: 0.5rem;
|
|
62
|
+
--card-radius: 0.5rem;
|
|
63
|
+
--input-radius: 0.5rem;
|
|
64
|
+
--modal-radius: 1rem;
|
|
65
|
+
--font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
|
|
66
|
+
--font-family-mono: JetBrains Mono, ui-monospace, SFMono-Regular, monospace;
|
|
67
|
+
/* Polaris hairline + a touch of bottom lift so cards visibly float on the gray page */
|
|
68
|
+
--shadow-sm: 0 1px 0 rgba(0, 0, 0, 0.05), 0 1px 3px 0 rgba(26, 26, 26, 0.06), 0 1px 2px -1px rgba(26, 26, 26, 0.06);
|
|
69
|
+
--shadow-md: 0 1px 1px -1px rgba(26, 26, 26, 0.07), 0 4px 8px -2px rgba(26, 26, 26, 0.10);
|
|
70
|
+
--shadow-lg: 0 4px 12px -2px rgba(26, 26, 26, 0.15), 0 1px 3px rgba(26, 26, 26, 0.08);
|
|
71
|
+
|
|
72
|
+
/* Polaris button bevels — inset shadows give the buttons their "physical" feel */
|
|
73
|
+
--shadow-button:
|
|
74
|
+
inset 0 -1px 0 rgba(0,0,0,0.10),
|
|
75
|
+
inset 0 1px 0 rgba(255,255,255,0.50),
|
|
76
|
+
0 1px 0 rgba(0,0,0,0.05);
|
|
77
|
+
--shadow-button-primary:
|
|
78
|
+
inset 0 -1px 0 rgba(0,0,0,0.20),
|
|
79
|
+
inset 0 1px 0 rgba(255,255,255,0.20),
|
|
80
|
+
0 1px 1.5px rgba(0,0,0,0.20);
|
|
81
|
+
--shadow-button-inset:
|
|
82
|
+
inset 0 2px 1px -1px rgba(0,0,0,0.20),
|
|
83
|
+
inset 0 0 0 1px rgba(0,0,0,0.05);
|
|
84
|
+
--surface-backdrop-filter: none;
|
|
85
|
+
--modal-bg: hsl(var(--card));
|
|
86
|
+
--modal-border: hsl(var(--border) / 0.5);
|
|
87
|
+
--modal-overlay-bg: rgb(0 0 0 / 0.5);
|
|
88
|
+
--modal-overlay-backdrop-filter: blur(2px);
|
|
89
|
+
--modal-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
|
|
90
|
+
--glass-edge-gradient: linear-gradient(hsl(var(--border)), hsl(var(--border)));
|
|
91
|
+
--glass-primary-edge-gradient: linear-gradient(hsl(var(--primary)), hsl(var(--primary)));
|
|
92
|
+
--glass-inner-highlight: inset 0 0 0 0 transparent;
|
|
93
|
+
--field-bg: hsl(var(--card));
|
|
94
|
+
--field-border: hsl(var(--input));
|
|
95
|
+
--field-shadow: inset 0 1px 0 rgb(0 0 0 / 0.06);
|
|
96
|
+
--button-bg: hsl(var(--card));
|
|
97
|
+
--button-hover-bg: hsl(var(--muted));
|
|
98
|
+
--button-border: hsl(var(--border));
|
|
99
|
+
--button-primary-bg: hsl(var(--primary));
|
|
100
|
+
--button-primary-hover-bg: hsl(var(--primary) / 0.9);
|
|
101
|
+
--button-primary-border: hsl(var(--primary));
|
|
102
|
+
--button-backdrop-filter: none;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.dark {
|
|
106
|
+
/* "Sail midnight" — Polaris philosophy for dark: page < card luminance,
|
|
107
|
+
brand inverts to near-white, accents bumped one step brighter. */
|
|
108
|
+
--primary: 0 0% 100%;
|
|
109
|
+
--primary-foreground: 0 0% 10.2%;
|
|
110
|
+
--secondary: 0 0% 18.8%;
|
|
111
|
+
--secondary-foreground: 0 0% 89%;
|
|
112
|
+
--accent: 0 0% 22.7%;
|
|
113
|
+
--accent-foreground: 0 0% 100%;
|
|
114
|
+
--background: 0 0% 10.2%;
|
|
115
|
+
--foreground: 0 0% 89%;
|
|
116
|
+
--card: 0 0% 14.9%;
|
|
117
|
+
--card-foreground: 0 0% 89%;
|
|
118
|
+
--muted: 0 0% 18.8%;
|
|
119
|
+
--muted-foreground: 0 0% 64.7%;
|
|
120
|
+
--border: 0 0% 22.7%;
|
|
121
|
+
--input: 0 0% 32.2%;
|
|
122
|
+
--ring: 217 100% 68.4%;
|
|
123
|
+
--popover: 0 0% 18.8%;
|
|
124
|
+
--popover-foreground: 0 0% 89%;
|
|
125
|
+
--destructive: 7 100% 44.9%;
|
|
126
|
+
--destructive-foreground: 0 0% 100%;
|
|
127
|
+
--success: 156 71% 42.5%;
|
|
128
|
+
--success-foreground: 0 0% 0%;
|
|
129
|
+
--warning: 41 100% 65.1%;
|
|
130
|
+
--warning-foreground: 0 0% 10.2%;
|
|
131
|
+
|
|
132
|
+
--info: 217 100% 68.4%;
|
|
133
|
+
--info-foreground: 0 0% 10.2%;
|
|
134
|
+
--magic: 257 96% 75%;
|
|
135
|
+
--magic-foreground: 0 0% 10.2%;
|
|
136
|
+
|
|
137
|
+
/* Soft pairs invert: deep saturated bg, bright accent fg */
|
|
138
|
+
--info-soft: 215 100% 31%; /* #00359e */
|
|
139
|
+
--info-soft-foreground: 213 100% 84.5%; /* #b3d4ff */
|
|
140
|
+
--success-soft: 153 74% 18.6%; /* #0c5132 */
|
|
141
|
+
--success-soft-foreground: 152 56% 80.5%; /* #aee9d1 */
|
|
142
|
+
--warning-soft: 31 100% 17.6%; /* #5a3500 */
|
|
143
|
+
--warning-soft-foreground: 35 100% 81%; /* #ffd79d */
|
|
144
|
+
--destructive-soft: 350 75% 17.6%; /* #4d0b1a */
|
|
145
|
+
--destructive-soft-foreground: 357 100% 92%;/* #ffd7d9 */
|
|
146
|
+
--magic-soft: 254 67% 26%; /* #2a1670 */
|
|
147
|
+
--magic-soft-foreground: 267 89% 86%; /* #d6bbfb */
|
|
148
|
+
|
|
149
|
+
/* Layout surfaces */
|
|
150
|
+
--sidebar: 0 0% 10.2%;
|
|
151
|
+
--sidebar-foreground: 0 0% 89%;
|
|
152
|
+
--sidebar-border: 0 0% 16.5%;
|
|
153
|
+
--sidebar-accent: 0 0% 18.8%;
|
|
154
|
+
--sidebar-accent-foreground: 0 0% 100%;
|
|
155
|
+
--sidebar-muted: 0 0% 64.7%;
|
|
156
|
+
--content: 0 0% 10.2%;
|
|
157
|
+
|
|
158
|
+
--shadow-sm: 0 1px 0 rgba(0, 0, 0, 0.4), 0 1px 3px 0 rgba(0, 0, 0, 0.35), 0 1px 2px -1px rgba(0, 0, 0, 0.35);
|
|
159
|
+
--shadow-md: 0 1px 1px -1px rgba(0, 0, 0, 0.5), 0 4px 8px -2px rgba(0, 0, 0, 0.6);
|
|
160
|
+
--shadow-lg: 0 4px 12px -2px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.4);
|
|
161
|
+
|
|
162
|
+
--shadow-button:
|
|
163
|
+
inset 0 -1px 0 rgba(0,0,0,0.40),
|
|
164
|
+
inset 0 1px 0 rgba(255,255,255,0.08),
|
|
165
|
+
0 1px 0 rgba(0,0,0,0.30);
|
|
166
|
+
--shadow-button-primary:
|
|
167
|
+
inset 0 -1px 0 rgba(0,0,0,0.20),
|
|
168
|
+
inset 0 1px 0 rgba(255,255,255,0.40),
|
|
169
|
+
0 1px 1.5px rgba(0,0,0,0.40);
|
|
170
|
+
--shadow-button-inset:
|
|
171
|
+
inset 0 2px 1px -1px rgba(0,0,0,0.50),
|
|
172
|
+
inset 0 0 0 1px rgba(0,0,0,0.20);
|
|
173
|
+
--surface-backdrop-filter: none;
|
|
174
|
+
--modal-bg: hsl(var(--card));
|
|
175
|
+
--modal-border: hsl(var(--border) / 0.5);
|
|
176
|
+
--modal-overlay-bg: rgb(0 0 0 / 0.5);
|
|
177
|
+
--modal-overlay-backdrop-filter: blur(2px);
|
|
178
|
+
--modal-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.5);
|
|
179
|
+
--glass-edge-gradient: linear-gradient(hsl(var(--border)), hsl(var(--border)));
|
|
180
|
+
--glass-primary-edge-gradient: linear-gradient(hsl(var(--primary)), hsl(var(--primary)));
|
|
181
|
+
--glass-inner-highlight: inset 0 0 0 0 transparent;
|
|
182
|
+
--button-bg: hsl(var(--card));
|
|
183
|
+
--button-hover-bg: hsl(var(--muted));
|
|
184
|
+
--button-border: hsl(var(--border));
|
|
185
|
+
--button-primary-bg: hsl(var(--primary));
|
|
186
|
+
--button-primary-hover-bg: hsl(var(--primary) / 0.9);
|
|
187
|
+
--button-primary-border: hsl(var(--primary));
|
|
188
|
+
--button-backdrop-filter: none;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
* {
|
|
192
|
+
border-color: hsl(var(--border));
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
body {
|
|
196
|
+
background-color: hsl(var(--background));
|
|
197
|
+
color: hsl(var(--foreground));
|
|
198
|
+
font-family: var(--font-family);
|
|
199
|
+
font-size: 0.8125rem; /* 13px — Polaris body default */
|
|
200
|
+
line-height: 1.25rem; /* 20px */
|
|
201
|
+
font-feature-settings: 'ss01', 'ss02', 'cv11'; /* Inter tabular-friendly */
|
|
202
|
+
-webkit-font-smoothing: antialiased;
|
|
203
|
+
-moz-osx-font-smoothing: grayscale;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* Hide scrollbar — for horizontal tab strips and similar */
|
|
208
|
+
.scrollbar-none::-webkit-scrollbar { display: none; }
|
|
209
|
+
.scrollbar-none { -ms-overflow-style: none; scrollbar-width: none; }
|
|
210
|
+
|
|
211
|
+
.fayz-glass-surface {
|
|
212
|
+
backdrop-filter: var(--surface-backdrop-filter);
|
|
213
|
+
-webkit-backdrop-filter: var(--surface-backdrop-filter);
|
|
214
|
+
background-clip: padding-box;
|
|
215
|
+
transform: translateZ(0);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.fayz-glass-surface.border,
|
|
219
|
+
.bg-card.border,
|
|
220
|
+
.bg-popover.border,
|
|
221
|
+
.bg-background.border,
|
|
222
|
+
.bg-primary.border,
|
|
223
|
+
.border.bg-card,
|
|
224
|
+
.border.bg-popover,
|
|
225
|
+
.border.bg-background,
|
|
226
|
+
.border.bg-primary {
|
|
227
|
+
border-color: transparent;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.fayz-glass-surface.bg-card,
|
|
231
|
+
.bg-card.fayz-glass-surface,
|
|
232
|
+
.border.bg-card,
|
|
233
|
+
.bg-card.border {
|
|
234
|
+
background:
|
|
235
|
+
linear-gradient(hsl(var(--card)), hsl(var(--card))) padding-box,
|
|
236
|
+
var(--glass-edge-gradient) border-box;
|
|
237
|
+
box-shadow: var(--shadow-sm), var(--glass-inner-highlight);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.fayz-glass-surface.bg-popover,
|
|
241
|
+
.bg-popover.fayz-glass-surface,
|
|
242
|
+
.border.bg-popover,
|
|
243
|
+
.bg-popover.border {
|
|
244
|
+
background:
|
|
245
|
+
linear-gradient(hsl(var(--popover)), hsl(var(--popover))) padding-box,
|
|
246
|
+
var(--glass-edge-gradient) border-box;
|
|
247
|
+
box-shadow: var(--shadow-lg), var(--glass-inner-highlight);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.bg-primary.border {
|
|
251
|
+
background:
|
|
252
|
+
linear-gradient(hsl(var(--primary)), hsl(var(--primary))) padding-box,
|
|
253
|
+
var(--glass-primary-edge-gradient) border-box;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.bg-popover {
|
|
257
|
+
backdrop-filter: var(--surface-backdrop-filter);
|
|
258
|
+
-webkit-backdrop-filter: var(--surface-backdrop-filter);
|
|
259
|
+
background-clip: padding-box;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.fayz-modal-overlay {
|
|
263
|
+
background: var(--modal-overlay-bg);
|
|
264
|
+
backdrop-filter: var(--modal-overlay-backdrop-filter);
|
|
265
|
+
-webkit-backdrop-filter: var(--modal-overlay-backdrop-filter);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.fayz-modal-content {
|
|
269
|
+
background: var(--modal-bg);
|
|
270
|
+
border-color: var(--modal-border) !important;
|
|
271
|
+
box-shadow: var(--modal-shadow);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.fayz-glass-divider {
|
|
275
|
+
border-color: rgb(255 255 255 / 0.44) !important;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
@supports (border-color: color-mix(in srgb, white 50%, transparent)) {
|
|
279
|
+
.fayz-glass-divider {
|
|
280
|
+
border-color: color-mix(in srgb, var(--modal-border) 62%, transparent) !important;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.fayz-glass-field,
|
|
285
|
+
input.bg-card,
|
|
286
|
+
textarea.bg-card,
|
|
287
|
+
select.bg-card,
|
|
288
|
+
.border-input.bg-card,
|
|
289
|
+
.bg-card.border-input,
|
|
290
|
+
.bg-background.border {
|
|
291
|
+
background: var(--field-bg);
|
|
292
|
+
border-color: var(--field-border) !important;
|
|
293
|
+
box-shadow: var(--field-shadow);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/* Theme transition — applied briefly during light/dark switch */
|
|
297
|
+
.theme-transitioning,
|
|
298
|
+
.theme-transitioning *,
|
|
299
|
+
.theme-transitioning *::before,
|
|
300
|
+
.theme-transitioning *::after {
|
|
301
|
+
transition: background-color 400ms ease, color 400ms ease, border-color 400ms ease,
|
|
302
|
+
box-shadow 400ms ease, fill 400ms ease, stroke 400ms ease !important;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/* Animation keyframes for Radix UI components */
|
|
306
|
+
@keyframes enter {
|
|
307
|
+
from {
|
|
308
|
+
opacity: var(--tw-enter-opacity, 1);
|
|
309
|
+
transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0)
|
|
310
|
+
scale(var(--tw-enter-scale, 1));
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
@keyframes exit {
|
|
315
|
+
to {
|
|
316
|
+
opacity: var(--tw-exit-opacity, 1);
|
|
317
|
+
transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0)
|
|
318
|
+
scale(var(--tw-exit-scale, 1));
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/* Page transition */
|
|
323
|
+
@keyframes page-enter {
|
|
324
|
+
from { opacity: 0; transform: translateY(var(--saas-page-enter-offset)); }
|
|
325
|
+
to { opacity: 1; transform: translateY(0); }
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/* Radix animation utilities (replaces tailwindcss-animate plugin) */
|
|
329
|
+
.animate-in {
|
|
330
|
+
animation-name: enter;
|
|
331
|
+
animation-duration: 200ms;
|
|
332
|
+
animation-timing-function: ease-out;
|
|
333
|
+
animation-fill-mode: both;
|
|
334
|
+
}
|
|
335
|
+
.animate-out {
|
|
336
|
+
animation-name: exit;
|
|
337
|
+
animation-duration: 150ms;
|
|
338
|
+
animation-timing-function: ease-in;
|
|
339
|
+
animation-fill-mode: both;
|
|
340
|
+
}
|
|
341
|
+
.fade-in-0 { --tw-enter-opacity: 0; }
|
|
342
|
+
.fade-out-0 { --tw-exit-opacity: 0; }
|
|
343
|
+
.zoom-in-95 { --tw-enter-scale: 0.95; }
|
|
344
|
+
.zoom-out-95 { --tw-exit-scale: 0.95; }
|
|
345
|
+
.slide-in-from-top-2 { --tw-enter-translate-y: -0.5rem; }
|
|
346
|
+
.slide-in-from-bottom-2 { --tw-enter-translate-y: 0.5rem; }
|
|
347
|
+
.slide-in-from-bottom-4 { --tw-enter-translate-y: 1rem; }
|
|
348
|
+
.slide-in-from-left-1\/2 { --tw-enter-translate-x: -50%; }
|
|
349
|
+
.slide-in-from-right-2 { --tw-enter-translate-x: 0.5rem; }
|
|
350
|
+
.slide-in-from-top-\[48\%\] { --tw-enter-translate-y: -48%; }
|
|
351
|
+
.slide-out-to-left-1\/2 { --tw-exit-translate-x: -50%; }
|
|
352
|
+
.slide-out-to-top-\[48\%\] { --tw-exit-translate-y: -48%; }
|
|
353
|
+
.slide-out-to-top-2 { --tw-exit-translate-y: -0.5rem; }
|
|
354
|
+
.duration-200 { animation-duration: 200ms; }
|
|
355
|
+
.duration-300 { animation-duration: 300ms; }
|
|
356
|
+
|
|
357
|
+
/* Modal & overlay animations */
|
|
358
|
+
.saas-mdl-ov[data-state="open"] { animation: saas-mdl-ov-in 200ms ease-out both; }
|
|
359
|
+
.saas-mdl-ov[data-state="closed"] { animation: saas-mdl-ov-out 150ms ease-in both; }
|
|
360
|
+
.saas-mdl-ct[data-state="open"] { animation: saas-mdl-ct-in 250ms cubic-bezier(0.16, 1, 0.3, 1) both; }
|
|
361
|
+
.saas-mdl-ct[data-state="closed"] { animation: saas-mdl-ct-out 180ms ease-in both; }
|
|
362
|
+
|
|
363
|
+
@keyframes saas-mdl-ov-in { from { opacity: 0; } to { opacity: 1; } }
|
|
364
|
+
@keyframes saas-mdl-ov-out { from { opacity: 1; } to { opacity: 0; } }
|
|
365
|
+
@keyframes saas-mdl-ct-in { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
|
|
366
|
+
@keyframes saas-mdl-ct-out { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.97); } }
|
|
367
|
+
|
|
368
|
+
/* Page transition tokens — override in SaaS theme to customize */
|
|
369
|
+
:root {
|
|
370
|
+
--saas-transition-duration: 200ms;
|
|
371
|
+
--saas-transition-easing: ease-out;
|
|
372
|
+
--saas-page-enter-duration: 250ms;
|
|
373
|
+
--saas-page-enter-offset: 4px;
|
|
374
|
+
--saas-nav-slide-offset: 12px;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/* Page content transition */
|
|
378
|
+
.saas-page-enter {
|
|
379
|
+
animation: page-enter var(--saas-page-enter-duration) var(--saas-transition-easing) both;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
/* Mobile drawer animation */
|
|
383
|
+
.saas-drawer[data-state="open"] {
|
|
384
|
+
animation: saas-drawer-in 250ms ease-out both;
|
|
385
|
+
}
|
|
386
|
+
.saas-drawer[data-state="closed"] {
|
|
387
|
+
animation: saas-drawer-out 200ms ease-in both;
|
|
388
|
+
}
|
|
389
|
+
@keyframes saas-drawer-in {
|
|
390
|
+
from { opacity: 0; transform: translateX(-100%); }
|
|
391
|
+
to { opacity: 1; transform: translateX(0); }
|
|
392
|
+
}
|
|
393
|
+
@keyframes saas-drawer-out {
|
|
394
|
+
from { opacity: 1; transform: translateX(0); }
|
|
395
|
+
to { opacity: 0; transform: translateX(-100%); }
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/* Command palette animation */
|
|
399
|
+
.saas-cmd-palette[data-state="open"] {
|
|
400
|
+
animation: saas-cmd-in 200ms ease-out both;
|
|
401
|
+
}
|
|
402
|
+
.saas-cmd-palette[data-state="closed"] {
|
|
403
|
+
animation: saas-cmd-out 150ms ease-in both;
|
|
404
|
+
}
|
|
405
|
+
@keyframes saas-cmd-in {
|
|
406
|
+
from { opacity: 0; transform: translateX(-50%) scale(0.96) translateY(-8px); }
|
|
407
|
+
to { opacity: 1; transform: translateX(-50%) scale(1) translateY(0); }
|
|
408
|
+
}
|
|
409
|
+
@keyframes saas-cmd-out {
|
|
410
|
+
from { opacity: 1; transform: translateX(-50%) scale(1) translateY(0); }
|
|
411
|
+
to { opacity: 0; transform: translateX(-50%) scale(0.96) translateY(-8px); }
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/* Navigation transitions — used by CRUD pages, plugins, and module sub-views */
|
|
415
|
+
.saas-nav-forward {
|
|
416
|
+
animation: saas-slide-forward var(--saas-transition-duration) var(--saas-transition-easing) both;
|
|
417
|
+
}
|
|
418
|
+
.saas-nav-back {
|
|
419
|
+
animation: saas-slide-back var(--saas-transition-duration) var(--saas-transition-easing) both;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
@keyframes saas-slide-forward {
|
|
423
|
+
from { opacity: 0; transform: translateX(var(--saas-nav-slide-offset)); }
|
|
424
|
+
to { opacity: 1; transform: translateX(0); }
|
|
425
|
+
}
|
|
426
|
+
@keyframes saas-slide-back {
|
|
427
|
+
from { opacity: 0; transform: translateX(calc(-1 * var(--saas-nav-slide-offset))); }
|
|
428
|
+
to { opacity: 1; transform: translateX(0); }
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
/* ═══ Print — intentionally left minimal here. ═══ */
|
|
432
|
+
/* Runtime-injected print styles live in PrintChrome.tsx */
|
|
433
|
+
/* to guarantee they bypass any build-tool reordering. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom'
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AuthUser, AuthSession, AuthProvider } from './auth'
|
|
2
|
+
|
|
3
|
+
export interface AuthAdapter {
|
|
4
|
+
getSession(): Promise<{ user: AuthUser; session: AuthSession } | null>
|
|
5
|
+
onAuthStateChange(cb: (user: AuthUser | null) => void): () => void
|
|
6
|
+
signIn(email: string, password: string): Promise<AuthSession>
|
|
7
|
+
signUp(email: string, password: string, fullName: string): Promise<AuthSession>
|
|
8
|
+
signOut(): Promise<void>
|
|
9
|
+
signInWithOAuth(provider: AuthProvider): Promise<void>
|
|
10
|
+
resetPassword(email: string): Promise<void>
|
|
11
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type AuthProvider = 'email' | 'google' | 'github' | 'apple'
|
|
2
|
+
|
|
3
|
+
export interface AuthUser {
|
|
4
|
+
id: string
|
|
5
|
+
email: string
|
|
6
|
+
fullName: string
|
|
7
|
+
avatarUrl?: string
|
|
8
|
+
providers: AuthProvider[]
|
|
9
|
+
emailVerified: boolean
|
|
10
|
+
createdAt: string
|
|
11
|
+
updatedAt: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface AuthSession {
|
|
15
|
+
accessToken: string
|
|
16
|
+
refreshToken: string
|
|
17
|
+
expiresAt: number
|
|
18
|
+
user: AuthUser
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface AuthState {
|
|
22
|
+
user: AuthUser | null
|
|
23
|
+
session: AuthSession | null
|
|
24
|
+
loading: boolean
|
|
25
|
+
initialized: boolean
|
|
26
|
+
pendingEmailVerification: boolean
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface LoginCredentials {
|
|
30
|
+
email: string
|
|
31
|
+
password: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface SignupCredentials {
|
|
35
|
+
email: string
|
|
36
|
+
password: string
|
|
37
|
+
fullName: string
|
|
38
|
+
}
|