@johpaz/hive 1.7.2 → 1.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +178 -36
- package/dist/hive.js +315124 -0
- package/package.json +11 -3
- package/packages/core/src/index.ts +0 -1
- package/.dockerignore +0 -9
- package/CONTRIBUTING.md +0 -44
- package/Dockerfile +0 -67
- package/docker-compose.yml +0 -19
- package/packages/cli/package.json +0 -28
- package/packages/cli/src/commands/agent-run.ts +0 -168
- package/packages/cli/src/commands/agents.ts +0 -398
- package/packages/cli/src/commands/chat.ts +0 -142
- package/packages/cli/src/commands/config.ts +0 -50
- package/packages/cli/src/commands/cron.ts +0 -161
- package/packages/cli/src/commands/dev.ts +0 -95
- package/packages/cli/src/commands/doctor.ts +0 -133
- package/packages/cli/src/commands/gateway.ts +0 -422
- package/packages/cli/src/commands/logs.ts +0 -57
- package/packages/cli/src/commands/mcp.ts +0 -175
- package/packages/cli/src/commands/message.ts +0 -77
- package/packages/cli/src/commands/onboard.ts +0 -1696
- package/packages/cli/src/commands/security.ts +0 -144
- package/packages/cli/src/commands/service.ts +0 -50
- package/packages/cli/src/commands/sessions.ts +0 -116
- package/packages/cli/src/commands/skills.ts +0 -187
- package/packages/cli/src/commands/update.ts +0 -25
- package/packages/cli/src/index.ts +0 -190
- package/packages/cli/src/utils/token.ts +0 -6
- package/packages/code-bridge/README.md +0 -78
- package/packages/code-bridge/package.json +0 -18
- package/packages/code-bridge/src/index.ts +0 -95
- package/packages/code-bridge/src/process-manager.ts +0 -212
- package/packages/code-bridge/src/schemas.ts +0 -133
- package/packages/core/package.json +0 -55
- package/packages/core/src/agent/agent-loop.ts +0 -520
- package/packages/core/src/agent/compaction.ts +0 -183
- package/packages/core/src/agent/context-compiler.ts +0 -544
- package/packages/core/src/agent/context-guard.ts +0 -91
- package/packages/core/src/agent/conversation-store.ts +0 -193
- package/packages/core/src/agent/curator.ts +0 -158
- package/packages/core/src/agent/hooks.ts +0 -166
- package/packages/core/src/agent/llm-client.ts +0 -503
- package/packages/core/src/agent/native-tools.ts +0 -31
- package/packages/core/src/agent/playbook-selector.ts +0 -143
- package/packages/core/src/agent/prompt-builder.ts +0 -167
- package/packages/core/src/agent/providers/index.ts +0 -186
- package/packages/core/src/agent/providers.ts +0 -1
- package/packages/core/src/agent/reflector.ts +0 -200
- package/packages/core/src/agent/service.ts +0 -266
- package/packages/core/src/agent/skill-selector.ts +0 -413
- package/packages/core/src/agent/stuck-loop.ts +0 -133
- package/packages/core/src/agent/tool-selector.ts +0 -623
- package/packages/core/src/agent/tracer.ts +0 -102
- package/packages/core/src/canvas/canvas-manager.ts +0 -319
- package/packages/core/src/canvas/canvas-tools.ts +0 -420
- package/packages/core/src/canvas/emitter.ts +0 -119
- package/packages/core/src/canvas/index.ts +0 -2
- package/packages/core/src/channels/base.ts +0 -140
- package/packages/core/src/channels/discord.ts +0 -260
- package/packages/core/src/channels/index.ts +0 -7
- package/packages/core/src/channels/manager.ts +0 -383
- package/packages/core/src/channels/slack.ts +0 -287
- package/packages/core/src/channels/telegram.ts +0 -552
- package/packages/core/src/channels/webchat.ts +0 -139
- package/packages/core/src/channels/whatsapp.ts +0 -375
- package/packages/core/src/config/index.ts +0 -12
- package/packages/core/src/config/loader.ts +0 -529
- package/packages/core/src/events/agent-bus.ts +0 -460
- package/packages/core/src/events/event-bus.ts +0 -169
- package/packages/core/src/gateway/helpers/cors.ts +0 -32
- package/packages/core/src/gateway/helpers/index.ts +0 -4
- package/packages/core/src/gateway/helpers/narration.ts +0 -60
- package/packages/core/src/gateway/helpers/path.ts +0 -13
- package/packages/core/src/gateway/helpers/redact.ts +0 -61
- package/packages/core/src/gateway/index.ts +0 -5
- package/packages/core/src/gateway/initializer.ts +0 -332
- package/packages/core/src/gateway/lane-queue.ts +0 -169
- package/packages/core/src/gateway/resolver.ts +0 -108
- package/packages/core/src/gateway/router.ts +0 -124
- package/packages/core/src/gateway/routes/agents.ts +0 -187
- package/packages/core/src/gateway/routes/channels.ts +0 -203
- package/packages/core/src/gateway/routes/chat.ts +0 -241
- package/packages/core/src/gateway/routes/config.ts +0 -12
- package/packages/core/src/gateway/routes/cron.ts +0 -42
- package/packages/core/src/gateway/routes/ethics.ts +0 -46
- package/packages/core/src/gateway/routes/mcp.ts +0 -346
- package/packages/core/src/gateway/routes/models.ts +0 -93
- package/packages/core/src/gateway/routes/projects.ts +0 -179
- package/packages/core/src/gateway/routes/providers.ts +0 -192
- package/packages/core/src/gateway/routes/setup.ts +0 -267
- package/packages/core/src/gateway/routes/skills.ts +0 -70
- package/packages/core/src/gateway/routes/system.ts +0 -165
- package/packages/core/src/gateway/routes/tasks.ts +0 -44
- package/packages/core/src/gateway/routes/tools.ts +0 -35
- package/packages/core/src/gateway/routes/users.ts +0 -118
- package/packages/core/src/gateway/routes/voice.ts +0 -73
- package/packages/core/src/gateway/routes/workspace.ts +0 -281
- package/packages/core/src/gateway/server.ts +0 -1978
- package/packages/core/src/gateway/session.ts +0 -95
- package/packages/core/src/gateway/slash-commands.ts +0 -193
- package/packages/core/src/heartbeat/index.ts +0 -157
- package/packages/core/src/mcp/hot-reload.ts +0 -213
- package/packages/core/src/mcp/singleton.ts +0 -21
- package/packages/core/src/memory/index.ts +0 -1
- package/packages/core/src/memory/notes.ts +0 -68
- package/packages/core/src/plugins/api.ts +0 -128
- package/packages/core/src/plugins/index.ts +0 -2
- package/packages/core/src/plugins/loader.ts +0 -365
- package/packages/core/src/resilience/circuit-breaker.ts +0 -225
- package/packages/core/src/security/google-chat.ts +0 -269
- package/packages/core/src/security/index.ts +0 -192
- package/packages/core/src/security/pairing.ts +0 -250
- package/packages/core/src/security/rate-limit.ts +0 -270
- package/packages/core/src/security/signal.ts +0 -321
- package/packages/core/src/state/store.ts +0 -312
- package/packages/core/src/storage/crypto.ts +0 -101
- package/packages/core/src/storage/onboarding.ts +0 -1609
- package/packages/core/src/storage/schema.ts +0 -567
- package/packages/core/src/storage/seed.ts +0 -608
- package/packages/core/src/storage/sqlite.ts +0 -363
- package/packages/core/src/storage/usage.ts +0 -270
- package/packages/core/src/tools/agents/index.ts +0 -607
- package/packages/core/src/tools/bridge-events.ts +0 -26
- package/packages/core/src/tools/canvas/index.ts +0 -281
- package/packages/core/src/tools/cli/index.ts +0 -142
- package/packages/core/src/tools/codebridge/index.ts +0 -179
- package/packages/core/src/tools/core/index.ts +0 -257
- package/packages/core/src/tools/cron/index.ts +0 -373
- package/packages/core/src/tools/filesystem/fs-delete.ts +0 -78
- package/packages/core/src/tools/filesystem/fs-edit.ts +0 -106
- package/packages/core/src/tools/filesystem/fs-exists.ts +0 -63
- package/packages/core/src/tools/filesystem/fs-glob.ts +0 -108
- package/packages/core/src/tools/filesystem/fs-list.ts +0 -129
- package/packages/core/src/tools/filesystem/fs-read.ts +0 -72
- package/packages/core/src/tools/filesystem/fs-write.ts +0 -67
- package/packages/core/src/tools/filesystem/index.ts +0 -34
- package/packages/core/src/tools/filesystem/workspace-guard.ts +0 -62
- package/packages/core/src/tools/index.ts +0 -197
- package/packages/core/src/tools/projects/index.ts +0 -37
- package/packages/core/src/tools/projects/project-create.ts +0 -94
- package/packages/core/src/tools/projects/project-done.ts +0 -66
- package/packages/core/src/tools/projects/project-fail.ts +0 -66
- package/packages/core/src/tools/projects/project-list.ts +0 -96
- package/packages/core/src/tools/projects/project-update.ts +0 -72
- package/packages/core/src/tools/projects/task-create.ts +0 -68
- package/packages/core/src/tools/projects/task-evaluate.ts +0 -93
- package/packages/core/src/tools/projects/task-update.ts +0 -93
- package/packages/core/src/tools/search-knowledge/search-knowledge.ts +0 -155
- package/packages/core/src/tools/types.ts +0 -39
- package/packages/core/src/tools/voice/index.ts +0 -104
- package/packages/core/src/tools/web/browser-click.ts +0 -54
- package/packages/core/src/tools/web/browser-navigate.ts +0 -84
- package/packages/core/src/tools/web/browser-screenshot.ts +0 -54
- package/packages/core/src/tools/web/browser-type.ts +0 -60
- package/packages/core/src/tools/web/index.ts +0 -31
- package/packages/core/src/tools/web/web-fetch.ts +0 -78
- package/packages/core/src/tools/web/web-search.ts +0 -123
- package/packages/core/src/utils/benchmark.ts +0 -80
- package/packages/core/src/utils/crypto.ts +0 -73
- package/packages/core/src/utils/date.ts +0 -42
- package/packages/core/src/utils/index.ts +0 -5
- package/packages/core/src/utils/logger.ts +0 -389
- package/packages/core/src/utils/retry.ts +0 -70
- package/packages/core/src/utils/toon.ts +0 -356
- package/packages/core/src/voice/index.ts +0 -583
- package/packages/hive-ui/README.md +0 -52
- package/packages/hive-ui/components.json +0 -20
- package/packages/hive-ui/index.html +0 -30
- package/packages/hive-ui/package.json +0 -90
- package/packages/hive-ui/public/favicon.ico +0 -0
- package/packages/hive-ui/public/placeholder.svg +0 -1
- package/packages/hive-ui/src/App.tsx +0 -115
- package/packages/hive-ui/src/components/CronJobsPanel.tsx +0 -200
- package/packages/hive-ui/src/components/NavLink.tsx +0 -34
- package/packages/hive-ui/src/components/NotesPanel.tsx +0 -79
- package/packages/hive-ui/src/components/SystemMonitor.tsx +0 -270
- package/packages/hive-ui/src/components/UsageStatsPanel.tsx +0 -334
- package/packages/hive-ui/src/components/WelcomeDialog.tsx +0 -279
- package/packages/hive-ui/src/components/ui/accordion.tsx +0 -52
- package/packages/hive-ui/src/components/ui/alert-dialog.tsx +0 -104
- package/packages/hive-ui/src/components/ui/alert.tsx +0 -45
- package/packages/hive-ui/src/components/ui/aspect-ratio.tsx +0 -5
- package/packages/hive-ui/src/components/ui/avatar.tsx +0 -38
- package/packages/hive-ui/src/components/ui/badge.tsx +0 -29
- package/packages/hive-ui/src/components/ui/bee-loader.tsx +0 -68
- package/packages/hive-ui/src/components/ui/breadcrumb.tsx +0 -90
- package/packages/hive-ui/src/components/ui/button.tsx +0 -47
- package/packages/hive-ui/src/components/ui/calendar.tsx +0 -54
- package/packages/hive-ui/src/components/ui/card.tsx +0 -45
- package/packages/hive-ui/src/components/ui/carousel.tsx +0 -224
- package/packages/hive-ui/src/components/ui/chart.tsx +0 -303
- package/packages/hive-ui/src/components/ui/checkbox.tsx +0 -26
- package/packages/hive-ui/src/components/ui/collapsible.tsx +0 -9
- package/packages/hive-ui/src/components/ui/command.tsx +0 -133
- package/packages/hive-ui/src/components/ui/context-menu.tsx +0 -178
- package/packages/hive-ui/src/components/ui/dialog.tsx +0 -95
- package/packages/hive-ui/src/components/ui/drawer.tsx +0 -87
- package/packages/hive-ui/src/components/ui/dropdown-menu.tsx +0 -179
- package/packages/hive-ui/src/components/ui/form.tsx +0 -129
- package/packages/hive-ui/src/components/ui/hover-card.tsx +0 -27
- package/packages/hive-ui/src/components/ui/input-otp.tsx +0 -61
- package/packages/hive-ui/src/components/ui/input.tsx +0 -22
- package/packages/hive-ui/src/components/ui/label.tsx +0 -17
- package/packages/hive-ui/src/components/ui/menubar.tsx +0 -207
- package/packages/hive-ui/src/components/ui/navigation-menu.tsx +0 -120
- package/packages/hive-ui/src/components/ui/pagination.tsx +0 -80
- package/packages/hive-ui/src/components/ui/popover.tsx +0 -29
- package/packages/hive-ui/src/components/ui/progress.tsx +0 -23
- package/packages/hive-ui/src/components/ui/radio-group.tsx +0 -36
- package/packages/hive-ui/src/components/ui/resizable.tsx +0 -37
- package/packages/hive-ui/src/components/ui/scroll-area.tsx +0 -38
- package/packages/hive-ui/src/components/ui/select.tsx +0 -143
- package/packages/hive-ui/src/components/ui/separator.tsx +0 -20
- package/packages/hive-ui/src/components/ui/sheet.tsx +0 -107
- package/packages/hive-ui/src/components/ui/sidebar.tsx +0 -636
- package/packages/hive-ui/src/components/ui/skeleton.tsx +0 -7
- package/packages/hive-ui/src/components/ui/slider.tsx +0 -23
- package/packages/hive-ui/src/components/ui/sonner.tsx +0 -27
- package/packages/hive-ui/src/components/ui/switch.tsx +0 -27
- package/packages/hive-ui/src/components/ui/table.tsx +0 -72
- package/packages/hive-ui/src/components/ui/tabs.tsx +0 -53
- package/packages/hive-ui/src/components/ui/textarea.tsx +0 -21
- package/packages/hive-ui/src/components/ui/toast.tsx +0 -111
- package/packages/hive-ui/src/components/ui/toaster.tsx +0 -24
- package/packages/hive-ui/src/components/ui/toggle-group.tsx +0 -49
- package/packages/hive-ui/src/components/ui/toggle.tsx +0 -37
- package/packages/hive-ui/src/components/ui/tooltip.tsx +0 -28
- package/packages/hive-ui/src/components/ui/use-toast.ts +0 -3
- package/packages/hive-ui/src/hooks/use-mobile.tsx +0 -19
- package/packages/hive-ui/src/hooks/use-toast.ts +0 -186
- package/packages/hive-ui/src/hooks/useAgentConfig.ts +0 -25
- package/packages/hive-ui/src/hooks/useAgents.ts +0 -38
- package/packages/hive-ui/src/hooks/useBridge.ts +0 -38
- package/packages/hive-ui/src/hooks/useCanvas.ts +0 -24
- package/packages/hive-ui/src/hooks/useChannels.ts +0 -2
- package/packages/hive-ui/src/hooks/useEthics.ts +0 -51
- package/packages/hive-ui/src/hooks/useProviders.ts +0 -14
- package/packages/hive-ui/src/hooks/useTheme.ts +0 -29
- package/packages/hive-ui/src/hooks/useUserConfig.ts +0 -17
- package/packages/hive-ui/src/hooks/useWebSocket.ts +0 -12
- package/packages/hive-ui/src/index.css +0 -620
- package/packages/hive-ui/src/lib/api.ts +0 -100
- package/packages/hive-ui/src/lib/constants.ts +0 -6
- package/packages/hive-ui/src/lib/models.ts +0 -64
- package/packages/hive-ui/src/lib/swal.ts +0 -30
- package/packages/hive-ui/src/lib/utils.ts +0 -6
- package/packages/hive-ui/src/lib/websocket.ts +0 -7
- package/packages/hive-ui/src/main.tsx +0 -5
- package/packages/hive-ui/src/modules/agent-config/details/AgentDetailsEditor.tsx +0 -524
- package/packages/hive-ui/src/modules/agent-config/ethics/EthicsConflictDetector.tsx +0 -18
- package/packages/hive-ui/src/modules/agent-config/ethics/EthicsEditor.tsx +0 -19
- package/packages/hive-ui/src/modules/agent-config/ethics/EthicsRulesList.tsx +0 -36
- package/packages/hive-ui/src/modules/agent-config/ethics/EthicsTemplateGallery.tsx +0 -361
- package/packages/hive-ui/src/modules/agent-config/ethics/index.ts +0 -4
- package/packages/hive-ui/src/modules/agent-config/index.ts +0 -6
- package/packages/hive-ui/src/modules/agent-config/mcp/MCPServerAdd.tsx +0 -322
- package/packages/hive-ui/src/modules/agent-config/mcp/MCPServerCard.tsx +0 -93
- package/packages/hive-ui/src/modules/agent-config/mcp/MCPServerConfig.tsx +0 -427
- package/packages/hive-ui/src/modules/agent-config/mcp/MCPServerList.tsx +0 -85
- package/packages/hive-ui/src/modules/agent-config/mcp/MCPToolExplorer.tsx +0 -79
- package/packages/hive-ui/src/modules/agent-config/mcp/index.ts +0 -5
- package/packages/hive-ui/src/modules/agent-config/shared/ConfigEditorLayout.tsx +0 -30
- package/packages/hive-ui/src/modules/agent-config/shared/ConfigExporter.tsx +0 -26
- package/packages/hive-ui/src/modules/agent-config/shared/ConfigImporter.tsx +0 -25
- package/packages/hive-ui/src/modules/agent-config/shared/DiffViewer.tsx +0 -31
- package/packages/hive-ui/src/modules/agent-config/shared/MarkdownEditor.tsx +0 -32
- package/packages/hive-ui/src/modules/agent-config/shared/SaveStatusIndicator.tsx +0 -23
- package/packages/hive-ui/src/modules/agent-config/shared/ValidationPanel.tsx +0 -36
- package/packages/hive-ui/src/modules/agent-config/shared/index.ts +0 -7
- package/packages/hive-ui/src/modules/agent-config/skills/SkillCard.tsx +0 -81
- package/packages/hive-ui/src/modules/agent-config/skills/SkillConfigEditor.tsx +0 -22
- package/packages/hive-ui/src/modules/agent-config/skills/SkillCreator.tsx +0 -60
- package/packages/hive-ui/src/modules/agent-config/skills/SkillInstaller.tsx +0 -23
- package/packages/hive-ui/src/modules/agent-config/skills/SkillList.tsx +0 -72
- package/packages/hive-ui/src/modules/agent-config/skills/SkillsTab.tsx +0 -202
- package/packages/hive-ui/src/modules/agent-config/skills/index.ts +0 -5
- package/packages/hive-ui/src/modules/agent-config/tools/ToolCard.tsx +0 -27
- package/packages/hive-ui/src/modules/agent-config/tools/ToolConfigPanel.tsx +0 -22
- package/packages/hive-ui/src/modules/agent-config/tools/ToolManager.tsx +0 -266
- package/packages/hive-ui/src/modules/agent-config/tools/ToolPermissions.tsx +0 -287
- package/packages/hive-ui/src/modules/agent-config/tools/ToolRegistry.tsx +0 -84
- package/packages/hive-ui/src/modules/agent-config/tools/ToolUsageStats.tsx +0 -52
- package/packages/hive-ui/src/modules/agent-config/tools/index.ts +0 -4
- package/packages/hive-ui/src/modules/agent-config/user/ActiveAgentsList.tsx +0 -109
- package/packages/hive-ui/src/modules/agent-config/user/GlobalConfigOverview.tsx +0 -119
- package/packages/hive-ui/src/modules/agent-config/user/UserMemoryManager.tsx +0 -54
- package/packages/hive-ui/src/modules/agent-config/user/UserPreferencesForm.tsx +0 -163
- package/packages/hive-ui/src/modules/agent-config/user/UserProfileEditor.tsx +0 -261
- package/packages/hive-ui/src/modules/agent-config/user/index.ts +0 -3
- package/packages/hive-ui/src/modules/agents/AgentActivityLog.tsx +0 -25
- package/packages/hive-ui/src/modules/agents/AgentCard.tsx +0 -305
- package/packages/hive-ui/src/modules/agents/AgentCreateForm.tsx +0 -446
- package/packages/hive-ui/src/modules/agents/AgentDetail.tsx +0 -28
- package/packages/hive-ui/src/modules/agents/AgentInternalCard.tsx +0 -162
- package/packages/hive-ui/src/modules/agents/AgentList.tsx +0 -29
- package/packages/hive-ui/src/modules/agents/AgentStatusBadge.tsx +0 -34
- package/packages/hive-ui/src/modules/agents/ModelSelector.tsx +0 -151
- package/packages/hive-ui/src/modules/bridge/BridgeLogViewer.tsx +0 -61
- package/packages/hive-ui/src/modules/bridge/BridgeProcessList.tsx +0 -77
- package/packages/hive-ui/src/modules/bridge/BridgeStatus.tsx +0 -23
- package/packages/hive-ui/src/modules/bridge/BridgeTerminal.tsx +0 -7
- package/packages/hive-ui/src/modules/canvas/CanvasButton.tsx +0 -3
- package/packages/hive-ui/src/modules/canvas/CanvasChart.tsx +0 -3
- package/packages/hive-ui/src/modules/canvas/CanvasComponentMap.tsx +0 -605
- package/packages/hive-ui/src/modules/canvas/CanvasContainer.tsx +0 -360
- package/packages/hive-ui/src/modules/canvas/CanvasForm.tsx +0 -3
- package/packages/hive-ui/src/modules/canvas/CanvasMarkdown.tsx +0 -3
- package/packages/hive-ui/src/modules/canvas/CanvasTable.tsx +0 -3
- package/packages/hive-ui/src/modules/canvas/ComponentRenderer.tsx +0 -30
- package/packages/hive-ui/src/modules/canvas/DynamicRenderer.tsx +0 -3
- package/packages/hive-ui/src/modules/channels/available/AvailableChannelsGrid.tsx +0 -89
- package/packages/hive-ui/src/modules/channels/available/ChannelAuthForm.tsx +0 -33
- package/packages/hive-ui/src/modules/channels/available/ChannelSetupWizard.tsx +0 -48
- package/packages/hive-ui/src/modules/channels/available/ChannelTestConnection.tsx +0 -37
- package/packages/hive-ui/src/modules/channels/available/ChannelTypeCard.tsx +0 -30
- package/packages/hive-ui/src/modules/channels/available/ChannelWebhookConfig.tsx +0 -30
- package/packages/hive-ui/src/modules/channels/available/index.ts +0 -6
- package/packages/hive-ui/src/modules/channels/connected/ChannelCard.tsx +0 -95
- package/packages/hive-ui/src/modules/channels/connected/ChannelConfigPanel.tsx +0 -260
- package/packages/hive-ui/src/modules/channels/connected/ChannelDisconnectButton.tsx +0 -21
- package/packages/hive-ui/src/modules/channels/connected/ChannelLogsViewer.tsx +0 -42
- package/packages/hive-ui/src/modules/channels/connected/ChannelQRCode.tsx +0 -32
- package/packages/hive-ui/src/modules/channels/connected/ChannelReconnectButton.tsx +0 -16
- package/packages/hive-ui/src/modules/channels/connected/ChannelStatusBadge.tsx +0 -26
- package/packages/hive-ui/src/modules/channels/connected/ConnectedChannelsList.tsx +0 -40
- package/packages/hive-ui/src/modules/channels/connected/index.ts +0 -8
- package/packages/hive-ui/src/modules/channels/shared/ChannelCard.tsx +0 -84
- package/packages/hive-ui/src/modules/channels/shared/ChannelConfigDialog.tsx +0 -279
- package/packages/hive-ui/src/modules/channels/shared/ChannelIcon.tsx +0 -40
- package/packages/hive-ui/src/modules/channels/shared/ChannelStats.tsx +0 -37
- package/packages/hive-ui/src/modules/channels/shared/ChannelTypeBadge.tsx +0 -23
- package/packages/hive-ui/src/modules/channels/shared/ConnectionHealthIndicator.tsx +0 -20
- package/packages/hive-ui/src/modules/channels/shared/MessagePreview.tsx +0 -19
- package/packages/hive-ui/src/modules/channels/shared/index.ts +0 -5
- package/packages/hive-ui/src/modules/chat/ChatContainer.tsx +0 -268
- package/packages/hive-ui/src/modules/chat/ChatHistory.tsx +0 -101
- package/packages/hive-ui/src/modules/chat/ChatInput.tsx +0 -108
- package/packages/hive-ui/src/modules/chat/ChatMessage.tsx +0 -137
- package/packages/hive-ui/src/modules/chat/ThinkingIndicator.tsx +0 -10
- package/packages/hive-ui/src/modules/layout/AppLayout.tsx +0 -45
- package/packages/hive-ui/src/modules/layout/ConnectionStatus.tsx +0 -19
- package/packages/hive-ui/src/modules/layout/Header.tsx +0 -20
- package/packages/hive-ui/src/modules/layout/HiveSidebar.tsx +0 -173
- package/packages/hive-ui/src/modules/layout/ThemeToggle.tsx +0 -18
- package/packages/hive-ui/src/modules/providers/ProviderCard.tsx +0 -319
- package/packages/hive-ui/src/modules/providers/ProviderConfigForm.tsx +0 -146
- package/packages/hive-ui/src/modules/providers/ProviderFailoverConfig.tsx +0 -110
- package/packages/hive-ui/src/modules/providers/ProviderList.tsx +0 -33
- package/packages/hive-ui/src/modules/providers/ProviderStatusIndicator.tsx +0 -23
- package/packages/hive-ui/src/modules/providers/configs/ProviderAPIKeyManager.tsx +0 -39
- package/packages/hive-ui/src/modules/providers/configs/ProviderEndpointConfig.tsx +0 -27
- package/packages/hive-ui/src/modules/providers/configs/ProviderRateLimits.tsx +0 -37
- package/packages/hive-ui/src/modules/providers/configs/ProviderRetryPolicy.tsx +0 -46
- package/packages/hive-ui/src/modules/providers/configs/index.ts +0 -4
- package/packages/hive-ui/src/modules/providers/index.ts +0 -5
- package/packages/hive-ui/src/modules/providers/models/ModelBenchmarkBadge.tsx +0 -21
- package/packages/hive-ui/src/modules/providers/models/ModelCapabilities.tsx +0 -44
- package/packages/hive-ui/src/modules/providers/models/ModelCard.tsx +0 -36
- package/packages/hive-ui/src/modules/providers/models/ModelComparisonTable.tsx +0 -47
- package/packages/hive-ui/src/modules/providers/models/ModelList.tsx +0 -51
- package/packages/hive-ui/src/modules/providers/models/ModelPricingInfo.tsx +0 -17
- package/packages/hive-ui/src/modules/providers/models/ModelSelector.tsx +0 -32
- package/packages/hive-ui/src/modules/providers/models/index.ts +0 -7
- package/packages/hive-ui/src/pages/AgentDetailPage.tsx +0 -74
- package/packages/hive-ui/src/pages/AgentNewPage.tsx +0 -5
- package/packages/hive-ui/src/pages/AgentsPage.tsx +0 -147
- package/packages/hive-ui/src/pages/BridgePage.tsx +0 -83
- package/packages/hive-ui/src/pages/CanvasPage.tsx +0 -32
- package/packages/hive-ui/src/pages/ChannelsPage.tsx +0 -176
- package/packages/hive-ui/src/pages/DashboardPage.tsx +0 -321
- package/packages/hive-ui/src/pages/Index.tsx +0 -14
- package/packages/hive-ui/src/pages/LogsPage.tsx +0 -252
- package/packages/hive-ui/src/pages/NotFound.tsx +0 -24
- package/packages/hive-ui/src/pages/ProjectsPage.tsx +0 -241
- package/packages/hive-ui/src/pages/ProvidersPage.tsx +0 -111
- package/packages/hive-ui/src/pages/SettingsPage.tsx +0 -147
- package/packages/hive-ui/src/pages/SetupPage.tsx +0 -1177
- package/packages/hive-ui/src/pages/WebChatPage.tsx +0 -15
- package/packages/hive-ui/src/stores/agentConfigStore.ts +0 -32
- package/packages/hive-ui/src/stores/agentStore.ts +0 -5
- package/packages/hive-ui/src/stores/bridgeStore.ts +0 -237
- package/packages/hive-ui/src/stores/canvasStore.ts +0 -250
- package/packages/hive-ui/src/stores/channelStore.ts +0 -5
- package/packages/hive-ui/src/stores/chatStore.ts +0 -42
- package/packages/hive-ui/src/stores/ethicsStore.ts +0 -141
- package/packages/hive-ui/src/stores/mcpStore.ts +0 -5
- package/packages/hive-ui/src/stores/modelStore.ts +0 -2
- package/packages/hive-ui/src/stores/projectsStore.ts +0 -141
- package/packages/hive-ui/src/stores/providerStore.ts +0 -2
- package/packages/hive-ui/src/stores/skillStore.ts +0 -5
- package/packages/hive-ui/src/stores/toolStore.ts +0 -5
- package/packages/hive-ui/src/stores/useGlobalConfigStore.ts +0 -937
- package/packages/hive-ui/src/stores/useLoaderStore.ts +0 -21
- package/packages/hive-ui/src/stores/useNotesAndCronsStore.ts +0 -144
- package/packages/hive-ui/src/stores/useWebSocketStore.ts +0 -152
- package/packages/hive-ui/src/stores/useWelcomeStore.ts +0 -37
- package/packages/hive-ui/src/stores/userConfigStore.ts +0 -23
- package/packages/hive-ui/src/stores/userStore.ts +0 -82
- package/packages/hive-ui/src/test/setup.ts +0 -15
- package/packages/hive-ui/src/types/agent-config.ts +0 -33
- package/packages/hive-ui/src/types/agent.ts +0 -65
- package/packages/hive-ui/src/types/bridge.ts +0 -27
- package/packages/hive-ui/src/types/canvas.ts +0 -76
- package/packages/hive-ui/src/types/channels.ts +0 -109
- package/packages/hive-ui/src/types/chat.ts +0 -25
- package/packages/hive-ui/src/types/connections.ts +0 -17
- package/packages/hive-ui/src/types/ethics.ts +0 -41
- package/packages/hive-ui/src/types/index.ts +0 -15
- package/packages/hive-ui/src/types/mcp.ts +0 -36
- package/packages/hive-ui/src/types/notes-crons.ts +0 -31
- package/packages/hive-ui/src/types/providers.ts +0 -145
- package/packages/hive-ui/src/types/skill.ts +0 -12
- package/packages/hive-ui/src/types/tool.ts +0 -44
- package/packages/hive-ui/src/types/user.ts +0 -26
- package/packages/hive-ui/src/types/websocket.ts +0 -14
- package/packages/hive-ui/src/vite-env.d.ts +0 -1
- package/packages/mcp/package.json +0 -26
- package/packages/mcp/src/config.ts +0 -13
- package/packages/mcp/src/index.ts +0 -1
- package/packages/mcp/src/logger.ts +0 -42
- package/packages/mcp/src/manager.ts +0 -439
- package/packages/mcp/src/transports/index.ts +0 -67
- package/packages/mcp/src/transports/sse.ts +0 -241
- package/packages/mcp/src/transports/websocket.ts +0 -159
- package/packages/skills/package.json +0 -21
- package/packages/skills/src/index.ts +0 -1
- package/packages/skills/src/loader.ts +0 -346
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
-
import { X } from "lucide-react";
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils";
|
|
6
|
-
|
|
7
|
-
const Dialog = DialogPrimitive.Root;
|
|
8
|
-
|
|
9
|
-
const DialogTrigger = DialogPrimitive.Trigger;
|
|
10
|
-
|
|
11
|
-
const DialogPortal = DialogPrimitive.Portal;
|
|
12
|
-
|
|
13
|
-
const DialogClose = DialogPrimitive.Close;
|
|
14
|
-
|
|
15
|
-
const DialogOverlay = React.forwardRef<
|
|
16
|
-
React.ElementRef<typeof DialogPrimitive.Overlay>,
|
|
17
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
|
|
18
|
-
>(({ className, ...props }, ref) => (
|
|
19
|
-
<DialogPrimitive.Overlay
|
|
20
|
-
ref={ref}
|
|
21
|
-
className={cn(
|
|
22
|
-
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
23
|
-
className,
|
|
24
|
-
)}
|
|
25
|
-
{...props}
|
|
26
|
-
/>
|
|
27
|
-
));
|
|
28
|
-
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
29
|
-
|
|
30
|
-
const DialogContent = React.forwardRef<
|
|
31
|
-
React.ElementRef<typeof DialogPrimitive.Content>,
|
|
32
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
|
|
33
|
-
>(({ className, children, ...props }, ref) => (
|
|
34
|
-
<DialogPortal>
|
|
35
|
-
<DialogOverlay />
|
|
36
|
-
<DialogPrimitive.Content
|
|
37
|
-
ref={ref}
|
|
38
|
-
className={cn(
|
|
39
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
40
|
-
className,
|
|
41
|
-
)}
|
|
42
|
-
{...props}
|
|
43
|
-
>
|
|
44
|
-
{children}
|
|
45
|
-
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none">
|
|
46
|
-
<X className="h-4 w-4" />
|
|
47
|
-
<span className="sr-only">Close</span>
|
|
48
|
-
</DialogPrimitive.Close>
|
|
49
|
-
</DialogPrimitive.Content>
|
|
50
|
-
</DialogPortal>
|
|
51
|
-
));
|
|
52
|
-
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
53
|
-
|
|
54
|
-
const DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
|
|
55
|
-
<div className={cn("flex flex-col space-y-1.5 text-center sm:text-left", className)} {...props} />
|
|
56
|
-
);
|
|
57
|
-
DialogHeader.displayName = "DialogHeader";
|
|
58
|
-
|
|
59
|
-
const DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
|
|
60
|
-
<div className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)} {...props} />
|
|
61
|
-
);
|
|
62
|
-
DialogFooter.displayName = "DialogFooter";
|
|
63
|
-
|
|
64
|
-
const DialogTitle = React.forwardRef<
|
|
65
|
-
React.ElementRef<typeof DialogPrimitive.Title>,
|
|
66
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
|
|
67
|
-
>(({ className, ...props }, ref) => (
|
|
68
|
-
<DialogPrimitive.Title
|
|
69
|
-
ref={ref}
|
|
70
|
-
className={cn("text-lg font-semibold leading-none tracking-tight", className)}
|
|
71
|
-
{...props}
|
|
72
|
-
/>
|
|
73
|
-
));
|
|
74
|
-
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
75
|
-
|
|
76
|
-
const DialogDescription = React.forwardRef<
|
|
77
|
-
React.ElementRef<typeof DialogPrimitive.Description>,
|
|
78
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
|
|
79
|
-
>(({ className, ...props }, ref) => (
|
|
80
|
-
<DialogPrimitive.Description ref={ref} className={cn("text-sm text-muted-foreground", className)} {...props} />
|
|
81
|
-
));
|
|
82
|
-
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
83
|
-
|
|
84
|
-
export {
|
|
85
|
-
Dialog,
|
|
86
|
-
DialogPortal,
|
|
87
|
-
DialogOverlay,
|
|
88
|
-
DialogClose,
|
|
89
|
-
DialogTrigger,
|
|
90
|
-
DialogContent,
|
|
91
|
-
DialogHeader,
|
|
92
|
-
DialogFooter,
|
|
93
|
-
DialogTitle,
|
|
94
|
-
DialogDescription,
|
|
95
|
-
};
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Drawer as DrawerPrimitive } from "vaul";
|
|
3
|
-
|
|
4
|
-
import { cn } from "@/lib/utils";
|
|
5
|
-
|
|
6
|
-
const Drawer = ({ shouldScaleBackground = true, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) => (
|
|
7
|
-
<DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />
|
|
8
|
-
);
|
|
9
|
-
Drawer.displayName = "Drawer";
|
|
10
|
-
|
|
11
|
-
const DrawerTrigger = DrawerPrimitive.Trigger;
|
|
12
|
-
|
|
13
|
-
const DrawerPortal = DrawerPrimitive.Portal;
|
|
14
|
-
|
|
15
|
-
const DrawerClose = DrawerPrimitive.Close;
|
|
16
|
-
|
|
17
|
-
const DrawerOverlay = React.forwardRef<
|
|
18
|
-
React.ElementRef<typeof DrawerPrimitive.Overlay>,
|
|
19
|
-
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>
|
|
20
|
-
>(({ className, ...props }, ref) => (
|
|
21
|
-
<DrawerPrimitive.Overlay ref={ref} className={cn("fixed inset-0 z-50 bg-black/80", className)} {...props} />
|
|
22
|
-
));
|
|
23
|
-
DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;
|
|
24
|
-
|
|
25
|
-
const DrawerContent = React.forwardRef<
|
|
26
|
-
React.ElementRef<typeof DrawerPrimitive.Content>,
|
|
27
|
-
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>
|
|
28
|
-
>(({ className, children, ...props }, ref) => (
|
|
29
|
-
<DrawerPortal>
|
|
30
|
-
<DrawerOverlay />
|
|
31
|
-
<DrawerPrimitive.Content
|
|
32
|
-
ref={ref}
|
|
33
|
-
className={cn(
|
|
34
|
-
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
|
35
|
-
className,
|
|
36
|
-
)}
|
|
37
|
-
{...props}
|
|
38
|
-
>
|
|
39
|
-
<div className="mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" />
|
|
40
|
-
{children}
|
|
41
|
-
</DrawerPrimitive.Content>
|
|
42
|
-
</DrawerPortal>
|
|
43
|
-
));
|
|
44
|
-
DrawerContent.displayName = "DrawerContent";
|
|
45
|
-
|
|
46
|
-
const DrawerHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
|
|
47
|
-
<div className={cn("grid gap-1.5 p-4 text-center sm:text-left", className)} {...props} />
|
|
48
|
-
);
|
|
49
|
-
DrawerHeader.displayName = "DrawerHeader";
|
|
50
|
-
|
|
51
|
-
const DrawerFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
|
|
52
|
-
<div className={cn("mt-auto flex flex-col gap-2 p-4", className)} {...props} />
|
|
53
|
-
);
|
|
54
|
-
DrawerFooter.displayName = "DrawerFooter";
|
|
55
|
-
|
|
56
|
-
const DrawerTitle = React.forwardRef<
|
|
57
|
-
React.ElementRef<typeof DrawerPrimitive.Title>,
|
|
58
|
-
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>
|
|
59
|
-
>(({ className, ...props }, ref) => (
|
|
60
|
-
<DrawerPrimitive.Title
|
|
61
|
-
ref={ref}
|
|
62
|
-
className={cn("text-lg font-semibold leading-none tracking-tight", className)}
|
|
63
|
-
{...props}
|
|
64
|
-
/>
|
|
65
|
-
));
|
|
66
|
-
DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
|
|
67
|
-
|
|
68
|
-
const DrawerDescription = React.forwardRef<
|
|
69
|
-
React.ElementRef<typeof DrawerPrimitive.Description>,
|
|
70
|
-
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>
|
|
71
|
-
>(({ className, ...props }, ref) => (
|
|
72
|
-
<DrawerPrimitive.Description ref={ref} className={cn("text-sm text-muted-foreground", className)} {...props} />
|
|
73
|
-
));
|
|
74
|
-
DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
|
|
75
|
-
|
|
76
|
-
export {
|
|
77
|
-
Drawer,
|
|
78
|
-
DrawerPortal,
|
|
79
|
-
DrawerOverlay,
|
|
80
|
-
DrawerTrigger,
|
|
81
|
-
DrawerClose,
|
|
82
|
-
DrawerContent,
|
|
83
|
-
DrawerHeader,
|
|
84
|
-
DrawerFooter,
|
|
85
|
-
DrawerTitle,
|
|
86
|
-
DrawerDescription,
|
|
87
|
-
};
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3
|
-
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils";
|
|
6
|
-
|
|
7
|
-
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
8
|
-
|
|
9
|
-
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
10
|
-
|
|
11
|
-
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
12
|
-
|
|
13
|
-
const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
14
|
-
|
|
15
|
-
const DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
16
|
-
|
|
17
|
-
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
18
|
-
|
|
19
|
-
const DropdownMenuSubTrigger = React.forwardRef<
|
|
20
|
-
React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
|
|
21
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
22
|
-
inset?: boolean;
|
|
23
|
-
}
|
|
24
|
-
>(({ className, inset, children, ...props }, ref) => (
|
|
25
|
-
<DropdownMenuPrimitive.SubTrigger
|
|
26
|
-
ref={ref}
|
|
27
|
-
className={cn(
|
|
28
|
-
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",
|
|
29
|
-
inset && "pl-8",
|
|
30
|
-
className,
|
|
31
|
-
)}
|
|
32
|
-
{...props}
|
|
33
|
-
>
|
|
34
|
-
{children}
|
|
35
|
-
<ChevronRight className="ml-auto h-4 w-4" />
|
|
36
|
-
</DropdownMenuPrimitive.SubTrigger>
|
|
37
|
-
));
|
|
38
|
-
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
39
|
-
|
|
40
|
-
const DropdownMenuSubContent = React.forwardRef<
|
|
41
|
-
React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
|
|
42
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>
|
|
43
|
-
>(({ className, ...props }, ref) => (
|
|
44
|
-
<DropdownMenuPrimitive.SubContent
|
|
45
|
-
ref={ref}
|
|
46
|
-
className={cn(
|
|
47
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
48
|
-
className,
|
|
49
|
-
)}
|
|
50
|
-
{...props}
|
|
51
|
-
/>
|
|
52
|
-
));
|
|
53
|
-
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
54
|
-
|
|
55
|
-
const DropdownMenuContent = React.forwardRef<
|
|
56
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
|
|
57
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
|
|
58
|
-
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
59
|
-
<DropdownMenuPrimitive.Portal>
|
|
60
|
-
<DropdownMenuPrimitive.Content
|
|
61
|
-
ref={ref}
|
|
62
|
-
sideOffset={sideOffset}
|
|
63
|
-
className={cn(
|
|
64
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
65
|
-
className,
|
|
66
|
-
)}
|
|
67
|
-
{...props}
|
|
68
|
-
/>
|
|
69
|
-
</DropdownMenuPrimitive.Portal>
|
|
70
|
-
));
|
|
71
|
-
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
72
|
-
|
|
73
|
-
const DropdownMenuItem = React.forwardRef<
|
|
74
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Item>,
|
|
75
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
|
|
76
|
-
inset?: boolean;
|
|
77
|
-
}
|
|
78
|
-
>(({ className, inset, ...props }, ref) => (
|
|
79
|
-
<DropdownMenuPrimitive.Item
|
|
80
|
-
ref={ref}
|
|
81
|
-
className={cn(
|
|
82
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
83
|
-
inset && "pl-8",
|
|
84
|
-
className,
|
|
85
|
-
)}
|
|
86
|
-
{...props}
|
|
87
|
-
/>
|
|
88
|
-
));
|
|
89
|
-
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
90
|
-
|
|
91
|
-
const DropdownMenuCheckboxItem = React.forwardRef<
|
|
92
|
-
React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
|
|
93
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>
|
|
94
|
-
>(({ className, children, checked, ...props }, ref) => (
|
|
95
|
-
<DropdownMenuPrimitive.CheckboxItem
|
|
96
|
-
ref={ref}
|
|
97
|
-
className={cn(
|
|
98
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
99
|
-
className,
|
|
100
|
-
)}
|
|
101
|
-
checked={checked}
|
|
102
|
-
{...props}
|
|
103
|
-
>
|
|
104
|
-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
105
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
106
|
-
<Check className="h-4 w-4" />
|
|
107
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
108
|
-
</span>
|
|
109
|
-
{children}
|
|
110
|
-
</DropdownMenuPrimitive.CheckboxItem>
|
|
111
|
-
));
|
|
112
|
-
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
113
|
-
|
|
114
|
-
const DropdownMenuRadioItem = React.forwardRef<
|
|
115
|
-
React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
|
|
116
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>
|
|
117
|
-
>(({ className, children, ...props }, ref) => (
|
|
118
|
-
<DropdownMenuPrimitive.RadioItem
|
|
119
|
-
ref={ref}
|
|
120
|
-
className={cn(
|
|
121
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
122
|
-
className,
|
|
123
|
-
)}
|
|
124
|
-
{...props}
|
|
125
|
-
>
|
|
126
|
-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
127
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
128
|
-
<Circle className="h-2 w-2 fill-current" />
|
|
129
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
130
|
-
</span>
|
|
131
|
-
{children}
|
|
132
|
-
</DropdownMenuPrimitive.RadioItem>
|
|
133
|
-
));
|
|
134
|
-
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
135
|
-
|
|
136
|
-
const DropdownMenuLabel = React.forwardRef<
|
|
137
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Label>,
|
|
138
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
|
|
139
|
-
inset?: boolean;
|
|
140
|
-
}
|
|
141
|
-
>(({ className, inset, ...props }, ref) => (
|
|
142
|
-
<DropdownMenuPrimitive.Label
|
|
143
|
-
ref={ref}
|
|
144
|
-
className={cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className)}
|
|
145
|
-
{...props}
|
|
146
|
-
/>
|
|
147
|
-
));
|
|
148
|
-
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
149
|
-
|
|
150
|
-
const DropdownMenuSeparator = React.forwardRef<
|
|
151
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
|
|
152
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
|
|
153
|
-
>(({ className, ...props }, ref) => (
|
|
154
|
-
<DropdownMenuPrimitive.Separator ref={ref} className={cn("-mx-1 my-1 h-px bg-muted", className)} {...props} />
|
|
155
|
-
));
|
|
156
|
-
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
157
|
-
|
|
158
|
-
const DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
159
|
-
return <span className={cn("ml-auto text-xs tracking-widest opacity-60", className)} {...props} />;
|
|
160
|
-
};
|
|
161
|
-
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
162
|
-
|
|
163
|
-
export {
|
|
164
|
-
DropdownMenu,
|
|
165
|
-
DropdownMenuTrigger,
|
|
166
|
-
DropdownMenuContent,
|
|
167
|
-
DropdownMenuItem,
|
|
168
|
-
DropdownMenuCheckboxItem,
|
|
169
|
-
DropdownMenuRadioItem,
|
|
170
|
-
DropdownMenuLabel,
|
|
171
|
-
DropdownMenuSeparator,
|
|
172
|
-
DropdownMenuShortcut,
|
|
173
|
-
DropdownMenuGroup,
|
|
174
|
-
DropdownMenuPortal,
|
|
175
|
-
DropdownMenuSub,
|
|
176
|
-
DropdownMenuSubContent,
|
|
177
|
-
DropdownMenuSubTrigger,
|
|
178
|
-
DropdownMenuRadioGroup,
|
|
179
|
-
};
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
-
import { Controller, ControllerProps, FieldPath, FieldValues, FormProvider, useFormContext } from "react-hook-form";
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils";
|
|
7
|
-
import { Label } from "@/components/ui/label";
|
|
8
|
-
|
|
9
|
-
const Form = FormProvider;
|
|
10
|
-
|
|
11
|
-
type FormFieldContextValue<
|
|
12
|
-
TFieldValues extends FieldValues = FieldValues,
|
|
13
|
-
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
|
14
|
-
> = {
|
|
15
|
-
name: TName;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const FormFieldContext = React.createContext<FormFieldContextValue>({} as FormFieldContextValue);
|
|
19
|
-
|
|
20
|
-
const FormField = <
|
|
21
|
-
TFieldValues extends FieldValues = FieldValues,
|
|
22
|
-
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
|
23
|
-
>({
|
|
24
|
-
...props
|
|
25
|
-
}: ControllerProps<TFieldValues, TName>) => {
|
|
26
|
-
return (
|
|
27
|
-
<FormFieldContext.Provider value={{ name: props.name }}>
|
|
28
|
-
<Controller {...props} />
|
|
29
|
-
</FormFieldContext.Provider>
|
|
30
|
-
);
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const useFormField = () => {
|
|
34
|
-
const fieldContext = React.useContext(FormFieldContext);
|
|
35
|
-
const itemContext = React.useContext(FormItemContext);
|
|
36
|
-
const { getFieldState, formState } = useFormContext();
|
|
37
|
-
|
|
38
|
-
const fieldState = getFieldState(fieldContext.name, formState);
|
|
39
|
-
|
|
40
|
-
if (!fieldContext) {
|
|
41
|
-
throw new Error("useFormField should be used within <FormField>");
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const { id } = itemContext;
|
|
45
|
-
|
|
46
|
-
return {
|
|
47
|
-
id,
|
|
48
|
-
name: fieldContext.name,
|
|
49
|
-
formItemId: `${id}-form-item`,
|
|
50
|
-
formDescriptionId: `${id}-form-item-description`,
|
|
51
|
-
formMessageId: `${id}-form-item-message`,
|
|
52
|
-
...fieldState,
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
type FormItemContextValue = {
|
|
57
|
-
id: string;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const FormItemContext = React.createContext<FormItemContextValue>({} as FormItemContextValue);
|
|
61
|
-
|
|
62
|
-
const FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
63
|
-
({ className, ...props }, ref) => {
|
|
64
|
-
const id = React.useId();
|
|
65
|
-
|
|
66
|
-
return (
|
|
67
|
-
<FormItemContext.Provider value={{ id }}>
|
|
68
|
-
<div ref={ref} className={cn("space-y-2", className)} {...props} />
|
|
69
|
-
</FormItemContext.Provider>
|
|
70
|
-
);
|
|
71
|
-
},
|
|
72
|
-
);
|
|
73
|
-
FormItem.displayName = "FormItem";
|
|
74
|
-
|
|
75
|
-
const FormLabel = React.forwardRef<
|
|
76
|
-
React.ElementRef<typeof LabelPrimitive.Root>,
|
|
77
|
-
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>
|
|
78
|
-
>(({ className, ...props }, ref) => {
|
|
79
|
-
const { error, formItemId } = useFormField();
|
|
80
|
-
|
|
81
|
-
return <Label ref={ref} className={cn(error && "text-destructive", className)} htmlFor={formItemId} {...props} />;
|
|
82
|
-
});
|
|
83
|
-
FormLabel.displayName = "FormLabel";
|
|
84
|
-
|
|
85
|
-
const FormControl = React.forwardRef<React.ElementRef<typeof Slot>, React.ComponentPropsWithoutRef<typeof Slot>>(
|
|
86
|
-
({ ...props }, ref) => {
|
|
87
|
-
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
88
|
-
|
|
89
|
-
return (
|
|
90
|
-
<Slot
|
|
91
|
-
ref={ref}
|
|
92
|
-
id={formItemId}
|
|
93
|
-
aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}
|
|
94
|
-
aria-invalid={!!error}
|
|
95
|
-
{...props}
|
|
96
|
-
/>
|
|
97
|
-
);
|
|
98
|
-
},
|
|
99
|
-
);
|
|
100
|
-
FormControl.displayName = "FormControl";
|
|
101
|
-
|
|
102
|
-
const FormDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(
|
|
103
|
-
({ className, ...props }, ref) => {
|
|
104
|
-
const { formDescriptionId } = useFormField();
|
|
105
|
-
|
|
106
|
-
return <p ref={ref} id={formDescriptionId} className={cn("text-sm text-muted-foreground", className)} {...props} />;
|
|
107
|
-
},
|
|
108
|
-
);
|
|
109
|
-
FormDescription.displayName = "FormDescription";
|
|
110
|
-
|
|
111
|
-
const FormMessage = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(
|
|
112
|
-
({ className, children, ...props }, ref) => {
|
|
113
|
-
const { error, formMessageId } = useFormField();
|
|
114
|
-
const body = error ? String(error?.message) : children;
|
|
115
|
-
|
|
116
|
-
if (!body) {
|
|
117
|
-
return null;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
return (
|
|
121
|
-
<p ref={ref} id={formMessageId} className={cn("text-sm font-medium text-destructive", className)} {...props}>
|
|
122
|
-
{body}
|
|
123
|
-
</p>
|
|
124
|
-
);
|
|
125
|
-
},
|
|
126
|
-
);
|
|
127
|
-
FormMessage.displayName = "FormMessage";
|
|
128
|
-
|
|
129
|
-
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
3
|
-
|
|
4
|
-
import { cn } from "@/lib/utils";
|
|
5
|
-
|
|
6
|
-
const HoverCard = HoverCardPrimitive.Root;
|
|
7
|
-
|
|
8
|
-
const HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
9
|
-
|
|
10
|
-
const HoverCardContent = React.forwardRef<
|
|
11
|
-
React.ElementRef<typeof HoverCardPrimitive.Content>,
|
|
12
|
-
React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>
|
|
13
|
-
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
|
|
14
|
-
<HoverCardPrimitive.Content
|
|
15
|
-
ref={ref}
|
|
16
|
-
align={align}
|
|
17
|
-
sideOffset={sideOffset}
|
|
18
|
-
className={cn(
|
|
19
|
-
"z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
20
|
-
className,
|
|
21
|
-
)}
|
|
22
|
-
{...props}
|
|
23
|
-
/>
|
|
24
|
-
));
|
|
25
|
-
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
26
|
-
|
|
27
|
-
export { HoverCard, HoverCardTrigger, HoverCardContent };
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { OTPInput, OTPInputContext } from "input-otp";
|
|
3
|
-
import { Dot } from "lucide-react";
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils";
|
|
6
|
-
|
|
7
|
-
const InputOTP = React.forwardRef<React.ElementRef<typeof OTPInput>, React.ComponentPropsWithoutRef<typeof OTPInput>>(
|
|
8
|
-
({ className, containerClassName, ...props }, ref) => (
|
|
9
|
-
<OTPInput
|
|
10
|
-
ref={ref}
|
|
11
|
-
containerClassName={cn("flex items-center gap-2 has-[:disabled]:opacity-50", containerClassName)}
|
|
12
|
-
className={cn("disabled:cursor-not-allowed", className)}
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
15
|
-
),
|
|
16
|
-
);
|
|
17
|
-
InputOTP.displayName = "InputOTP";
|
|
18
|
-
|
|
19
|
-
const InputOTPGroup = React.forwardRef<React.ElementRef<"div">, React.ComponentPropsWithoutRef<"div">>(
|
|
20
|
-
({ className, ...props }, ref) => <div ref={ref} className={cn("flex items-center", className)} {...props} />,
|
|
21
|
-
);
|
|
22
|
-
InputOTPGroup.displayName = "InputOTPGroup";
|
|
23
|
-
|
|
24
|
-
const InputOTPSlot = React.forwardRef<
|
|
25
|
-
React.ElementRef<"div">,
|
|
26
|
-
React.ComponentPropsWithoutRef<"div"> & { index: number }
|
|
27
|
-
>(({ index, className, ...props }, ref) => {
|
|
28
|
-
const inputOTPContext = React.useContext(OTPInputContext);
|
|
29
|
-
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<div
|
|
33
|
-
ref={ref}
|
|
34
|
-
className={cn(
|
|
35
|
-
"relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",
|
|
36
|
-
isActive && "z-10 ring-2 ring-ring ring-offset-background",
|
|
37
|
-
className,
|
|
38
|
-
)}
|
|
39
|
-
{...props}
|
|
40
|
-
>
|
|
41
|
-
{char}
|
|
42
|
-
{hasFakeCaret && (
|
|
43
|
-
<div className="pointer-events-none absolute inset-0 flex items-center justify-center">
|
|
44
|
-
<div className="animate-caret-blink h-4 w-px bg-foreground duration-1000" />
|
|
45
|
-
</div>
|
|
46
|
-
)}
|
|
47
|
-
</div>
|
|
48
|
-
);
|
|
49
|
-
});
|
|
50
|
-
InputOTPSlot.displayName = "InputOTPSlot";
|
|
51
|
-
|
|
52
|
-
const InputOTPSeparator = React.forwardRef<React.ElementRef<"div">, React.ComponentPropsWithoutRef<"div">>(
|
|
53
|
-
({ ...props }, ref) => (
|
|
54
|
-
<div ref={ref} role="separator" {...props}>
|
|
55
|
-
<Dot />
|
|
56
|
-
</div>
|
|
57
|
-
),
|
|
58
|
-
);
|
|
59
|
-
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
60
|
-
|
|
61
|
-
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "@/lib/utils";
|
|
4
|
-
|
|
5
|
-
const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<"input">>(
|
|
6
|
-
({ className, type, ...props }, ref) => {
|
|
7
|
-
return (
|
|
8
|
-
<input
|
|
9
|
-
type={type}
|
|
10
|
-
className={cn(
|
|
11
|
-
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
12
|
-
className,
|
|
13
|
-
)}
|
|
14
|
-
ref={ref}
|
|
15
|
-
{...props}
|
|
16
|
-
/>
|
|
17
|
-
);
|
|
18
|
-
},
|
|
19
|
-
);
|
|
20
|
-
Input.displayName = "Input";
|
|
21
|
-
|
|
22
|
-
export { Input };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils";
|
|
6
|
-
|
|
7
|
-
const labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
8
|
-
|
|
9
|
-
const Label = React.forwardRef<
|
|
10
|
-
React.ElementRef<typeof LabelPrimitive.Root>,
|
|
11
|
-
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>
|
|
12
|
-
>(({ className, ...props }, ref) => (
|
|
13
|
-
<LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />
|
|
14
|
-
));
|
|
15
|
-
Label.displayName = LabelPrimitive.Root.displayName;
|
|
16
|
-
|
|
17
|
-
export { Label };
|