@agent-native/core 0.117.2 → 0.118.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +3 -3
- package/corpus/core/CHANGELOG.md +51 -0
- package/corpus/core/docs/content/custom-design-system.mdx +445 -0
- package/corpus/core/docs/content/toolkit-ui.mdx +16 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/a2a/client.ts +32 -10
- package/corpus/core/src/a2a/types.ts +1 -0
- package/corpus/core/src/agent/types.ts +1 -1
- package/corpus/core/src/cli/index.ts +18 -10
- package/corpus/core/src/cli/multi-frontier-runs.ts +5 -3
- package/corpus/core/src/cli/templates-meta.ts +0 -12
- package/corpus/core/src/cli/workspace-dev.ts +1 -1
- package/corpus/core/src/client/AgentPanel.tsx +99 -108
- package/corpus/core/src/client/AssistantChat.tsx +30 -13
- package/corpus/core/src/client/CommandMenu.tsx +68 -178
- package/corpus/core/src/client/RunStuckBanner.tsx +39 -47
- package/corpus/core/src/client/agent-chat-adapter.ts +3 -1
- package/corpus/core/src/client/app-providers.tsx +1 -1
- package/corpus/core/src/client/chat/action-chat-ui-surface.tsx +32 -0
- package/corpus/core/src/client/chat/message-components.tsx +169 -18
- package/corpus/core/src/client/chat/tool-call-display.tsx +50 -14
- package/corpus/core/src/client/chat/widgets/InlineExtensionWidget.tsx +13 -40
- package/corpus/core/src/client/chat/widgets/builtin-tool-renderers.tsx +7 -3
- package/corpus/core/src/client/components/ui/message-scroller.tsx +15 -1
- package/corpus/core/src/client/conversation/AgentConversation.tsx +12 -1
- package/corpus/core/src/client/error-capture.ts +2 -6
- package/corpus/core/src/client/i18n.tsx +22 -0
- package/corpus/core/src/client/index.ts +17 -0
- package/corpus/core/src/client/org/TeamPage.tsx +257 -153
- package/corpus/core/src/client/progress/RunsTray.tsx +89 -88
- package/corpus/core/src/client/resources/McpConnectionSuggestion.tsx +25 -16
- package/corpus/core/src/client/resources/McpIntegrationDialog.tsx +34 -13
- package/corpus/core/src/client/resources/ResourcesPanel.tsx +5 -1
- package/corpus/core/src/client/resources/mcp-integration-catalog.ts +20 -17
- package/corpus/core/src/client/resources/mcp-integration-logos.ts +2 -2
- package/corpus/core/src/client/route-chunk-recovery.ts +5 -3
- package/corpus/core/src/client/session-replay.ts +3 -3
- package/corpus/core/src/client/settings/DemoModeSection.tsx +6 -18
- package/corpus/core/src/client/settings/SecretsSection.tsx +97 -52
- package/corpus/core/src/client/settings/SettingsPanel.tsx +217 -252
- package/corpus/core/src/client/settings/SettingsTabsPage.tsx +23 -2
- package/corpus/core/src/client/settings/VoiceTranscriptionSection.tsx +7 -18
- package/corpus/core/src/client/settings/index.ts +7 -0
- package/corpus/core/src/client/settings/useSettingsPanelController.ts +155 -0
- package/corpus/core/src/client/setup-connections/BuilderConnectCard.tsx +116 -51
- package/corpus/core/src/client/setup-connections/index.ts +10 -0
- package/corpus/core/src/client/setup-connections/useBuilderConnectCardController.ts +82 -0
- package/corpus/core/src/client/sharing/ShareButton.tsx +64 -586
- package/corpus/core/src/client/sharing/ShareDialog.tsx +299 -633
- package/corpus/core/src/client/sharing/index.ts +42 -0
- package/corpus/core/src/client/sharing/share-controller-helpers.ts +318 -0
- package/corpus/core/src/client/sharing/useShareButtonController.ts +600 -0
- package/corpus/core/src/client/sharing/useShareDialogController.ts +559 -0
- package/corpus/core/src/client/sse-event-processor.ts +23 -0
- package/corpus/core/src/client/tool-display.ts +71 -0
- package/corpus/core/src/client/transcription/use-live-transcription.ts +64 -45
- package/corpus/core/src/client/use-agent-engine-configured.ts +12 -19
- package/corpus/core/src/client/use-chat-threads.ts +33 -12
- package/corpus/core/src/deploy/build.ts +2 -1
- package/corpus/core/src/guards/db-tool-scoping.ts +1 -1
- package/corpus/core/src/integrations/adapters/slack.ts +84 -5
- package/corpus/core/src/integrations/index.ts +5 -1
- package/corpus/core/src/localization/default-messages.ts +6 -1
- package/corpus/core/src/mcp-client/oauth-routes.ts +61 -14
- package/corpus/core/src/scripts/call-agent.ts +5 -1
- package/corpus/core/src/server/realtime-voice.ts +5 -2
- package/corpus/core/src/styles/agent-native.css +0 -24
- package/corpus/core/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/core/src/templates/default/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/core/src/templates/default/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/core/src/templates/default/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/core/src/templates/default/app/components/ui/toolkit-provider.tsx +10 -0
- package/corpus/core/src/templates/default/app/design-system.ts +3 -0
- package/corpus/core/src/templates/default/app/root.tsx +5 -2
- package/corpus/core/src/templates/default/package.json +1 -0
- package/corpus/core/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/core/src/templates/headless/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/core/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/core/src/templates/workspace-core/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/core/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/core/src/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/core/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +7 -5
- package/corpus/core/src/terminal/cli-registry.ts +1 -1
- package/corpus/core/src/vite/client.ts +205 -1
- package/corpus/templates/analytics/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/analytics/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/analytics/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/analytics/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/analytics/app/design-system.ts +3 -0
- package/corpus/templates/analytics/app/hooks/use-dashboard-views.ts +13 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewsMenu.tsx +10 -0
- package/corpus/templates/analytics/changelog/2026-07-22-show-a-useful-error-when-saving-a-dashboard-view-fails.md +6 -0
- package/corpus/templates/assets/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/assets/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/assets/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/assets/app/components/ui/alert.tsx +1 -0
- package/corpus/templates/assets/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/assets/app/design-system.ts +3 -0
- package/corpus/templates/assets/app/routes/brand-kits.$id_.presets.$presetId.tsx +26 -30
- package/corpus/templates/brain/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/brain/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/brain/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/brain/app/components/ui/dialog.tsx +1 -0
- package/corpus/templates/brain/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/brain/app/design-system.ts +3 -0
- package/corpus/templates/brain/app/routes/sources.tsx +189 -122
- package/corpus/templates/calendar/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/calendar/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/calendar/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/calendar/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/calendar/app/design-system.ts +3 -0
- package/corpus/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/chat/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/chat/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/chat/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/chat/app/design-system.ts +3 -0
- package/corpus/templates/clips/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/clips/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/clips/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/clips/AGENTS.md +8 -6
- package/corpus/templates/clips/actions/request-transcript.ts +90 -420
- package/corpus/templates/clips/actions/save-browser-transcript.ts +11 -28
- package/corpus/templates/clips/app/components/capture-install-options.tsx +5 -3
- package/corpus/templates/clips/app/components/player/transcript-panel.tsx +3 -136
- package/corpus/templates/clips/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/clips/app/design-system.ts +3 -0
- package/corpus/templates/clips/app/lib/capture-install-options.ts +15 -4
- package/corpus/templates/clips/app/routes/_app.library._index.tsx +1 -1
- package/corpus/templates/clips/app/routes/download.tsx +3 -2
- package/corpus/templates/clips/changelog/2026-07-22-fixed-an-intermittent-hydration-error-on-the-download-page.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-22-fixed-transcript-generation-when-native-speech-capture-retur.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-22-fixed-windows-recordings-aborting-during-the-countdown.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-22-permissions-and-rewind-controls-are-now-grouped-with-clearer.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-22-the-desktop-popover-opens-centered-under-the-menu-bar-icon-o.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-22-transcript-generation-now-retries-with-backup-speech-recogni.md +6 -0
- package/corpus/templates/clips/desktop/src/app.tsx +86 -82
- package/corpus/templates/clips/desktop/src/styles.css +13 -0
- package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +10 -1
- package/corpus/templates/clips/desktop/src-tauri/src/shortcuts.rs +37 -2
- package/corpus/templates/clips/desktop/src-tauri/src/tray.rs +18 -0
- package/corpus/templates/clips/server/lib/public-agent-context.ts +2 -2
- package/corpus/templates/clips/server/register-secrets.ts +7 -6
- package/corpus/templates/content/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/content/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/content/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +41 -59
- package/corpus/templates/content/app/components/editor/SlashCommandMenu.tsx +16 -84
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +13 -7
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +41 -41
- package/corpus/templates/content/app/components/editor/database/GalleryView.tsx +2 -1
- package/corpus/templates/content/app/components/editor/database/ListView.tsx +2 -1
- package/corpus/templates/content/app/components/editor/database/TimelineView.tsx +9 -9
- package/corpus/templates/content/app/components/editor/database/sidebar.tsx +7 -7
- package/corpus/templates/content/app/components/editor/database-sources/BuilderSourceReviewDialog.tsx +11 -11
- package/corpus/templates/content/app/components/editor/extensions/ImageBlock.tsx +2 -2
- package/corpus/templates/content/app/components/ui/checkbox.tsx +1 -0
- package/corpus/templates/content/app/components/ui/collapsible.tsx +1 -0
- package/corpus/templates/content/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/content/app/design-system.ts +3 -0
- package/corpus/templates/content/app/global.css +29 -3
- package/corpus/templates/content/app/i18n-data.ts +10 -0
- package/corpus/templates/content/changelog/2026-07-22-page-actions-are-grouped-into-the-three-dots-menu-for-a-clea.md +6 -0
- package/corpus/templates/design/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/design/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/design/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +8 -8
- package/corpus/templates/design/app/components/ui/command.tsx +1 -0
- package/corpus/templates/design/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/design/app/design-system.ts +3 -0
- package/corpus/templates/design/server/lib/fig-file-decoder.ts +1 -0
- package/corpus/templates/dispatch/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/dispatch/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/dispatch/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/dispatch/app/components/ui/button.tsx +1 -0
- package/corpus/templates/dispatch/app/components/ui/toolkit-provider.tsx +17 -0
- package/corpus/templates/dispatch/app/design-system.ts +3 -0
- package/corpus/templates/dispatch/app/root.tsx +10 -7
- package/corpus/templates/dispatch/package.json +1 -0
- package/corpus/templates/forms/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/forms/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/forms/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/forms/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/forms/app/design-system.ts +3 -0
- package/corpus/templates/macros/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/macros/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/macros/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/macros/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/macros/app/design-system.ts +3 -0
- package/corpus/templates/mail/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/mail/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/mail/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/mail/app/components/email/EmailThread.tsx +134 -93
- package/corpus/templates/mail/app/components/email/email-iframe-document.ts +8 -2
- package/corpus/templates/mail/app/components/ui/textarea.tsx +1 -21
- package/corpus/templates/mail/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/mail/app/design-system.ts +3 -0
- package/corpus/templates/mail/changelog/2026-07-22-email-messages-no-longer-flash-with-an-unstyled-page-while-l.md +6 -0
- package/corpus/templates/plan/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/plan/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/plan/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/plan/app/components/plan/PlanContentRenderer.tsx +1 -1
- package/corpus/templates/plan/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/plan/app/design-system.ts +3 -0
- package/corpus/templates/plan/app/entry.client.tsx +3 -0
- package/corpus/templates/plan/changelog/2026-07-22-recover-stale-pages-after-a-deployment-refresh-automatically.md +6 -0
- package/corpus/templates/slides/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/slides/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/slides/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/slides/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/slides/app/design-system.ts +3 -0
- package/corpus/templates/slides/app/hooks/use-agent-generating.ts +10 -3
- package/corpus/templates/slides/app/pages/Index.tsx +1 -0
- package/corpus/templates/slides/changelog/2026-07-22-new-deck-prompts-now-open-in-their-own-visible-chat-thread.md +6 -0
- package/corpus/templates/tasks/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/tasks/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/tasks/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/tasks/app/components/ui/toolkit-provider.tsx +17 -0
- package/corpus/templates/tasks/app/design-system.ts +3 -0
- package/corpus/templates/tasks/app/root.tsx +5 -2
- package/corpus/toolkit/CHANGELOG.md +23 -0
- package/corpus/toolkit/agent-native.eject.json +71 -0
- package/corpus/toolkit/package.json +31 -1
- package/corpus/toolkit/src/chat-history/ChatHistoryRail.tsx +100 -39
- package/corpus/toolkit/src/chat-history/index.ts +9 -0
- package/corpus/toolkit/src/chat-history/useChatHistoryRailController.ts +76 -0
- package/corpus/toolkit/src/chat-history.css +2 -0
- package/corpus/toolkit/src/composer/ComposerPlusMenu.tsx +11 -8
- package/corpus/toolkit/src/composer/PromptComposer.tsx +32 -7
- package/corpus/toolkit/src/composer/RealtimeVoiceMode.tsx +119 -31
- package/corpus/toolkit/src/composer/useRealtimeVoiceMode.tsx +124 -9
- package/corpus/toolkit/src/conformance/__fixtures__/css-in-js-adapter.tsx +401 -0
- package/corpus/toolkit/src/conformance/index.ts +3 -0
- package/corpus/toolkit/src/conformance/runner.tsx +862 -0
- package/corpus/toolkit/src/conformance/types.ts +45 -0
- package/corpus/toolkit/src/conformance/version.ts +22 -0
- package/corpus/toolkit/src/design-system/components.tsx +146 -0
- package/corpus/toolkit/src/design-system/context.tsx +31 -0
- package/corpus/toolkit/src/design-system/default-adapter.tsx +915 -0
- package/corpus/toolkit/src/design-system/definition.ts +14 -0
- package/corpus/toolkit/src/design-system/error-boundary.tsx +37 -0
- package/corpus/toolkit/src/design-system/index.ts +7 -0
- package/corpus/toolkit/src/design-system/theme.ts +145 -0
- package/corpus/toolkit/src/design-system/types.ts +363 -0
- package/corpus/toolkit/src/editor/SharedRichEditor.tsx +13 -2
- package/corpus/toolkit/src/editor/SlashCommandMenu.tsx +20 -0
- package/corpus/toolkit/src/editor/index.ts +2 -0
- package/corpus/toolkit/src/provider.tsx +98 -5
- package/corpus/toolkit/src/styles.css +52 -23
- package/corpus/toolkit/src/ui/button.tsx +95 -6
- package/corpus/toolkit/src/ui/dialog.tsx +48 -23
- package/corpus/toolkit/src/ui/popover.tsx +16 -2
- package/corpus/toolkit/src/ui/select.tsx +7 -3
- package/corpus/toolkit/src/ui/sidebar.tsx +47 -48
- package/corpus/toolkit/src/ui/tooltip.tsx +7 -3
- package/dist/a2a/client.d.ts +3 -1
- package/dist/a2a/client.d.ts.map +1 -1
- package/dist/a2a/client.js +17 -12
- package/dist/a2a/client.js.map +1 -1
- package/dist/a2a/types.d.ts +1 -1
- package/dist/a2a/types.d.ts.map +1 -1
- package/dist/a2a/types.js.map +1 -1
- package/dist/agent/types.d.ts +1 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/cli/index.js +18 -8
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/multi-frontier-runs.js +3 -3
- package/dist/cli/multi-frontier-runs.js.map +1 -1
- package/dist/cli/templates-meta.d.ts.map +1 -1
- package/dist/cli/templates-meta.js +0 -12
- package/dist/cli/templates-meta.js.map +1 -1
- package/dist/cli/workspace-dev.js +1 -1
- package/dist/cli/workspace-dev.js.map +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +18 -15
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +26 -15
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/CommandMenu.d.ts.map +1 -1
- package/dist/client/CommandMenu.js +18 -106
- package/dist/client/CommandMenu.js.map +1 -1
- package/dist/client/RunStuckBanner.d.ts +3 -5
- package/dist/client/RunStuckBanner.d.ts.map +1 -1
- package/dist/client/RunStuckBanner.js +17 -18
- package/dist/client/RunStuckBanner.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +2 -1
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/app-providers.d.ts.map +1 -1
- package/dist/client/app-providers.js +1 -1
- package/dist/client/app-providers.js.map +1 -1
- package/dist/client/chat/action-chat-ui-surface.d.ts +8 -0
- package/dist/client/chat/action-chat-ui-surface.d.ts.map +1 -0
- package/dist/client/chat/action-chat-ui-surface.js +10 -0
- package/dist/client/chat/action-chat-ui-surface.js.map +1 -0
- package/dist/client/chat/message-components.d.ts +12 -1
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +102 -14
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat/tool-call-display.d.ts +3 -1
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +33 -14
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/client/chat/widgets/InlineExtensionWidget.d.ts.map +1 -1
- package/dist/client/chat/widgets/InlineExtensionWidget.js +9 -12
- package/dist/client/chat/widgets/InlineExtensionWidget.js.map +1 -1
- package/dist/client/chat/widgets/builtin-tool-renderers.d.ts.map +1 -1
- package/dist/client/chat/widgets/builtin-tool-renderers.js +5 -3
- package/dist/client/chat/widgets/builtin-tool-renderers.js.map +1 -1
- package/dist/client/components/ui/message-scroller.d.ts +1 -1
- package/dist/client/components/ui/message-scroller.d.ts.map +1 -1
- package/dist/client/components/ui/message-scroller.js +4 -3
- package/dist/client/components/ui/message-scroller.js.map +1 -1
- package/dist/client/conversation/AgentConversation.d.ts.map +1 -1
- package/dist/client/conversation/AgentConversation.js +3 -2
- package/dist/client/conversation/AgentConversation.js.map +1 -1
- package/dist/client/error-capture.d.ts.map +1 -1
- package/dist/client/error-capture.js +2 -2
- package/dist/client/error-capture.js.map +1 -1
- package/dist/client/i18n.d.ts.map +1 -1
- package/dist/client/i18n.js +9 -0
- package/dist/client/i18n.js.map +1 -1
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +2 -2
- package/dist/client/index.js.map +1 -1
- package/dist/client/org/TeamPage.d.ts.map +1 -1
- package/dist/client/org/TeamPage.js +41 -33
- package/dist/client/org/TeamPage.js.map +1 -1
- package/dist/client/progress/RunsTray.d.ts.map +1 -1
- package/dist/client/progress/RunsTray.js +9 -10
- package/dist/client/progress/RunsTray.js.map +1 -1
- package/dist/client/resources/McpConnectionSuggestion.d.ts +1 -0
- package/dist/client/resources/McpConnectionSuggestion.d.ts.map +1 -1
- package/dist/client/resources/McpConnectionSuggestion.js +14 -12
- package/dist/client/resources/McpConnectionSuggestion.js.map +1 -1
- package/dist/client/resources/McpIntegrationDialog.d.ts.map +1 -1
- package/dist/client/resources/McpIntegrationDialog.js +10 -8
- package/dist/client/resources/McpIntegrationDialog.js.map +1 -1
- package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
- package/dist/client/resources/ResourcesPanel.js +3 -1
- package/dist/client/resources/ResourcesPanel.js.map +1 -1
- package/dist/client/resources/mcp-integration-catalog.d.ts +2 -0
- package/dist/client/resources/mcp-integration-catalog.d.ts.map +1 -1
- package/dist/client/resources/mcp-integration-catalog.js +17 -17
- package/dist/client/resources/mcp-integration-catalog.js.map +1 -1
- package/dist/client/resources/mcp-integration-logos.js +2 -2
- package/dist/client/resources/mcp-integration-logos.js.map +1 -1
- package/dist/client/route-chunk-recovery.d.ts.map +1 -1
- package/dist/client/route-chunk-recovery.js +5 -3
- package/dist/client/route-chunk-recovery.js.map +1 -1
- package/dist/client/session-replay.js +3 -3
- package/dist/client/session-replay.js.map +1 -1
- package/dist/client/settings/DemoModeSection.d.ts.map +1 -1
- package/dist/client/settings/DemoModeSection.js +2 -5
- package/dist/client/settings/DemoModeSection.js.map +1 -1
- package/dist/client/settings/SecretsSection.d.ts.map +1 -1
- package/dist/client/settings/SecretsSection.js +18 -6
- package/dist/client/settings/SecretsSection.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +53 -118
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/settings/SettingsTabsPage.d.ts.map +1 -1
- package/dist/client/settings/SettingsTabsPage.js +16 -1
- package/dist/client/settings/SettingsTabsPage.js.map +1 -1
- package/dist/client/settings/VoiceTranscriptionSection.d.ts.map +1 -1
- package/dist/client/settings/VoiceTranscriptionSection.js +2 -5
- package/dist/client/settings/VoiceTranscriptionSection.js.map +1 -1
- package/dist/client/settings/index.d.ts +1 -0
- package/dist/client/settings/index.d.ts.map +1 -1
- package/dist/client/settings/index.js +1 -0
- package/dist/client/settings/index.js.map +1 -1
- package/dist/client/settings/useSettingsPanelController.d.ts +22 -0
- package/dist/client/settings/useSettingsPanelController.d.ts.map +1 -0
- package/dist/client/settings/useSettingsPanelController.js +103 -0
- package/dist/client/settings/useSettingsPanelController.js.map +1 -0
- package/dist/client/setup-connections/BuilderConnectCard.d.ts +14 -6
- package/dist/client/setup-connections/BuilderConnectCard.d.ts.map +1 -1
- package/dist/client/setup-connections/BuilderConnectCard.js +24 -16
- package/dist/client/setup-connections/BuilderConnectCard.js.map +1 -1
- package/dist/client/setup-connections/index.d.ts +2 -1
- package/dist/client/setup-connections/index.d.ts.map +1 -1
- package/dist/client/setup-connections/index.js +2 -1
- package/dist/client/setup-connections/index.js.map +1 -1
- package/dist/client/setup-connections/useBuilderConnectCardController.d.ts +34 -0
- package/dist/client/setup-connections/useBuilderConnectCardController.d.ts.map +1 -0
- package/dist/client/setup-connections/useBuilderConnectCardController.js +39 -0
- package/dist/client/setup-connections/useBuilderConnectCardController.js.map +1 -0
- package/dist/client/sharing/ShareButton.d.ts +2 -1
- package/dist/client/sharing/ShareButton.d.ts.map +1 -1
- package/dist/client/sharing/ShareButton.js +17 -463
- package/dist/client/sharing/ShareButton.js.map +1 -1
- package/dist/client/sharing/ShareDialog.d.ts +6 -6
- package/dist/client/sharing/ShareDialog.d.ts.map +1 -1
- package/dist/client/sharing/ShareDialog.js +69 -283
- package/dist/client/sharing/ShareDialog.js.map +1 -1
- package/dist/client/sharing/index.d.ts +3 -0
- package/dist/client/sharing/index.d.ts.map +1 -1
- package/dist/client/sharing/index.js +3 -0
- package/dist/client/sharing/index.js.map +1 -1
- package/dist/client/sharing/share-controller-helpers.d.ts +70 -0
- package/dist/client/sharing/share-controller-helpers.d.ts.map +1 -0
- package/dist/client/sharing/share-controller-helpers.js +224 -0
- package/dist/client/sharing/share-controller-helpers.js.map +1 -0
- package/dist/client/sharing/useShareButtonController.d.ts +91 -0
- package/dist/client/sharing/useShareButtonController.d.ts.map +1 -0
- package/dist/client/sharing/useShareButtonController.js +397 -0
- package/dist/client/sharing/useShareButtonController.js.map +1 -0
- package/dist/client/sharing/useShareDialogController.d.ts +109 -0
- package/dist/client/sharing/useShareDialogController.d.ts.map +1 -0
- package/dist/client/sharing/useShareDialogController.js +348 -0
- package/dist/client/sharing/useShareDialogController.js.map +1 -0
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +21 -0
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/client/tool-display.d.ts +16 -0
- package/dist/client/tool-display.d.ts.map +1 -1
- package/dist/client/tool-display.js +52 -0
- package/dist/client/tool-display.js.map +1 -1
- package/dist/client/transcription/use-live-transcription.d.ts +3 -3
- package/dist/client/transcription/use-live-transcription.d.ts.map +1 -1
- package/dist/client/transcription/use-live-transcription.js +22 -11
- package/dist/client/transcription/use-live-transcription.js.map +1 -1
- package/dist/client/use-agent-engine-configured.d.ts +3 -2
- package/dist/client/use-agent-engine-configured.d.ts.map +1 -1
- package/dist/client/use-agent-engine-configured.js +7 -19
- package/dist/client/use-agent-engine-configured.js.map +1 -1
- package/dist/client/use-chat-threads.d.ts.map +1 -1
- package/dist/client/use-chat-threads.js +21 -8
- package/dist/client/use-chat-threads.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +1 -1
- package/dist/deploy/build.js.map +1 -1
- package/dist/guards/db-tool-scoping.js +1 -1
- package/dist/guards/db-tool-scoping.js.map +1 -1
- package/dist/integrations/adapters/slack.d.ts +1 -0
- package/dist/integrations/adapters/slack.d.ts.map +1 -1
- package/dist/integrations/adapters/slack.js +61 -5
- package/dist/integrations/adapters/slack.js.map +1 -1
- package/dist/integrations/index.d.ts +1 -1
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/index.js +1 -1
- package/dist/integrations/index.js.map +1 -1
- package/dist/localization/default-messages.d.ts +4 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +5 -1
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/mcp-client/oauth-routes.d.ts +5 -0
- package/dist/mcp-client/oauth-routes.d.ts.map +1 -1
- package/dist/mcp-client/oauth-routes.js +53 -14
- package/dist/mcp-client/oauth-routes.js.map +1 -1
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +12 -12
- package/dist/provider-api/actions/provider-api.d.ts +11 -11
- package/dist/scripts/call-agent.d.ts.map +1 -1
- package/dist/scripts/call-agent.js +5 -1
- package/dist/scripts/call-agent.js.map +1 -1
- package/dist/secrets/routes.d.ts +6 -6
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/realtime-voice.d.ts.map +1 -1
- package/dist/server/realtime-voice.js +2 -2
- package/dist/server/realtime-voice.js.map +1 -1
- package/dist/styles/agent-native.css +0 -24
- package/dist/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/dist/templates/chat/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +22 -2
- package/dist/templates/chat/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/dist/templates/chat/app/components/ui/toolkit-provider.tsx +6 -1
- package/dist/templates/chat/app/design-system.ts +3 -0
- package/dist/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/dist/templates/default/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +22 -2
- package/dist/templates/default/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/dist/templates/default/app/components/ui/toolkit-provider.tsx +10 -0
- package/dist/templates/default/app/design-system.ts +3 -0
- package/dist/templates/default/app/root.tsx +5 -2
- package/dist/templates/default/package.json +1 -0
- package/dist/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/dist/templates/headless/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/dist/templates/workspace-core/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +22 -2
- package/dist/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +7 -5
- package/dist/terminal/cli-registry.js +1 -1
- package/dist/terminal/cli-registry.js.map +1 -1
- package/dist/vite/client.d.ts +11 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +144 -2
- package/dist/vite/client.js.map +1 -1
- package/docs/content/custom-design-system.mdx +445 -0
- package/docs/content/toolkit-ui.mdx +16 -0
- package/package.json +2 -2
- package/src/a2a/client.ts +32 -10
- package/src/a2a/types.ts +1 -0
- package/src/agent/types.ts +1 -1
- package/src/cli/index.ts +18 -10
- package/src/cli/multi-frontier-runs.ts +5 -3
- package/src/cli/templates-meta.ts +0 -12
- package/src/cli/workspace-dev.ts +1 -1
- package/src/client/AgentPanel.tsx +99 -108
- package/src/client/AssistantChat.tsx +30 -13
- package/src/client/CommandMenu.tsx +68 -178
- package/src/client/RunStuckBanner.tsx +39 -47
- package/src/client/agent-chat-adapter.ts +3 -1
- package/src/client/app-providers.tsx +1 -1
- package/src/client/chat/action-chat-ui-surface.tsx +32 -0
- package/src/client/chat/message-components.tsx +169 -18
- package/src/client/chat/tool-call-display.tsx +50 -14
- package/src/client/chat/widgets/InlineExtensionWidget.tsx +13 -40
- package/src/client/chat/widgets/builtin-tool-renderers.tsx +7 -3
- package/src/client/components/ui/message-scroller.tsx +15 -1
- package/src/client/conversation/AgentConversation.tsx +12 -1
- package/src/client/error-capture.ts +2 -6
- package/src/client/i18n.tsx +22 -0
- package/src/client/index.ts +17 -0
- package/src/client/org/TeamPage.tsx +257 -153
- package/src/client/progress/RunsTray.tsx +89 -88
- package/src/client/resources/McpConnectionSuggestion.tsx +25 -16
- package/src/client/resources/McpIntegrationDialog.tsx +34 -13
- package/src/client/resources/ResourcesPanel.tsx +5 -1
- package/src/client/resources/mcp-integration-catalog.ts +20 -17
- package/src/client/resources/mcp-integration-logos.ts +2 -2
- package/src/client/route-chunk-recovery.ts +5 -3
- package/src/client/session-replay.ts +3 -3
- package/src/client/settings/DemoModeSection.tsx +6 -18
- package/src/client/settings/SecretsSection.tsx +97 -52
- package/src/client/settings/SettingsPanel.tsx +217 -252
- package/src/client/settings/SettingsTabsPage.tsx +23 -2
- package/src/client/settings/VoiceTranscriptionSection.tsx +7 -18
- package/src/client/settings/index.ts +7 -0
- package/src/client/settings/useSettingsPanelController.ts +155 -0
- package/src/client/setup-connections/BuilderConnectCard.tsx +116 -51
- package/src/client/setup-connections/index.ts +10 -0
- package/src/client/setup-connections/useBuilderConnectCardController.ts +82 -0
- package/src/client/sharing/ShareButton.tsx +64 -586
- package/src/client/sharing/ShareDialog.tsx +299 -633
- package/src/client/sharing/index.ts +42 -0
- package/src/client/sharing/share-controller-helpers.ts +318 -0
- package/src/client/sharing/useShareButtonController.ts +600 -0
- package/src/client/sharing/useShareDialogController.ts +559 -0
- package/src/client/sse-event-processor.ts +23 -0
- package/src/client/tool-display.ts +71 -0
- package/src/client/transcription/use-live-transcription.ts +64 -45
- package/src/client/use-agent-engine-configured.ts +12 -19
- package/src/client/use-chat-threads.ts +33 -12
- package/src/deploy/build.ts +2 -1
- package/src/guards/db-tool-scoping.ts +1 -1
- package/src/integrations/adapters/slack.ts +84 -5
- package/src/integrations/index.ts +5 -1
- package/src/localization/default-messages.ts +6 -1
- package/src/mcp-client/oauth-routes.ts +61 -14
- package/src/scripts/call-agent.ts +5 -1
- package/src/server/realtime-voice.ts +5 -2
- package/src/styles/agent-native.css +0 -24
- package/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/src/templates/chat/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +22 -2
- package/src/templates/chat/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/src/templates/chat/app/components/ui/toolkit-provider.tsx +6 -1
- package/src/templates/chat/app/design-system.ts +3 -0
- package/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/src/templates/default/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/src/templates/default/.agents/skills/frontend-design/SKILL.md +22 -2
- package/src/templates/default/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/src/templates/default/app/components/ui/toolkit-provider.tsx +10 -0
- package/src/templates/default/app/design-system.ts +3 -0
- package/src/templates/default/app/root.tsx +5 -2
- package/src/templates/default/package.json +1 -0
- package/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/src/templates/headless/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/src/templates/workspace-core/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +22 -2
- package/src/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +7 -5
- package/src/terminal/cli-registry.ts +1 -1
- package/src/vite/client.ts +205 -1
- package/corpus/templates/analytics/app/components/ui/calendar.tsx +0 -70
- package/corpus/templates/analytics/app/components/ui/chart.tsx +0 -386
- package/corpus/templates/calendar/app/components/ui/sonner.tsx +0 -58
- package/corpus/templates/crm/.agents/skills/agent-native-docs/SKILL.md +0 -115
- package/corpus/templates/crm/.agents/skills/agent-native-toolkit/SKILL.md +0 -142
- package/corpus/templates/crm/.agents/skills/crm/SKILL.md +0 -128
- package/corpus/templates/crm/.agents/skills/customizing-agent-native/SKILL.md +0 -145
- package/corpus/templates/crm/.agents/skills/feature-flags/SKILL.md +0 -169
- package/corpus/templates/crm/.agents/skills/upgrade-agent-native/SKILL.md +0 -100
- package/corpus/templates/crm/.env.example +0 -5
- package/corpus/templates/crm/AGENTS.md +0 -120
- package/corpus/templates/crm/CHANGELOG.md +0 -1
- package/corpus/templates/crm/DEVELOPING.md +0 -66
- package/corpus/templates/crm/README.md +0 -106
- package/corpus/templates/crm/_gitignore +0 -12
- package/corpus/templates/crm/actions/_crm-action-utils.ts +0 -87
- package/corpus/templates/crm/actions/_crm-dashboard.ts +0 -69
- package/corpus/templates/crm/actions/_crm-data-program-actions.ts +0 -15
- package/corpus/templates/crm/actions/_crm-signal-utils.ts +0 -79
- package/corpus/templates/crm/actions/apply-crm-proposals.ts +0 -203
- package/corpus/templates/crm/actions/attach-call-evidence.ts +0 -170
- package/corpus/templates/crm/actions/configure-crm-connection.ts +0 -126
- package/corpus/templates/crm/actions/configure-native-crm.ts +0 -44
- package/corpus/templates/crm/actions/create-crm-record.ts +0 -148
- package/corpus/templates/crm/actions/create-crm-signal-tracker.ts +0 -58
- package/corpus/templates/crm/actions/delete-staged-dataset.ts +0 -14
- package/corpus/templates/crm/actions/get-crm-automation-recipe.ts +0 -36
- package/corpus/templates/crm/actions/get-crm-dashboard-panel.ts +0 -35
- package/corpus/templates/crm/actions/get-crm-dashboard.ts +0 -14
- package/corpus/templates/crm/actions/get-crm-overview.ts +0 -13
- package/corpus/templates/crm/actions/get-crm-pipeline-data.ts +0 -61
- package/corpus/templates/crm/actions/get-crm-record.ts +0 -75
- package/corpus/templates/crm/actions/install-crm-pipeline-dashboard.ts +0 -81
- package/corpus/templates/crm/actions/list-crm-dashboard-revisions.ts +0 -15
- package/corpus/templates/crm/actions/list-crm-dashboards.ts +0 -15
- package/corpus/templates/crm/actions/list-crm-proposals.ts +0 -31
- package/corpus/templates/crm/actions/list-crm-records.ts +0 -79
- package/corpus/templates/crm/actions/list-crm-saved-views.ts +0 -15
- package/corpus/templates/crm/actions/list-crm-signal-hits.ts +0 -43
- package/corpus/templates/crm/actions/list-crm-signal-trackers.ts +0 -32
- package/corpus/templates/crm/actions/list-crm-tasks.ts +0 -22
- package/corpus/templates/crm/actions/list-staged-datasets.ts +0 -14
- package/corpus/templates/crm/actions/list-workspace-connections.ts +0 -47
- package/corpus/templates/crm/actions/manage-crm-signal-tracker.ts +0 -87
- package/corpus/templates/crm/actions/manage-crm-task.ts +0 -132
- package/corpus/templates/crm/actions/navigate.ts +0 -63
- package/corpus/templates/crm/actions/provider-api-catalog.ts +0 -22
- package/corpus/templates/crm/actions/provider-api-docs.ts +0 -54
- package/corpus/templates/crm/actions/provider-api-request.ts +0 -92
- package/corpus/templates/crm/actions/query-staged-dataset.ts +0 -44
- package/corpus/templates/crm/actions/record-crm-call-insight.ts +0 -160
- package/corpus/templates/crm/actions/record-crm-smart-signal.ts +0 -150
- package/corpus/templates/crm/actions/restore-crm-dashboard-revision.ts +0 -23
- package/corpus/templates/crm/actions/review-crm-signal.ts +0 -31
- package/corpus/templates/crm/actions/run-crm-saved-view-program.ts +0 -103
- package/corpus/templates/crm/actions/run-crm-signal-trackers.ts +0 -275
- package/corpus/templates/crm/actions/run.ts +0 -7
- package/corpus/templates/crm/actions/save-crm-dashboard.ts +0 -51
- package/corpus/templates/crm/actions/save-crm-saved-view.ts +0 -119
- package/corpus/templates/crm/actions/sync-crm.ts +0 -146
- package/corpus/templates/crm/actions/update-crm-record.ts +0 -510
- package/corpus/templates/crm/actions/view-screen.ts +0 -218
- package/corpus/templates/crm/agent-native.app-skill.json +0 -58
- package/corpus/templates/crm/app/components/crm/CreateCrmRecordDialog.tsx +0 -158
- package/corpus/templates/crm/app/components/crm/CrmDashboardPanel.tsx +0 -83
- package/corpus/templates/crm/app/components/crm/CrmSignalsPanel.tsx +0 -225
- package/corpus/templates/crm/app/components/crm/IntelligenceSettings.tsx +0 -413
- package/corpus/templates/crm/app/components/crm/RecordActions.tsx +0 -510
- package/corpus/templates/crm/app/components/crm/RecordGrid.tsx +0 -134
- package/corpus/templates/crm/app/components/crm/RecordWorkspace.tsx +0 -367
- package/corpus/templates/crm/app/components/crm/SavedViewDataProgram.tsx +0 -92
- package/corpus/templates/crm/app/components/crm/Surface.tsx +0 -96
- package/corpus/templates/crm/app/components/crm/WorkOverview.tsx +0 -180
- package/corpus/templates/crm/app/components/layout/CrmLayout.tsx +0 -112
- package/corpus/templates/crm/app/components/layout/CrmSidebar.tsx +0 -84
- package/corpus/templates/crm/app/entry.client.tsx +0 -16
- package/corpus/templates/crm/app/entry.server.tsx +0 -10
- package/corpus/templates/crm/app/global.css +0 -167
- package/corpus/templates/crm/app/hooks/use-navigation-state.ts +0 -60
- package/corpus/templates/crm/app/i18n/en-US.ts +0 -89
- package/corpus/templates/crm/app/i18n/index.ts +0 -34
- package/corpus/templates/crm/app/lib/dashboard.ts +0 -13
- package/corpus/templates/crm/app/lib/navigation.ts +0 -54
- package/corpus/templates/crm/app/lib/tab-id.ts +0 -1
- package/corpus/templates/crm/app/lib/types.ts +0 -172
- package/corpus/templates/crm/app/lib/utils.ts +0 -1
- package/corpus/templates/crm/app/root.tsx +0 -88
- package/corpus/templates/crm/app/routes/_index.tsx +0 -26
- package/corpus/templates/crm/app/routes/accounts.tsx +0 -41
- package/corpus/templates/crm/app/routes/agent.tsx +0 -5
- package/corpus/templates/crm/app/routes/ask.tsx +0 -53
- package/corpus/templates/crm/app/routes/dashboard.tsx +0 -118
- package/corpus/templates/crm/app/routes/opportunities.tsx +0 -41
- package/corpus/templates/crm/app/routes/people.tsx +0 -41
- package/corpus/templates/crm/app/routes/proposals.tsx +0 -266
- package/corpus/templates/crm/app/routes/records.$recordId.tsx +0 -35
- package/corpus/templates/crm/app/routes/settings.tsx +0 -63
- package/corpus/templates/crm/app/routes/setup.tsx +0 -308
- package/corpus/templates/crm/app/routes/tasks.tsx +0 -252
- package/corpus/templates/crm/app/routes/views.tsx +0 -333
- package/corpus/templates/crm/app/routes.ts +0 -17
- package/corpus/templates/crm/app/vite-env.d.ts +0 -6
- package/corpus/templates/crm/changelog/2026-07-21-agent-native-crm.md +0 -6
- package/corpus/templates/crm/changelog/2026-07-21-clips-call-evidence-review-recipe.md +0 -6
- package/corpus/templates/crm/changelog/2026-07-21-crm-can-now-find-and-review-evidence-grounded-call-signals-w.md +0 -6
- package/corpus/templates/crm/changelog/2026-07-21-crm-can-now-manage-keyword-and-smart-call-signal-trackers-fr.md +0 -6
- package/corpus/templates/crm/changelog/2026-07-21-delegated-local-crm-automation.md +0 -6
- package/corpus/templates/crm/changelog/2026-07-21-native-sql.md +0 -6
- package/corpus/templates/crm/changelog/2026-07-21-pipeline-dashboard.md +0 -6
- package/corpus/templates/crm/changelog/2026-07-21-pipeline-dashboards-now-install-correctly-from-the-crm-actio.md +0 -6
- package/corpus/templates/crm/changelog/2026-07-21-salesforce-connection.md +0 -6
- package/corpus/templates/crm/changelog/2026-07-22-crm-field-validation-now-explains-which-fields-cannot-be-edi.md +0 -6
- package/corpus/templates/crm/changelog/2026-07-22-fixed-hubspot-contact-syncs-missing-records-updated-after-th.md +0 -6
- package/corpus/templates/crm/changelog/2026-07-22-fixed-pipeline-dashboard-panels-so-their-opportunity-data-lo.md +0 -6
- package/corpus/templates/crm/changelog/2026-07-22-full-page-chat-keeps-the-active-conversation-when-moving-to-.md +0 -6
- package/corpus/templates/crm/components.json +0 -20
- package/corpus/templates/crm/docs/architecture/crm-contract.md +0 -180
- package/corpus/templates/crm/learnings.defaults.md +0 -5
- package/corpus/templates/crm/package.json +0 -59
- package/corpus/templates/crm/public/favicon.svg +0 -1
- package/corpus/templates/crm/public/icon-180.svg +0 -1
- package/corpus/templates/crm/public/manifest.json +0 -11
- package/corpus/templates/crm/react-router.config.ts +0 -7
- package/corpus/templates/crm/server/crm/adapter.ts +0 -32
- package/corpus/templates/crm/server/crm/crm-field-firewall.ts +0 -64
- package/corpus/templates/crm/server/crm/crm-mirror.ts +0 -711
- package/corpus/templates/crm/server/crm/hubspot-adapter.ts +0 -1146
- package/corpus/templates/crm/server/crm/native-adapter.ts +0 -1715
- package/corpus/templates/crm/server/crm/read-through.ts +0 -207
- package/corpus/templates/crm/server/crm/salesforce-adapter.ts +0 -1255
- package/corpus/templates/crm/server/db/crm-store.ts +0 -1170
- package/corpus/templates/crm/server/db/index.ts +0 -169
- package/corpus/templates/crm/server/db/schema.ts +0 -441
- package/corpus/templates/crm/server/lib/intelligence/default-detectors.ts +0 -65
- package/corpus/templates/crm/server/lib/intelligence/evidence.ts +0 -105
- package/corpus/templates/crm/server/lib/intelligence/keyword-detector.ts +0 -100
- package/corpus/templates/crm/server/lib/intelligence/smart-detector.ts +0 -144
- package/corpus/templates/crm/server/lib/intelligence/summary.ts +0 -141
- package/corpus/templates/crm/server/lib/provider-api.ts +0 -64
- package/corpus/templates/crm/server/middleware/auth.ts +0 -4
- package/corpus/templates/crm/server/plugins/agent-chat.ts +0 -68
- package/corpus/templates/crm/server/plugins/auth.ts +0 -14
- package/corpus/templates/crm/server/plugins/core-routes.ts +0 -17
- package/corpus/templates/crm/server/plugins/db.ts +0 -454
- package/corpus/templates/crm/server/routes/[...page].get.ts +0 -5
- package/corpus/templates/crm/shared/crm-automation-recipes.ts +0 -132
- package/corpus/templates/crm/shared/crm-contract.ts +0 -254
- package/corpus/templates/crm/shared/crm-sales-config.ts +0 -63
- package/corpus/templates/crm/ssr-entry.ts +0 -11
- package/corpus/templates/crm/tsconfig.json +0 -24
- package/corpus/templates/crm/vite.config.ts +0 -15
- package/corpus/templates/crm/vitest.config.ts +0 -5
- package/corpus/templates/forms/app/components/ui/calendar.tsx +0 -214
- package/corpus/templates/forms/app/components/ui/chart.tsx +0 -379
- package/corpus/templates/forms/app/components/ui/command.tsx +0 -153
- package/corpus/templates/forms/app/components/ui/context-menu.tsx +0 -198
- package/corpus/templates/forms/app/components/ui/menubar.tsx +0 -254
- package/corpus/templates/macros/app/components/ui/menubar.tsx +0 -238
- package/corpus/templates/macros/app/components/ui/progress.tsx +0 -26
- package/corpus/templates/mail/app/components/ui/calendar.tsx +0 -211
- package/corpus/templates/mail/app/components/ui/chart.tsx +0 -379
- package/corpus/templates/mail/app/components/ui/command.tsx +0 -153
- package/corpus/templates/mail/app/components/ui/context-menu.tsx +0 -198
- package/corpus/templates/mail/app/components/ui/menubar.tsx +0 -254
- package/corpus/templates/tasks/app/components/ui/accordion.tsx +0 -56
- package/corpus/templates/tasks/app/components/ui/aspect-ratio.tsx +0 -5
- package/corpus/templates/tasks/app/components/ui/breadcrumb.tsx +0 -115
- package/corpus/templates/tasks/app/components/ui/calendar.tsx +0 -70
- package/corpus/templates/tasks/app/components/ui/carousel.tsx +0 -260
- package/corpus/templates/tasks/app/components/ui/chart.tsx +0 -379
- package/corpus/templates/tasks/app/components/ui/form.tsx +0 -177
- package/corpus/templates/tasks/app/components/ui/hover-card.tsx +0 -27
- package/corpus/templates/tasks/app/components/ui/input-otp.tsx +0 -69
- package/corpus/templates/tasks/app/components/ui/menubar.tsx +0 -254
- package/corpus/templates/tasks/app/components/ui/navigation-menu.tsx +0 -128
- package/corpus/templates/tasks/app/components/ui/pagination.tsx +0 -121
- package/corpus/templates/tasks/app/components/ui/resizable.tsx +0 -43
- package/corpus/templates/tasks/app/components/ui/sidebar.tsx +0 -782
- package/corpus/templates/tasks/app/components/ui/toggle.tsx +0 -43
package/src/vite/client.ts
CHANGED
|
@@ -5,6 +5,10 @@ import { createRequire, syncBuiltinESMExports } from "module";
|
|
|
5
5
|
import path from "path";
|
|
6
6
|
import { fileURLToPath } from "url";
|
|
7
7
|
|
|
8
|
+
import {
|
|
9
|
+
renderDesignSystemThemeCss,
|
|
10
|
+
type DesignSystemTheme,
|
|
11
|
+
} from "@agent-native/toolkit/design-system/theme";
|
|
8
12
|
import type {
|
|
9
13
|
ConfigEnv,
|
|
10
14
|
HotUpdateOptions,
|
|
@@ -728,7 +732,6 @@ function findCorePackageRoot(cwd: string): string | null {
|
|
|
728
732
|
const candidates = [
|
|
729
733
|
path.resolve(cwd, "../../packages/core"), // templates/<name>/
|
|
730
734
|
path.resolve(cwd, "../core"), // packages/<name>/
|
|
731
|
-
path.resolve(cwd, "node_modules/@agent-native/core"),
|
|
732
735
|
];
|
|
733
736
|
for (const candidate of candidates) {
|
|
734
737
|
try {
|
|
@@ -1342,6 +1345,8 @@ export interface ClientConfigOptions {
|
|
|
1342
1345
|
logLevel?: UserConfig["logLevel"];
|
|
1343
1346
|
/** Additional Vite plugins */
|
|
1344
1347
|
plugins?: any[];
|
|
1348
|
+
/** Static design tokens emitted into the client build. */
|
|
1349
|
+
designSystemTheme?: DesignSystemTheme;
|
|
1345
1350
|
/** Nitro plugin options (preset, srcDir, etc) */
|
|
1346
1351
|
nitro?: NitroOptions;
|
|
1347
1352
|
/** Override resolve aliases */
|
|
@@ -2309,6 +2314,165 @@ function portExposer(): Plugin {
|
|
|
2309
2314
|
};
|
|
2310
2315
|
}
|
|
2311
2316
|
|
|
2317
|
+
function isNitroEnvironmentUnavailable(error: unknown): boolean {
|
|
2318
|
+
const candidate = error as {
|
|
2319
|
+
name?: unknown;
|
|
2320
|
+
status?: unknown;
|
|
2321
|
+
statusCode?: unknown;
|
|
2322
|
+
message?: unknown;
|
|
2323
|
+
};
|
|
2324
|
+
return (
|
|
2325
|
+
candidate?.name === "NitroViteError" &&
|
|
2326
|
+
(candidate.status === 503 || candidate.statusCode === 503) &&
|
|
2327
|
+
typeof candidate.message === "string" &&
|
|
2328
|
+
/Vite environment .+ is unavailable/.test(candidate.message)
|
|
2329
|
+
);
|
|
2330
|
+
}
|
|
2331
|
+
|
|
2332
|
+
type NitroModuleNode = {
|
|
2333
|
+
id: string | null;
|
|
2334
|
+
ssrError?: Error | null;
|
|
2335
|
+
transformResult: unknown | null;
|
|
2336
|
+
};
|
|
2337
|
+
|
|
2338
|
+
type NitroModuleGraph = {
|
|
2339
|
+
idToModuleMap: Map<string, NitroModuleNode>;
|
|
2340
|
+
};
|
|
2341
|
+
|
|
2342
|
+
const NITRO_STARTUP_SETTLE_MS = 1_000;
|
|
2343
|
+
const NITRO_STARTUP_TIMEOUT_MS = 30_000;
|
|
2344
|
+
|
|
2345
|
+
function nitroModuleGraphSignature(environment: unknown): string | null {
|
|
2346
|
+
const graph = (environment as { moduleGraph?: NitroModuleGraph } | undefined)
|
|
2347
|
+
?.moduleGraph;
|
|
2348
|
+
if (!graph) return null;
|
|
2349
|
+
|
|
2350
|
+
const modules = [...graph.idToModuleMap.values()];
|
|
2351
|
+
const entry = modules.find((module) =>
|
|
2352
|
+
module.id
|
|
2353
|
+
?.replaceAll("\\", "/")
|
|
2354
|
+
.endsWith("/nitro/dist/runtime/internal/vite/dev-entry.mjs"),
|
|
2355
|
+
);
|
|
2356
|
+
if (!entry?.transformResult && !entry?.ssrError) return null;
|
|
2357
|
+
|
|
2358
|
+
let transformed = 0;
|
|
2359
|
+
let errors = 0;
|
|
2360
|
+
for (const module of modules) {
|
|
2361
|
+
if (module.transformResult) transformed += 1;
|
|
2362
|
+
if (module.ssrError) errors += 1;
|
|
2363
|
+
}
|
|
2364
|
+
return `${modules.length}:${transformed}:${errors}`;
|
|
2365
|
+
}
|
|
2366
|
+
|
|
2367
|
+
function isHtmlDocumentRequest(req: IncomingMessage): boolean {
|
|
2368
|
+
return (
|
|
2369
|
+
(req.method === "GET" || req.method === "HEAD") &&
|
|
2370
|
+
(req.headers.accept ?? "").includes("text/html")
|
|
2371
|
+
);
|
|
2372
|
+
}
|
|
2373
|
+
|
|
2374
|
+
function sendNitroStartingResponse(
|
|
2375
|
+
req: IncomingMessage,
|
|
2376
|
+
res: ServerResponse,
|
|
2377
|
+
): void {
|
|
2378
|
+
res.statusCode = 503;
|
|
2379
|
+
res.setHeader("cache-control", "no-store");
|
|
2380
|
+
res.setHeader("content-type", "text/html; charset=utf-8");
|
|
2381
|
+
res.setHeader("retry-after", "1");
|
|
2382
|
+
if (req.method === "HEAD") {
|
|
2383
|
+
res.end();
|
|
2384
|
+
return;
|
|
2385
|
+
}
|
|
2386
|
+
res.end(
|
|
2387
|
+
'<!doctype html><html><head><meta charset="utf-8"><meta http-equiv="refresh" content="0.25"><title>Starting…</title></head><body></body></html>',
|
|
2388
|
+
);
|
|
2389
|
+
}
|
|
2390
|
+
|
|
2391
|
+
function nitroStartupGate(
|
|
2392
|
+
options: {
|
|
2393
|
+
now?: () => number;
|
|
2394
|
+
settleMs?: number;
|
|
2395
|
+
timeoutMs?: number;
|
|
2396
|
+
} = {},
|
|
2397
|
+
): Plugin {
|
|
2398
|
+
return {
|
|
2399
|
+
name: "agent-native-nitro-startup-gate",
|
|
2400
|
+
apply: "serve",
|
|
2401
|
+
enforce: "pre",
|
|
2402
|
+
configureServer(server) {
|
|
2403
|
+
const now = options.now ?? Date.now;
|
|
2404
|
+
const settleMs = options.settleMs ?? NITRO_STARTUP_SETTLE_MS;
|
|
2405
|
+
const timeoutMs = options.timeoutMs ?? NITRO_STARTUP_TIMEOUT_MS;
|
|
2406
|
+
const startedAt = now();
|
|
2407
|
+
let graphSignature: string | null = null;
|
|
2408
|
+
let graphStableAt: number | undefined;
|
|
2409
|
+
let startupComplete = false;
|
|
2410
|
+
|
|
2411
|
+
server.middlewares.use((req, res, next) => {
|
|
2412
|
+
if (startupComplete || !isHtmlDocumentRequest(req)) {
|
|
2413
|
+
next();
|
|
2414
|
+
return;
|
|
2415
|
+
}
|
|
2416
|
+
|
|
2417
|
+
const timestamp = now();
|
|
2418
|
+
if (timestamp - startedAt >= timeoutMs) {
|
|
2419
|
+
startupComplete = true;
|
|
2420
|
+
next();
|
|
2421
|
+
return;
|
|
2422
|
+
}
|
|
2423
|
+
|
|
2424
|
+
const nextGraphSignature = nitroModuleGraphSignature(
|
|
2425
|
+
server.environments?.nitro,
|
|
2426
|
+
);
|
|
2427
|
+
if (nextGraphSignature) {
|
|
2428
|
+
if (nextGraphSignature !== graphSignature) {
|
|
2429
|
+
graphSignature = nextGraphSignature;
|
|
2430
|
+
graphStableAt = timestamp;
|
|
2431
|
+
} else if (
|
|
2432
|
+
graphStableAt !== undefined &&
|
|
2433
|
+
timestamp - graphStableAt >= settleMs
|
|
2434
|
+
) {
|
|
2435
|
+
startupComplete = true;
|
|
2436
|
+
next();
|
|
2437
|
+
return;
|
|
2438
|
+
}
|
|
2439
|
+
} else {
|
|
2440
|
+
graphSignature = null;
|
|
2441
|
+
graphStableAt = undefined;
|
|
2442
|
+
}
|
|
2443
|
+
|
|
2444
|
+
sendNitroStartingResponse(req, res);
|
|
2445
|
+
});
|
|
2446
|
+
},
|
|
2447
|
+
};
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
function nitroStartupRecovery(): Plugin {
|
|
2451
|
+
return {
|
|
2452
|
+
name: "agent-native-nitro-startup-recovery",
|
|
2453
|
+
apply: "serve",
|
|
2454
|
+
configureServer(server) {
|
|
2455
|
+
server.middlewares.use(function nitroStartupErrorRecovery(
|
|
2456
|
+
error: unknown,
|
|
2457
|
+
req: IncomingMessage,
|
|
2458
|
+
res: ServerResponse,
|
|
2459
|
+
next: (error?: unknown) => void,
|
|
2460
|
+
) {
|
|
2461
|
+
if (
|
|
2462
|
+
!isNitroEnvironmentUnavailable(error) ||
|
|
2463
|
+
!isHtmlDocumentRequest(req) ||
|
|
2464
|
+
res.headersSent
|
|
2465
|
+
) {
|
|
2466
|
+
next(error);
|
|
2467
|
+
return;
|
|
2468
|
+
}
|
|
2469
|
+
|
|
2470
|
+
sendNitroStartingResponse(req, res);
|
|
2471
|
+
});
|
|
2472
|
+
},
|
|
2473
|
+
};
|
|
2474
|
+
}
|
|
2475
|
+
|
|
2312
2476
|
/**
|
|
2313
2477
|
* Silence benign connection-reset noise from Vite's dev middleware.
|
|
2314
2478
|
* Fires when a browser closes/reloads/navigates mid-request — the peer has
|
|
@@ -2459,6 +2623,38 @@ function createTailwindPlugin(options: Pick<ClientConfigOptions, "tailwind">) {
|
|
|
2459
2623
|
}
|
|
2460
2624
|
}
|
|
2461
2625
|
|
|
2626
|
+
const DESIGN_SYSTEM_THEME_MODULE_ID = "virtual:agent-native-theme.css";
|
|
2627
|
+
const RESOLVED_DESIGN_SYSTEM_THEME_MODULE_ID = `\0${DESIGN_SYSTEM_THEME_MODULE_ID}`;
|
|
2628
|
+
|
|
2629
|
+
function createDesignSystemThemePlugin(
|
|
2630
|
+
theme: DesignSystemTheme | undefined,
|
|
2631
|
+
): Plugin | null {
|
|
2632
|
+
if (!theme) return null;
|
|
2633
|
+
const css = renderDesignSystemThemeCss(theme);
|
|
2634
|
+
|
|
2635
|
+
return {
|
|
2636
|
+
name: "agent-native-design-system-theme",
|
|
2637
|
+
resolveId(id) {
|
|
2638
|
+
if (id === DESIGN_SYSTEM_THEME_MODULE_ID) {
|
|
2639
|
+
return RESOLVED_DESIGN_SYSTEM_THEME_MODULE_ID;
|
|
2640
|
+
}
|
|
2641
|
+
},
|
|
2642
|
+
load(id) {
|
|
2643
|
+
if (id === RESOLVED_DESIGN_SYSTEM_THEME_MODULE_ID) return css;
|
|
2644
|
+
},
|
|
2645
|
+
transformIndexHtml() {
|
|
2646
|
+
return [
|
|
2647
|
+
{
|
|
2648
|
+
tag: "style",
|
|
2649
|
+
attrs: { "data-agent-native-theme": "" },
|
|
2650
|
+
children: css,
|
|
2651
|
+
injectTo: "head",
|
|
2652
|
+
},
|
|
2653
|
+
];
|
|
2654
|
+
},
|
|
2655
|
+
};
|
|
2656
|
+
}
|
|
2657
|
+
|
|
2462
2658
|
function getConfiguredAppBasePath(): { appBasePath: string; base: string } {
|
|
2463
2659
|
// APP_BASE_PATH lets this app be mounted under a prefix (e.g. "/mail") as
|
|
2464
2660
|
// part of a unified workspace deploy. Defaults to "/" for standalone apps.
|
|
@@ -2655,6 +2851,7 @@ function createAgentNativePlugins(
|
|
|
2655
2851
|
embedDevFrameHeaders(),
|
|
2656
2852
|
baseRedirectGuard(),
|
|
2657
2853
|
portExposer(),
|
|
2854
|
+
nitroStartupGate(),
|
|
2658
2855
|
silenceConnectionResets(),
|
|
2659
2856
|
rolldownInputFix(),
|
|
2660
2857
|
// Nitro Vite plugin for dev-mode API route serving and HMR.
|
|
@@ -2664,7 +2861,11 @@ function createAgentNativePlugins(
|
|
|
2664
2861
|
: includeNitro
|
|
2665
2862
|
? [nitroPlugin]
|
|
2666
2863
|
: []),
|
|
2864
|
+
// Nitro can reject the first document request while its Vite environment
|
|
2865
|
+
// is still importing. This error handler must follow Nitro's middleware.
|
|
2866
|
+
nitroStartupRecovery(),
|
|
2667
2867
|
includeReactTransform ? createReactTransformPlugin() : null,
|
|
2868
|
+
createDesignSystemThemePlugin(options.designSystemTheme),
|
|
2668
2869
|
createTailwindPlugin(options),
|
|
2669
2870
|
].filter(Boolean);
|
|
2670
2871
|
}
|
|
@@ -3057,5 +3258,8 @@ export {
|
|
|
3057
3258
|
getDefaultOptimizeDeps as _getDefaultOptimizeDeps,
|
|
3058
3259
|
findCorePackageRoot as _findCorePackageRoot,
|
|
3059
3260
|
getReactRouterAliases as _getReactRouterAliases,
|
|
3261
|
+
nitroStartupGate as _nitroStartupGate,
|
|
3262
|
+
nitroStartupRecovery as _nitroStartupRecovery,
|
|
3263
|
+
nitroModuleGraphSignature as _nitroModuleGraphSignature,
|
|
3060
3264
|
debounceNitroFullReloadHotUpdate as _debounceNitroFullReloadHotUpdate,
|
|
3061
3265
|
};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { IconChevronLeft, IconChevronRight } from "@tabler/icons-react";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { DayPicker } from "react-day-picker";
|
|
4
|
-
|
|
5
|
-
import { buttonVariants } from "@/components/ui/button";
|
|
6
|
-
import { cn } from "@/lib/utils";
|
|
7
|
-
|
|
8
|
-
export type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
|
9
|
-
|
|
10
|
-
function Calendar({
|
|
11
|
-
className,
|
|
12
|
-
classNames,
|
|
13
|
-
showOutsideDays = true,
|
|
14
|
-
...props
|
|
15
|
-
}: CalendarProps) {
|
|
16
|
-
return (
|
|
17
|
-
<DayPicker
|
|
18
|
-
showOutsideDays={showOutsideDays}
|
|
19
|
-
className={cn("p-3", className)}
|
|
20
|
-
classNames={{
|
|
21
|
-
months: "flex flex-col sm:flex-row gap-4",
|
|
22
|
-
month: "flex flex-col gap-4",
|
|
23
|
-
month_caption: "flex justify-center pt-1 relative items-center h-7",
|
|
24
|
-
caption_label: "text-sm font-medium",
|
|
25
|
-
nav: "flex items-center gap-1",
|
|
26
|
-
button_previous: cn(
|
|
27
|
-
buttonVariants({ variant: "outline" }),
|
|
28
|
-
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100 absolute start-1 top-1 z-10",
|
|
29
|
-
),
|
|
30
|
-
button_next: cn(
|
|
31
|
-
buttonVariants({ variant: "outline" }),
|
|
32
|
-
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100 absolute end-1 top-1 z-10",
|
|
33
|
-
),
|
|
34
|
-
month_grid: "w-full border-collapse",
|
|
35
|
-
weekdays: "flex",
|
|
36
|
-
weekday:
|
|
37
|
-
"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem] text-center",
|
|
38
|
-
week: "flex w-full mt-2",
|
|
39
|
-
day: "h-9 w-9 text-center text-sm p-0 relative",
|
|
40
|
-
day_button: cn(
|
|
41
|
-
buttonVariants({ variant: "ghost" }),
|
|
42
|
-
"h-9 w-9 p-0 font-normal aria-selected:opacity-100",
|
|
43
|
-
),
|
|
44
|
-
selected:
|
|
45
|
-
"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground rounded-md",
|
|
46
|
-
today: "bg-accent text-accent-foreground rounded-md",
|
|
47
|
-
outside: "text-muted-foreground opacity-50",
|
|
48
|
-
disabled: "text-muted-foreground opacity-50",
|
|
49
|
-
hidden: "invisible",
|
|
50
|
-
range_start: "rounded-s-md",
|
|
51
|
-
range_end: "rounded-e-md",
|
|
52
|
-
range_middle:
|
|
53
|
-
"aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
54
|
-
...classNames,
|
|
55
|
-
}}
|
|
56
|
-
components={{
|
|
57
|
-
Chevron: (props) => {
|
|
58
|
-
if (props.orientation === "left") {
|
|
59
|
-
return <IconChevronLeft className="h-4 w-4 rtl:-scale-x-100" />;
|
|
60
|
-
}
|
|
61
|
-
return <IconChevronRight className="h-4 w-4 rtl:-scale-x-100" />;
|
|
62
|
-
},
|
|
63
|
-
}}
|
|
64
|
-
{...props}
|
|
65
|
-
/>
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
Calendar.displayName = "Calendar";
|
|
69
|
-
|
|
70
|
-
export { Calendar };
|
|
@@ -1,386 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as RechartsPrimitive from "recharts";
|
|
3
|
-
|
|
4
|
-
import { useChartTooltipFlip } from "@/hooks/use-chart-tooltip-flip";
|
|
5
|
-
import { cn } from "@/lib/utils";
|
|
6
|
-
|
|
7
|
-
// Format: { THEME_NAME: CSS_SELECTOR }
|
|
8
|
-
const THEMES = { light: "", dark: ".dark" } as const;
|
|
9
|
-
|
|
10
|
-
export type ChartConfig = {
|
|
11
|
-
[k in string]: {
|
|
12
|
-
label?: React.ReactNode;
|
|
13
|
-
icon?: React.ComponentType;
|
|
14
|
-
} & (
|
|
15
|
-
| { color?: string; theme?: never }
|
|
16
|
-
| { color?: never; theme: Record<keyof typeof THEMES, string> }
|
|
17
|
-
);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
type ChartContextProps = {
|
|
21
|
-
config: ChartConfig;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const ChartContext = React.createContext<ChartContextProps | null>(null);
|
|
25
|
-
|
|
26
|
-
function useChart() {
|
|
27
|
-
const context = React.useContext(ChartContext);
|
|
28
|
-
|
|
29
|
-
if (!context) {
|
|
30
|
-
throw new Error("useChart must be used within a <ChartContainer />");
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return context;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const ChartContainer = React.forwardRef<
|
|
37
|
-
HTMLDivElement,
|
|
38
|
-
React.ComponentProps<"div"> & {
|
|
39
|
-
config: ChartConfig;
|
|
40
|
-
children: React.ComponentProps<
|
|
41
|
-
typeof RechartsPrimitive.ResponsiveContainer
|
|
42
|
-
>["children"];
|
|
43
|
-
}
|
|
44
|
-
>(({ id, className, children, config, ...props }, ref) => {
|
|
45
|
-
const uniqueId = React.useId();
|
|
46
|
-
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<ChartContext.Provider value={{ config }}>
|
|
50
|
-
<div
|
|
51
|
-
data-chart={chartId}
|
|
52
|
-
ref={ref}
|
|
53
|
-
className={cn(
|
|
54
|
-
"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",
|
|
55
|
-
className,
|
|
56
|
-
)}
|
|
57
|
-
{...props}
|
|
58
|
-
>
|
|
59
|
-
<ChartStyle id={chartId} config={config} />
|
|
60
|
-
<RechartsPrimitive.ResponsiveContainer>
|
|
61
|
-
{children}
|
|
62
|
-
</RechartsPrimitive.ResponsiveContainer>
|
|
63
|
-
</div>
|
|
64
|
-
</ChartContext.Provider>
|
|
65
|
-
);
|
|
66
|
-
});
|
|
67
|
-
ChartContainer.displayName = "Chart";
|
|
68
|
-
|
|
69
|
-
const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {
|
|
70
|
-
const colorConfig = Object.entries(config).filter(
|
|
71
|
-
([_, config]) => config.theme || config.color,
|
|
72
|
-
);
|
|
73
|
-
|
|
74
|
-
if (!colorConfig.length) {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return (
|
|
79
|
-
<style
|
|
80
|
-
dangerouslySetInnerHTML={{
|
|
81
|
-
__html: Object.entries(THEMES)
|
|
82
|
-
.map(
|
|
83
|
-
([theme, prefix]) => `
|
|
84
|
-
${prefix} [data-chart=${id}] {
|
|
85
|
-
${colorConfig
|
|
86
|
-
.map(([key, itemConfig]) => {
|
|
87
|
-
const color =
|
|
88
|
-
itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ||
|
|
89
|
-
itemConfig.color;
|
|
90
|
-
return color ? ` --color-${key}: ${color};` : null;
|
|
91
|
-
})
|
|
92
|
-
.join("\n")}
|
|
93
|
-
}
|
|
94
|
-
`,
|
|
95
|
-
)
|
|
96
|
-
.join("\n"),
|
|
97
|
-
}}
|
|
98
|
-
/>
|
|
99
|
-
);
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
const ChartTooltip = RechartsPrimitive.Tooltip;
|
|
103
|
-
|
|
104
|
-
const ChartTooltipContent = React.forwardRef<
|
|
105
|
-
HTMLDivElement,
|
|
106
|
-
RechartsPrimitive.TooltipProps<string | number, string> &
|
|
107
|
-
React.ComponentProps<"div"> & {
|
|
108
|
-
active?: boolean;
|
|
109
|
-
payload?: ReadonlyArray<
|
|
110
|
-
RechartsPrimitive.TooltipPayloadEntry<string | number, string>
|
|
111
|
-
>;
|
|
112
|
-
label?: React.ReactNode;
|
|
113
|
-
hideLabel?: boolean;
|
|
114
|
-
hideIndicator?: boolean;
|
|
115
|
-
indicator?: "line" | "dot" | "dashed";
|
|
116
|
-
nameKey?: string;
|
|
117
|
-
labelKey?: string;
|
|
118
|
-
}
|
|
119
|
-
>(
|
|
120
|
-
(
|
|
121
|
-
{
|
|
122
|
-
active,
|
|
123
|
-
payload,
|
|
124
|
-
className,
|
|
125
|
-
indicator = "dot",
|
|
126
|
-
hideLabel = false,
|
|
127
|
-
hideIndicator = false,
|
|
128
|
-
label,
|
|
129
|
-
labelFormatter,
|
|
130
|
-
labelClassName,
|
|
131
|
-
formatter,
|
|
132
|
-
color,
|
|
133
|
-
nameKey,
|
|
134
|
-
labelKey,
|
|
135
|
-
},
|
|
136
|
-
ref,
|
|
137
|
-
) => {
|
|
138
|
-
const { config } = useChart();
|
|
139
|
-
const flipRef = useChartTooltipFlip<HTMLDivElement>(active);
|
|
140
|
-
const setRefs = React.useCallback(
|
|
141
|
-
(node: HTMLDivElement | null) => {
|
|
142
|
-
flipRef.current = node;
|
|
143
|
-
if (typeof ref === "function") ref(node);
|
|
144
|
-
else if (ref)
|
|
145
|
-
(ref as React.MutableRefObject<HTMLDivElement | null>).current = node;
|
|
146
|
-
},
|
|
147
|
-
[ref, flipRef],
|
|
148
|
-
);
|
|
149
|
-
|
|
150
|
-
const tooltipLabel = React.useMemo(() => {
|
|
151
|
-
if (hideLabel || !payload?.length) {
|
|
152
|
-
return null;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
const [item] = payload;
|
|
156
|
-
const key = `${labelKey || item.dataKey || item.name || "value"}`;
|
|
157
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
158
|
-
const value =
|
|
159
|
-
!labelKey && typeof label === "string"
|
|
160
|
-
? config[label as keyof typeof config]?.label || label
|
|
161
|
-
: itemConfig?.label;
|
|
162
|
-
|
|
163
|
-
if (labelFormatter) {
|
|
164
|
-
return (
|
|
165
|
-
<div className={cn("font-medium", labelClassName)}>
|
|
166
|
-
{labelFormatter(value, payload)}
|
|
167
|
-
</div>
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
if (!value) {
|
|
172
|
-
return null;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
return <div className={cn("font-medium", labelClassName)}>{value}</div>;
|
|
176
|
-
}, [
|
|
177
|
-
label,
|
|
178
|
-
labelFormatter,
|
|
179
|
-
payload,
|
|
180
|
-
hideLabel,
|
|
181
|
-
labelClassName,
|
|
182
|
-
config,
|
|
183
|
-
labelKey,
|
|
184
|
-
]);
|
|
185
|
-
|
|
186
|
-
if (!active || !payload?.length) {
|
|
187
|
-
return null;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
191
|
-
|
|
192
|
-
return (
|
|
193
|
-
<div
|
|
194
|
-
ref={setRefs}
|
|
195
|
-
className={cn(
|
|
196
|
-
"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",
|
|
197
|
-
className,
|
|
198
|
-
)}
|
|
199
|
-
>
|
|
200
|
-
{!nestLabel ? tooltipLabel : null}
|
|
201
|
-
<div className="grid gap-1.5">
|
|
202
|
-
{payload.map((item, index) => {
|
|
203
|
-
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
204
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
205
|
-
const indicatorColor = color || item.payload.fill || item.color;
|
|
206
|
-
|
|
207
|
-
return (
|
|
208
|
-
<div
|
|
209
|
-
key={key}
|
|
210
|
-
className={cn(
|
|
211
|
-
"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
|
|
212
|
-
indicator === "dot" && "items-center",
|
|
213
|
-
)}
|
|
214
|
-
>
|
|
215
|
-
{formatter && item?.value !== undefined && item.name ? (
|
|
216
|
-
formatter(item.value, item.name, item, index, item.payload)
|
|
217
|
-
) : (
|
|
218
|
-
<>
|
|
219
|
-
{itemConfig?.icon ? (
|
|
220
|
-
<itemConfig.icon />
|
|
221
|
-
) : (
|
|
222
|
-
!hideIndicator && (
|
|
223
|
-
<div
|
|
224
|
-
className={cn(
|
|
225
|
-
"shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",
|
|
226
|
-
{
|
|
227
|
-
"h-2.5 w-2.5": indicator === "dot",
|
|
228
|
-
"w-1": indicator === "line",
|
|
229
|
-
"w-0 border-[1.5px] border-dashed bg-transparent":
|
|
230
|
-
indicator === "dashed",
|
|
231
|
-
"my-0.5": nestLabel && indicator === "dashed",
|
|
232
|
-
},
|
|
233
|
-
)}
|
|
234
|
-
style={
|
|
235
|
-
{
|
|
236
|
-
"--color-bg": indicatorColor,
|
|
237
|
-
"--color-border": indicatorColor,
|
|
238
|
-
} as React.CSSProperties
|
|
239
|
-
}
|
|
240
|
-
/>
|
|
241
|
-
)
|
|
242
|
-
)}
|
|
243
|
-
<div
|
|
244
|
-
className={cn(
|
|
245
|
-
"flex flex-1 justify-between leading-none",
|
|
246
|
-
nestLabel ? "items-end" : "items-center",
|
|
247
|
-
)}
|
|
248
|
-
>
|
|
249
|
-
<div className="grid gap-1.5">
|
|
250
|
-
{nestLabel ? tooltipLabel : null}
|
|
251
|
-
<span className="text-muted-foreground">
|
|
252
|
-
{itemConfig?.label || item.name}
|
|
253
|
-
</span>
|
|
254
|
-
</div>
|
|
255
|
-
{item.value && (
|
|
256
|
-
<span className="font-mono font-medium tabular-nums text-foreground">
|
|
257
|
-
{item.value.toLocaleString()}
|
|
258
|
-
</span>
|
|
259
|
-
)}
|
|
260
|
-
</div>
|
|
261
|
-
</>
|
|
262
|
-
)}
|
|
263
|
-
</div>
|
|
264
|
-
);
|
|
265
|
-
})}
|
|
266
|
-
</div>
|
|
267
|
-
</div>
|
|
268
|
-
);
|
|
269
|
-
},
|
|
270
|
-
);
|
|
271
|
-
ChartTooltipContent.displayName = "ChartTooltip";
|
|
272
|
-
|
|
273
|
-
const ChartLegend = RechartsPrimitive.Legend;
|
|
274
|
-
|
|
275
|
-
const ChartLegendContent = React.forwardRef<
|
|
276
|
-
HTMLDivElement,
|
|
277
|
-
React.ComponentProps<"div"> & {
|
|
278
|
-
payload?: Array<{
|
|
279
|
-
value: string;
|
|
280
|
-
color?: string;
|
|
281
|
-
dataKey?: string | number;
|
|
282
|
-
type?: string;
|
|
283
|
-
}>;
|
|
284
|
-
verticalAlign?: "top" | "bottom";
|
|
285
|
-
} & {
|
|
286
|
-
hideIcon?: boolean;
|
|
287
|
-
nameKey?: string;
|
|
288
|
-
}
|
|
289
|
-
>(
|
|
290
|
-
(
|
|
291
|
-
{ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey },
|
|
292
|
-
ref,
|
|
293
|
-
) => {
|
|
294
|
-
const { config } = useChart();
|
|
295
|
-
|
|
296
|
-
if (!payload?.length) {
|
|
297
|
-
return null;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
return (
|
|
301
|
-
<div
|
|
302
|
-
ref={ref}
|
|
303
|
-
className={cn(
|
|
304
|
-
"flex items-center justify-center gap-4",
|
|
305
|
-
verticalAlign === "top" ? "pb-3" : "pt-3",
|
|
306
|
-
className,
|
|
307
|
-
)}
|
|
308
|
-
>
|
|
309
|
-
{payload.map((item) => {
|
|
310
|
-
const key = `${nameKey || item.dataKey || "value"}`;
|
|
311
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
312
|
-
|
|
313
|
-
return (
|
|
314
|
-
<div
|
|
315
|
-
key={item.value}
|
|
316
|
-
className={cn(
|
|
317
|
-
"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground",
|
|
318
|
-
)}
|
|
319
|
-
>
|
|
320
|
-
{itemConfig?.icon && !hideIcon ? (
|
|
321
|
-
<itemConfig.icon />
|
|
322
|
-
) : (
|
|
323
|
-
<div
|
|
324
|
-
className="h-2 w-2 shrink-0 rounded-[2px]"
|
|
325
|
-
style={{
|
|
326
|
-
backgroundColor: item.color,
|
|
327
|
-
}}
|
|
328
|
-
/>
|
|
329
|
-
)}
|
|
330
|
-
{itemConfig?.label}
|
|
331
|
-
</div>
|
|
332
|
-
);
|
|
333
|
-
})}
|
|
334
|
-
</div>
|
|
335
|
-
);
|
|
336
|
-
},
|
|
337
|
-
);
|
|
338
|
-
ChartLegendContent.displayName = "ChartLegend";
|
|
339
|
-
|
|
340
|
-
// Helper to extract item config from a payload.
|
|
341
|
-
function getPayloadConfigFromPayload(
|
|
342
|
-
config: ChartConfig,
|
|
343
|
-
payload: unknown,
|
|
344
|
-
key: string,
|
|
345
|
-
) {
|
|
346
|
-
if (typeof payload !== "object" || payload === null) {
|
|
347
|
-
return undefined;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
const payloadPayload =
|
|
351
|
-
"payload" in payload &&
|
|
352
|
-
typeof payload.payload === "object" &&
|
|
353
|
-
payload.payload !== null
|
|
354
|
-
? payload.payload
|
|
355
|
-
: undefined;
|
|
356
|
-
|
|
357
|
-
let configLabelKey: string = key;
|
|
358
|
-
|
|
359
|
-
if (
|
|
360
|
-
key in payload &&
|
|
361
|
-
typeof payload[key as keyof typeof payload] === "string"
|
|
362
|
-
) {
|
|
363
|
-
configLabelKey = payload[key as keyof typeof payload] as string;
|
|
364
|
-
} else if (
|
|
365
|
-
payloadPayload &&
|
|
366
|
-
key in payloadPayload &&
|
|
367
|
-
typeof payloadPayload[key as keyof typeof payloadPayload] === "string"
|
|
368
|
-
) {
|
|
369
|
-
configLabelKey = payloadPayload[
|
|
370
|
-
key as keyof typeof payloadPayload
|
|
371
|
-
] as string;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
return configLabelKey in config
|
|
375
|
-
? config[configLabelKey]
|
|
376
|
-
: config[key as keyof typeof config];
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
export {
|
|
380
|
-
ChartContainer,
|
|
381
|
-
ChartTooltip,
|
|
382
|
-
ChartTooltipContent,
|
|
383
|
-
ChartLegend,
|
|
384
|
-
ChartLegendContent,
|
|
385
|
-
ChartStyle,
|
|
386
|
-
};
|