@elizaos/ui 2.0.0-alpha.385 → 2.0.0-alpha.392
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/apps/app-companion/src/components/companion/CompanionAppView.d.ts.map +1 -1
- package/apps/app-companion/src/components/companion/CompanionAppView.js +6 -4
- package/apps/app-companion/src/components/companion/CompanionView.d.ts.map +1 -1
- package/apps/app-companion/src/components/companion/CompanionView.js +6 -4
- package/apps/app-lifeops/src/api/client-lifeops.js +6 -0
- package/apps/app-lifeops/src/components/AppBlockerSettingsCard.d.ts +3 -0
- package/apps/app-lifeops/src/components/AppBlockerSettingsCard.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/AppBlockerSettingsCard.js +189 -0
- package/apps/app-lifeops/src/components/BrowserBridgeSetupPanel.d.ts +2 -0
- package/apps/app-lifeops/src/components/BrowserBridgeSetupPanel.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/BrowserBridgeSetupPanel.js +1065 -0
- package/apps/app-lifeops/src/components/BrowserBridgeStatusChip.d.ts +7 -0
- package/apps/app-lifeops/src/components/BrowserBridgeStatusChip.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/BrowserBridgeStatusChip.js +71 -0
- package/apps/app-lifeops/src/components/DataSourcesStrip.d.ts +14 -0
- package/apps/app-lifeops/src/components/DataSourcesStrip.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/DataSourcesStrip.js +36 -0
- package/apps/app-lifeops/src/components/EventEditorDrawer.d.ts +23 -0
- package/apps/app-lifeops/src/components/EventEditorDrawer.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/EventEditorDrawer.js +514 -0
- package/apps/app-lifeops/src/components/LifeOpsActivitySignalsEffect.d.ts +2 -0
- package/apps/app-lifeops/src/components/LifeOpsActivitySignalsEffect.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsActivitySignalsEffect.js +10 -0
- package/apps/app-lifeops/src/components/LifeOpsCalendarSection.d.ts +15 -0
- package/apps/app-lifeops/src/components/LifeOpsCalendarSection.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsCalendarSection.js +515 -0
- package/apps/app-lifeops/src/components/LifeOpsChatAdapter.d.ts +34 -0
- package/apps/app-lifeops/src/components/LifeOpsChatAdapter.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsChatAdapter.js +175 -0
- package/apps/app-lifeops/src/components/LifeOpsFeatureTogglesSection.d.ts +2 -0
- package/apps/app-lifeops/src/components/LifeOpsFeatureTogglesSection.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsFeatureTogglesSection.js +99 -0
- package/apps/app-lifeops/src/components/LifeOpsHabitVisuals.d.ts +37 -0
- package/apps/app-lifeops/src/components/LifeOpsHabitVisuals.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsHabitVisuals.js +88 -0
- package/apps/app-lifeops/src/components/LifeOpsInboxSection.d.ts +13 -0
- package/apps/app-lifeops/src/components/LifeOpsInboxSection.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsInboxSection.js +490 -0
- package/apps/app-lifeops/src/components/LifeOpsLinkBankButton.d.ts +12 -0
- package/apps/app-lifeops/src/components/LifeOpsLinkBankButton.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsLinkBankButton.js +92 -0
- package/apps/app-lifeops/src/components/LifeOpsLinkPaypalButton.d.ts +12 -0
- package/apps/app-lifeops/src/components/LifeOpsLinkPaypalButton.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsLinkPaypalButton.js +160 -0
- package/apps/app-lifeops/src/components/LifeOpsMoneySection.d.ts +3 -0
- package/apps/app-lifeops/src/components/LifeOpsMoneySection.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsMoneySection.js +373 -0
- package/apps/app-lifeops/src/components/LifeOpsNavRail.d.ts +9 -0
- package/apps/app-lifeops/src/components/LifeOpsNavRail.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsNavRail.js +93 -0
- package/apps/app-lifeops/src/components/LifeOpsOperationalPanels.d.ts +4 -0
- package/apps/app-lifeops/src/components/LifeOpsOperationalPanels.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsOperationalPanels.js +274 -0
- package/apps/app-lifeops/src/components/LifeOpsOverviewSection.d.ts +7 -0
- package/apps/app-lifeops/src/components/LifeOpsOverviewSection.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsOverviewSection.js +657 -0
- package/apps/app-lifeops/src/components/LifeOpsPageSections.d.ts +42 -0
- package/apps/app-lifeops/src/components/LifeOpsPageSections.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsPageSections.js +166 -0
- package/apps/app-lifeops/src/components/LifeOpsPageView.d.ts +2 -0
- package/apps/app-lifeops/src/components/LifeOpsPageView.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsPageView.js +566 -0
- package/apps/app-lifeops/src/components/LifeOpsRemindersSection.d.ts +2 -0
- package/apps/app-lifeops/src/components/LifeOpsRemindersSection.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsRemindersSection.js +749 -0
- package/apps/app-lifeops/src/components/LifeOpsResizableSidebar.d.ts +27 -0
- package/apps/app-lifeops/src/components/LifeOpsResizableSidebar.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsResizableSidebar.js +106 -0
- package/apps/app-lifeops/src/components/LifeOpsScreenTimeSection.d.ts +2 -0
- package/apps/app-lifeops/src/components/LifeOpsScreenTimeSection.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsScreenTimeSection.js +373 -0
- package/apps/app-lifeops/src/components/LifeOpsSectionContent.d.ts +10 -0
- package/apps/app-lifeops/src/components/LifeOpsSectionContent.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsSectionContent.js +30 -0
- package/apps/app-lifeops/src/components/LifeOpsSelectionContext.d.ts +21 -0
- package/apps/app-lifeops/src/components/LifeOpsSelectionContext.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsSelectionContext.js +30 -0
- package/apps/app-lifeops/src/components/LifeOpsSettingsSection.d.ts +20 -0
- package/apps/app-lifeops/src/components/LifeOpsSettingsSection.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsSettingsSection.js +597 -0
- package/apps/app-lifeops/src/components/LifeOpsSetupGate.d.ts +13 -0
- package/apps/app-lifeops/src/components/LifeOpsSetupGate.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsSetupGate.js +134 -0
- package/apps/app-lifeops/src/components/LifeOpsSleepSection.d.ts +10 -0
- package/apps/app-lifeops/src/components/LifeOpsSleepSection.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsSleepSection.js +425 -0
- package/apps/app-lifeops/src/components/LifeOpsWorkspaceShell.d.ts +11 -0
- package/apps/app-lifeops/src/components/LifeOpsWorkspaceShell.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsWorkspaceShell.js +49 -0
- package/apps/app-lifeops/src/components/LifeOpsWorkspaceView.d.ts +2 -0
- package/apps/app-lifeops/src/components/LifeOpsWorkspaceView.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/LifeOpsWorkspaceView.js +1041 -0
- package/apps/app-lifeops/src/components/MessagingConnectorCards.d.ts +7 -0
- package/apps/app-lifeops/src/components/MessagingConnectorCards.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/MessagingConnectorCards.js +643 -0
- package/apps/app-lifeops/src/components/MissingSourceCard.d.ts +9 -0
- package/apps/app-lifeops/src/components/MissingSourceCard.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/MissingSourceCard.js +5 -0
- package/apps/app-lifeops/src/components/MobileSignalsSetupCard.d.ts +2 -0
- package/apps/app-lifeops/src/components/MobileSignalsSetupCard.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/MobileSignalsSetupCard.js +163 -0
- package/apps/app-lifeops/src/components/SleepInspectionPanel.d.ts +8 -0
- package/apps/app-lifeops/src/components/SleepInspectionPanel.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/SleepInspectionPanel.js +59 -0
- package/apps/app-lifeops/src/components/WebsiteBlockerSettingsCard.d.ts +3 -0
- package/apps/app-lifeops/src/components/WebsiteBlockerSettingsCard.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/WebsiteBlockerSettingsCard.js +75 -0
- package/apps/app-lifeops/src/components/WhatsAppQrOverlay.d.ts +8 -0
- package/apps/app-lifeops/src/components/WhatsAppQrOverlay.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/WhatsAppQrOverlay.js +48 -0
- package/apps/app-lifeops/src/components/lifeops-labels.d.ts +2 -0
- package/apps/app-lifeops/src/components/lifeops-labels.d.ts.map +1 -0
- package/apps/app-lifeops/src/components/lifeops-labels.js +5 -0
- package/apps/app-lifeops/src/events/index.d.ts +34 -0
- package/apps/app-lifeops/src/events/index.d.ts.map +1 -0
- package/apps/app-lifeops/src/events/index.js +23 -0
- package/apps/app-lifeops/src/hooks/useCalendarWeek.d.ts +28 -0
- package/apps/app-lifeops/src/hooks/useCalendarWeek.d.ts.map +1 -0
- package/apps/app-lifeops/src/hooks/useCalendarWeek.js +93 -0
- package/apps/app-lifeops/src/hooks/useDiscordConnector.d.ts +14 -0
- package/apps/app-lifeops/src/hooks/useDiscordConnector.d.ts.map +1 -0
- package/apps/app-lifeops/src/hooks/useDiscordConnector.js +126 -0
- package/apps/app-lifeops/src/hooks/useGoogleLifeOpsConnector.d.ts +29 -0
- package/apps/app-lifeops/src/hooks/useGoogleLifeOpsConnector.d.ts.map +1 -0
- package/apps/app-lifeops/src/hooks/useGoogleLifeOpsConnector.js +481 -0
- package/apps/app-lifeops/src/hooks/useIMessageConnector.d.ts +10 -0
- package/apps/app-lifeops/src/hooks/useIMessageConnector.d.ts.map +1 -0
- package/apps/app-lifeops/src/hooks/useIMessageConnector.js +50 -0
- package/apps/app-lifeops/src/hooks/useInbox.d.ts +34 -0
- package/apps/app-lifeops/src/hooks/useInbox.d.ts.map +1 -0
- package/apps/app-lifeops/src/hooks/useInbox.js +98 -0
- package/apps/app-lifeops/src/hooks/useLifeOpsActivitySignals.d.ts +2 -0
- package/apps/app-lifeops/src/hooks/useLifeOpsActivitySignals.d.ts.map +1 -0
- package/apps/app-lifeops/src/hooks/useLifeOpsActivitySignals.js +383 -0
- package/apps/app-lifeops/src/hooks/useLifeOpsAppState.d.ts +9 -0
- package/apps/app-lifeops/src/hooks/useLifeOpsAppState.d.ts.map +1 -0
- package/apps/app-lifeops/src/hooks/useLifeOpsAppState.js +83 -0
- package/apps/app-lifeops/src/hooks/useLifeOpsCapabilitiesStatus.d.ts +8 -0
- package/apps/app-lifeops/src/hooks/useLifeOpsCapabilitiesStatus.d.ts.map +1 -0
- package/apps/app-lifeops/src/hooks/useLifeOpsCapabilitiesStatus.js +60 -0
- package/apps/app-lifeops/src/hooks/useLifeOpsScheduleInspection.d.ts +18 -0
- package/apps/app-lifeops/src/hooks/useLifeOpsScheduleInspection.d.ts.map +1 -0
- package/apps/app-lifeops/src/hooks/useLifeOpsScheduleInspection.js +66 -0
- package/apps/app-lifeops/src/hooks/useLifeOpsScheduleState.d.ts +14 -0
- package/apps/app-lifeops/src/hooks/useLifeOpsScheduleState.d.ts.map +1 -0
- package/apps/app-lifeops/src/hooks/useLifeOpsScheduleState.js +79 -0
- package/apps/app-lifeops/src/hooks/useLifeOpsSection.d.ts +18 -0
- package/apps/app-lifeops/src/hooks/useLifeOpsSection.d.ts.map +1 -0
- package/apps/app-lifeops/src/hooks/useLifeOpsSection.js +78 -0
- package/apps/app-lifeops/src/hooks/useLifeOpsXConnector.d.ts +14 -0
- package/apps/app-lifeops/src/hooks/useLifeOpsXConnector.d.ts.map +1 -0
- package/apps/app-lifeops/src/hooks/useLifeOpsXConnector.js +160 -0
- package/apps/app-lifeops/src/hooks/useSignalConnector.d.ts +16 -0
- package/apps/app-lifeops/src/hooks/useSignalConnector.d.ts.map +1 -0
- package/apps/app-lifeops/src/hooks/useSignalConnector.js +198 -0
- package/apps/app-lifeops/src/hooks/useTelegramConnector.d.ts +21 -0
- package/apps/app-lifeops/src/hooks/useTelegramConnector.d.ts.map +1 -0
- package/apps/app-lifeops/src/hooks/useTelegramConnector.js +177 -0
- package/apps/app-lifeops/src/hooks/useWhatsAppConnector.d.ts +8 -0
- package/apps/app-lifeops/src/hooks/useWhatsAppConnector.d.ts.map +1 -0
- package/apps/app-lifeops/src/hooks/useWhatsAppConnector.js +58 -0
- package/apps/app-lifeops/src/hooks/useWhatsAppPairing.d.ts +12 -0
- package/apps/app-lifeops/src/hooks/useWhatsAppPairing.d.ts.map +1 -0
- package/apps/app-lifeops/src/hooks/useWhatsAppPairing.js +152 -0
- package/apps/app-lifeops/src/lifeops/discord-browser-scraper.js +1 -1
- package/apps/app-lifeops/src/lifeops/google-gmail.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/google-gmail.js +74 -26
- package/apps/app-lifeops/src/lifeops/google-managed-client.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/google-managed-client.js +4 -5
- package/apps/app-lifeops/src/lifeops/google-oauth.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/google-oauth.js +2 -2
- package/apps/app-lifeops/src/lifeops/owner-profile.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/owner-profile.js +1 -1
- package/apps/app-lifeops/src/lifeops/paypal-managed-client.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/paypal-managed-client.js +4 -5
- package/apps/app-lifeops/src/lifeops/plaid-managed-client.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/plaid-managed-client.js +4 -5
- package/apps/app-lifeops/src/lifeops/schedule-sync-client.js +2 -2
- package/apps/app-lifeops/src/lifeops/service-constants.d.ts +1 -0
- package/apps/app-lifeops/src/lifeops/service-constants.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-constants.js +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-core.d.ts +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-core.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-core.js +2 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-imessage.js +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-inbox.d.ts +3 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-inbox.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-inbox.js +42 -13
- package/apps/app-lifeops/src/lifeops/service-mixin-reminders.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-reminders.js +3 -2
- package/apps/app-lifeops/src/lifeops/service-mixin-workflows.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-workflows.js +1 -1
- package/apps/app-lifeops/src/lifeops/service-normalize-calendar.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-normalize-calendar.js +3 -3
- package/apps/app-lifeops/src/lifeops/service-normalize-connector.d.ts +1 -1
- package/apps/app-lifeops/src/lifeops/service-normalize-connector.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-normalize-connector.js +2 -2
- package/apps/app-lifeops/src/lifeops/signal-auth.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/signal-auth.js +6 -3
- package/apps/app-lifeops/src/lifeops/telegram-auth.js +1 -1
- package/apps/app-lifeops/src/lifeops/travel-adapters/duffel.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/travel-adapters/duffel.js +31 -6
- package/apps/app-lifeops/src/lifeops/twilio.js +1 -1
- package/apps/app-lifeops/src/lifeops/x-poster.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/x-poster.js +13 -3
- package/apps/app-lifeops/src/lifeops-route.d.ts +74 -0
- package/apps/app-lifeops/src/lifeops-route.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops-route.js +204 -0
- package/apps/app-lifeops/src/platform/lifeops-github.d.ts +15 -0
- package/apps/app-lifeops/src/platform/lifeops-github.d.ts.map +1 -0
- package/apps/app-lifeops/src/platform/lifeops-github.js +135 -0
- package/apps/app-lifeops/src/routes/cloud-features-routes.d.ts +2 -2
- package/apps/app-lifeops/src/routes/cloud-features-routes.d.ts.map +1 -1
- package/apps/app-lifeops/src/routes/cloud-features-routes.js +5 -3
- package/apps/app-lifeops/src/routes/lifeops-routes.d.ts.map +1 -1
- package/apps/app-lifeops/src/routes/lifeops-routes.js +15 -3
- package/apps/app-lifeops/src/routes/plugin.d.ts.map +1 -1
- package/apps/app-lifeops/src/routes/plugin.js +10 -1
- package/apps/app-lifeops/src/routes/travel-provider-relay-routes.d.ts +1 -1
- package/apps/app-lifeops/src/routes/travel-provider-relay-routes.d.ts.map +1 -1
- package/apps/app-lifeops/src/routes/travel-provider-relay-routes.js +4 -2
- package/apps/app-lifeops/src/routes/website-blocker-routes.d.ts +1 -1
- package/apps/app-lifeops/src/routes/website-blocker-routes.d.ts.map +1 -1
- package/apps/app-lifeops/src/ui.d.ts +11 -0
- package/apps/app-lifeops/src/ui.d.ts.map +1 -0
- package/apps/app-lifeops/src/ui.js +9 -0
- package/apps/app-lifeops/src/utils/lifeops-url.d.ts +5 -0
- package/apps/app-lifeops/src/utils/lifeops-url.d.ts.map +1 -0
- package/apps/app-lifeops/src/utils/lifeops-url.js +35 -0
- package/apps/app-lifeops/src/website-blocker/access.d.ts.map +1 -1
- package/apps/app-lifeops/src/website-blocker/access.js +1 -1
- package/apps/app-steward/src/routes/steward-compat-routes.d.ts +1 -1
- package/apps/app-steward/src/routes/steward-compat-routes.d.ts.map +1 -1
- package/apps/app-steward/src/routes/steward-compat-routes.js +3 -1
- package/apps/app-steward/src/routes/wallet-browser-compat-routes.d.ts +1 -1
- package/apps/app-steward/src/routes/wallet-browser-compat-routes.d.ts.map +1 -1
- package/apps/app-steward/src/routes/wallet-browser-compat-routes.js +3 -1
- package/apps/app-steward/src/routes/wallet-bsc-core-routes.d.ts.map +1 -1
- package/apps/app-steward/src/routes/wallet-bsc-core-routes.js +2 -1
- package/apps/app-steward/src/routes/wallet-compat-routes.d.ts +1 -1
- package/apps/app-steward/src/routes/wallet-compat-routes.d.ts.map +1 -1
- package/apps/app-steward/src/routes/wallet-compat-routes.js +3 -1
- package/apps/app-steward/src/routes/wallet-core-routes.d.ts.map +1 -1
- package/apps/app-steward/src/routes/wallet-core-routes.js +2 -1
- package/apps/app-steward/src/routes/wallet-trade-compat-routes.d.ts +1 -1
- package/apps/app-steward/src/routes/wallet-trade-compat-routes.d.ts.map +1 -1
- package/apps/app-steward/src/routes/wallet-trade-compat-routes.js +3 -1
- package/apps/app-training/src/core/dataset-generator.d.ts +1 -1
- package/apps/app-training/src/core/dataset-generator.d.ts.map +1 -1
- package/apps/app-training/src/core/roleplay-executor.d.ts +1 -1
- package/apps/app-training/src/core/roleplay-executor.d.ts.map +1 -1
- package/apps/app-training/src/core/trajectory-task-datasets.d.ts +1 -1
- package/apps/app-training/src/core/trajectory-task-datasets.d.ts.map +1 -1
- package/apps/app-training/src/index.d.ts +1 -2
- package/apps/app-training/src/index.d.ts.map +1 -1
- package/apps/app-training/src/index.js +1 -2
- package/apps/app-training/src/routes/training-routes.d.ts +1 -1
- package/apps/app-training/src/routes/training-routes.d.ts.map +1 -1
- package/apps/app-training/src/routes/training-routes.js +1 -1
- package/apps/app-training/src/routes/trajectory-routes.d.ts +1 -1
- package/apps/app-training/src/routes/trajectory-routes.d.ts.map +1 -1
- package/apps/app-training/src/routes/trajectory-routes.js +3 -1
- package/apps/app-training/src/services/training-service-like.d.ts +1 -1
- package/apps/app-training/src/services/training-service-like.d.ts.map +1 -1
- package/apps/app-training/src/services/training-service.d.ts +1 -1
- package/apps/app-training/src/services/training-service.d.ts.map +1 -1
- package/package.json +1 -1
- package/packages/agent/src/api/provider-switch-config.js +1 -1
- package/packages/agent/src/api/server-helpers-auth.d.ts.map +1 -1
- package/packages/agent/src/api/server-helpers-auth.js +5 -4
- package/packages/agent/src/providers/media-provider.d.ts +1 -1
- package/packages/agent/src/providers/media-provider.d.ts.map +1 -1
- package/packages/app-core/src/App.d.ts.map +1 -1
- package/packages/app-core/src/App.js +20 -12
- package/packages/app-core/src/api/auth.d.ts.map +1 -1
- package/packages/app-core/src/api/auth.js +5 -5
- package/packages/app-core/src/api/client-types-experience.d.ts +7 -0
- package/packages/app-core/src/api/client-types-experience.d.ts.map +1 -1
- package/packages/app-core/src/components/apps/helpers.d.ts +1 -1
- package/packages/app-core/src/components/apps/helpers.d.ts.map +1 -1
- package/packages/app-core/src/components/apps/helpers.js +1 -0
- package/packages/app-core/src/components/apps/internal-tool-apps.d.ts +11 -0
- package/packages/app-core/src/components/apps/internal-tool-apps.d.ts.map +1 -1
- package/packages/app-core/src/components/apps/internal-tool-apps.js +31 -0
- package/packages/app-core/src/components/apps/launch-history.d.ts +16 -0
- package/packages/app-core/src/components/apps/launch-history.d.ts.map +1 -0
- package/packages/app-core/src/components/apps/launch-history.js +77 -0
- package/packages/app-core/src/components/apps/per-app-config.d.ts +19 -0
- package/packages/app-core/src/components/apps/per-app-config.d.ts.map +1 -0
- package/packages/app-core/src/components/apps/per-app-config.js +99 -0
- package/packages/app-core/src/components/apps/useRegistryCatalog.d.ts +14 -0
- package/packages/app-core/src/components/apps/useRegistryCatalog.d.ts.map +1 -0
- package/packages/app-core/src/components/apps/useRegistryCatalog.js +52 -0
- package/packages/app-core/src/components/auth/LoginView.d.ts +1 -19
- package/packages/app-core/src/components/auth/LoginView.d.ts.map +1 -1
- package/packages/app-core/src/components/auth/LoginView.js +4 -99
- package/packages/app-core/src/components/character/CharacterExperienceWorkspace.d.ts.map +1 -1
- package/packages/app-core/src/components/character/CharacterExperienceWorkspace.js +14 -2
- package/packages/app-core/src/components/character/character-hub-helpers.d.ts.map +1 -1
- package/packages/app-core/src/components/character/character-hub-helpers.js +7 -0
- package/packages/app-core/src/components/character/character-hub-types.d.ts +7 -0
- package/packages/app-core/src/components/character/character-hub-types.d.ts.map +1 -1
- package/packages/app-core/src/components/onboarding/BootstrapStep.d.ts.map +1 -1
- package/packages/app-core/src/components/onboarding/BootstrapStep.js +3 -2
- package/packages/app-core/src/components/pages/AppDetailsView.d.ts +36 -0
- package/packages/app-core/src/components/pages/AppDetailsView.d.ts.map +1 -0
- package/packages/app-core/src/components/pages/AppDetailsView.js +289 -0
- package/packages/app-core/src/components/pages/AppsView.d.ts.map +1 -1
- package/packages/app-core/src/components/pages/AppsView.js +134 -42
- package/packages/app-core/src/components/shell/StartupShell.d.ts.map +1 -1
- package/packages/app-core/src/components/shell/StartupShell.js +2 -5
- package/packages/app-core/src/i18n/locales/en.json +256 -205
- package/packages/app-core/src/i18n/locales/es.json +256 -205
- package/packages/app-core/src/i18n/locales/ko.json +256 -205
- package/packages/app-core/src/i18n/locales/pt.json +256 -205
- package/packages/app-core/src/i18n/locales/tl.json +256 -205
- package/packages/app-core/src/i18n/locales/vi.json +256 -205
- package/packages/app-core/src/i18n/locales/zh-CN.json +256 -205
- package/packages/app-core/src/navigation/index.d.ts.map +1 -1
- package/packages/app-core/src/navigation/index.js +6 -0
- package/packages/app-core/src/shell/AppWindowRenderer.d.ts +17 -0
- package/packages/app-core/src/shell/AppWindowRenderer.d.ts.map +1 -0
- package/packages/app-core/src/shell/AppWindowRenderer.js +337 -0
- package/packages/app-core/src/shell/DetachedShellRoot.js +4 -1
- package/packages/app-core/src/shell/index.d.ts +1 -0
- package/packages/app-core/src/shell/index.d.ts.map +1 -1
- package/packages/app-core/src/shell/index.js +1 -0
- package/packages/app-core/src/state/startup-coordinator.d.ts.map +1 -1
- package/packages/app-core/src/state/startup-coordinator.js +0 -3
- package/packages/app-core/src/state/startup-phase-poll.d.ts.map +1 -1
- package/packages/app-core/src/state/startup-phase-poll.js +2 -4
- package/packages/app-core/src/state/usePluginsSkillsState.d.ts +6 -6
- package/packages/native-plugins/mobile-signals/src/definitions.d.ts +162 -0
- package/packages/native-plugins/mobile-signals/src/definitions.d.ts.map +1 -0
- package/packages/native-plugins/mobile-signals/src/definitions.js +1 -0
- package/packages/native-plugins/mobile-signals/src/index.d.ts +4 -0
- package/packages/native-plugins/mobile-signals/src/index.d.ts.map +1 -0
- package/packages/native-plugins/mobile-signals/src/index.js +6 -0
- package/packages/native-plugins/mobile-signals/src/web.d.ts +29 -0
- package/packages/native-plugins/mobile-signals/src/web.d.ts.map +1 -0
- package/packages/native-plugins/mobile-signals/src/web.js +269 -0
- package/packages/shared/src/app-hero-art.d.ts.map +1 -1
- package/packages/shared/src/app-hero-art.js +13 -0
- package/packages/shared/src/contracts/lifeops.d.ts +10 -0
- package/packages/shared/src/contracts/lifeops.d.ts.map +1 -1
- package/packages/shared/src/contracts/lifeops.js +5 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/actions/record-experience.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/experience/actions/record-experience.js +46 -4
- package/packages/typescript/src/features/advanced-capabilities/experience/evaluators/experienceEvaluator.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/experience/evaluators/experienceEvaluator.js +34 -124
- package/packages/typescript/src/features/advanced-capabilities/experience/service.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/experience/service.js +56 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/types.d.ts +7 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/types.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceText.d.ts +7 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceText.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceText.js +123 -0
- package/apps/app-training/src/ui/FineTuningView.d.ts +0 -5
- package/apps/app-training/src/ui/FineTuningView.d.ts.map +0 -1
- package/apps/app-training/src/ui/FineTuningView.js +0 -388
- package/apps/app-training/src/ui/fine-tuning-panels.d.ts +0 -111
- package/apps/app-training/src/ui/fine-tuning-panels.d.ts.map +0 -1
- package/apps/app-training/src/ui/fine-tuning-panels.js +0 -130
- package/apps/app-training/src/ui/index.d.ts +0 -3
- package/apps/app-training/src/ui/index.d.ts.map +0 -1
- package/apps/app-training/src/ui/index.js +0 -2
- package/packages/app-core/src/api/trusted-local-request.d.ts +0 -4
- package/packages/app-core/src/api/trusted-local-request.d.ts.map +0 -1
- package/packages/app-core/src/api/trusted-local-request.js +0 -176
|
@@ -0,0 +1,657 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { client, useApp } from "@elizaos/app-core";
|
|
3
|
+
import { ArrowRight, AtSign, CalendarDays, Flame, Loader2, Mail, MessageCircle, MessageSquare, Monitor, Moon, Phone, RefreshCw, Send, Share2, Shield, Smartphone, Sun, Target, TriangleAlert, } from "lucide-react";
|
|
4
|
+
import { useCallback, useEffect, useMemo, useState, } from "react";
|
|
5
|
+
import { useCalendarWeek } from "../hooks/useCalendarWeek.js";
|
|
6
|
+
import { useGoogleLifeOpsConnector } from "../hooks/useGoogleLifeOpsConnector.js";
|
|
7
|
+
import { useInbox } from "../hooks/useInbox.js";
|
|
8
|
+
import { useLifeOpsCapabilitiesStatus } from "../hooks/useLifeOpsCapabilitiesStatus.js";
|
|
9
|
+
import { useLifeOpsXConnector } from "../hooks/useLifeOpsXConnector.js";
|
|
10
|
+
import { BrowserBridgeStatusChip } from "./BrowserBridgeStatusChip.js";
|
|
11
|
+
import { DataSourcesStrip } from "./DataSourcesStrip.js";
|
|
12
|
+
import { LIFEOPS_MAIL_CHANNELS, LIFEOPS_MESSAGE_CHANNELS, } from "./LifeOpsInboxSection.js";
|
|
13
|
+
import { useLifeOpsSelection } from "./LifeOpsSelectionContext.js";
|
|
14
|
+
import { MissingSourceCard } from "./MissingSourceCard.js";
|
|
15
|
+
const URGENCY_STYLES = {
|
|
16
|
+
overdue: {
|
|
17
|
+
dot: "bg-rose-500",
|
|
18
|
+
text: "text-rose-300",
|
|
19
|
+
},
|
|
20
|
+
soon: {
|
|
21
|
+
dot: "bg-amber-400",
|
|
22
|
+
text: "text-amber-300",
|
|
23
|
+
},
|
|
24
|
+
today: {
|
|
25
|
+
dot: "bg-blue-400",
|
|
26
|
+
text: "text-blue-300",
|
|
27
|
+
},
|
|
28
|
+
later: {
|
|
29
|
+
dot: "bg-emerald-400",
|
|
30
|
+
text: "text-emerald-300",
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
const CHANNEL_STYLES = {
|
|
34
|
+
gmail: {
|
|
35
|
+
label: "Gmail",
|
|
36
|
+
icon: _jsx(AtSign, { className: "h-3.5 w-3.5", "aria-hidden": true }),
|
|
37
|
+
text: "text-rose-300",
|
|
38
|
+
bg: "bg-rose-500/12",
|
|
39
|
+
},
|
|
40
|
+
discord: {
|
|
41
|
+
label: "Discord",
|
|
42
|
+
icon: _jsx(MessageCircle, { className: "h-3.5 w-3.5", "aria-hidden": true }),
|
|
43
|
+
text: "text-indigo-300",
|
|
44
|
+
bg: "bg-indigo-500/14",
|
|
45
|
+
},
|
|
46
|
+
telegram: {
|
|
47
|
+
label: "Telegram",
|
|
48
|
+
icon: _jsx(Send, { className: "h-3.5 w-3.5", "aria-hidden": true }),
|
|
49
|
+
text: "text-sky-300",
|
|
50
|
+
bg: "bg-sky-500/14",
|
|
51
|
+
},
|
|
52
|
+
signal: {
|
|
53
|
+
label: "Signal",
|
|
54
|
+
icon: _jsx(Shield, { className: "h-3.5 w-3.5", "aria-hidden": true }),
|
|
55
|
+
text: "text-blue-300",
|
|
56
|
+
bg: "bg-blue-500/14",
|
|
57
|
+
},
|
|
58
|
+
imessage: {
|
|
59
|
+
label: "iMessage",
|
|
60
|
+
icon: _jsx(MessageSquare, { className: "h-3.5 w-3.5", "aria-hidden": true }),
|
|
61
|
+
text: "text-emerald-300",
|
|
62
|
+
bg: "bg-emerald-500/14",
|
|
63
|
+
},
|
|
64
|
+
whatsapp: {
|
|
65
|
+
label: "WhatsApp",
|
|
66
|
+
icon: _jsx(Smartphone, { className: "h-3.5 w-3.5", "aria-hidden": true }),
|
|
67
|
+
text: "text-lime-300",
|
|
68
|
+
bg: "bg-lime-500/14",
|
|
69
|
+
},
|
|
70
|
+
sms: {
|
|
71
|
+
label: "SMS",
|
|
72
|
+
icon: _jsx(Phone, { className: "h-3.5 w-3.5", "aria-hidden": true }),
|
|
73
|
+
text: "text-amber-300",
|
|
74
|
+
bg: "bg-amber-500/14",
|
|
75
|
+
},
|
|
76
|
+
x_dm: {
|
|
77
|
+
label: "X DM",
|
|
78
|
+
icon: _jsx(AtSign, { className: "h-3.5 w-3.5", "aria-hidden": true }),
|
|
79
|
+
text: "text-zinc-200",
|
|
80
|
+
bg: "bg-zinc-500/14",
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
const CHANNEL_ORDER = [
|
|
84
|
+
"gmail",
|
|
85
|
+
"imessage",
|
|
86
|
+
"sms",
|
|
87
|
+
"discord",
|
|
88
|
+
"telegram",
|
|
89
|
+
"signal",
|
|
90
|
+
"whatsapp",
|
|
91
|
+
"x_dm",
|
|
92
|
+
];
|
|
93
|
+
function formatFullDate(date) {
|
|
94
|
+
return new Intl.DateTimeFormat(undefined, {
|
|
95
|
+
weekday: "long",
|
|
96
|
+
month: "long",
|
|
97
|
+
day: "numeric",
|
|
98
|
+
}).format(date);
|
|
99
|
+
}
|
|
100
|
+
function formatClockTime(iso) {
|
|
101
|
+
if (!iso)
|
|
102
|
+
return "";
|
|
103
|
+
const parsed = Date.parse(iso);
|
|
104
|
+
if (!Number.isFinite(parsed))
|
|
105
|
+
return "";
|
|
106
|
+
return new Intl.DateTimeFormat(undefined, {
|
|
107
|
+
hour: "numeric",
|
|
108
|
+
minute: "2-digit",
|
|
109
|
+
}).format(new Date(parsed));
|
|
110
|
+
}
|
|
111
|
+
function formatRelative(iso) {
|
|
112
|
+
const parsed = Date.parse(iso);
|
|
113
|
+
if (!Number.isFinite(parsed))
|
|
114
|
+
return iso;
|
|
115
|
+
const diffMs = parsed - Date.now();
|
|
116
|
+
const diffMin = Math.round(diffMs / 60_000);
|
|
117
|
+
if (Math.abs(diffMin) < 1)
|
|
118
|
+
return "now";
|
|
119
|
+
if (diffMin > 0) {
|
|
120
|
+
if (diffMin < 60)
|
|
121
|
+
return `in ${diffMin}m`;
|
|
122
|
+
const hrs = Math.round(diffMin / 60);
|
|
123
|
+
if (hrs < 24)
|
|
124
|
+
return `in ${hrs}h`;
|
|
125
|
+
return `in ${Math.round(hrs / 24)}d`;
|
|
126
|
+
}
|
|
127
|
+
const ago = Math.abs(diffMin);
|
|
128
|
+
if (ago < 60)
|
|
129
|
+
return `${ago}m ago`;
|
|
130
|
+
const agoH = Math.round(ago / 60);
|
|
131
|
+
if (agoH < 24)
|
|
132
|
+
return `${agoH}h ago`;
|
|
133
|
+
return `${Math.round(agoH / 24)}d ago`;
|
|
134
|
+
}
|
|
135
|
+
function formatDurationMinutes(value) {
|
|
136
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
|
|
137
|
+
return "";
|
|
138
|
+
}
|
|
139
|
+
const total = Math.round(value);
|
|
140
|
+
if (total < 60)
|
|
141
|
+
return `${total}m`;
|
|
142
|
+
const hours = Math.floor(total / 60);
|
|
143
|
+
const minutes = total % 60;
|
|
144
|
+
return minutes === 0 ? `${hours}h` : `${hours}h ${minutes}m`;
|
|
145
|
+
}
|
|
146
|
+
function formatDurationSeconds(value) {
|
|
147
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) {
|
|
148
|
+
return "";
|
|
149
|
+
}
|
|
150
|
+
return formatDurationMinutes(value / 60);
|
|
151
|
+
}
|
|
152
|
+
function humanize(value) {
|
|
153
|
+
if (!value)
|
|
154
|
+
return "";
|
|
155
|
+
return value
|
|
156
|
+
.split("_")
|
|
157
|
+
.filter(Boolean)
|
|
158
|
+
.map((part) => part[0]?.toUpperCase() + part.slice(1))
|
|
159
|
+
.join(" ");
|
|
160
|
+
}
|
|
161
|
+
function startOfLocalDayIso(date = new Date()) {
|
|
162
|
+
const start = new Date(date);
|
|
163
|
+
start.setHours(0, 0, 0, 0);
|
|
164
|
+
return start.toISOString();
|
|
165
|
+
}
|
|
166
|
+
function classifyReminder(iso) {
|
|
167
|
+
const parsed = Date.parse(iso);
|
|
168
|
+
if (!Number.isFinite(parsed))
|
|
169
|
+
return "later";
|
|
170
|
+
const diffMin = Math.round((parsed - Date.now()) / 60_000);
|
|
171
|
+
if (diffMin < 0)
|
|
172
|
+
return "overdue";
|
|
173
|
+
if (diffMin < 60)
|
|
174
|
+
return "soon";
|
|
175
|
+
if (diffMin < 60 * 24)
|
|
176
|
+
return "today";
|
|
177
|
+
return "later";
|
|
178
|
+
}
|
|
179
|
+
const CIRCADIAN_LABELS = {
|
|
180
|
+
awake: "Awake",
|
|
181
|
+
winding_down: "Winding down",
|
|
182
|
+
sleeping: "Sleeping",
|
|
183
|
+
waking: "Waking up",
|
|
184
|
+
napping: "Napping",
|
|
185
|
+
unclear: "Schedule unclear",
|
|
186
|
+
};
|
|
187
|
+
function circadianHeadline(schedule) {
|
|
188
|
+
if (!schedule)
|
|
189
|
+
return null;
|
|
190
|
+
const base = CIRCADIAN_LABELS[schedule.circadianState];
|
|
191
|
+
if (!base)
|
|
192
|
+
return null;
|
|
193
|
+
if (schedule.circadianState === "winding_down") {
|
|
194
|
+
const minutes = schedule.relativeTime.minutesUntilBedtimeTarget;
|
|
195
|
+
if (typeof minutes === "number" && minutes > 0) {
|
|
196
|
+
const formatted = formatDurationMinutes(minutes);
|
|
197
|
+
if (formatted)
|
|
198
|
+
return `Winding down for bed in ${formatted}`;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
if (schedule.circadianState === "awake") {
|
|
202
|
+
const minutes = schedule.relativeTime.minutesAwake;
|
|
203
|
+
if (typeof minutes === "number" && minutes > 0) {
|
|
204
|
+
const formatted = formatDurationMinutes(minutes);
|
|
205
|
+
if (formatted)
|
|
206
|
+
return `Awake for ${formatted}`;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
if (schedule.circadianState === "sleeping") {
|
|
210
|
+
return "Sleeping now";
|
|
211
|
+
}
|
|
212
|
+
return base;
|
|
213
|
+
}
|
|
214
|
+
function topActiveSession(screenTime) {
|
|
215
|
+
const items = screenTime?.items ?? [];
|
|
216
|
+
if (items.length === 0)
|
|
217
|
+
return null;
|
|
218
|
+
return items.reduce((best, current) => current.totalSeconds > best.totalSeconds ? current : best, items[0]);
|
|
219
|
+
}
|
|
220
|
+
function computeWeeklyDelta(args) {
|
|
221
|
+
const { todayTotalSeconds, weeklyTotalSeconds } = args;
|
|
222
|
+
if (typeof todayTotalSeconds !== "number" ||
|
|
223
|
+
typeof weeklyTotalSeconds !== "number" ||
|
|
224
|
+
!Number.isFinite(todayTotalSeconds) ||
|
|
225
|
+
!Number.isFinite(weeklyTotalSeconds) ||
|
|
226
|
+
weeklyTotalSeconds <= 0) {
|
|
227
|
+
return null;
|
|
228
|
+
}
|
|
229
|
+
const dailyAverage = weeklyTotalSeconds / 7;
|
|
230
|
+
if (dailyAverage <= 0)
|
|
231
|
+
return null;
|
|
232
|
+
const delta = (todayTotalSeconds - dailyAverage) / dailyAverage;
|
|
233
|
+
const percent = Math.round(Math.abs(delta) * 100);
|
|
234
|
+
if (percent < 1) {
|
|
235
|
+
return { label: "On par with avg", arrow: "flat" };
|
|
236
|
+
}
|
|
237
|
+
const arrow = delta > 0 ? "up" : "down";
|
|
238
|
+
const symbol = arrow === "up" ? "↑" : "↓";
|
|
239
|
+
return { label: `${symbol} ${percent}% vs avg`, arrow };
|
|
240
|
+
}
|
|
241
|
+
function sleepStatusLabel(schedule) {
|
|
242
|
+
if (!schedule)
|
|
243
|
+
return "No sleep signal";
|
|
244
|
+
switch (schedule.sleepStatus) {
|
|
245
|
+
case "sleeping_now":
|
|
246
|
+
return "Sleeping now";
|
|
247
|
+
case "slept":
|
|
248
|
+
return "Slept";
|
|
249
|
+
case "likely_missed":
|
|
250
|
+
return "Sleep likely missed";
|
|
251
|
+
case "unknown":
|
|
252
|
+
return humanize(schedule.circadianState) || "Unknown";
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
function buildHeadline(args) {
|
|
256
|
+
const { schedule, nextEvent, hasOverdue, hasUnread, hasAnyOverviewAccess } = args;
|
|
257
|
+
if (!hasAnyOverviewAccess) {
|
|
258
|
+
return "LifeOps is waiting on access.";
|
|
259
|
+
}
|
|
260
|
+
if (schedule?.sleepStatus === "sleeping_now") {
|
|
261
|
+
return "Sleep is the main event.";
|
|
262
|
+
}
|
|
263
|
+
if (hasOverdue) {
|
|
264
|
+
return "A reminder needs a decision.";
|
|
265
|
+
}
|
|
266
|
+
if (nextEvent) {
|
|
267
|
+
return `${nextEvent.title} at ${formatClockTime(nextEvent.startAt)}.`;
|
|
268
|
+
}
|
|
269
|
+
if (hasUnread) {
|
|
270
|
+
return "Messages need attention.";
|
|
271
|
+
}
|
|
272
|
+
return "The day is open.";
|
|
273
|
+
}
|
|
274
|
+
function DashboardPanel({ title, icon, action, className = "", children, }) {
|
|
275
|
+
return (_jsxs("section", { "aria-label": title, className: `min-w-0 overflow-hidden rounded-lg border border-border/16 bg-card/12 ${className}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-3 border-b border-border/12 px-3 py-2", children: [_jsx("div", { className: "flex min-w-0 items-center gap-2", children: _jsxs("h2", { className: "inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-bg/30 text-muted", title: title, children: [_jsx("span", { className: "sr-only", children: title }), icon] }) }), action] }), _jsx("div", { className: "p-4", children: children })] }));
|
|
276
|
+
}
|
|
277
|
+
function IconAction({ label, icon, onClick, }) {
|
|
278
|
+
return (_jsx("button", { type: "button", "aria-label": label, title: label, className: "inline-flex h-7 w-7 items-center justify-center rounded-md text-muted transition-colors hover:bg-bg/40 hover:text-txt", onClick: onClick, children: icon }));
|
|
279
|
+
}
|
|
280
|
+
function MetricCell({ label, value, tone, }) {
|
|
281
|
+
return (_jsxs("div", { className: "min-w-0 border-l border-border/12 px-3 py-2 first:border-l-0", children: [_jsx("div", { className: "truncate text-[10px] font-medium text-muted", children: label }), _jsx("div", { className: `mt-1 truncate text-sm font-semibold tabular-nums sm:text-lg ${tone ?? "text-txt"}`, children: value })] }));
|
|
282
|
+
}
|
|
283
|
+
function EmptyState({ children }) {
|
|
284
|
+
return _jsx("div", { className: "py-6 text-center text-xs text-muted", children: children });
|
|
285
|
+
}
|
|
286
|
+
function formatLabelList(labels) {
|
|
287
|
+
if (labels.length === 0) {
|
|
288
|
+
return "";
|
|
289
|
+
}
|
|
290
|
+
if (labels.length === 1) {
|
|
291
|
+
return labels[0];
|
|
292
|
+
}
|
|
293
|
+
if (labels.length === 2) {
|
|
294
|
+
return `${labels[0]} and ${labels[1]}`;
|
|
295
|
+
}
|
|
296
|
+
return `${labels.slice(0, -1).join(", ")}, and ${labels.at(-1)}`;
|
|
297
|
+
}
|
|
298
|
+
function sortPriorityMessages(messages) {
|
|
299
|
+
return [...messages].sort((left, right) => {
|
|
300
|
+
if (left.unread !== right.unread) {
|
|
301
|
+
return left.unread ? -1 : 1;
|
|
302
|
+
}
|
|
303
|
+
return right.receivedAt.localeCompare(left.receivedAt);
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
function hasCapabilityAccess(status, capabilityId) {
|
|
307
|
+
const capability = status?.capabilities.find((item) => item.id === capabilityId);
|
|
308
|
+
return capability?.state === "working" || capability?.state === "degraded";
|
|
309
|
+
}
|
|
310
|
+
function hasGoogleCapability(status, capabilities) {
|
|
311
|
+
if (status?.connected !== true) {
|
|
312
|
+
return false;
|
|
313
|
+
}
|
|
314
|
+
const granted = new Set(status.grantedCapabilities);
|
|
315
|
+
return capabilities.some((capability) => granted.has(capability));
|
|
316
|
+
}
|
|
317
|
+
function hasXMessageAccess(status) {
|
|
318
|
+
return status?.connected === true && (status.dmRead || status.dmInbound);
|
|
319
|
+
}
|
|
320
|
+
function TinyStatus({ color, label }) {
|
|
321
|
+
return (_jsxs("div", { className: "flex min-w-0 items-start gap-2", children: [_jsx("span", { className: `mt-1.5 h-1.5 w-1.5 shrink-0 rounded-full ${color}`, "aria-hidden": true }), _jsx("div", { className: "min-w-0", children: _jsx("div", { className: "text-sm font-medium leading-5 text-txt", children: label }) })] }));
|
|
322
|
+
}
|
|
323
|
+
function CalendarEventRow({ event, onClick, }) {
|
|
324
|
+
return (_jsxs("button", { type: "button", onClick: onClick, className: "flex w-full min-w-0 items-start gap-3 py-2 text-left transition-colors hover:text-accent", children: [_jsx("span", { className: "mt-1.5 h-1.5 w-1.5 shrink-0 rounded-full bg-blue-400" }), _jsx("span", { className: "min-w-0 flex-1", children: _jsx("span", { className: "block truncate text-sm font-medium text-txt", children: event.title }) }), _jsx("span", { className: "shrink-0 text-[11px] font-medium text-blue-300", children: event.isAllDay ? "All day" : formatClockTime(event.startAt) })] }));
|
|
325
|
+
}
|
|
326
|
+
function ReminderAgendaRow({ reminder, onClick, }) {
|
|
327
|
+
const urgency = classifyReminder(reminder.scheduledFor);
|
|
328
|
+
const style = URGENCY_STYLES[urgency];
|
|
329
|
+
return (_jsxs("button", { type: "button", onClick: onClick, className: "flex w-full min-w-0 items-start gap-3 py-2 text-left transition-colors hover:text-accent", children: [_jsx("span", { className: `mt-1.5 h-1.5 w-1.5 shrink-0 rounded-full ${style.dot}` }), _jsx("span", { className: "min-w-0 flex-1", children: _jsx("span", { className: "block truncate text-sm font-medium text-txt", children: reminder.title }) }), _jsx("span", { className: `shrink-0 text-[11px] font-medium ${style.text}`, children: formatRelative(reminder.scheduledFor) })] }));
|
|
330
|
+
}
|
|
331
|
+
function InboxMessageRow({ message, onClick, }) {
|
|
332
|
+
const style = CHANNEL_STYLES[message.channel];
|
|
333
|
+
const subject = message.subject?.trim() || `${style.label} message`;
|
|
334
|
+
const rowTitle = subject === `${style.label} message`
|
|
335
|
+
? message.sender.displayName
|
|
336
|
+
: `${message.sender.displayName} - ${subject}`;
|
|
337
|
+
return (_jsxs("button", { type: "button", onClick: onClick, className: "flex w-full min-w-0 items-start gap-3 py-2 text-left transition-colors hover:text-accent", children: [_jsx("span", { className: `mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full ${style.bg} ${style.text}`, children: style.icon }), _jsx("span", { className: "min-w-0 flex-1", children: _jsx("span", { className: `block truncate text-sm ${message.unread
|
|
338
|
+
? "font-semibold text-txt"
|
|
339
|
+
: "font-medium text-txt/80"}`, children: rowTitle }) }), _jsx("span", { className: "shrink-0 text-[11px] font-medium text-muted", children: formatRelative(message.receivedAt) })] }));
|
|
340
|
+
}
|
|
341
|
+
function TimelineRow({ entry, onOpenEvent, onOpenReminder, }) {
|
|
342
|
+
if (entry.kind === "event") {
|
|
343
|
+
return (_jsx(CalendarEventRow, { event: entry.event, onClick: () => onOpenEvent(entry.event) }));
|
|
344
|
+
}
|
|
345
|
+
return (_jsx(ReminderAgendaRow, { reminder: entry.reminder, onClick: () => onOpenReminder(entry.reminder) }));
|
|
346
|
+
}
|
|
347
|
+
function ScreenTimeList({ screenTime, loading, error, }) {
|
|
348
|
+
if (loading && !screenTime) {
|
|
349
|
+
return (_jsxs("div", { className: "flex items-center gap-2 py-5 text-xs text-muted", children: [_jsx(Loader2, { className: "h-4 w-4 animate-spin", "aria-hidden": true }), "Reading screen time..."] }));
|
|
350
|
+
}
|
|
351
|
+
if (error) {
|
|
352
|
+
return _jsx("div", { className: "py-4 text-xs text-rose-300", children: error });
|
|
353
|
+
}
|
|
354
|
+
const items = screenTime?.items ?? [];
|
|
355
|
+
if (items.length === 0) {
|
|
356
|
+
return _jsx(EmptyState, { children: "No screen-time sessions yet." });
|
|
357
|
+
}
|
|
358
|
+
return (_jsx("div", { className: "space-y-2", children: items.slice(0, 5).map((item) => (_jsxs("div", { className: "flex min-w-0 items-baseline justify-between gap-3 border-t border-border/10 pt-2 first:border-t-0 first:pt-0", children: [_jsx("div", { className: "min-w-0", children: _jsx("div", { className: "truncate text-sm font-medium text-txt", children: item.displayName }) }), _jsx("div", { className: "shrink-0 text-sm font-semibold tabular-nums text-txt", children: formatDurationSeconds(item.totalSeconds) })] }, `${item.source}:${item.identifier}`))) }));
|
|
359
|
+
}
|
|
360
|
+
export function LifeOpsOverviewSection({ onNavigate, }) {
|
|
361
|
+
const { t } = useApp();
|
|
362
|
+
const { select } = useLifeOpsSelection();
|
|
363
|
+
const today = useMemo(() => new Date(), []);
|
|
364
|
+
const capabilities = useLifeOpsCapabilitiesStatus();
|
|
365
|
+
const googleConnector = useGoogleLifeOpsConnector({
|
|
366
|
+
includeAccounts: false,
|
|
367
|
+
pollWhileDisconnected: false,
|
|
368
|
+
side: "owner",
|
|
369
|
+
});
|
|
370
|
+
const xConnector = useLifeOpsXConnector("owner");
|
|
371
|
+
const [overview, setOverview] = useState(null);
|
|
372
|
+
const [loading, setLoading] = useState(false);
|
|
373
|
+
const [error, setError] = useState(null);
|
|
374
|
+
const [screenTime, setScreenTime] = useState(null);
|
|
375
|
+
const [screenTimeLoading, setScreenTimeLoading] = useState(false);
|
|
376
|
+
const [screenTimeError, setScreenTimeError] = useState(null);
|
|
377
|
+
const [social, setSocial] = useState(null);
|
|
378
|
+
const [socialLoading, setSocialLoading] = useState(false);
|
|
379
|
+
const [socialError, setSocialError] = useState(null);
|
|
380
|
+
const [weeklyScreenTotalSeconds, setWeeklyScreenTotalSeconds] = useState(null);
|
|
381
|
+
const loadOverview = useCallback(async () => {
|
|
382
|
+
setLoading(true);
|
|
383
|
+
setError(null);
|
|
384
|
+
try {
|
|
385
|
+
setOverview(await client.getLifeOpsOverview());
|
|
386
|
+
}
|
|
387
|
+
catch (cause) {
|
|
388
|
+
setError(cause instanceof Error && cause.message.trim().length > 0
|
|
389
|
+
? cause.message.trim()
|
|
390
|
+
: t("lifeopsoverviewsection.loadFailed", {
|
|
391
|
+
defaultValue: "Failed to load overview.",
|
|
392
|
+
}));
|
|
393
|
+
}
|
|
394
|
+
finally {
|
|
395
|
+
setLoading(false);
|
|
396
|
+
}
|
|
397
|
+
}, [t]);
|
|
398
|
+
const loadScreenTime = useCallback(async () => {
|
|
399
|
+
setScreenTimeLoading(true);
|
|
400
|
+
setScreenTimeError(null);
|
|
401
|
+
try {
|
|
402
|
+
setScreenTime(await client.getLifeOpsScreenTimeSummary({
|
|
403
|
+
since: startOfLocalDayIso(),
|
|
404
|
+
until: new Date().toISOString(),
|
|
405
|
+
topN: 5,
|
|
406
|
+
}));
|
|
407
|
+
}
|
|
408
|
+
catch (cause) {
|
|
409
|
+
setScreenTimeError(cause instanceof Error && cause.message.trim().length > 0
|
|
410
|
+
? cause.message.trim()
|
|
411
|
+
: "Screen time failed to load.");
|
|
412
|
+
}
|
|
413
|
+
finally {
|
|
414
|
+
setScreenTimeLoading(false);
|
|
415
|
+
}
|
|
416
|
+
}, []);
|
|
417
|
+
const loadSocial = useCallback(async () => {
|
|
418
|
+
setSocialLoading(true);
|
|
419
|
+
setSocialError(null);
|
|
420
|
+
try {
|
|
421
|
+
setSocial(await client.getLifeOpsSocialHabitSummary({
|
|
422
|
+
since: startOfLocalDayIso(),
|
|
423
|
+
until: new Date().toISOString(),
|
|
424
|
+
topN: 5,
|
|
425
|
+
}));
|
|
426
|
+
}
|
|
427
|
+
catch (cause) {
|
|
428
|
+
setSocialError(cause instanceof Error && cause.message.trim().length > 0
|
|
429
|
+
? cause.message.trim()
|
|
430
|
+
: "Social habits failed to load.");
|
|
431
|
+
}
|
|
432
|
+
finally {
|
|
433
|
+
setSocialLoading(false);
|
|
434
|
+
}
|
|
435
|
+
}, []);
|
|
436
|
+
const loadWeeklyScreenTime = useCallback(async () => {
|
|
437
|
+
const now = new Date();
|
|
438
|
+
const since = new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000);
|
|
439
|
+
const breakdown = await client.getLifeOpsScreenTimeBreakdown({
|
|
440
|
+
since: since.toISOString(),
|
|
441
|
+
until: now.toISOString(),
|
|
442
|
+
topN: 1,
|
|
443
|
+
});
|
|
444
|
+
setWeeklyScreenTotalSeconds(Number.isFinite(breakdown.totalSeconds) ? breakdown.totalSeconds : null);
|
|
445
|
+
}, []);
|
|
446
|
+
useEffect(() => {
|
|
447
|
+
void loadOverview();
|
|
448
|
+
void loadScreenTime();
|
|
449
|
+
void loadSocial();
|
|
450
|
+
void loadWeeklyScreenTime();
|
|
451
|
+
}, [loadOverview, loadScreenTime, loadSocial, loadWeeklyScreenTime]);
|
|
452
|
+
const calendar = useCalendarWeek({ viewMode: "week" });
|
|
453
|
+
const messagesInbox = useInbox({
|
|
454
|
+
maxResults: 8,
|
|
455
|
+
channels: LIFEOPS_MESSAGE_CHANNELS,
|
|
456
|
+
});
|
|
457
|
+
const mailInbox = useInbox({
|
|
458
|
+
maxResults: 8,
|
|
459
|
+
channel: "gmail",
|
|
460
|
+
channels: LIFEOPS_MAIL_CHANNELS,
|
|
461
|
+
});
|
|
462
|
+
const upcomingEvents = useMemo(() => {
|
|
463
|
+
const now = Date.now();
|
|
464
|
+
return [...calendar.events]
|
|
465
|
+
.filter((event) => {
|
|
466
|
+
const end = Date.parse(event.endAt);
|
|
467
|
+
return Number.isFinite(end) && end >= now;
|
|
468
|
+
})
|
|
469
|
+
.sort((a, b) => a.startAt.localeCompare(b.startAt))
|
|
470
|
+
.slice(0, 6);
|
|
471
|
+
}, [calendar.events]);
|
|
472
|
+
const summary = overview?.summary;
|
|
473
|
+
const schedule = overview?.schedule ?? null;
|
|
474
|
+
const reminders = overview?.reminders ?? [];
|
|
475
|
+
const activeReminders = reminders.slice(0, 6);
|
|
476
|
+
const priorityMessages = useMemo(() => sortPriorityMessages(messagesInbox.messages), [messagesInbox.messages]);
|
|
477
|
+
const priorityMail = useMemo(() => sortPriorityMessages(mailInbox.messages), [mailInbox.messages]);
|
|
478
|
+
const unreadMessages = [...priorityMessages, ...priorityMail].filter((message) => message.unread);
|
|
479
|
+
const hasUnread = unreadMessages.length > 0;
|
|
480
|
+
const hasOverdue = (summary?.overdueOccurrenceCount ?? 0) > 0;
|
|
481
|
+
const nextEvent = upcomingEvents[0] ?? null;
|
|
482
|
+
const screenTimeLabel = formatDurationSeconds(screenTime?.totalSeconds);
|
|
483
|
+
const socialLabel = formatDurationSeconds(social?.totalSeconds);
|
|
484
|
+
const topSocial = social?.services[0] ?? null;
|
|
485
|
+
const lastSleep = formatDurationMinutes(schedule?.lastSleepDurationMinutes);
|
|
486
|
+
const bedtime = formatClockTime(schedule?.relativeTime.bedtimeTargetAt);
|
|
487
|
+
const sleepAccess = Boolean(schedule) ||
|
|
488
|
+
hasCapabilityAccess(capabilities.status, "sleep.relative_time");
|
|
489
|
+
const browserActivityAccess = hasCapabilityAccess(capabilities.status, "activity.browser");
|
|
490
|
+
const screenTimeAccess = (!screenTimeError && browserActivityAccess) || Boolean(screenTime);
|
|
491
|
+
const socialAccess = (!socialError && browserActivityAccess) || Boolean(social);
|
|
492
|
+
const calendarAccess = hasGoogleCapability(googleConnector.status, [
|
|
493
|
+
"google.calendar.read",
|
|
494
|
+
"google.calendar.write",
|
|
495
|
+
]) || upcomingEvents.length > 0;
|
|
496
|
+
const mailAccess = hasGoogleCapability(googleConnector.status, [
|
|
497
|
+
"google.gmail.triage",
|
|
498
|
+
"google.gmail.send",
|
|
499
|
+
]) || priorityMail.length > 0;
|
|
500
|
+
const messagesAccess = hasXMessageAccess(xConnector.status) || priorityMessages.length > 0;
|
|
501
|
+
const remindersAccess = hasCapabilityAccess(capabilities.status, "reminders.scheduler") ||
|
|
502
|
+
activeReminders.length > 0 ||
|
|
503
|
+
hasOverdue;
|
|
504
|
+
const hasAnySignalWidget = sleepAccess ||
|
|
505
|
+
screenTimeAccess ||
|
|
506
|
+
socialAccess ||
|
|
507
|
+
calendarAccess ||
|
|
508
|
+
messagesAccess ||
|
|
509
|
+
mailAccess;
|
|
510
|
+
const hasAnyOverviewAccess = hasAnySignalWidget || remindersAccess;
|
|
511
|
+
const setupSignalsLoading = capabilities.loading || googleConnector.loading || xConnector.loading;
|
|
512
|
+
const missingWidgets = useMemo(() => [
|
|
513
|
+
!sleepAccess ? "Sleep" : null,
|
|
514
|
+
!screenTimeAccess ? "Screen Time" : null,
|
|
515
|
+
!socialAccess ? "Social" : null,
|
|
516
|
+
!messagesAccess ? "Messages" : null,
|
|
517
|
+
!mailAccess ? "Mail" : null,
|
|
518
|
+
!calendarAccess ? "Calendar" : null,
|
|
519
|
+
].filter((value) => Boolean(value)), [
|
|
520
|
+
calendarAccess,
|
|
521
|
+
mailAccess,
|
|
522
|
+
messagesAccess,
|
|
523
|
+
screenTimeAccess,
|
|
524
|
+
sleepAccess,
|
|
525
|
+
socialAccess,
|
|
526
|
+
]);
|
|
527
|
+
const showSetupWarning = !setupSignalsLoading && missingWidgets.length > 0;
|
|
528
|
+
const showNoAccessState = !setupSignalsLoading &&
|
|
529
|
+
!loading &&
|
|
530
|
+
!screenTimeLoading &&
|
|
531
|
+
!socialLoading &&
|
|
532
|
+
!calendar.loading &&
|
|
533
|
+
!messagesInbox.loading &&
|
|
534
|
+
!mailInbox.loading &&
|
|
535
|
+
!hasAnyOverviewAccess;
|
|
536
|
+
const reminderMetricValue = activeReminders[0]
|
|
537
|
+
? formatRelative(activeReminders[0].scheduledFor)
|
|
538
|
+
: hasOverdue
|
|
539
|
+
? `${summary?.overdueOccurrenceCount ?? 0} overdue`
|
|
540
|
+
: (summary?.activeOccurrenceCount ?? 0) > 0
|
|
541
|
+
? `${summary?.activeOccurrenceCount ?? 0} active`
|
|
542
|
+
: "Clear";
|
|
543
|
+
const reminderMetricTone = hasOverdue
|
|
544
|
+
? "text-rose-300"
|
|
545
|
+
: (summary?.activeOccurrenceCount ?? 0) > 0
|
|
546
|
+
? "text-amber-300"
|
|
547
|
+
: "text-muted";
|
|
548
|
+
const timeline = useMemo(() => {
|
|
549
|
+
return [
|
|
550
|
+
...upcomingEvents.map((event) => ({
|
|
551
|
+
id: `event:${event.id}`,
|
|
552
|
+
kind: "event",
|
|
553
|
+
sortAt: Date.parse(event.startAt),
|
|
554
|
+
event,
|
|
555
|
+
})),
|
|
556
|
+
...activeReminders.map((reminder) => ({
|
|
557
|
+
id: `reminder:${reminder.ownerId}:${reminder.stepIndex}`,
|
|
558
|
+
kind: "reminder",
|
|
559
|
+
sortAt: Date.parse(reminder.scheduledFor),
|
|
560
|
+
reminder,
|
|
561
|
+
})),
|
|
562
|
+
]
|
|
563
|
+
.filter((entry) => Number.isFinite(entry.sortAt))
|
|
564
|
+
.sort((left, right) => left.sortAt - right.sortAt)
|
|
565
|
+
.slice(0, 7);
|
|
566
|
+
}, [activeReminders, upcomingEvents]);
|
|
567
|
+
const activeChannels = useMemo(() => {
|
|
568
|
+
return CHANNEL_ORDER.filter((channel) => priorityMessages.some((message) => message.channel === channel));
|
|
569
|
+
}, [priorityMessages]);
|
|
570
|
+
const briefingLines = useMemo(() => {
|
|
571
|
+
const lines = [];
|
|
572
|
+
if (hasUnread) {
|
|
573
|
+
lines.push("Messages need triage");
|
|
574
|
+
}
|
|
575
|
+
if (schedule?.nextMealLabel && schedule.nextMealWindowStartAt) {
|
|
576
|
+
lines.push(`${humanize(schedule.nextMealLabel)} window starts ${formatClockTime(schedule.nextMealWindowStartAt)}`);
|
|
577
|
+
}
|
|
578
|
+
return lines.slice(0, 5);
|
|
579
|
+
}, [hasUnread, schedule]);
|
|
580
|
+
const circadianLine = useMemo(() => circadianHeadline(schedule), [schedule]);
|
|
581
|
+
const activeSession = useMemo(() => topActiveSession(screenTime), [screenTime]);
|
|
582
|
+
const activeSessionLine = useMemo(() => {
|
|
583
|
+
if (!activeSession)
|
|
584
|
+
return null;
|
|
585
|
+
const duration = formatDurationSeconds(activeSession.totalSeconds);
|
|
586
|
+
if (!duration)
|
|
587
|
+
return null;
|
|
588
|
+
return `Current focus: ${activeSession.displayName} (${duration})`;
|
|
589
|
+
}, [activeSession]);
|
|
590
|
+
const hasNowPanelContent = Boolean(circadianLine) ||
|
|
591
|
+
Boolean(activeSessionLine) ||
|
|
592
|
+
briefingLines.length > 0;
|
|
593
|
+
const weeklyDelta = useMemo(() => computeWeeklyDelta({
|
|
594
|
+
todayTotalSeconds: screenTime?.totalSeconds ?? null,
|
|
595
|
+
weeklyTotalSeconds: weeklyScreenTotalSeconds,
|
|
596
|
+
}), [screenTime?.totalSeconds, weeklyScreenTotalSeconds]);
|
|
597
|
+
const refresh = useCallback(() => {
|
|
598
|
+
void loadOverview();
|
|
599
|
+
void loadScreenTime();
|
|
600
|
+
void loadSocial();
|
|
601
|
+
void loadWeeklyScreenTime();
|
|
602
|
+
void capabilities.refresh();
|
|
603
|
+
void googleConnector.refresh({ silent: true });
|
|
604
|
+
void xConnector.refresh();
|
|
605
|
+
void calendar.refresh();
|
|
606
|
+
void messagesInbox.refresh();
|
|
607
|
+
void mailInbox.refresh();
|
|
608
|
+
}, [
|
|
609
|
+
calendar.refresh,
|
|
610
|
+
capabilities,
|
|
611
|
+
googleConnector,
|
|
612
|
+
loadSocial,
|
|
613
|
+
loadOverview,
|
|
614
|
+
loadScreenTime,
|
|
615
|
+
loadWeeklyScreenTime,
|
|
616
|
+
mailInbox.refresh,
|
|
617
|
+
messagesInbox.refresh,
|
|
618
|
+
xConnector,
|
|
619
|
+
]);
|
|
620
|
+
const openEvent = useCallback((event) => {
|
|
621
|
+
select({ eventId: event.id });
|
|
622
|
+
onNavigate("calendar");
|
|
623
|
+
}, [onNavigate, select]);
|
|
624
|
+
const openReminder = useCallback((reminder) => {
|
|
625
|
+
select({
|
|
626
|
+
reminderId: reminder.ownerId,
|
|
627
|
+
eventId: reminder.eventId ?? null,
|
|
628
|
+
});
|
|
629
|
+
onNavigate("reminders");
|
|
630
|
+
}, [onNavigate, select]);
|
|
631
|
+
return (_jsxs("div", { className: "space-y-4", "data-testid": "lifeops-overview", children: [_jsxs("header", { className: "border-b border-border/20 pb-4", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("div", { className: "text-xs font-medium text-muted", children: formatFullDate(today) }), _jsx("h1", { className: "mt-2 max-w-4xl text-2xl font-semibold leading-tight text-txt sm:text-3xl", children: buildHeadline({
|
|
632
|
+
schedule,
|
|
633
|
+
nextEvent,
|
|
634
|
+
hasOverdue,
|
|
635
|
+
hasUnread,
|
|
636
|
+
hasAnyOverviewAccess,
|
|
637
|
+
}) })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [_jsx(BrowserBridgeStatusChip, { onNavigate: onNavigate }), _jsx("button", { type: "button", "aria-label": "Refresh LifeOps dashboard", title: "Refresh", className: "inline-flex h-9 w-9 items-center justify-center rounded-lg border border-border/20 bg-bg/30 text-muted transition-colors hover:border-accent/30 hover:text-txt disabled:opacity-40", onClick: refresh, disabled: loading ||
|
|
638
|
+
screenTimeLoading ||
|
|
639
|
+
calendar.loading ||
|
|
640
|
+
messagesInbox.loading ||
|
|
641
|
+
mailInbox.loading, children: _jsx(RefreshCw, { className: `h-3.5 w-3.5 ${loading || screenTimeLoading ? "animate-spin" : ""}`, "aria-hidden": true }) })] })] }), _jsxs("div", { className: "mt-4 grid grid-cols-3 overflow-hidden rounded-lg border border-border/16 bg-card/10", children: [_jsx(MetricCell, { label: "Sleep", value: sleepStatusLabel(schedule), tone: schedule?.sleepStatus === "sleeping_now"
|
|
642
|
+
? "text-blue-300"
|
|
643
|
+
: "text-txt" }), _jsx(MetricCell, { label: "Reminders", value: reminderMetricValue, tone: reminderMetricTone }), _jsx(MetricCell, { label: "Screen", value: screenTimeLabel || "No data", tone: screenTimeLabel ? "text-amber-300" : "text-muted" })] })] }), error ? (_jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-rose-500/30 bg-rose-500/10 px-3 py-2 text-xs font-medium text-rose-300", title: error, children: [_jsx(TriangleAlert, { className: "h-3.5 w-3.5 shrink-0", "aria-hidden": true }), "Activity unavailable"] })) : null, showSetupWarning ? (_jsxs("div", { className: "flex flex-wrap items-start justify-between gap-3 rounded-lg border border-amber-500/25 bg-amber-500/10 px-4 py-3", "data-testid": "lifeops-overview-setup-warning", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [_jsx("span", { className: "mt-0.5 shrink-0 text-amber-300", children: _jsx(TriangleAlert, { className: "h-4 w-4", "aria-hidden": true }) }), _jsx("div", { className: "min-w-0", children: _jsx("div", { className: "truncate text-sm font-medium text-txt", children: hasAnyOverviewAccess ? "Partial" : "Connect" }) })] }), _jsxs("span", { className: "inline-flex h-7 min-w-7 items-center justify-center rounded-full border border-amber-300/25 bg-amber-300/10 px-2 text-[11px] font-semibold text-amber-200", title: formatLabelList(missingWidgets), children: ["+", missingWidgets.length] }), _jsx("button", { type: "button", "aria-label": "Open LifeOps settings", title: "Settings", className: "inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-border/16 bg-bg/50 text-txt transition-colors hover:border-accent/30 hover:text-accent", onClick: () => onNavigate("setup"), children: _jsx(ArrowRight, { className: "h-3.5 w-3.5", "aria-hidden": true }) })] })) : null, loading && !overview ? (_jsxs("div", { className: "flex items-center gap-2 py-4 text-xs text-muted", children: [_jsx(Loader2, { className: "h-4 w-4 animate-spin", "aria-hidden": true }), "Loading dashboard..."] })) : null, showNoAccessState ? (_jsxs("div", { className: "rounded-lg border border-border/16 bg-card/12 px-5 py-8 text-center", "data-testid": "lifeops-overview-empty-access", children: [_jsx("div", { className: "mx-auto flex h-10 w-10 items-center justify-center rounded-full bg-amber-500/12 text-amber-300", children: _jsx(TriangleAlert, { className: "h-5 w-5", "aria-hidden": true }) }), _jsx("h2", { className: "mt-4 text-base font-semibold text-txt", children: "Connect a source" }), _jsxs("button", { type: "button", className: "mt-4 inline-flex h-9 items-center gap-1 rounded-md border border-border/16 bg-bg/50 px-3 text-sm font-medium text-txt transition-colors hover:border-accent/30 hover:text-accent", onClick: () => onNavigate("setup"), children: ["Open Settings", _jsx(ArrowRight, { className: "h-4 w-4", "aria-hidden": true })] })] })) : null, !showNoAccessState ? (_jsxs("div", { className: "grid items-start gap-4 xl:grid-cols-12", children: [hasNowPanelContent ? (_jsx(DashboardPanel, { title: "Now", icon: _jsx(Flame, { className: "h-4 w-4", "aria-hidden": true }), className: "xl:col-span-3", children: _jsxs("div", { className: "space-y-3", children: [circadianLine ? (_jsx(TinyStatus, { color: "bg-indigo-300", label: circadianLine })) : null, activeSessionLine ? (_jsx(TinyStatus, { color: "bg-amber-300", label: activeSessionLine })) : null, briefingLines.map((line) => (_jsx(TinyStatus, { color: "bg-accent", label: line }, line)))] }) })) : null, sleepAccess ? (_jsx(DashboardPanel, { title: "Sleep", icon: schedule?.sleepStatus === "sleeping_now" ? (_jsx(Moon, { className: "h-4 w-4", "aria-hidden": true })) : (_jsx(Sun, { className: "h-4 w-4", "aria-hidden": true })), action: _jsx(IconAction, { label: "Sleep", icon: _jsx(Moon, { className: "h-3.5 w-3.5", "aria-hidden": true }), onClick: () => onNavigate("sleep") }), className: "xl:col-span-3", children: _jsxs("div", { className: "space-y-3", children: [_jsx("div", { children: _jsx("div", { className: "text-2xl font-semibold leading-none text-txt", children: sleepStatusLabel(schedule) }) }), _jsxs("div", { className: "grid grid-cols-2 gap-3 border-t border-border/12 pt-3", children: [_jsx(TinyStatus, { color: "bg-blue-400", label: lastSleep ? `Last sleep ${lastSleep}` : "No sleep" }), _jsx(TinyStatus, { color: "bg-indigo-400", label: bedtime ? `Bed ${bedtime}` : "No target" })] })] }) })) : (_jsx(MissingSourceCard, { title: "Sleep", ctaLabel: "Connect Health", onCta: () => onNavigate("setup"), className: "xl:col-span-3" })), screenTimeAccess ? (_jsxs(DashboardPanel, { title: "Screen Time", icon: _jsx(Monitor, { className: "h-4 w-4", "aria-hidden": true }), action: _jsx(IconAction, { label: "Screen Time", icon: _jsx(Monitor, { className: "h-3.5 w-3.5", "aria-hidden": true }), onClick: () => onNavigate("screen-time") }), className: "xl:col-span-3", children: [_jsx("div", { className: "mb-3 flex items-end justify-between gap-3", children: _jsxs("div", { children: [_jsx("div", { className: "text-2xl font-semibold leading-none text-txt", children: screenTimeLabel || "No data" }), weeklyDelta ? (_jsx("div", { className: "mt-1 text-[11px] font-medium tabular-nums text-muted", "data-testid": "lifeops-overview-screen-weekly-delta", children: weeklyDelta.label })) : null] }) }), _jsx(ScreenTimeList, { screenTime: screenTime, loading: screenTimeLoading, error: screenTimeError })] })) : (_jsx(MissingSourceCard, { title: "Screen Time", ctaLabel: "Set up tracking", onCta: () => onNavigate("setup"), className: "xl:col-span-3" })), socialAccess ? (_jsxs(DashboardPanel, { title: "Social", icon: _jsx(Share2, { className: "h-4 w-4", "aria-hidden": true }), action: _jsx(IconAction, { label: "Social", icon: _jsx(Share2, { className: "h-3.5 w-3.5", "aria-hidden": true }), onClick: () => onNavigate("screen-time") }), className: "xl:col-span-3", children: [_jsx("div", { className: "mb-3 text-2xl font-semibold leading-none text-txt", children: socialLabel || "No data" }), socialLoading && !social ? (_jsxs("div", { className: "flex items-center gap-2 py-5 text-xs text-muted", children: [_jsx(Loader2, { className: "h-4 w-4 animate-spin", "aria-hidden": true }), "Reading social..."] })) : socialError ? (_jsx("div", { className: "py-4 text-xs text-rose-300", children: socialError })) : (_jsxs("div", { className: "space-y-3", children: [_jsx(TinyStatus, { color: "bg-cyan-300", label: topSocial
|
|
644
|
+
? `${topSocial.label} ${formatDurationSeconds(topSocial.totalSeconds)}`
|
|
645
|
+
: "No social time" }), _jsx(TinyStatus, { color: "bg-emerald-300", label: `${social?.messages.opened ?? 0} opened / ${social?.messages.outbound ?? 0} sent` }), (social?.dataSources ?? []).length > 0 ? (_jsx(DataSourcesStrip, { sources: social?.dataSources ?? [], onSetup: () => onNavigate("setup") })) : null] }))] })) : (_jsx(MissingSourceCard, { title: "Social", ctaLabel: "Set up bridge", onCta: () => onNavigate("setup"), className: "xl:col-span-3" })), calendarAccess ? (_jsx(DashboardPanel, { title: "Upcoming", icon: _jsx(CalendarDays, { className: "h-4 w-4", "aria-hidden": true }), action: _jsx(IconAction, { label: "Calendar", icon: _jsx(CalendarDays, { className: "h-3.5 w-3.5", "aria-hidden": true }), onClick: () => onNavigate("calendar") }), className: "xl:col-span-4", children: calendar.loading && timeline.length === 0 ? (_jsxs("div", { className: "flex items-center gap-2 py-5 text-xs text-muted", children: [_jsx(Loader2, { className: "h-4 w-4 animate-spin", "aria-hidden": true }), "Reading calendar..."] })) : timeline.length === 0 ? (_jsx(EmptyState, { children: "Nothing scheduled." })) : (_jsx("div", { className: "divide-y divide-border/10", children: timeline.map((entry) => (_jsx(TimelineRow, { entry: entry, onOpenEvent: openEvent, onOpenReminder: openReminder }, entry.id))) })) })) : (_jsx(MissingSourceCard, { title: "Calendar", ctaLabel: "Connect Google", onCta: () => onNavigate("setup"), className: "xl:col-span-4" })), messagesAccess ? (_jsxs(DashboardPanel, { title: "Priority Messages", icon: _jsx(MessageSquare, { className: "h-4 w-4", "aria-hidden": true }), action: _jsx(IconAction, { label: "Messages", icon: _jsx(MessageSquare, { className: "h-3.5 w-3.5", "aria-hidden": true }), onClick: () => onNavigate("messages") }), className: "xl:col-span-4", children: [_jsx("div", { className: "mb-3 flex flex-wrap gap-2", children: activeChannels.length === 0 ? (_jsx("span", { className: "text-xs text-muted", children: "No live messages." })) : (activeChannels.slice(0, 5).map((channel) => {
|
|
646
|
+
const style = CHANNEL_STYLES[channel];
|
|
647
|
+
return (_jsx("span", { role: "img", "aria-label": style.label, title: style.label, className: `inline-flex h-7 w-7 items-center justify-center rounded-full ${style.bg} ${style.text}`, children: style.icon }, channel));
|
|
648
|
+
})) }), messagesInbox.loading && priorityMessages.length === 0 ? (_jsxs("div", { className: "flex items-center gap-2 py-5 text-xs text-muted", children: [_jsx(Loader2, { className: "h-4 w-4 animate-spin", "aria-hidden": true }), "Reading messages..."] })) : priorityMessages.length === 0 ? (_jsx(EmptyState, { children: "No priority messages." })) : (_jsx("div", { className: "divide-y divide-border/10", children: priorityMessages.slice(0, 5).map((message) => (_jsx(InboxMessageRow, { message: message, onClick: () => {
|
|
649
|
+
select({ messageId: message.id });
|
|
650
|
+
onNavigate("messages");
|
|
651
|
+
} }, message.id))) }))] })) : (_jsx(MissingSourceCard, { title: "Messages", ctaLabel: "Connect platform", onCta: () => onNavigate("setup"), className: "xl:col-span-4" })), mailAccess ? (_jsx(DashboardPanel, { title: "Priority Mail", icon: _jsx(Mail, { className: "h-4 w-4", "aria-hidden": true }), action: _jsx(IconAction, { label: "Mail", icon: _jsx(Mail, { className: "h-3.5 w-3.5", "aria-hidden": true }), onClick: () => onNavigate("mail") }), className: "xl:col-span-4", children: mailInbox.loading && priorityMail.length === 0 ? (_jsxs("div", { className: "flex items-center gap-2 py-5 text-xs text-muted", children: [_jsx(Loader2, { className: "h-4 w-4 animate-spin", "aria-hidden": true }), "Reading mail..."] })) : priorityMail.length === 0 ? (_jsx(EmptyState, { children: "No priority mail." })) : (_jsx("div", { className: "divide-y divide-border/10", children: priorityMail.slice(0, 5).map((message) => (_jsx(InboxMessageRow, { message: message, onClick: () => {
|
|
652
|
+
select({ messageId: message.id });
|
|
653
|
+
onNavigate("mail");
|
|
654
|
+
} }, message.id))) })) })) : (_jsx(MissingSourceCard, { title: "Mail", ctaLabel: "Connect Google", onCta: () => onNavigate("setup"), className: "xl:col-span-4" })), remindersAccess ? (_jsx(DashboardPanel, { title: "Reminders", icon: _jsx(Target, { className: "h-4 w-4", "aria-hidden": true }), action: _jsx(IconAction, { label: "Reminders", icon: _jsx(Target, { className: "h-3.5 w-3.5", "aria-hidden": true }), onClick: () => onNavigate("reminders") }), className: "xl:col-span-4", children: _jsx("div", { className: "divide-y divide-border/10", children: activeReminders.length === 0 ? (_jsx(EmptyState, { children: "No active reminders." })) : (activeReminders
|
|
655
|
+
.slice(0, 4)
|
|
656
|
+
.map((reminder) => (_jsx(ReminderAgendaRow, { reminder: reminder, onClick: () => openReminder(reminder) }, `${reminder.ownerId}:${reminder.stepIndex}`)))) }) })) : null] })) : null] }));
|
|
657
|
+
}
|