@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,515 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* LifeOpsCalendarSection — Google Calendar-style week/day/month views.
|
|
4
|
+
*
|
|
5
|
+
* Day/week views render an hour-by-hour grid and position events by their
|
|
6
|
+
* actual start/end time. Month view renders a 5-6 row day grid. Events get
|
|
7
|
+
* deterministic category colours derived from their calendar/account id so
|
|
8
|
+
* the same feed keeps the same colour across renders.
|
|
9
|
+
*/
|
|
10
|
+
import { Button, Popover, PopoverContent, PopoverTrigger, SegmentedControl, Spinner, useApp, useMediaQuery, } from "@elizaos/app-core";
|
|
11
|
+
import { ChevronLeft, ChevronRight, Plus } from "lucide-react";
|
|
12
|
+
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
13
|
+
import { useCalendarWeek, } from "../hooks/useCalendarWeek.js";
|
|
14
|
+
import { getPrimedLifeOpsEvent } from "../lifeops-route.js";
|
|
15
|
+
import { EventEditorDrawer } from "./EventEditorDrawer.js";
|
|
16
|
+
import { useLifeOpsChatLauncher } from "./LifeOpsChatAdapter.js";
|
|
17
|
+
import { useLifeOpsSelection, } from "./LifeOpsSelectionContext.js";
|
|
18
|
+
const TIME_ZONE = Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC";
|
|
19
|
+
const DAY_START_HOUR = 6;
|
|
20
|
+
const DAY_END_HOUR = 23;
|
|
21
|
+
const HOUR_HEIGHT_PX = 48;
|
|
22
|
+
function formatTimeOfDay(iso) {
|
|
23
|
+
const parsed = Date.parse(iso);
|
|
24
|
+
if (!Number.isFinite(parsed))
|
|
25
|
+
return "";
|
|
26
|
+
return new Intl.DateTimeFormat(undefined, {
|
|
27
|
+
hour: "numeric",
|
|
28
|
+
minute: "2-digit",
|
|
29
|
+
timeZone: TIME_ZONE,
|
|
30
|
+
}).format(new Date(parsed));
|
|
31
|
+
}
|
|
32
|
+
function formatWeekdayShort(date) {
|
|
33
|
+
return new Intl.DateTimeFormat(undefined, {
|
|
34
|
+
weekday: "short",
|
|
35
|
+
timeZone: TIME_ZONE,
|
|
36
|
+
}).format(date);
|
|
37
|
+
}
|
|
38
|
+
function formatDayNumber(date) {
|
|
39
|
+
return new Intl.DateTimeFormat(undefined, {
|
|
40
|
+
day: "numeric",
|
|
41
|
+
timeZone: TIME_ZONE,
|
|
42
|
+
}).format(date);
|
|
43
|
+
}
|
|
44
|
+
function formatMonthHeader(start, end) {
|
|
45
|
+
const startMonth = new Intl.DateTimeFormat(undefined, {
|
|
46
|
+
month: "long",
|
|
47
|
+
year: "numeric",
|
|
48
|
+
timeZone: TIME_ZONE,
|
|
49
|
+
}).format(start);
|
|
50
|
+
const endMonth = new Intl.DateTimeFormat(undefined, {
|
|
51
|
+
month: "long",
|
|
52
|
+
year: "numeric",
|
|
53
|
+
timeZone: TIME_ZONE,
|
|
54
|
+
}).format(end);
|
|
55
|
+
return startMonth === endMonth ? startMonth : `${startMonth} – ${endMonth}`;
|
|
56
|
+
}
|
|
57
|
+
function formatAgendaDayLabel(date) {
|
|
58
|
+
return new Intl.DateTimeFormat(undefined, {
|
|
59
|
+
weekday: "short",
|
|
60
|
+
month: "short",
|
|
61
|
+
day: "numeric",
|
|
62
|
+
timeZone: TIME_ZONE,
|
|
63
|
+
}).format(date);
|
|
64
|
+
}
|
|
65
|
+
function toLocalDayKey(date) {
|
|
66
|
+
const fmt = new Intl.DateTimeFormat("en-CA", {
|
|
67
|
+
timeZone: TIME_ZONE,
|
|
68
|
+
year: "numeric",
|
|
69
|
+
month: "2-digit",
|
|
70
|
+
day: "2-digit",
|
|
71
|
+
});
|
|
72
|
+
const parts = fmt.formatToParts(date);
|
|
73
|
+
const y = parts.find((p) => p.type === "year")?.value ?? "0000";
|
|
74
|
+
const m = parts.find((p) => p.type === "month")?.value ?? "00";
|
|
75
|
+
const d = parts.find((p) => p.type === "day")?.value ?? "00";
|
|
76
|
+
return `${y}-${m}-${d}`;
|
|
77
|
+
}
|
|
78
|
+
function buildDays(start, count) {
|
|
79
|
+
const days = [];
|
|
80
|
+
for (let i = 0; i < count; i++) {
|
|
81
|
+
const d = new Date(start);
|
|
82
|
+
d.setDate(d.getDate() + i);
|
|
83
|
+
days.push(d);
|
|
84
|
+
}
|
|
85
|
+
return days;
|
|
86
|
+
}
|
|
87
|
+
function groupEventsByDay(events) {
|
|
88
|
+
const map = new Map();
|
|
89
|
+
for (const event of events) {
|
|
90
|
+
const key = toLocalDayKey(new Date(event.startAt));
|
|
91
|
+
const existing = map.get(key);
|
|
92
|
+
if (existing)
|
|
93
|
+
existing.push(event);
|
|
94
|
+
else
|
|
95
|
+
map.set(key, [event]);
|
|
96
|
+
}
|
|
97
|
+
return map;
|
|
98
|
+
}
|
|
99
|
+
// Google-Calendar-inspired palette. Each entry is a self-contained class
|
|
100
|
+
// pair so we can render filled blocks or tinted pills from the same source.
|
|
101
|
+
const EVENT_PALETTE = [
|
|
102
|
+
{
|
|
103
|
+
bg: "bg-blue-500/85",
|
|
104
|
+
softBg: "bg-blue-500/18",
|
|
105
|
+
border: "border-blue-500/60",
|
|
106
|
+
text: "text-blue-50",
|
|
107
|
+
softText: "text-blue-200",
|
|
108
|
+
dot: "bg-blue-400",
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
bg: "bg-violet-500/85",
|
|
112
|
+
softBg: "bg-violet-500/18",
|
|
113
|
+
border: "border-violet-500/60",
|
|
114
|
+
text: "text-violet-50",
|
|
115
|
+
softText: "text-violet-200",
|
|
116
|
+
dot: "bg-violet-400",
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
bg: "bg-emerald-500/85",
|
|
120
|
+
softBg: "bg-emerald-500/18",
|
|
121
|
+
border: "border-emerald-500/60",
|
|
122
|
+
text: "text-emerald-50",
|
|
123
|
+
softText: "text-emerald-200",
|
|
124
|
+
dot: "bg-emerald-400",
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
bg: "bg-amber-500/85",
|
|
128
|
+
softBg: "bg-amber-500/18",
|
|
129
|
+
border: "border-amber-500/60",
|
|
130
|
+
text: "text-amber-50",
|
|
131
|
+
softText: "text-amber-200",
|
|
132
|
+
dot: "bg-amber-400",
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
bg: "bg-rose-500/85",
|
|
136
|
+
softBg: "bg-rose-500/18",
|
|
137
|
+
border: "border-rose-500/60",
|
|
138
|
+
text: "text-rose-50",
|
|
139
|
+
softText: "text-rose-200",
|
|
140
|
+
dot: "bg-rose-400",
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
bg: "bg-cyan-500/85",
|
|
144
|
+
softBg: "bg-cyan-500/18",
|
|
145
|
+
border: "border-cyan-500/60",
|
|
146
|
+
text: "text-cyan-50",
|
|
147
|
+
softText: "text-cyan-200",
|
|
148
|
+
dot: "bg-cyan-400",
|
|
149
|
+
},
|
|
150
|
+
];
|
|
151
|
+
function hashString(input) {
|
|
152
|
+
let hash = 0;
|
|
153
|
+
for (let i = 0; i < input.length; i++) {
|
|
154
|
+
hash = (hash * 31 + input.charCodeAt(i)) | 0;
|
|
155
|
+
}
|
|
156
|
+
return Math.abs(hash);
|
|
157
|
+
}
|
|
158
|
+
function paletteFor(event) {
|
|
159
|
+
// Prefer calendar-level seeds so gcal-style "one colour per calendar"
|
|
160
|
+
// holds when those are distinct. Fall back to event.id for variety when
|
|
161
|
+
// every event shares the same calendar.
|
|
162
|
+
const seed = [event.calendarId, event.accountEmail, event.id]
|
|
163
|
+
.filter(Boolean)
|
|
164
|
+
.join("|");
|
|
165
|
+
return EVENT_PALETTE[hashString(seed) % EVENT_PALETTE.length];
|
|
166
|
+
}
|
|
167
|
+
function sortAgendaEvents(events) {
|
|
168
|
+
return [...events].sort((left, right) => {
|
|
169
|
+
if (left.isAllDay !== right.isAllDay) {
|
|
170
|
+
return left.isAllDay ? -1 : 1;
|
|
171
|
+
}
|
|
172
|
+
return left.startAt.localeCompare(right.startAt);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
function formatAgendaEventMeta(event) {
|
|
176
|
+
const timeLabel = event.isAllDay
|
|
177
|
+
? "All day"
|
|
178
|
+
: [formatTimeOfDay(event.startAt), formatTimeOfDay(event.endAt)]
|
|
179
|
+
.filter(Boolean)
|
|
180
|
+
.join(" - ");
|
|
181
|
+
const originLabel = typeof event.calendarSummary === "string" && event.calendarSummary.trim()
|
|
182
|
+
? event.calendarSummary.trim()
|
|
183
|
+
: null;
|
|
184
|
+
const details = [timeLabel, event.location || null, originLabel].filter((value) => Boolean(value));
|
|
185
|
+
return details.join(" · ");
|
|
186
|
+
}
|
|
187
|
+
function eventWindowMs(event) {
|
|
188
|
+
const start = new Date(event.startAt);
|
|
189
|
+
const end = new Date(event.endAt);
|
|
190
|
+
if (!Number.isFinite(start.getTime()) || !Number.isFinite(end.getTime())) {
|
|
191
|
+
return null;
|
|
192
|
+
}
|
|
193
|
+
const dayStart = new Date(start);
|
|
194
|
+
dayStart.setHours(DAY_START_HOUR, 0, 0, 0);
|
|
195
|
+
const dayEnd = new Date(start);
|
|
196
|
+
dayEnd.setHours(DAY_END_HOUR, 0, 0, 0);
|
|
197
|
+
const clampedStart = Math.max(start.getTime(), dayStart.getTime());
|
|
198
|
+
const clampedEnd = Math.min(end.getTime(), dayEnd.getTime());
|
|
199
|
+
if (clampedEnd <= clampedStart)
|
|
200
|
+
return null;
|
|
201
|
+
return {
|
|
202
|
+
start: clampedStart,
|
|
203
|
+
end: clampedEnd,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Pack concurrent events into lanes, Google-Calendar style.
|
|
208
|
+
* Two events collide iff their time ranges overlap. Each event is given
|
|
209
|
+
* the lowest lane index not used by any event it collides with; the column
|
|
210
|
+
* width is then divided by the max concurrent lane count within each
|
|
211
|
+
* cluster of connected events.
|
|
212
|
+
*/
|
|
213
|
+
function layoutDayEvents(events) {
|
|
214
|
+
const windows = events
|
|
215
|
+
.map((event) => {
|
|
216
|
+
const window = eventWindowMs(event);
|
|
217
|
+
return window ? { event, ...window } : null;
|
|
218
|
+
})
|
|
219
|
+
.filter((entry) => entry !== null)
|
|
220
|
+
.sort((a, b) => a.start - b.start);
|
|
221
|
+
if (windows.length === 0)
|
|
222
|
+
return [];
|
|
223
|
+
const dayStart = new Date(windows[0].event.startAt);
|
|
224
|
+
dayStart.setHours(DAY_START_HOUR, 0, 0, 0);
|
|
225
|
+
const dayEnd = new Date(windows[0].event.startAt);
|
|
226
|
+
dayEnd.setHours(DAY_END_HOUR, 0, 0, 0);
|
|
227
|
+
const totalMs = dayEnd.getTime() - dayStart.getTime();
|
|
228
|
+
// First pass: assign lanes greedily.
|
|
229
|
+
const lanes = []; // lane index -> end time (ms)
|
|
230
|
+
const assignments = [];
|
|
231
|
+
for (const entry of windows) {
|
|
232
|
+
let lane = lanes.findIndex((laneEnd) => laneEnd <= entry.start);
|
|
233
|
+
if (lane === -1) {
|
|
234
|
+
lane = lanes.length;
|
|
235
|
+
lanes.push(entry.end);
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
lanes[lane] = entry.end;
|
|
239
|
+
}
|
|
240
|
+
assignments.push({
|
|
241
|
+
event: entry.event,
|
|
242
|
+
start: entry.start,
|
|
243
|
+
end: entry.end,
|
|
244
|
+
lane,
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
// Second pass: for each assignment, compute the local concurrency (max
|
|
248
|
+
// lane count of any event that overlaps it, transitively). This is the
|
|
249
|
+
// column-width divisor for that event.
|
|
250
|
+
const totalLanes = new Map();
|
|
251
|
+
for (const assignment of assignments) {
|
|
252
|
+
const concurrent = assignments.filter((other) => other.start < assignment.end && other.end > assignment.start);
|
|
253
|
+
const maxLane = concurrent.reduce((max, entry) => Math.max(max, entry.lane + 1), 1);
|
|
254
|
+
totalLanes.set(assignment.event, maxLane);
|
|
255
|
+
}
|
|
256
|
+
return assignments.map((assignment) => {
|
|
257
|
+
const cols = totalLanes.get(assignment.event) ?? 1;
|
|
258
|
+
const topPct = ((assignment.start - dayStart.getTime()) / totalMs) * 100;
|
|
259
|
+
const heightPct = Math.max(((assignment.end - assignment.start) / totalMs) * 100, 2.5);
|
|
260
|
+
const widthPct = 100 / cols;
|
|
261
|
+
return {
|
|
262
|
+
event: assignment.event,
|
|
263
|
+
position: {
|
|
264
|
+
topPct,
|
|
265
|
+
heightPct,
|
|
266
|
+
leftPct: assignment.lane * widthPct,
|
|
267
|
+
widthPct,
|
|
268
|
+
},
|
|
269
|
+
};
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
function isSameDayKey(a, b) {
|
|
273
|
+
return toLocalDayKey(a) === toLocalDayKey(b);
|
|
274
|
+
}
|
|
275
|
+
// ---------------------------------------------------------------------------
|
|
276
|
+
// Hour-grid day/week view
|
|
277
|
+
// ---------------------------------------------------------------------------
|
|
278
|
+
const RAIL_WIDTH_REM = 3.25;
|
|
279
|
+
const HEADER_ROW_HEIGHT_REM = 2.25;
|
|
280
|
+
function DayColumnHeader({ day, isFirst }) {
|
|
281
|
+
const isToday = isSameDayKey(day, new Date());
|
|
282
|
+
return (_jsxs("div", { className: `flex items-center justify-center gap-1.5 ${isFirst ? "" : "border-l border-border/12"} px-2 text-[11px] font-medium ${isToday ? "bg-accent/8" : ""}`, style: { height: `${HEADER_ROW_HEIGHT_REM}rem` }, children: [_jsx("span", { className: `uppercase tracking-wide ${isToday ? "text-accent" : "text-muted"}`, children: formatWeekdayShort(day) }), _jsx("span", { className: `flex h-5 min-w-5 items-center justify-center rounded-full px-1 tabular-nums ${isToday ? "bg-accent text-accent-fg" : "text-txt"}`, children: formatDayNumber(day) })] }));
|
|
283
|
+
}
|
|
284
|
+
function AllDayBandCell({ day, events, isFirst, selectedEventId, onSelectEvent, }) {
|
|
285
|
+
return (_jsx("fieldset", { className: `m-0 min-w-0 space-y-0.5 border-0 px-1 py-1 ${isFirst ? "" : "border-l border-border/12"}`, "aria-label": `All-day events for ${day.toISOString()}`, children: events.map((event) => {
|
|
286
|
+
const color = paletteFor(event);
|
|
287
|
+
return (_jsx("button", { type: "button", onClick: () => onSelectEvent(event), onContextMenu: (mouseEvent) => {
|
|
288
|
+
mouseEvent.preventDefault();
|
|
289
|
+
onSelectEvent(event);
|
|
290
|
+
}, className: `block w-full truncate rounded-md ${color.softBg} ${color.softText} px-1.5 py-0.5 text-left text-[10px] font-medium hover:${color.bg} hover:${color.text}`, "aria-pressed": event.id === selectedEventId, children: event.title }, event.id));
|
|
291
|
+
}) }));
|
|
292
|
+
}
|
|
293
|
+
function DayColumnGrid({ day, events, nowInColumn, selectedEventId, onSelectEvent, isFirst, gridHeight, }) {
|
|
294
|
+
const totalHours = DAY_END_HOUR - DAY_START_HOUR;
|
|
295
|
+
const isToday = isSameDayKey(day, new Date());
|
|
296
|
+
const positioned = useMemo(() => layoutDayEvents(events), [events]);
|
|
297
|
+
const nowTopPx = useMemo(() => {
|
|
298
|
+
if (!nowInColumn)
|
|
299
|
+
return null;
|
|
300
|
+
const now = new Date();
|
|
301
|
+
const startOfWindow = new Date(now);
|
|
302
|
+
startOfWindow.setHours(DAY_START_HOUR, 0, 0, 0);
|
|
303
|
+
const endOfWindow = new Date(now);
|
|
304
|
+
endOfWindow.setHours(DAY_END_HOUR, 0, 0, 0);
|
|
305
|
+
if (now.getTime() < startOfWindow.getTime() ||
|
|
306
|
+
now.getTime() > endOfWindow.getTime()) {
|
|
307
|
+
return null;
|
|
308
|
+
}
|
|
309
|
+
const ratio = (now.getTime() - startOfWindow.getTime()) /
|
|
310
|
+
(endOfWindow.getTime() - startOfWindow.getTime());
|
|
311
|
+
return ratio * gridHeight;
|
|
312
|
+
}, [gridHeight, nowInColumn]);
|
|
313
|
+
return (_jsxs("div", { className: `relative ${isFirst ? "" : "border-l border-border/12"} ${isToday ? "bg-accent/5" : ""}`, style: { height: `${gridHeight}px` }, children: [Array.from({ length: totalHours }, (_, i) => DAY_START_HOUR + i).map((hour) => (_jsx("div", { className: "pointer-events-none absolute inset-x-0 border-t border-border/6", style: { top: `${(hour - DAY_START_HOUR) * HOUR_HEIGHT_PX}px` } }, hour))), nowTopPx !== null ? (_jsx("div", { className: "pointer-events-none absolute inset-x-0 z-20", style: { top: `${nowTopPx}px` }, "aria-hidden": true, children: _jsxs("div", { className: "flex items-center", children: [_jsx("span", { className: "h-2 w-2 rounded-full bg-rose-500 ring-2 ring-rose-500/30" }), _jsx("span", { className: "h-px flex-1 bg-rose-500/80" })] }) })) : null, positioned.map(({ event, position }) => {
|
|
314
|
+
const color = paletteFor(event);
|
|
315
|
+
const isSelected = event.id === selectedEventId;
|
|
316
|
+
return (_jsxs("button", { type: "button", onClick: () => onSelectEvent(event), onContextMenu: (mouseEvent) => {
|
|
317
|
+
mouseEvent.preventDefault();
|
|
318
|
+
onSelectEvent(event);
|
|
319
|
+
}, "aria-pressed": isSelected, className: `group absolute overflow-hidden rounded-md border px-1.5 py-1 text-left shadow-sm transition-transform ${color.bg} ${color.border} ${color.text} ${isSelected ? "ring-2 ring-white/50 z-10" : "hover:translate-y-[-1px]"}`, style: {
|
|
320
|
+
top: `calc(${position.topPct}% + 0.1rem)`,
|
|
321
|
+
height: `calc(${position.heightPct}% - 0.2rem)`,
|
|
322
|
+
left: `calc(${position.leftPct}% + 0.125rem)`,
|
|
323
|
+
width: `calc(${position.widthPct}% - 0.25rem)`,
|
|
324
|
+
minHeight: "1.5rem",
|
|
325
|
+
}, children: [_jsx("div", { className: "truncate text-[11px] font-semibold leading-tight", children: event.title }), _jsxs("div", { className: "mt-0.5 truncate text-[10px] leading-tight opacity-90", children: [formatTimeOfDay(event.startAt), event.location ? ` · ${event.location}` : ""] })] }, event.id));
|
|
326
|
+
})] }));
|
|
327
|
+
}
|
|
328
|
+
function TimeGrid({ days, eventsByDay, selectedEventId, onSelectEvent, }) {
|
|
329
|
+
const now = new Date();
|
|
330
|
+
const totalHours = DAY_END_HOUR - DAY_START_HOUR;
|
|
331
|
+
const gridHeight = totalHours * HOUR_HEIGHT_PX;
|
|
332
|
+
const hasAnyAllDay = useMemo(() => days.some((day) => (eventsByDay.get(toLocalDayKey(day)) ?? []).some((e) => e.isAllDay)), [days, eventsByDay]);
|
|
333
|
+
const hours = useMemo(() => {
|
|
334
|
+
const out = [];
|
|
335
|
+
for (let hour = DAY_START_HOUR; hour < DAY_END_HOUR; hour++) {
|
|
336
|
+
out.push({
|
|
337
|
+
hour,
|
|
338
|
+
label: new Intl.DateTimeFormat(undefined, { hour: "numeric" }).format(new Date(2024, 0, 1, hour, 0)),
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
return out;
|
|
342
|
+
}, []);
|
|
343
|
+
// Grid layout: first column is the hour rail. Each day is an equal-width
|
|
344
|
+
// column after it. Rows stay aligned because every day header cell + every
|
|
345
|
+
// all-day cell share a row whose height is driven by the tallest cell.
|
|
346
|
+
const gridTemplateColumns = `${RAIL_WIDTH_REM}rem repeat(${days.length}, minmax(0, 1fr))`;
|
|
347
|
+
return (_jsxs("div", { className: "overflow-hidden rounded-2xl border border-border/12 bg-bg/20", children: [_jsxs("div", { className: "grid border-b border-border/12", style: { gridTemplateColumns }, children: [_jsx("div", { "aria-hidden": true, style: { height: `${HEADER_ROW_HEIGHT_REM}rem` } }), days.map((day, index) => (_jsx(DayColumnHeader, { day: day, isFirst: index === 0 }, toLocalDayKey(day))))] }), hasAnyAllDay ? (_jsxs("div", { className: "grid border-b border-border/12 bg-bg-muted/15", style: { gridTemplateColumns }, children: [_jsx("div", { "aria-hidden": true, className: "flex items-center justify-end px-2 text-[10px] font-semibold uppercase tracking-wide text-muted/70", children: "all-day" }), days.map((day, index) => (_jsx(AllDayBandCell, { day: day, isFirst: index === 0, events: (eventsByDay.get(toLocalDayKey(day)) ?? []).filter((e) => e.isAllDay), selectedEventId: selectedEventId, onSelectEvent: onSelectEvent }, toLocalDayKey(day))))] })) : null, _jsxs("div", { className: "grid", style: { gridTemplateColumns }, children: [_jsx("div", { className: "relative", style: { height: `${gridHeight}px` }, children: hours.map(({ hour, label }) => (_jsx("div", { className: "absolute right-2 text-[10px] font-medium uppercase tracking-wide text-muted/70", style: {
|
|
348
|
+
top: `${(hour - DAY_START_HOUR) * HOUR_HEIGHT_PX - 6}px`,
|
|
349
|
+
}, children: label }, hour))) }), days.map((day, index) => {
|
|
350
|
+
const key = toLocalDayKey(day);
|
|
351
|
+
const dayEvents = (eventsByDay.get(key) ?? []).filter((e) => !e.isAllDay);
|
|
352
|
+
return (_jsx(DayColumnGrid, { day: day, events: dayEvents, nowInColumn: isSameDayKey(day, now), selectedEventId: selectedEventId, onSelectEvent: onSelectEvent, isFirst: index === 0, gridHeight: gridHeight }, key));
|
|
353
|
+
})] })] }));
|
|
354
|
+
}
|
|
355
|
+
// ---------------------------------------------------------------------------
|
|
356
|
+
// Month grid
|
|
357
|
+
// ---------------------------------------------------------------------------
|
|
358
|
+
function startOfMonthGrid(date) {
|
|
359
|
+
const firstOfMonth = new Date(date);
|
|
360
|
+
firstOfMonth.setDate(1);
|
|
361
|
+
firstOfMonth.setHours(0, 0, 0, 0);
|
|
362
|
+
const weekday = firstOfMonth.getDay();
|
|
363
|
+
const start = new Date(firstOfMonth);
|
|
364
|
+
start.setDate(firstOfMonth.getDate() - weekday);
|
|
365
|
+
return start;
|
|
366
|
+
}
|
|
367
|
+
function MonthGrid({ baseDate, eventsByDay, selectedEventId, onSelectEvent, }) {
|
|
368
|
+
const start = startOfMonthGrid(baseDate);
|
|
369
|
+
const days = buildDays(start, 42);
|
|
370
|
+
const month = baseDate.getMonth();
|
|
371
|
+
const today = new Date();
|
|
372
|
+
const weekdayLabels = useMemo(() => Array.from({ length: 7 }, (_, i) => {
|
|
373
|
+
const d = new Date(start);
|
|
374
|
+
d.setDate(start.getDate() + i);
|
|
375
|
+
return formatWeekdayShort(d);
|
|
376
|
+
}), [start]);
|
|
377
|
+
return (_jsxs("div", { className: "overflow-hidden rounded-2xl border border-border/12 bg-bg/20", children: [_jsx("div", { className: "grid grid-cols-7 border-b border-border/12 bg-bg-muted/20 text-[10px] font-semibold uppercase tracking-wide text-muted", children: weekdayLabels.map((label) => (_jsx("div", { className: "px-2 py-1.5 text-center", children: label }, label))) }), _jsx("div", { className: "grid grid-cols-7 gap-px bg-border/8", children: days.map((day) => {
|
|
378
|
+
const key = toLocalDayKey(day);
|
|
379
|
+
const dayEvents = eventsByDay.get(key) ?? [];
|
|
380
|
+
const inMonth = day.getMonth() === month;
|
|
381
|
+
const isToday = isSameDayKey(day, today);
|
|
382
|
+
return (_jsxs("div", { className: `flex min-h-24 flex-col gap-1 bg-bg/40 p-1.5 text-left ${inMonth ? "" : "opacity-55"}`, children: [_jsx("div", { className: `text-[11px] font-medium ${isToday
|
|
383
|
+
? "inline-flex h-5 w-5 items-center justify-center self-start rounded-full bg-accent text-accent-fg"
|
|
384
|
+
: inMonth
|
|
385
|
+
? "text-txt"
|
|
386
|
+
: "text-muted"}`, children: formatDayNumber(day) }), _jsxs("div", { className: "flex flex-col gap-0.5", children: [dayEvents.slice(0, 3).map((event) => {
|
|
387
|
+
const color = paletteFor(event);
|
|
388
|
+
const isSelected = event.id === selectedEventId;
|
|
389
|
+
return (_jsxs("button", { type: "button", onClick: () => onSelectEvent(event), onContextMenu: (mouseEvent) => {
|
|
390
|
+
mouseEvent.preventDefault();
|
|
391
|
+
onSelectEvent(event);
|
|
392
|
+
}, className: `flex min-w-0 items-center gap-1 rounded-sm px-1.5 py-0.5 text-left text-[10px] font-medium ${isSelected
|
|
393
|
+
? `${color.bg} ${color.text}`
|
|
394
|
+
: `${color.softBg} ${color.softText} hover:${color.bg} hover:${color.text}`}`, children: [!event.isAllDay ? (_jsx("span", { className: `h-1.5 w-1.5 shrink-0 rounded-full ${color.dot}`, "aria-hidden": true })) : null, _jsx("span", { className: "min-w-0 flex-1 truncate", children: event.title })] }, event.id));
|
|
395
|
+
}), dayEvents.length > 3 ? (_jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { type: "button", className: "rounded-sm px-1 text-left text-[10px] font-medium text-muted hover:bg-bg-hover/40 hover:text-txt", children: ["+", dayEvents.length - 3, " more"] }) }), _jsxs(PopoverContent, { align: "start", className: "w-64 p-0", "data-testid": "lifeops-calendar-day-overflow", children: [_jsx("div", { className: "border-b border-border/12 px-3 py-2 text-[11px] font-semibold uppercase tracking-wide text-muted", children: formatAgendaDayLabel(day) }), _jsx("div", { className: "max-h-72 overflow-y-auto py-1", children: dayEvents.map((event) => {
|
|
396
|
+
const overflowColor = paletteFor(event);
|
|
397
|
+
return (_jsxs("button", { type: "button", onClick: () => onSelectEvent(event), className: "flex w-full items-start gap-2 px-3 py-1.5 text-left hover:bg-bg-hover/40", children: [_jsx("span", { "aria-hidden": true, className: `mt-1 h-2 w-2 shrink-0 rounded-full ${overflowColor.dot}` }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "block truncate text-xs font-medium text-txt", children: event.title }), _jsx("span", { className: "mt-0.5 block text-[10px] text-muted", children: event.isAllDay
|
|
398
|
+
? "All day"
|
|
399
|
+
: formatTimeOfDay(event.startAt) })] })] }, `overflow-${event.id}`));
|
|
400
|
+
}) })] })] })) : null] })] }, key));
|
|
401
|
+
}) })] }));
|
|
402
|
+
}
|
|
403
|
+
function AgendaView({ days, eventsByDay, selectedEventId, onSelectEvent, emptyLabel, }) {
|
|
404
|
+
const sections = useMemo(() => days
|
|
405
|
+
.map((day) => {
|
|
406
|
+
const key = toLocalDayKey(day);
|
|
407
|
+
return {
|
|
408
|
+
key,
|
|
409
|
+
day,
|
|
410
|
+
events: sortAgendaEvents(eventsByDay.get(key) ?? []),
|
|
411
|
+
};
|
|
412
|
+
})
|
|
413
|
+
.filter((section) => section.events.length > 0), [days, eventsByDay]);
|
|
414
|
+
if (sections.length === 0) {
|
|
415
|
+
return (_jsx("div", { className: "rounded-2xl border border-border/12 bg-bg/20 px-4 py-8 text-xs text-muted", children: emptyLabel }));
|
|
416
|
+
}
|
|
417
|
+
return (_jsx("div", { className: "space-y-3", children: sections.map((section) => (_jsxs("div", { className: "rounded-2xl border border-border/12 bg-bg/20", children: [_jsx("div", { className: "border-b border-border/10 px-4 py-3 text-xs font-semibold uppercase tracking-wide text-muted", children: formatAgendaDayLabel(section.day) }), _jsx("div", { className: "divide-y divide-border/10", children: section.events.map((event) => {
|
|
418
|
+
const color = paletteFor(event);
|
|
419
|
+
const isSelected = event.id === selectedEventId;
|
|
420
|
+
return (_jsxs("button", { type: "button", onClick: () => onSelectEvent(event), onContextMenu: (mouseEvent) => {
|
|
421
|
+
mouseEvent.preventDefault();
|
|
422
|
+
onSelectEvent(event);
|
|
423
|
+
}, "aria-pressed": isSelected, className: `flex w-full items-start gap-3 px-4 py-3 text-left transition-colors ${isSelected ? "bg-white/5" : "hover:bg-white/3"}`, children: [_jsx("span", { "aria-hidden": true, className: `mt-1 h-2.5 w-2.5 shrink-0 rounded-full ${color.dot}` }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "block truncate text-sm font-semibold text-txt", children: event.title }), _jsx("span", { className: "mt-1 block text-xs text-muted", children: formatAgendaEventMeta(event) })] })] }, event.id));
|
|
424
|
+
}) })] }, section.key))) }));
|
|
425
|
+
}
|
|
426
|
+
export function LifeOpsCalendarSection(props = {}) {
|
|
427
|
+
const ctx = useLifeOpsSelection();
|
|
428
|
+
const selection = props.selection ?? ctx.selection;
|
|
429
|
+
const onSelect = props.onSelect ?? ctx.select;
|
|
430
|
+
const { t } = useApp();
|
|
431
|
+
const calendar = useCalendarWeek();
|
|
432
|
+
const compactLayout = useMediaQuery("(max-width: 767px)");
|
|
433
|
+
const { chatAboutEvent } = useLifeOpsChatLauncher();
|
|
434
|
+
const [drawerEvent, setDrawerEvent] = useState(null);
|
|
435
|
+
const [createOpen, setCreateOpen] = useState(false);
|
|
436
|
+
const [createDefaultDate, setCreateDefaultDate] = useState(new Date());
|
|
437
|
+
const selectedEventId = selection.eventId ?? null;
|
|
438
|
+
const eventsByDay = useMemo(() => groupEventsByDay(calendar.events), [calendar.events]);
|
|
439
|
+
const days = useMemo(() => {
|
|
440
|
+
switch (calendar.viewMode) {
|
|
441
|
+
case "day":
|
|
442
|
+
return buildDays(calendar.windowStart, 1);
|
|
443
|
+
case "month":
|
|
444
|
+
return buildDays(calendar.windowStart, 42);
|
|
445
|
+
default:
|
|
446
|
+
return buildDays(calendar.windowStart, 7);
|
|
447
|
+
}
|
|
448
|
+
}, [calendar.viewMode, calendar.windowStart]);
|
|
449
|
+
const handleSelectEvent = useCallback((event) => {
|
|
450
|
+
onSelect({ eventId: event.id });
|
|
451
|
+
setDrawerEvent(event);
|
|
452
|
+
}, [onSelect]);
|
|
453
|
+
const handleCloseEditor = useCallback(() => {
|
|
454
|
+
setDrawerEvent(null);
|
|
455
|
+
onSelect({ eventId: null });
|
|
456
|
+
}, [onSelect]);
|
|
457
|
+
// When an external caller (widget row, deep link) selects an event, the
|
|
458
|
+
// grid's local `drawerEvent` state is still null. Look up the id first in
|
|
459
|
+
// the currently-loaded calendar feed, then fall back to the widget prime
|
|
460
|
+
// cache so the drawer can open with the right event even if it's outside
|
|
461
|
+
// the current week view.
|
|
462
|
+
useEffect(() => {
|
|
463
|
+
if (!selectedEventId) {
|
|
464
|
+
if (drawerEvent !== null)
|
|
465
|
+
setDrawerEvent(null);
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
if (drawerEvent?.id === selectedEventId)
|
|
469
|
+
return;
|
|
470
|
+
const fromFeed = calendar.events.find((event) => event.id === selectedEventId);
|
|
471
|
+
if (fromFeed) {
|
|
472
|
+
setDrawerEvent(fromFeed);
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
475
|
+
const primed = getPrimedLifeOpsEvent(selectedEventId);
|
|
476
|
+
if (primed) {
|
|
477
|
+
setDrawerEvent(primed);
|
|
478
|
+
}
|
|
479
|
+
}, [selectedEventId, calendar.events, drawerEvent]);
|
|
480
|
+
const rangeLabel = useMemo(() => formatMonthHeader(calendar.windowStart, calendar.windowEnd), [calendar.windowStart, calendar.windowEnd]);
|
|
481
|
+
const VIEW_ITEMS = [
|
|
482
|
+
{ value: "day", label: t("lifeopsCalendar.day", { defaultValue: "Day" }) },
|
|
483
|
+
{
|
|
484
|
+
value: "week",
|
|
485
|
+
label: t("lifeopsCalendar.week", { defaultValue: "Week" }),
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
value: "month",
|
|
489
|
+
label: t("lifeopsCalendar.month", { defaultValue: "Month" }),
|
|
490
|
+
},
|
|
491
|
+
];
|
|
492
|
+
return (_jsxs(_Fragment, { children: [_jsxs("section", { className: "flex h-full min-h-0 flex-col gap-4", "data-testid": "lifeops-calendar-section", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsxs("div", { className: "flex overflow-hidden rounded-xl border border-border/16 bg-card/22", children: [_jsx("button", { type: "button", className: "flex h-8 w-8 items-center justify-center text-muted hover:bg-bg-muted/40 hover:text-txt", "aria-label": t("lifeopsCalendar.previous", {
|
|
493
|
+
defaultValue: "Previous",
|
|
494
|
+
}), onClick: calendar.goPrevious, children: _jsx(ChevronLeft, { className: "h-4 w-4", "aria-hidden": true }) }), _jsx("button", { type: "button", className: "h-8 px-2.5 text-xs font-medium text-txt hover:bg-bg-muted/40", onClick: calendar.goToToday, children: t("lifeopsCalendar.today", { defaultValue: "Today" }) }), _jsx("button", { type: "button", className: "flex h-8 w-8 items-center justify-center text-muted hover:bg-bg-muted/40 hover:text-txt", "aria-label": t("lifeopsCalendar.next", {
|
|
495
|
+
defaultValue: "Next",
|
|
496
|
+
}), onClick: calendar.goNext, children: _jsx(ChevronRight, { className: "h-4 w-4", "aria-hidden": true }) })] }), _jsx("h2", { className: "min-w-0 text-sm font-semibold tracking-tight text-txt sm:text-base", children: rangeLabel })] }), _jsxs("div", { className: "flex w-full items-center gap-2 sm:w-auto", children: [_jsx(SegmentedControl, { "aria-label": t("lifeopsCalendar.viewModeAria", {
|
|
497
|
+
defaultValue: "Calendar view",
|
|
498
|
+
}), value: calendar.viewMode, onValueChange: calendar.setViewMode, items: VIEW_ITEMS, className: "w-full border-border/24 bg-card/24 p-0.5", buttonClassName: "min-h-8 flex-1 px-3 py-1 text-xs" }), _jsxs(Button, { size: "sm", className: "h-8 shrink-0 gap-1 rounded-xl px-3 text-xs font-semibold", onClick: () => {
|
|
499
|
+
setCreateDefaultDate(new Date(calendar.windowStart));
|
|
500
|
+
setCreateOpen(true);
|
|
501
|
+
}, "data-testid": "lifeops-calendar-new-event", children: [_jsx(Plus, { className: "h-3.5 w-3.5", "aria-hidden": true }), t("lifeopsCalendar.newEvent", { defaultValue: "New" })] })] })] }), calendar.error ? (_jsx("div", { className: "rounded-2xl border border-rose-500/30 bg-rose-500/10 px-3 py-2 text-xs text-rose-300", children: calendar.error })) : null, calendar.loading && calendar.events.length === 0 ? (_jsxs("div", { className: "flex items-center gap-2 py-12 text-xs text-muted", children: [_jsx(Spinner, { size: 14 }), t("lifeopsCalendar.loading", { defaultValue: "Loading events…" })] })) : compactLayout ? (_jsx(AgendaView, { days: days, eventsByDay: eventsByDay, selectedEventId: selectedEventId, onSelectEvent: handleSelectEvent, emptyLabel: t("lifeopsCalendar.empty", {
|
|
502
|
+
defaultValue: "Nothing scheduled.",
|
|
503
|
+
}) })) : calendar.viewMode === "month" ? (_jsx(MonthGrid, { baseDate: calendar.windowStart, eventsByDay: eventsByDay, selectedEventId: selectedEventId, onSelectEvent: handleSelectEvent })) : (_jsx(TimeGrid, { days: days, eventsByDay: eventsByDay, selectedEventId: selectedEventId, onSelectEvent: handleSelectEvent }))] }), _jsx(EventEditorDrawer, { open: drawerEvent !== null, mode: "edit", event: drawerEvent, onChat: chatAboutEvent, onClose: handleCloseEditor, onSaved: (updatedEvent) => {
|
|
504
|
+
void calendar.refresh();
|
|
505
|
+
setDrawerEvent(updatedEvent);
|
|
506
|
+
}, onDeleted: () => {
|
|
507
|
+
void calendar.refresh();
|
|
508
|
+
setDrawerEvent(null);
|
|
509
|
+
onSelect({ eventId: null });
|
|
510
|
+
} }), _jsx(EventEditorDrawer, { open: createOpen, mode: "create", event: null, createDefaults: { date: createDefaultDate, side: "owner" }, onClose: () => setCreateOpen(false), onCreated: (createdEvent) => {
|
|
511
|
+
void calendar.refresh();
|
|
512
|
+
setCreateOpen(false);
|
|
513
|
+
onSelect({ eventId: createdEvent.id });
|
|
514
|
+
} })] }));
|
|
515
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { LifeOpsActiveReminderView, LifeOpsCalendarEvent, LifeOpsInboxMessage } from "@elizaos/shared";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { type LifeOpsSelection } from "./LifeOpsSelectionContext.js";
|
|
4
|
+
export interface PrefillChatDetail {
|
|
5
|
+
text: string;
|
|
6
|
+
select?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function postToChat(text: string, options?: {
|
|
9
|
+
select?: boolean;
|
|
10
|
+
}): void;
|
|
11
|
+
export declare function buildMessageChatPrefill(message: LifeOpsInboxMessage): string;
|
|
12
|
+
export declare function buildReminderChatPrefill(reminder: LifeOpsActiveReminderView): string;
|
|
13
|
+
export declare function buildEventChatPrefill(event: LifeOpsCalendarEvent): string;
|
|
14
|
+
export declare function useLifeOpsChatLauncher(): {
|
|
15
|
+
openLifeOpsChat: (text: string, selection?: Partial<LifeOpsSelection>, options?: {
|
|
16
|
+
select?: boolean;
|
|
17
|
+
}) => void;
|
|
18
|
+
chatAboutMessage: (message: LifeOpsInboxMessage) => void;
|
|
19
|
+
chatAboutReminder: (reminder: LifeOpsActiveReminderView) => void;
|
|
20
|
+
chatAboutEvent: (event: LifeOpsCalendarEvent) => void;
|
|
21
|
+
};
|
|
22
|
+
export declare function useLifeOpsChatAdapter(selection: LifeOpsSelection): {
|
|
23
|
+
placeholder: string | null;
|
|
24
|
+
};
|
|
25
|
+
export declare function LifeOpsChatAdapter({ children }: {
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function buildReplyPrefill(opts: {
|
|
29
|
+
channel: string;
|
|
30
|
+
sender: string;
|
|
31
|
+
snippet: string;
|
|
32
|
+
deepLink?: string | null;
|
|
33
|
+
}): string;
|
|
34
|
+
//# sourceMappingURL=LifeOpsChatAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LifeOpsChatAdapter.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/components/LifeOpsChatAdapter.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,yBAAyB,EACzB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,SAAS,EAA0B,MAAM,OAAO,CAAC;AAC/D,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,8BAA8B,CAAC;AAEtC,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAqCD,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAM7E;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,CAe5E;AAED,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,yBAAyB,GAClC,MAAM,CAUR;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAWzE;AAED,wBAAgB,sBAAsB,IAAI;IACxC,eAAe,EAAE,CACf,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,EACrC,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,KAC3B,IAAI,CAAC;IACV,gBAAgB,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACzD,iBAAiB,EAAE,CAAC,QAAQ,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACjE,cAAc,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;CACvD,CAyDA;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,gBAAgB,GAAG;IAClE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAiDA;AAED,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAiBvE;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,GAAG,MAAM,CAGT"}
|